ref: 7052926b8e5caf0881bf16555766b9b46ae7678e
parent: fbbb3f967a51fafe642e6140d0753979e73b4090
author: Jacob Moody <moody@posixcafe.org>
date: Mon Sep 4 17:37:48 EDT 2023
func() -> func(void) defs
--- a/snes/apu.c
+++ b/snes/apu.c
@@ -17,7 +17,7 @@
0xf6, 0xda, 0x00, 0xba, 0xf4, 0xc4, 0xf4, 0xdd, 0x5d, 0xd0, 0xdb, 0x1f, 0x00, 0x00, 0xc0, 0xff
};
-Apu* apu_init() {
+Apu* apu_init(void) {
Apu* apu = (Apu * )malloc(sizeof(Apu));
apu->spc = spc_init(apu);
apu->dsp = dsp_init(apu->ram);
--- a/snes/apu.h
+++ b/snes/apu.h
@@ -53,7 +53,7 @@
uint8_t cpuCyclesLeft;
} Apu2;
-Apu* apu_init();
+Apu* apu_init(void);
void apu_free(Apu* apu);
void apu_reset(Apu* apu);
void apu_cycle(Apu* apu);
--- a/snes/dsp_regs.h
+++ b/snes/dsp_regs.h
@@ -106,4 +106,4 @@
EDL = 0x7D,
FIR7 = 0x7F,
};
-#endif // DSP_REGS_H
\ No newline at end of file
+#endif // DSP_REGS_H
--- a/snes/ppu.h
+++ b/snes/ppu.h
@@ -127,7 +127,7 @@
uint16_t vram[0x8000];
};
-Ppu* ppu_init();
+Ppu* ppu_init(void);
void ppu_free(Ppu* ppu);
void ppu_reset(Ppu* ppu);
void ppu_handleVblank(Ppu* ppu);
--- a/snes/saveload.h
+++ b/snes/saveload.h
@@ -2,4 +2,4 @@
typedef void SaveLoadFunc(void *ctx, void *data, size_t data_size);
-#define SL(x) func(ctx, &x, sizeof(x))
\ No newline at end of file
+#define SL(x) func(ctx, &x, sizeof(x))
--- a/snes/snes.c
+++ b/snes/snes.c
@@ -30,7 +30,7 @@
snes->cpu = cpu_init(snes, 0);
snes->apu = apu_init();
snes->dma = dma_init(snes);
- snes->ppu = ppu_init(snes);
+ snes->ppu = ppu_init();
snes->cart = cart_init(snes);
snes->input1 = input_init(snes);
snes->input2 = input_init(snes);
--- a/src/ancilla.h
+++ b/src/ancilla.h
@@ -22,7 +22,7 @@
uint16 Ancilla_GetY(int k);
void Ancilla_SetX(int k, uint16 x);
void Ancilla_SetY(int k, uint16 y);
-int Ancilla_AllocHigh();
+int Ancilla_AllocHigh(void);
void Ancilla_Empty(int k);
void Ancilla_Unused_14(int k);
void Ancilla_Unused_25(int k);
@@ -35,16 +35,16 @@
void Medallion_CheckSpriteDamage(int k);
void Ancilla_CheckDamageToSprite(int k, uint8 type);
void Ancilla_CheckDamageToSprite_aggressive(int k, uint8 type);
-void CallForDuckIndoors();
+void CallForDuckIndoors(void);
void Ancilla_Sfx1_Pan(int k, uint8 v);
void Ancilla_Sfx2_Pan(int k, uint8 v);
void Ancilla_Sfx3_Pan(int k, uint8 v);
void AncillaAdd_FireRodShot(uint8 type, uint8 y);
void SomariaBlock_SpawnBullets(int k);
-void Ancilla_Main();
+void Ancilla_Main(void);
ProjectSpeedRet Ancilla_ProjectReflexiveSpeedOntoSprite(int k, uint16 x, uint16 y, uint8 vel);
void Bomb_CheckSpriteDamage(int k);
-void Ancilla_ExecuteAll();
+void Ancilla_ExecuteAll(void);
void Ancilla_ExecuteOne(uint8 type, int k);
void Ancilla13_IceRodSparkle(int k);
void AncillaAdd_IceRodSparkle(int k);
@@ -66,7 +66,7 @@
ProjectSpeedRet Ancilla_ProjectSpeedTowardsPlayer(int k, uint8 vel);
PairU8 Ancilla_IsRightOfLink(int k);
PairU8 Ancilla_IsBelowLink(int k);
-void Ancilla_WeaponTink();
+void Ancilla_WeaponTink(void);
void Ancilla_MoveX(int k);
void Ancilla_MoveY(int k);
void Ancilla_MoveZ(int k);
@@ -151,7 +151,7 @@
void AncillaAdd_OccasionalSparkle(int k);
void Ancilla43_GanonsTowerCutscene(int k);
void AncillaDraw_GTCutsceneCrystal(OamEnt *oam, int x, int y);
-void GTCutscene_ActivateSparkle();
+void GTCutscene_ActivateSparkle(void);
OamEnt *GTCutscene_SparkleALot(OamEnt *oam);
void Ancilla36_Flute(int k);
void Ancilla37_WeathervaneExplosion(int k);
@@ -190,10 +190,10 @@
void Ancilla24_Gravestone(int k);
void Ancilla34_SkullWoodsFire(int k);
void Ancilla3A_BigBombExplosion(int k);
-void RevivalFairy_Main();
-void RevivalFairy_Dust();
-void RevivalFairy_MonitorHP();
-void GameOverText_Draw();
+void RevivalFairy_Main(void);
+void RevivalFairy_Dust(void);
+void RevivalFairy_MonitorHP(void);
+void GameOverText_Draw(void);
int AncillaAdd_AddAncilla_Bank08(uint8 type, uint8 y);
void Ancilla_PrepOamCoord(int k, Point16U *info);
void Ancilla_PrepAdjustedOamCoord(int k, Point16U *info);
@@ -215,12 +215,12 @@
void AncillaAdd_TossedPondItem(uint8 a, uint8 xin, uint8 yin);
void AddHappinessPondRupees(uint8 arg);
int AncillaAdd_FallingPrize(uint8 a, uint8 item_idx, uint8 yv);
-void AncillaAdd_ChargedSpinAttackSparkle();
+void AncillaAdd_ChargedSpinAttackSparkle(void);
void AncillaAdd_ExplodingWeatherVane(uint8 a, uint8 y);
void AncillaAdd_CutsceneDuck(uint8 a, uint8 y);
void AncillaAdd_SomariaPlatformPoof(int k);
int AncillaAdd_SuperBombExplosion(uint8 a, uint8 y);
-void ConfigureRevivalAncillae();
+void ConfigureRevivalAncillae(void);
void AncillaAdd_LampFlame(uint8 a, uint8 y);
void AncillaAdd_MSCutscene(uint8 a, uint8 y);
void AncillaAdd_DashDust(uint8 a, uint8 y);
@@ -232,7 +232,7 @@
void AncillaAdd_DwarfPoof(uint8 ain, uint8 yin);
void AncillaAdd_BushPoof(uint16 x, uint16 y);
void AncillaAdd_EtherSpell(uint8 a, uint8 y);
-void AncillaAdd_VictorySpin();
+void AncillaAdd_VictorySpin(void);
void AncillaAdd_MagicPowder(uint8 a, uint8 y);
void AncillaAdd_WallTapSpark(uint8 a, uint8 y);
void AncillaAdd_SwordSwingSparkle(uint8 a, uint8 y);
@@ -243,15 +243,15 @@
void AddBirdTravelSomething(uint8 a, uint8 y);
void AncillaAdd_QuakeSpell(uint8 a, uint8 y);
void AncillaAdd_SpinAttackInitSpark(uint8 a, uint8 x, uint8 y);
-void AncillaAdd_BlastWall();
+void AncillaAdd_BlastWall(void);
void AncillaAdd_SwordChargeSparkle(int k);
void AncillaAdd_SilverArrowSparkle(int kin);
void AncillaAdd_IceRodShot(uint8 a, uint8 y);
bool AncillaAdd_Splash(uint8 a, uint8 y);
void AncillaAdd_GraveStone(uint8 ain, uint8 yin);
-void AncillaAdd_WaterfallSplash();
-void AncillaAdd_GTCutscene();
-int AncillaAdd_DoorDebris();
+void AncillaAdd_WaterfallSplash(void);
+void AncillaAdd_GTCutscene(void);
+int AncillaAdd_DoorDebris(void);
void FireRodShot_BecomeSkullWoodsFire(int k);
int Ancilla_AddAncilla(uint8 a, uint8 y);
bool AncillaAdd_CheckForPresence(uint8 a);
@@ -266,7 +266,7 @@
uint8 Ancilla_CalculateSfxPan(int k);
int Ancilla_AllocInit(uint8 type, uint8 y);
void AddSwordBeam(uint8 y);
-void AncillaSpawn_SwordChargeSparkle();
+void AncillaSpawn_SwordChargeSparkle(void);
int DashTremor_TwiddleOffset(int k);
void Ancilla_TerminateIfOffscreen(int j);
bool Bomb_CheckUndersideSpriteStatus(int k, Point16U *out_pt, uint8 *out_r10);
--- a/src/attract.h
+++ b/src/attract.h
@@ -8,43 +8,43 @@
extern const uint16 kMapMode_Zooms1[240];
extern const uint16 kMapMode_Zooms2[240];
void Attract_DrawSpriteSet2(const AttractOamInfo *p, int n);
-void Attract_ZeldaPrison_Case0();
-void Attract_ZeldaPrison_Case1();
-void Attract_ZeldaPrison_DrawA();
-void Attract_MaidenWarp_Case0();
-void Attract_MaidenWarp_Case1();
-void Attract_MaidenWarp_Case2();
-void Attract_MaidenWarp_Case3();
-void Attract_MaidenWarp_Case4();
+void Attract_ZeldaPrison_Case0(void);
+void Attract_ZeldaPrison_Case1(void);
+void Attract_ZeldaPrison_DrawA(void);
+void Attract_MaidenWarp_Case0(void);
+void Attract_MaidenWarp_Case1(void);
+void Attract_MaidenWarp_Case2(void);
+void Attract_MaidenWarp_Case3(void);
+void Attract_MaidenWarp_Case4(void);
void Dungeon_LoadAndDrawEntranceRoom(uint8 a);
void Dungeon_SaveAndLoadLoadAllPalettes(uint8 a, uint8 k);
-void Module14_Attract();
-void Attract_Fade();
-void Attract_InitGraphics();
-void Attract_FadeInStep();
-void Attract_FadeInSequence();
-void Attract_FadeOutSequence();
-void Attract_LoadNewScene();
-void AttractScene_PolkaDots();
-void AttractScene_WorldMap();
-void AttractScene_ThroneRoom();
-void Attract_PrepFinish();
-void Attract_PrepZeldaPrison();
-void Attract_PrepMaidenWarp();
-void AttractScene_EndOfStory();
-void Death_Func31();
-void Attract_EnactStory();
-void AttractDramatize_PolkaDots();
-void AttractDramatize_WorldMap();
-void Attract_ThroneRoom();
-void AttractDramatize_Prison();
-void AttractDramatize_AgahnimAltar();
-void Attract_SkipToFileSelect();
-void Attract_BuildNextImageTileMap();
-void Attract_ShowTimedTextMessage();
-void Attract_ControlMapZoom();
-void Attract_BuildBackgrounds();
+void Module14_Attract(void);
+void Attract_Fade(void);
+void Attract_InitGraphics(void);
+void Attract_FadeInStep(void);
+void Attract_FadeInSequence(void);
+void Attract_FadeOutSequence(void);
+void Attract_LoadNewScene(void);
+void AttractScene_PolkaDots(void);
+void AttractScene_WorldMap(void);
+void AttractScene_ThroneRoom(void);
+void Attract_PrepFinish(void);
+void Attract_PrepZeldaPrison(void);
+void Attract_PrepMaidenWarp(void);
+void AttractScene_EndOfStory(void);
+void Death_Func31(void);
+void Attract_EnactStory(void);
+void AttractDramatize_PolkaDots(void);
+void AttractDramatize_WorldMap(void);
+void Attract_ThroneRoom(void);
+void AttractDramatize_Prison(void);
+void AttractDramatize_AgahnimAltar(void);
+void Attract_SkipToFileSelect(void);
+void Attract_BuildNextImageTileMap(void);
+void Attract_ShowTimedTextMessage(void);
+void Attract_ControlMapZoom(void);
+void Attract_BuildBackgrounds(void);
void Attract_TriggerBGDMA(uint16 dstv);
void Attract_DrawPreloadedSprite(const uint8 *xp, const uint8 *yp, const uint8 *cp, const uint8 *fp, const uint8 *ep, int n);
-void Attract_DrawZelda();
+void Attract_DrawZelda(void);
void Sprite_SimulateSoldier(int k, uint16 x, uint16 y, uint8 dir, uint8 flags, uint8 gfx);
--- a/src/audio.c
+++ b/src/audio.c
@@ -406,7 +406,7 @@
g_apu_write.ports[adr & 0x3] = val;
}
-void ZeldaPushApuState() {
+void ZeldaPushApuState(void) {
ZeldaApuLock();
g_apu_write_ents[g_apu_write_ent_pos++ & 0xf] = g_apu_write;
if (g_apu_write_count < 16)
@@ -415,12 +415,12 @@
ZeldaApuUnlock();
}
-static void ZeldaPopApuState() {
+static void ZeldaPopApuState(void) {
if (g_apu_write_count != 0)
memcpy(g_zenv.player->input_ports, &g_apu_write_ents[(g_apu_write_ent_pos - g_apu_write_count--) & 0xf], 4);
}
-void ZeldaDiscardUnusedAudioFrames() {
+void ZeldaDiscardUnusedAudioFrames(void) {
if (g_apu_write_count != 0 && memcmp(g_zenv.player->input_ports, &g_apu_write_ents[(g_apu_write_ent_pos - g_apu_write_count) & 0xf], 4) == 0) {
if (g_apu_total_write >= 16) {
g_apu_total_write = 14;
@@ -431,11 +431,11 @@
}
}
-static void ZeldaResetApuQueue() {
+static void ZeldaResetApuQueue(void) {
g_apu_write_ent_pos = g_apu_total_write = g_apu_write_count = 0;
}
-uint8_t zelda_read_apui00() {
+uint8_t zelda_read_apui00(void) {
// This needs to be here because the ancilla code reads
// from the apu and we don't want to make the core code
// dependent on the apu timings, so relocated this value
@@ -457,7 +457,7 @@
ZeldaApuUnlock();
}
-bool ZeldaIsMusicPlaying() {
+bool ZeldaIsMusicPlaying(void) {
if (g_msu_player.state != kMsuState_Idle) {
return g_msu_player.state != kMsuState_FinishedPlaying;
} else {
@@ -504,7 +504,7 @@
ZeldaResetApuQueue();
}
-void ZeldaSaveMusicStateToRam_Locked() {
+void ZeldaSaveMusicStateToRam_Locked(void) {
SpcPlayer_CopyVariablesToRam(g_zenv.player);
// SpcPlayer.input_ports is not saved to the SpcPlayer ram by SpcPlayer_CopyVariablesToRam,
// in any case, we want to save the most recently written data, and that might still
--- a/src/audio.h
+++ b/src/audio.h
@@ -7,14 +7,14 @@
bool ZeldaIsPlayingMusicTrack(uint8 track);
bool ZeldaIsPlayingMusicTrackWithBug(uint8 track);
void ZeldaPlayMsuAudioTrack(uint8 track);
-bool ZeldaIsMusicPlaying();
+bool ZeldaIsMusicPlaying(void);
void ZeldaEnableMsu(uint8 enable);
void ZeldaRenderAudio(int16 *audio_buffer, int samples, int channels);
-void ZeldaDiscardUnusedAudioFrames();
+void ZeldaDiscardUnusedAudioFrames(void);
void ZeldaRestoreMusicAfterLoad_Locked(bool is_reset);
-void ZeldaSaveMusicStateToRam_Locked();
-void ZeldaPushApuState();
+void ZeldaSaveMusicStateToRam_Locked(void);
+void ZeldaPushApuState(void);
#endif // ZELDA3_AUDIO_H_
--- a/src/config.c
+++ b/src/config.c
@@ -250,7 +250,7 @@
}
}
-static void RegisterDefaultKeys() {
+static void RegisterDefaultKeys(void) {
for (int i = 1; i < countof(kKeyNameId); i++) {
if (!has_keynameid[i]) {
int size = kKeyNameId[i].size, k = kKeyNameId[i].id;
--- a/src/dungeon.h
+++ b/src/dungeon.h
@@ -59,10 +59,10 @@
void RoomBounds_AddB(RoomBounds *r);
void RoomBounds_SubB(RoomBounds *r);
void RoomBounds_SubA(RoomBounds *r);
-void Dungeon_StartInterRoomTrans_Left();
-void Dung_StartInterRoomTrans_Left_Plus();
-void Dungeon_StartInterRoomTrans_Up();
-void Dungeon_StartInterRoomTrans_Down();
+void Dungeon_StartInterRoomTrans_Left(void);
+void Dung_StartInterRoomTrans_Left_Plus(void);
+void Dungeon_StartInterRoomTrans_Up(void);
+void Dungeon_StartInterRoomTrans_Down(void);
void Dungeon_Store2x2(uint16 pos, uint16 t0, uint16 t1, uint16 t2, uint16 t3, uint8 attr);
uint16 Dungeon_MapVramAddr(uint16 pos);
uint16 Dungeon_MapVramAddrNoSwap(uint16 pos);
@@ -82,14 +82,14 @@
void Dungeon_OpeningLockedDoor_Combined(bool skip_anim);
const DungPalInfo *GetDungPalInfo(int idx);
uint16 Dungeon_GetTeleMsg(int room);
-bool Dungeon_IsPitThatHurtsPlayer();
-void Dungeon_PrepareNextRoomQuadrantUpload();
-void WaterFlood_BuildOneQuadrantForVRAM();
-void TileMapPrep_NotWaterOnTag();
-void OrientLampLightCone();
-void PrepareDungeonExitFromBossFight();
-void SavePalaceDeaths();
-void Dungeon_LoadRoom();
+bool Dungeon_IsPitThatHurtsPlayer(void);
+void Dungeon_PrepareNextRoomQuadrantUpload(void);
+void WaterFlood_BuildOneQuadrantForVRAM(void);
+void TileMapPrep_NotWaterOnTag(void);
+void OrientLampLightCone(void);
+void PrepareDungeonExitFromBossFight(void);
+void SavePalaceDeaths(void);
+void Dungeon_LoadRoom(void);
void RoomDraw_DrawAllObjects(const uint8 *level_data);
void RoomData_DrawObject_Door(uint16 a);
void RoomData_DrawObject(uint16 r0, const uint8 *level_data);
@@ -97,7 +97,7 @@
void RoomDraw_FloorChunks(const uint16 *src);
void RoomDraw_A_Many32x32Blocks(int n, const uint16 *src, uint16 *dst);
void RoomDraw_1x3_rightwards(int n, const uint16 *src, uint16 *dst);
-bool RoomDraw_CheckIfWallIsMoved();
+bool RoomDraw_CheckIfWallIsMoved(void);
void MovingWall_FillReplacementBuffer(int dsto);
void Object_Table_Helper(const uint16 *src, uint16 *dst);
void DrawWaterThing(uint16 *dst, const uint16 *src);
@@ -114,7 +114,7 @@
void Object_Draw8x8(const uint16 *src, uint16 *dst);
void RoomDraw_Door_North(int type, int pos_enum);
void Door_Up_StairMaskLocked(uint8 door_type, uint16 dsto);
-void Door_PrioritizeCurDoor();
+void Door_PrioritizeCurDoor(void);
void RoomDraw_NormalRangedDoors_North(uint8 door_type, uint16 dsto, int pos_enum);
void RoomDraw_OneSidedShutters_North(uint8 door_type, uint16 dsto);
void RoomDraw_Door_South(int type, int pos_enum);
@@ -138,10 +138,10 @@
void RoomDraw_MakeDoorHighPriority_East(uint16 dsto);
void RoomDraw_MarkDungeonToggleDoor(uint16 dsto);
void RoomDraw_MarkLayerToggleDoor(uint16 dsto);
-void RoomDraw_GetObjectSize_1to16();
+void RoomDraw_GetObjectSize_1to16(void);
void Object_SizeAtoAplus15(uint8 a);
-void RoomDraw_GetObjectSize_1to15or26();
-void RoomDraw_GetObjectSize_1to15or32();
+void RoomDraw_GetObjectSize_1to15or26(void);
+void RoomDraw_GetObjectSize_1to15or32(void);
int RoomDraw_FlagDoorsAndGetFinalType(uint8 direction, uint8 door_type, uint16 dsto);
void RoomDraw_MakeDoorPartsHighPriority_Y(uint16 dsto);
void RoomDraw_MakeDoorPartsHighPriority_X(uint16 dsto);
@@ -155,21 +155,21 @@
void RoomDraw_HammerPegSingle(const uint16 *src, uint16 *dst, uint16 dsto);
void DrawObjects_PushableBlock(uint16 dsto_x2, uint16 slot);
void DrawObjects_LightableTorch(uint16 dsto_x2, uint16 slot);
-void Dungeon_LoadHeader();
+void Dungeon_LoadHeader(void);
void Dungeon_CheckAdjacentRoomsForOpenDoors(int idx, int room);
void Dungeon_LoadAdjacentRoomDoors(int room);
-void Dungeon_LoadAttribute_Selectable();
-void Dungeon_LoadAttributeTable();
+void Dungeon_LoadAttribute_Selectable(void);
+void Dungeon_LoadAttributeTable(void);
void Dungeon_LoadBasicAttribute_full(uint16 loops);
-void Dungeon_LoadObjectAttribute();
-void Dungeon_LoadDoorAttribute();
+void Dungeon_LoadObjectAttribute(void);
+void Dungeon_LoadDoorAttribute(void);
void Dungeon_LoadSingleDoorAttribute(int k);
void Door_LoadBlastWallAttr(int k);
-void ChangeDoorToSwitch();
-void Dungeon_FlipCrystalPegAttribute();
-void Dungeon_HandleRoomTags();
+void ChangeDoorToSwitch(void);
+void Dungeon_FlipCrystalPegAttribute(void);
+void Dungeon_HandleRoomTags(void);
void Dung_TagRoutine_0x00(int k);
-void Dungeon_DetectStaircase();
+void Dungeon_DetectStaircase(void);
void RoomTag_NorthWestTrigger(int k);
void Dung_TagRoutine_0x2A(int k);
void Dung_TagRoutine_0x2B(int k);
@@ -179,7 +179,7 @@
void Dung_TagRoutine_0x2F(int k);
void Dung_TagRoutine_0x30(int k);
void RoomTag_QuadrantTrigger(int k);
-void Dung_TagRoutine_TrapdoorsUp();
+void Dung_TagRoutine_TrapdoorsUp(void);
void RoomTag_RoomTrigger(int k);
void RoomTag_RekillableBoss(int k);
void RoomTag_RoomTrigger_BlockDoor(int k);
@@ -203,7 +203,7 @@
void RoomTag_MovingWallShakeItUp(int k);
void RoomTag_MovingWall_West(int k);
void RoomTag_MovingWallTorchesCheck(int k);
-int MovingWall_MoveALittle();
+int MovingWall_MoveALittle(void);
int RoomTag_AdvanceGiganticWall(int k);
void RoomTag_WaterOff(int k);
void RoomTag_WaterOn(int k);
@@ -221,24 +221,24 @@
void RoomTag_ChestHoles0(int k);
void Dung_TagRoutine_0x3B(int k);
void RoomTag_Holes2(int k);
-void RoomTag_OperateWaterFlooring();
+void RoomTag_OperateWaterFlooring(void);
bool RoomTag_MaybeCheckShutters(uint8 *attr_out);
-int RoomTag_GetTilemapCoords();
+int RoomTag_GetTilemapCoords(void);
bool RoomTag_CheckForPressedSwitch(uint8 *y_out);
-void Dungeon_ProcessTorchesAndDoors();
+void Dungeon_ProcessTorchesAndDoors(void);
void Bomb_CheckForDestructibles(uint16 x, uint16 y, uint8 r14);
int DrawDoorOpening_Step1(int door, int dma_ptr);
void DrawShutterDoorSteps(int door);
void DrawEyeWatchDoor(int door);
void Door_BlastWallExploding_Draw(int dsto);
-void OperateShutterDoors();
-void OpenCrackedDoor();
+void OperateShutterDoors(void);
+void OpenCrackedDoor(void);
void Dungeon_LoadToggleDoorAttr_OtherEntry(int door);
-void Dungeon_LoadSingleDoorTileAttribute();
-void DrawCompletelyOpenDoor();
-void Dungeon_ClearAwayExplodingWall();
-uint16 Dungeon_CheckForAndIDLiftableTile();
-void Dungeon_PushBlock_Handler();
+void Dungeon_LoadSingleDoorTileAttribute(void);
+void DrawCompletelyOpenDoor(void);
+void Dungeon_ClearAwayExplodingWall(void);
+uint16 Dungeon_CheckForAndIDLiftableTile(void);
+void Dungeon_PushBlock_Handler(void);
void RoomDraw_16x16Single(uint8 index);
void PushBlock_CheckForPit(uint8 y);
uint8 Dungeon_LiftAndReplaceLiftable(Point16U *pt);
@@ -253,19 +253,19 @@
void OpenBigChest(uint16 loc, int *chest_position);
uint8 OpenMiniGameChest(int *chest_position);
uint16 RoomTag_BuildChestStripes(uint16 pos, uint16 y);
-void Dungeon_SetAttrForActivatedWaterOff();
-void Dungeon_FloodSwampWater_PrepTileMap();
+void Dungeon_SetAttrForActivatedWaterOff(void);
+void Dungeon_FloodSwampWater_PrepTileMap(void);
void Dungeon_AdjustWaterVomit(const uint16 *src, int depth);
-void Dungeon_SetAttrForActivatedWater();
-void FloodDam_Expand();
-void FloodDam_PrepTiles_init();
-void Watergate_Main_State1();
-void FloodDam_Fill();
-void Ganon_ExtinguishTorch_adjust_translucency();
-void Ganon_ExtinguishTorch();
-void Dungeon_ExtinguishTorch();
-void SpiralStairs_MakeNearbyWallsHighPriority_Entering();
-void SpiralStairs_MakeNearbyWallsLowPriority();
+void Dungeon_SetAttrForActivatedWater(void);
+void FloodDam_Expand(void);
+void FloodDam_PrepTiles_init(void);
+void Watergate_Main_State1(void);
+void FloodDam_Fill(void);
+void Ganon_ExtinguishTorch_adjust_translucency(void);
+void Ganon_ExtinguishTorch(void);
+void Dungeon_ExtinguishTorch(void);
+void SpiralStairs_MakeNearbyWallsHighPriority_Entering(void);
+void SpiralStairs_MakeNearbyWallsLowPriority(void);
void ClearAndStripeExplodingWall(uint16 dsto);
void Dungeon_DrawRoomOverlay(const uint8 *src);
void GetDoorDrawDataIndex_North_clean_door_index(int door);
@@ -289,160 +289,160 @@
uint8 GetDoorGraphicsIndex(int door, int r4_door);
void ClearExplodingWallFromTileMap_ClearOnePair(uint16 *dst, const uint16 *src);
void Dungeon_DrawRoomOverlay_Apply(int p);
-void ApplyGrayscaleFixed_Incremental();
+void ApplyGrayscaleFixed_Incremental(void);
void Dungeon_ApproachFixedColor_variable(uint8 a);
-void Module_PreDungeon();
-void Module_PreDungeon_setAmbientSfx();
-void LoadOWMusicIfNeeded();
-void Module07_Dungeon();
-void Dungeon_TryScreenEdgeTransition();
+void Module_PreDungeon(void);
+void Module_PreDungeon_setAmbientSfx(void);
+void LoadOWMusicIfNeeded(void);
+void Module07_Dungeon(void);
+void Dungeon_TryScreenEdgeTransition(void);
void Dungeon_HandleEdgeTransitionMovement(int dir);
-void Module07_00_PlayerControl();
-void Module07_01_SubtileTransition();
-void DungeonTransition_Subtile_ResetShutters();
-void DungeonTransition_Subtile_PrepTransition();
-void DungeonTransition_Subtile_ApplyFilter();
-void DungeonTransition_Subtile_TriggerShutters();
-void Module07_02_SupertileTransition();
-void Module07_02_00_InitializeTransition();
-void Module07_02_01_LoadNextRoom();
-void Dungeon_InterRoomTrans_State3();
-void Dungeon_InterRoomTrans_State10();
-void Dungeon_SpiralStaircase11();
-void Dungeon_InterRoomTrans_notDarkRoom();
-void Dungeon_InterRoomTrans_State9();
-void Dungeon_SpiralStaircase12();
-void Dungeon_InterRoomTrans_State4();
-void Dungeon_InterRoomTrans_State12();
-void Dungeon_Staircase14();
-void Dungeon_ResetTorchBackgroundAndPlayer();
-void Dungeon_ResetTorchBackgroundAndPlayerInner();
-void Dungeon_InterRoomTrans_State7();
-void DungeonTransition_RunFiltering();
-void Module07_02_FadedFilter();
-void Dungeon_InterRoomTrans_State15();
-void Dungeon_PlayMusicIfDefeated();
-void Module07_03_OverlayChange();
-void Module07_04_UnlockDoor();
-void Module07_05_ControlShutters();
-void Module07_06_FatInterRoomStairs();
-void Module07_0E_01_HandleMusicAndResetProps();
-void ResetTransitionPropsAndAdvance_ResetInterface();
-void ResetTransitionPropsAndAdvanceSubmodule();
-void Dungeon_InitializeRoomFromSpecial();
-void DungeonTransition_LoadSpriteGFX();
-void DungeonTransition_AdjustForFatStairScroll();
-void ResetThenCacheRoomEntryProperties();
-void DungeonTransition_TriggerBGC34UpdateAndAdvance();
-void DungeonTransition_TriggerBGC56UpdateAndAdvance();
-void Module07_07_FallingTransition();
-void Module07_07_00_HandleMusicAndResetRoom();
-void Module07_07_06_SyncBG1and2();
-void Module07_07_0F_FallingFadeIn();
-void Dungeon_PlayBlipAndCacheQuadrantVisits();
-void Module07_07_10_LandLinkFromFalling();
-void Module07_07_11_CacheRoomAndSetMusic();
-void Module07_08_NorthIntraRoomStairs();
-void Module07_08_00_InitStairs();
-void Module07_08_01_ClimbStairs();
-void Module07_10_SouthIntraRoomStairs();
-void Module07_10_00_InitStairs();
-void Module07_10_01_ClimbStairs();
-void Module07_09_OpenCrackedDoor();
-void Module07_0A_ChangeBrightness();
-void Module07_0B_DrainSwampPool();
-void Module07_0C_FloodSwampWater();
-void Module07_0D_FloodDam();
-void Module07_0E_SpiralStairs();
-void Dungeon_DoubleApplyAndIncrementGrayscale();
-void Module07_0E_02_ApplyFilterIf();
-void Dungeon_SyncBackgroundsFromSpiralStairs();
-void Dungeon_AdvanceThenSetBossMusicUnorthodox();
-void Dungeon_SetBossMusicUnorthodox();
-void Dungeon_SpiralStaircase17();
-void Dungeon_SpiralStaircase18();
-void Module07_0E_00_InitPriorityAndScreens();
-void Module07_0E_13_SetRoomAndLayerAndCache();
-void RepositionLinkAfterSpiralStairs();
-void SpiralStairs_MakeNearbyWallsHighPriority_Exiting();
-void Module07_0F_LandingWipe();
-void Module07_0F_00_InitSpotlight();
-void Module07_0F_01_OperateSpotlight();
-void Module07_11_StraightInterroomStairs();
-void Module07_11_00_PrepAndReset();
-void Module07_11_01_FadeOut();
-void Module07_11_02_LoadAndPrepRoom();
-void Module07_11_03_FilterAndLoadBGChars();
-void Module07_11_04_FilterDoBGAndResetSprites();
-void Module07_11_0B_PrepDestination();
-void Module07_11_09_LoadSpriteGraphics();
-void Module07_11_19_SetSongAndFilter();
-void Module07_11_11_KeepSliding();
-void Module07_14_RecoverFromFall();
-void Module07_14_00_ScrollCamera();
-void Module07_15_WarpPad();
-void Module07_15_01_ApplyMosaicAndFilter();
-void Module07_15_04_SyncRoomPropsAndBuildOverlay();
-void Module07_15_0E_FadeInFromWarp();
-void Module07_15_0F_FinalizeAndCacheEntry();
-void Module07_16_UpdatePegs();
-void Module07_17_PressurePlate();
-void Module07_18_RescuedMaiden();
-void Module07_19_MirrorFade();
-void Module07_1A_RoomDraw_OpenTriforceDoor_bounce();
-void Module11_DungeonFallingEntrance();
-void Module11_02_LoadEntrance();
-void Dungeon_LoadSongBankIfNeeded();
-void Mirror_SaveRoomData();
-void SaveDungeonKeys();
-void Dungeon_AdjustAfterSpiralStairs();
+void Module07_00_PlayerControl(void);
+void Module07_01_SubtileTransition(void);
+void DungeonTransition_Subtile_ResetShutters(void);
+void DungeonTransition_Subtile_PrepTransition(void);
+void DungeonTransition_Subtile_ApplyFilter(void);
+void DungeonTransition_Subtile_TriggerShutters(void);
+void Module07_02_SupertileTransition(void);
+void Module07_02_00_InitializeTransition(void);
+void Module07_02_01_LoadNextRoom(void);
+void Dungeon_InterRoomTrans_State3(void);
+void Dungeon_InterRoomTrans_State10(void);
+void Dungeon_SpiralStaircase11(void);
+void Dungeon_InterRoomTrans_notDarkRoom(void);
+void Dungeon_InterRoomTrans_State9(void);
+void Dungeon_SpiralStaircase12(void);
+void Dungeon_InterRoomTrans_State4(void);
+void Dungeon_InterRoomTrans_State12(void);
+void Dungeon_Staircase14(void);
+void Dungeon_ResetTorchBackgroundAndPlayer(void);
+void Dungeon_ResetTorchBackgroundAndPlayerInner(void);
+void Dungeon_InterRoomTrans_State7(void);
+void DungeonTransition_RunFiltering(void);
+void Module07_02_FadedFilter(void);
+void Dungeon_InterRoomTrans_State15(void);
+void Dungeon_PlayMusicIfDefeated(void);
+void Module07_03_OverlayChange(void);
+void Module07_04_UnlockDoor(void);
+void Module07_05_ControlShutters(void);
+void Module07_06_FatInterRoomStairs(void);
+void Module07_0E_01_HandleMusicAndResetProps(void);
+void ResetTransitionPropsAndAdvance_ResetInterface(void);
+void ResetTransitionPropsAndAdvanceSubmodule(void);
+void Dungeon_InitializeRoomFromSpecial(void);
+void DungeonTransition_LoadSpriteGFX(void);
+void DungeonTransition_AdjustForFatStairScroll(void);
+void ResetThenCacheRoomEntryProperties(void);
+void DungeonTransition_TriggerBGC34UpdateAndAdvance(void);
+void DungeonTransition_TriggerBGC56UpdateAndAdvance(void);
+void Module07_07_FallingTransition(void);
+void Module07_07_00_HandleMusicAndResetRoom(void);
+void Module07_07_06_SyncBG1and2(void);
+void Module07_07_0F_FallingFadeIn(void);
+void Dungeon_PlayBlipAndCacheQuadrantVisits(void);
+void Module07_07_10_LandLinkFromFalling(void);
+void Module07_07_11_CacheRoomAndSetMusic(void);
+void Module07_08_NorthIntraRoomStairs(void);
+void Module07_08_00_InitStairs(void);
+void Module07_08_01_ClimbStairs(void);
+void Module07_10_SouthIntraRoomStairs(void);
+void Module07_10_00_InitStairs(void);
+void Module07_10_01_ClimbStairs(void);
+void Module07_09_OpenCrackedDoor(void);
+void Module07_0A_ChangeBrightness(void);
+void Module07_0B_DrainSwampPool(void);
+void Module07_0C_FloodSwampWater(void);
+void Module07_0D_FloodDam(void);
+void Module07_0E_SpiralStairs(void);
+void Dungeon_DoubleApplyAndIncrementGrayscale(void);
+void Module07_0E_02_ApplyFilterIf(void);
+void Dungeon_SyncBackgroundsFromSpiralStairs(void);
+void Dungeon_AdvanceThenSetBossMusicUnorthodox(void);
+void Dungeon_SetBossMusicUnorthodox(void);
+void Dungeon_SpiralStaircase17(void);
+void Dungeon_SpiralStaircase18(void);
+void Module07_0E_00_InitPriorityAndScreens(void);
+void Module07_0E_13_SetRoomAndLayerAndCache(void);
+void RepositionLinkAfterSpiralStairs(void);
+void SpiralStairs_MakeNearbyWallsHighPriority_Exiting(void);
+void Module07_0F_LandingWipe(void);
+void Module07_0F_00_InitSpotlight(void);
+void Module07_0F_01_OperateSpotlight(void);
+void Module07_11_StraightInterroomStairs(void);
+void Module07_11_00_PrepAndReset(void);
+void Module07_11_01_FadeOut(void);
+void Module07_11_02_LoadAndPrepRoom(void);
+void Module07_11_03_FilterAndLoadBGChars(void);
+void Module07_11_04_FilterDoBGAndResetSprites(void);
+void Module07_11_0B_PrepDestination(void);
+void Module07_11_09_LoadSpriteGraphics(void);
+void Module07_11_19_SetSongAndFilter(void);
+void Module07_11_11_KeepSliding(void);
+void Module07_14_RecoverFromFall(void);
+void Module07_14_00_ScrollCamera(void);
+void Module07_15_WarpPad(void);
+void Module07_15_01_ApplyMosaicAndFilter(void);
+void Module07_15_04_SyncRoomPropsAndBuildOverlay(void);
+void Module07_15_0E_FadeInFromWarp(void);
+void Module07_15_0F_FinalizeAndCacheEntry(void);
+void Module07_16_UpdatePegs(void);
+void Module07_17_PressurePlate(void);
+void Module07_18_RescuedMaiden(void);
+void Module07_19_MirrorFade(void);
+void Module07_1A_RoomDraw_OpenTriforceDoor_bounce(void);
+void Module11_DungeonFallingEntrance(void);
+void Module11_02_LoadEntrance(void);
+void Dungeon_LoadSongBankIfNeeded(void);
+void Mirror_SaveRoomData(void);
+void SaveDungeonKeys(void);
+void Dungeon_AdjustAfterSpiralStairs(void);
void Dungeon_AdjustForTeleportDoors(uint8 room, uint8 flag);
-void Dungeon_AdjustForRoomLayout();
-void HandleEdgeTransitionMovementEast_RightBy8();
-void Dungeon_StartInterRoomTrans_Right();
-void HandleEdgeTransitionMovementSouth_DownBy16();
-void Dung_HandleExitToOverworld();
-void AdjustQuadrantAndCamera_right();
-void SetAndSaveVisitedQuadrantFlags();
-void SaveQuadrantsToSram();
-void AdjustQuadrantAndCamera_left();
-void AdjustQuadrantAndCamera_down();
-void AdjustQuadrantAndCamera_up();
-void Dungeon_FlagRoomData_Quadrants();
-void Dung_SaveDataForCurrentRoom();
+void Dungeon_AdjustForRoomLayout(void);
+void HandleEdgeTransitionMovementEast_RightBy8(void);
+void Dungeon_StartInterRoomTrans_Right(void);
+void HandleEdgeTransitionMovementSouth_DownBy16(void);
+void Dung_HandleExitToOverworld(void);
+void AdjustQuadrantAndCamera_right(void);
+void SetAndSaveVisitedQuadrantFlags(void);
+void SaveQuadrantsToSram(void);
+void AdjustQuadrantAndCamera_left(void);
+void AdjustQuadrantAndCamera_down(void);
+void AdjustQuadrantAndCamera_up(void);
+void Dungeon_FlagRoomData_Quadrants(void);
+void Dung_SaveDataForCurrentRoom(void);
void HandleEdgeTransition_AdjustCameraBoundaries(uint8 arg);
-void Dungeon_AdjustQuadrant();
-void Dungeon_HandleCamera();
-void MirrorBg1Bg2Offs();
+void Dungeon_AdjustQuadrant(void);
+void Dungeon_HandleCamera(void);
+void MirrorBg1Bg2Offs(void);
void DungeonTransition_AdjustCamera_X(uint8 arg);
void DungeonTransition_AdjustCamera_Y(uint8 arg);
-void DungeonTransition_ScrollRoom();
-void Module07_11_0A_ScrollCamera();
-void DungeonTransition_FindSubtileLanding();
-void SubtileTransitionCalculateLanding();
-void Dungeon_InterRoomTrans_State13();
-void Dungeon_IntraRoomTrans_State5();
-bool DungeonTransition_MoveLinkOutDoor();
-uint8 CalculateTransitionLanding();
-void Dungeon_LoadAndDrawRoom();
-void Dungeon_LoadEntrance();
+void DungeonTransition_ScrollRoom(void);
+void Module07_11_0A_ScrollCamera(void);
+void DungeonTransition_FindSubtileLanding(void);
+void SubtileTransitionCalculateLanding(void);
+void Dungeon_InterRoomTrans_State13(void);
+void Dungeon_IntraRoomTrans_State5(void);
+bool DungeonTransition_MoveLinkOutDoor(void);
+uint8 CalculateTransitionLanding(void);
+void Dungeon_LoadAndDrawRoom(void);
+void Dungeon_LoadEntrance(void);
void PushBlock_Slide(uint8 j);
void PushBlock_HandleFalling(uint8 y);
void PushBlock_ApplyVelocity(uint8 i);
void PushBlock_HandleCollision(uint8 i, uint16 x, uint16 y);
-void Sprite_Dungeon_DrawAllPushBlocks();
-void UsedForStraightInterRoomStaircase();
-void HandleLinkOnSpiralStairs();
-void SpiralStairs_FindLandingSpot();
-void Dungeon_HandleLayerEffect();
-void LayerEffect_Nothing();
-void LayerEffect_Scroll();
-void LayerEffect_Trinexx();
-void LayerEffect_Agahnim2();
-void LayerEffect_InvisibleFloor();
-void LayerEffect_Ganon();
-void LayerEffect_WaterRapids();
-void Dungeon_LoadCustomTileAttr();
-void Link_CheckBunnyStatus();
-void CrystalCutscene_Initialize();
-void CrystalCutscene_SpawnMaiden();
+void Sprite_Dungeon_DrawAllPushBlocks(void);
+void UsedForStraightInterRoomStaircase(void);
+void HandleLinkOnSpiralStairs(void);
+void SpiralStairs_FindLandingSpot(void);
+void Dungeon_HandleLayerEffect(void);
+void LayerEffect_Nothing(void);
+void LayerEffect_Scroll(void);
+void LayerEffect_Trinexx(void);
+void LayerEffect_Agahnim2(void);
+void LayerEffect_InvisibleFloor(void);
+void LayerEffect_Ganon(void);
+void LayerEffect_WaterRapids(void);
+void Dungeon_LoadCustomTileAttr(void);
+void Link_CheckBunnyStatus(void);
+void CrystalCutscene_Initialize(void);
+void CrystalCutscene_SpawnMaiden(void);
--- a/src/ending.h
+++ b/src/ending.h
@@ -6,35 +6,35 @@
uint8 ext;
} IntroSpriteEnt;
-void Intro_SetupScreen();
-void Intro_LoadTextPointersAndPalettes();
-void Credits_LoadScene_Overworld_PrepGFX();
-void Credits_LoadScene_Overworld_Overlay();
-void Credits_LoadScene_Overworld_LoadMap();
-void Credits_OperateScrollingAndTileMap();
-void Credits_LoadCoolBackground();
-void Credits_LoadScene_Dungeon();
-void Module18_GanonEmerges();
-void Module19_TriforceRoom();
-void Intro_InitializeBackgroundSettings();
-void Polyhedral_InitializeThread();
-void Module00_Intro();
-void Intro_Init();
-void Intro_Init_Continue();
-void Intro_Clear1kbBlocksOfWRAM();
-void Intro_InitializeMemory_darken();
-void IntroZeldaFadein();
-void Intro_FadeInBg();
-void Intro_SwordComingDown();
-void Intro_WaitPlayer();
-void FadeMusicAndResetSRAMMirror();
-void Intro_InitializeTriforcePolyThread();
-void Intro_InitGfx_Helper();
-void LoadTriforceSpritePalette();
-void Intro_HandleAllTriforceAnimations();
-void Scene_AnimateEverySprite();
-void Intro_AnimateTriforce();
-void Intro_RunStep();
+void Intro_SetupScreen(void);
+void Intro_LoadTextPointersAndPalettes(void);
+void Credits_LoadScene_Overworld_PrepGFX(void);
+void Credits_LoadScene_Overworld_Overlay(void);
+void Credits_LoadScene_Overworld_LoadMap(void);
+void Credits_OperateScrollingAndTileMap(void);
+void Credits_LoadCoolBackground(void);
+void Credits_LoadScene_Dungeon(void);
+void Module18_GanonEmerges(void);
+void Module19_TriforceRoom(void);
+void Intro_InitializeBackgroundSettings(void);
+void Polyhedral_InitializeThread(void);
+void Module00_Intro(void);
+void Intro_Init(void);
+void Intro_Init_Continue(void);
+void Intro_Clear1kbBlocksOfWRAM(void);
+void Intro_InitializeMemory_darken(void);
+void IntroZeldaFadein(void);
+void Intro_FadeInBg(void);
+void Intro_SwordComingDown(void);
+void Intro_WaitPlayer(void);
+void FadeMusicAndResetSRAMMirror(void);
+void Intro_InitializeTriforcePolyThread(void);
+void Intro_InitGfx_Helper(void);
+void LoadTriforceSpritePalette(void);
+void Intro_HandleAllTriforceAnimations(void);
+void Scene_AnimateEverySprite(void);
+void Intro_AnimateTriforce(void);
+void Intro_RunStep(void);
void Intro_AnimOneObj(int k);
void Intro_SpriteType_A_0(int k);
void Intro_SpriteType_B_0(int k);
@@ -47,26 +47,26 @@
void AnimateSceneSprite_Sparkle(int k);
void AnimateSceneSprite_AddObjectsToOamBuffer(int k, const IntroSpriteEnt *src, int num);
void AnimateSceneSprite_MoveTriangle(int k);
-void TriforceRoom_PrepGFXSlotForPoly();
-void Credits_InitializePolyhedral();
-void AdvancePolyhedral();
-void TriforceRoom_HandlePoly();
-void Credits_AnimateTheTriangles();
+void TriforceRoom_PrepGFXSlotForPoly(void);
+void Credits_InitializePolyhedral(void);
+void AdvancePolyhedral(void);
+void TriforceRoom_HandlePoly(void);
+void Credits_AnimateTheTriangles(void);
void InitializeSceneSprite_TriforceRoomTriangle(int k);
void Intro_SpriteType_B_456(int k);
void AnimateTriforceRoomTriangle_HandleContracting(int k);
void InitializeSceneSprite_CreditsTriangle(int k);
void AnimateSceneSprite_CreditsTriangle(int k);
-void Intro_DisplayLogo();
-void Intro_SetupSwordAndIntroFlash();
-void Intro_PeriodicSwordAndIntroFlash();
-void Module1A_Credits();
-void Credits_LoadNextScene_Overworld();
-void Credits_LoadNextScene_Dungeon();
-void Credits_PrepAndLoadSprites();
-void Credits_ScrollScene_Overworld();
-void Credits_ScrollScene_Dungeon();
-void Credits_HandleSceneFade();
+void Intro_DisplayLogo(void);
+void Intro_SetupSwordAndIntroFlash(void);
+void Intro_PeriodicSwordAndIntroFlash(void);
+void Module1A_Credits(void);
+void Credits_LoadNextScene_Overworld(void);
+void Credits_LoadNextScene_Dungeon(void);
+void Credits_PrepAndLoadSprites(void);
+void Credits_ScrollScene_Overworld(void);
+void Credits_ScrollScene_Dungeon(void);
+void Credits_HandleSceneFade(void);
void Credits_SpriteDraw_DrawShadow(int k);
void EndSequence_DrawShadow2(int k);
void Ending_Func2(int k, uint8 ain);
@@ -78,15 +78,15 @@
void Credits_SpriteDraw_WalkLinkAwayFromPedestal(int k);
void Credits_SpriteDraw_MoveSquirrel(int k);
void Credits_SpriteDraw_CirclingBirds(int k);
-void Credits_HandleCameraScrollControl();
-void EndSequence_32();
-void Credits_FadeOutFixedCol();
-void Credits_FadeColorAndBeginAnimating();
-void Credits_AddNextAttribution();
-void Credits_AddEndingSequenceText();
-void Credits_BrightenTriangles();
-void Credits_StopCreditsScroll();
-void Credits_FadeAndDisperseTriangles();
-void Credits_FadeInTheEnd();
-void Credits_HangForever();
-void CrystalCutscene_InitializePolyhedral();
+void Credits_HandleCameraScrollControl(void);
+void EndSequence_32(void);
+void Credits_FadeOutFixedCol(void);
+void Credits_FadeColorAndBeginAnimating(void);
+void Credits_AddNextAttribution(void);
+void Credits_AddEndingSequenceText(void);
+void Credits_BrightenTriangles(void);
+void Credits_StopCreditsScroll(void);
+void Credits_FadeAndDisperseTriangles(void);
+void Credits_FadeInTheEnd(void);
+void Credits_HangForever(void);
+void CrystalCutscene_InitializePolyhedral(void);
--- a/src/hud.c
+++ b/src/hud.c
@@ -19,9 +19,9 @@
static void Hud_EquipNextItem(uint8 *item);
static int Hud_GetItemPosition(int item);
static void Hud_ReorderItem(int direction);
-static void Hud_Update_Magic();
-static void Hud_Update_Inventory();
-static void Hud_Update_Hearts();
+static void Hud_Update_Magic(void);
+static void Hud_Update_Inventory(void);
+static void Hud_Update_Hearts(void);
const uint8 kMaxBombsForLevel[] = { 10, 15, 20, 25, 30, 35, 40, 50 };
const uint8 kMaxArrowsForLevel[] = { 30, 35, 40, 45, 50, 55, 60, 70 };
@@ -240,7 +240,7 @@
static const uint16 kDungFloorIndicator_Gfx1[11] = { 0x2518, 0x2519, 0xa509, 0x251a, 0x251b, 0x251c, 0x2518, 0xa51d, 0xe50c, 0xa50e, 0x7f };
-void Hud_RefreshIcon() {
+void Hud_RefreshIcon(void) {
Hud_SearchForEquippedItem();
Hud_UpdateHud();
Hud_Rebuild();
@@ -247,7 +247,7 @@
overworld_map_state = 0;
}
-uint8 CheckPalaceItemPosession() {
+uint8 CheckPalaceItemPosession(void) {
switch (cur_palace_index_x2 >> 1) {
case 2: return link_item_bow != 0;
case 3: return link_item_gloves != 0;
@@ -298,7 +298,7 @@
}
}
-void Hud_FloorIndicator() { // 8afd0c
+void Hud_FloorIndicator(void) { // 8afd0c
uint16 a = hud_floor_changed_timer;
if (a == 0) {
Hud_RemoveSuperBombIndicator();
@@ -330,7 +330,7 @@
flag_update_hud_in_nmi++;
}
-void Hud_RemoveSuperBombIndicator() { // 8afd90
+void Hud_RemoveSuperBombIndicator(void) { // 8afd90
hud_tile_indices_buffer[0xf2 / 2] = 0x7f;
hud_tile_indices_buffer[0x132 / 2] = 0x7f;
hud_tile_indices_buffer[0xf4 / 2] = 0x7f;
@@ -337,7 +337,7 @@
hud_tile_indices_buffer[0x134 / 2] = 0x7f;
}
-void Hud_SuperBombIndicator() { // 8afda8
+void Hud_SuperBombIndicator(void) { // 8afda8
if (!super_bomb_indicator_unk1) {
if (sign8(super_bomb_indicator_unk2))
goto remove;
@@ -364,11 +364,11 @@
hud_tile_indices_buffer[0x132 / 2] = kDungFloorIndicator_Gfx1[j];
}
-static int MaxRupees() {
+static int MaxRupees(void) {
return enhanced_features0 & kFeatures0_CarryMoreRupees ? 9999 : 999;
}
-void Hud_RefillLogic() { // 8ddb92
+void Hud_RefillLogic(void) { // 8ddb92
if (overworld_map_state)
return;
if (link_magic_filler) {
@@ -462,7 +462,7 @@
flag_update_hud_in_nmi++;
}
-void Hud_Module_Run() { // 8ddd36
+void Hud_Module_Run(void) { // 8ddd36
byte_7E0206++;
switch (overworld_map_state) {
case 0: Hud_ClearTileMap(); break;
@@ -483,7 +483,7 @@
}
}
-void Hud_ClearTileMap() { // 8ddd5a
+void Hud_ClearTileMap(void) { // 8ddd5a
uint16 *target = (uint16 *)&g_ram[0x1000];
for (int i = 0; i < 1024; i++)
target[i] = 0x207f;
@@ -493,7 +493,7 @@
overworld_map_state++;
}
-bool Hud_HaveAnyItems() { // new
+bool Hud_HaveAnyItems(void) { // new
for (int i = 0; i < 20; i++)
if ((&link_item_bow)[i])
return true;
@@ -500,7 +500,7 @@
return false;
}
-void Hud_Init() { // 8dddab
+void Hud_Init(void) { // 8dddab
Hud_SearchForEquippedItem();
Hud_DrawYButtonItems();
Hud_DrawAbilityBox();
@@ -530,13 +530,13 @@
overworld_map_state++;
}
-void Hud_BringMenuDown() { // 8dde59
+void Hud_BringMenuDown(void) { // 8dde59
BG3VOFS_copy2 -= 8;
if (BG3VOFS_copy2 == 0xff18)
overworld_map_state++;
}
-void Hud_ChooseNextMode() { // 8dde6e
+void Hud_ChooseNextMode(void) { // 8dde6e
if (Hud_HaveAnyItems()) {
nmi_subroutine_index = 1;
BYTE(nmi_load_target_addr) = 0x22;
@@ -594,7 +594,7 @@
} while (!Hud_DoWeHaveThisItem(*item));
}
-int GetCurrentItemButtonIndex() {
+int GetCurrentItemButtonIndex(void) {
if (enhanced_features0 & kFeatures0_SwitchLR) {
return (joypad1L_last & kJoypadL_X) ? 1 :
(joypad1L_last & kJoypadL_L) ? 2 :
@@ -609,7 +609,7 @@
(i == 2) ? &hud_cur_item_l : &hud_cur_item_r;
}
-void Hud_NormalMenu() { // 8ddf15
+void Hud_NormalMenu(void) { // 8ddf15
timer_for_flashing_circle++;
if (!BYTE(joypad1H_last))
BYTE(hud_tmp1) = 0;
@@ -668,7 +668,7 @@
//g_ram[0x15d0] = 0;
}
-void Hud_UpdateHud() { // 8ddfa9
+void Hud_UpdateHud(void) { // 8ddfa9
overworld_map_state++;
Hud_Rebuild();
Hud_UpdateEquippedItem();
@@ -693,7 +693,7 @@
return kNewStyleInventory ? kHudItemToItemNew[item] : kHudItemToItemOrg[item];
}
-void Hud_UpdateEquippedItem() { // 8ddfaf
+void Hud_UpdateEquippedItem(void) { // 8ddfaf
if (hud_cur_item >= kHudItem_Bottle1)
link_item_bottle_index = hud_cur_item - kHudItem_Bottle1 + 1;
@@ -701,7 +701,7 @@
current_item_y = Hud_LookupInventoryItem(hud_cur_item);
}
-void Hud_CloseMenu() { // 8ddfba
+void Hud_CloseMenu(void) { // 8ddfba
BG3VOFS_copy2 += 8;
if (BG3VOFS_copy2)
return;
@@ -720,12 +720,12 @@
}
}
-void Hud_GotoBottleMenu() { // 8ddffb
+void Hud_GotoBottleMenu(void) { // 8ddffb
bottle_menu_expand_row = 0;
overworld_map_state++;
}
-void Hud_InitBottleMenu() { // 8de002
+void Hud_InitBottleMenu(void) { // 8de002
int r = bottle_menu_expand_row;
uint16 *dst = uvram_screen.row[0].col + (kNewStyleInventory ? 1 : 0);
for (int i = 21; i <= 30; i++)
@@ -739,7 +739,7 @@
BYTE(nmi_load_target_addr) = 0x22;
}
-void Hud_ExpandBottleMenu() { // 8de08c
+void Hud_ExpandBottleMenu(void) { // 8de08c
static const uint16 kBottleMenuTop[] = { 0x28FB, 0x28F9, 0x28F9, 0x28F9, 0x28F9, 0x28F9, 0x28F9, 0x28F9, 0x28F9, 0x68FB };
static const uint16 kBottleMenuTop2[] = { 0x28FC, 0x24F5, 0x24F5, 0x24F5, 0x24F5, 0x24F5, 0x24F5, 0x24F5, 0x24F5, 0x68FC };
static const uint16 kBottleMenuBottom[] = { 0xA8FB, 0xA8F9, 0xA8F9, 0xA8F9, 0xA8F9, 0xA8F9, 0xA8F9, 0xA8F9, 0xA8F9, 0xE8FB };
@@ -756,7 +756,7 @@
BYTE(nmi_load_target_addr) = 0x22;
}
-void Hud_BottleMenu() { // 8de0df
+void Hud_BottleMenu(void) { // 8de0df
timer_for_flashing_circle++;
if (filtered_joypad_H & kJoypadH_Start) {
sound_effect_2 = 18;
@@ -860,7 +860,7 @@
p[HUDXY(-1, 2)] = pp | 0x2060 | 0x8000;
}
-void Hud_DrawBottleMenu() { // 8def67
+void Hud_DrawBottleMenu(void) { // 8def67
uint16 *dst = uvram_screen.row[0].col + (kNewStyleInventory ? 1 : 0);
Hud_DrawBox(dst, 21, 11, 30, 29, 2);
for (int i = 0; i < 4; i++)
@@ -872,7 +872,7 @@
}
-void Hud_DrawBottleMenu_Update() { // 8de17f
+void Hud_DrawBottleMenu_Update(void) { // 8de17f
Hud_DrawBottleMenu();
Hud_DrawSelectedYButtonItem();
@@ -880,7 +880,7 @@
BYTE(nmi_load_target_addr) = 0x22;
}
-void Hud_EraseBottleMenu() { // 8de2fd
+void Hud_EraseBottleMenu(void) { // 8de2fd
uint16 *dst = uvram_screen.row[0].col + (kNewStyleInventory ? 1 : 0);
int r = bottle_menu_expand_row;
for (int i = 0; i < 10; i++)
@@ -891,7 +891,7 @@
BYTE(nmi_load_target_addr) = 0x22;
}
-void Hud_RestoreNormalMenu() { // 8de346
+void Hud_RestoreNormalMenu(void) { // 8de346
Hud_DrawProgressIcons();
Hud_DrawEquipmentBox();
overworld_map_state = 4;
@@ -899,7 +899,7 @@
BYTE(nmi_load_target_addr) = 0x22;
}
-void Hud_SearchForEquippedItem() { // 8de399
+void Hud_SearchForEquippedItem(void) { // 8de399
if (!Hud_HaveAnyItems()) {
hud_cur_item = 0;
hud_var1 = 0;
@@ -985,7 +985,7 @@
static const uint8 kSwitchLR_palettes[] = { 7, 3, 4, 4 };
-void Hud_DrawYButtonItems() { // 8de3d9
+void Hud_DrawYButtonItems(void) { // 8de3d9
uint16 *dst = uvram_screen.row[0].col;
int x = kNewStyleInventory ? 0 : 1;
@@ -1012,7 +1012,7 @@
}
}
-void Hud_DrawAbilityBox() { // 8de6b6
+void Hud_DrawAbilityBox(void) { // 8de6b6
static const uint16 kHudAbilityText[80] = {
0x2cf5, 0x2cf5, 0x2cf5, 0x2cf5, 0x2cf5, 0x2d5b, 0x2d58, 0x2d55, 0x2d63, 0x2d27,
0x2cf5, 0x2cf5, 0x2cf5, 0x2cf5, 0x2cf5, 0x2cf5, 0x2d61, 0x2d54, 0x2d50, 0x2d53,
@@ -1056,7 +1056,7 @@
Hud_DrawNxN(dst + HUDXY(4, 22), kHudGlovesText + (link_item_gloves != 1) * 10, 5, 2);
}
-void Hud_DrawProgressIcons() { // 8de9c8
+void Hud_DrawProgressIcons(void) { // 8de9c8
if (sram_progress_indicator < 3)
Hud_DrawProgressIcons_Pendants();
else
@@ -1063,7 +1063,7 @@
Hud_DrawProgressIcons_Crystals();
}
-void Hud_DrawProgressIcons_Pendants() { // 8de9d3
+void Hud_DrawProgressIcons_Pendants(void) { // 8de9d3
static const uint16 kProgressIconPendantsBg[90] = {
0x28fb, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x68fb,
0x28fc, 0x2521, 0x2522, 0x2523, 0x2524, 0x253f, 0x24f5, 0x24f5, 0x24f5, 0x68fc,
@@ -1094,7 +1094,7 @@
Hud_DrawItem(dst + HUDXY(6, 6), &kHudPendants2[(link_which_pendants >> 2) & 1]);
}
-void Hud_DrawProgressIcons_Crystals() { // 8dea62
+void Hud_DrawProgressIcons_Crystals(void) { // 8dea62
static const uint16 kProgressIconCrystalsBg[90] = {
0x28fb, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x28f9, 0x68fb,
0x28fc, 0x252f, 0x2534, 0x2535, 0x2536, 0x2537, 0x24f5, 0x24f5, 0x24f5, 0x68fc,
@@ -1141,7 +1141,7 @@
}
}
-void Hud_DrawSelectedYButtonItem() { // 8deb3a
+void Hud_DrawSelectedYButtonItem(void) { // 8deb3a
static const uint16 kHudBottlesItemText[128] = {
0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x255c, 0x2564, 0x2562, 0x2557, 0x2561, 0x255e, 0x255e, 0x255c,
0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x2551, 0x255e, 0x2563, 0x2563, 0x255b, 0x2554, 0x24f5, 0x24f5,
@@ -1239,7 +1239,7 @@
Hud_DrawNxN(dst_box + HUDXY(22, 8), src_p, 8, 2);
}
-void Hud_DrawEquipmentBox() { // 8ded29
+void Hud_DrawEquipmentBox(void) { // 8ded29
uint16 *dst = uvram_screen.row[0].col + (kNewStyleInventory ? 1 : 0);
Hud_DrawBox(dst, 21, 21, 30, 29, 2);
@@ -1301,7 +1301,7 @@
out[3] = (number % 10) + 0x90;
}
-bool Hud_RefillHealth() { // 8df128
+bool Hud_RefillHealth(void) { // 8df128
if (link_health_current >= link_health_capacity) {
link_health_current = link_health_capacity;
link_hearts_filler = 0;
@@ -1311,7 +1311,7 @@
return false;
}
-void Hud_AnimateHeartRefill() { // 8df14f
+void Hud_AnimateHeartRefill(void) { // 8df14f
if (--animate_heart_refill_countdown)
return;
uint16 n = ((uint16)((link_health_current & ~7) - 1) >> 3) << 1;
@@ -1333,7 +1333,7 @@
}
}
-bool Hud_RefillMagicPower() { // 8df1b3
+bool Hud_RefillMagicPower(void) { // 8df1b3
if (link_magic_power >= 0x80)
return true;
link_magic_filler = 0x80;
@@ -1340,7 +1340,7 @@
return false;
}
-void Hud_RestoreTorchBackground() { // 8dfa33
+void Hud_RestoreTorchBackground(void) { // 8dfa33
if (!link_item_torch || !dung_want_lights_out || hdr_dungeon_dark_with_lantern ||
dung_num_lit_torches)
return;
@@ -1349,13 +1349,13 @@
TS_copy = 1;
}
-void Hud_RebuildIndoor() { // 8dfa60
+void Hud_RebuildIndoor(void) { // 8dfa60
overworld_fixed_color_plusminus = 0;
link_num_keys = 0xff;
Hud_Rebuild();
}
-static void Hud_UpdateItemBox() { // 8dfafd
+static void Hud_UpdateItemBox(void) { // 8dfafd
// Update r
if (hud_cur_item)
Hud_DrawItem(&hud_tile_indices_buffer[HUDXY(5, 1)], Hud_GetIconForItem(hud_cur_item));
@@ -1380,7 +1380,7 @@
} while (src += w, dst += 32, --h);
}
-static void Hud_Update_Hearts() { // 8dfb94
+static void Hud_Update_Hearts(void) { // 8dfb94
static const uint16 kHudItemBoxTab1[] = { 0x24A2, 0x24A2, 0x24A2 };
static const uint16 kHudItemBoxTab2[] = { 0x24A2, 0x24A1, 0x24A0 };
// The life meter
@@ -1388,7 +1388,7 @@
Hud_UpdateHearts_Inner(&hud_tile_indices_buffer[HUDXY(20, 1)], kHudItemBoxTab2, (link_health_current + 3) & ~3);
}
-static void Hud_Update_Magic() { // 8dfc09
+static void Hud_Update_Magic(void) { // 8dfc09
uint16 *dst = &hud_tile_indices_buffer[HUDXY(2, 0)];
if (link_magic_consumption >= 1) {
dst[HUDXY(0, 0)] = 0x28F7;
@@ -1402,7 +1402,7 @@
dst[HUDXY(1, 4)] = src[3];
}
-static void Hud_Update_Inventory() { // 8dfc09
+static void Hud_Update_Inventory(void) { // 8dfc09
uint8 d[4];
Hud_IntToDecimal(link_rupees_actual, d);
@@ -1461,7 +1461,7 @@
dst[HUDXY(10, 0)] = 0x247f;
}
-void Hud_Rebuild() { // 8dfa70
+void Hud_Rebuild(void) { // 8dfa70
// Ensure all of the 165 hud words are initialized.
// This was broken by my previous reorg... quick fix for now.
if (hud_tile_indices_buffer[HUDXY(8, 2)] == 0) {
@@ -1503,7 +1503,7 @@
return kHudItemBoxGfxPtrs[item]->v;
}
-void Hud_HandleItemSwitchInputs() {
+void Hud_HandleItemSwitchInputs(void) {
if (!(enhanced_features0 & kFeatures0_SwitchLR))
return;
--- a/src/hud.h
+++ b/src/hud.h
@@ -17,46 +17,46 @@
kHudItem_Bottle4 = 24,
};
-void Hud_RefreshIcon();
-uint8 CheckPalaceItemPosession();
-void Hud_FloorIndicator();
-void Hud_RemoveSuperBombIndicator();
-void Hud_SuperBombIndicator();
-void Hud_RefillLogic();
-void Hud_Module_Run();
-void Hud_ClearTileMap();
-void Hud_Init();
-void Hud_BringMenuDown();
-void Hud_ChooseNextMode();
-void Hud_NormalMenu();
-void Hud_UpdateHud();
+void Hud_RefreshIcon(void);
+uint8 CheckPalaceItemPosession(void);
+void Hud_FloorIndicator(void);
+void Hud_RemoveSuperBombIndicator(void);
+void Hud_SuperBombIndicator(void);
+void Hud_RefillLogic(void);
+void Hud_Module_Run(void);
+void Hud_ClearTileMap(void);
+void Hud_Init(void);
+void Hud_BringMenuDown(void);
+void Hud_ChooseNextMode(void);
+void Hud_NormalMenu(void);
+void Hud_UpdateHud(void);
uint8 Hud_LookupInventoryItem(uint8 item);
-void Hud_UpdateEquippedItem();
-void Hud_CloseMenu();
-void Hud_GotoBottleMenu();
-void Hud_InitBottleMenu();
-void Hud_ExpandBottleMenu();
-void Hud_BottleMenu();
-void Hud_DrawBottleMenu_Update();
-void Hud_EraseBottleMenu();
-void Hud_RestoreNormalMenu();
-void Hud_SearchForEquippedItem();
-void Hud_DrawYButtonItems();
-void Hud_DrawAbilityBox();
-void Hud_DrawProgressIcons();
-void Hud_DrawProgressIcons_Pendants();
-void Hud_DrawProgressIcons_Crystals();
-void Hud_DrawSelectedYButtonItem();
-void Hud_DrawEquipmentBox();
-void Hud_DrawBottleMenu();
-bool Hud_RefillHealth();
-void Hud_AnimateHeartRefill();
-bool Hud_RefillMagicPower();
-void Hud_RestoreTorchBackground();
-void Hud_RebuildIndoor();
-void Hud_Rebuild();
+void Hud_UpdateEquippedItem(void);
+void Hud_CloseMenu(void);
+void Hud_GotoBottleMenu(void);
+void Hud_InitBottleMenu(void);
+void Hud_ExpandBottleMenu(void);
+void Hud_BottleMenu(void);
+void Hud_DrawBottleMenu_Update(void);
+void Hud_EraseBottleMenu(void);
+void Hud_RestoreNormalMenu(void);
+void Hud_SearchForEquippedItem(void);
+void Hud_DrawYButtonItems(void);
+void Hud_DrawAbilityBox(void);
+void Hud_DrawProgressIcons(void);
+void Hud_DrawProgressIcons_Pendants(void);
+void Hud_DrawProgressIcons_Crystals(void);
+void Hud_DrawSelectedYButtonItem(void);
+void Hud_DrawEquipmentBox(void);
+void Hud_DrawBottleMenu(void);
+bool Hud_RefillHealth(void);
+void Hud_AnimateHeartRefill(void);
+bool Hud_RefillMagicPower(void);
+void Hud_RestoreTorchBackground(void);
+void Hud_RebuildIndoor(void);
+void Hud_Rebuild(void);
const uint16 *Hud_GetItemBoxPtr(int item);
-int GetCurrentItemButtonIndex();
+int GetCurrentItemButtonIndex(void);
uint8 *GetCurrentItemButtonPtr(int i);
-void Hud_HandleItemSwitchInputs();
+void Hud_HandleItemSwitchInputs(void);
--- a/src/load_gfx.h
+++ b/src/load_gfx.h
@@ -13,152 +13,152 @@
extern uint16 kGlovesColor[2];
-void ApplyPaletteFilter_bounce();
+void ApplyPaletteFilter_bounce(void);
void PaletteFilter_Range(int from, int to);
-void PaletteFilter_IncrCountdown();
+void PaletteFilter_IncrCountdown(void);
uint8 *LoadItemAnimationGfxOne(uint8 *dst, int num, int r12, bool from_temp);
uint16 snes_divide(uint16 dividend, uint8 divisor);
-void EraseTileMaps_normal();
-void RecoverPegGFXFromMapping();
-void LoadOverworldMapPalette();
-void EraseTileMaps_triforce();
-void EraseTileMaps_dungeonmap();
+void EraseTileMaps_normal(void);
+void RecoverPegGFXFromMapping(void);
+void LoadOverworldMapPalette(void);
+void EraseTileMaps_triforce(void);
+void EraseTileMaps_dungeonmap(void);
void EraseTileMaps(uint16 r2, uint16 r0);
-void EnableForceBlank();
-void LoadItemGFXIntoWRAM4BPPBuffer();
-void DecompressSwordGraphics();
-void DecompressShieldGraphics();
+void EnableForceBlank(void);
+void LoadItemGFXIntoWRAM4BPPBuffer(void);
+void DecompressSwordGraphics(void);
+void DecompressShieldGraphics(void);
void DecompressAnimatedDungeonTiles(uint8 a);
void DecompressAnimatedOverworldTiles(uint8 a);
-void LoadItemGFX_Auxiliary();
-void LoadFollowerGraphics();
+void LoadItemGFX_Auxiliary(void);
+void LoadFollowerGraphics(void);
void WriteTo4BPPBuffer_at_7F4000(uint8 a);
void DecodeAnimatedSpriteTile_variable(uint8 a);
void Expand3To4High(uint8 *dst, const uint8 *src, const uint8 *base, int num);
-void LoadTransAuxGFX();
-void LoadTransAuxGFX_sprite();
+void LoadTransAuxGFX(void);
+void LoadTransAuxGFX_sprite(void);
void Gfx_LoadSpritesInner(uint8 *dst);
-void ReloadPreviouslyLoadedSheets();
-void Attract_DecompressStoryGFX();
-void AnimateMirrorWarp();
-void AnimateMirrorWarp_DecompressNewTileSets();
-void Graphics_IncrementalVRAMUpload();
-void PrepTransAuxGfx();
+void ReloadPreviouslyLoadedSheets(void);
+void Attract_DecompressStoryGFX(void);
+void AnimateMirrorWarp(void);
+void AnimateMirrorWarp_DecompressNewTileSets(void);
+void Graphics_IncrementalVRAMUpload(void);
+void PrepTransAuxGfx(void);
void Do3To4High16Bit(uint8 *dst, const uint8 *src, int num);
void Do3To4Low16Bit(uint8 *dst, const uint8 *src, int num);
-void LoadNewSpriteGFXSet();
-void InitializeTilesets();
-void LoadDefaultGraphics();
-void Attract_LoadBG3GFX();
-void Graphics_LoadChrHalfSlot();
-void TransferFontToVRAM();
+void LoadNewSpriteGFXSet(void);
+void InitializeTilesets(void);
+void LoadDefaultGraphics(void);
+void Attract_LoadBG3GFX(void);
+void Graphics_LoadChrHalfSlot(void);
+void TransferFontToVRAM(void);
void Do3To4High(uint16 *vram_ptr, const uint8 *decomp_addr);
void Do3To4Low(uint16 *vram_ptr, const uint8 *decomp_addr);
void LoadSpriteGraphics(uint16 *vram_ptr, int gfx_pack, uint8 *decomp_addr);
void LoadBackgroundGraphics(uint16 *vram_ptr, int gfx_pack, int slot, uint8 *decomp_addr);
-void LoadCommonSprites();
+void LoadCommonSprites(void);
int Decomp_spr(uint8 *dst, int gfx);
int Decomp_bg(uint8 *dst, int gfx);
int Decompress(uint8 *dst, const uint8 *src);
-void ResetHUDPalettes4and5();
-void PaletteFilterHistory();
-void PaletteFilter_WishPonds();
-void PaletteFilter_Crystal();
-void PaletteFilter_WishPonds_Inner();
-void PaletteFilter_RestoreSP5F();
-void PaletteFilter_SP5F();
-void KholdstareShell_PaletteFiltering();
+void ResetHUDPalettes4and5(void);
+void PaletteFilterHistory(void);
+void PaletteFilter_WishPonds(void);
+void PaletteFilter_Crystal(void);
+void PaletteFilter_WishPonds_Inner(void);
+void PaletteFilter_RestoreSP5F(void);
+void PaletteFilter_SP5F(void);
+void KholdstareShell_PaletteFiltering(void);
void AgahnimWarpShadowFilter(int k);
-void Palette_FadeIntroOneStep();
-void Palette_FadeIntro2();
+void Palette_FadeIntroOneStep(void);
+void Palette_FadeIntro2(void);
void PaletteFilter_RestoreAdditive(int from, int to);
void PaletteFilter_RestoreSubtractive(uint16 from, uint16 to);
-void PaletteFilter_InitializeWhiteFilter();
-void MirrorWarp_RunAnimationSubmodules();
-void PaletteFilter_BlindingWhite();
-void PaletteFilter_StartBlindingWhite();
-void PaletteFilter_BlindingWhiteTriforce();
-void PaletteFilter_WhirlpoolBlue();
-void PaletteFilter_IsolateWhirlpoolBlue();
-void PaletteFilter_WhirlpoolRestoreBlue();
-void PaletteFilter_WhirlpoolRestoreRedGreen();
-void PaletteFilter_RestoreBGSubstractiveStrict();
-void PaletteFilter_RestoreBGAdditiveStrict();
-void Trinexx_FlashShellPalette_Red();
-void Trinexx_UnflashShellPalette_Red();
-void Trinexx_FlashShellPalette_Blue();
-void Trinexx_UnflashShellPalette_Blue();
-void IrisSpotlight_close();
-void Spotlight_open();
+void PaletteFilter_InitializeWhiteFilter(void);
+void MirrorWarp_RunAnimationSubmodules(void);
+void PaletteFilter_BlindingWhite(void);
+void PaletteFilter_StartBlindingWhite(void);
+void PaletteFilter_BlindingWhiteTriforce(void);
+void PaletteFilter_WhirlpoolBlue(void);
+void PaletteFilter_IsolateWhirlpoolBlue(void);
+void PaletteFilter_WhirlpoolRestoreBlue(void);
+void PaletteFilter_WhirlpoolRestoreRedGreen(void);
+void PaletteFilter_RestoreBGSubstractiveStrict(void);
+void PaletteFilter_RestoreBGAdditiveStrict(void);
+void Trinexx_FlashShellPalette_Red(void);
+void Trinexx_UnflashShellPalette_Red(void);
+void Trinexx_FlashShellPalette_Blue(void);
+void Trinexx_UnflashShellPalette_Blue(void);
+void IrisSpotlight_close(void);
+void Spotlight_open(void);
void SpotlightInternal(uint8 x, uint8 y);
-void IrisSpotlight_ConfigureTable();
-void IrisSpotlight_ResetTable();
+void IrisSpotlight_ConfigureTable(void);
+void IrisSpotlight_ResetTable(void);
uint16 IrisSpotlight_CalculateCircleValue(uint8 a);
-void AdjustWaterHDMAWindow();
+void AdjustWaterHDMAWindow(void);
void AdjustWaterHDMAWindow_X(uint16 r10);
-void FloodDam_PrepFloodHDMA();
-void ResetStarTileGraphics();
-void Dungeon_RestoreStarTileChr();
-void LinkZap_HandleMosaic();
+void FloodDam_PrepFloodHDMA(void);
+void ResetStarTileGraphics(void);
+void Dungeon_RestoreStarTileChr(void);
+void LinkZap_HandleMosaic(void);
void Player_SetCustomMosaicLevel(uint8 a);
-void Module07_16_UpdatePegs_Step1();
-void Module07_16_UpdatePegs_Step2();
+void Module07_16_UpdatePegs_Step1(void);
+void Module07_16_UpdatePegs_Step2(void);
void Dungeon_UpdatePegGFXBuffer(int x, int y);
-void Dungeon_HandleTranslucencyAndPalette();
-void Overworld_LoadAllPalettes();
-void Dungeon_LoadPalettes();
-void Overworld_LoadPalettesInner();
-void OverworldLoadScreensPaletteSet();
+void Dungeon_HandleTranslucencyAndPalette(void);
+void Overworld_LoadAllPalettes(void);
+void Dungeon_LoadPalettes(void);
+void Overworld_LoadPalettesInner(void);
+void OverworldLoadScreensPaletteSet(void);
void Overworld_LoadAreaPalettesEx(uint8 x);
-void SpecialOverworld_CopyPalettesToCache();
-void Overworld_CopyPalettesToCache();
+void SpecialOverworld_CopyPalettesToCache(void);
+void Overworld_CopyPalettesToCache(void);
void Overworld_LoadPalettes(uint8 bg, uint8 spr);
-void Palette_BgAndFixedColor_Black();
+void Palette_BgAndFixedColor_Black(void);
void Palette_SetBgAndFixedColor(uint16 color);
-void SetBackdropcolorBlack();
-void Palette_SetOwBgColor();
-void Palette_SpecialOw();
-uint16 Palette_GetOwBgColor();
-void Palette_AssertTranslucencySwap();
+void SetBackdropcolorBlack(void);
+void Palette_SetOwBgColor(void);
+void Palette_SpecialOw(void);
+uint16 Palette_GetOwBgColor(void);
+void Palette_AssertTranslucencySwap(void);
void Palette_SetTranslucencySwap(bool v);
-void Palette_RevertTranslucencySwap();
-void LoadActualGearPalettes();
-void Palette_ElectroThemedGear();
-void LoadGearPalettes_bunny();
+void Palette_RevertTranslucencySwap(void);
+void LoadActualGearPalettes(void);
+void Palette_ElectroThemedGear(void);
+void LoadGearPalettes_bunny(void);
void LoadGearPalettes(uint8 sword, uint8 shield, uint8 armor);
void LoadGearPalette(int dst, const uint16 *src, int n);
-void Filter_Majorly_Whiten_Bg();
+void Filter_Majorly_Whiten_Bg(void);
uint16 Filter_Majorly_Whiten_Color(uint16 c);
-void Palette_Restore_BG_From_Flash();
-void Palette_Restore_Coldata();
-void Palette_Restore_BG_And_HUD();
-void Palette_Load_Sp0L();
-void Palette_Load_SpriteMain();
-void Palette_Load_Sp5L();
-void Palette_Load_Sp6L();
-void Palette_Load_Sword();
-void Palette_Load_Shield();
-void Palette_Load_SpriteEnvironment();
-void Palette_Load_SpriteEnvironment_Dungeon();
-void Palette_MiscSprite_Outdoors();
-void Palette_Load_DungeonMapSprite();
-void Palette_Load_LinkArmorAndGloves();
-void Palette_UpdateGlovesColor();
-void Palette_Load_DungeonMapBG();
-void Palette_Load_HUD();
-void Palette_Load_DungeonSet();
-void Palette_Load_OWBG3();
-void Palette_Load_OWBGMain();
-void Palette_Load_OWBG1();
-void Palette_Load_OWBG2();
+void Palette_Restore_BG_From_Flash(void);
+void Palette_Restore_Coldata(void);
+void Palette_Restore_BG_And_HUD(void);
+void Palette_Load_Sp0L(void);
+void Palette_Load_SpriteMain(void);
+void Palette_Load_Sp5L(void);
+void Palette_Load_Sp6L(void);
+void Palette_Load_Sword(void);
+void Palette_Load_Shield(void);
+void Palette_Load_SpriteEnvironment(void);
+void Palette_Load_SpriteEnvironment_Dungeon(void);
+void Palette_MiscSprite_Outdoors(void);
+void Palette_Load_DungeonMapSprite(void);
+void Palette_Load_LinkArmorAndGloves(void);
+void Palette_UpdateGlovesColor(void);
+void Palette_Load_DungeonMapBG(void);
+void Palette_Load_HUD(void);
+void Palette_Load_DungeonSet(void);
+void Palette_Load_OWBG3(void);
+void Palette_Load_OWBGMain(void);
+void Palette_Load_OWBG1(void);
+void Palette_Load_OWBG2(void);
void Palette_LoadSingle(const uint16 *src, int dst, int x_ents);
void Palette_LoadMultiple(const uint16 *src, int dst, int x_ents, int y_pals);
void Palette_LoadMultiple_Arbitrary(const uint16 *src, int dst, int x_ents);
-void Palette_LoadForFileSelect();
+void Palette_LoadForFileSelect(void);
void Palette_LoadForFileSelect_Armor(int k, uint8 armor, uint8 gloves);
void Palette_LoadForFileSelect_Sword(int k, uint8 sword);
void Palette_LoadForFileSelect_Shield(int k, uint8 shield);
-void Palette_LoadAgahnim();
-void HandleScreenFlash();
+void Palette_LoadAgahnim(void);
+void HandleScreenFlash(void);
#endif // ZELDA3_LOAD_GFX_H_
--- a/src/messaging.c
+++ b/src/messaging.c
@@ -223,8 +223,8 @@
&GameOver_ResituateLink,
};
static const uint8 kLocationMenuStartPos[3] = {0, 1, 6};
-static void RunInterface();
-const uint8 *GetDungmapFloorLayout() {
+static void RunInterface(void);
+const uint8 *GetDungmapFloorLayout(void) {
return kDungMap_FloorLayout(cur_palace_index_x2 >> 1).ptr;
}
@@ -233,7 +233,7 @@
return p[count];
}
-void DungMap_4() {
+void DungMap_4(void) {
BG2VOFS_copy2 += dungmap_var4;
dungmap_var5 -= dungmap_var4;
if (!--bottle_menu_expand_row)
@@ -240,21 +240,21 @@
overworld_map_state--;
}
-void Module_Messaging_6() {
+void Module_Messaging_6(void) {
assert(0);
}
-void OverworldMap_SetupHdma() {
+void OverworldMap_SetupHdma(void) {
static const uint32 kOverworldMap_TableLow[2] = {0xabdcf, 0xabdd6};
uint32 a = kOverworldMap_TableLow[overworld_map_flags];
HdmaSetup(a, a, 0x42, (uint8)M7A, (uint8)M7D, 10);
}
-const uint8 *GetLightOverworldTilemap() {
+const uint8 *GetLightOverworldTilemap(void) {
return kLightOverworldTilemap;
}
-void SaveGameFile() { // 80894a
+void SaveGameFile(void) { // 80894a
int offs = ((srm_var1 >> 1) - 1) * 0x500;
memcpy(g_zenv.sram + offs, save_dung_info, 0x500);
memcpy(g_zenv.sram + offs + 0xf00, save_dung_info, 0x500);
@@ -267,7 +267,7 @@
ZeldaWriteSram();
}
-void TransferMode7Characters() { // 80e399
+void TransferMode7Characters(void) { // 80e399
uint16 *dst = g_zenv.vram;
const uint8 *src = kOverworldMapGfx;
for (int i = 0; i != 0x4000; i++)
@@ -274,7 +274,7 @@
HIBYTE(dst[i]) = src[i];
}
-void Module0E_Interface() { // 80f800
+void Module0E_Interface(void) { // 80f800
bool skip_run = false;
if (player_is_indoors) {
if (submodule_index == 3) {
@@ -301,15 +301,15 @@
BG1VOFS_copy = BG1VOFS_copy2 + bg1_y_offset;
}
-void Module_Messaging_0() { // 80f875
+void Module_Messaging_0(void) { // 80f875
assert(0);
}
-static void RunInterface() { // 80f89a
+static void RunInterface(void) { // 80f89a
kMessagingSubmodules[submodule_index]();
}
-void Module0E_05_DesertPrayer() { // 80f8b1
+void Module0E_05_DesertPrayer(void) { // 80f8b1
switch (subsubmodule_index) {
case 0: ResetTransitionPropsAndAdvance_ResetInterface(); break;
case 1: ApplyPaletteFilter_bounce(); break;
@@ -328,7 +328,7 @@
}
}
-void Module0E_04_RedPotion() { // 80f8fb
+void Module0E_04_RedPotion(void) { // 80f8fb
if (Hud_RefillHealth()) {
button_mask_b_y &= ~0x40;
flag_update_hud_in_nmi++;
@@ -337,7 +337,7 @@
}
}
-void Module0E_08_GreenPotion() { // 80f911
+void Module0E_08_GreenPotion(void) { // 80f911
if (Hud_RefillMagicPower()) {
button_mask_b_y &= ~0x40;
flag_update_hud_in_nmi++;
@@ -346,7 +346,7 @@
}
}
-void Module0E_09_BluePotion() { // 80f918
+void Module0E_09_BluePotion(void) { // 80f918
if (Hud_RefillHealth())
submodule_index = 8;
if (Hud_RefillMagicPower())
@@ -353,7 +353,7 @@
submodule_index = 4;
}
-void Module0E_0B_SaveMenu() { // 80f9fa
+void Module0E_0B_SaveMenu(void) { // 80f9fa
// This is the continue / save and quit menu
if (!player_is_indoors)
Overworld_DwDeathMountainPaletteAnimation();
@@ -379,7 +379,7 @@
}
}
-void Module1B_SpawnSelect() { // 828586
+void Module1B_SpawnSelect(void) { // 828586
RenderText();
if (submodule_index)
return;
@@ -393,7 +393,7 @@
which_starting_point = bak;
}
-void CleanUpAndPrepDesertPrayerHDMA() { // 82c7b8
+void CleanUpAndPrepDesertPrayerHDMA(void) { // 82c7b8
HdmaSetup(0, 0x2c80c, 0x41, 0, (uint8)WH0, 0);
W12SEL_copy = 0x33;
@@ -405,7 +405,7 @@
memset(hdma_table_dynamic, 0, 240 * sizeof(uint16));
}
-void DesertPrayer_InitializeIrisHDMA() { // 87ea06
+void DesertPrayer_InitializeIrisHDMA(void) { // 87ea06
CleanUpAndPrepDesertPrayerHDMA();
spotlight_var1 = 0x26;
BYTE(spotlight_var2) = 0;
@@ -413,7 +413,7 @@
subsubmodule_index++;
}
-void DesertPrayer_BuildIrisHDMATable() { // 87ea27
+void DesertPrayer_BuildIrisHDMATable(void) { // 87ea27
uint16 r14 = link_y_coord - BG2VOFS_copy2 + 12;
spotlight_y_lower = r14 - spotlight_var1;
uint16 r4 = sign16(spotlight_y_lower) ? spotlight_y_lower : 0;
@@ -491,7 +491,7 @@
}
}
-Pair16U DesertHDMA_CalculateIrisShapeLine() { // 87ecdc
+Pair16U DesertHDMA_CalculateIrisShapeLine(void) { // 87ecdc
static const uint8 kPrayingScene_Tab1[129] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfe,
0xfd, 0xfd, 0xfd, 0xfd, 0xfc, 0xfc, 0xfc, 0xfb, 0xfb, 0xfb, 0xfa, 0xfa, 0xf9, 0xf9, 0xf8, 0xf8,
@@ -523,7 +523,7 @@
return ret;
}
-void Animate_GAMEOVER_Letters() { // 88f4ca
+void Animate_GAMEOVER_Letters(void) { // 88f4ca
switch (ancilla_type[0]) {
case 0:
submodule_index++;
@@ -540,7 +540,7 @@
}
}
-void GameOverText_SweepLeft() { // 88f4f6
+void GameOverText_SweepLeft(void) { // 88f4f6
static const uint8 kGameOverText_Tab1[8] = {0x40, 0x50, 0x60, 0x70, 0x88, 0x98, 0xa8, 0x40};
int k = flag_for_boomerang_in_place;
@@ -569,7 +569,7 @@
GameOverText_Draw();
}
-void GameOverText_UnfurlRight() { // 88f56d
+void GameOverText_UnfurlRight(void) { // 88f56d
static const uint8 kGameOverText_Tab2[8] = {0x58, 0x60, 0x68, 0x70, 0x88, 0x90, 0x98, 0xa0};
int k = flag_for_boomerang_in_place, end;
@@ -595,18 +595,18 @@
GameOverText_Draw();
}
-void Module12_GameOver() { // 89f290
+void Module12_GameOver(void) { // 89f290
kModule_Death[submodule_index]();
if (submodule_index != 9)
LinkOam_Main();
}
-void GameOver_AdvanceImmediately() { // 89f2a2
+void GameOver_AdvanceImmediately(void) { // 89f2a2
submodule_index++;
Death_Func1();
}
-void Death_Func1() { // 89f2a4
+void Death_Func1(void) { // 89f2a4
music_unk1_death = music_unk1;
sound_effect_ambient_last_death = sound_effect_ambient_last;
music_control = 241;
@@ -632,7 +632,7 @@
submodule_index++;
}
-void GameOver_DelayBeforeIris() { // 89f33b
+void GameOver_DelayBeforeIris(void) { // 89f33b
if (--some_menu_ctr)
return;
Death_InitializeGameOverLetters();
@@ -642,7 +642,7 @@
submodule_index++;
}
-void GameOver_IrisWipe() { // 89f350
+void GameOver_IrisWipe(void) { // 89f350
PaletteFilter_RestoreBGSubstractiveStrict();
main_palette_buffer[0] = main_palette_buffer[32];
uint8 bak = main_module_index;
@@ -679,7 +679,7 @@
Death_PrepFaint();
}
-void GameOver_SplatAndFade() { // 89f3de
+void GameOver_SplatAndFade(void) { // 89f3de
if (some_menu_ctr) {
some_menu_ctr--;
return;
@@ -710,7 +710,7 @@
submodule_index++;
}
-void Death_Func6() { // 89f458
+void Death_Func6(void) { // 89f458
some_menu_ctr = 12;
load_chr_halfslot_even_odd = 15;
Graphics_LoadChrHalfSlot();
@@ -724,15 +724,15 @@
Death_PlayerSwoon();
}
-void Death_Func4() { // 89f47e
+void Death_Func4(void) { // 89f47e
Death_PlayerSwoon();
}
-void Animate_GAMEOVER_Letters_bounce() { // 89f483
+void Animate_GAMEOVER_Letters_bounce(void) { // 89f483
Animate_GAMEOVER_Letters();
}
-void GameOver_Finalize_GAMEOVR() { // 89f488
+void GameOver_Finalize_GAMEOVR(void) { // 89f488
Animate_GAMEOVER_Letters();
uint8 bak1 = main_module_index;
uint8 bak2 = submodule_index;
@@ -744,7 +744,7 @@
music_control = 11;
}
-void GameOver_SaveAndOrContinue() { // 89f4c1
+void GameOver_SaveAndOrContinue(void) { // 89f4c1
GameOver_AnimateChoiceFairy();
if (ancilla_type)
Animate_GAMEOVER_Letters();
@@ -851,11 +851,11 @@
}
}
-void GameOver_AnimateChoiceFairy() { // 89f67a
+void GameOver_AnimateChoiceFairy(void) { // 89f67a
SetOamPlain(&oam_buf[0x14], 0x34, kDeath_SprY0[subsubmodule_index], kDeath_SprChar0[frame_counter >> 3 & 1], 0x78, 2);
}
-void GameOver_InitializeRevivalFairy() { // 89f6a4
+void GameOver_InitializeRevivalFairy(void) { // 89f6a4
ConfigureRevivalAncillae();
link_hearts_filler = 56;
submodule_index += 1;
@@ -862,11 +862,11 @@
overworld_map_state = 0;
}
-void RevivalFairy_Main_bounce() { // 89f6b4
+void RevivalFairy_Main_bounce(void) { // 89f6b4
RevivalFairy_Main();
}
-void GameOver_RiseALittle() { // 89f6b9
+void GameOver_RiseALittle(void) { // 89f6b9
if (link_hearts_filler == 0) {
memcpy(aux_palette_buffer, mapbak_palette, 256);
memset(main_palette_buffer + 32, 0, 192);
@@ -880,7 +880,7 @@
Hud_RefillLogic();
}
-void GameOver_Restore0D() { // 89f71d
+void GameOver_Restore0D(void) { // 89f71d
if (!is_doing_heart_animation) {
load_chr_halfslot_even_odd = 1;
Graphics_LoadChrHalfSlot();
@@ -891,13 +891,13 @@
Hud_RefillLogic();
}
-void GameOver_Restore0E() { // 89f735
+void GameOver_Restore0E(void) { // 89f735
Graphics_LoadChrHalfSlot();
TS_copy = mapbak_TS;
submodule_index++;
}
-void GameOver_ResituateLink() { // 89f742
+void GameOver_ResituateLink(void) { // 89f742
PaletteFilter_RestoreBGAdditiveStrict();
main_palette_buffer[0] = main_palette_buffer[32];
if (BYTE(palette_filter_countdown) != 32)
@@ -914,7 +914,7 @@
darkening_or_lightening_screen = mapbak_bg1_y_offset;
}
-void Module0E_0A_FluteMenu() { // 8ab730
+void Module0E_0A_FluteMenu(void) { // 8ab730
switch (overworld_map_state) {
case 0:
WorldMap_FadeOut();
@@ -953,7 +953,7 @@
}
}
-void FluteMenu_HandleSelection() { // 8ab78b
+void FluteMenu_HandleSelection(void) { // 8ab78b
Point16U pt;
if (some_menu_ctr == 0) {
@@ -998,7 +998,7 @@
link_y_coord_spexit = ybak;
}
-void FluteMenu_LoadSelectedScreen() { // 8ab8c5
+void FluteMenu_LoadSelectedScreen(void) { // 8ab8c5
save_ow_event_info[0x3b] &= ~0x20;
save_ow_event_info[0x7b] &= ~0x20;
save_dung_info[267] &= ~0x80;
@@ -1025,7 +1025,7 @@
music_control = ZeldaIsPlayingMusicTrack(m & 0xf) ? 0xf3 : m & 0xf;
}
-void Overworld_LoadOverlayAndMap() { // 8ab948
+void Overworld_LoadOverlayAndMap(void) { // 8ab948
uint16 bak1 = WORD(main_module_index);
uint16 bak2 = WORD(overworld_map_state);
Overworld_LoadAndBuildScreen();
@@ -1033,7 +1033,7 @@
WORD(main_module_index) = bak1;
}
-void FluteMenu_FadeInAndQuack() { // 8ab964
+void FluteMenu_FadeInAndQuack(void) { // 8ab964
if (++INIDISP_copy == 15) {
BirdTravel_Finish_Doit();
} else {
@@ -1041,7 +1041,7 @@
}
}
-void BirdTravel_Finish_Doit() { // 8ab96c
+void BirdTravel_Finish_Doit(void) { // 8ab96c
overworld_map_state = 0;
subsubmodule_index = 0;
main_module_index = saved_module_for_menu;
@@ -1051,7 +1051,7 @@
Sprite_Main();
}
-void Messaging_OverworldMap() { // 8ab98b
+void Messaging_OverworldMap(void) { // 8ab98b
switch (overworld_map_state) {
case 0:
WorldMap_FadeOut();
@@ -1080,7 +1080,7 @@
}
}
-void WorldMap_FadeOut() { // 8ab9a3
+void WorldMap_FadeOut(void) { // 8ab9a3
if (--INIDISP_copy)
return;
mapbak_HDMAEN = HDMAEN_copy;
@@ -1110,7 +1110,7 @@
BGMODE_copy = 7;
}
-void WorldMap_LoadLightWorldMap() { // 8aba30
+void WorldMap_LoadLightWorldMap(void) { // 8aba30
WorldMap_FillTilemapWithEF();
TM_copy = 0x11;
TS_copy = 0;
@@ -1125,7 +1125,7 @@
overworld_map_state++;
}
-void WorldMap_LoadDarkWorldMap() { // 8aba7a
+void WorldMap_LoadDarkWorldMap(void) { // 8aba7a
if (overworld_screen_index & 0x40) {
memcpy(&uvram, kDarkOverworldTilemap, 1024);
nmi_subroutine_index = 21;
@@ -1133,7 +1133,7 @@
overworld_map_state++;
}
-void WorldMap_LoadSpriteGFX() { // 8aba9a
+void WorldMap_LoadSpriteGFX(void) { // 8aba9a
load_chr_halfslot_even_odd = 0x10;
Graphics_LoadChrHalfSlot();
load_chr_halfslot_even_odd = 0;
@@ -1140,12 +1140,12 @@
overworld_map_state++;
}
-void WorldMap_Brighten() { // 8abaaa
+void WorldMap_Brighten(void) { // 8abaaa
if (++INIDISP_copy == 15)
overworld_map_state++;
}
-bool DidPressButtonForMap() {
+bool DidPressButtonForMap(void) {
if (hud_cur_item_x != 0)
return filtered_joypad_H & 0x20; // select
else
@@ -1152,7 +1152,7 @@
return filtered_joypad_L & 0x40; // x
}
-void WorldMap_PlayerControl() { // 8abae6
+void WorldMap_PlayerControl(void) { // 8abae6
if (overworld_map_flags & 0x80) {
overworld_map_flags &= ~0x80;
OverworldMap_SetupHdma();
@@ -1200,7 +1200,7 @@
WorldMap_HandleSprites();
}
-void WorldMap_RestoreGraphics() { // 8abbd6
+void WorldMap_RestoreGraphics(void) { // 8abbd6
if (--INIDISP_copy)
return;
EnableForceBlank();
@@ -1216,7 +1216,7 @@
Attract_SetUpConclusionHDMA();
}
-void Attract_SetUpConclusionHDMA() { // 8abc33
+void Attract_SetUpConclusionHDMA(void) { // 8abc33
HdmaSetup(0xABDDD, 0xABDDD, 0x42, (uint8)M7A, (uint8)M7D, 0);
HDMAEN_copy = 0x80;
BGMODE_copy = 9;
@@ -1223,7 +1223,7 @@
nmi_disable_core_updates = 0;
}
-void WorldMap_ExitMap() { // 8abc54
+void WorldMap_ExitMap(void) { // 8abc54
overworld_palette_aux_or_main = 0;
hud_palette = 0;
InitializeTilesets();
@@ -1240,7 +1240,7 @@
music_control = 0xf3;
}
-void WorldMap_SetUpHDMA() { // 8abc96
+void WorldMap_SetUpHDMA(void) { // 8abc96
BG1HOFS_copy2 = 0x80;
BG1VOFS_copy2 = 0xc8;
M7Y_copy = 0x1c9;
@@ -1275,13 +1275,13 @@
}
}
-void WorldMap_FillTilemapWithEF() { // 8abda5
+void WorldMap_FillTilemapWithEF(void) { // 8abda5
uint16 *dst = g_zenv.vram;
for (int i = 0; i != 0x4000; i++)
BYTE(dst[i]) = 0xef;
}
-void WorldMap_HandleSprites() { // 8abf66
+void WorldMap_HandleSprites(void) { // 8abf66
Point16U pt;
if (frame_counter & 0x10 && WorldMap_CalculateOamCoordinates(&pt))
@@ -1518,15 +1518,15 @@
return (savegame_map_icons_indicator == 7) && (link_has_crystals & kCrystalBitMask[k]) != 0;
}
-void Module0E_03_DungeonMap() { // 8ae0b0
+void Module0E_03_DungeonMap(void) { // 8ae0b0
kDungMapSubmodules[overworld_map_state]();
}
-void Module0E_03_01_DrawMap() { // 8ae0dc
+void Module0E_03_01_DrawMap(void) { // 8ae0dc
kDungMapInit[dungmap_init_state]();
}
-void Module0E_03_01_00_PrepMapGraphics() { // 8ae0e4
+void Module0E_03_01_00_PrepMapGraphics(void) { // 8ae0e4
uint8 hdmaen_bak = HDMAEN_copy;
HDMAEN_copy = 0;
mapbak_main_tile_theme_index = main_tile_theme_index;
@@ -1554,7 +1554,7 @@
nmi_disable_core_updates = 9;
}
-void Module0E_03_01_01_DrawLEVEL() { // 8ae1a4
+void Module0E_03_01_01_DrawLEVEL(void) { // 8ae1a4
// Display FLOOR instead of MAP
int i = kDungMap_Tab0[cur_palace_index_x2 >> 1] >> 1;
if (i >= 0) {
@@ -1571,7 +1571,7 @@
dungmap_init_state++;
}
-void Module0E_03_01_02_DrawFloorsBackdrop() { // 8ae1f3
+void Module0E_03_01_02_DrawFloorsBackdrop(void) { // 8ae1f3
int offs = 0;
uint16 t5 = kDungMap_Tab5[cur_palace_index_x2 >> 1];
if (t5 & 0x100) {
@@ -1623,7 +1623,7 @@
vram_upload_offset = offs * 2;
}
-void Module0E_03_01_03_DrawRooms() { // 8ae384
+void Module0E_03_01_03_DrawRooms(void) { // 8ae384
dungmap_var2 = 0;
dungmap_idx = 0;
uint8 t = -(kDungMap_Tab5[cur_palace_index_x2 >> 1] & 0xf);
@@ -1772,7 +1772,7 @@
}
}
-void DungeonMap_DrawRoomMarkers() { // 8ae823
+void DungeonMap_DrawRoomMarkers(void) { // 8ae823
int dung = cur_palace_index_x2 >> 1;
uint8 t5 = (kDungMap_Tab5[dung] & 0xf);
uint8 floor1 = t5 + dung_cur_floor;
@@ -1824,12 +1824,12 @@
dungmap_init_state = 0;
}
-void DungeonMap_HandleInputAndSprites() { // 8ae954
+void DungeonMap_HandleInputAndSprites(void) { // 8ae954
DungeonMap_HandleInput();
DungeonMap_DrawSprites();
}
-static inline bool WantExitDungeonMap() {
+static inline bool WantExitDungeonMap(void) {
if (hud_cur_item_x != 0)
return filtered_joypad_H & 0x20; // Select
else
@@ -1836,7 +1836,7 @@
return filtered_joypad_L & 0x40; // X
}
-void DungeonMap_HandleInput() { // 8ae95b
+void DungeonMap_HandleInput(void) { // 8ae95b
if (WantExitDungeonMap()) {
overworld_map_state += 2;
dungmap_init_state = 0;
@@ -1845,13 +1845,13 @@
}
}
-void DungeonMap_HandleMovementInput() { // 8ae979
+void DungeonMap_HandleMovementInput(void) { // 8ae979
DungeonMap_HandleFloorSelect();
if (dungmap_var2)
DungeonMap_ScrollFloors();
}
-void DungeonMap_HandleFloorSelect() { // 8ae986
+void DungeonMap_HandleFloorSelect(void) { // 8ae986
uint8 r2 = (kDungMap_Tab5[cur_palace_index_x2 >> 1] >> 4 & 0xf);
uint8 r3 = (kDungMap_Tab5[cur_palace_index_x2 >> 1] & 0xf);
if (r2 + r3 < 3 || dungmap_var2 || !(joypad1H_last & 0xc))
@@ -1884,7 +1884,7 @@
nmi_subroutine_index = 8;
}
-void DungeonMap_ScrollFloors() { // 8aea7f
+void DungeonMap_ScrollFloors(void) { // 8aea7f
int x = WORD(g_ram[10]) >> 3 & 1;
dungmap_var5 += kDungMap_Tab39[x];
dungmap_var8 += kDungMap_Tab39[x];
@@ -1893,7 +1893,7 @@
dungmap_var2 = 0;
}
-void DungeonMap_DrawSprites() { // 8aeab2
+void DungeonMap_DrawSprites(void) { // 8aeab2
int dung = cur_palace_index_x2 >> 1;
uint8 r2 = (kDungMap_Tab5[dung] & 0xf);
uint8 floor = r2 + dung_cur_floor;
@@ -1966,7 +1966,7 @@
return spr_pos;
}
-void DungeonMap_DrawFloorBlinker() { // 8aeccf
+void DungeonMap_DrawFloorBlinker(void) { // 8aeccf
uint8 floor = dungmap_cur_floor;
uint8 t5 = kDungMap_Tab5[cur_palace_index_x2 >> 1];
uint8 flag = ((t5 >> 4 & 0xf) + (t5 & 0xf) != 1);
@@ -2028,7 +2028,7 @@
return spr_pos + 1;
}
-void DungeonMap_RecoverGFX() { // 8aef19
+void DungeonMap_RecoverGFX(void) { // 8aef19
uint8 hdmaen_bak = HDMAEN_copy;
HDMAEN_copy = 0;
EraseTileMaps_normal();
@@ -2070,12 +2070,12 @@
nmi_disable_core_updates = 0;
}
-void ToggleStarTilesAndAdvance() { // 8aefc9
+void ToggleStarTilesAndAdvance(void) { // 8aefc9
Dungeon_RestoreStarTileChr();
overworld_map_state++;
}
-void Death_InitializeGameOverLetters() { // 8afe20
+void Death_InitializeGameOverLetters(void) { // 8afe20
flag_for_boomerang_in_place = 0;
for (int i = 0; i < 8; i++) {
ancilla_x_lo[i] = 0xb0;
@@ -2085,7 +2085,7 @@
hookshot_effect_index = 6;
}
-void CopySaveToWRAM() { // 8ccfbb
+void CopySaveToWRAM(void) { // 8ccfbb
int k = 0xf;
bird_travel_x_hi[k] = 0;
bird_travel_y_hi[k] = 0;
@@ -2118,11 +2118,11 @@
hud_palette = 0;
}
-void RenderText() { // 8ec440
+void RenderText(void) { // 8ec440
kMessaging_Text[messaging_module]();
}
-void RenderText_PostDeathSaveOptions() { // 8ec455
+void RenderText_PostDeathSaveOptions(void) { // 8ec455
dialogue_message_index = 3;
Text_Initialize_initModuleStateLoop();
text_msgbox_topleft = 0x61e8;
@@ -2131,7 +2131,7 @@
Text_Render();
}
-void Text_Initialize() { // 8ec483
+void Text_Initialize(void) { // 8ec483
if (main_module_index == 20)
ResetHUDPalettes4and5();
Attract_DecompressStoryGFX();
@@ -2138,7 +2138,7 @@
Text_Initialize_initModuleStateLoop();
}
-void Text_Initialize_initModuleStateLoop() { // 8ec493
+void Text_Initialize_initModuleStateLoop(void) { // 8ec493
memcpy(&text_msgbox_topleft_copy, kText_InitializationData, 32);
Text_InitVwfState();
RenderText_SetDefaultWindowPosition();
@@ -2149,7 +2149,7 @@
nmi_disable_core_updates = 2;
}
-void Text_InitVwfState() { // 8ec4c9
+void Text_InitVwfState(void) { // 8ec4c9
vwf_curline = 0;
vwf_flag_next_line = 0;
vwf_var1 = 0;
@@ -2262,7 +2262,7 @@
}
// Perform initial parsing of the string, expanding words, processing some commands, etc.
-void Text_LoadCharacterBuffer() { // 8ec4e2
+void Text_LoadCharacterBuffer(void) { // 8ec4e2
MemBlk dictionary = FindIndexInMemblk(g_zenv.dialogue_blk, 0);
MemBlk dialogue = FindIndexInMemblk(g_zenv.dialogue_blk, 1);
MemBlk text_str = FindIndexInMemblk(dialogue, dialogue_message_index);
@@ -2337,11 +2337,11 @@
return a;
}
-void Text_Render() { // 8ec8d9
+void Text_Render(void) { // 8ec8d9
kText_Render[text_render_state]();
}
-void RenderText_Draw_Border() { // 8ec8ea
+void RenderText_Draw_Border(void) { // 8ec8ea
RenderText_DrawBorderInitialize();
uint16 *d = RenderText_DrawBorderRow(vram_upload_data, 0);
for(int i = 0; i != 6; i++)
@@ -2351,7 +2351,7 @@
text_render_state = 2;
}
-void RenderText_Draw_BorderIncremental() { // 8ec919
+void RenderText_Draw_BorderIncremental(void) { // 8ec919
nmi_load_bg_from_vram = 1;
uint8 a = text_incremental_state;
uint16 *d = vram_upload_data;
@@ -2375,12 +2375,12 @@
}
}
-void RenderText_Draw_CharacterTilemap() { // 8ec97d
+void RenderText_Draw_CharacterTilemap(void) { // 8ec97d
Text_BuildCharacterTilemap();
text_render_state++;
}
-void RenderText_Draw_MessageCharacters() { // 8ec984
+void RenderText_Draw_MessageCharacters(void) { // 8ec984
RESTART:;
uint32 cmd = Text_DecodeCmd(messaging_text_buffer[dialogue_msg_read_pos],
&messaging_text_buffer[dialogue_msg_read_pos + 1]);
@@ -2496,7 +2496,7 @@
nmi_disable_core_updates = 2;
}
-void RenderText_Draw_Finish() { // 8eca35
+void RenderText_Draw_Finish(void) { // 8eca35
RenderText_DrawBorderInitialize();
uint16 *d = vram_upload_data;
d[0] = swap16(text_msgbox_topleft_copy);
@@ -2579,7 +2579,7 @@
}
}
-void RenderText_Draw_Choose2LowOr3() { // 8ecd1a
+void RenderText_Draw_Choose2LowOr3(void) { // 8ecd1a
if (text_wait_countdown2 != 0) {
if (--text_wait_countdown2 == 1)
sound_effect_2 = 36;
@@ -2598,7 +2598,7 @@
}
}
-void RenderText_Draw_ChooseItem() { // 8ecd88
+void RenderText_Draw_ChooseItem(void) { // 8ecd88
if (text_wait_countdown2 != 0) {
if (--text_wait_countdown2 == 1)
RenderText_FindYItem_Next();
@@ -2618,7 +2618,7 @@
}
}
-void RenderText_FindYItem_Previous() { // 8ecdc8
+void RenderText_FindYItem_Previous(void) { // 8ecdc8
for (;;) {
uint8 x = choice_in_multiselect_box;
if (sign8(x))
@@ -2630,7 +2630,7 @@
RenderText_DrawSelectedYItem();
}
-void RenderText_FindYItem_Next() { // 8ecded
+void RenderText_FindYItem_Next(void) { // 8ecded
for (;;) {
uint8 x = choice_in_multiselect_box;
if (x >= 32)
@@ -2642,7 +2642,7 @@
RenderText_DrawSelectedYItem();
}
-void RenderText_DrawSelectedYItem() { // 8ece14
+void RenderText_DrawSelectedYItem(void) { // 8ece14
int item = choice_in_multiselect_box;
const uint16 *p = Hud_GetItemBoxPtr(item);
p += ((item == 3 || item == 32) ? 1 : (&link_item_bow)[item]) * 4;
@@ -2651,7 +2651,7 @@
memcpy(vwf300 + 0xec, p + 2, 4);
}
-void RenderText_Draw_Choose2HiOr3() { // 8ece83
+void RenderText_Draw_Choose2HiOr3(void) { // 8ece83
if (text_wait_countdown2 != 0) {
if (--text_wait_countdown2 == 1)
sound_effect_2 = 36;
@@ -2670,7 +2670,7 @@
}
}
-void RenderText_Draw_Choose3() { // 8ecef7
+void RenderText_Draw_Choose3(void) { // 8ecef7
uint8 y;
if (text_wait_countdown2 != 0) {
if (--text_wait_countdown2 == 1)
@@ -2692,7 +2692,7 @@
}
}
-void RenderText_Draw_Choose1Or2() { // 8ecf72
+void RenderText_Draw_Choose1Or2(void) { // 8ecf72
uint8 y;
if (text_wait_countdown2 != 0) {
if (--text_wait_countdown2 == 1)
@@ -2712,7 +2712,7 @@
}
}
-bool RenderText_Draw_Scroll() { // 8ecfe2
+bool RenderText_Draw_Scroll(void) { // 8ecfe2
uint8 r2 = dialogue_scroll_speed;
do {
for (int i = 0; i < 0x7e0; i += 16) {
@@ -2739,13 +2739,13 @@
return false;
}
-void RenderText_SetDefaultWindowPosition() { // 8ed280
+void RenderText_SetDefaultWindowPosition(void) { // 8ed280
uint16 y = link_y_coord - BG2VOFS_copy2;
int flag = (y < 0x78);
text_msgbox_topleft = kText_Positions[flag];
}
-void RenderText_DrawBorderInitialize() { // 8ed29c
+void RenderText_DrawBorderInitialize(void) { // 8ed29c
text_msgbox_topleft_copy = text_msgbox_topleft;
}
@@ -2762,7 +2762,7 @@
return d;
}
-void Text_BuildCharacterTilemap() { // 8ed2ec
+void Text_BuildCharacterTilemap(void) { // 8ed2ec
uint16 *vwf300 = (uint16 *)&g_ram[0x1300];
for (int i = 0; i < 126; i++)
vwf300[i] = text_tilemap_cur++;
@@ -2769,7 +2769,7 @@
RenderText_Refresh();
}
-void RenderText_Refresh() { // 8ed307
+void RenderText_Refresh(void) { // 8ed307
RenderText_DrawBorderInitialize();
text_msgbox_topleft_copy += 0x21;
uint16 *d = vram_upload_data;
@@ -2786,7 +2786,7 @@
}
-void Text_GenerateMessagePointers() { // 8ed3eb
+void Text_GenerateMessagePointers(void) { // 8ed3eb
// This is not actually used. Only for ram compat.
MemBlk dialogue = FindIndexInMemblk(g_zenv.dialogue_blk, 1);
uint32 p = 0x1c8000;
@@ -2801,12 +2801,12 @@
}
}
-void DungMap_LightenUpMap() { // 8ed940
+void DungMap_LightenUpMap(void) { // 8ed940
if (++INIDISP_copy == 0xf)
overworld_map_state++;
}
-void DungMap_Backup() { // 8ed94c
+void DungMap_Backup(void) { // 8ed94c
if (--INIDISP_copy)
return;
MOSAIC_copy = 3;
@@ -2839,7 +2839,7 @@
music_control = 0xf2;
}
-void DungMap_FadeMapToBlack() { // 8eda37
+void DungMap_FadeMapToBlack(void) { // 8eda37
if (--INIDISP_copy)
return;
EnableForceBlank();
@@ -2855,7 +2855,7 @@
flag_update_cgram_in_nmi++;
}
-void DungMap_RestoreOld() { // 8eda79
+void DungMap_RestoreOld(void) { // 8eda79
OrientLampLightCone();
if (++INIDISP_copy != 0xf)
return;
@@ -2867,7 +2867,7 @@
HDMAEN_copy = mapbak_HDMAEN;
}
-void Death_PlayerSwoon() { // 8ff5e3
+void Death_PlayerSwoon(void) { // 8ff5e3
int k = link_var30d;
if (sign8(--some_animation_timer)) {
k++;
@@ -2886,7 +2886,7 @@
SetOamPlain(&oam_buf[0x74], x, y, 0xaa, kDeath_SprFlags[link_is_on_lower_level] | 2, 2);
}
-void Death_PrepFaint() { // 8ffa6f
+void Death_PrepFaint(void) { // 8ffa6f
link_direction_facing = 2;
player_unk1 = 1;
link_var30d = 0;
@@ -2922,7 +2922,7 @@
-void DisplaySelectMenu() {
+void DisplaySelectMenu(void) {
choice_in_multiselect_box_bak = choice_in_multiselect_box;
dialogue_message_index = 0x186;
uint8 bak = main_module_index;
--- a/src/messaging.h
+++ b/src/messaging.h
@@ -1,133 +1,133 @@
#pragma once
#include "types.h"
-const uint8 *GetDungmapFloorLayout();
+const uint8 *GetDungmapFloorLayout(void);
uint8 GetOtherDungmapInfo(int count);
-void DungMap_4();
-void Module_Messaging_6();
-void OverworldMap_SetupHdma();
-const uint8 *GetLightOverworldTilemap();
-void SaveGameFile();
-void TransferMode7Characters();
-void Module0E_Interface();
-void Module_Messaging_0();
-void Module0E_05_DesertPrayer();
-void Module0E_04_RedPotion();
-void Module0E_08_GreenPotion();
-void Module0E_09_BluePotion();
-void Module0E_0B_SaveMenu();
-void Module1B_SpawnSelect();
-void CleanUpAndPrepDesertPrayerHDMA();
-void DesertPrayer_InitializeIrisHDMA();
-void DesertPrayer_BuildIrisHDMATable();
-Pair16U DesertHDMA_CalculateIrisShapeLine();
-void Animate_GAMEOVER_Letters();
-void GameOverText_SweepLeft();
-void GameOverText_UnfurlRight();
-void Module12_GameOver();
-void GameOver_AdvanceImmediately();
-void Death_Func1();
-void GameOver_DelayBeforeIris();
-void GameOver_IrisWipe();
-void GameOver_SplatAndFade();
-void Death_Func6();
-void Death_Func4();
-void Animate_GAMEOVER_Letters_bounce();
-void GameOver_Finalize_GAMEOVR();
-void GameOver_SaveAndOrContinue();
+void DungMap_4(void);
+void Module_Messaging_6(void);
+void OverworldMap_SetupHdma(void);
+const uint8 *GetLightOverworldTilemap(void);
+void SaveGameFile(void);
+void TransferMode7Characters(void);
+void Module0E_Interface(void);
+void Module_Messaging_0(void);
+void Module0E_05_DesertPrayer(void);
+void Module0E_04_RedPotion(void);
+void Module0E_08_GreenPotion(void);
+void Module0E_09_BluePotion(void);
+void Module0E_0B_SaveMenu(void);
+void Module1B_SpawnSelect(void);
+void CleanUpAndPrepDesertPrayerHDMA(void);
+void DesertPrayer_InitializeIrisHDMA(void);
+void DesertPrayer_BuildIrisHDMATable(void);
+Pair16U DesertHDMA_CalculateIrisShapeLine(void);
+void Animate_GAMEOVER_Letters(void);
+void GameOverText_SweepLeft(void);
+void GameOverText_UnfurlRight(void);
+void Module12_GameOver(void);
+void GameOver_AdvanceImmediately(void);
+void Death_Func1(void);
+void GameOver_DelayBeforeIris(void);
+void GameOver_IrisWipe(void);
+void GameOver_SplatAndFade(void);
+void Death_Func6(void);
+void Death_Func4(void);
+void Animate_GAMEOVER_Letters_bounce(void);
+void GameOver_Finalize_GAMEOVR(void);
+void GameOver_SaveAndOrContinue(void);
void Death_Func15(bool count_as_death);
-void GameOver_AnimateChoiceFairy();
-void GameOver_InitializeRevivalFairy();
-void RevivalFairy_Main_bounce();
-void GameOver_RiseALittle();
-void GameOver_Restore0D();
-void GameOver_Restore0E();
-void GameOver_ResituateLink();
-void Module0E_0A_FluteMenu();
-void FluteMenu_HandleSelection();
-void FluteMenu_LoadSelectedScreen();
-void Overworld_LoadOverlayAndMap();
-void FluteMenu_FadeInAndQuack();
-void BirdTravel_Finish_Doit();
-void Messaging_OverworldMap();
-void WorldMap_FadeOut();
-void WorldMap_LoadLightWorldMap();
-void WorldMap_LoadDarkWorldMap();
-void WorldMap_LoadSpriteGFX();
-void WorldMap_Brighten();
-void WorldMap_PlayerControl();
-void WorldMap_RestoreGraphics();
-void Attract_SetUpConclusionHDMA();
-void WorldMap_ExitMap();
-void WorldMap_SetUpHDMA();
-void WorldMap_FillTilemapWithEF();
-void WorldMap_HandleSprites();
+void GameOver_AnimateChoiceFairy(void);
+void GameOver_InitializeRevivalFairy(void);
+void RevivalFairy_Main_bounce(void);
+void GameOver_RiseALittle(void);
+void GameOver_Restore0D(void);
+void GameOver_Restore0E(void);
+void GameOver_ResituateLink(void);
+void Module0E_0A_FluteMenu(void);
+void FluteMenu_HandleSelection(void);
+void FluteMenu_LoadSelectedScreen(void);
+void Overworld_LoadOverlayAndMap(void);
+void FluteMenu_FadeInAndQuack(void);
+void BirdTravel_Finish_Doit(void);
+void Messaging_OverworldMap(void);
+void WorldMap_FadeOut(void);
+void WorldMap_LoadLightWorldMap(void);
+void WorldMap_LoadDarkWorldMap(void);
+void WorldMap_LoadSpriteGFX(void);
+void WorldMap_Brighten(void);
+void WorldMap_PlayerControl(void);
+void WorldMap_RestoreGraphics(void);
+void Attract_SetUpConclusionHDMA(void);
+void WorldMap_ExitMap(void);
+void WorldMap_SetUpHDMA(void);
+void WorldMap_FillTilemapWithEF(void);
+void WorldMap_HandleSprites(void);
bool OverworldMap_CheckForPendant(int k);
bool OverworldMap_CheckForCrystal(int k);
-void Module0E_03_DungeonMap();
-void Module0E_03_01_DrawMap();
-void Module0E_03_01_00_PrepMapGraphics();
-void Module0E_03_01_01_DrawLEVEL();
-void Module0E_03_01_02_DrawFloorsBackdrop();
+void Module0E_03_DungeonMap(void);
+void Module0E_03_01_DrawMap(void);
+void Module0E_03_01_00_PrepMapGraphics(void);
+void Module0E_03_01_01_DrawLEVEL(void);
+void Module0E_03_01_02_DrawFloorsBackdrop(void);
void DungeonMap_BuildFloorListBoxes(uint8 t5, uint16 r14);
-void Module0E_03_01_03_DrawRooms();
+void Module0E_03_01_03_DrawRooms(void);
void DungeonMap_DrawBorderForRooms(uint16 pd, uint16 mask);
void DungeonMap_DrawFloorNumbersByRoom(uint16 pd, uint16 r8);
void DungeonMap_DrawDungeonLayout(int pd);
void DungeonMap_DrawSingleRowOfRooms(int i, int arg_x);
-void DungeonMap_DrawRoomMarkers();
-void DungeonMap_HandleInputAndSprites();
-void DungeonMap_HandleInput();
-void DungeonMap_HandleMovementInput();
-void DungeonMap_HandleFloorSelect();
-void DungeonMap_ScrollFloors();
-void DungeonMap_DrawSprites();
+void DungeonMap_DrawRoomMarkers(void);
+void DungeonMap_HandleInputAndSprites(void);
+void DungeonMap_HandleInput(void);
+void DungeonMap_HandleMovementInput(void);
+void DungeonMap_HandleFloorSelect(void);
+void DungeonMap_ScrollFloors(void);
+void DungeonMap_DrawSprites(void);
void DungeonMap_DrawLinkPointing(int spr_pos, uint8 r2, uint8 r3);
int DungeonMap_DrawBlinkingIndicator(int spr_pos);
int DungeonMap_DrawLocationMarker(int spr_pos, uint16 r14);
int DungeonMap_DrawFloorNumberObjects(int spr_pos);
-void DungeonMap_DrawFloorBlinker();
+void DungeonMap_DrawFloorBlinker(void);
int DungeonMap_DrawBossIcon(int spr_pos);
int DungeonMap_DrawBossIconByFloor(int spr_pos);
-void DungeonMap_RecoverGFX();
-void ToggleStarTilesAndAdvance();
-void Death_InitializeGameOverLetters();
-void CopySaveToWRAM();
-void RenderText();
-void RenderText_PostDeathSaveOptions();
-void Text_Initialize();
-void Text_Initialize_initModuleStateLoop();
-void Text_InitVwfState();
-void Text_LoadCharacterBuffer();
+void DungeonMap_RecoverGFX(void);
+void ToggleStarTilesAndAdvance(void);
+void Death_InitializeGameOverLetters(void);
+void CopySaveToWRAM(void);
+void RenderText(void);
+void RenderText_PostDeathSaveOptions(void);
+void Text_Initialize(void);
+void Text_Initialize_initModuleStateLoop(void);
+void Text_InitVwfState(void);
+void Text_LoadCharacterBuffer(void);
uint8 *Text_WritePlayerName(uint8 *p);
uint8 Text_FilterPlayerNameCharacters(uint8 a);
-void Text_Render();
-void RenderText_Draw_Border();
-void RenderText_Draw_BorderIncremental();
-void RenderText_Draw_CharacterTilemap();
-void RenderText_Draw_MessageCharacters();
-void RenderText_Draw_Finish();
-void VWF_RenderSingle();
-void RenderText_Draw_Choose2LowOr3();
-void RenderText_Draw_ChooseItem();
-void RenderText_FindYItem_Previous();
-void RenderText_FindYItem_Next();
-void RenderText_DrawSelectedYItem();
-void RenderText_Draw_Choose2HiOr3();
-void RenderText_Draw_Choose3();
-void RenderText_Draw_Choose1Or2();
-bool RenderText_Draw_Scroll();
-void RenderText_SetDefaultWindowPosition();
-void RenderText_DrawBorderInitialize();
+void Text_Render(void);
+void RenderText_Draw_Border(void);
+void RenderText_Draw_BorderIncremental(void);
+void RenderText_Draw_CharacterTilemap(void);
+void RenderText_Draw_MessageCharacters(void);
+void RenderText_Draw_Finish(void);
+void VWF_RenderSingle(int);
+void RenderText_Draw_Choose2LowOr3(void);
+void RenderText_Draw_ChooseItem(void);
+void RenderText_FindYItem_Previous(void);
+void RenderText_FindYItem_Next(void);
+void RenderText_DrawSelectedYItem(void);
+void RenderText_Draw_Choose2HiOr3(void);
+void RenderText_Draw_Choose3(void);
+void RenderText_Draw_Choose1Or2(void);
+bool RenderText_Draw_Scroll(void);
+void RenderText_SetDefaultWindowPosition(void);
+void RenderText_DrawBorderInitialize(void);
uint16 *RenderText_DrawBorderRow(uint16 *d, int y);
-void Text_BuildCharacterTilemap();
-void RenderText_Refresh();
-void Text_GenerateMessagePointers();
-void DungMap_LightenUpMap();
-void DungMap_Backup();
-void DungMap_FadeMapToBlack();
-void DungMap_RestoreOld();
-void Death_PlayerSwoon();
-void Death_PrepFaint();
-void DisplaySelectMenu();
-bool DidPressButtonForMap();
+void Text_BuildCharacterTilemap(void);
+void RenderText_Refresh(void);
+void Text_GenerateMessagePointers(void);
+void DungMap_LightenUpMap(void);
+void DungMap_Backup(void);
+void DungMap_FadeMapToBlack(void);
+void DungMap_RestoreOld(void);
+void Death_PlayerSwoon(void);
+void Death_PrepFaint(void);
+void DisplaySelectMenu(void);
+bool DidPressButtonForMap(void);
--- a/src/misc.h
+++ b/src/misc.h
@@ -12,7 +12,7 @@
-static inline OamEnt *GetOamCurPtr() {
+static inline OamEnt *GetOamCurPtr(void) {
return (OamEnt *)&g_ram[oam_cur_ptr];
}
@@ -36,35 +36,35 @@
const uint16 *SrcPtr(uint16 src);
uint8 Ancilla_Sfx2_Near(uint8 a);
void Ancilla_Sfx3_Near(uint8 a);
-void LoadDungeonRoomRebuildHUD();
-void Module_Unknown0();
-void Module_Unknown1();
-void Module_MainRouting();
-void NMI_PrepareSprites();
-void Sound_LoadIntroSongBank();
-void LoadOverworldSongs();
-void LoadDungeonSongs();
-void LoadCreditsSongs();
-void Dungeon_LightTorch();
+void LoadDungeonRoomRebuildHUD(void);
+void Module_Unknown0(void);
+void Module_Unknown1(void);
+void Module_MainRouting(void);
+void NMI_PrepareSprites(void);
+void Sound_LoadIntroSongBank(void);
+void LoadOverworldSongs(void);
+void LoadDungeonSongs(void);
+void LoadCreditsSongs(void);
+void Dungeon_LightTorch(void);
void RoomDraw_AdjustTorchLightingChange(uint16 x, uint16 y, uint16 r8);
int Dungeon_PrepOverlayDma_nextPrep(int dst, uint16 r8);
int Dungeon_PrepOverlayDma_watergate(int dst, uint16 r8, uint16 r6, int loops);
-void Module05_LoadFile();
-void Module13_BossVictory_Pendant();
-void BossVictory_Heal();
-void Dungeon_StartVictorySpin();
-void Dungeon_RunVictorySpin();
-void Dungeon_CloseVictorySpin();
-void Module15_MirrorWarpFromAga();
-void Module16_BossVictory_Crystal();
-void Module16_04_FadeAndEnd();
-void TriforceRoom_LinkApproachTriforce();
+void Module05_LoadFile(void);
+void Module13_BossVictory_Pendant(void);
+void BossVictory_Heal(void);
+void Dungeon_StartVictorySpin(void);
+void Dungeon_RunVictorySpin(void);
+void Dungeon_CloseVictorySpin(void);
+void Module15_MirrorWarpFromAga(void);
+void Module16_BossVictory_Crystal(void);
+void Module16_04_FadeAndEnd(void);
+void TriforceRoom_LinkApproachTriforce(void);
void AncillaAdd_ItemReceipt(uint8 ain, uint8 yin, int chest_pos);
void ItemReceipt_GiveBottledItem(uint8 item);
-void Module17_SaveAndQuit();
-void WallMaster_SendPlayerToLastEntrance();
-uint8 GetRandomNumber();
-uint8 Link_CalculateSfxPan();
+void Module17_SaveAndQuit(void);
+void WallMaster_SendPlayerToLastEntrance(void);
+uint8 GetRandomNumber(void);
+uint8 Link_CalculateSfxPan(void);
void SpriteSfx_QueueSfx1WithPan(int k, uint8 a);
void SpriteSfx_QueueSfx2WithPan(int k, uint8 a);
void SpriteSfx_QueueSfx3WithPan(int k, uint8 a);
@@ -71,6 +71,6 @@
uint8 Sprite_CalculateSfxPan(int k);
uint8 CalculateSfxPan(uint16 x);
uint8 CalculateSfxPan_Arbitrary(uint8 a);
-void Init_LoadDefaultTileAttr();
-void Main_ShowTextMessage();
+void Init_LoadDefaultTileAttr(void);
+void Main_ShowTextMessage(void);
uint8 HandleItemTileAction_Overworld(uint16 x, uint16 y);
--- a/src/nmi.c
+++ b/src/nmi.c
@@ -39,11 +39,11 @@
&NMI_UpdatePegTiles,
&NMI_UpdateStarTiles,
};
-void NMI_UploadSubscreenOverlayFormer() {
+void NMI_UploadSubscreenOverlayFormer(void) {
NMI_HandleArbitraryTileMap(&g_ram[0x12000], 0, 0x40);
}
-void NMI_UploadSubscreenOverlayLatter() {
+void NMI_UploadSubscreenOverlayLatter(void) {
NMI_HandleArbitraryTileMap(&g_ram[0x13000], 0x40, 0x80);
}
@@ -64,7 +64,7 @@
dst[i] = (dst[i] & ~0xff) | src[i];
}
-void WritePpuRegisters() {
+void WritePpuRegisters(void) {
zelda_ppu_write(W12SEL, W12SEL_copy);
zelda_ppu_write(W34SEL, W34SEL_copy);
zelda_ppu_write(WOBJSEL, WOBJSEL_copy);
@@ -106,7 +106,7 @@
zelda_ppu_write(BG34NBA, 7);
}
-static void Interrupt_NMI_AudioParts_Locked() {
+static void Interrupt_NMI_AudioParts_Locked(void) {
if (music_control == 0) {
// if (zelda_apu_read(APUI00) == last_music_control)
// zelda_apu_write(APUI00, 0);
@@ -169,7 +169,7 @@
joypad1H_last2 = r1;
}
-void NMI_DoUpdates() { // 8089e0
+void NMI_DoUpdates(void) { // 8089e0
if (!nmi_disable_core_updates) {
memcpy(&g_zenv.vram[0x4100], &kLinkGraphics[dma_source_addr_0 - 0x8000], 0x40);
memcpy(&g_zenv.vram[0x4120], &kLinkGraphics[dma_source_addr_1 - 0x8000], 0x40);
@@ -272,7 +272,7 @@
kNmiSubroutines[idx]();
}
-void NMI_UploadTilemap() { // 808cb0
+void NMI_UploadTilemap(void) { // 808cb0
memcpy(&g_zenv.vram[kNmiVramAddrs[BYTE(nmi_load_target_addr)] << 8], &g_ram[0x1000], 0x800);
*(uint16 *)&g_ram[0x1000] = 0;
@@ -279,15 +279,15 @@
nmi_disable_core_updates = 0;
}
-void NMI_UploadTilemap_doNothing() { // 808ce3
+void NMI_UploadTilemap_doNothing(void) { // 808ce3
}
-void NMI_UploadBG3Text() { // 808ce4
+void NMI_UploadBG3Text(void) { // 808ce4
memcpy(&g_zenv.vram[0x7c00], &g_ram[0x10000], 0x7e0);
nmi_disable_core_updates = 0;
}
-void NMI_UpdateOWScroll() { // 808d13
+void NMI_UpdateOWScroll(void) { // 808d13
uint8 *src = (uint8 *)uvram.data;
int f = WORD(src[0]);
int step = (f & 0x8000) ? 32 : 1;
@@ -302,7 +302,7 @@
nmi_disable_core_updates = 0;
}
-void NMI_UpdateSubscreenOverlay() { // 808d62
+void NMI_UpdateSubscreenOverlay(void) { // 808d62
NMI_HandleArbitraryTileMap(&g_ram[0x12000], 0, 0x80);
}
@@ -315,16 +315,16 @@
nmi_disable_core_updates = 0;
}
-void NMI_UpdateBG1Wall() { // 808e09
+void NMI_UpdateBG1Wall(void) { // 808e09
// Secret Wall Right
CopyToVramVertical(nmi_load_target_addr, &g_ram[0xc880], 0x40);
CopyToVramVertical(nmi_load_target_addr + 0x800, &g_ram[0xc8c0], 0x40);
}
-void NMI_TileMapNothing() { // 808e4b
+void NMI_TileMapNothing(void) { // 808e4b
}
-void NMI_UpdateLoadLightWorldMap() { // 808e54
+void NMI_UpdateLoadLightWorldMap(void) { // 808e54
static const uint16 kLightWorldTileMapDsts[4] = { 0, 0x20, 0x1000, 0x1020 };
const uint8 *src = GetLightOverworldTilemap();
for (int j = 0; j != 4; j++) {
@@ -337,51 +337,51 @@
}
}
-void NMI_UpdateBG2Left() { // 808ea9
+void NMI_UpdateBG2Left(void) { // 808ea9
CopyToVram(0, &g_ram[0x10000], 0x800);
CopyToVram(0x800, &g_ram[0x10800], 0x800);
}
-void NMI_UpdateBGChar3and4() { // 808ee7
+void NMI_UpdateBGChar3and4(void) { // 808ee7
memcpy(&g_zenv.vram[0x2c00], &g_ram[0x10000], 0x1000);
nmi_disable_core_updates = 0;
}
-void NMI_UpdateBGChar5and6() { // 808f16
+void NMI_UpdateBGChar5and6(void) { // 808f16
memcpy(&g_zenv.vram[0x3400], &g_ram[0x11000], 0x1000);
nmi_disable_core_updates = 0;
}
-void NMI_UpdateBGCharHalf() { // 808f45
+void NMI_UpdateBGCharHalf(void) { // 808f45
memcpy(&g_zenv.vram[BYTE(nmi_load_target_addr) * 256], &g_ram[0x11000], 0x400);
}
-void NMI_UpdateBGChar0() { // 808f72
+void NMI_UpdateBGChar0(void) { // 808f72
NMI_RunTileMapUpdateDMA(0x2000);
}
-void NMI_UpdateBGChar1() { // 808f79
+void NMI_UpdateBGChar1(void) { // 808f79
NMI_RunTileMapUpdateDMA(0x2800);
}
-void NMI_UpdateBGChar2() { // 808f80
+void NMI_UpdateBGChar2(void) { // 808f80
NMI_RunTileMapUpdateDMA(0x3000);
}
-void NMI_UpdateBGChar3() { // 808f87
+void NMI_UpdateBGChar3(void) { // 808f87
NMI_RunTileMapUpdateDMA(0x3800);
}
-void NMI_UpdateObjChar0() { // 808f8e
+void NMI_UpdateObjChar0(void) { // 808f8e
CopyToVram(0x4400, &g_ram[0x10000], 0x800);
nmi_disable_core_updates = 0;
}
-void NMI_UpdateObjChar2() { // 808fbd
+void NMI_UpdateObjChar2(void) { // 808fbd
NMI_RunTileMapUpdateDMA(0x5000);
}
-void NMI_UpdateObjChar3() { // 808fc4
+void NMI_UpdateObjChar3(void) { // 808fc4
NMI_RunTileMapUpdateDMA(0x5800);
}
@@ -390,7 +390,7 @@
nmi_disable_core_updates = 0;
}
-void NMI_UploadDarkWorldMap() { // 808ff3
+void NMI_UploadDarkWorldMap(void) { // 808ff3
const uint8 *src = g_ram + 0x1000;
int t = 0x810;
for (int i = 0x20; i; i--) {
@@ -400,16 +400,16 @@
}
}
-void NMI_UploadGameOverText() { // 809038
+void NMI_UploadGameOverText(void) { // 809038
CopyToVram(0x7800, &g_ram[0x2000], 0x800);
CopyToVram(0x7d00, &g_ram[0x3400], 0x600);
}
-void NMI_UpdatePegTiles() { // 80908b
+void NMI_UpdatePegTiles(void) { // 80908b
CopyToVram(0x3d00, &g_ram[0x10000], 0x100);
}
-void NMI_UpdateStarTiles() { // 8090b7
+void NMI_UpdateStarTiles(void) { // 8090b7
CopyToVram(0x3ed0, &g_ram[0x10000], 0x40);
}
@@ -452,7 +452,7 @@
}
}
-void NMI_UpdateIRQGFX() { // 809347
+void NMI_UpdateIRQGFX(void) { // 809347
if (nmi_flag_update_polyhedral) {
memcpy(&g_zenv.vram[0x5800], &g_ram[0xe800], 0x800);
nmi_flag_update_polyhedral = 0;
--- a/src/nmi.h
+++ b/src/nmi.h
@@ -1,35 +1,35 @@
#pragma once
#include "types.h"
-void NMI_UploadSubscreenOverlayFormer();
-void NMI_UploadSubscreenOverlayLatter();
+void NMI_UploadSubscreenOverlayFormer(void);
+void NMI_UploadSubscreenOverlayLatter(void);
void Interrupt_NMI(uint16 joypad_input);
void NMI_ReadJoypads(uint16 joypad_input);
-void NMI_DoUpdates();
-void NMI_UploadTilemap();
-void NMI_UploadTilemap_doNothing();
-void NMI_UploadBG3Text();
-void NMI_UpdateOWScroll();
-void NMI_UpdateSubscreenOverlay();
+void NMI_DoUpdates(void);
+void NMI_UploadTilemap(void);
+void NMI_UploadTilemap_doNothing(void);
+void NMI_UploadBG3Text(void);
+void NMI_UpdateOWScroll(void);
+void NMI_UpdateSubscreenOverlay(void);
void NMI_HandleArbitraryTileMap(const uint8 *src, int i, int i_end);
-void NMI_UpdateBG1Wall();
-void NMI_TileMapNothing();
-void NMI_UpdateLoadLightWorldMap();
-void NMI_UpdateBG2Left();
-void NMI_UpdateBGChar3and4();
-void NMI_UpdateBGChar5and6();
-void NMI_UpdateBGCharHalf();
-void NMI_UpdateBGChar0();
-void NMI_UpdateBGChar1();
-void NMI_UpdateBGChar2();
-void NMI_UpdateBGChar3();
-void NMI_UpdateObjChar0();
-void NMI_UpdateObjChar2();
-void NMI_UpdateObjChar3();
+void NMI_UpdateBG1Wall(void);
+void NMI_TileMapNothing(void);
+void NMI_UpdateLoadLightWorldMap(void);
+void NMI_UpdateBG2Left(void);
+void NMI_UpdateBGChar3and4(void);
+void NMI_UpdateBGChar5and6(void);
+void NMI_UpdateBGCharHalf(void);
+void NMI_UpdateBGChar0(void);
+void NMI_UpdateBGChar1(void);
+void NMI_UpdateBGChar2(void);
+void NMI_UpdateBGChar3(void);
+void NMI_UpdateObjChar0(void);
+void NMI_UpdateObjChar2(void);
+void NMI_UpdateObjChar3(void);
void NMI_RunTileMapUpdateDMA(int dst);
-void NMI_UploadDarkWorldMap();
-void NMI_UploadGameOverText();
-void NMI_UpdatePegTiles();
-void NMI_UpdateStarTiles();
+void NMI_UploadDarkWorldMap(void);
+void NMI_UploadGameOverText(void);
+void NMI_UpdatePegTiles(void);
+void NMI_UpdateStarTiles(void);
void HandleStripes14(const uint8 *p);
-void NMI_UpdateIRQGFX();
+void NMI_UpdateIRQGFX(void);
--- a/src/overlord.h
+++ b/src/overlord.h
@@ -4,9 +4,9 @@
void Overlord_StalfosFactory(int k);
void Overlord_SetX(int k, uint16 v);
void Overlord_SetY(int k, uint16 v);
-void Overlord_SpawnBoulder();
-void Overlord_Main();
-void Overlord_ExecuteAll();
+void Overlord_SpawnBoulder(void);
+void Overlord_Main(void);
+void Overlord_ExecuteAll(void);
void Overlord_ExecuteSingle(int k);
void Overlord19_ArmosCoordinator_bounce(int k);
void Overlord18_InvisibleStalfos(int k);
@@ -31,5 +31,5 @@
void Overlord_CheckIfActive(int k);
void ArmosCoordinator_RotateKnights(int k);
void ArmosCoordinator_Rotate(int k);
-bool ArmosCoordinator_CheckKnights();
+bool ArmosCoordinator_CheckKnights(void);
void ArmosCoordinator_DisableCoercion(int k);
--- a/src/overworld.h
+++ b/src/overworld.h
@@ -2,119 +2,119 @@
#include "zelda_rtl.h"
#include "variables.h"
-const uint8 *GetMap8toTileAttr();
-const uint16 *GetMap16toMap8Table();
+const uint8 *GetMap8toTileAttr(void);
+const uint16 *GetMap16toMap8Table(void);
bool LookupInOwEntranceTab(uint16 r0, uint16 r2);
int LookupInOwEntranceTab2(uint16 pos);
bool CanEnterWithTagalong(int e);
int DirToEnum(int dir);
-void Overworld_ResetMosaicDown();
-void Overworld_Func1D();
-void Overworld_Func1E();
+void Overworld_ResetMosaicDown(void);
+void Overworld_Func1D(void);
+void Overworld_Func1E(void);
uint16 Overworld_GetSignText(int area);
const uint8 *GetOverworldSpritePtr(int area);
uint8 GetOverworldBgPalette(int idx);
-void Sprite_LoadGraphicsProperties();
-void Sprite_LoadGraphicsProperties_light_world_only();
-void InitializeMirrorHDMA();
-void MirrorWarp_BuildWavingHDMATable();
-void MirrorWarp_BuildDewavingHDMATable();
-void TakeDamageFromPit();
-void Module08_OverworldLoad();
-void PreOverworld_LoadProperties();
-void AdjustLinkBunnyStatus();
-void ForceNonbunnyStatus();
-void RecoverPositionAfterDrowning();
-void Module0F_SpotlightClose();
-void Dungeon_PrepExitWithSpotlight();
-void Spotlight_ConfigureTableAndControl();
-void OpenSpotlight_Next2();
-void Module10_SpotlightOpen();
-void Module10_00_OpenIris();
-void SetTargetOverworldWarpToPyramid();
-void ResetAncillaAndCutscene();
-void Module09_Overworld();
-void OverworldOverlay_HandleRain();
-void Module09_00_PlayerControl();
-void OverworldHandleTransitions();
-void Overworld_LoadGFXAndScreenSize();
-void ScrollAndCheckForSOWExit();
-void Module09_LoadAuxGFX();
-void Overworld_FinishTransGfx();
-void Module09_LoadNewMapAndGFX();
-void Overworld_RunScrollTransition();
-void Module09_LoadNewSprites();
-void Overworld_StartScrollTransition();
-void Overworld_EaseOffScrollTransition();
-void Module09_0A_WalkFromExiting_FacingDown();
-void Module09_0B_WalkFromExiting_FacingUp();
-void Module09_09_OpenBigDoorFromExiting();
-void Overworld_DoMapUpdate32x32_B();
-void Module09_0C_OpenBigDoor();
-void Overworld_DoMapUpdate32x32_conditional();
-void Overworld_DoMapUpdate32x32();
-void Overworld_StartMosaicTransition();
-void Overworld_LoadOverlays();
-void PreOverworld_LoadOverlays();
-void Overworld_LoadOverlays2();
-void Module09_FadeBackInFromMosaic();
-void Overworld_Func1C();
-void OverworldMosaicTransition_LoadSpriteGraphicsAndSetMosaic();
-void Overworld_Func22();
-void Overworld_Func18();
-void Overworld_Func19();
-void Module09_MirrorWarp();
-void MirrorWarp_FinalizeAndLoadDestination();
-void Overworld_DrawScreenAtCurrentMirrorPosition();
-void MirrorWarp_LoadSpritesAndColors();
-void Overworld_Func2B();
-void Overworld_WeathervaneExplosion();
-void Module09_2E_Whirlpool();
-void Overworld_Func2F();
-void Module09_2A_RecoverFromDrowning();
-void Module09_2A_00_ScrollToLand();
-void Overworld_OperateCameraScroll();
+void Sprite_LoadGraphicsProperties(void);
+void Sprite_LoadGraphicsProperties_light_world_only(void);
+void InitializeMirrorHDMA(void);
+void MirrorWarp_BuildWavingHDMATable(void);
+void MirrorWarp_BuildDewavingHDMATable(void);
+void TakeDamageFromPit(void);
+void Module08_OverworldLoad(void);
+void PreOverworld_LoadProperties(void);
+void AdjustLinkBunnyStatus(void);
+void ForceNonbunnyStatus(void);
+void RecoverPositionAfterDrowning(void);
+void Module0F_SpotlightClose(void);
+void Dungeon_PrepExitWithSpotlight(void);
+void Spotlight_ConfigureTableAndControl(void);
+void OpenSpotlight_Next2(void);
+void Module10_SpotlightOpen(void);
+void Module10_00_OpenIris(void);
+void SetTargetOverworldWarpToPyramid(void);
+void ResetAncillaAndCutscene(void);
+void Module09_Overworld(void);
+void OverworldOverlay_HandleRain(void);
+void Module09_00_PlayerControl(void);
+void OverworldHandleTransitions(void);
+void Overworld_LoadGFXAndScreenSize(void);
+void ScrollAndCheckForSOWExit(void);
+void Module09_LoadAuxGFX(void);
+void Overworld_FinishTransGfx(void);
+void Module09_LoadNewMapAndGFX(void);
+void Overworld_RunScrollTransition(void);
+void Module09_LoadNewSprites(void);
+void Overworld_StartScrollTransition(void);
+void Overworld_EaseOffScrollTransition(void);
+void Module09_0A_WalkFromExiting_FacingDown(void);
+void Module09_0B_WalkFromExiting_FacingUp(void);
+void Module09_09_OpenBigDoorFromExiting(void);
+void Overworld_DoMapUpdate32x32_B(void);
+void Module09_0C_OpenBigDoor(void);
+void Overworld_DoMapUpdate32x32_conditional(void);
+void Overworld_DoMapUpdate32x32(void);
+void Overworld_StartMosaicTransition(void);
+void Overworld_LoadOverlays(void);
+void PreOverworld_LoadOverlays(void);
+void Overworld_LoadOverlays2(void);
+void Module09_FadeBackInFromMosaic(void);
+void Overworld_Func1C(void);
+void OverworldMosaicTransition_LoadSpriteGraphicsAndSetMosaic(void);
+void Overworld_Func22(void);
+void Overworld_Func18(void);
+void Overworld_Func19(void);
+void Module09_MirrorWarp(void);
+void MirrorWarp_FinalizeAndLoadDestination(void);
+void Overworld_DrawScreenAtCurrentMirrorPosition(void);
+void MirrorWarp_LoadSpritesAndColors(void);
+void Overworld_Func2B(void);
+void Overworld_WeathervaneExplosion(void);
+void Module09_2E_Whirlpool(void);
+void Overworld_Func2F(void);
+void Module09_2A_RecoverFromDrowning(void);
+void Module09_2A_00_ScrollToLand(void);
+void Overworld_OperateCameraScroll(void);
int OverworldCameraBoundaryCheck(int xa, int ya, int vd, int r8);
-int OverworldScrollTransition();
+int OverworldScrollTransition(void);
void Overworld_SetCameraBoundaries(int big, int area);
-void Overworld_FinalizeEntryOntoScreen();
-void Overworld_Func1F();
-void ConditionalMosaicControl();
-void Overworld_ResetMosaic_alwaysIncrease();
-void Overworld_SetSongList();
-void LoadOverworldFromDungeon();
-void Overworld_LoadNewScreenProperties();
-void LoadCachedEntranceProperties();
-void Overworld_EnterSpecialArea();
-void LoadOverworldFromSpecialOverworld();
-void FluteMenu_LoadTransport();
+void Overworld_FinalizeEntryOntoScreen(void);
+void Overworld_Func1F(void);
+void ConditionalMosaicControl(void);
+void Overworld_ResetMosaic_alwaysIncrease(void);
+void Overworld_SetSongList(void);
+void LoadOverworldFromDungeon(void);
+void Overworld_LoadNewScreenProperties(void);
+void LoadCachedEntranceProperties(void);
+void Overworld_EnterSpecialArea(void);
+void LoadOverworldFromSpecialOverworld(void);
+void FluteMenu_LoadTransport(void);
void Overworld_LoadBirdTravelPos(int k);
-void FluteMenu_LoadSelectedScreenPalettes();
-void FindPartnerWhirlpoolExit();
+void FluteMenu_LoadSelectedScreenPalettes(void);
+void FindPartnerWhirlpoolExit(void);
void Overworld_LoadAmbientOverlay(bool load_map_data);
-void Overworld_LoadAmbientOverlayFalse();
-void Overworld_LoadAndBuildScreen();
-void Module08_02_LoadAndAdvance();
-void Overworld_DrawQuadrantsAndOverlays();
-void Overworld_HandleOverlaysAndBombDoors();
+void Overworld_LoadAmbientOverlayFalse(void);
+void Overworld_LoadAndBuildScreen(void);
+void Module08_02_LoadAndAdvance(void);
+void Overworld_DrawQuadrantsAndOverlays(void);
+void Overworld_HandleOverlaysAndBombDoors(void);
void TriggerAndFinishMapLoadStripe_Y(int n);
void TriggerAndFinishMapLoadStripe_X(int n);
-void SomeTileMapChange();
-void CreateInitialNewScreenMapToScroll();
-void CreateInitialOWScreenView_Big_North();
-void CreateInitialOWScreenView_Big_South();
-void CreateInitialOWScreenView_Big_West();
-void CreateInitialOWScreenView_Big_East();
-void CreateInitialOWScreenView_Small_North();
-void CreateInitialOWScreenView_Small_South();
-void CreateInitialOWScreenView_Small_West();
-void CreateInitialOWScreenView_Small_East();
-void OverworldTransitionScrollAndLoadMap();
+void SomeTileMapChange(void);
+void CreateInitialNewScreenMapToScroll(void);
+void CreateInitialOWScreenView_Big_North(void);
+void CreateInitialOWScreenView_Big_South(void);
+void CreateInitialOWScreenView_Big_West(void);
+void CreateInitialOWScreenView_Big_East(void);
+void CreateInitialOWScreenView_Small_North(void);
+void CreateInitialOWScreenView_Small_South(void);
+void CreateInitialOWScreenView_Small_West(void);
+void CreateInitialOWScreenView_Small_East(void);
+void OverworldTransitionScrollAndLoadMap(void);
uint16 *BuildFullStripeDuringTransition_North(uint16 *dst);
uint16 *BuildFullStripeDuringTransition_South(uint16 *dst);
uint16 *BuildFullStripeDuringTransition_West(uint16 *dst);
uint16 *BuildFullStripeDuringTransition_East(uint16 *dst);
-void OverworldHandleMapScroll();
+void OverworldHandleMapScroll(void);
uint16 *CheckForNewlyLoadedMapAreas_North(uint16 *dst);
uint16 *CheckForNewlyLoadedMapAreas_South(uint16 *dst);
uint16 *CheckForNewlyLoadedMapAreas_West(uint16 *dst);
@@ -121,31 +121,31 @@
uint16 *CheckForNewlyLoadedMapAreas_East(uint16 *dst);
uint16 *BufferAndBuildMap16Stripes_X(uint16 *dst);
uint16 *BufferAndBuildMap16Stripes_Y(uint16 *dst);
-void Overworld_DecompressAndDrawAllQuadrants();
+void Overworld_DecompressAndDrawAllQuadrants(void);
void Overworld_DecompressAndDrawOneQuadrant(uint16 *dst, int screen);
void Overworld_ParseMap32Definition(uint16 *dst, uint16 input);
-void OverworldLoad_LoadSubOverlayMap32();
-void LoadOverworldOverlay();
+void OverworldLoad_LoadSubOverlayMap32(void);
+void LoadOverworldOverlay(void);
void Map16ToMap8(const uint8 *src, int r20);
void OverworldCopyMap16ToBuffer(const uint8 *src, uint16 r20, int r14, uint16 *r10);
-void MirrorBonk_RecoverChangedTiles();
-void DecompressEnemyDamageSubclasses();
+void MirrorBonk_RecoverChangedTiles(void);
+void DecompressEnemyDamageSubclasses(void);
int Decompress_bank02(uint8 *dst, const uint8 *src);
uint8 Overworld_ReadTileAttribute(uint16 x, uint16 y);
-void Overworld_SetFixedColAndScroll();
+void Overworld_SetFixedColAndScroll(void);
void Overworld_Memorize_Map16_Change(uint16 pos, uint16 value);
void HandlePegPuzzles(uint16 pos);
-void GanonTowerEntrance_Func1();
-void Overworld_CheckSpecialSwitchArea();
-const uint16 *Overworld_GetMap16OfLink_Mult8();
-void Palette_AnimGetMasterSword();
-void Palette_AnimGetMasterSword2();
-void Palette_AnimGetMasterSword3();
-void Overworld_DwDeathMountainPaletteAnimation();
-void Overworld_LoadEventOverlay();
-void Ancilla_TerminateWaterfallSplashes();
-void Overworld_GetPitDestination();
-void Overworld_UseEntrance();
+void GanonTowerEntrance_Func1(void);
+void Overworld_CheckSpecialSwitchArea(void);
+const uint16 *Overworld_GetMap16OfLink_Mult8(void);
+void Palette_AnimGetMasterSword(void);
+void Palette_AnimGetMasterSword2(void);
+void Palette_AnimGetMasterSword3(void);
+void Overworld_DwDeathMountainPaletteAnimation(void);
+void Overworld_LoadEventOverlay(void);
+void Ancilla_TerminateWaterfallSplashes(void);
+void Overworld_GetPitDestination(void);
+void Overworld_UseEntrance(void);
uint16 Overworld_ToolAndTileInteraction(uint16 x, uint16 y);
void Overworld_PickHammerSfx(uint16 a);
uint16 Overworld_GetLinkMap16Coords(Point16U *xy);
@@ -155,21 +155,21 @@
uint8 SmashRockPile_fromLift(uint16 a, uint16 pos, uint16 y, Point16U pt);
void Overworld_BombTiles32x32(uint16 x, uint16 y);
void Overworld_BombTile(int x, int y);
-void Overworld_AlterWeathervane();
-void OpenGargoylesDomain();
-void CreatePyramidHole();
+void Overworld_AlterWeathervane(void);
+void OpenGargoylesDomain(void);
+void CreatePyramidHole(void);
uint16 Overworld_RevealSecret(uint16 pos);
-void AdjustSecretForPowder();
+void AdjustSecretForPowder(void);
void Overworld_DrawMap16_Persist(uint16 pos, uint16 value);
void Overworld_DrawMap16(uint16 pos, uint16 value);
void Overworld_AlterTileHardcore(uint16 pos, uint16 value);
uint16 Overworld_FindMap16VRAMAddress(uint16 addr);
-void Overworld_AnimateEntrance();
-void Overworld_AnimateEntrance_PoD();
-void Overworld_AnimateEntrance_Skull();
-void Overworld_AnimateEntrance_Mire();
-void Overworld_AnimateEntrance_TurtleRock();
-void OverworldEntrance_PlayJingle();
-void OverworldEntrance_DrawManyTR();
-void Overworld_AnimateEntrance_GanonsTower();
-void OverworldEntrance_AdvanceAndBoom();
+void Overworld_AnimateEntrance(void);
+void Overworld_AnimateEntrance_PoD(void);
+void Overworld_AnimateEntrance_Skull(void);
+void Overworld_AnimateEntrance_Mire(void);
+void Overworld_AnimateEntrance_TurtleRock(void);
+void OverworldEntrance_PlayJingle(void);
+void OverworldEntrance_DrawManyTR(void);
+void Overworld_AnimateEntrance_GanonsTower(void);
+void OverworldEntrance_AdvanceAndBoom(void);
--- a/src/player.h
+++ b/src/player.h
@@ -38,198 +38,198 @@
-void Dungeon_HandleLayerChange();
-void CacheCameraProperties();
-void CheckAbilityToSwim();
-void Link_Main();
-void Link_ControlHandler();
-void LinkState_Default();
-void HandleLink_From1D();
-void PlayerHandler_00_Ground_3();
-bool Link_HandleBunnyTransformation();
-void LinkState_TemporaryBunny();
-void PlayerHandler_17_Bunny();
-void LinkState_Bunny_recache();
-void Link_TempBunny_Func2();
-void LinkState_HoldingBigRock();
-void EtherTablet_StartCutscene();
-void LinkState_ReceivingEther();
-void BombosTablet_StartCutscene();
-void LinkState_ReceivingBombos();
-void LinkState_ReadingDesertTablet();
-void HandleSomariaAndGraves();
-void LinkState_Recoil();
+void Dungeon_HandleLayerChange(void);
+void CacheCameraProperties(void);
+void CheckAbilityToSwim(void);
+void Link_Main(void);
+void Link_ControlHandler(void);
+void LinkState_Default(void);
+void HandleLink_From1D(void);
+void PlayerHandler_00_Ground_3(void);
+bool Link_HandleBunnyTransformation(void);
+void LinkState_TemporaryBunny(void);
+void PlayerHandler_17_Bunny(void);
+void LinkState_Bunny_recache(void);
+void Link_TempBunny_Func2(void);
+void LinkState_HoldingBigRock(void);
+void EtherTablet_StartCutscene(void);
+void LinkState_ReceivingEther(void);
+void BombosTablet_StartCutscene(void);
+void LinkState_ReceivingBombos(void);
+void LinkState_ReadingDesertTablet(void);
+void HandleSomariaAndGraves(void);
+void LinkState_Recoil(void);
void Link_HandleRecoilAndTimer(bool jump_into_middle);
-void LinkState_OnIce();
-void Link_HandleChangeInZVelocity();
+void LinkState_OnIce(void);
+void Link_HandleChangeInZVelocity(void);
void Player_ChangeZ(uint8 zd);
-void LinkHop_HoppingSouthOW();
-void LinkState_HandlingJump();
-void LinkHop_FindTileToLandOnSouth();
-void LinkState_HoppingHorizontallyOW();
-void Link_HoppingHorizontally_FindTile_Y();
-void Link_SetToDeepWater();
-void LinkState_0F();
+void LinkHop_HoppingSouthOW(void);
+void LinkState_HandlingJump(void);
+void LinkHop_FindTileToLandOnSouth(void);
+void LinkState_HoppingHorizontallyOW(void);
+void Link_HoppingHorizontally_FindTile_Y(void);
+void Link_SetToDeepWater(void);
+void LinkState_0F(void);
uint8 Link_HoppingHorizontally_FindTile_X(uint8 o);
-void LinkState_HoppingDiagonallyUpOW();
-void LinkState_HoppingDiagonallyDownOW();
-void LinkHop_FindLandingSpotDiagonallyDown();
-void Link_SplashUponLanding();
-void LinkState_Dashing();
-void LinkState_ExitingDash();
-void Link_CancelDash();
-void RepelDash();
-void LinkApplyTileRebound();
-void Sprite_RepelDash();
-void Flag67WithDirections();
-void LinkState_Pits();
-void HandleLayerOfDestination();
-void DungeonPitDoDamage();
-void HandleDungeonLandingFromPit();
-void PlayerHandler_04_Swimming();
-void Link_HandleSwimMovements();
-void Link_FlagMaxAccels();
-void Link_SetIceMaxAccel();
-void Link_SetMomentum();
-void Link_ResetSwimmingState();
-void Link_ResetStateAfterDamagingPit();
-void ResetAllAcceleration();
-void Link_HandleSwimAccels();
-void Link_SetTheMaxAccel();
-void LinkState_Zapped();
-void PlayerHandler_15_HoldItem();
+void LinkState_HoppingDiagonallyUpOW(void);
+void LinkState_HoppingDiagonallyDownOW(void);
+void LinkHop_FindLandingSpotDiagonallyDown(void);
+void Link_SplashUponLanding(void);
+void LinkState_Dashing(void);
+void LinkState_ExitingDash(void);
+void Link_CancelDash(void);
+void RepelDash(void);
+void LinkApplyTileRebound(void);
+void Sprite_RepelDash(void);
+void Flag67WithDirections(void);
+void LinkState_Pits(void);
+void HandleLayerOfDestination(void);
+void DungeonPitDoDamage(void);
+void HandleDungeonLandingFromPit(void);
+void PlayerHandler_04_Swimming(void);
+void Link_HandleSwimMovements(void);
+void Link_FlagMaxAccels(void);
+void Link_SetIceMaxAccel(void);
+void Link_SetMomentum(void);
+void Link_ResetSwimmingState(void);
+void Link_ResetStateAfterDamagingPit(void);
+void ResetAllAcceleration(void);
+void Link_HandleSwimAccels(void);
+void Link_SetTheMaxAccel(void);
+void LinkState_Zapped(void);
+void PlayerHandler_15_HoldItem(void);
void Link_ReceiveItem(uint8 item, int chest_position);
-void Link_TuckIntoBed();
-void LinkState_Sleeping();
-void Link_HandleSwordCooldown();
-void Link_HandleYItem();
-void Link_HandleAPress();
+void Link_TuckIntoBed(void);
+void LinkState_Sleeping(void);
+void Link_HandleSwordCooldown(void);
+void Link_HandleYItem(void);
+void Link_HandleAPress(void);
void Link_APress_PerformBasic(uint8 action_x2);
-void HandleSwordSfxAndBeam();
-void Link_CheckForSwordSwing();
-void HandleSwordControls();
-void Link_ResetSwordAndItemUsage();
-void Player_Sword_SpinAttackJerks_HoldDown();
-void LinkItem_Rod();
-void LinkItem_Hammer();
-void LinkItem_Bow();
-void LinkItem_Boomerang();
-void Link_ResetBoomerangYStuff();
-void LinkItem_Bombs();
-void LinkItem_Bottle();
-void LinkItem_Lamp();
-void LinkItem_Powder();
-void LinkItem_ShovelAndFlute();
-void LinkItem_Shovel();
-void LinkItem_Flute();
-void LinkItem_Book();
-void LinkItem_Ether();
-void LinkState_UsingEther();
-void LinkItem_Bombos();
-void LinkState_UsingBombos();
-void LinkItem_Quake();
-void LinkState_UsingQuake();
-void Link_ActivateSpinAttack();
-void Link_AnimateVictorySpin();
-void LinkState_SpinAttack();
-void LinkItem_Mirror();
-void DoSwordInteractionWithTiles_Mirror();
-void LinkState_CrossingWorlds();
-void Link_PerformDesertPrayer();
-void HandleFollowersAfterMirroring();
-void LinkItem_Hookshot();
-void LinkState_Hookshotting();
-void LinkItem_Cape();
-void Link_ForceUnequipCape();
-void Link_ForceUnequipCape_quietly();
-void HaltLinkWhenUsingItems();
-void Link_HandleCape_passive_LiftCheck();
-void Player_CheckHandleCapeStuff();
-void LinkItem_CaneOfSomaria();
-void LinkItem_CaneOfByrna();
-bool SearchForByrnaSpark();
-void LinkItem_Net();
-bool CheckYButtonPress();
+void HandleSwordSfxAndBeam(void);
+void Link_CheckForSwordSwing(void);
+void HandleSwordControls(void);
+void Link_ResetSwordAndItemUsage(void);
+void Player_Sword_SpinAttackJerks_HoldDown(void);
+void LinkItem_Rod(void);
+void LinkItem_Hammer(void);
+void LinkItem_Bow(void);
+void LinkItem_Boomerang(void);
+void Link_ResetBoomerangYStuff(void);
+void LinkItem_Bombs(void);
+void LinkItem_Bottle(void);
+void LinkItem_Lamp(void);
+void LinkItem_Powder(void);
+void LinkItem_ShovelAndFlute(void);
+void LinkItem_Shovel(void);
+void LinkItem_Flute(void);
+void LinkItem_Book(void);
+void LinkItem_Ether(void);
+void LinkState_UsingEther(void);
+void LinkItem_Bombos(void);
+void LinkState_UsingBombos(void);
+void LinkItem_Quake(void);
+void LinkState_UsingQuake(void);
+void Link_ActivateSpinAttack(void);
+void Link_AnimateVictorySpin(void);
+void LinkState_SpinAttack(void);
+void LinkItem_Mirror(void);
+void DoSwordInteractionWithTiles_Mirror(void);
+void LinkState_CrossingWorlds(void);
+void Link_PerformDesertPrayer(void);
+void HandleFollowersAfterMirroring(void);
+void LinkItem_Hookshot(void);
+void LinkState_Hookshotting(void);
+void LinkItem_Cape(void);
+void Link_ForceUnequipCape(void);
+void Link_ForceUnequipCape_quietly(void);
+void HaltLinkWhenUsingItems(void);
+void Link_HandleCape_passive_LiftCheck(void);
+void Player_CheckHandleCapeStuff(void);
+void LinkItem_CaneOfSomaria(void);
+void LinkItem_CaneOfByrna(void);
+bool SearchForByrnaSpark(void);
+void LinkItem_Net(void);
+bool CheckYButtonPress(void);
bool LinkCheckMagicCost(uint8 x);
void Refund_Magic(uint8 x);
-void Link_ItemReset_FromOverworldThings();
-void Link_PerformThrow();
-void Link_APress_LiftCarryThrow();
-void Link_PerformDash();
-void Link_PerformGrab();
-void Link_APress_PullObject();
-void Link_PerformStatueDrag();
-void Link_APress_StatueDrag();
-void Link_PerformRupeePull();
-void LinkState_TreePull();
-void Link_PerformRead();
-void Link_PerformOpenChest();
-bool Link_CheckNewAPress();
-bool Link_HandleToss();
-void Link_HandleDiagonalCollision();
-void Player_LimitDirections_Inner();
-void Link_HandleCardinalCollision();
-void RunSlopeCollisionChecks_VerticalFirst();
-void RunSlopeCollisionChecks_HorizontalFirst();
-bool CheckIfRoomNeedsDoubleLayerCheck();
-void CreateVelocityFromMovingBackground();
-void StartMovementCollisionChecks_Y();
-void StartMovementCollisionChecks_Y_HandleIndoors();
-void HandlePushingBonkingSnaps_Y();
-void StartMovementCollisionChecks_Y_HandleOutdoors();
-bool RunLedgeHopTimer(); // carry
-void Link_BonkAndSmash();
-void Link_AddInVelocityYFalling();
-void CalculateSnapScratch_Y();
-void ChangeAxisOfPerpendicularDoorMovement_Y();
-void Link_AddInVelocityY();
-void Link_HopInOrOutOfWater_Y();
-void Link_FindValidLandingTile_North();
-void Link_FindValidLandingTile_DiagonalNorth();
-void StartMovementCollisionChecks_X();
-void StartMovementCollisionChecks_X_HandleIndoors();
-void HandlePushingBonkingSnaps_X();
-void StartMovementCollisionChecks_X_HandleOutdoors();
-void SnapOnX();
-void CalculateSnapScratch_X();
-int8 ChangeAxisOfPerpendicularDoorMovement_X();
-void Link_HopInOrOutOfWater_X();
-void Link_HandleDiagonalKickback();
+void Link_ItemReset_FromOverworldThings(void);
+void Link_PerformThrow(void);
+void Link_APress_LiftCarryThrow(void);
+void Link_PerformDash(void);
+void Link_PerformGrab(void);
+void Link_APress_PullObject(void);
+void Link_PerformStatueDrag(void);
+void Link_APress_StatueDrag(void);
+void Link_PerformRupeePull(void);
+void LinkState_TreePull(void);
+void Link_PerformRead(void);
+void Link_PerformOpenChest(void);
+bool Link_CheckNewAPress(void);
+bool Link_HandleToss(void);
+void Link_HandleDiagonalCollision(void);
+void Player_LimitDirections_Inner(void);
+void Link_HandleCardinalCollision(void);
+void RunSlopeCollisionChecks_VerticalFirst(void);
+void RunSlopeCollisionChecks_HorizontalFirst(void);
+bool CheckIfRoomNeedsDoubleLayerCheck(void);
+void CreateVelocityFromMovingBackground(void);
+void StartMovementCollisionChecks_Y(void);
+void StartMovementCollisionChecks_Y_HandleIndoors(void);
+void HandlePushingBonkingSnaps_Y(void);
+void StartMovementCollisionChecks_Y_HandleOutdoors(void);
+bool RunLedgeHopTimer(void); // carry
+void Link_BonkAndSmash(void);
+void Link_AddInVelocityYFalling(void);
+void CalculateSnapScratch_Y(void);
+void ChangeAxisOfPerpendicularDoorMovement_Y(void);
+void Link_AddInVelocityY(void);
+void Link_HopInOrOutOfWater_Y(void);
+void Link_FindValidLandingTile_North(void);
+void Link_FindValidLandingTile_DiagonalNorth(void);
+void StartMovementCollisionChecks_X(void);
+void StartMovementCollisionChecks_X_HandleIndoors(void);
+void HandlePushingBonkingSnaps_X(void);
+void StartMovementCollisionChecks_X_HandleOutdoors(void);
+void SnapOnX(void);
+void CalculateSnapScratch_X(void);
+int8 ChangeAxisOfPerpendicularDoorMovement_X(void);
+void Link_HopInOrOutOfWater_X(void);
+void Link_HandleDiagonalKickback(void);
void TileDetect_MainHandler(uint8 item);
-bool Link_PermissionForSloshSounds();
+bool Link_PermissionForSloshSounds(void);
bool PushBlock_AttemptToPushTheBlock(uint8 what, uint16 x, uint16 y);
-uint8 Link_HandleLiftables();
+uint8 Link_HandleLiftables(void);
void HandleNudging(int8 arg_r0);
void TileBehavior_HandleItemAndExecute(uint16 x, uint16 y);
uint8 PushBlock_GetTargetTileFlag(uint16 x, uint16 y);
-void FlagMovingIntoSlopes_Y();
-void FlagMovingIntoSlopes_X();
-void Link_HandleRecoiling();
-void Player_HandleIncapacitated_Inner2();
-void Link_HandleVelocity();
-void Link_MovePosition();
+void FlagMovingIntoSlopes_Y(void);
+void FlagMovingIntoSlopes_X(void);
+void Link_HandleRecoiling(void);
+void Player_HandleIncapacitated_Inner2(void);
+void Link_HandleVelocity(void);
+void Link_MovePosition(void);
void Link_HandleVelocityAndSandDrag(uint16 x, uint16 y);
-void HandleSwimStrokeAndSubpixels();
+void HandleSwimStrokeAndSubpixels(void);
void Player_SomethingWithVelocity_TiredOrSwim(uint16 xvel, uint16 yvel);
-void Link_HandleMovingFloor();
-void Link_ApplyMovingFloorVelocity();
-void Link_ApplyConveyor();
-void Link_HandleMovingAnimation_FullLongEntry();
-void Link_HandleMovingAnimation_StartWithDash();
-void Link_HandleMovingAnimationSwimming();
-void Link_HandleMovingAnimation_Dash();
-void HandleIndoorCameraAndDoors();
-void HandleDoorTransitions();
-void ApplyLinksMovementToCamera();
+void Link_HandleMovingFloor(void);
+void Link_ApplyMovingFloorVelocity(void);
+void Link_ApplyConveyor(void);
+void Link_HandleMovingAnimation_FullLongEntry(void);
+void Link_HandleMovingAnimation_StartWithDash(void);
+void Link_HandleMovingAnimationSwimming(void);
+void Link_HandleMovingAnimation_Dash(void);
+void HandleIndoorCameraAndDoors(void);
+void HandleDoorTransitions(void);
+void ApplyLinksMovementToCamera(void);
uint8 FindFreeMovingBlockSlot(uint8 x);
bool InitializePushBlock(uint8 r14, uint8 idx);
void Sprite_Dungeon_DrawSinglePushBlock(int j);
-void Link_Initialize();
-void Link_ResetProperties_A();
-void Link_ResetProperties_B();
-void Link_ResetProperties_C();
-bool Link_CheckForEdgeScreenTransition();
-void CacheCameraPropertiesIfOutdoors();
+void Link_Initialize(void);
+void Link_ResetProperties_A(void);
+void Link_ResetProperties_B(void);
+void Link_ResetProperties_C(void);
+bool Link_CheckForEdgeScreenTransition(void);
+void CacheCameraPropertiesIfOutdoors(void);
void SomariaBlock_HandlePlayerInteraction(int k);
void Gravestone_Move(int k);
void Gravestone_ActAsBarrier(int k);
@@ -238,5 +238,5 @@
void AncillaAdd_ShovelDirt(uint8 a, uint8 y);
void AncillaAdd_Hookshot(uint8 a, uint8 y);
void ResetSomeThingsAfterDeath(uint8 a);
-void SpawnHammerWaterSplash();
-void DiggingGameGuy_AttemptPrizeSpawn();
+void SpawnHammerWaterSplash(void);
+void DiggingGameGuy_AttemptPrizeSpawn(void);
--- a/src/player_oam.h
+++ b/src/player_oam.h
@@ -6,9 +6,9 @@
uint8 r12;
} SwordResult;
-bool PlayerOam_WantInvokeSword();
-void CalculateSwordHitBox();
-void LinkOam_Main();
+bool PlayerOam_WantInvokeSword(void);
+void CalculateSwordHitBox(void);
+void LinkOam_Main(void);
uint8 FindMostSignificantBit(uint8 v);
bool LinkOam_SetWeaponVRAMOffsets(int r2, SwordResult *sr);
bool LinkOam_SetEquipmentVRAMOffsets(int r2, SwordResult *sr);
--- a/src/poly.h
+++ b/src/poly.h
@@ -2,18 +2,18 @@
#include "types.h"
uint16 Poly_Divide(uint16 a, uint16 b);
-void Poly_RunFrame();
-void Polyhedral_SetShapePointer();
-void Polyhedral_SetRotationMatrix();
-void Polyhedral_OperateRotation();
-void Polyhedral_RotatePoint();
-void Polyhedral_ProjectPoint();
-void Polyhedral_DrawPolyhedron();
-void Polyhedral_SetForegroundColor();
-int16 Polyhedral_CalculateCrossProduct();
+void Poly_RunFrame(void);
+void Polyhedral_SetShapePointer(void);
+void Polyhedral_SetRotationMatrix(void);
+void Polyhedral_OperateRotation(void);
+void Polyhedral_RotatePoint(void);
+void Polyhedral_ProjectPoint(void);
+void Polyhedral_DrawPolyhedron(void);
+void Polyhedral_SetForegroundColor(void);
+int16 Polyhedral_CalculateCrossProduct(void);
void Polyhedral_SetColorMask(int c);
-void Polyhedral_EmptyBitMapBuffer();
-void Polyhedral_DrawFace();
-void Polyhedral_FillLine();
-bool Polyhedral_SetLeft();
-bool Polyhedral_SetRight();
+void Polyhedral_EmptyBitMapBuffer(void);
+void Polyhedral_DrawFace(void);
+void Polyhedral_FillLine(void);
+bool Polyhedral_SetLeft(void);
+bool Polyhedral_SetRight(void);
--- a/src/select_file.h
+++ b/src/select_file.h
@@ -2,43 +2,43 @@
bool Intro_CheckCksum(const uint8 *s);
-uint16 *SelectFile_Func1();
+uint16 *SelectFile_Func1(void);
void SelectFile_Func5_DrawOams(int k);
void SelectFile_Func6_DrawOams2(int k);
void SelectFile_Func17(int k);
-void SelectFile_Func16();
-void Module_NamePlayer_1();
-void Module_NamePlayer_2();
+void SelectFile_Func16(void);
+void Module_NamePlayer_1(void);
+void Module_NamePlayer_2(void);
void Intro_FixCksum(uint8 *s);
-void LoadFileSelectGraphics();
-void Intro_ValidateSram();
-void Module01_FileSelect();
-void Module_SelectFile_0();
-void FileSelect_ReInitSaveFlagsAndEraseTriforce();
-void FileSelect_EraseTriforce();
-void Module_EraseFile_1();
-void FileSelect_TriggerStripesAndAdvance();
-void FileSelect_TriggerNameStripesAndAdvance();
-void FileSelect_Main();
-void Module02_CopyFile();
-void Module_CopyFile_2();
-void CopyFile_ChooseSelection();
-void CopyFile_ChooseTarget();
-void CopyFile_ConfirmSelection();
-void FilePicker_DeleteHeaderStripe();
-void CopyFile_SelectionAndBlinker();
-void ReturnToFileSelect();
-void CopyFile_TargetSelectionAndBlink();
-void CopyFile_HandleConfirmation();
-void Module03_KILLFile();
-void KILLFile_SetUp();
-void KILLFile_HandleSelection();
-void KILLFile_HandleConfirmation();
-void KILLFile_ChooseTarget();
+void LoadFileSelectGraphics(void);
+void Intro_ValidateSram(void);
+void Module01_FileSelect(void);
+void Module_SelectFile_0(void);
+void FileSelect_ReInitSaveFlagsAndEraseTriforce(void);
+void FileSelect_EraseTriforce(void);
+void Module_EraseFile_1(void);
+void FileSelect_TriggerStripesAndAdvance(void);
+void FileSelect_TriggerNameStripesAndAdvance(void);
+void FileSelect_Main(void);
+void Module02_CopyFile(void);
+void Module_CopyFile_2(void);
+void CopyFile_ChooseSelection(void);
+void CopyFile_ChooseTarget(void);
+void CopyFile_ConfirmSelection(void);
+void FilePicker_DeleteHeaderStripe(void);
+void CopyFile_SelectionAndBlinker(void);
+void ReturnToFileSelect(void);
+void CopyFile_TargetSelectionAndBlink(void);
+void CopyFile_HandleConfirmation(void);
+void Module03_KILLFile(void);
+void KILLFile_SetUp(void);
+void KILLFile_HandleSelection(void);
+void KILLFile_HandleConfirmation(void);
+void KILLFile_ChooseTarget(void);
void FileSelect_DrawFairy(uint8 x, uint8 y);
-void Module04_NameFile();
-void NameFile_EraseSave();
-void NameFile_DoTheNaming();
-void NameFile_CheckForScrollInputX();
-void NameFile_CheckForScrollInputY();
+void Module04_NameFile(void);
+void NameFile_EraseSave(void);
+void NameFile_DoTheNaming(void);
+void NameFile_CheckForScrollInputX(void);
+void NameFile_CheckForScrollInputY(void);
void NameFile_DrawSelectedCharacter(int k, uint16 chr);
--- a/src/spc_player.c
+++ b/src/spc_player.c
@@ -160,7 +160,7 @@
dsp_write(p->dsp, reg, value);
}
-static void Not_Implemented() {
+static void Not_Implemented(void) {
assert(0);
printf("Not Implemented\n");
}
@@ -1185,7 +1185,7 @@
p->timer_cycles = 0;
}
-SpcPlayer *SpcPlayer_Create() {
+SpcPlayer *SpcPlayer_Create(void) {
SpcPlayer *p = (SpcPlayer *)malloc(sizeof(SpcPlayer));
p->dsp = dsp_init(p->ram);
p->reg_write_history = 0;
@@ -1324,7 +1324,7 @@
return true;
}
-void RunAudioPlayer() {
+void RunAudioPlayer(void) {
if(SDL_Init(SDL_INIT_AUDIO) != 0) {
printf("Failed to init SDL: %s\n", SDL_GetError());
return;
@@ -1444,4 +1444,4 @@
}
}
}
-#endif // WITH_SPC_PLAYER_DEBUGGING
\ No newline at end of file
+#endif // WITH_SPC_PLAYER_DEBUGGING
--- a/src/spc_player.h
+++ b/src/spc_player.h
@@ -137,7 +137,7 @@
uint8 ram[65536]; // rest of ram
} SpcPlayer;
-SpcPlayer *SpcPlayer_Create();
+SpcPlayer *SpcPlayer_Create(void);
void SpcPlayer_GenerateSamples(SpcPlayer *p);
void SpcPlayer_Initialize(SpcPlayer *p);
void SpcPlayer_Upload(SpcPlayer *p, const uint8_t *data);
--- a/src/sprite.c
+++ b/src/sprite.c
@@ -565,7 +565,7 @@
return j;
}
-static int AllocOverlord() {
+static int AllocOverlord(void) {
int i = 7;
while (i >= 0 && overlord_type[i] != 0)
i--;
@@ -983,7 +983,7 @@
return rv;
}
-void Sprite_ShowMessageMinimal() { // 85fa8e
+void Sprite_ShowMessageMinimal(void) { // 85fa8e
byte_7E0223 = 0;
messaging_module = 0;
submodule_index = 2;
@@ -991,7 +991,7 @@
main_module_index = 14;
}
-void Prepare_ApplyRumbleToSprites() { // 8680fa
+void Prepare_ApplyRumbleToSprites(void) { // 8680fa
static const int8 kApplyRumble_X[4] = { -32, -32, -32, 16 };
static const int8 kApplyRumble_Y[4] = { -32, 32, -24, -24 };
static const uint8 kApplyRumble_WH[6] = { 0x50, 0x50, 0x20, 0x20, 0x50, 0x50 };
@@ -1107,7 +1107,7 @@
}
}
-void Sprite_Main() { // 868328
+void Sprite_Main(void) { // 868328
if (!player_is_indoors) {
ancilla_floor[0] = 0;
ancilla_floor[1] = 0;
@@ -1149,7 +1149,7 @@
byte_7E0FC6 = load_chr_halfslot_even_odd;
}
-void Oam_ResetRegionBases() { // 8683d3
+void Oam_ResetRegionBases(void) { // 8683d3
memcpy(oam_region_base, kOam_ResetRegionBases, 12);
}
@@ -2817,7 +2817,7 @@
link_z_coord = 0;
}
-void Link_PlaceWeaponTink() { // 86f69f
+void Link_PlaceWeaponTink(void) { // 86f69f
if (repulsespark_timer)
return;
repulsespark_timer = 5;
@@ -3171,7 +3171,7 @@
return sprite_type[k] != 0x7a;
}
-bool Sprite_CheckIfLinkIsBusy() { // 87f4d0
+bool Sprite_CheckIfLinkIsBusy(void) { // 87f4d0
if (link_auxiliary_state | link_pose_for_item | (link_state_bits & 0x80))
return true;
for (int i = 4; i >= 0; i--) {
@@ -3189,7 +3189,7 @@
sprite_z[k] = info->r4_z;
}
-bool Sprite_CheckIfScreenIsClear() { // 89af32
+bool Sprite_CheckIfScreenIsClear(void) { // 89af32
for (int i = 15; i >= 0; i--) {
if (sprite_state[i] && !(sprite_flags4[i] & 0x40)) {
uint16 x = Sprite_GetX(i) - BG2HOFS_copy2;
@@ -3201,7 +3201,7 @@
return Sprite_CheckIfOverlordsClear();
}
-bool Sprite_CheckIfRoomIsClear() { // 89af61
+bool Sprite_CheckIfRoomIsClear(void) { // 89af61
for (int i = 15; i >= 0; i--) {
if (sprite_state[i] && !(sprite_flags4[i] & 0x40))
return false;
@@ -3209,7 +3209,7 @@
return Sprite_CheckIfOverlordsClear();
}
-bool Sprite_CheckIfOverlordsClear() { // 89af76
+bool Sprite_CheckIfOverlordsClear(void) { // 89af76
for (int i = 7; i >= 0; i--) {
if (overlord_type[i] == 0x14 || overlord_type[i] == 0x18)
return false;
@@ -3217,7 +3217,7 @@
return true;
}
-void Sprite_InitializeMirrorPortal() { // 89af89
+void Sprite_InitializeMirrorPortal(void) { // 89af89
for (int k = 15; k >= 0; k--) {
if (sprite_state[k] && sprite_type[k] == 0x6c)
sprite_state[k] = 0;
@@ -3235,7 +3235,7 @@
sprite_ignore_projectile[j] = 1;
}
-void Sprite_InitializeSlots() { // 89afd6
+void Sprite_InitializeSlots(void) { // 89afd6
for (int k = 15; k >= 0; k--) {
uint8 st = sprite_state[k], ty = sprite_type[k];
if (st != 0) {
@@ -3257,7 +3257,7 @@
}
}
-void Garnish_ExecuteUpperSlots() { // 89b08c
+void Garnish_ExecuteUpperSlots(void) { // 89b08c
HandleScreenFlash();
if (garnish_active) {
@@ -3266,7 +3266,7 @@
}
}
-void Garnish_ExecuteLowerSlots() { // 89b097
+void Garnish_ExecuteLowerSlots(void) { // 89b097
if (garnish_active) {
for (int i = 14; i >= 0; i--)
Garnish_ExecuteSingle(i);
@@ -3538,7 +3538,7 @@
sprite_oam_flags[j] | sprite_obj_prio[j], 2);
}
-void Dungeon_ResetSprites() { // 89c114
+void Dungeon_ResetSprites(void) { // 89c114
Dungeon_CacheTransSprites();
link_picking_throw_state = 0;
link_state_bits = 0;
@@ -3557,7 +3557,7 @@
Dungeon_LoadSprites();
}
-void Dungeon_CacheTransSprites() { // 89c176
+void Dungeon_CacheTransSprites(void) { // 89c176
if (!player_is_indoors)
return;
alt_sprites_flag = player_is_indoors;
@@ -3592,7 +3592,7 @@
}
}
-void Sprite_DisableAll() { // 89c22f
+void Sprite_DisableAll(void) { // 89c22f
for (int k = 15; k >= 0; k--) {
if (sprite_state[k] && (player_is_indoors || sprite_type[k] != 0x6c))
sprite_state[k] = 0;
@@ -3620,7 +3620,7 @@
garnish_type[k] = 0;
}
-void Dungeon_LoadSprites() { // 89c290
+void Dungeon_LoadSprites(void) { // 89c290
const uint8 *src = kDungeonSprites + kDungeonSpriteOffs[dungeon_room_index2];
byte_7E0FB1 = dungeon_room_index2 >> 3 & 0xfe;
byte_7E0FB0 = (dungeon_room_index2 & 0xf) << 1;
@@ -3687,12 +3687,12 @@
}
}
-void Sprite_ResetAll() { // 89c44e
+void Sprite_ResetAll(void) { // 89c44e
Sprite_DisableAll();
Sprite_ResetAll_noDisable();
}
-void Sprite_ResetAll_noDisable() { // 89c452
+void Sprite_ResetAll_noDisable(void) { // 89c452
byte_7E0FDD = 0;
sprite_alert_flag = 0;
byte_7E0FFD = 0;
@@ -3707,18 +3707,18 @@
memset(dungeon_room_history, 0xff, 8);
}
-void Sprite_ReloadAll_Overworld() { // 89c499
+void Sprite_ReloadAll_Overworld(void) { // 89c499
Sprite_DisableAll();
Sprite_OverworldReloadAll_justLoad();
}
-void Sprite_OverworldReloadAll_justLoad() { // 89c49d
+void Sprite_OverworldReloadAll_justLoad(void) { // 89c49d
Sprite_ResetAll_noDisable();
Overworld_LoadSprites();
Sprite_ActivateAllProxima();
}
-void Overworld_LoadSprites() { // 89c4ac
+void Overworld_LoadSprites(void) { // 89c4ac
sprcoll_x_base = (overworld_area_index & 7) << 9;
sprcoll_y_base = ((overworld_area_index & 0x3f) >> 2 & 0xe) << 8;
sprcoll_x_size = sprcoll_y_size = kOverworldAreaSprcollSizes[BYTE(overworld_area_index)] << 8;
@@ -3737,7 +3737,7 @@
}
}
-void Sprite_ActivateAllProxima() { // 89c55e
+void Sprite_ActivateAllProxima(void) { // 89c55e
uint16 bak0 = BG2HOFS_copy2;
uint8 bak1 = byte_7E069E[1];
byte_7E069E[1] = 0xff;
@@ -3752,7 +3752,7 @@
BG2HOFS_copy2 = bak0;
}
-void Sprite_ProximityActivation() { // 89c58f
+void Sprite_ProximityActivation(void) { // 89c58f
if (submodule_index != 0) {
Sprite_ActivateWhenProximal();
Sprite_ActivateWhenProximalBig();
@@ -3765,7 +3765,7 @@
}
}
-void Sprite_ActivateWhenProximal() { // 89c5bb
+void Sprite_ActivateWhenProximal(void) { // 89c5bb
if (byte_7E069E[1]) {
int xt = (enhanced_features0 & kFeatures0_ExtendScreen64) ? 0x40 : 0;
uint16 x = BG2HOFS_copy2 + (sign8(byte_7E069E[1]) ? -0x10 - xt : 0x110 + xt);
@@ -3775,7 +3775,7 @@
}
}
-void Sprite_ActivateWhenProximalBig() { // 89c5fa
+void Sprite_ActivateWhenProximalBig(void) { // 89c5fa
if (byte_7E069E[0]) {
int xt = (enhanced_features0 & kFeatures0_ExtendScreen64) ? 0x40 : 0;
uint16 x = BG2HOFS_copy2 - 0x30 - xt;
@@ -3865,7 +3865,7 @@
}
}
-void Sprite_KillFriends() { // 89ef56
+void Sprite_KillFriends(void) { // 89ef56
for(int j = 15; j >= 0; j--) {
if (j != cur_object_index && sprite_state[j] && !(sprite_defl_bits[j] & 2) && sprite_type[j] != 0x7a) {
sprite_state[j] = 6;
@@ -4067,7 +4067,7 @@
return oam_cur_ptr;
}
-void Sprite_NullifyHookshotDrag() { // 8ff540
+void Sprite_NullifyHookshotDrag(void) { // 8ff540
for (int i = 4; i >= 0; i--) {
if (!(ancilla_type[i] & 0x1f) && related_to_hookshot) {
related_to_hookshot = 0;
@@ -4081,7 +4081,7 @@
HandleIndoorCameraAndDoors();
}
-void Overworld_SubstituteAlternateSecret() { // 9afbdb
+void Overworld_SubstituteAlternateSecret(void) { // 9afbdb
static const uint8 kSecretSubst_Tab0[64] = {
0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0,
4, 4, 6, 4, 4, 6, 0, 0, 15, 15, 4, 5, 5, 4, 6, 6,
@@ -4127,7 +4127,7 @@
return 0;
}
-void ExecuteCachedSprites() { // 9de9da
+void ExecuteCachedSprites(void) { // 9de9da
if (!player_is_indoors || submodule_index == 0 || submodule_index == 14 || alt_sprites_flag == 0) {
alt_sprites_flag = 0;
return;
@@ -4293,13 +4293,13 @@
sprite_flags4[k] = bak;
}
-void Sprite_HaltAllMovement() { // 9ef508
+void Sprite_HaltAllMovement(void) { // 9ef508
Sprite_NullifyHookshotDrag();
link_speed_setting = 0;
Link_CancelDash();
}
-int ReleaseFairy() { // 9efe33
+int ReleaseFairy(void) { // 9efe33
SpriteSpawnInfo info;
int j = Sprite_SpawnDynamically(0, 0xe3, &info);
if (j >= 0) {
--- a/src/sprite.h
+++ b/src/sprite.h
@@ -107,14 +107,14 @@
int Sprite_ShowMessageOnContact(int k, uint16 msg);
void Sprite_ShowMessageUnconditional(uint16 msg);
bool Sprite_TutorialGuard_ShowMessageOnContact(int k, uint16 msg);
-void Sprite_ShowMessageMinimal();
-void Prepare_ApplyRumbleToSprites();
+void Sprite_ShowMessageMinimal(void);
+void Prepare_ApplyRumbleToSprites(void);
void Sprite_SpawnImmediatelySmashedTerrain(uint8 what, uint16 x, uint16 y);
void Sprite_SpawnThrowableTerrain(uint8 what, uint16 x, uint16 y);
int Sprite_SpawnThrowableTerrain_silently(uint8 what, uint16 x, uint16 y);
void Sprite_SpawnSecret(int k);
-void Sprite_Main();
-void Oam_ResetRegionBases();
+void Sprite_Main(void);
+void Oam_ResetRegionBases(void);
void Sprite_TimersAndOam(int k);
void Sprite_Get16BitCoords(int k);
void Sprite_ExecuteSingle(int k);
@@ -207,7 +207,7 @@
void Link_UpdateHitBoxWithSword(SpriteHitBox *hb);
void Sprite_DoHitBoxesFast(int k, SpriteHitBox *hb);
void Sprite_ApplyRecoilToLink(int k, uint8 vel);
-void Link_PlaceWeaponTink();
+void Link_PlaceWeaponTink(void);
void Sprite_PlaceWeaponTink(int k);
void Sprite_PlaceRupulseSpark_2(int k);
void Link_SetupHitBox_conditional(SpriteHitBox *hb);
@@ -226,15 +226,15 @@
void SpriteDraw_FallingHumanoid(int k);
void Sprite_CorrectOamEntries(int k, int n, uint8 islarge);
bool Sprite_ReturnIfRecoiling(int k);
-bool Sprite_CheckIfLinkIsBusy();
+bool Sprite_CheckIfLinkIsBusy(void);
void Sprite_SetSpawnedCoordinates(int k, SpriteSpawnInfo *info);
-bool Sprite_CheckIfScreenIsClear();
-bool Sprite_CheckIfRoomIsClear();
-bool Sprite_CheckIfOverlordsClear();
-void Sprite_InitializeMirrorPortal();
-void Sprite_InitializeSlots();
-void Garnish_ExecuteUpperSlots();
-void Garnish_ExecuteLowerSlots();
+bool Sprite_CheckIfScreenIsClear(void);
+bool Sprite_CheckIfRoomIsClear(void);
+bool Sprite_CheckIfOverlordsClear(void);
+void Sprite_InitializeMirrorPortal(void);
+void Sprite_InitializeSlots(void);
+void Garnish_ExecuteUpperSlots(void);
+void Garnish_ExecuteLowerSlots(void);
void Garnish_ExecuteSingle(int k);
void Garnish15_ArrghusSplash(int k);
void Garnish13_PyramidDebris(int k);
@@ -258,26 +258,26 @@
void Garnish03_FallingTile(int k);
void Garnish01_FireSnakeTail(int k);
void Garnish02_MothulaBeamTrail(int k);
-void Dungeon_ResetSprites();
-void Dungeon_CacheTransSprites();
-void Sprite_DisableAll();
-void Dungeon_LoadSprites();
+void Dungeon_ResetSprites(void);
+void Dungeon_CacheTransSprites(void);
+void Sprite_DisableAll(void);
+void Dungeon_LoadSprites(void);
void Sprite_ManuallySetDeathFlagUW(int k);
int Dungeon_LoadSingleSprite(int k, const uint8 *src);
void Dungeon_LoadSingleOverlord(const uint8 *src);
-void Sprite_ResetAll();
-void Sprite_ResetAll_noDisable();
-void Sprite_ReloadAll_Overworld();
-void Sprite_OverworldReloadAll_justLoad();
-void Overworld_LoadSprites();
-void Sprite_ActivateAllProxima();
-void Sprite_ProximityActivation();
-void Sprite_ActivateWhenProximal();
-void Sprite_ActivateWhenProximalBig();
+void Sprite_ResetAll(void);
+void Sprite_ResetAll_noDisable(void);
+void Sprite_ReloadAll_Overworld(void);
+void Sprite_OverworldReloadAll_justLoad(void);
+void Overworld_LoadSprites(void);
+void Sprite_ActivateAllProxima(void);
+void Sprite_ProximityActivation(void);
+void Sprite_ActivateWhenProximal(void);
+void Sprite_ActivateWhenProximalBig(void);
void Sprite_Overworld_ProximityMotivatedLoad(uint16 x, uint16 y);
void Overworld_LoadProximaSpriteIfAlive(uint16 blk);
void SpriteExplode_SpawnEA(int k);
-void Sprite_KillFriends();
+void Sprite_KillFriends(void);
void Garnish16_ThrownItemDebris(int k);
void ScatterDebris_Draw(int k, Point16U pt);
void Sprite_KillSelf(int k);
@@ -291,11 +291,11 @@
uint8 Oam_AllocateFromRegionE(uint8 num);
uint8 Oam_AllocateFromRegionF(uint8 num);
uint8 Oam_GetBufferPosition(uint8 num, uint8 y);
-void Sprite_NullifyHookshotDrag();
-void Overworld_SubstituteAlternateSecret();
+void Sprite_NullifyHookshotDrag(void);
+void Overworld_SubstituteAlternateSecret(void);
void Sprite_ApplyConveyor(int k, int j);
uint8 Sprite_BounceFromTileCollision(int k);
-void ExecuteCachedSprites();
+void ExecuteCachedSprites(void);
void UncacheAndExecuteSprite(int k);
uint8 Sprite_ConvertVelocityToAngle(uint8 x, uint8 y);
int Sprite_SpawnDynamically(int k, uint8 what, SpriteSpawnInfo *info);
@@ -304,6 +304,6 @@
void Sprite_GarnishSpawn_Sparkle_limited(int k, uint16 x, uint16 y);
int Sprite_GarnishSpawn_Sparkle(int k, uint16 x, uint16 y);
void Sprite_BehaveAsBarrier(int k);
-void Sprite_HaltAllMovement();
-int ReleaseFairy();
+void Sprite_HaltAllMovement(void);
+int ReleaseFairy(void);
void Sprite_DrawRippleIfInWater(int k);
--- a/src/sprite_main.h
+++ b/src/sprite_main.h
@@ -6,15 +6,15 @@
void GiantMoldorm_DrawSegment_AB(int k, int lookback);
void GiantMoldorm_DrawSegment_C_OrTail(int k, int lookback);
void Chicken_IncrSubtype2(int k, int j);
-bool Octoballoon_Find();
+bool Octoballoon_Find(void);
bool FluteBoy_CheckIfPlayerClose(int k);
void FortuneTeller_LightOrDarkWorld(int k, bool dark_world);
-int GarnishAllocForce();
-int GarnishAlloc();
-int GarnishAllocLow();
+int GarnishAllocForce(void);
+int GarnishAlloc(void);
+int GarnishAllocLow(void);
int GarnishAllocLimit(int k);
-int GarnishAllocOverwriteOldLow();
-int GarnishAllocOverwriteOld();
+int GarnishAllocOverwriteOldLow(void);
+int GarnishAllocOverwriteOld(void);
void Garnish_SetX(int k, uint16 x);
void Garnish_SetY(int k, uint16 y);
void Sprite_WishPond3(int k);
@@ -194,7 +194,7 @@
void RunningMan_Draw(int k);
void Sprite_BottleVendor(int k);
uint8 BottleVendor_Draw(int k);
-void Priest_SpawnRescuedPrincess();
+void Priest_SpawnRescuedPrincess(void);
void Sprite_76_Zelda(int k);
void Zelda_InCell(int k);
void Zelda_EnteringSanctuary(int k);
@@ -232,7 +232,7 @@
void Sprite_RedCauldron(int k);
void PotionCauldron_GoBeep(int k);
void RedPotionItem_Draw(int k);
-bool PotionCauldron_CheckBottles();
+bool PotionCauldron_CheckBottles(void);
void Sprite_MagicShopAssistant_Main(int k);
void Shopkeeper_Draw(int k);
void Sprite_DashItem(int k);
@@ -423,7 +423,7 @@
void Sprite_28_DarkWorldHintNPC(int k);
void DarkWorldHintNPC_Idle(int k);
void DarkWorldHintNPC_RestoreHealth(int k);
-bool DarkWorldHintNPC_HandlePayment();
+bool DarkWorldHintNPC_HandlePayment(void);
void StoryTeller_1_Draw(int k);
void Sprite_2E_FluteKid(int k);
void FluteKid_Human(int k);
@@ -509,8 +509,8 @@
void Buzzblob_SelectNewDirection(int k);
void BuzzBlob_Draw(int k);
void Sprite_02_StalfosHead(int k);
-bool Pipe_ValidateEntry();
-void Ancilla_TerminateSparkleObjects();
+bool Pipe_ValidateEntry(void);
+void Ancilla_TerminateSparkleObjects(void);
int Sprite_SpawnSuperficialBombBlast(int k);
void Sprite_SpawnDummyDeathAnimation(int k);
void Sprite_MagicBat_SpawnLightning(int k);
@@ -559,11 +559,11 @@
void Kholdstare_Draw(int k);
int Sprite_SpawnFireball(int k);
void ArcheryGameGuy_Draw(int k);
-void ShopKeeper_RapidTerminateReceiveItem();
+void ShopKeeper_RapidTerminateReceiveItem(void);
void Sprite_InitializeSecondaryItemMinigame(int what);
void Waterfall(int k);
void Sprite_BatCrash(int k);
-void Sprite_SpawnBatCrashCutscene();
+void Sprite_SpawnBatCrashCutscene(void);
void BatCrash_DrawHardcodedGarbage(int k);
void BatCrash_SpawnDebris(int k);
void RetreatBat_Draw(int k);
@@ -875,7 +875,7 @@
void InitializeSpawnedBee(int k);
int ReleaseBeeFromBottle(int x_value);
void Bee_Main(int k);
-int Sprite_Find_EmptyBottle();
+int Sprite_Find_EmptyBottle(void);
void Bee_HandleInteractions(int k);
void Sprite_B2_PlayerBee(int k);
void GoldBee_SpawnSelf(int k);
@@ -898,7 +898,7 @@
bool Kiki_Draw(int k);
void Sprite_B7_BlindMaiden(int k);
void OldMan_RevertToSprite(int k);
-void OldMan_EnableCutscene();
+void OldMan_EnableCutscene(void);
void Sprite_AD_OldMan(int k);
void Sprite_B8_DialogueTester(int k);
void Sprite_B9_BullyAndPinkBall(int k);
--- a/src/tagalong.h
+++ b/src/tagalong.h
@@ -5,26 +5,26 @@
uint16 y, x, bit, msg, tagalong;
} TagalongMessageInfo;
-bool Tagalong_IsFollowing();
-bool Follower_ValidateMessageFreedom();
-void Follower_MoveTowardsLink();
-bool Follower_CheckBlindTrigger();
-void Follower_Initialize();
+bool Tagalong_IsFollowing(void);
+bool Follower_ValidateMessageFreedom(void);
+void Follower_MoveTowardsLink(void);
+bool Follower_CheckBlindTrigger(void);
+void Follower_Initialize(void);
void Sprite_BecomeFollower(int k);
-void Follower_Main();
-void Follower_NoTimedMessage();
-void Follower_CheckGameMode();
-void Follower_BasicMover();
-void Follower_NotFollowing();
-void Follower_OldMan();
-void Follower_OldManUnused();
-void Follower_DoLayers();
-bool Follower_CheckProximityToLink();
-void Follower_HandleTrigger();
-void Tagalong_Draw();
+void Follower_Main(void);
+void Follower_NoTimedMessage(void);
+void Follower_CheckGameMode(void);
+void Follower_BasicMover(void);
+void Follower_NotFollowing(void);
+void Follower_OldMan(void);
+void Follower_OldManUnused(void);
+void Follower_DoLayers(void);
+bool Follower_CheckProximityToLink(void);
+void Follower_HandleTrigger(void);
+void Tagalong_Draw(void);
void Follower_AnimateMovement_preserved(uint8 ain, uint16 xin, uint16 yin);
bool Follower_CheckForTrigger(const TagalongMessageInfo *info);
-void Follower_Disable();
+void Follower_Disable(void);
void Blind_SpawnFromMaiden(uint16 x, uint16 y);
void Kiki_RevertToSprite(int k);
int Kiki_SpawnHandlerMonke(int k);
--- a/src/tile_detect.h
+++ b/src/tile_detect.h
@@ -7,12 +7,12 @@
void TileDetect_Movement_X(uint16 direction);
void TileDetect_Movement_VerticalSlopes(uint16_t direction);
void TileDetect_Movement_HorizontalSlopes(uint16_t direction);
-void Player_TileDetectNearby();
+void Player_TileDetectNearby(void);
void Hookshot_CheckTileCollision(int k);
void Hookshot_CheckSingleLayerTileCollision(uint16 x, uint16 y, int dir);
void HandleNudgingInADoor(int8 speed);
-void TileCheckForMirrorBonk();
+void TileCheckForMirrorBonk(void);
void TileDetect_SwordSwingDeepInDoor(uint8 dw);
-void TileDetect_ResetState();
+void TileDetect_ResetState(void);
void TileDetection_Execute(uint16 x, uint16 y, uint16 bits);
void TileDetect_ExecuteInner(uint8 tile, uint16 offs, uint16 bits, bool is_indoors);
--- a/src/util.c
+++ b/src/util.c
@@ -277,4 +277,4 @@
if (crc32(dst, dst_size) != *(uint32 *)(bps_end + 4))
return NULL;
return dst;
-}
\ No newline at end of file
+}
--- a/src/util.h
+++ b/src/util.h
@@ -7,9 +7,9 @@
struct RendererFuncs {
bool (*Initialize)(SDL_Window *window);
- void (*Destroy)();
+ void (*Destroy)(void);
void (*BeginDraw)(int width, int height, uint8 **pixels, int *pitch);
- void (*EndDraw)();
+ void (*EndDraw)(void);
};
@@ -38,4 +38,4 @@
uint8 *ApplyBps(const uint8 *src, size_t src_size_in,
const uint8 *bps, size_t bps_size, size_t *length_out);
-#endif // ZELDA3_UTIL_H_
\ No newline at end of file
+#endif // ZELDA3_UTIL_H_
--- a/src/variables.h
+++ b/src/variables.h
@@ -1527,4 +1527,4 @@
extern const int8 kGetBestActionToPerformOnTile_y[];
-#endif // ZELDA3_VARIABLES_H_
\ No newline at end of file
+#endif // ZELDA3_VARIABLES_H_
--- a/src/zelda_rtl.c
+++ b/src/zelda_rtl.c
@@ -16,7 +16,7 @@
uint32 g_wanted_zelda_features;
-static void Startup_InitializeMemory();
+static void Startup_InitializeMemory(void);
typedef struct SimpleHdma {
const uint8 *table;
@@ -137,7 +137,7 @@
c->rep_count--;
}
-static void ConfigurePpuSideSpace() {
+static void ConfigurePpuSideSpace(void) {
// Let PPU impl know about the maximum allowed extra space on the sides and bottom
int extra_right = 0, extra_left = 0, extra_bottom = 0;
// printf("main %d, sub %d (%d, %d, %d)\n", main_module_index, submodule_index, BG2HOFS_copy2, room_bounds_x.v[2 | (quadrant_fullsize_x >> 1)], quadrant_fullsize_x >> 1);
@@ -234,7 +234,7 @@
dma_write(dma, DAS70, indirect_bank);
}
-static void ZeldaInitializationCode() {
+static void ZeldaInitializationCode(void) {
zelda_snes_dummy_write(NMITIMEN, 0);
zelda_snes_dummy_write(HDMAEN, 0);
zelda_snes_dummy_write(MDMAEN, 0);
@@ -249,12 +249,12 @@
zelda_snes_dummy_write(NMITIMEN, 0x81);
}
-static void ClearOamBuffer() { // 80841e
+static void ClearOamBuffer(void) { // 80841e
for (int i = 0; i < 128; i++)
oam_buf[i].y = 0xf0;
}
-static void ZeldaRunGameLoop() {
+static void ZeldaRunGameLoop(void) {
frame_counter++;
ClearOamBuffer();
Module_MainRouting();
@@ -262,9 +262,9 @@
nmi_boolean = 0;
}
-void ZeldaInitialize() {
+void ZeldaInitialize(void) {
g_zenv.dma = dma_init(NULL);
- g_zenv.ppu = ppu_init(NULL);
+ g_zenv.ppu = ppu_init();
g_zenv.ram = g_ram;
g_zenv.sram = (uint8*)calloc(8192, 1);
g_zenv.vram = g_zenv.ppu->vram;
@@ -274,7 +274,7 @@
ppu_reset(g_zenv.ppu);
}
-static void ZeldaRunPolyLoop() {
+static void ZeldaRunPolyLoop(void) {
if (intro_did_run_step && !nmi_flag_update_polyhedral) {
Poly_RunFrame();
intro_did_run_step = 0;
@@ -311,7 +311,7 @@
g_emu_syncall = sync_all;
}
-static void EmuSynchronizeWholeState() {
+static void EmuSynchronizeWholeState(void) {
if (g_emu_syncall)
g_emu_syncall();
}
@@ -887,4 +887,4 @@
} else {
fprintf(stderr, "Unable to write saves/sram.dat\n");
}
-}
\ No newline at end of file
+}
--- a/src/zelda_rtl.h
+++ b/src/zelda_rtl.h
@@ -29,13 +29,13 @@
extern ZeldaEnv g_zenv;
extern int frame_ctr_dbg;
-typedef void PlayerHandlerFunc();
+typedef void PlayerHandlerFunc(void);
typedef void HandlerFuncK(int k);
static inline void zelda_snes_dummy_write(uint32 adr, uint8 val) {}
void zelda_apu_write(uint32_t adr, uint8_t val);
-uint8_t zelda_read_apui00();
+uint8_t zelda_read_apui00(void);
uint8_t zelda_apu_read(uint32_t adr);
void zelda_ppu_write(uint32_t adr, uint8_t val);
void zelda_ppu_write_word(uint32_t adr, uint16_t val);
@@ -44,14 +44,14 @@
// 512x480 32-bit pixels. Returns true if we instead draw 1024x960
void HdmaSetup(uint32 addr6, uint32 addr7, uint8 transfer_unit, uint8 reg6, uint8 reg7, uint8 indirect_bank);
-void ZeldaInitialize();
+void ZeldaInitialize(void);
void ZeldaReset(bool preserve_sram);
void ZeldaDrawPpuFrame(uint8 *pixel_buffer, size_t pitch, uint32 render_flags);
void ZeldaRunFrameInternal(uint16 input, int run_what);
bool ZeldaRunFrame(int input_state);
void LoadSongBank(const uint8 *p);
-void ZeldaApuLock();
-void ZeldaApuUnlock();
+void ZeldaApuLock(void);
+void ZeldaApuUnlock(void);
bool ZeldaIsPlayingMusicTrack(uint8 track);
uint8 ZeldaGetEntranceMusicTrack(int track);
void ZeldaSetLanguage(const char *language);
@@ -66,11 +66,11 @@
};
void SaveLoadSlot(int cmd, int which);
-void ZeldaWriteSram();
-void ZeldaReadSram();
+void ZeldaWriteSram(void);
+void ZeldaReadSram(void);
typedef void ZeldaRunFrameFunc(uint16 input, int run_what);
-typedef void ZeldaSyncAllFunc();
+typedef void ZeldaSyncAllFunc(void);
void ZeldaSetupEmuCallbacks(uint8 *emu_ram, ZeldaRunFrameFunc *func, ZeldaSyncAllFunc *sync_all);