From fe8d3c51a4056f0dd61dbef332ad9e714b82089a Mon Sep 17 00:00:00 2001 From: vulcandth Date: Sat, 26 Mar 2022 15:59:36 -0500 Subject: Build the Virtual Console patches with `make red_vc` and `make blue_vc` (#351) --- engine/menus/main_menu.asm | 2 ++ engine/menus/save.asm | 43 +++++++++++++++++++++++-------------------- 2 files changed, 25 insertions(+), 20 deletions(-) (limited to 'engine/menus') diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 7e4cc9be..0708c0ce 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -284,9 +284,11 @@ LinkMenu: .choseCancel xor a ld [wMenuJoypadPollCount], a + vc_hook Network_STOP call Delay3 call CloseLinkConnection ld hl, LinkCanceledText + vc_hook Network_END call PrintText ld hl, wd72e res 6, [hl] diff --git a/engine/menus/save.asm b/engine/menus/save.asm index 83a5ca9b..fdf69765 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -37,20 +37,23 @@ LoadSAV0: ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, sPlayerName ; hero name located in SRAM - ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV +; This vc_hook does not have to be in any particular location. +; It is defined here because it refers to the same labels as the two lines below. + vc_hook SaveLimit + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jp z, .checkSumsMatched ; If the computed checksum didn't match the saved on, try again. - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jp nz, SAVBadCheckSum @@ -84,11 +87,11 @@ LoadSAV1: ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, sPlayerName ; hero name located in SRAM - ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jr nz, SAVBadCheckSum ld hl, sCurBoxData @@ -104,11 +107,11 @@ LoadSAV2: ld a, $1 ld [MBC1SRamBankingMode], a ld [MBC1SRamBank], a - ld hl, sPlayerName ; hero name located in SRAM - ld bc, sMainDataCheckSum - sPlayerName ; but here checks the full SAV + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a - ld a, [sMainDataCheckSum] ; SAV's checksum + ld a, [sMainDataCheckSum] cp c jp nz, SAVBadCheckSum ld hl, sPartyData @@ -219,8 +222,8 @@ SaveSAVtoSRAM0: call CopyData ldh a, [hTileAnimations] ld [sTileAnimations], a - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld [sMainDataCheckSum], a xor a @@ -239,8 +242,8 @@ SaveSAVtoSRAM1: ld de, sCurBoxData ld bc, wBoxDataEnd - wBoxDataStart call CopyData - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld [sMainDataCheckSum], a xor a @@ -262,8 +265,8 @@ SaveSAVtoSRAM2: ld de, sMainData ld bc, wPokedexSeenEnd - wPokedexOwned call CopyData - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld [sMainDataCheckSum], a xor a @@ -612,8 +615,8 @@ SAVCheckRandomID: ld a, [sPlayerName] and a jr z, .next - ld hl, sPlayerName - ld bc, sMainDataCheckSum - sPlayerName + ld hl, sGameData + ld bc, sGameDataEnd - sGameData call SAVCheckSum ld c, a ld a, [sMainDataCheckSum] -- cgit v1.3.1-sl0p From d7808d110f6b104a3e5ed7b21260ed8f1b718719 Mon Sep 17 00:00:00 2001 From: vulcandth Date: Mon, 6 Jun 2022 16:22:34 -0500 Subject: Improved Virtual Console patch identifiers (#357) --- data/text/text_4.asm | 2 +- engine/battle/animations.asm | 60 +++++++++++++------------- engine/battle/core.asm | 20 ++++----- engine/gfx/palettes.asm | 2 +- engine/link/cable_club.asm | 8 ++-- engine/link/cable_club_npc.asm | 8 ++-- engine/menus/main_menu.asm | 4 +- engine/menus/save.asm | 2 +- home/serial.asm | 8 ++-- vc/pokeblue.patch.template | 92 +++++++++++++++++++-------------------- vc/pokered.patch.template | 98 +++++++++++++++++++++--------------------- 11 files changed, 153 insertions(+), 151 deletions(-) (limited to 'engine/menus') diff --git a/data/text/text_4.asm b/data/text/text_4.asm index 60ec7abe..39c7ab91 100644 --- a/data/text/text_4.asm +++ b/data/text/text_4.asm @@ -211,7 +211,7 @@ _CableClubNPCPleaseWaitText:: text_end _CableClubNPCLinkClosedBecauseOfInactivityText:: - vc_patch Change_MSG + vc_patch Change_link_closed_inactivity_message IF DEF(_RED_VC) || DEF(_BLUE_VC) text "Please come again!" done diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index f1dd3d4e..afed76d7 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -176,12 +176,12 @@ PlayAnimation: ld h, [hl] ld l, a .animationLoop - vc_hook FPA_Thunderbolt_End + vc_hook Stop_reducing_move_anim_flashing_Thunderbolt ld a, [hli] - vc_hook_red FPA_007_End - vc_hook_blue FPA_009_End + vc_hook_red Stop_reducing_move_anim_flashing_Reflect + vc_hook_blue Stop_reducing_move_anim_flashing_Self_Destruct cp -1 - vc_hook_blue FPA_008_End + vc_hook_blue Stop_reducing_move_anim_flashing_Reflect jr z, .AnimationOver cp FIRST_SE_ID ; is this subanimation or a special effect? jr c, .playSubanimation @@ -250,55 +250,57 @@ PlayAnimation: ld a, [wAnimPalette] ldh [rOBP0], a call LoadAnimationTileset - vc_hook FPA_001_Begin + vc_hook Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion call LoadSubanimation call PlaySubanimation - vc_hook FPA_001_End + vc_hook_red Stop_reducing_move_anim_flashing_Mega_Punch + vc_hook_blue Stop_reducing_move_anim_flashing_Mega_Punch_Explosion pop af - vc_hook_red FPA_008_End + vc_hook_red Stop_reducing_move_anim_flashing_Dream_Eater ldh [rOBP0], a .nextAnimationCommand - vc_hook FPA_005_End + vc_hook_red Stop_reducing_move_anim_flashing_Hyper_Beam + vc_hook_blue Stop_reducing_move_anim_flashing_Bubblebeam_Hyper_Beam_Blizzard pop hl - vc_hook FPA_002_End + vc_hook Stop_reducing_move_anim_flashing_Guillotine jr .animationLoop .AnimationOver ret LoadSubanimation: - vc_hook FPA_002_Begin + vc_hook Reduce_move_anim_flashing_Guillotine ld a, [wSubAnimAddrPtr + 1] - vc_hook FPA_003_Begin + vc_hook Reduce_move_anim_flashing_Mega_Kick ld h, a - vc_hook_red FPA_131_Begin + vc_hook_red Reduce_move_anim_flashing_Blizzard ld a, [wSubAnimAddrPtr] - vc_hook_red FPA_56_Begin + vc_hook_red Reduce_move_anim_flashing_Self_Destruct ld l, a ld a, [hli] ld e, a - vc_hook FPA_76_Begin + vc_hook Reduce_move_anim_flashing_Explosion ld a, [hl] - vc_hook FPA_Thunderbolt_Begin + vc_hook Reduce_move_anim_flashing_Thunderbolt ld d, a ; de = address of subanimation ld a, [de] - vc_hook_blue FPA_012_Begin + vc_hook_blue Reduce_move_anim_flashing_Rock_Slide ld b, a - vc_hook FPA_Spore_Begin + vc_hook Reduce_move_anim_flashing_Spore and %00011111 - vc_hook FPA_Bubblebeam_Begin + vc_hook Reduce_move_anim_flashing_Bubblebeam ld [wSubAnimCounter], a ; number of frame blocks - vc_hook_red FPA_010_Begin - vc_hook_blue FPA_009_Begin + vc_hook_red Reduce_move_anim_flashing_Rock_Slide + vc_hook_blue Reduce_move_anim_flashing_Self_Destruct ld a, b and %11100000 cp SUBANIMTYPE_ENEMY << 5 - vc_hook_blue FPA_004_Begin + vc_hook_blue Reduce_move_anim_flashing_Blizzard jr nz, .isNotType5 .isType5 call GetSubanimationTransform2 jr .saveTransformation .isNotType5 - vc_hook FPA_Hyper_Beam_Begin + vc_hook Reduce_move_anim_flashing_Hyper_Beam call GetSubanimationTransform1 .saveTransformation ; place the upper 3 bits of a into bits 0-2 of a before storing @@ -329,7 +331,7 @@ LoadSubanimation: ; sets the transform to SUBANIMTYPE_NORMAL if it's the player's turn ; sets the transform to the subanimation type if it's the enemy's turn GetSubanimationTransform1: - vc_hook FPA_Reflect_Begin + vc_hook Reduce_move_anim_flashing_Reflect ld b, a ldh a, [hWhoseTurn] and a @@ -422,15 +424,15 @@ MoveAnimation: jr nz, .animationsDisabled call ShareMoveAnimations call PlayAnimation - vc_hook_red FPA_004_End - vc_hook_blue FPA_011_End + vc_hook_red Stop_reducing_move_anim_flashing_Bubblebeam_Mega_Kick + vc_hook_blue Stop_reducing_move_anim_flashing_Spore jr .next4 .animationsDisabled ld c, 30 call DelayFrames .next4 - vc_hook_red FPA_010_End - vc_hook_blue FPA_012_End + vc_hook_red Stop_reducing_move_anim_flashing + vc_hook_blue Stop_reducing_move_anim_flashing_Rock_Slide_Dream_Eater call PlayApplyingAttackAnimation ; shake the screen or flash the pic in and out (to show damage) .animationFinished call WaitForSoundToFinish @@ -568,7 +570,7 @@ SetAnimationPalette: .notSGB ld a, $e4 ld [wAnimPalette], a - vc_hook FPA_Dream_Eater_Begin + vc_hook Reduce_move_anim_flashing_Dream_Eater ldh [rOBP0], a ld a, $6c ldh [rOBP1], a @@ -984,7 +986,7 @@ AnimationFlashScreenLong: ld [wFlashScreenLongCounter], a pop hl jr nz, .loop - vc_hook_red FPA_phy_End + vc_hook_red Stop_reducing_move_anim_flashing_Psychic ret ; BG palettes diff --git a/engine/battle/core.asm b/engine/battle/core.asm index e7711707..66ca1aa9 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -3023,7 +3023,7 @@ LinkBattleExchangeData: ld a, b .doExchange ld [wSerialExchangeNybbleSendData], a - vc_hook send_byt2 + vc_hook Wireless_start_exchange callfar PrintWaitingText .syncLoop1 call Serial_ExchangeNybble @@ -3031,8 +3031,8 @@ LinkBattleExchangeData: ld a, [wSerialExchangeNybbleReceiveData] inc a jr z, .syncLoop1 - vc_hook send_byt2_ret - vc_patch FIGHT + vc_hook Wireless_end_exchange + vc_patch Wireless_net_delay_1 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -3044,8 +3044,8 @@ ENDC call Serial_ExchangeNybble dec b jr nz, .syncLoop2 - vc_hook send_dummy - vc_patch FIGHT2 + vc_hook Wireless_start_send_zero_bytes + vc_patch Wireless_net_delay_2 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -3057,7 +3057,7 @@ ENDC call Serial_SendZeroByte dec b jr nz, .syncLoop3 - vc_hook send_dummy_end + vc_hook Wireless_end_send_zero_bytes ret ExecutePlayerMove: @@ -6677,8 +6677,8 @@ BattleRandom: ld a, [hl] pop bc pop hl - vc_hook fight_ret_c - vc_patch fight_ret + vc_hook Unknown_BattleRandom_ret_c + vc_patch BattleRandom_ret IF DEF(_RED_VC) || DEF(_BLUE_VC) ret ELSE @@ -6749,9 +6749,9 @@ HandleExplodingAnimation: PlayMoveAnimation: ld [wAnimationID], a - vc_hook_red FPA_conf_Begin + vc_hook_red Reduce_move_anim_flashing_Confusion call Delay3 - vc_hook_red FPA_phy_Begin + vc_hook_red Reduce_move_anim_flashing_Psychic predef_jump MoveAnimation InitBattle:: diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index d26d82a6..caa22c10 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -484,7 +484,7 @@ CheckSGB: ldh a, [rJOYP] ldh a, [rJOYP] call Wait7000 - vc_hook Network_RESET + vc_hook Unknown_network_reset call Wait7000 ld a, $30 ldh [rJOYP], a diff --git a/engine/link/cable_club.asm b/engine/link/cable_club.asm index 296900a6..e1b92eab 100644 --- a/engine/link/cable_club.asm +++ b/engine/link/cable_club.asm @@ -124,21 +124,21 @@ CableClub_DoBattleOrTradeAgain: ld hl, wSerialRandomNumberListBlock ld de, wSerialOtherGameboyRandomNumberListBlock ld bc, $11 - vc_hook Network17 + vc_hook Wireless_ExchangeBytes_1_unknown_Type5 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPlayerDataBlock ld de, wSerialEnemyDataBlock ld bc, $1a8 - vc_hook Network424 + vc_hook Wireless_ExchangeBytes_2 call Serial_ExchangeBytes ld a, SERIAL_NO_DATA_BYTE ld [de], a ld hl, wSerialPartyMonsPatchList ld de, wSerialEnemyMonsPatchList ld bc, $c8 - vc_hook Network200 + vc_hook Wireless_ExchangeBytes_3 call Serial_ExchangeBytes ld a, (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) ldh [rIE], a @@ -862,7 +862,7 @@ TradeCenter_Trade: ld de, TradeCompleted call PlaceString predef SaveSAVtoSRAM2 - vc_hook save_game_end + vc_hook Trade_save_game_end ld c, 50 call DelayFrames xor a diff --git a/engine/link/cable_club_npc.asm b/engine/link/cable_club_npc.asm index b4fb4090..41f56a21 100644 --- a/engine/link/cable_club_npc.asm +++ b/engine/link/cable_club_npc.asm @@ -31,7 +31,7 @@ CableClubNPC:: ; USING_INTERNAL_CLOCK, which allows the player to proceed past the link ; receptionist's "Please wait." It assumes that hSerialConnectionStatus is at ; its original address. - vc_hook linkCable_fake_begin + vc_hook Link_fake_connection_status vc_assert hSerialConnectionStatus == $ffaa, \ "hSerialConnectionStatus is no longer located at 00:ffaa" vc_assert USING_INTERNAL_CLOCK == $02, \ @@ -63,7 +63,7 @@ CableClubNPC:: ld a, [wCurrentMenuItem] and a jr nz, .choseNo - vc_hook linkCable_block_input + vc_hook Wireless_TryQuickSave_block_input callfar SaveSAVtoSRAM call WaitForSoundToFinish ld a, SFX_SAVE @@ -76,10 +76,10 @@ CableClubNPC:: xor a ld [hl], a ldh [hSerialReceivedNewData], a - vc_hook linkCable_fake_end + vc_hook Wireless_prompt ld [wSerialExchangeNybbleSendData], a call Serial_SyncAndExchangeNybble - vc_hook Network_RECHECK + vc_hook Wireless_net_recheck ld hl, wUnknownSerialCounter ld a, [hli] inc a diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 0708c0ce..7db60d3d 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -284,11 +284,11 @@ LinkMenu: .choseCancel xor a ld [wMenuJoypadPollCount], a - vc_hook Network_STOP + vc_hook Wireless_net_stop call Delay3 call CloseLinkConnection ld hl, LinkCanceledText - vc_hook Network_END + vc_hook Wireless_net_end call PrintText ld hl, wd72e res 6, [hl] diff --git a/engine/menus/save.asm b/engine/menus/save.asm index fdf69765..b74b9058 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -39,7 +39,7 @@ LoadSAV0: ld [MBC1SRamBank], a ; This vc_hook does not have to be in any particular location. ; It is defined here because it refers to the same labels as the two lines below. - vc_hook SaveLimit + vc_hook Unknown_save_limit ld hl, sGameData ld bc, sGameDataEnd - sGameData call SAVCheckSum diff --git a/home/serial.asm b/home/serial.asm index 7fb6b82c..f44772df 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -230,7 +230,7 @@ Serial_PrintWaitingTextAndSyncAndExchangeNybble:: jp LoadScreenTilesFromBuffer1 Serial_SyncAndExchangeNybble:: - vc_hook send_send_buf2 + vc_hook Wireless_WaitLinkTransfer ld a, $ff ld [wSerialExchangeNybbleReceiveData], a .loop1 @@ -254,7 +254,7 @@ Serial_SyncAndExchangeNybble:: ld a, [wSerialExchangeNybbleReceiveData] inc a jr z, .loop1 - vc_patch Network10 + vc_patch Wireless_net_delay_3 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -266,7 +266,7 @@ ENDC call Serial_ExchangeNybble dec b jr nz, .loop2 - vc_patch Network11 + vc_patch Wireless_net_delay_4 IF DEF(_RED_VC) || DEF(_BLUE_VC) ld b, 26 ELSE @@ -280,7 +280,7 @@ ENDC jr nz, .loop3 ld a, [wSerialExchangeNybbleReceiveData] ld [wSerialSyncAndExchangeNybbleReceiveData], a - vc_hook send_send_buf2_ret + vc_hook Wireless_WaitLinkTransfer_ret ret Serial_ExchangeNybble:: diff --git a/vc/pokeblue.patch.template b/vc/pokeblue.patch.template index 2a8bb119..6427bf92 100644 --- a/vc/pokeblue.patch.template +++ b/vc/pokeblue.patch.template @@ -25,108 +25,108 @@ ;ReduceColorB1 = 0 ;0~31 (for Green Mode) ;MotionBlur1 = 31 ;0~31 (for Green Mode) ;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31) -[SaveLimit] +[SaveLimit@Unknown_save_limit] Mode = 12 Type = 1 Index = {hex sGameData} Address = {hex sGameDataEnd} -[send_send_buf2] +[send_send_buf2@Wireless_WaitLinkTransfer] Mode = 2 Address = {HEX @} Type = 29 -[send_send_buf2_ret] +[send_send_buf2_ret@Wireless_WaitLinkTransfer_ret] Mode = 2 Address = {HEX @} Type = 30 -[send_byt2] +[send_byt2@Wireless_start_exchange] Mode = 2 Address = {HEX @+5} Type = 31 -[send_byt2_ret] +[send_byt2_ret@Wireless_end_exchange] Mode = 2 Address = {HEX @} Type = 32 -[send_dummy] +[send_dummy@Wireless_start_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 33 -[send_dummy_end] +[send_dummy_end@Wireless_end_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 34 -[FIGHT] +[FIGHT@Wireless_net_delay_1] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[FIGHT2] +[FIGHT2@Wireless_net_delay_2] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network10] +[Network10@Wireless_net_delay_3] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network11] +[Network11@Wireless_net_delay_4] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network17] +[Network17@Wireless_ExchangeBytes_1_unknown_Type5] Mode = 2 Address = {HEX @} Type = 5 -[Network424] +[Network424@Wireless_ExchangeBytes_2] Mode = 2 Address = {HEX @} Type = 4 -[Network200] +[Network200@Wireless_ExchangeBytes_3] Mode = 2 Address = {HEX @} Type = 4 -[Network_RECHECK] +[Network_RECHECK@Wireless_net_recheck] Mode = 2 Address = {HEX @} Type = 7 -[Network_STOP] +[Network_STOP@Wireless_net_stop] Mode = 2 Address = {HEX @} Type = 8 -[Network_END] +[Network_END@Wireless_net_end] Mode = 2 Address = {HEX @} Type = 9 -[Network_RESET] +[Network_RESET@Unknown_network_reset] Mode = 2 Address = {HEX @} Type = 10 -[linkCable fake begin] +[linkCable fake begin@Link_fake_connection_status] Mode = 2 Address = {HEX @} Type = 16 -[linkCable fake end] +[linkCable fake end@Wireless_prompt] Mode = 2 Address = {HEX @} Type = 17 -[linkCable block input] +[linkCable block input@Wireless_TryQuickSave_block_input] Mode = 2 Address = {HEX @+5} Type = 18 @@ -136,29 +136,29 @@ Type = 18 ;Address = 0x59E6 ;Type = 19 -[save game end] +[save game end@Trade_save_game_end] Mode = 2 Address = {HEX @} Type = 20 -[Change_MSG] +[Change_MSG@Change_link_closed_inactivity_message] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH_ +1 20} -[fight_ret] +[fight_ret@BattleRandom_ret] Mode = 1 Address = {HEX @} Fixcode = {PATCH} -[fight_ret_c] +[fight_ret_c@Unknown_BattleRandom_ret_c] Mode = 2 Address = {HEX @} Type = 98 ;rsm003758 ;No151 -[FPA 001 Begin] +[FPA 001 Begin@Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion] Mode = 3 Type = 0 Address = {HEX @} @@ -169,7 +169,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == == || == == == == == || == == == == == } ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH 00 "S" "E" "L" "F" MEGA_PUNCH 00 "E" "X" "P" "L" MEGA_PUNCH } -[FPA 001 End] +[FPA 001 End@Stop_reducing_move_anim_flashing_Mega_Punch_Explosion] Mode = 3 Type = 1 Address = {HEX @} @@ -182,7 +182,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm141151 ;No117 -[FPA 002 Begin] +[FPA 002 Begin@Reduce_move_anim_flashing_Guillotine] Mode = 3 Type = 0 Address = {HEX @} @@ -195,7 +195,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE } -[FPA 002 End] +[FPA 002 End@Stop_reducing_move_anim_flashing_Guillotine] Mode = 3 Type = 1 Address = {HEX @} @@ -208,7 +208,7 @@ ConditionValueC = {dws_ "G" "U" "I" "L" ;rsm143918 ;No150 -[FPA 003 Begin] +[FPA 003 Begin@Reduce_move_anim_flashing_Mega_Kick] Mode = 3 Type = 0 Address = {HEX @} @@ -223,7 +223,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm152422 ;No131 -[FPA 004 Begin] +[FPA 004 Begin@Reduce_move_anim_flashing_Blizzard] Mode = 3 Type = 0 Address = {HEX @} @@ -237,7 +237,7 @@ ConditionValueC = {dws_ "B" "L" "I" "Z" ;rsm160334 ;No123 -[FPA 005 Begin@FPA_Bubblebeam_Begin] +[FPA 005 Begin@Reduce_move_anim_flashing_Bubblebeam] Mode = 3 Type = 0 Address = {hex @} @@ -248,7 +248,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM } -[FPA 005 End] +[FPA 005 End@Stop_reducing_move_anim_flashing_Bubblebeam_Hyper_Beam_Blizzard] Mode = 3 Type = 1 Address = {HEX @} @@ -260,7 +260,7 @@ ConditionValueC = {dws_ "B" "U" "B" "B" ;rsm163356 ;No116 -[FPA 006 Begin@FPA_Hyper_Beam_Begin] +[FPA 006 Begin@Reduce_move_anim_flashing_Hyper_Beam] Mode = 3 Type = 0 Address = {HEX @} @@ -277,7 +277,7 @@ ConditionValueC = {dws_ "H" "Y" "P" "E" ;rsm174631 ;No57 -[FPA 007 Begin@FPA_Thunderbolt_Begin] +[FPA 007 Begin@Reduce_move_anim_flashing_Thunderbolt] Mode = 3 Type = 0 Address = {HEX @} @@ -289,7 +289,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } -[FPA 007 End@FPA_Thunderbolt_End] +[FPA 007 End@Stop_reducing_move_anim_flashing_Thunderbolt] Mode = 3 Type = 1 Address = {HEX @} @@ -301,7 +301,7 @@ ConditionValueC = {dws_ "T" "H" "U" "N" ;rsm134518 ;No159 -[FPA 008 Begin@FPA_Reflect_Begin] +[FPA 008 Begin@Reduce_move_anim_flashing_Reflect] Mode = 3 Type = 0 Address = {hex @} @@ -314,7 +314,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } -[FPA 008 End] +[FPA 008 End@Stop_reducing_move_anim_flashing_Reflect] Mode = 3 Type = 1 Address = {HEX @} @@ -328,7 +328,7 @@ ConditionValueC = {dws_ "R" "E" "F" "L" ;rsm140510 ;No56 -[FPA 009 Begin] +[FPA 009 Begin@Reduce_move_anim_flashing_Self_Destruct] Mode = 3 Type = 0 Address = {HEX @} @@ -339,7 +339,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "S" "E" "L" "F" SELFDESTRUCT} -[FPA 009 End] +[FPA 009 End@Stop_reducing_move_anim_flashing_Self_Destruct] Mode = 3 Type = 1 Address = {HEX @} @@ -350,7 +350,7 @@ ConditionValueC = {dws_ "S" "E" "L" "F" ;rsm150211 ;No156 -[FPA 010 Begin@FPA_Dream_Eater_Begin] +[FPA 010 Begin@Reduce_move_anim_flashing_Dream_Eater] Mode = 3 Type = 0 Address = {hex @} @@ -374,7 +374,7 @@ ConditionValueC = {dws_ "D" "R" "E" "A" ;rsm163334 ;No36 -[FPA 011 Begin@FPA_Spore_Begin] +[FPA 011 Begin@Reduce_move_anim_flashing_Spore] Mode = 3 Type = 0 Address = {HEX @} @@ -387,7 +387,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "S" "P" "O" "R" SPORE } -[FPA 011 End] +[FPA 011 End@Stop_reducing_move_anim_flashing_Spore] Mode = 3 Type = 1 Address = {hex @} @@ -398,7 +398,7 @@ ConditionValueC = {dws_ "S" "P" "O" "R" ;rsm012224 ;No12 -[FPA 012 Begin] +[FPA 012 Begin@Reduce_move_anim_flashing_Rock_Slide] Mode = 3 Type = 0 Address = {HEX @} @@ -409,7 +409,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "O" "C" "K" ROCK_SLIDE } -[FPA 012 End] +[FPA 012 End@Stop_reducing_move_anim_flashing_Rock_Slide_Dream_Eater] Mode = 3 Type = 1 Address = {hex @} @@ -424,7 +424,7 @@ ConditionValueC = {dws_ "R" "O" "C" "K" ;explosion ;No76 -[FPA 76 Begin] +[FPA 76 Begin@Reduce_move_anim_flashing_Explosion] Mode = 3 Type = 0 Address = 0x78186 diff --git a/vc/pokered.patch.template b/vc/pokered.patch.template index 52f5d0fe..6b015ca4 100644 --- a/vc/pokered.patch.template +++ b/vc/pokered.patch.template @@ -25,7 +25,7 @@ ;ReduceColorB1 = 0 ;0~31 (for Green Mode) ;MotionBlur1 = 31 ;0~31 (for Green Mode) ;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31) -[SaveLimit] +[SaveLimit@Unknown_save_limit] Mode = 12 Type = 1 Index = {hex sGameData} @@ -36,102 +36,102 @@ Address = {hex sGameDataEnd} ;Address = 0x1551 ;Type = 3 -[send_send_buf2] +[send_send_buf2@Wireless_WaitLinkTransfer] Mode = 2 Address = {HEX @} Type = 29 -[send_send_buf2_ret] +[send_send_buf2_ret@Wireless_WaitLinkTransfer_ret] Mode = 2 Address = {HEX @} Type = 30 -[send_byt2] +[send_byt2@Wireless_start_exchange] Mode = 2 Address = {HEX @+5} Type = 31 -[send_byt2_ret] +[send_byt2_ret@Wireless_end_exchange] Mode = 2 Address = {HEX @} Type = 32 -[send_dummy] +[send_dummy@Wireless_start_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 33 -[send_dummy_end] +[send_dummy_end@Wireless_end_send_zero_bytes] Mode = 2 Address = {HEX @} Type = 34 -[FIGHT] +[FIGHT@Wireless_net_delay_1] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[FIGHT2] +[FIGHT2@Wireless_net_delay_2] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network10] +[Network10@Wireless_net_delay_3] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network11] +[Network11@Wireless_net_delay_4] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH +1} -[Network17] +[Network17@Wireless_ExchangeBytes_1_unknown_Type5] Mode = 2 Address = {HEX @} Type = 5 -[Network424] +[Network424@Wireless_ExchangeBytes_2] Mode = 2 Address = {HEX @} Type = 4 -[Network200] +[Network200@Wireless_ExchangeBytes_3] Mode = 2 Address = {HEX @} Type = 4 -[Network_RECHECK] +[Network_RECHECK@Wireless_net_recheck] Mode = 2 Address = {HEX @} Type = 7 -[Network_STOP] +[Network_STOP@Wireless_net_stop] Mode = 2 Address = {HEX @} Type = 8 -[Network_END] +[Network_END@Wireless_net_end] Mode = 2 Address = {HEX @} Type = 9 -[Network_RESET] +[Network_RESET@Unknown_network_reset] Mode = 2 Address = {HEX @} Type = 10 -[linkCable fake begin] +[linkCable fake begin@Link_fake_connection_status] Mode = 2 Address = {HEX @} Type = 16 -[linkCable fake end] +[linkCable fake end@Wireless_prompt] Mode = 2 Address = {HEX @} Type = 17 -[linkCable block input] +[linkCable block input@Wireless_TryQuickSave_block_input] Mode = 2 Address = {HEX @+5} Type = 18 @@ -141,24 +141,24 @@ Type = 18 ;Address = 0x59E6 ;Type = 19 -[save game end] +[save game end@Trade_save_game_end] Mode = 2 Address = {HEX @} Type = 20 ;93 A7 A4 7F AB A8 AD AA 7F A7 ;at 93 -[Change_MSG] +[Change_MSG@Change_link_closed_inactivity_message] Mode = 1 Address = {HEX @+1} Fixcode = {PATCH_ +1 20} -[fight_ret] +[fight_ret@BattleRandom_ret] Mode = 1 Address = {HEX @} Fixcode = {PATCH} -[fight_ret_c] +[fight_ret_c@Unknown_BattleRandom_ret_c] Mode = 2 Address = {HEX @} Type = 98 @@ -183,7 +183,7 @@ Type = 98 ;rsm033659 ;no151 mega punch -[FPA 001 Begin] +[FPA 001 Begin@Reduce_move_anim_flashing_Mega_Punch_Self_Destruct_Explosion] Mode = 3 Type = 0 Address = {HEX @} @@ -197,7 +197,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "M" "E" "G" "A" "P" MEGA_PUNCH 00 "S" "E" "L" "F" "D" MEGA_PUNCH 00 "E" "X" "P" "L" MEGA_PUNCH } -[FPA 001 End] +[FPA 001 End@Stop_reducing_move_anim_flashing_Mega_Punch] Mode = 3 Type = 1 Address = {HEX @} @@ -209,7 +209,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm032916 ;no117 guillotine -[FPA 002 Begin] +[FPA 002 Begin@Reduce_move_anim_flashing_Guillotine] Mode = 3 Type = 0 Address = {HEX @} @@ -222,7 +222,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "G" "U" "I" "L" GUILLOTINE } -[FPA 002 End] +[FPA 002 End@Stop_reducing_move_anim_flashing_Guillotine] Mode = 3 Type = 1 Address = {HEX @} @@ -234,7 +234,7 @@ ConditionValueC = {dws_ "G" "U" "I" "L" ;rsm041307 ;no150 mega kick -[FPA 003 Begin] +[FPA 003 Begin@Reduce_move_anim_flashing_Mega_Kick] Mode = 3 Type = 0 Address = {HEX @} @@ -250,7 +250,7 @@ ConditionValueC = {dws_ "M" "E" "G" "A" ;rsm001929 ;no123 bubble beam -[FPA 004 Begin@FPA_Bubblebeam_Begin] +[FPA 004 Begin@Reduce_move_anim_flashing_Bubblebeam] Mode = 3 Type = 0 Address = {hex @} @@ -261,7 +261,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "B" "U" "B" "B" BUBBLEBEAM } -[FPA 004 End] +[FPA 004 End@Stop_reducing_move_anim_flashing_Bubblebeam_Mega_Kick] Mode = 3 Type = 1 Address = {hex @} @@ -273,7 +273,7 @@ ConditionValueC = {dws_ "B" "U" "B" "B" ;rsm103658 ;no116 hyper beam -[FPA 005 Begin@FPA_Hyper_Beam_Begin] +[FPA 005 Begin@Reduce_move_anim_flashing_Hyper_Beam] Mode = 3 Type = 0 Address = {HEX @} @@ -286,7 +286,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "H" "Y" "P" "E" HYPER_BEAM } -[FPA 005 End] +[FPA 005 End@Stop_reducing_move_anim_flashing_Hyper_Beam] Mode = 3 Type = 1 Address = {HEX @} @@ -298,7 +298,7 @@ ConditionValueC = {dws_ "H" "Y" "P" "E" ;rsm133358 ;no57 thunderbolt -[FPA 006 Begin@FPA_Thunderbolt_Begin] +[FPA 006 Begin@Reduce_move_anim_flashing_Thunderbolt] Mode = 3 Type = 0 Address = {HEX @} @@ -310,7 +310,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "T" "H" "U" "N" THUNDERBOLT } -[FPA 006 End@FPA_Thunderbolt_End] +[FPA 006 End@Stop_reducing_move_anim_flashing_Thunderbolt] Mode = 3 Type = 1 Address = {HEX @} @@ -321,7 +321,7 @@ ConditionValueC = {dws_ "T" "H" "U" "N" ;rsm152340 ;no159 reflect -[FPA 007 Begin@FPA_Reflect_Begin] +[FPA 007 Begin@Reduce_move_anim_flashing_Reflect] Mode = 3 Type = 0 Address = {hex @} @@ -334,7 +334,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "E" "F" "L" REFLECT } -[FPA 007 End] +[FPA 007 End@Stop_reducing_move_anim_flashing_Reflect] Mode = 3 Type = 1 Address = {HEX @} @@ -345,7 +345,7 @@ ConditionValueC = {dws_ "R" "E" "F" "L" ;rsm171812 ;no156 dream eater -[FPA 008 Begin@FPA_Dream_Eater_Begin] +[FPA 008 Begin@Reduce_move_anim_flashing_Dream_Eater] Mode = 3 Type = 0 Address = {hex @} @@ -358,7 +358,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "D" "R" "E" "A" DREAM_EATER } -[FPA 008 End] +[FPA 008 End@Stop_reducing_move_anim_flashing_Dream_Eater] Mode = 3 Type = 1 Address = {HEX @} @@ -369,7 +369,7 @@ ConditionValueC = {dws_ "B" "L" "I" "Z" ;rsm174650 ;no36 spore -[FPA 009 Begin@FPA_Spore_Begin] +[FPA 009 Begin@Reduce_move_anim_flashing_Spore] Mode = 3 Type = 0 Address = {HEX @} @@ -385,7 +385,7 @@ ConditionValueC = {dws_ "S" "P" "O" "R" ;rsm152115 ;no12 rock slide -[FPA 010 Begin] +[FPA 010 Begin@Reduce_move_anim_flashing_Rock_Slide] Mode = 3 Type = 0 Address = {HEX @} @@ -396,7 +396,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == } ConditionValueC = {dws_ "R" "O" "C" "K" ROCK_SLIDE } -[FPA 010 End] +[FPA 010 End@Stop_reducing_move_anim_flashing] Mode = 3 Type = 1 Address = {HEX @} @@ -408,7 +408,7 @@ ConditionValueC = {dws_ "D" "R" "E" "A" ;explosion ;No76 explosion -[FPA 76 Begin] +[FPA 76 Begin@Reduce_move_anim_flashing_Explosion] Mode = 3 Type = 0 Address = {HEX @} @@ -421,7 +421,7 @@ ConditionValueC = {dws_ "E" "X" "P" "L" ;No56 self-destruct -[FPA 56 Begin] +[FPA 56 Begin@Reduce_move_anim_flashing_Self_Destruct] Mode = 3 Type = 0 Address = {HEX @} @@ -434,7 +434,7 @@ ConditionValueC = {dws_ "S" "E" "L" "F" ;No131 blizzard -[FPA 131 Begin] +[FPA 131 Begin@Reduce_move_anim_flashing_Blizzard] Mode = 3 Type = 0 Address = {HEX @} @@ -447,7 +447,7 @@ ConditionValueC = {dws_ "B" "L" "I" "Z" ;confusion -[FPA conf Begin] +[FPA conf Begin@Reduce_move_anim_flashing_Confusion] Mode = 3 Type = 0 Address = {hex @} @@ -459,7 +459,7 @@ ConditionValueB = {dws_ == == == == ConditionValueC = {dws_ "C" "O" "N" "F" "S" CONFUSION } ;phychic -[FPA phy Begin] +[FPA phy Begin@Reduce_move_anim_flashing_Psychic] Mode = 3 Type = 0 Address = {hex @} @@ -470,7 +470,7 @@ ConditionValueA = {dws_ wStringBuffer wStringBuffer+1 wStringBuffer+2 wStringBuf ConditionValueB = {dws_ == == == == == == } ConditionValueC = {dws_ "P" "S" "Y" "C" "I" PSYCHIC_M } -[FPA phy End] +[FPA phy End@Stop_reducing_move_anim_flashing_Psychic] Mode = 3 Type = 1 Address = {hex @} -- cgit v1.3.1-sl0p From cc46b0e510e07f2e7a0d14732c02a2f416eac9e1 Mon Sep 17 00:00:00 2001 From: "Colton G. Rushton" Date: Sat, 9 Jul 2022 18:18:18 -0300 Subject: wOAMBuffer -> wShadowOAM (#370) --- constants/gfx_constants.asm | 2 +- engine/battle/animations.asm | 32 ++++++++++++++++---------------- engine/battle/battle_transitions.asm | 2 +- engine/battle/core.asm | 4 ++-- engine/battle/draw_hud_pokeball_gfx.asm | 8 ++++---- engine/battle/ghost_marowak_anim.asm | 2 +- engine/events/diploma.asm | 2 +- engine/gfx/mon_icons.asm | 8 ++++---- engine/gfx/oam_dma.asm | 2 +- engine/gfx/sprite_oam.asm | 6 +++--- engine/items/item_effects.asm | 2 +- engine/items/town_map.asm | 20 ++++++++++---------- engine/menus/start_sub_menus.asm | 2 +- engine/movie/intro.asm | 4 ++-- engine/movie/splash.asm | 18 +++++++++--------- engine/movie/title.asm | 4 ++-- engine/movie/title2.asm | 2 +- engine/movie/trade.asm | 6 +++--- engine/overworld/cut.asm | 2 +- engine/overworld/cut2.asm | 22 +++++++++++----------- engine/overworld/dust_smoke.asm | 2 +- engine/overworld/emotion_bubbles.asm | 8 ++++---- engine/overworld/healing_machine.asm | 2 +- engine/overworld/player_animations.asm | 24 ++++++++++++------------ engine/slots/slot_machine.asm | 6 +++--- home/clear_sprites.asm | 6 +++--- home/oam.asm | 2 +- ram/wram.asm | 8 ++++---- scripts/VermilionDock.asm | 2 +- 29 files changed, 105 insertions(+), 105 deletions(-) (limited to 'engine/menus') diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm index 522b6a67..c6268208 100644 --- a/constants/gfx_constants.asm +++ b/constants/gfx_constants.asm @@ -17,7 +17,7 @@ DEF HP_BAR_GREEN EQU 0 DEF HP_BAR_YELLOW EQU 1 DEF HP_BAR_RED EQU 2 -; wOAMBuffer +; wShadowOAM DEF NUM_SPRITE_OAM_STRUCTS EQU 40 ; hAutoBGTransferEnabled diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index 7ad1bb3e..789dcb8a 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -147,7 +147,7 @@ DrawFrameBlock: jr z, .resetFrameBlockDestAddr call AnimationCleanOAM .resetFrameBlockDestAddr - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld a, l ld [wFBDestAddr + 1], a ld a, h @@ -583,7 +583,7 @@ PlaySubanimation: call GetMoveSound call PlaySound .skipPlayingSound - ld hl, wOAMBuffer ; base address of OAM buffer + ld hl, wShadowOAM ld a, l ld [wFBDestAddr + 1], a ld a, h @@ -855,7 +855,7 @@ TradeShakePokeball: ; if it's the end of the animation, make the ball jump up ld de, BallMoveDistances1 .loop - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld bc, 4 .innerLoop ld a, [de] @@ -885,7 +885,7 @@ BallMoveDistances1: TradeJumpPokeball: ld de, BallMoveDistances2 .loop - ld hl, wOAMBuffer ; OAM buffer + ld hl, wShadowOAM ld bc, 4 .innerLoop ld a, [de] @@ -925,8 +925,8 @@ BallMoveDistances2: ; this function copies the current musical note graphic ; so that there are two musical notes flying towards the defending pokemon DoGrowlSpecialEffects: - ld hl, wOAMBuffer ; OAM buffer - ld de, wOAMBuffer + $10 + ld hl, wShadowOAM + ld de, wShadowOAMSprite04 ld bc, $10 call CopyData ; copy the musical note graphic ld a, [wSubAnimCounter] @@ -1136,7 +1136,7 @@ AnimationWaterDropletsEverywhere: ret _AnimationWaterDroplets: - ld hl, wOAMBuffer + ld hl, wShadowOAM .loop ld a, [wBaseCoordY] ld [hli], a ; Y @@ -1264,7 +1264,7 @@ ShakeEnemyHUD_WritePlayerMonPicOAM: ld [wBaseCoordX], a ld a, $30 ld [wBaseCoordY], a - ld hl, wOAMBuffer + ld hl, wShadowOAM ld d, 0 ld c, 7 .loop @@ -1498,7 +1498,7 @@ AnimationSpiralBallsInward: .loop push hl ld c, 3 - ld de, wOAMBuffer + ld de, wShadowOAM .innerLoop ld a, [hl] cp $ff @@ -1637,7 +1637,7 @@ _AnimationShootBallsUpward: call LoadAnimationTileset pop bc ld d, $7a ; ball tile - ld hl, wOAMBuffer + ld hl, wShadowOAM push bc ld a, [wBaseCoordY] ld e, a @@ -1651,7 +1651,7 @@ _AnimationShootBallsUpward: ld [wNumShootingBalls], a .loop push bc - ld hl, wOAMBuffer + ld hl, wShadowOAM .innerLoop ld a, [wBaseCoordY] add 8 @@ -2080,7 +2080,7 @@ InitMultipleObjectsOAM: xor a ld e, a ld [wBaseCoordX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM .loop call BattleAnimWriteOAMEntry dec c @@ -2336,7 +2336,7 @@ AnimationFallingObjects: call InitMultipleObjectsOAM call FallingObjects_InitXCoords call FallingObjects_InitMovementData - ld hl, wOAMBuffer + ld hl, wShadowOAM ld [hl], 0 .loop ld hl, wFallingObjectsMovementData @@ -2363,7 +2363,7 @@ AnimationFallingObjects: dec c jr nz, .innerLoop call Delay3 - ld hl, wOAMBuffer + ld hl, wShadowOAM ld a, [hl] ; Y cp 104 ; has the top falling object reached 104 yet? jr nz, .loop ; keep moving the falling objects down until it does @@ -2372,7 +2372,7 @@ AnimationFallingObjects: FallingObjects_UpdateOAMEntry: ; Increases Y by 2 pixels and adjusts X and X flip based on the falling object's ; movement byte. - ld hl, wOAMBuffer + ld hl, wShadowOAM add hl, de ld a, [hl] inc a @@ -2433,7 +2433,7 @@ FallingObjects_UpdateMovementByte: ret FallingObjects_InitXCoords: - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord ld de, FallingObjects_InitialXCoords ld a, [wNumFallingObjects] ld c, a diff --git a/engine/battle/battle_transitions.asm b/engine/battle/battle_transitions.asm index bc4665e4..a16fd250 100644 --- a/engine/battle/battle_transitions.asm +++ b/engine/battle/battle_transitions.asm @@ -26,7 +26,7 @@ BattleTransition: jr nz, .loop1 ; Clear OAM except for the blocks used by the player and enemy trainer sprites. - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 ld c, 9 .loop2 ld a, b diff --git a/engine/battle/core.asm b/engine/battle/core.asm index c746e52b..580a9899 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -105,7 +105,7 @@ SlidePlayerAndEnemySilhouettesOnScreen: ; instead, the enemy pic is part of the background and uses the scroll register, while the player's head is a sprite and is slid by changing its X coordinates in a loop SlidePlayerHeadLeft: push bc - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord ld c, $15 ; number of OAM entries ld de, $4 ; size of OAM entry .loop @@ -6327,7 +6327,7 @@ LoadPlayerBackPic: ASSERT BANK(RedPicBack) == BANK(OldManPicBack) call UncompressSpriteFromDE predef ScaleSpriteByTwo - ld hl, wOAMBuffer + ld hl, wShadowOAM xor a ldh [hOAMTile], a ; initial tile number ld b, $7 ; 7 columns diff --git a/engine/battle/draw_hud_pokeball_gfx.asm b/engine/battle/draw_hud_pokeball_gfx.asm index 097a0fcc..34bff58d 100644 --- a/engine/battle/draw_hud_pokeball_gfx.asm +++ b/engine/battle/draw_hud_pokeball_gfx.asm @@ -27,7 +27,7 @@ SetupOwnPartyPokeballs: ld [hl], a ld a, 8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM jp WritePokeballOAMData SetupEnemyPartyPokeballs: @@ -41,7 +41,7 @@ SetupEnemyPartyPokeballs: ld [hl], $20 ld a, -8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + PARTY_LENGTH * 4 + ld hl, wShadowOAMSprite06 jp WritePokeballOAMData SetupPokeballs: @@ -174,7 +174,7 @@ SetupPlayerAndEnemyPokeballs: ld [hl], $40 ld a, 8 ld [wHUDPokeballGfxOffsetX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM call WritePokeballOAMData ld hl, wEnemyMons ld de, wEnemyPartyCount @@ -183,7 +183,7 @@ SetupPlayerAndEnemyPokeballs: ld a, $50 ld [hli], a ld [hl], $68 - ld hl, wOAMBuffer + $18 + ld hl, wShadowOAMSprite06 jp WritePokeballOAMData ; four tiles: pokeball, black pokeball (status ailment), crossed out pokeball (fainted) and pokeball slot (no mon) diff --git a/engine/battle/ghost_marowak_anim.asm b/engine/battle/ghost_marowak_anim.asm index 9c1ad96f..a7f4d025 100644 --- a/engine/battle/ghost_marowak_anim.asm +++ b/engine/battle/ghost_marowak_anim.asm @@ -58,7 +58,7 @@ CopyMonPicFromBGToSpriteVRAM: ld [wBaseCoordY], a ld a, $70 ld [wBaseCoordX], a - ld hl, wOAMBuffer + ld hl, wShadowOAM lb bc, 6, 6 ld d, $8 .oamLoop diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 7c48c086..41e0d7c6 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -42,7 +42,7 @@ DisplayDiploma:: ; Move the player 33 pixels right and set the priority bit so he appears ; behind the background layer. - ld hl, wOAMBuffer + $01 + ld hl, wShadowOAMSprite00XCoord lb bc, $80, $28 .adjustPlayerGfxLoop ld a, [hl] ; X diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 6f6b88c7..73b1632f 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -43,7 +43,7 @@ GetAnimationSpeed: .resetSprites push bc ld hl, wMonPartySpritesSavedOAM - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, $60 call CopyData pop bc @@ -51,7 +51,7 @@ GetAnimationSpeed: jr .incTimer .animateSprite push bc - ld hl, wOAMBuffer + $02 ; OAM tile id + ld hl, wShadowOAMSprite00TileID ld bc, $10 ld a, [wCurrentMenuItem] call AddNTimes @@ -236,7 +236,7 @@ WriteMonPartySpriteOAM: ; make a copy at wMonPartySpritesSavedOAM. push af ld c, $10 - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) ldh a, [hPartyMonIndex] swap a ld l, a @@ -252,7 +252,7 @@ WriteMonPartySpriteOAM: ; Make a copy of the OAM buffer with the first animation frame written so that ; we can flip back to it from the second frame by copying it back. .makeCopy - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wMonPartySpritesSavedOAM ld bc, $60 jp CopyData diff --git a/engine/gfx/oam_dma.asm b/engine/gfx/oam_dma.asm index fe93e90d..11e52694 100644 --- a/engine/gfx/oam_dma.asm +++ b/engine/gfx/oam_dma.asm @@ -16,7 +16,7 @@ DMARoutine: LOAD "OAM DMA", HRAM hDMARoutine:: ; initiate DMA - ld a, HIGH(wOAMBuffer) + ld a, HIGH(wShadowOAM) ldh [rDMA], a ; wait for DMA to finish ld a, $28 diff --git a/engine/gfx/sprite_oam.asm b/engine/gfx/sprite_oam.asm index b3c07ecd..69956a31 100644 --- a/engine/gfx/sprite_oam.asm +++ b/engine/gfx/sprite_oam.asm @@ -1,6 +1,6 @@ PrepareOAMData:: ; Determine OAM data for currently visible -; sprites and write it to wOAMBuffer. +; sprites and write it to wShadowOAM. ld a, [wUpdateSpritesEnabled] dec a @@ -79,7 +79,7 @@ PrepareOAMData:: ldh a, [hOAMBufferOffset] ld e, a - ld d, HIGH(wOAMBuffer) + ld d, HIGH(wShadowOAM) .tileLoop ldh a, [hSpriteScreenY] ; temp for sprite Y position @@ -147,7 +147,7 @@ PrepareOAMData:: ; Clear unused OAM. ldh a, [hOAMBufferOffset] ld l, a - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) ld de, $4 ld b, $a0 ld a, [wd736] diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 16b4140a..faba8837 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1175,7 +1175,7 @@ ItemUseMedicine: xor a ld [wBattleMonStatus], a ; remove the status ailment in the in-battle pokemon data .calculateHPBarCoords - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld bc, 2 * SCREEN_WIDTH inc d .calculateHPBarCoordsLoop diff --git a/engine/items/town_map.asm b/engine/items/town_map.asm index 93047216..d278d034 100644 --- a/engine/items/town_map.asm +++ b/engine/items/town_map.asm @@ -16,7 +16,7 @@ DisplayTownMap: hlcoord 1, 0 ld de, wcd6d call PlaceString - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $10 call CopyData @@ -47,7 +47,7 @@ DisplayTownMap: call TownMapCoordsToOAMCoords ld a, $4 ld [wOAMBaseTile], a - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 call WriteTownMapSpriteOAM ; town map cursor sprite pop hl ld de, wcd6d @@ -60,7 +60,7 @@ DisplayTownMap: hlcoord 1, 0 ld de, wcd6d call PlaceString - ld hl, wOAMBuffer + $10 + ld hl, wShadowOAMSprite04 ld de, wTileMapBackup + 16 ld bc, $10 call CopyData @@ -362,7 +362,7 @@ DrawPlayerOrBirdSprite: inc de cp "@" jr nz, .loop - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $a0 jp CopyData @@ -370,7 +370,7 @@ DrawPlayerOrBirdSprite: DisplayWildLocations: farcall FindWildLocationsOfMon call ZeroOutDuplicatesInList - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTownMapCoords .loop ld a, [de] @@ -410,7 +410,7 @@ DisplayWildLocations: ld b, $0 call DrawPlayerOrBirdSprite .done - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, wTileMapBackup ld bc, $a0 jp CopyData @@ -439,9 +439,9 @@ TownMapCoordsToOAMCoords: WritePlayerOrBirdSpriteOAM: ld a, [wOAMBaseTile] and a - ld hl, wOAMBuffer + $90 ; for player sprite + ld hl, wShadowOAMSprite36 ; for player sprite jr z, WriteTownMapSpriteOAM - ld hl, wOAMBuffer + $80 ; for bird sprite + ld hl, wShadowOAMSprite32 ; for bird sprite WriteTownMapSpriteOAM: push hl @@ -600,13 +600,13 @@ TownMapSpriteBlinkingAnimation:: jr nz, .done ; show sprites when the counter reaches 50 ld hl, wTileMapBackup - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, $90 call CopyData xor a jr .done .hideSprites - ld hl, wOAMBuffer + ld hl, wShadowOAM ld b, $24 ld de, $4 .hideSpritesLoop diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index dbc6ab89..7dfb7dc3 100644 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -677,7 +677,7 @@ SwitchPartyMon_ClearGfx: dec c jr nz, .clearMonBGLoop pop af - ld hl, wOAMBuffer + ld hl, wShadowOAM ld bc, $10 call AddNTimes ld de, $4 diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm index bca095a8..f489c60b 100644 --- a/engine/movie/intro.asm +++ b/engine/movie/intro.asm @@ -158,7 +158,7 @@ AnimateIntroNidorino: jr AnimateIntroNidorino UpdateIntroNidorinoOAM: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld a, [wIntroNidorinoBaseTile] ld d, a .loop @@ -177,7 +177,7 @@ UpdateIntroNidorinoOAM: ret InitIntroNidorinoOAM: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld d, 0 .loop push bc diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm index eede8ccb..2373a0f9 100644 --- a/engine/movie/splash.asm +++ b/engine/movie/splash.asm @@ -16,11 +16,11 @@ LoadShootingStarGraphics: lb bc, BANK(FallingStar), (FallingStarEnd - FallingStar) / $10 call CopyVideoData ld hl, GameFreakLogoOAMData - ld de, wOAMBuffer + $60 + ld de, wShadowOAMSprite24 ld bc, GameFreakLogoOAMDataEnd - GameFreakLogoOAMData call CopyData ld hl, GameFreakShootingStarOAMData - ld de, wOAMBuffer + ld de, wShadowOAM ld bc, GameFreakShootingStarOAMDataEnd - GameFreakShootingStarOAMData jp CopyData @@ -30,7 +30,7 @@ AnimateShootingStar: call PlaySound ; Move the big star down and left across the screen. - ld hl, wOAMBuffer + ld hl, wShadowOAM lb bc, $a0, $4 .bigStarLoop push hl @@ -60,7 +60,7 @@ AnimateShootingStar: jr nz, .bigStarLoop ; Clear big star OAM. - ld hl, wOAMBuffer + ld hl, wShadowOAM ld c, 4 ld de, 4 .clearOAMLoop @@ -83,7 +83,7 @@ AnimateShootingStar: ; Copy 24 instances of the small stars OAM data. ; Note that their coordinates put them off-screen. - ld de, wOAMBuffer + ld de, wShadowOAM ld a, 24 .initSmallStarsOAMLoop push af @@ -106,7 +106,7 @@ AnimateShootingStar: ld d, a push bc push hl - ld hl, wOAMBuffer + $50 + ld hl, wShadowOAMSprite20 ld c, 4 .smallStarsInnerLoop ; introduce new wave of 4 small stars OAM entries ld a, [de] @@ -131,8 +131,8 @@ AnimateShootingStar: push af ; shift the existing OAM entries down to make room for the next wave - ld hl, wOAMBuffer + $10 - ld de, wOAMBuffer + ld hl, wShadowOAMSprite04 + ld de, wShadowOAM ld bc, $50 call CopyData @@ -186,7 +186,7 @@ SmallStarsEmptyWave: MoveDownSmallStars: ld b, 8 .loop - ld hl, wOAMBuffer + $5c + ld hl, wShadowOAMSprite23 ld a, [wMoveDownSmallStarsOAMCount] ld de, -4 ld c, a diff --git a/engine/movie/title.asm b/engine/movie/title.asm index 8f97f8fa..1ee0cc25 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -93,7 +93,7 @@ DisplayTitleScreen: call DrawPlayerCharacter ; put a pokeball in the player's hand - ld hl, wOAMBuffer + $28 + ld hl, wShadowOAMSprite10 ld a, $74 ld [hl], a @@ -322,7 +322,7 @@ DrawPlayerCharacter: call ClearSprites xor a ld [wPlayerCharacterOAMTile], a - ld hl, wOAMBuffer + ld hl, wShadowOAM lb de, $60, $5a ld b, 7 .loop diff --git a/engine/movie/title2.asm b/engine/movie/title2.asm index 315cf6b5..bc75015f 100644 --- a/engine/movie/title2.asm +++ b/engine/movie/title2.asm @@ -115,6 +115,6 @@ GetTitleBallY: pop de and a ret z - ld [wOAMBuffer + $28], a + ld [wShadowOAMSprite10YCoord], a inc e ret diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm index 35423820..def901ba 100644 --- a/engine/movie/trade.asm +++ b/engine/movie/trade.asm @@ -315,7 +315,7 @@ Trade_AnimateBallEnteringLinkCable: xor $1 ld [wLinkCableAnimBulgeToggle], a add $7e - ld hl, wOAMBuffer + $02 + ld hl, wShadowOAMSprite00TileID ld de, 4 ld c, e .cycleLinkCableBulgeTile @@ -599,7 +599,7 @@ Trade_AnimCircledMon: ldh a, [rBGP] xor $3c ; make link cable flash ldh [rBGP], a - ld hl, wOAMBuffer + $02 + ld hl, wShadowOAMSprite00TileID ld de, $4 ld c, $14 .loop @@ -619,7 +619,7 @@ Trade_WriteCircledMonOAM: call Trade_WriteCircleOAM Trade_AddOffsetsToOAMCoords: - ld hl, wOAMBuffer + ld hl, wShadowOAM ld c, $14 .loop ld a, [wBaseCoordY] diff --git a/engine/overworld/cut.asm b/engine/overworld/cut.asm index 6a92ccc0..4a337e8d 100644 --- a/engine/overworld/cut.asm +++ b/engine/overworld/cut.asm @@ -99,7 +99,7 @@ InitCutAnimOAM: ld hl, vChars1 tile $7f call LoadCutGrassAnimationTilePattern call WriteCutOrBoulderDustAnimationOAMBlock - ld hl, wOAMBuffer + $93 + ld hl, wShadowOAMSprite36Attributes ld de, 4 ld a, $30 ld c, e diff --git a/engine/overworld/cut2.asm b/engine/overworld/cut2.asm index 3d4a5905..69c8cb13 100644 --- a/engine/overworld/cut2.asm +++ b/engine/overworld/cut2.asm @@ -5,12 +5,12 @@ AnimCut: ld c, $8 .cutTreeLoop push bc - ld hl, wOAMBuffer + $91 + ld hl, wShadowOAMSprite36XCoord ld a, 1 ld [wCoordAdjustmentAmount], a ld c, 2 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $99 + ld hl, wShadowOAMSprite38XCoord ld a, -1 ld [wCoordAdjustmentAmount], a ld c, 2 @@ -33,7 +33,7 @@ AnimCut: ld c, $8 call AnimCutGrass_UpdateOAMEntries call AnimCutGrass_SwapOAMEntries - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36YCoord ld a, 2 ld [wCoordAdjustmentAmount], a ld c, 4 @@ -45,22 +45,22 @@ AnimCut: AnimCutGrass_UpdateOAMEntries: push bc - ld hl, wOAMBuffer + $91 + ld hl, wShadowOAMSprite36XCoord ld a, 1 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $95 + ld hl, wShadowOAMSprite37XCoord ld a, 2 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $99 + ld hl, wShadowOAMSprite38XCoord ld a, -2 ld [wCoordAdjustmentAmount], a ld c, 1 call AdjustOAMBlockXPos2 - ld hl, wOAMBuffer + $9d + ld hl, wShadowOAMSprite39XCoord ld a, -1 ld [wCoordAdjustmentAmount], a ld c, 1 @@ -75,15 +75,15 @@ AnimCutGrass_UpdateOAMEntries: ret AnimCutGrass_SwapOAMEntries: - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld de, wBuffer ld bc, $8 call CopyData - ld hl, wOAMBuffer + $98 - ld de, wOAMBuffer + $90 + ld hl, wShadowOAMSprite38 + ld de, wShadowOAMSprite36 ld bc, $8 call CopyData ld hl, wBuffer - ld de, wOAMBuffer + $98 + ld de, wShadowOAMSprite38 ld bc, $8 jp CopyData diff --git a/engine/overworld/dust_smoke.asm b/engine/overworld/dust_smoke.asm index c97b3e56..96dd364a 100644 --- a/engine/overworld/dust_smoke.asm +++ b/engine/overworld/dust_smoke.asm @@ -43,7 +43,7 @@ GetMoveBoulderDustFunctionPointer: ld h, [hl] ld l, a push hl - ld hl, wOAMBuffer + $90 + ld hl, wShadowOAMSprite36 ld d, $0 add hl, de ld e, l diff --git a/engine/overworld/emotion_bubbles.asm b/engine/overworld/emotion_bubbles.asm index 5a41c226..84b13f17 100644 --- a/engine/overworld/emotion_bubbles.asm +++ b/engine/overworld/emotion_bubbles.asm @@ -17,11 +17,11 @@ EmotionBubble: ld [wUpdateSpritesEnabled], a ld a, [wd736] bit 6, a ; are the last 4 OAM entries reserved for a shadow or fishing rod? - ld hl, wOAMBuffer + 4 * 35 + $3 ; $8f - ld de, wOAMBuffer + 4 * 39 + $3 ; $9f + ld hl, wShadowOAMSprite35Attributes + ld de, wShadowOAMSprite39Attributes jr z, .next - ld hl, wOAMBuffer + 4 * 31 + $3 ; $7f - ld de, wOAMBuffer + 4 * 35 + $3 ; $8f + ld hl, wShadowOAMSprite31Attributes + ld de, wShadowOAMSprite35Attributes ; Copy OAM data 16 bytes forward to make room for emotion bubble OAM data at the ; start of the OAM buffer. diff --git a/engine/overworld/healing_machine.asm b/engine/overworld/healing_machine.asm index 63c8f9ea..e297762c 100644 --- a/engine/overworld/healing_machine.asm +++ b/engine/overworld/healing_machine.asm @@ -12,7 +12,7 @@ AnimateHealingMachine: push af ld a, $e0 ldh [rOBP1], a - ld hl, wOAMBuffer + $84 + ld hl, wShadowOAMSprite33 ld de, PokeCenterOAMData call CopyHealingMachineOAM ld a, 4 diff --git a/engine/overworld/player_animations.asm b/engine/overworld/player_animations.asm index 6a890cfd..bec59369 100644 --- a/engine/overworld/player_animations.asm +++ b/engine/overworld/player_animations.asm @@ -205,19 +205,19 @@ LeaveMapThroughHoleAnim: ld a, $ff ld [wUpdateSpritesEnabled], a ; disable UpdateSprites ; shift upper half of player's sprite down 8 pixels and hide lower half - ld a, [wOAMBuffer + 0 * 4 + 2] - ld [wOAMBuffer + 2 * 4 + 2], a - ld a, [wOAMBuffer + 1 * 4 + 2] - ld [wOAMBuffer + 3 * 4 + 2], a + ld a, [wShadowOAMSprite00TileID] + ld [wShadowOAMSprite02TileID], a + ld a, [wShadowOAMSprite01TileID] + ld [wShadowOAMSprite03TileID], a ld a, $a0 - ld [wOAMBuffer + 0 * 4], a - ld [wOAMBuffer + 1 * 4], a + ld [wShadowOAMSprite00YCoord], a + ld [wShadowOAMSprite01YCoord], a ld c, 2 call DelayFrames ; hide upper half of player's sprite ld a, $a0 - ld [wOAMBuffer + 2 * 4], a - ld [wOAMBuffer + 3 * 4], a + ld [wShadowOAMSprite02YCoord], a + ld [wShadowOAMSprite03YCoord], a call GBFadeOutToWhite ld a, $1 ld [wUpdateSpritesEnabled], a ; enable UpdateSprites @@ -392,7 +392,7 @@ FishingAnim: ld b, $0 ld hl, FishingRodOAM add hl, bc - ld de, wOAMBuffer + $9c + ld de, wShadowOAMSprite39 ld bc, $4 call CopyData ld c, 100 @@ -412,7 +412,7 @@ FishingAnim: .loop ld hl, wSpritePlayerStateData1YPixels call .ShakePlayerSprite - ld hl, wOAMBuffer + $9c + ld hl, wShadowOAMSprite39 call .ShakePlayerSprite call Delay3 dec b @@ -424,7 +424,7 @@ FishingAnim: cp SPRITE_FACING_UP jr nz, .skipHidingFishingRod ld a, $a0 - ld [wOAMBuffer + $9c], a + ld [wShadowOAMSprite39YCoord], a .skipHidingFishingRod ld hl, wEmotionBubbleSpriteIndex @@ -438,7 +438,7 @@ FishingAnim: cp SPRITE_FACING_UP jr nz, .skipUnhidingFishingRod ld a, $44 - ld [wOAMBuffer + $9c], a + ld [wShadowOAMSprite39YCoord], a .skipUnhidingFishingRod ld hl, ItsABiteText diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm index 1c2bb4c9..6dd3b42d 100644 --- a/engine/slots/slot_machine.asm +++ b/engine/slots/slot_machine.asm @@ -757,7 +757,7 @@ SlotMachine_UpdateBallTiles: SlotMachine_AnimWheel1: ld bc, SlotMachineWheel1 ld de, wSlotMachineWheel1Offset - ld hl, wOAMBuffer + ld hl, wShadowOAMSprite00 ld a, $30 ld [wBaseCoordX], a jr SlotMachine_AnimWheel @@ -765,7 +765,7 @@ SlotMachine_AnimWheel1: SlotMachine_AnimWheel2: ld bc, SlotMachineWheel2 ld de, wSlotMachineWheel2Offset - ld hl, wOAMBuffer + $30 + ld hl, wShadowOAMSprite12 ld a, $50 ld [wBaseCoordX], a jr SlotMachine_AnimWheel @@ -773,7 +773,7 @@ SlotMachine_AnimWheel2: SlotMachine_AnimWheel3: ld bc, SlotMachineWheel3 ld de, wSlotMachineWheel3Offset - ld hl, wOAMBuffer + $60 + ld hl, wShadowOAMSprite24 ld a, $70 ld [wBaseCoordX], a diff --git a/home/clear_sprites.asm b/home/clear_sprites.asm index 79cc99d6..6d1066fa 100644 --- a/home/clear_sprites.asm +++ b/home/clear_sprites.asm @@ -1,7 +1,7 @@ ClearSprites:: xor a - ld hl, wOAMBuffer - ld b, wOAMBufferEnd - wOAMBuffer + ld hl, wShadowOAM + ld b, wShadowOAMEnd - wShadowOAM .loop ld [hli], a dec b @@ -10,7 +10,7 @@ ClearSprites:: HideSprites:: ld a, 160 - ld hl, wOAMBuffer + ld hl, wShadowOAM ld de, 4 ld b, 40 .loop diff --git a/home/oam.asm b/home/oam.asm index 8a940d97..8be59f6e 100644 --- a/home/oam.asm +++ b/home/oam.asm @@ -4,7 +4,7 @@ ; c = X coordinate of upper left corner of sprite ; de = base address of 4 tile number and attribute pairs WriteOAMBlock:: - ld h, HIGH(wOAMBuffer) + ld h, HIGH(wShadowOAM) swap a ; multiply by 16 ld l, a call .writeOneEntry ; upper left diff --git a/ram/wram.asm b/ram/wram.asm index 0804e6ee..3becc82a 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -143,12 +143,12 @@ wSpriteDataEnd:: SECTION "OAM Buffer", WRAM0 ; buffer for OAM data. Copied to OAM by DMA -wOAMBuffer:: -; wOAMBufferSprite00 - wOAMBufferSprite39 +wShadowOAM:: +; wShadowOAMSprite00 - wShadowOAMSprite39 FOR n, NUM_SPRITE_OAM_STRUCTS -wOAMBufferSprite{02d:n}:: sprite_oam_struct wOAMBufferSprite{02d:n} +wShadowOAMSprite{02d:n}:: sprite_oam_struct wShadowOAMSprite{02d:n} ENDR -wOAMBufferEnd:: +wShadowOAMEnd:: SECTION "Tilemap", WRAM0 diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm index f98e1250..94779798 100644 --- a/scripts/VermilionDock.asm +++ b/scripts/VermilionDock.asm @@ -124,7 +124,7 @@ VermilionDock_1db9b: VermilionDock_AnimSmokePuffDriftRight: push bc push de - ld hl, wOAMBuffer + 4 * $4 + 1 ; x coord + ld hl, wShadowOAMSprite04XCoord ld a, [wSSAnneSmokeDriftAmount] swap a ld c, a -- cgit v1.3.1-sl0p From 8f81e71f192bce4b6f56b042638da376737e5abc Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 10 Jul 2022 21:11:03 -0400 Subject: Identify some `.asm_*` labels --- audio/low_health_alarm.asm | 14 ++++----- data/sgb/sgb_packets.asm | 16 +++++----- engine/battle/core.asm | 4 +-- engine/events/diploma.asm | 5 +-- engine/events/hidden_objects/bench_guys.asm | 4 +-- engine/events/hidden_objects/cinnabar_gym_quiz.asm | 4 +-- engine/events/pewter_guys.asm | 4 +-- engine/gfx/hp_bar.asm | 4 +-- engine/gfx/palettes.asm | 16 +++++----- engine/items/item_effects.asm | 36 +++++++++++----------- engine/math/multiply_divide.asm | 22 ++++++------- engine/menus/main_menu.asm | 4 +-- engine/overworld/field_move_messages.asm | 4 +-- engine/overworld/missable_objects.asm | 4 +-- engine/overworld/pathfinding.asm | 8 ++--- engine/overworld/player_state.asm | 8 ++--- engine/overworld/spinners.asm | 14 ++++----- engine/overworld/tilesets.asm | 4 +-- engine/play_time.asm | 8 ++--- home/yes_no.asm | 2 +- 20 files changed, 93 insertions(+), 92 deletions(-) (limited to 'engine/menus') diff --git a/audio/low_health_alarm.asm b/audio/low_health_alarm.asm index 08060aab..65e19aa7 100644 --- a/audio/low_health_alarm.asm +++ b/audio/low_health_alarm.asm @@ -7,25 +7,25 @@ Music_DoLowHealthAlarm:: ret z ;nope and $7f ;low 7 bits are the timer. - jr nz, .asm_21383 ;if timer > 0, play low tone. + jr nz, .notToneHi ;if timer > 0, play low tone. call .playToneHi ld a, 30 ;keep this tone for 30 frames. - jr .asm_21395 ;reset the timer. + jr .resetTimer -.asm_21383 +.notToneHi cp 20 - jr nz, .asm_2138a ;if timer == 20, - call .playToneLo ;actually set the sound registers. + jr nz, .noTone ;if timer == 20, + call .playToneLo ;actually set the sound registers. -.asm_2138a +.noTone ld a, $86 ld [wChannelSoundIDs + Ch5], a ;disable sound channel? ld a, [wLowHealthAlarm] and $7f ;decrement alarm timer. dec a -.asm_21395 +.resetTimer ; reset the timer and enable flag. set 7, a ld [wLowHealthAlarm], a diff --git a/data/sgb/sgb_packets.asm b/data/sgb/sgb_packets.asm index 11fc8900..2a38f6c5 100644 --- a/data/sgb/sgb_packets.asm +++ b/data/sgb/sgb_packets.asm @@ -241,14 +241,14 @@ MaskEnCancelPacket: MASK_EN 0 ; This set of packets is found in several Japanese SGB-compatible titles. ; It appears to be part of NCL's SGB devkit. -DataSnd_72548: +DataSndPacket1: DATA_SND $85d, $0, 11 db $8C ; cpx #$8c (2) db $D0, $F4 ; bne -$0c db $60 ; rts ds 7, 0 -DataSnd_72558: +DataSndPacket2: DATA_SND $852, $0, 11 db $A9, $E7 ; lda #$e7 db $9F, $01, $C0, $7E ; sta $7ec001, x @@ -258,7 +258,7 @@ DataSnd_72558: db $E8 ; inx db $E0 ; cpx #$8c (1) -DataSnd_72568: +DataSndPacket3: DATA_SND $847, $0, 11 db $C4 ; cmp #$c4 (2) db $D0, $16 ; bne +$16 @@ -268,7 +268,7 @@ DataSnd_72568: db $D0, $10 ; bne +$10 db $A2, $28 ; ldx #$28 -DataSnd_72578: +DataSndPacket4: DATA_SND $83c, $0, 11 db $F0, $12 ; beq +$12 db $A5 ; lda dp @@ -279,7 +279,7 @@ DataSnd_72578: db $CA ; dex db $C9 ; cmp #$c4 (1) -DataSnd_72588: +DataSndPacket5: DATA_SND $831, $0, 11 dbw $0C, $CAA5 ; tsb $caa5 db $C9, $7E ; cmp #$7e @@ -288,7 +288,7 @@ DataSnd_72588: db $CB ; wai db $C9, $7E ; cmp #$7e -DataSnd_72598: +DataSndPacket6: DATA_SND $826, $0, 11 db $39 ; bne +$39 (2) dbw $CD, $C48 ; cmp $c48 @@ -297,7 +297,7 @@ DataSnd_72598: db $C9, $C9 ; cmp #$c9 db $80, $D0 ; bra -$30 -DataSnd_725a8: +DataSndPacket7: DATA_SND $81b, $0, 11 db $EA ; nop db $EA ; nop @@ -309,7 +309,7 @@ DataSnd_725a8: dbw $CD,$C4F ; cmp $c4f db $D0 ; bne +$39 (1) -DataSnd_725b8: +DataSndPacket8: DATA_SND $810, $0, 11 dbw $4C, $820 ; jmp $820 db $EA ; nop diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 580a9899..62813eb4 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -6768,11 +6768,11 @@ InitOpponent: DetermineWildOpponent: ld a, [wd732] bit 1, a - jr z, .asm_3ef2f + jr z, .notDebug ldh a, [hJoyHeld] bit BIT_B_BUTTON, a ret nz -.asm_3ef2f +.notDebug ld a, [wNumberOfNoRandomBattleStepsLeft] and a ret nz diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 41e0d7c6..e08b1f24 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -17,9 +17,10 @@ DisplayDiploma:: hlcoord 0, 0 lb bc, 16, 18 predef Diploma_TextBoxBorder + ld hl, DiplomaTextPointersAndCoords ld c, $5 -.asm_56715 +.placeTextLoop push bc ld a, [hli] ld e, a @@ -34,7 +35,7 @@ DisplayDiploma:: inc hl pop bc dec c - jr nz, .asm_56715 + jr nz, .placeTextLoop hlcoord 10, 4 ld de, wPlayerName call PlaceString diff --git a/engine/events/hidden_objects/bench_guys.asm b/engine/events/hidden_objects/bench_guys.asm index b41434ad..55090c01 100644 --- a/engine/events/hidden_objects/bench_guys.asm +++ b/engine/events/hidden_objects/bench_guys.asm @@ -79,9 +79,9 @@ SaffronCityPokecenterBenchGuyText:: text_asm CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI ld hl, SaffronCityPokecenterBenchGuyText2 - jr nz, .asm_624f2 + jr nz, .printText ld hl, SaffronCityPokecenterBenchGuyText1 -.asm_624f2 +.printText call PrintText jp TextScriptEnd diff --git a/engine/events/hidden_objects/cinnabar_gym_quiz.asm b/engine/events/hidden_objects/cinnabar_gym_quiz.asm index f4c46115..69f03f2c 100644 --- a/engine/events/hidden_objects/cinnabar_gym_quiz.asm +++ b/engine/events/hidden_objects/cinnabar_gym_quiz.asm @@ -32,7 +32,7 @@ CinnabarGymQuiz:: call PrintText ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - call CinnabarGymQuiz_1ea92 + call CinnabarGymQuiz_AskQuestion jp TextScriptEnd CinnabarGymQuizIntroText: @@ -75,7 +75,7 @@ CinnabarGymGateFlagAction: EventFlagAddress hl, EVENT_CINNABAR_GYM_GATE0_UNLOCKED predef_jump FlagActionPredef -CinnabarGymQuiz_1ea92: +CinnabarGymQuiz_AskQuestion: call YesNoChoice ldh a, [hGymGateAnswer] ld c, a diff --git a/engine/events/pewter_guys.asm b/engine/events/pewter_guys.asm index 532fa4bf..06bb60fb 100644 --- a/engine/events/pewter_guys.asm +++ b/engine/events/pewter_guys.asm @@ -8,7 +8,7 @@ PewterGuys: add hl, de ld d, h ld e, l - ld hl, PointerTable_37ce6 + ld hl, PewterGuysCoordsTable ld a, [wWhichPewterGuy] add a ld b, 0 @@ -48,7 +48,7 @@ PewterGuys: inc hl jr .findMatchingCoordsLoop -PointerTable_37ce6: +PewterGuysCoordsTable: dw PewterMuseumGuyCoords dw PewterGymGuyCoords diff --git a/engine/gfx/hp_bar.asm b/engine/gfx/hp_bar.asm index e4de0b95..d848a337 100644 --- a/engine/gfx/hp_bar.asm +++ b/engine/gfx/hp_bar.asm @@ -215,10 +215,10 @@ UpdateHPBar_PrintHPNumber: push hl ldh a, [hUILayoutFlags] bit 0, a - jr z, .asm_fb15 + jr z, .hpBelowBar ld de, $9 jr .next -.asm_fb15 +.hpBelowBar ld de, $15 .next add hl, de diff --git a/engine/gfx/palettes.asm b/engine/gfx/palettes.asm index caa22c10..d97fbc55 100644 --- a/engine/gfx/palettes.asm +++ b/engine/gfx/palettes.asm @@ -443,14 +443,14 @@ PrepareSuperNintendoVRAMTransfer: .packetPointers ; Only the first packet is needed. dw MaskEnFreezePacket - dw DataSnd_72548 - dw DataSnd_72558 - dw DataSnd_72568 - dw DataSnd_72578 - dw DataSnd_72588 - dw DataSnd_72598 - dw DataSnd_725a8 - dw DataSnd_725b8 + dw DataSndPacket1 + dw DataSndPacket2 + dw DataSndPacket3 + dw DataSndPacket4 + dw DataSndPacket5 + dw DataSndPacket6 + dw DataSndPacket7 + dw DataSndPacket8 CheckSGB: ; Returns whether the game is running on an SGB in carry. diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index faba8837..02408484 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2646,7 +2646,7 @@ SendNewMonToBox: ld a, [wcf91] ld [wd0b5], a ld c, a -.asm_e7b1 +.loop inc de ld a, [de] ld b, a @@ -2654,13 +2654,13 @@ SendNewMonToBox: ld c, b ld [de], a cp $ff - jr nz, .asm_e7b1 + jr nz, .loop call GetMonHeader ld hl, wBoxMonOT ld bc, NAME_LENGTH ld a, [wBoxCount] dec a - jr z, .asm_e7ee + jr z, .skip dec a call AddNTimes push hl @@ -2672,7 +2672,7 @@ SendNewMonToBox: ld a, [wBoxCount] dec a ld b, a -.asm_e7db +.loop2 push bc push hl ld bc, NAME_LENGTH @@ -2684,15 +2684,15 @@ SendNewMonToBox: add hl, bc pop bc dec b - jr nz, .asm_e7db -.asm_e7ee + jr nz, .loop2 +.skip ld hl, wPlayerName ld de, wBoxMonOT ld bc, NAME_LENGTH call CopyData ld a, [wBoxCount] dec a - jr z, .asm_e82a + jr z, .skip2 ld hl, wBoxMonNicks ld bc, NAME_LENGTH dec a @@ -2706,7 +2706,7 @@ SendNewMonToBox: ld a, [wBoxCount] dec a ld b, a -.asm_e817 +.loop3 push bc push hl ld bc, NAME_LENGTH @@ -2718,15 +2718,15 @@ SendNewMonToBox: add hl, bc pop bc dec b - jr nz, .asm_e817 -.asm_e82a + jr nz, .loop3 +.skip2 ld hl, wBoxMonNicks ld a, NAME_MON_SCREEN ld [wNamingScreenType], a predef AskName ld a, [wBoxCount] dec a - jr z, .asm_e867 + jr z, .skip3 ld hl, wBoxMons ld bc, wBoxMon2 - wBoxMon1 dec a @@ -2740,7 +2740,7 @@ SendNewMonToBox: ld a, [wBoxCount] dec a ld b, a -.asm_e854 +.loop4 push bc push hl ld bc, wBoxMon2 - wBoxMon1 @@ -2752,8 +2752,8 @@ SendNewMonToBox: add hl, bc pop bc dec b - jr nz, .asm_e854 -.asm_e867 + jr nz, .loop4 +.skip3 ld a, [wEnemyMonLevel] ld [wEnemyMonBoxLevel], a ld hl, wEnemyMon @@ -2783,11 +2783,11 @@ SendNewMonToBox: inc de xor a ld b, NUM_STATS * 2 -.asm_e89f +.loop5 ld [de], a inc de dec b - jr nz, .asm_e89f + jr nz, .loop5 ld hl, wEnemyMonDVs ld a, [hli] ld [de], a @@ -2796,12 +2796,12 @@ SendNewMonToBox: ld [de], a ld hl, wEnemyMonPP ld b, NUM_MOVES -.asm_e8b1 +.loop6 ld a, [hli] inc de ld [de], a dec b - jr nz, .asm_e8b1 + jr nz, .loop6 ret ; checks if the tile in front of the player is a shore or water tile diff --git a/engine/math/multiply_divide.asm b/engine/math/multiply_divide.asm index 2fcda158..ab065052 100644 --- a/engine/math/multiply_divide.asm +++ b/engine/math/multiply_divide.asm @@ -68,7 +68,7 @@ _Divide:: ldh [hDivideBuffer+4], a ld a, $9 ld e, a -.asm_37db3 +.loop ldh a, [hDivideBuffer] ld c, a ldh a, [hDividend+1] ; (aliases: hMultiplicand) @@ -78,18 +78,18 @@ _Divide:: ld c, a ldh a, [hDividend] ; (aliases: hProduct, hPastLeadingZeros, hQuotient) sbc c - jr c, .asm_37dce + jr c, .next ldh [hDividend], a ; (aliases: hProduct, hPastLeadingZeros, hQuotient) ld a, d ldh [hDividend+1], a ; (aliases: hMultiplicand) ldh a, [hDivideBuffer+4] inc a ldh [hDivideBuffer+4], a - jr .asm_37db3 -.asm_37dce + jr .loop +.next ld a, b cp $1 - jr z, .asm_37e18 + jr z, .done ldh a, [hDivideBuffer+4] sla a ldh [hDivideBuffer+4], a @@ -103,7 +103,7 @@ _Divide:: rl a ldh [hDivideBuffer+1], a dec e - jr nz, .asm_37e04 + jr nz, .next2 ld a, $8 ld e, a ldh a, [hDivideBuffer] @@ -116,20 +116,20 @@ _Divide:: ldh [hDividend+1], a ; (aliases: hMultiplicand) ldh a, [hDividend+3] ldh [hDividend+2], a -.asm_37e04 +.next2 ld a, e cp $1 - jr nz, .asm_37e0a + jr nz, .okay dec b -.asm_37e0a +.okay ldh a, [hDivisor] ; (aliases: hDivisor, hMultiplier, hPowerOf10) srl a ldh [hDivisor], a ; (aliases: hDivisor, hMultiplier, hPowerOf10) ldh a, [hDivideBuffer] rr a ldh [hDivideBuffer], a - jr .asm_37db3 -.asm_37e18 + jr .loop +.done ldh a, [hDividend+1] ; (aliases: hMultiplicand) ldh [hRemainder], a ; (aliases: hDivisor, hMultiplier, hPowerOf10) ldh a, [hDivideBuffer+4] diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index 7db60d3d..d94c65eb 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -184,13 +184,13 @@ LinkMenu: ld b, a and $f0 cp $d0 - jr z, .asm_5c7d + jr z, .checkEnemyMenuSelection ld a, [wLinkMenuSelectionReceiveBuffer + 1] ld b, a and $f0 cp $d0 jr nz, .exchangeMenuSelectionLoop -.asm_5c7d +.checkEnemyMenuSelection ld a, b and $c ; did the enemy press A or B? jr nz, .enemyPressedAOrB diff --git a/engine/overworld/field_move_messages.asm b/engine/overworld/field_move_messages.asm index 520ef8ad..d75ffc21 100644 --- a/engine/overworld/field_move_messages.asm +++ b/engine/overworld/field_move_messages.asm @@ -32,7 +32,7 @@ IsSurfingAllowed: ret nz CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE ret z - ld hl, CoordsData_cdf7 + ld hl, SeafoamIslandsB4FStairsCoords call ArePlayerCoordsInArray ret nc ld hl, wd728 @@ -45,7 +45,7 @@ IsSurfingAllowed: ld hl, CyclingIsFunText jp PrintText -CoordsData_cdf7: +SeafoamIslandsB4FStairsCoords: dbmapcoord 7, 11 db -1 ; end diff --git a/engine/overworld/missable_objects.asm b/engine/overworld/missable_objects.asm index 31fdc257..8f88b138 100644 --- a/engine/overworld/missable_objects.asm +++ b/engine/overworld/missable_objects.asm @@ -23,9 +23,9 @@ LoadMissableObjects: ld de, MissableObjects ; calculate difference between out pointer and the base pointer ld a, l sub e - jr nc, .asm_f13c + jr nc, .noCarry dec h -.asm_f13c +.noCarry ld l, a ld a, h sub d diff --git a/engine/overworld/pathfinding.asm b/engine/overworld/pathfinding.asm index 1925dbbc..d067345e 100644 --- a/engine/overworld/pathfinding.asm +++ b/engine/overworld/pathfinding.asm @@ -14,22 +14,22 @@ FindPathToPlayer: call CalcDifference ld d, a and a - jr nz, .asm_f8da + jr nz, .stillHasYProgress ldh a, [hFindPathFlags] set 0, a ; current end of path matches the player's Y coordinate ldh [hFindPathFlags], a -.asm_f8da +.stillHasYProgress ldh a, [hFindPathXProgress] ld b, a ldh a, [hNPCPlayerXDistance] ; X distance in steps call CalcDifference ld e, a and a - jr nz, .asm_f8ec + jr nz, .stillHasXProgress ldh a, [hFindPathFlags] set 1, a ; current end of path matches the player's X coordinate ldh [hFindPathFlags], a -.asm_f8ec +.stillHasXProgress ldh a, [hFindPathFlags] cp $3 ; has the end of the path reached the player's position? jr z, .done diff --git a/engine/overworld/player_state.asm b/engine/overworld/player_state.asm index 70326754..8d652cdf 100644 --- a/engine/overworld/player_state.asm +++ b/engine/overworld/player_state.asm @@ -101,10 +101,10 @@ IsPlayerFacingEdgeOfMap:: ld b, a ld a, [wXCoord] ld c, a - ld de, .asm_c41e + ld de, .return push de jp hl -.asm_c41e +.return pop bc pop de pop hl @@ -239,11 +239,11 @@ PrintSafariZoneSteps:: call PlaceString ld a, [wNumSafariBalls] cp 10 - jr nc, .asm_c56d + jr nc, .tenOrMore hlcoord 5, 3 ld a, " " ld [hl], a -.asm_c56d +.tenOrMore hlcoord 6, 3 ld de, wNumSafariBalls lb bc, 1, 2 diff --git a/engine/overworld/spinners.asm b/engine/overworld/spinners.asm index 0ac6380d..98b478c4 100644 --- a/engine/overworld/spinners.asm +++ b/engine/overworld/spinners.asm @@ -11,18 +11,18 @@ LoadSpinnerArrowTiles:: ld a, [wCurMapTileset] cp FACILITY ld hl, FacilitySpinnerArrows - jr z, .asm_44ff6 + jr z, .gotSpinnerArrows ld hl, GymSpinnerArrows -.asm_44ff6 +.gotSpinnerArrows ld a, [wSimulatedJoypadStatesIndex] bit 0, a - jr nz, .asm_45001 - ld de, $18 + jr nz, .alternateGraphics + ld de, 6 * 4 add hl, de -.asm_45001 +.alternateGraphics ld a, $4 ld bc, $0 -.asm_45006 +.loop push af push hl push bc @@ -46,7 +46,7 @@ LoadSpinnerArrowTiles:: pop hl pop af dec a - jr nz, .asm_45006 + jr nz, .loop ret INCLUDE "data/tilesets/spinner_tiles.asm" diff --git a/engine/overworld/tilesets.asm b/engine/overworld/tilesets.asm index fa5cf626..d36e1169 100644 --- a/engine/overworld/tilesets.asm +++ b/engine/overworld/tilesets.asm @@ -35,13 +35,13 @@ LoadTilesetHeader: call IsInArray pop de pop hl - jr c, .asm_c797 + jr c, .dungeon ld a, [wCurMapTileset] ld b, a ldh a, [hPreviousTileset] cp b jr z, .done -.asm_c797 +.dungeon ld a, [wDestinationWarpID] cp $ff jr z, .done diff --git a/engine/play_time.asm b/engine/play_time.asm index 29897242..dcba88c2 100644 --- a/engine/play_time.asm +++ b/engine/play_time.asm @@ -39,12 +39,12 @@ TrackPlayTime:: CountDownIgnoreInputBitReset: ld a, [wIgnoreInputCounter] and a - jr nz, .asm_18e40 + jr nz, .decrement ld a, $ff - jr .asm_18e41 -.asm_18e40 + jr .continue +.decrement dec a -.asm_18e41 +.continue ld [wIgnoreInputCounter], a and a ret nz diff --git a/home/yes_no.asm b/home/yes_no.asm index 5b0e09ed..3f5a5a45 100644 --- a/home/yes_no.asm +++ b/home/yes_no.asm @@ -5,7 +5,7 @@ YesNoChoice:: call InitYesNoTextBoxParameters jr DisplayYesNoChoice -Func_35f4:: +TwoOptionMenu:: ; unreferenced ld a, TWO_OPTION_MENU ld [wTextBoxID], a call InitYesNoTextBoxParameters -- cgit v1.3.1-sl0p