summaryrefslogtreecommitdiff
path: root/engine/menu
diff options
context:
space:
mode:
Diffstat (limited to 'engine/menu')
-rw-r--r--engine/menu/bills_pc.asm22
-rwxr-xr-xengine/menu/diploma.asm2
-rwxr-xr-xengine/menu/naming_screen.asm30
-rwxr-xr-xengine/menu/party_menu.asm16
-rwxr-xr-xengine/menu/pc.asm2
-rwxr-xr-xengine/menu/players_pc.asm18
-rwxr-xr-xengine/menu/pokedex.asm6
-rwxr-xr-xengine/menu/start_sub_menus.asm18
8 files changed, 57 insertions, 57 deletions
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm
index b42a34f0..fcc51af1 100644
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -229,11 +229,11 @@ BillsPCDeposit:
ld a, [wcf91]
call GetCryData
call PlaySoundWaitForCurrent
- ld a, $1
- ld [wcf95], a
- call Func_3a68
+ ld a, PARTY_TO_BOX
+ ld [wMoveMonType], a
+ call MoveMon
xor a
- ld [wcf95], a
+ ld [wRemoveMonFromBox], a
call RemovePokemon
call WaitForSoundToFinish
ld hl, wWhichTrade
@@ -281,11 +281,11 @@ Func_21618: ; 21618 (8:5618)
ld a, [wcf91]
call GetCryData
call PlaySoundWaitForCurrent
- xor a
- ld [wcf95], a
- call Func_3a68
- ld a, $1
- ld [wcf95], a
+ xor a ; BOX_TO_PARTY
+ ld [wMoveMonType], a
+ call MoveMon
+ ld a, 1
+ ld [wRemoveMonFromBox], a
call RemovePokemon
call WaitForSoundToFinish
ld hl, MonIsTakenOutText
@@ -310,7 +310,7 @@ Func_21673: ; 21673 (8:5673)
and a
jr nz, .asm_21682
inc a
- ld [wcf95], a
+ ld [wRemoveMonFromBox], a
call RemovePokemon
call WaitForSoundToFinish
ld a, [wcf91]
@@ -329,7 +329,7 @@ Func_216be: ; 216be (8:56be)
ld a, h
ld [wList + 1], a
xor a
- ld [wcf93], a
+ ld [wPrintItemPrices], a
ld [wListMenuID], a
inc a ; MONSTER_NAME
ld [wNameListType], a
diff --git a/engine/menu/diploma.asm b/engine/menu/diploma.asm
index a1a0e526..a90abdb5 100755
--- a/engine/menu/diploma.asm
+++ b/engine/menu/diploma.asm
@@ -56,7 +56,7 @@ DisplayDiploma: ; 566e2 (15:66e2)
call Delay3
call GBPalNormal
ld a, $90
- ld [$ff48], a
+ ld [rOBP0], a
call WaitForTextScrollButtonPress
ld hl, wd730
res 6, [hl]
diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm
index a5a71b73..b235f7c3 100755
--- a/engine/menu/naming_screen.asm
+++ b/engine/menu/naming_screen.asm
@@ -27,8 +27,8 @@ AskName: ; 64eb (1:64eb)
xor a
ld [wUpdateSpritesEnabled], a
push hl
- ld a, $2
- ld [wd07d], a
+ ld a, NAME_MON_SCREEN
+ ld [wNamingScreenType], a
call DisplayNamingScreen
ld a, [W_ISINBATTLE]
and a
@@ -53,12 +53,12 @@ DoYouWantToNicknameText: ; 0x6557
TX_FAR _DoYouWantToNicknameText
db "@"
-Func_655c: ; 655c (1:655c)
+DisplayNameRaterScreen: ; 655c (1:655c)
ld hl, wHPBarMaxHP
xor a
ld [wUpdateSpritesEnabled], a
- ld a, $2
- ld [wd07d], a
+ ld a, NAME_MON_SCREEN
+ ld [wNamingScreenType], a
call DisplayNamingScreen
call GBPalWhiteOutWithDelay3
call RestoreScreenTilesAndReloadTilePatterns
@@ -114,7 +114,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld hl, wHPBarMaxHP + 1
ld [hli], a
ld [hli], a
- ld [wPartyMonAnimCounter], a
+ ld [wAnimCounter], a
.asm_65ed
call PrintAlphabet
call GBPalNormal
@@ -236,8 +236,8 @@ DisplayNamingScreen: ; 6596 (1:6596)
cp $e4
ld de, Handakutens
jr z, .asm_66e3
- ld a, [wd07d]
- cp $2
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
jr nc, .checkMonNameLength
ld a, [wHPBarMaxHP]
cp $7 ; max length of player/rival names
@@ -377,8 +377,8 @@ Func_680e: ; 680e (1:680e)
ld de, wcf4b
call PlaceString
hlCoord 10, 3
- ld a, [wd07d]
- cp $2
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
jr nc, .asm_6835
ld b, $7
jr .asm_6837
@@ -390,8 +390,8 @@ Func_680e: ; 680e (1:680e)
ld [hli], a
dec b
jr nz, .asm_6839
- ld a, [wd07d]
- cp $2
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
ld a, [wHPBarMaxHP]
jr nc, .asm_684b
cp $7
@@ -405,8 +405,8 @@ Func_680e: ; 680e (1:680e)
ld [wTopMenuItemX], a
ld a, $5
ld [wCurrentMenuItem], a
- ld a, [wd07d]
- cp $2
+ ld a, [wNamingScreenType]
+ cp NAME_MON_SCREEN
ld a, $9
jr nc, .asm_6867
ld a, $6
@@ -462,7 +462,7 @@ CalcStringLength: ; 68eb (1:68eb)
PrintNamingText: ; 68f8 (1:68f8)
hlCoord 0, 1
- ld a, [wd07d]
+ ld a, [wNamingScreenType]
ld de, YourTextString
and a
jr z, .notNickname
diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm
index 6b365e2b..edd65a81 100755
--- a/engine/menu/party_menu.asm
+++ b/engine/menu/party_menu.asm
@@ -1,4 +1,4 @@
-; [wd07d] = menu type / message ID
+; [wPartyMenuTypeOrMessageID] = menu type / message ID
; if less than $F0, it is a menu type
; menu types:
; 00: normal pokemon menu (e.g. Start menu)
@@ -25,11 +25,11 @@ DrawPartyMenu_: ; 12cd2 (4:6cd2)
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
RedrawPartyMenu_: ; 12ce3 (4:6ce3)
- ld a,[wd07d]
- cp a,$04
+ ld a,[wPartyMenuTypeOrMessageID]
+ cp a,SWAP_MONS_PARTY_MENU
jp z,.printMessage
call ErasePartyMenuCursors
- callba SendBlkPacket_PartyMenu ; loads some data to wcf2e
+ callba SendBlkPacket_PartyMenu
hlCoord 3, 0
ld de,wPartySpecies
xor a
@@ -75,10 +75,10 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
inc hl
inc hl
.skipUnfilledRightArrow
- ld a,[wd07d] ; menu type
- cp a,$03
+ ld a,[wPartyMenuTypeOrMessageID] ; menu type
+ cp a,TMHM_PARTY_MENU
jr z,.teachMoveMenu
- cp a,$05
+ cp a,EVO_STONE_PARTY_MENU
jr z,.evolutionStoneMenu
push hl
ld bc,14 ; 14 columns to the right
@@ -196,7 +196,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
push af
push hl
set 6,[hl] ; turn off letter printing delay
- ld a,[wd07d] ; message ID
+ ld a,[wPartyMenuTypeOrMessageID] ; message ID
cp a,$F0
jr nc,.printItemUseMessage
add a
diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm
index edc8a751..2b8b9e92 100755
--- a/engine/menu/pc.asm
+++ b/engine/menu/pc.asm
@@ -135,7 +135,7 @@ RemoveItemByID: ; 17f37 (5:7f37)
jr .asm_17f40
.asm_17f4f
ld a, $1
- ld [wcf96], a
+ ld [wItemQuantity], a
ld a, [$ffdc]
ld [wWhichPokemon], a
ld hl, wNumBagItems
diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm
index e4973dd4..8b433027 100755
--- a/engine/menu/players_pc.asm
+++ b/engine/menu/players_pc.asm
@@ -101,15 +101,15 @@ Func_79ab: ; 79ab (1:79ab)
ld a, h
ld [wList + 1], a
xor a
- ld [wcf93], a
+ ld [wPrintItemPrices], a
ld a, $3
ld [wListMenuID], a
call DisplayListMenuID
jp c, Func_790c
call IsKeyItem
ld a, $1
- ld [wcf96], a
- ld a, [wd124]
+ ld [wItemQuantity], a
+ ld a, [wIsKeyItem]
and a
jr nz, .asm_79e7
ld hl, DepositHowManyText
@@ -155,15 +155,15 @@ Func_7a28: ; 7a28 (1:7a28)
ld a, h
ld [wList + 1], a
xor a
- ld [wcf93], a
+ ld [wPrintItemPrices], a
ld a, $3
ld [wListMenuID], a
call DisplayListMenuID
jp c, Func_790c
call IsKeyItem
ld a, $1
- ld [wcf96], a
- ld a, [wd124]
+ ld [wItemQuantity], a
+ ld a, [wIsKeyItem]
and a
jr nz, .asm_7a64
ld hl, WithdrawHowManyText
@@ -209,7 +209,7 @@ Func_7aa5: ; 7aa5 (1:7aa5)
ld a, h
ld [wList + 1], a
xor a
- ld [wcf93], a
+ ld [wPrintItemPrices], a
ld a, $3
ld [wListMenuID], a
push hl
@@ -220,8 +220,8 @@ Func_7aa5: ; 7aa5 (1:7aa5)
call IsKeyItem
pop hl
ld a, $1
- ld [wcf96], a
- ld a, [wd124]
+ ld [wItemQuantity], a
+ ld a, [wIsKeyItem]
and a
jr nz, .asm_7aef
ld a, [wcf91]
diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm
index e2e53d45..b8686a07 100755
--- a/engine/menu/pokedex.asm
+++ b/engine/menu/pokedex.asm
@@ -22,7 +22,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
xor a
ld [hli],a ; top menu item X
inc a
- ld [wcc37],a
+ ld [wMenuWatchMovingOutOfBounds],a
inc hl
inc hl
ld a,6
@@ -32,7 +32,7 @@ ShowPokedexMenu: ; 40000 (10:4000)
jr c,.goToSideMenu ; if the player chose a pokemon from the list
.exitPokedex
xor a
- ld [wcc37],a
+ ld [wMenuWatchMovingOutOfBounds],a
ld [wCurrentMenuItem],a
ld [wLastMenuItem],a
ld [hJoy7],a
@@ -91,7 +91,7 @@ HandlePokedexSideMenu: ; 4006d (10:406d)
ld [hli],a ; menu watched keys (A button and B button)
xor a
ld [hli],a ; old menu item ID
- ld [wcc37],a
+ ld [wMenuWatchMovingOutOfBounds],a
.handleMenuInput
call HandleMenuInput
bit 1,a ; was the B button pressed?
diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm
index 487daa2d..48a85081 100755
--- a/engine/menu/start_sub_menus.asm
+++ b/engine/menu/start_sub_menus.asm
@@ -12,14 +12,14 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
jp z,RedisplayStartMenu
xor a
ld [wMenuItemToSwap],a
- ld [wd07d],a
+ ld [wPartyMenuTypeOrMessageID],a
ld [wUpdateSpritesEnabled],a
call DisplayPartyMenu
jr .checkIfPokemonChosen
.loop
xor a
ld [wMenuItemToSwap],a
- ld [wd07d],a
+ ld [wPartyMenuTypeOrMessageID],a
call GoBackToPartyMenu
.checkIfPokemonChosen
jr nc,.chosePokemon
@@ -89,8 +89,8 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
cp a,2 ; is there more than one pokemon in the party?
jp c,StartMenu_Pokemon ; if not, no switching
call SwitchPartyMon_Stats
- ld a,$04 ; swap pokemon positions menu
- ld [wd07d],a
+ ld a,SWAP_MONS_PARTY_MENU
+ ld [wPartyMenuTypeOrMessageID],a
call GoBackToPartyMenu
jp .checkIfPokemonChosen
.choseStats
@@ -313,7 +313,7 @@ StartMenu_Item: ; 13302 (4:7302)
ld [hli],a
ld [hl],b ; store item bag pointer at wList (for DisplayListMenuID)
xor a
- ld [wcf93],a
+ ld [wPrintItemPrices],a
ld a,ITEMLISTMENU
ld [wListMenuID],a
ld a,[wcc2c]
@@ -423,7 +423,7 @@ StartMenu_Item: ; 13302 (4:7302)
jp ItemMenuLoop
.tossItem
call IsKeyItem
- ld a,[wd124]
+ ld a,[wIsKeyItem]
and a
jr nz,.skipAskingQuantity
ld a,[wcf91]
@@ -747,7 +747,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ret
.asm_13661
xor a
- ld [wd07d], a
+ ld [wPartyMenuTypeOrMessageID], a
ld a, [wMenuItemToSwap]
dec a
ld b, a
@@ -757,7 +757,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
jr nz, .asm_1367b
xor a
ld [wMenuItemToSwap], a
- ld [wd07d], a
+ ld [wPartyMenuTypeOrMessageID], a
ret
.asm_1367b
ld a, b
@@ -845,7 +845,7 @@ SwitchPartyMon_Stats: ; 13653 (4:7653)
ld [wWhichTrade], a
xor a
ld [wMenuItemToSwap], a
- ld [wd07d], a
+ ld [wPartyMenuTypeOrMessageID], a
pop de
pop hl
ret