From 4d2594cb24b7e67cde4e1373c9a2b5e0ae7ff473 Mon Sep 17 00:00:00 2001 From: Narishma-gb <194818981+Narishma-gb@users.noreply.github.com> Date: Wed, 3 Sep 2025 17:56:09 +0200 Subject: Label and constant cleanup (#528) * Label cleanup, add some constants instead of raw numbers * Rename load/save game functions to be more explicit --- engine/events/give_pokemon.asm | 2 +- engine/events/prize_menu.asm | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engine/events') diff --git a/engine/events/give_pokemon.asm b/engine/events/give_pokemon.asm index 9e80bdfc..640a3dba 100644 --- a/engine/events/give_pokemon.asm +++ b/engine/events/give_pokemon.asm @@ -20,7 +20,7 @@ _GivePokemon:: callfar SendNewMonToBox ld hl, wStringBuffer ld a, [wCurrentBoxNum] - and $7f + and BOX_NUM_MASK cp 9 jr c, .singleDigitBoxNum sub 9 diff --git a/engine/events/prize_menu.asm b/engine/events/prize_menu.asm index c73d7ab8..15b991ed 100644 --- a/engine/events/prize_menu.asm +++ b/engine/events/prize_menu.asm @@ -2,12 +2,12 @@ CeladonPrizeMenu:: ld b, COIN_CASE call IsItemInBag jr nz, .havingCoinCase - ld hl, RequireCoinCaseTextPtr + ld hl, RequireCoinCaseText jp PrintText .havingCoinCase ld hl, wStatusFlags5 set BIT_NO_TEXT_DELAY, [hl] - ld hl, ExchangeCoinsForPrizesTextPtr + ld hl, ExchangeCoinsForPrizesText call PrintText ; the following are the menu settings xor a @@ -28,7 +28,7 @@ CeladonPrizeMenu:: call TextBoxBorder call GetPrizeMenuId call UpdateSprites - ld hl, WhichPrizeTextPtr + ld hl, WhichPrizeText call PrintText call HandleMenuInput ; menu choice handler bit B_PAD_B, a @@ -42,16 +42,16 @@ CeladonPrizeMenu:: res BIT_NO_TEXT_DELAY, [hl] ret -RequireCoinCaseTextPtr: +RequireCoinCaseText: text_far _RequireCoinCaseText text_waitbutton text_end -ExchangeCoinsForPrizesTextPtr: +ExchangeCoinsForPrizesText: text_far _ExchangeCoinsForPrizesText text_end -WhichPrizeTextPtr: +WhichPrizeText: text_far _WhichPrizeText text_end -- cgit v1.3.1-sl0p