diff --git a/src/engine/bank2.asm b/src/engine/bank2.asm index cb6c473..50ba8b9 100644 --- a/src/engine/bank2.asm +++ b/src/engine/bank2.asm @@ -1587,7 +1587,7 @@ ENDR ldh [rSVBK], a ret -VBlank_b672: +VBlank_Level: ld hl, .Func ld de, wVBlankFunc ld b, .end - .Func diff --git a/src/engine/bank20.asm b/src/engine/bank20.asm index 2493cdb..219cb19 100644 --- a/src/engine/bank20.asm +++ b/src/engine/bank20.asm @@ -839,7 +839,7 @@ OverworldStateTable: dw Func_80e33 dw FadeBGToWhite_Normal - dw Func_80e45 ; SST_OVERWORLD_20 + dw GolfBuilding ; SST_OVERWORLD_20 dw DarkenBGToPal_Normal dw Func_80e55 @@ -1053,7 +1053,7 @@ Func_8055f: ld a, $02 ldh [rSVBK], a call ClearVirtualOAM - call VBlank_80bf9 + call VBlank_Overworld call Func_80b29 call GetNextTreasureToCollect @@ -1666,7 +1666,7 @@ Func_80bd9: ld d, h jr .loop_outer -VBlank_80bf9: +VBlank_Overworld: ld hl, .Func ld de, wVBlankFunc ld b, .end - .Func @@ -1992,8 +1992,8 @@ Func_80e33: ld [wSubState], a ret -Func_80e45: - farcall Func_ad9b2 +GolfBuilding: + farcall _GolfBuilding ret Func_80e55: @@ -2077,7 +2077,7 @@ Func_80f0d: and a ret nz di - call VBlank_80bf9 + call VBlank_Overworld ei ret @@ -4689,7 +4689,7 @@ Func_81dce: ld a, $80 ld [w2d065], a .asm_81dfd - call Func_81e16 + call .Func_81e16 ld a, [wCutscene] inc a cp NUM_CUTSCENES + 1 @@ -4704,7 +4704,7 @@ Func_81dce: ld [wLastTransitionParam], a ; = 0 ret -Func_81e16: +.Func_81e16: ld a, [wCutscene] call GetCutsceneOWParams ret z @@ -4714,7 +4714,7 @@ Func_81e16: ld a, [wCurMapSide] cp b jr nz, .same_side - call Func_81e36 + call .Func_81e36 .same_side ld hl, wCutsceneOWParamsPtr call GetByteFromPointerInHL @@ -4722,7 +4722,7 @@ Func_81e16: ret z jr .loop -Func_81e36: +.Func_81e36: ld a, [wOWCutsceneAction] jumptable @@ -5643,7 +5643,7 @@ UpdateTopBar: jr nz, .still_transitioning di - call VBlank_80bf9 + call VBlank_Overworld ei ld a, TOPBARST_INPUT diff --git a/src/engine/bank26.asm b/src/engine/bank26.asm index cdb3cb7..de6269a 100644 --- a/src/engine/bank26.asm +++ b/src/engine/bank26.asm @@ -361,7 +361,7 @@ _InitTreasureCollection: ld a, $02 ldh [rSVBK], a - call VBlank_9a564 + call VBlank_TreasureCollection call Func_9a54e call Func_9a559 xor a @@ -507,7 +507,7 @@ Func_9a559: call WriteAToHL_BCTimes ret -VBlank_9a564: +VBlank_TreasureCollection: ld hl, .Func ld de, wVBlankFunc ld b, .end - .Func diff --git a/src/engine/bank2b.asm b/src/engine/bank2b.asm index 6e264e6..c6e3b47 100644 --- a/src/engine/bank2b.asm +++ b/src/engine/bank2b.asm @@ -1745,7 +1745,7 @@ _InitTempleScene: ldh [rSCY], a ld [wSCY], a - call VBlank_accb0 + call VBlank_PrologueEpilogue call ClearGeneralSceneRAM call ClearSceneObjsRAM @@ -1860,7 +1860,7 @@ ClearSceneObjsRAM: call WriteAToHL_BCTimes ret -VBlank_accb0: +VBlank_PrologueEpilogue: ld hl, .Func ld de, wVBlankFunc ld b, .end - .Func @@ -3808,7 +3808,7 @@ Data_ad939: db 0, 0 db $80 -Func_ad9b2: +_GolfBuilding: call DisableLCD call FillBGMap0_With7f call ClearVirtualOAM @@ -3822,7 +3822,7 @@ Func_ad9b2: ld [wSCX], a ldh [rSCY], a ld [wSCY], a - call .VBlank_adaac + call .VBlank_GolfBuilding call ClearGeneralSceneRAM call ClearSceneObjsRAM @@ -3908,7 +3908,7 @@ Func_ad9b2: inc [hl] ret -.VBlank_adaac: +.VBlank_GolfBuilding: ld hl, .func ld de, wVBlankFunc ld b, .func_end - .func @@ -4450,7 +4450,7 @@ Pals_ade09: _InitPrologueSequence: call ClearGeneralSceneRAM call ClearSceneObjsRAM - call VBlank_accb0 + call VBlank_PrologueEpilogue decompress_vram1 BGMap_b34c3, v1BGMap1 decompress_vram0 BGMap_b330c, v0BGMap1 @@ -6771,7 +6771,7 @@ _InitEpilogue: ldh [rSCY], a ld [wSCY], a - call VBlank_accb0 + call VBlank_PrologueEpilogue call ClearGeneralSceneRAM call ClearSceneObjsRAM diff --git a/src/engine/bank2d.asm b/src/engine/bank2d.asm index de518d1..b0e002d 100644 --- a/src/engine/bank2d.asm +++ b/src/engine/bank2d.asm @@ -20,24 +20,24 @@ Func_b4014: jumptable dw Func_b4001 - dw Func_b403e - dw Func_b408e - dw Func_b409c - dw Func_b40c0 - dw Func_b40d9 - dw Func_b40ff - dw Func_b4140 - dw Func_b4140 - dw Func_b4141 - dw Func_b4162 - dw Func_b4166 - dw Func_b416a - dw Func_b416e - dw Func_b4172 - dw Func_b4176 - dw Func_b417a - dw Func_b4247 - dw Func_b42e7 + dw Func_b403e ; NOWFUNC_CUT_TREE + dw Func_b408e ; NOWFUNC_OPEN_GATE + dw Func_b409c ; NOWFUNC_GARLIC + dw Func_b40c0 ; NOWFUNC_MAGIC_SEED + dw Func_b40d9 ; NOWFUNC_SUMMON_SNAKE + dw Func_b40ff ; NOWFUNC_FALL_LEAVES + dw Func_b4140 ; NOWFUNC_BLUE_MUSIC_BOX + dw Func_b4140 ; NOWFUNC_GOLD_MUSIC_BOX + dw Func_b4141 ; NOWFUNC_CRAYON_RED + dw Func_b4162 ; NOWFUNC_CRAYON_BROWN + dw Func_b4166 ; NOWFUNC_CRAYON_YELLOW + dw Func_b416a ; NOWFUNC_CRAYON_GREEN + dw Func_b416e ; NOWFUNC_CRAYON_CYAN + dw Func_b4172 ; NOWFUNC_CRAYON_BLUE + dw Func_b4176 ; NOWFUNC_CRAYON_PINK + dw Func_b417a ; NOWFUNC_BOTTOM_BAR + dw Func_b4247 ; NOWFUNC_DAY_NIGHT_SPELL + dw Func_b42e7 ; NOWFUNC_PROLOGUE Func_b403e: dec c @@ -277,7 +277,7 @@ Func_b417a: set 2, [hl] farcall Func_80bd9 - farcall VBlank_80bf9 + farcall VBlank_Overworld decompress_vram0 BGMap_86868, v0BGMap1 decompress_vram1 BGMap_868b2, v1BGMap1 @@ -340,7 +340,7 @@ Func_b4247: ld de, .data call InitSceneObjParams - farcall VBlank_80bf9 + farcall VBlank_Overworld farcall DrawCoinCount xor a @@ -375,14 +375,14 @@ Func_b4309: jumptable dw Func_b4001 - dw Func_b431f - dw Func_b4351 - dw Func_b435f - dw Func_b438f - dw Func_b43a8 - dw Func_b43dd - dw Func_b4448 - dw Func_b4474 + dw Func_b431f ; WOWFUNC_RAIN + dw Func_b4351 ; WOWFUNC_CLEAR_TORNADO + dw Func_b435f ; WOWFUNC_ELEVATOR_WORKING + dw Func_b438f ; WOWFUNC_MAGIC_SEED + dw Func_b43a8 ; WOWFUNC_SUMMON_SNAKE + dw Func_b43dd ; WOWFUNC_EARTHQUAKE + dw Func_b4448 ; WOWFUNC_VULCANO_ERUPTION + dw Func_b4474 ; WOWFUNC_RED_MUSIC_BOX Func_b431f: ld a, c @@ -595,17 +595,17 @@ Func_b449b: jumptable dw Func_b4001 - dw Func_b44b7 - dw Func_b44e7 - dw Func_b4509 - dw Func_b4520 - dw Func_b4567 - dw Func_b45c8 - dw Func_b45f5 - dw Func_b461b - dw Func_b4637 - dw Func_b4653 - dw Func_b4665 + dw Func_b44b7 ; SOWFUNC_SEND_SEEDS + dw Func_b44e7 ; SOWFUNC_MAGIC_SEED + dw Func_b4509 ; SOWFUNC_YELLOW_MUSIC_BOX + dw Func_b4520 ; SOWFUNC_CANYON_THUNDER + dw Func_b4567 ; SOWFUNC_RAISE_TOWER + dw Func_b45c8 ; SOWFUNC_FAN + dw Func_b45f5 ; SOWFUNC_SUMMON_SNAKE + dw Func_b461b ; SOWFUNC_EARTHQUAKE + dw Func_b4637 ; SOWFUNC_GREEN_MUSIC_BOX + dw Func_b4653 ; SOWFUNC_EXPLOSIVES + dw Func_b4665 ; SOWFUNC_FULL_MOON Func_b44b7: ld a, $80 @@ -870,15 +870,15 @@ Func_b4688: jumptable dw Func_b4001 - dw Func_b46a0 - dw Func_b46d9 - dw Func_b4712 - dw Func_b4771 - dw Func_b4792 - dw Func_b47f7 - dw Func_b481b - dw Func_b4832 - dw Func_b4873 + dw Func_b46a0 ; EOWFUNC_FREEZE_SEA + dw Func_b46d9 ; EOWFUNC_EARTHQUAKE + dw Func_b4712 ; EOWFUNC_FORM_CASTLE + dw Func_b4771 ; EOWFUNC_EXPLOSIVES + dw Func_b4792 ; EOWFUNC_VULCANO_ERUPTION + dw Func_b47f7 ; EOWFUNC_BURN_VINES + dw Func_b481b ; EOWFUNC_SHOW_WARPED_VOID + dw Func_b4832 ; EOWFUNC_RAISE_PIPE + dw Func_b4873 ; EOWFUNC_DAYTIME Func_b46a0: ld a, c @@ -2414,9 +2414,9 @@ _DoOWFunction: jumptable dw NorthOWFunctions ; NORTH - dw WestOWFunctions ; WEST + dw WestOWFunctions ; WEST dw SouthOWFunctions ; SOUTH - dw Func_b6ea8 ; EAST + dw EastOWFunctions ; EAST NorthOWFunctions: ld a, [wCutsceneActionParam] @@ -3329,7 +3329,7 @@ NOWFunc_DayNightSpell: and a ret nz di - farcall VBlank_80bf9 + farcall VBlank_Overworld ei jp AdvanceOWFunc @@ -6691,19 +6691,19 @@ WaitOWScene16Frames: ld a, 16 jp WaitOWFunc -Func_b6ea8: +EastOWFunctions: ld a, [wCutsceneActionParam] dec a jumptable - dw EOWFunc_FreezeSea ; EOWFUNC_FREEZE_SEA - dw EOWFunc_Earthquake ; EOWFUNC_EARTHQUAKE - dw EOWFunc_FormCastle ; EOWFUNC_FORM_CASTLE - dw EOWFunc_Explosives ; EOWFUNC_EXPLOSIVES + dw EOWFunc_FreezeSea ; EOWFUNC_FREEZE_SEA + dw EOWFunc_Earthquake ; EOWFUNC_EARTHQUAKE + dw EOWFunc_FormCastle ; EOWFUNC_FORM_CASTLE + dw EOWFunc_Explosives ; EOWFUNC_EXPLOSIVES dw EOWFunc_VulcanoEruption ; EOWFUNC_VULCANO_ERUPTION - dw EOWFunc_BurnVines ; EOWFUNC_BURN_VINES - dw EOWFunc_ShowWarpedVoid ; EOWFUNC_SHOW_WARPED_VOID - dw EOW_RaisePipe ; EOWFUNC_RAISE_PIPE - dw EOW_Daytime ; EOWFUNC_DAYTIME + dw EOWFunc_BurnVines ; EOWFUNC_BURN_VINES + dw EOWFunc_ShowWarpedVoid ; EOWFUNC_SHOW_WARPED_VOID + dw EOWFunc_RaisePipe ; EOWFUNC_RAISE_PIPE + dw EOWFunc_Daytime ; EOWFUNC_DAYTIME EOWFunc_FreezeSea: call .Func_b6f77 @@ -8196,7 +8196,7 @@ EOWFunc_ShowWarpedVoid: ld b, $19 jp WaitOWObjState -EOW_RaisePipe: +EOWFunc_RaisePipe: ld a, [w2d062] jumptable dw AdvanceOWFunc @@ -8238,7 +8238,7 @@ EOW_RaisePipe: ld hl, wSceneObj8State jp WaitOWObjState -EOW_Daytime: +EOWFunc_Daytime: ld a, [w2d062] jumptable dw AdvanceOWFunc diff --git a/src/engine/bank36.asm b/src/engine/bank36.asm index 677c4b9..3165019 100644 --- a/src/engine/bank36.asm +++ b/src/engine/bank36.asm @@ -112,7 +112,7 @@ Func_db29b: call LoadGameOverPals call LoadGameOverGfx call Func_db4cf - call VBlank_354 + call VBlank_GameOver xor a ldh [rSCX], a diff --git a/src/engine/bank37.asm b/src/engine/bank37.asm index 2772699..55c62d7 100644 --- a/src/engine/bank37.asm +++ b/src/engine/bank37.asm @@ -24,7 +24,7 @@ Func_dc01e: call LoadPerfectPals call LoadPerfectGfx call Func_dc13e - call VBlank_354 + call VBlank_Perfect xor a ldh [rSCX], a diff --git a/src/engine/bank7c.asm b/src/engine/bank7c.asm index 4b66a72..0eded1f 100644 --- a/src/engine/bank7c.asm +++ b/src/engine/bank7c.asm @@ -103,7 +103,7 @@ InitPauseMenu_SkipBackupVRAM: call PrintNumberMusicCoins hlbgcoord 14, 15, v0BGMap1 farcall PrintNumberCoins - call VBlank_354 + call VBlank_PauseMenu xor a ldh [rSCY], a @@ -480,7 +480,7 @@ InitSaveScreen: farcall LoadSaveScreenPals farcall LoadSaveScreenGfx farcall PrintNowSavingBox - call VBlank_1f0c7e + call VBlank_SaveScreen xor a ld [wSCY], a @@ -902,7 +902,7 @@ InitSaveScreenAndBackupVRAM: farcall LoadSaveScreenPals farcall LoadSaveScreenGfx farcall PrintNowSavingBox - call VBlank_1f0c7e + call VBlank_SaveScreen xor a ld [wSCY], a @@ -1195,7 +1195,7 @@ PrintNumberMusicCoins: ret Func_1f0969:: - farcall VBlank_b672 + farcall VBlank_Level farcall Func_b681 ldh a, [rSVBK] push af @@ -1652,7 +1652,7 @@ VBlank_1f0c6c: ret .end -VBlank_1f0c7e: +VBlank_SaveScreen: ld hl, .Func ld de, wVBlankFunc ld b, .end - .Func diff --git a/src/engine/level/start_room.asm b/src/engine/level/start_room.asm index ea29e96..55b128a 100644 --- a/src/engine/level/start_room.asm +++ b/src/engine/level/start_room.asm @@ -431,7 +431,7 @@ StartRoom_FromLevelStart: call Func_8ad9 call Func_8c12 - call VBlank_b672 + call VBlank_Level call Func_b681 ld a, [wSRAMBank] diff --git a/src/engine/title/time_attack_description.asm b/src/engine/title/time_attack_description.asm index e698f7e..c24df3d 100644 --- a/src/engine/title/time_attack_description.asm +++ b/src/engine/title/time_attack_description.asm @@ -6,7 +6,7 @@ InitTimeAttackDescription: call ApplyTempPals1ToBGPals call LoadTimeAttackDescriptionTiles call LoadTimeAttackText - call VBlank_354 + call VBlank_TimeAttackDescription xor a ld [wSCY], a diff --git a/src/home/fade.asm b/src/home/fade.asm index 0e46d63..320b732 100644 --- a/src/home/fade.asm +++ b/src/home/fade.asm @@ -838,8 +838,10 @@ VBlank_88d:: ldh [rSCY], a ld a, [wSCX] ldh [rSCX], a + call StoreBGPals call StoreOBPals + ld a, HIGH(wVirtualOAM) call hTransferVirtualOAM ret diff --git a/src/home/vblank.asm b/src/home/vblank.asm index cc489e9..5cd921e 100644 --- a/src/home/vblank.asm +++ b/src/home/vblank.asm @@ -23,7 +23,10 @@ InitLCD:: ret VBlank_GBIncompatible:: -VBlank_354:: +VBlank_PauseMenu:: +VBlank_GameOver:: +VBlank_Perfect:: +VBlank_TimeAttackDescription:: ld hl, .Func ld de, wVBlankFunc ld b, .end - .Func