aboutsummaryrefslogtreecommitdiffstats
path: root/engine/events
diff options
context:
space:
mode:
authorNarishma-gb <194818981+Narishma-gb@users.noreply.github.com>2025-09-03 17:56:09 +0200
committerGitHub <noreply@github.com>2025-09-03 11:56:09 -0400
commit4d2594cb24b7e67cde4e1373c9a2b5e0ae7ff473 (patch)
tree5bd4fce0a314171b46b3962a5db5df6eb5154ee2 /engine/events
parentDocument where badge and elevator floor "items" are used (diff)
downloadpokeyellow-4d2594cb24b7e67cde4e1373c9a2b5e0ae7ff473.tar.gz
pokeyellow-4d2594cb24b7e67cde4e1373c9a2b5e0ae7ff473.tar.xz
pokeyellow-4d2594cb24b7e67cde4e1373c9a2b5e0ae7ff473.zip
Label and constant cleanup (#528)
* Label cleanup, add some constants instead of raw numbers * Rename load/save game functions to be more explicit
Diffstat (limited to 'engine/events')
-rw-r--r--engine/events/give_pokemon.asm2
-rw-r--r--engine/events/prize_menu.asm12
2 files changed, 7 insertions, 7 deletions
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