diff options
Diffstat (limited to 'engine/menu')
-rw-r--r-- | engine/menu/bills_pc.asm | 128 | ||||
-rwxr-xr-x | engine/menu/naming_screen.asm | 80 | ||||
-rwxr-xr-x | engine/menu/party_menu.asm | 14 | ||||
-rwxr-xr-x | engine/menu/players_pc.asm | 66 | ||||
-rwxr-xr-x | engine/menu/start_sub_menus.asm | 10 | ||||
-rwxr-xr-x | engine/menu/status_screen.asm | 54 | ||||
-rwxr-xr-x | engine/menu/vending_machine.asm | 20 |
7 files changed, 186 insertions, 186 deletions
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index a26c5aed..61e6204e 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -1,6 +1,6 @@ Func_213c8:: ; 213c8 (8:53c8) xor a - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call SaveScreenTilesToBuffer2 ld a, [wd5a2] and a @@ -28,64 +28,64 @@ Func_213c8:: ; 213c8 (8:53c8) call TextBoxBorder call UpdateSprites ld a, $3 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, [wd7f1] bit 0, a jr nz, .asm_21414 hlCoord 2, 2 - ld de, SomeonesPCText ; $548b + ld de, SomeonesPCText jr .asm_2141a .asm_21414 hlCoord 2, 2 - ld de, BillsPCText ; $5497 + ld de, BillsPCText .asm_2141a call PlaceString hlCoord 2, 4 - ld de, wPlayerName ; wd158 + ld de, wPlayerName call PlaceString ld l, c ld h, b - ld de, PlayersPCText ; $54a0 + ld de, PlayersPCText call PlaceString ld a, [wd74b] bit 5, a jr z, .asm_21462 hlCoord 2, 6 - ld de, OaksPCText ; $54a5 + ld de, OaksPCText call PlaceString ld a, [wd5a2] and a jr z, .asm_2145a ld a, $4 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a hlCoord 2, 8 - ld de, PKMNLeaguePCText ; $54b2 + ld de, PKMNLeaguePCText call PlaceString hlCoord 2, 10 - ld de, LogOffPCText ; $54ba + ld de, LogOffPCText jr .asm_2146d .asm_2145a hlCoord 2, 8 - ld de, LogOffPCText ; $54ba + ld de, LogOffPCText jr .asm_2146d .asm_21462 ld a, $2 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a hlCoord 2, 6 - ld de, LogOffPCText ; $54ba + ld de, LogOffPCText .asm_2146d call PlaceString ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld [wMenuWatchedKeys], a ld a, $2 - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a ret SomeonesPCText: db "SOMEONE's PC@" @@ -101,9 +101,9 @@ BillsPC_:: ; 0x214c2 xor a ld [wccd3], a inc a ; MONSTER_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a call LoadHpBarAndStatusTilePatterns - ld a, [wListScrollOffset] ; wcc36 + ld a, [wListScrollOffset] push af ld a, [wFlags_0xcd60] bit 3, a @@ -116,9 +116,9 @@ BillsPC_:: ; 0x214c2 Func_214e8: ; 214e8 (8:54e8) BillsPCMenu: ld a, [wccd3] - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld hl, vChars2 + $780 - ld de, PokeballTileGraphics ; $697e + ld de, PokeballTileGraphics ld bc, (BANK(PokeballTileGraphics) << 8) + $01 call CopyVideoData call LoadScreenTilesFromBuffer2DisableBGTransfer @@ -127,9 +127,9 @@ BillsPCMenu: ld c, $c call TextBoxBorder hlCoord 2, 2 - ld de, BillsPCMenuText ; $56e1 + ld de, BillsPCMenuText call PlaceString - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $2 ld [hli], a dec a @@ -143,10 +143,10 @@ BillsPCMenu: xor a ld [hli], a ld [hli], a - ld hl, wListScrollOffset ; wcc36 + ld hl, wListScrollOffset ld [hli], a ld [hl], a - ld [wPlayerMonNumber], a ; wPlayerMonNumber + ld [wPlayerMonNumber], a ld hl, WhatText call PrintText hlCoord 9, 14 @@ -167,16 +167,16 @@ BillsPCMenu: .asm_21551 Coorda 18, 16 hlCoord 10, 16 - ld de, BoxNoPCText ; $5713 + ld de, BoxNoPCText call PlaceString ld a, $1 - ld [H_AUTOBGTRANSFERENABLED], a ; $ffba + ld [H_AUTOBGTRANSFERENABLED], a call Delay3 call HandleMenuInput bit 1, a jp nz, Func_21588 ; b button call PlaceUnfilledArrowMenuCursor - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wccd3], a and a jp z, Func_21618 ; withdraw @@ -200,28 +200,28 @@ Func_21588: ; 21588 (8:5588) res 5, [hl] call LoadScreenTilesFromBuffer2 pop af - ld [wListScrollOffset], a ; wcc36 + ld [wListScrollOffset], a ld hl, wd730 res 6, [hl] ret Func_215ac: ; 215ac (8:55ac) BillsPCDeposit: - ld a, [wPartyCount] ; wPartyCount + ld a, [wPartyCount] dec a jr nz, .asm_215bb ld hl, CantDepositLastMonText call PrintText jp BillsPCMenu .asm_215bb - ld a, [W_NUMINBOX] ; wda80 + ld a, [W_NUMINBOX] cp MONS_PER_BOX jr nz, .asm_215cb - ld hl, BoxFullText ; $5802 + ld hl, BoxFullText call PrintText jp BillsPCMenu .asm_215cb - ld hl, wPartyCount ; wPartyCount + ld hl, wPartyCount call Func_216be jp c, BillsPCMenu call Func_2174b @@ -236,7 +236,7 @@ BillsPCDeposit: ld [wcf95], a call RemovePokemon call WaitForSoundToFinish - ld hl, wWhichTrade ; wWhichTrade + ld hl, wWhichTrade ld a, [wd5a0] and $7f cp 9 @@ -251,31 +251,31 @@ BillsPCDeposit: .asm_2160c ld [hli], a ld [hl], $50 - ld hl, MonWasStoredText ; $57f8 + ld hl, MonWasStoredText call PrintText jp BillsPCMenu Func_21618: ; 21618 (8:5618) - ld a, [W_NUMINBOX] ; wda80 + ld a, [W_NUMINBOX] and a jr nz, .asm_21627 - ld hl, NoMonText ; $580c + ld hl, NoMonText call PrintText jp Func_214e8 .asm_21627 - ld a, [wPartyCount] ; wPartyCount + ld a, [wPartyCount] cp PARTY_LENGTH jr nz, .asm_21637 - ld hl, CantTakeMonText ; $5811 + ld hl, CantTakeMonText call PrintText jp Func_214e8 .asm_21637 - ld hl, W_NUMINBOX ; wda80 + ld hl, W_NUMINBOX call Func_216be jp c, Func_214e8 call Func_2174b jp nc, Func_214e8 - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] ld hl, wBoxMonNicks call GetPartyMonName ld a, [wcf91] @@ -288,25 +288,25 @@ Func_21618: ; 21618 (8:5618) ld [wcf95], a call RemovePokemon call WaitForSoundToFinish - ld hl, MonIsTakenOutText ; $5807 + ld hl, MonIsTakenOutText call PrintText jp Func_214e8 Func_21673: ; 21673 (8:5673) - ld a, [W_NUMINBOX] ; wda80 + ld a, [W_NUMINBOX] and a jr nz, .asm_21682 - ld hl, NoMonText ; $580c + ld hl, NoMonText call PrintText jp Func_214e8 .asm_21682 - ld hl, W_NUMINBOX ; wda80 + ld hl, W_NUMINBOX call Func_216be jp c, Func_214e8 - ld hl, OnceReleasedText ; $581b + ld hl, OnceReleasedText call PrintText call YesNoChoice - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a jr nz, .asm_21682 inc a @@ -315,7 +315,7 @@ Func_21673: ; 21673 (8:5673) call WaitForSoundToFinish ld a, [wcf91] call PlayCry - ld hl, MonWasReleasedText ; $5820 + ld hl, MonWasReleasedText call PrintText jp Func_214e8 @@ -325,18 +325,18 @@ Func_216b3: ; 216b3 (8:56b3) Func_216be: ; 216be (8:56be) ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a inc a ; MONSTER_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a ld a, [wcc2b] - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a call DisplayListMenuID - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wcc2b], a ret @@ -368,7 +368,7 @@ Func_2171b:: ; 2171b (8:571b) ld a, [hli] push hl push bc - ld hl, HMMoveArray ; $5745 + ld hl, HMMoveArray ld de, 1 call IsInArray pop bc @@ -394,16 +394,16 @@ Func_2174b: ; 2174b (8:574b) call TextBoxBorder ld a, [wccd3] and a - ld de, DepositPCText ; $57cb + ld de, DepositPCText jr nz, .asm_21761 - ld de, WithdrawPCText ; $57d3 + ld de, WithdrawPCText .asm_21761 hlCoord 11, 12 call PlaceString hlCoord 11, 14 - ld de, StatsCancelPCText ; $57dc + ld de, StatsCancelPCText call PlaceString - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $c ld [hli], a ld a, $a @@ -417,16 +417,16 @@ Func_2174b: ; 2174b (8:574b) ld [hli], a xor a ld [hl], a - ld hl, wListScrollOffset ; wcc36 + ld hl, wListScrollOffset ld [hli], a ld [hl], a - ld [wPlayerMonNumber], a ; wPlayerMonNumber + ld [wPlayerMonNumber], a ld [wcc2b], a .asm_2178f call HandleMenuInput bit 1, a jr nz, .asm_2179f - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a jr z, .asm_217a1 dec a diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 5d338628..7506c849 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -2,7 +2,7 @@ AskName: ; 64eb (1:64eb) call SaveScreenTilesToBuffer1 call GetPredefRegisters push hl - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] dec a ld hl, wTileMap ld b, $4 @@ -15,11 +15,11 @@ AskName: ; 64eb (1:64eb) call PrintText hlCoord 14, 7 ld bc, $80f - ld a, $14 + ld a, TWO_OPTION_MENU ld [wTextBoxID], a call DisplayTextBoxID pop hl - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] and a jr nz, .asm_654c ld a, [wUpdateSpritesEnabled] @@ -30,7 +30,7 @@ AskName: ; 64eb (1:64eb) ld a, $2 ld [wd07d], a call DisplayNamingScreen - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a jr nz, .asm_653e call ReloadMapSpriteTilePatterns @@ -66,9 +66,9 @@ Func_655c: ; 655c (1:655c) ld a, [wcf4b] cp $50 jr z, .asm_6594 - ld hl, wPartyMonNicks ; wPartyMonNicks + ld hl, wPartyMonNicks ld bc, $b - ld a, [wWhichPokemon] ; wWhichPokemon + ld a, [wWhichPokemon] call AddNTimes ld e, l ld d, h @@ -99,22 +99,22 @@ DisplayNamingScreen: ; 6596 (1:6596) call TextBoxBorder call PrintNamingText ld a, $3 - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX - ld [wLastMenuItem], a ; wLastMenuItem - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wTopMenuItemX], a + ld [wLastMenuItem], a + ld [wCurrentMenuItem], a ld a, $ff - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld [wMenuWatchedKeys], a ld a, $7 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, $50 ld [wcf4b], a xor a ld hl, wHPBarMaxHP + 1 ld [hli], a ld [hli], a - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM + ld [W_SUBANIMTRANSFORM], a .asm_65ed call PrintAlphabet call GBPalNormal @@ -126,16 +126,16 @@ DisplayNamingScreen: ; 6596 (1:6596) .asm_65fc call PlaceMenuCursor .asm_65ff - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] push af callba AnimatePartyMon_ForceSpeed1 pop af - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a call JoypadLowSensitivity ld a, [hJoyPressed] and a jr z, .asm_65ff - ld hl, .unknownPointerTable_665e ; $665e + ld hl, .unknownPointerTable_665e .asm_661a sla a jr c, .asm_6624 @@ -165,10 +165,10 @@ DisplayNamingScreen: ; 6596 (1:6596) call GoPAL_SET_CF1C call GBPalNormal xor a - ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM + ld [W_SUBANIMTRANSFORM], a ld hl, wd730 res 6, [hl] - ld a, [W_ISINBATTLE] ; W_ISINBATTLE + ld a, [W_ISINBATTLE] and a jp z, LoadTextBoxTilePatterns ld hl, LoadHudTilePatterns @@ -207,21 +207,21 @@ DisplayNamingScreen: ; 6596 (1:6596) ld [wHPBarMaxHP + 1], a ret .asm_6692 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $5 jr nz, .asm_66a0 - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] cp $11 jr z, .asm_668c .asm_66a0 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $6 jr nz, .asm_66ae - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] cp $1 jr z, .asm_667e .asm_66ae - ld hl, wMenuCursorLocation ; wMenuCursorLocation + ld hl, wMenuCursorLocation ld a, [hli] ld h, [hl] ld l, a @@ -270,10 +270,10 @@ DisplayNamingScreen: ; 6596 (1:6596) ld [hl], $50 ret .asm_6702 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $6 ret z - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] cp $11 jp z, .asm_6714 inc a @@ -283,10 +283,10 @@ DisplayNamingScreen: ; 6596 (1:6596) ld a, $1 jr .asm_6755 .asm_6718 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $6 ret z - ld a, [wTopMenuItemX] ; wTopMenuItemX + ld a, [wTopMenuItemX] dec a jp z, .asm_6728 dec a @@ -295,30 +295,30 @@ DisplayNamingScreen: ; 6596 (1:6596) ld a, $11 jr .asm_6755 .asm_672c - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] dec a - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a and a ret nz ld a, $6 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld a, $1 jr .asm_6755 .asm_673e - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] inc a - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a cp $7 jr nz, .asm_6750 ld a, $1 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a jr .asm_6755 .asm_6750 cp $6 ret nz ld a, $1 .asm_6755 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a jp EraseMenuCursor LoadEDTile: ; 675b (1:675b) @@ -402,9 +402,9 @@ Func_680e: ; 680e (1:680e) jr nz, .asm_6867 call EraseMenuCursor ld a, $11 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a ld a, $5 - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld a, [wd07d] cp $2 ld a, $9 @@ -463,10 +463,10 @@ CalcStringLength: ; 68eb (1:68eb) PrintNamingText: ; 68f8 (1:68f8) hlCoord 0, 1 ld a, [wd07d] - ld de, YourTextString ; $693f + ld de, YourTextString and a jr z, .notNickname - ld de, RivalsTextString ; $6945 + ld de, RivalsTextString dec a jr z, .notNickname ld a, [wcf91] @@ -482,13 +482,13 @@ PrintNamingText: ; 68f8 (1:68f8) add hl, bc ld [hl], $c9 hlCoord 1, 3 - ld de, NicknameTextString ; $6953 + ld de, NicknameTextString jr .placeString .notNickname call PlaceString ld l, c ld h, b - ld de, NameTextString ; $694d + ld de, NameTextString .placeString jp PlaceString diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index 10fc4182..97e520c2 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -83,19 +83,19 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) push hl ld bc,14 ; 14 columns to the right add hl,bc - ld de,wcf9c + ld de,wLoadedMonStatus call PrintStatusCondition pop hl push hl ld bc,20 + 1 ; down 1 row and right 1 column - ld a,[$FFF6] + ld a,[hFlags_0xFFF6] set 0,a - ld [$FFF6],a + ld [hFlags_0xFFF6],a add hl,bc - predef Func_128f6 ; draw HP bar and prints current / max HP - ld a,[$FFF6] + predef DrawHP2 ; draw HP bar and prints current / max HP + ld a,[hFlags_0xFFF6] res 0,a - ld [$FFF6],a + ld [hFlags_0xFFF6],a call SetPartyMenuHealthBarColor ; color the HP bar (on SGB) pop hl jr .printLevel @@ -134,7 +134,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3) push hl ld hl,EvosMovesPointerTable ld b,0 - ld a,[wcf98] ; pokemon ID + ld a,[wLoadedMonSpecies] dec a add a rl b diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm index 5f1175eb..147a27a4 100755 --- a/engine/menu/players_pc.asm +++ b/engine/menu/players_pc.asm @@ -2,7 +2,7 @@ PlayerPC: ; 78e6 (1:78e6) ld hl, wd730 set 6, [hl] ld a, ITEM_NAME - ld [W_LISTTYPE], a + ld [wNameListType], a call SaveScreenTilesToBuffer1 xor a ld [wcc2c], a @@ -17,7 +17,7 @@ PlayerPC: ; 78e6 (1:78e6) Func_790c: ; 790c (1:790c) ld a, [wccd3] - ld [wCurrentMenuItem], a ; wCurrentMenuItem + ld [wCurrentMenuItem], a ld hl, wFlags_0xcd60 set 5, [hl] call LoadScreenTilesFromBuffer2 @@ -27,9 +27,9 @@ Func_790c: ; 790c (1:790c) call TextBoxBorder call UpdateSprites hlCoord 2, 2 - ld de, PlayersPCMenuEntries ; $7af5 + ld de, PlayersPCMenuEntries call PlaceString - ld hl, wTopMenuItemY ; wTopMenuItemY + ld hl, wTopMenuItemY ld a, $2 ld [hli], a dec a @@ -42,17 +42,17 @@ Func_790c: ; 790c (1:790c) ld [hli], a xor a ld [hl], a - ld hl, wListScrollOffset ; wcc36 + ld hl, wListScrollOffset ld [hli], a ld [hl], a - ld [wPlayerMonNumber], a ; wPlayerMonNumber + ld [wPlayerMonNumber], a ld hl, WhatDoYouWantText call PrintText call HandleMenuInput bit 1, a jp nz, Func_796d call PlaceUnfilledArrowMenuCursor - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] ld [wccd3], a and a jp z, Func_7a12 @@ -73,7 +73,7 @@ Func_796d: ; 796d (1:796d) res 5, [hl] call LoadScreenTilesFromBuffer2 xor a - ld [wListScrollOffset], a ; wcc36 + ld [wListScrollOffset], a ld [wcc2c], a ld hl, wd730 res 6, [hl] @@ -83,9 +83,9 @@ Func_796d: ; 796d (1:796d) Func_7995: ; 7995 (1:7995) xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wListScrollOffset], a ; wcc36 - ld a, [wNumBagItems] ; wNumBagItems + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld a, [wNumBagItems] and a jr nz, Func_79ab ld hl, NothingToDepositText @@ -95,15 +95,15 @@ Func_7995: ; 7995 (1:7995) Func_79ab: ; 79ab (1:79ab) ld hl, WhatToDepositText call PrintText - ld hl, wNumBagItems ; wNumBagItems + ld hl, wNumBagItems ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a ld a, $3 - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a call DisplayListMenuID jp c, Func_790c call IsKeyItem @@ -118,14 +118,14 @@ Func_79ab: ; 79ab (1:79ab) cp $ff jp z, Func_79ab .asm_79e7 - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems call AddItemToInventory jr c, .asm_79f8 ld hl, NoRoomToStoreText call PrintText jp Func_79ab .asm_79f8 - ld hl, wNumBagItems ; wNumBagItems + ld hl, wNumBagItems call RemoveItemFromInventory call WaitForSoundToFinish ld a, (SFX_02_55 - SFX_Headers_02) / 3 @@ -137,9 +137,9 @@ Func_79ab: ; 79ab (1:79ab) Func_7a12: ; 7a12 (1:7a12) xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wListScrollOffset], a ; wcc36 - ld a, [wNumBoxItems] ; wNumBoxItems + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld a, [wNumBoxItems] and a jr nz, Func_7a28 ld hl, NothingStoredText @@ -149,15 +149,15 @@ Func_7a12: ; 7a12 (1:7a12) Func_7a28: ; 7a28 (1:7a28) ld hl, WhatToWithdrawText call PrintText - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a ld a, $3 - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a call DisplayListMenuID jp c, Func_790c call IsKeyItem @@ -172,14 +172,14 @@ Func_7a28: ; 7a28 (1:7a28) cp $ff jp z, Func_7a28 .asm_7a64 - ld hl, wNumBagItems ; wNumBagItems + ld hl, wNumBagItems call AddItemToInventory jr c, .asm_7a75 ld hl, CantCarryMoreText call PrintText jp Func_7a28 .asm_7a75 - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems call RemoveItemFromInventory call WaitForSoundToFinish ld a, (SFX_02_55 - SFX_Headers_02) / 3 @@ -191,9 +191,9 @@ Func_7a28: ; 7a28 (1:7a28) Func_7a8f: ; 7a8f (1:7a8f) xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wListScrollOffset], a ; wcc36 - ld a, [wNumBoxItems] ; wNumBoxItems + ld [wCurrentMenuItem], a + ld [wListScrollOffset], a + ld a, [wNumBoxItems] and a jr nz, Func_7aa5 ld hl, NothingStoredText @@ -203,15 +203,15 @@ Func_7a8f: ; 7a8f (1:7a8f) Func_7aa5: ; 7aa5 (1:7aa5) ld hl, WhatToTossText call PrintText - ld hl, wNumBoxItems ; wNumBoxItems + ld hl, wNumBoxItems ld a, l - ld [wcf8b], a + ld [wList], a ld a, h - ld [wcf8c], a + ld [wList + 1], a xor a ld [wcf93], a ld a, $3 - ld [wListMenuID], a ; wListMenuID + ld [wListMenuID], a push hl call DisplayListMenuID pop hl diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index cdd93875..589224ab 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -29,8 +29,8 @@ StartMenu_Pokemon: ; 130a9 (4:70a9) call LoadGBPal jp RedisplayStartMenu .chosePokemon - call SaveScreenTilesToBuffer1 ; save screen - ld a,$04 + call SaveScreenTilesToBuffer1 + ld a,FIELD_MOVE_MON_MENU ld [wTextBoxID],a call DisplayTextBoxID ; display pokemon menu options ld hl,wWhichTrade @@ -308,10 +308,10 @@ StartMenu_Item: ; 13302 (4:7302) jr .exitMenu .notInCableClubRoom ld bc,wNumBagItems - ld hl,wcf8b + ld hl,wList ld a,c ld [hli],a - ld [hl],b ; store item bag pointer at wcf8b (for DisplayListMenuID) + ld [hl],b ; store item bag pointer at wList (for DisplayListMenuID) xor a ld [wcf93],a ld a,ITEMLISTMENU @@ -341,7 +341,7 @@ StartMenu_Item: ; 13302 (4:7302) cp a,BICYCLE jp z,.useOrTossItem .notBicycle1 - ld a,$06 ; use/toss menu + ld a,USE_TOSS_MENU_TEMPLATE ld [wTextBoxID],a call DisplayTextBoxID ld hl,wTopMenuItemY diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index f215fd0e..f95a0710 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -4,11 +4,11 @@ StatusScreen: ; 12953 (4:6953) ld a, [wcc49] cp $2 ; 2 means we're in a PC box jr c, .DontRecalculate ; 0x1295b $14 - ld a, [wcf9b] - ld [wcfb9], a + ld a, [wLoadedMonBoxLevel] + ld [wLoadedMonLevel], a ld [W_CURENEMYLVL], a - ld hl, wcfa8 - ld de, wcfba + ld hl, wLoadedMonHPExp - 1 + ld de, wLoadedMonStats ld b, $1 call CalcStats ; Recalculate stats .DontRecalculate @@ -55,13 +55,13 @@ StatusScreen: ; 12953 (4:6953) ld de, Type1Text call PlaceString ; "TYPE1/" hlCoord 11, 3 - predef DrawHP ; predef $5f + predef DrawHP ld hl, wcf25 call GetHealthBarColor ld b, $3 call GoPAL_SET ; SGB palette hlCoord 16, 6 - ld de, wcf9c + ld de, wLoadedMonStatus call PrintStatusCondition jr nz, .StatusWritten ; 0x129fc $9 hlCoord 16, 6 @@ -82,7 +82,7 @@ StatusScreen: ; 12953 (4:6953) ld bc, $8103 ; Zero-padded, 3 call PrintNumber ; Pokémon no. hlCoord 11, 10 - predef Func_27d6b ; Prints the type (?) + predef PrintMonType ld hl, NamePointers2 ; $6a9d call .unk_12a7e ld d, h @@ -96,7 +96,7 @@ StatusScreen: ; 12953 (4:6953) hlCoord 12, 16 call PlaceString ; OT hlCoord 12, 14 - ld de, wcfa4 + ld de, wLoadedMonOTID ld bc, $8205 ; 5 call PrintNumber ; ID Number ld d, $0 @@ -203,14 +203,14 @@ PrintStatsBox: ; 12ae4 (4:6ae4) pop hl pop bc add hl, bc - ld de, wcfbc + ld de, wLoadedMonAttack ld bc, $0203 ; three digits call PrintStat - ld de, wcfbe + ld de, wLoadedMonDefense call PrintStat - ld de, wcfc0 + ld de, wLoadedMonSpeed call PrintStat - ld de, wcfc2 + ld de, wLoadedMonSpecial jp PrintNumber PrintStat push hl @@ -233,13 +233,13 @@ StatusScreen2: ; 12b57 (4:6b57) ld [hTilesetType], a ld [$ffba], a ld bc, $0005 - ld hl, wd0dc + ld hl, wMoves call FillMemory - ld hl, wcfa0 - ld de, wd0dc - ld bc, $0004 + ld hl, wLoadedMonMoves + ld de, wMoves + ld bc, NUM_MOVES call CopyData - callab Func_39b87 + callab FormatMovesString hlCoord 9, 2 ld bc, $050a call ClearScreenArea ; Clear under name @@ -250,7 +250,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld c, $12 call TextBoxBorder ; Draw move container hlCoord 2, 9 - ld de, wd0e1 + ld de, wMovesString call PlaceString ; Print moves ld a, [wcd6c] inc a @@ -269,7 +269,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld a, "-" call Func_12ccb ; Fill the rest with -- .InitPP ; 12bbb - ld hl, wcfa0 + ld hl, wLoadedMonMoves deCoord 14, 10 ld b, $0 .PrintPP ; 12bc3 @@ -323,12 +323,12 @@ StatusScreen2: ; 12b57 (4:6b57) hlCoord 9, 3 ld de, EXPPointsText call PlaceString - ld a, [wcfb9] ; level + ld a, [wLoadedMonLevel] ; level push af cp MAX_LEVEL jr z, .Level100 ; 0x12c20 $4 inc a - ld [wcfb9], a ; Increase temporarily if not 100 + ld [wLoadedMonLevel], a ; Increase temporarily if not 100 .Level100 hlCoord 14, 6 ld [hl], $70 ; 1-tile "to" @@ -336,13 +336,13 @@ StatusScreen2: ; 12b57 (4:6b57) inc hl call PrintLevel pop af - ld [wcfb9], a - ld de, wcfa6 + ld [wLoadedMonLevel], a + ld de, wLoadedMonExp hlCoord 12, 4 ld bc, $0307 call PrintNumber ; exp call .asm_12c86 - ld de, wcfa6 + ld de, wLoadedMonExp hlCoord 7, 6 ld bc, $0307 call PrintNumber @@ -368,13 +368,13 @@ StatusScreen2: ; 12b57 (4:6b57) call GBPalWhiteOut jp ClearScreen .asm_12c86 ; This does some magic with lvl/exp? - ld a, [wcfb9] ; Load level + ld a, [wLoadedMonLevel] ; Load level cp MAX_LEVEL jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100 inc a ld d, a callab CalcExperience - ld hl, wcfa8 + ld hl, wLoadedMonExp + 2 ld a, [$ff98] sub [hl] ld [hld], a @@ -386,7 +386,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld [hld], a ret .asm_12ca7 - ld hl, wcfa6 + ld hl, wLoadedMonExp xor a ld [hli], a ld [hli], a diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm index 1eba782b..88cfcf65 100755 --- a/engine/menu/vending_machine.asm +++ b/engine/menu/vending_machine.asm @@ -1,20 +1,20 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) ld hl, VendingMachineText1 call PrintText - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a call DisplayTextBoxID xor a - ld [wCurrentMenuItem], a ; wCurrentMenuItem - ld [wLastMenuItem], a ; wLastMenuItem + ld [wCurrentMenuItem], a + ld [wLastMenuItem], a ld a, $3 - ld [wMenuWatchedKeys], a ; wMenuWatchedKeys + ld [wMenuWatchedKeys], a ld a, $3 - ld [wMaxMenuItem], a ; wMaxMenuItem + ld [wMaxMenuItem], a ld a, $5 - ld [wTopMenuItemY], a ; wTopMenuItemY + ld [wTopMenuItemY], a ld a, $1 - ld [wTopMenuItemX], a ; wTopMenuItemX + ld [wTopMenuItemX], a ld hl, wd730 set 6, [hl] hlCoord 0, 3 @@ -33,7 +33,7 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) call HandleMenuInput bit 1, a jr nz, .asm_74f93 - ld a, [wCurrentMenuItem] ; wCurrentMenuItem + ld a, [wCurrentMenuItem] cp $3 jr z, .asm_74f93 xor a @@ -66,10 +66,10 @@ VendingMachineMenu: ; 74ee0 (1d:4ee0) ld hl, VendingMachineText5 call PrintText ld hl, $ffde - ld de, wPlayerMoney + 2 ; wd349 + ld de, wPlayerMoney + 2 ld c, $3 predef SubBCDPredef - ld a, $13 + ld a, MONEY_BOX ld [wTextBoxID], a jp DisplayTextBoxID .BagFull |