mirror of
https://github.com/snesrev/zelda3.git
synced 2025-12-19 18:05:55 -05:00
Silence a bunch of warnings
This commit is contained in:
@@ -5165,7 +5165,7 @@ void Ancilla2E_SomariaBlockFission(int k) { // 88eb3e
|
||||
}
|
||||
Point16U pt;
|
||||
Ancilla_PrepAdjustedOamCoord(k, &pt);
|
||||
OamEnt *oam = GetOamCurPtr(), *oam_org = oam;
|
||||
OamEnt *oam = GetOamCurPtr();
|
||||
|
||||
int8 z = ancilla_z[k] + (ancilla_K[k] == 3 && BYTE(link_z_coord) != 0xff ? BYTE(link_z_coord) : 0);
|
||||
int j = ancilla_item_to_link[k] * 8;
|
||||
@@ -5923,7 +5923,6 @@ void AncillaAdd_TossedPondItem(uint8 a, uint8 xin, uint8 yin) { // 898a32
|
||||
ancilla_z[k] = 0;
|
||||
ancilla_timer[k] = 16;
|
||||
ancilla_item_to_link[k] = link_receiveitem_index;
|
||||
int j = link_receiveitem_index;
|
||||
Ancilla_SetXY(k,
|
||||
link_x_coord + kWishPondItem_X[link_receiveitem_index],
|
||||
link_y_coord + kWishPondItem_Y[link_receiveitem_index]);
|
||||
@@ -6368,8 +6367,6 @@ void AncillaAdd_SwordSwingSparkle(uint8 a, uint8 y) { // 8993c2
|
||||
}
|
||||
|
||||
void AncillaAdd_DashTremor(uint8 a, uint8 y) { // 8993f3
|
||||
static const uint8 kAddDashingDust_X[4] = {4, 4, 6, 0};
|
||||
static const uint8 kAddDashingDust_Y[4] = {20, 4, 16, 16};
|
||||
static const uint8 kAddDashTremor_Dir[4] = {2, 2, 0, 0};
|
||||
static const uint8 kAddDashTremor_Tab[2] = {0x80, 0x78};
|
||||
if (AncillaAdd_CheckForPresence(a))
|
||||
|
||||
12
main.c
12
main.c
@@ -34,7 +34,6 @@ void ShaderInit();
|
||||
// Forwards
|
||||
static bool LoadRom(const char *filename);
|
||||
static void LoadLinkGraphics();
|
||||
static void PlayAudio(SDL_AudioDeviceID device, int channels, int16 *audioBuffer);
|
||||
static void RenderNumber(uint8 *dst, size_t pitch, int n, bool big);
|
||||
static void HandleInput(int keyCode, int modCode, bool pressed);
|
||||
static void HandleCommand(uint32 j, bool pressed);
|
||||
@@ -269,10 +268,10 @@ static void SdlRenderer_BeginDraw(int width, int height, uint8 **pixels, int *pi
|
||||
|
||||
static void SdlRenderer_EndDraw() {
|
||||
|
||||
uint64 before = SDL_GetPerformanceCounter();
|
||||
// uint64 before = SDL_GetPerformanceCounter();
|
||||
SDL_UnlockTexture(g_texture);
|
||||
uint64 after = SDL_GetPerformanceCounter();
|
||||
float v = (double)(after - before) / SDL_GetPerformanceFrequency();
|
||||
// uint64 after = SDL_GetPerformanceCounter();
|
||||
// float v = (double)(after - before) / SDL_GetPerformanceFrequency();
|
||||
// printf("%f ms\n", v * 1000);
|
||||
SDL_RenderClear(g_renderer);
|
||||
SDL_RenderCopy(g_renderer, g_texture, &g_sdl_renderer_rect, NULL);
|
||||
@@ -365,7 +364,7 @@ int main(int argc, char** argv) {
|
||||
if (!g_renderer_funcs.Initialize(window))
|
||||
return 1;
|
||||
|
||||
SDL_AudioDeviceID device;
|
||||
SDL_AudioDeviceID device = 0;
|
||||
SDL_AudioSpec want = { 0 }, have;
|
||||
g_audio_mutex = SDL_CreateMutex();
|
||||
if (!g_audio_mutex) Die("No mutex");
|
||||
@@ -451,7 +450,8 @@ int main(int argc, char** argv) {
|
||||
|
||||
if (g_paused != audiopaused) {
|
||||
audiopaused = g_paused;
|
||||
SDL_PauseAudioDevice(device, audiopaused);
|
||||
if (device)
|
||||
SDL_PauseAudioDevice(device, audiopaused);
|
||||
}
|
||||
|
||||
if (g_paused) {
|
||||
|
||||
@@ -63,7 +63,6 @@ static const uint16 kDungMap_Tab23[744] = {
|
||||
0x13a4, 0xb00, 0x138e, 0xb00, 0xb00, 0x5393, 0xb00, 0x574e, 0x4b7d, 0xb00, 0x8b7d, 0x139f, 0x97aa, 0x13a4, 0x13a9, 0x53a9, 0x13a5, 0x13a6, 0x93a5, 0xd3a5, 0xd38e, 0x938e, 0x13a4, 0x13aa, 0xb00, 0x13a6, 0xb00, 0x8b5f, 0x139b, 0x13a6, 0x139c, 0x53a2,
|
||||
0xb00, 0xb00, 0x138c, 0xb00, 0x9394, 0x139e, 0xb00, 0xb00,
|
||||
};
|
||||
static const uint16 kDungMap_Ptrs27[14] = {0xfc00, 0xfc08, 0xfc15, 0xfc21, 0xfc2b, 0xfc32, 0xfc3f, 0xfc4d, 0xfc5f, 0xfc68, 0xfc7d, 0xfc83, 0xfc8f, 0xfca0};
|
||||
static const uint16 kDungMap_Tab21[3] = {137, 167, 79};
|
||||
static const uint16 kDungMap_Tab22[3] = {169, 119, 190};
|
||||
static const uint16 kDungMap_Tab24[2] = {0x1f, 0x7f};
|
||||
@@ -1717,7 +1716,6 @@ void Module0E_03_01_02_DrawFloorsBackdrop() { // 8ae1f3
|
||||
|
||||
void DungeonMap_BuildFloorListBoxes(uint8 t5, uint16 r14) { // 8ae2f5
|
||||
int n = (t5 & 0xf) + (t5 >> 4);
|
||||
uint8 r12 = dung_cur_floor + (t5 & 0xf);
|
||||
r14 -= 0x40 - 2;
|
||||
r14 += (t5 & 0xf) * 0x40;
|
||||
int offs = vram_upload_offset >> 1;
|
||||
@@ -1971,7 +1969,6 @@ void DungeonMap_HandleMovementInput() { // 8ae979
|
||||
void DungeonMap_HandleFloorSelect() { // 8ae986
|
||||
uint8 r2 = (kDungMap_Tab5[cur_palace_index_x2 >> 1] >> 4 & 0xf);
|
||||
uint8 r3 = (kDungMap_Tab5[cur_palace_index_x2 >> 1] & 0xf);
|
||||
uint8 yv = 7;
|
||||
if (r2 + r3 < 3 || dungmap_var2 || !(joypad1H_last & 0xc))
|
||||
return;
|
||||
dungmap_cur_floor &= 0xff;
|
||||
|
||||
@@ -51,7 +51,7 @@ APP_VERSION := $(shell git rev-parse --short HEAD) $(shell git rev-parse --abbr
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
||||
|
||||
CFLAGS := -g -Wall -O2 -ffunction-sections \
|
||||
CFLAGS := -g -Wall -O2 -ffunction-sections -Wno-parentheses \
|
||||
$(ARCH) $(DEFINES)
|
||||
|
||||
CFLAGS += -D__SWITCH__ $(INCLUDE) -DSTBI_NO_THREAD_LOCALS `sdl2-config --cflags`
|
||||
|
||||
@@ -220,7 +220,6 @@ static void PpuWindows_Calc(PpuWindows *win, Ppu *ppu, uint layer) {
|
||||
int window_right = 256 + (layer != 2 ? ppu->extraRightCur : 0);
|
||||
win->edges[0] = - (layer != 2 ? ppu->extraLeftCur : 0);
|
||||
win->edges[1] = window_right;
|
||||
uint8 window_bits = 0;
|
||||
uint i, j;
|
||||
int t;
|
||||
bool w1_ena = (winflags & kWindow1Enabled) && ppu->window1left <= ppu->window1right;
|
||||
|
||||
20
snes/snes.c
20
snes/snes.c
@@ -18,9 +18,6 @@
|
||||
#include "tracing.h"
|
||||
#include "snes_regs.h"
|
||||
|
||||
static const double apuCyclesPerMaster = (32040 * 32) / (1364 * 262 * 60.0);
|
||||
|
||||
static void snes_runCpu(Snes* snes);
|
||||
static void snes_catchupApu(Snes* snes);
|
||||
static uint8_t snes_readReg(Snes* snes, uint16_t adr);
|
||||
static void snes_writeReg(Snes* snes, uint16_t adr, uint8_t val);
|
||||
@@ -104,8 +101,6 @@ void snes_reset(Snes* snes, bool hard) {
|
||||
snes->openBus = 0;
|
||||
}
|
||||
|
||||
static uint8_t g_last_module;
|
||||
|
||||
void snes_printCpuLine(Snes *snes) {
|
||||
if (snes->debug_cycles) {
|
||||
static FILE *fout;
|
||||
@@ -121,21 +116,6 @@ void snes_printCpuLine(Snes *snes) {
|
||||
}
|
||||
}
|
||||
|
||||
static void snes_runCpu(Snes* snes) {
|
||||
if(snes->cpuCyclesLeft == 0) {
|
||||
snes->cpuMemOps = 0;
|
||||
uint32_t pc = snes->cpu->pc | snes->cpu->k << 16;
|
||||
if (snes->debug_cycles) {
|
||||
char line[80];
|
||||
getProcessorStateCpu(snes, line);
|
||||
puts(line);
|
||||
}
|
||||
int cycles = cpu_runOpcode(snes->cpu);
|
||||
snes->cpuCyclesLeft += (cycles - snes->cpuMemOps) * 6;
|
||||
}
|
||||
snes->cpuCyclesLeft -= 2;
|
||||
}
|
||||
|
||||
static void snes_catchupApu(Snes* snes) {
|
||||
int catchupCycles = (int) snes->apuCatchupCycles;
|
||||
for(int i = 0; i < catchupCycles; i++) {
|
||||
|
||||
@@ -3971,7 +3971,6 @@ void SpriteDraw_BNCFlail(int k, PrepOamCoordsRet *info) { // 85b468
|
||||
uint8 r12 = kFlailTrooperWeapon_Tab1[sprite_D[k]];
|
||||
uint8 r13 = kFlailTrooperWeapon_Tab2[sprite_D[k]];
|
||||
|
||||
uint16 r10 = (r0 & 0x1ff) >> 6;
|
||||
uint16 r2 = (r0 + 0x80) & 0x1ff;
|
||||
|
||||
uint8 r14 = ChainBallMult(kSinusLookupTable[r0 & 0xff], qq);
|
||||
@@ -9701,8 +9700,6 @@ void Sprite_28_DarkWorldHintNPC(int k) { // 86ad6f
|
||||
if (!sprite_delay_main[k])
|
||||
sprite_graphics[k] = frame_counter >> 4 & 1;
|
||||
|
||||
int type = sprite_subtype2[k];
|
||||
|
||||
switch(sprite_subtype2[k]) {
|
||||
case 0:
|
||||
switch (sprite_ai_state[k]) {
|
||||
@@ -18036,7 +18033,6 @@ void SpriteDraw_Moldorm_Eyeballs(int k, PrepOamCoordsRet *info) { // 9ddb9e
|
||||
static const uint8 kGiantMoldorm_Eye_Char[16] = {0xaa, 0xaa, 0xa8, 0xa8, 0x8a, 0x8a, 0xa8, 0xa8, 0xaa, 0xaa, 0xa8, 0xa8, 0x8a, 0x8a, 0xa8, 0xa8};
|
||||
static const uint8 kGiantMoldorm_Eye_Flags[16] = {0, 0, 0, 0, 0x80, 0x80, 0x40, 0x40, 0x40, 0x40, 0xc0, 0xc0, 0, 0, 0x80, 0x80};
|
||||
OamEnt *oam = GetOamCurPtr();
|
||||
uint8 yoff = kBadPullSwitch_Tab5[kBadPullSwitch_Tab4[sprite_graphics[k]]];
|
||||
int r7 = sprite_F[k] ? frame_counter : 0;
|
||||
int r6 = sprite_D[k] - 1;
|
||||
for (int i = 1; i >= 0; i--, oam++, r6 += 2) {
|
||||
@@ -20945,7 +20941,7 @@ void Sprite_9A_Kyameron(int k) { // 9e9e7b
|
||||
}
|
||||
if (sign8(--sprite_subtype2[k])) {
|
||||
sprite_subtype2[k] = 5;
|
||||
sprite_graphics[k] = (++sprite_graphics[k] & 3) + 8;
|
||||
sprite_graphics[k] = (sprite_graphics[k] + 1 & 3) + 8;
|
||||
}
|
||||
break;
|
||||
case 2: { // coagulate
|
||||
|
||||
@@ -168,7 +168,7 @@ static void VerifySnapshotsEq(Snapshot *b, Snapshot *a, Snapshot *prev) {
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t *RomByte(Cart *cart, uint32_t addr) {
|
||||
uint8_t *RomByte(Cart *cart, uint32_t addr) {
|
||||
return &cart->rom[(((addr >> 16) << 15) | (addr & 0x7fff)) & (cart->romSize - 1)];
|
||||
}
|
||||
|
||||
|
||||
@@ -499,7 +499,6 @@ void StateRecorder_Load(StateRecorder *sr, FILE *f, bool replay_mode) {
|
||||
|
||||
sr->replay_next_cmd_at = 0;
|
||||
|
||||
bool is_reset = false;
|
||||
sr->replay_mode = replay_mode;
|
||||
if (replay_mode) {
|
||||
sr->frames_since_last = 0;
|
||||
@@ -514,7 +513,6 @@ void StateRecorder_Load(StateRecorder *sr, FILE *f, bool replay_mode) {
|
||||
assert(state.p == state.pend);
|
||||
} else {
|
||||
ZeldaReset(false);
|
||||
is_reset = true;
|
||||
}
|
||||
} else {
|
||||
// Resume replay from the saved position?
|
||||
|
||||
Reference in New Issue
Block a user