diff options
Diffstat (limited to 'engine/menu')
-rw-r--r-- | engine/menu/bills_pc.asm | 73 | ||||
-rw-r--r-- | engine/menu/diploma_1.asm | 4 | ||||
-rwxr-xr-x | engine/menu/league_pc.asm | 10 | ||||
-rw-r--r-- | engine/menu/link_menu.asm | 110 | ||||
-rwxr-xr-x | engine/menu/main_menu.asm | 34 | ||||
-rwxr-xr-x | engine/menu/naming_screen.asm | 38 | ||||
-rwxr-xr-x | engine/menu/oaks_pc.asm | 8 | ||||
-rw-r--r-- | engine/menu/options.asm | 78 | ||||
-rwxr-xr-x | engine/menu/party_menu.asm | 38 | ||||
-rwxr-xr-x | engine/menu/pc.asm | 30 | ||||
-rwxr-xr-x | engine/menu/players_pc.asm | 42 | ||||
-rwxr-xr-x | engine/menu/pokedex.asm | 50 | ||||
-rwxr-xr-x | engine/menu/prize_menu.asm | 54 | ||||
-rwxr-xr-x | engine/menu/start_menu.asm | 16 | ||||
-rwxr-xr-x | engine/menu/start_sub_menus.asm | 62 | ||||
-rwxr-xr-x | engine/menu/status_screen.asm | 48 | ||||
-rw-r--r-- | engine/menu/swap_items.asm | 4 | ||||
-rw-r--r-- | engine/menu/text_ids1.asm | 22 | ||||
-rw-r--r-- | engine/menu/text_ids2.asm | 66 | ||||
-rwxr-xr-x | engine/menu/vending_machine.asm | 20 |
20 files changed, 403 insertions, 404 deletions
diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index e104f693..eddccc29 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -1,4 +1,4 @@ -DisplayPCMainMenu:: ; 213c8 (8:5378) +DisplayPCMainMenu:: xor a ld [H_AUTOBGTRANSFERENABLED], a call SaveScreenTilesToBuffer2 @@ -89,7 +89,7 @@ OaksPCText: db "PROF.OAK's PC@" PKMNLeaguePCText: db $4a, "LEAGUE@" LogOffPCText: db "LOG OFF@" -BillsPC_:: ; 2146f (8:546f) +BillsPC_:: ld hl, wd730 set 6, [hl] xor a @@ -108,7 +108,7 @@ BillsPC_:: ; 2146f (8:546f) ld hl, SwitchOnText call PrintText -BillsPCMenu: ; 21495 (8:5495) +BillsPCMenu: ld a, [wParentMenuItem] ld [wCurrentMenuItem], a ld hl, vChars2 + $780 @@ -184,7 +184,7 @@ BillsPCMenu: ; 21495 (8:5495) cp $4 jp z, BillsPCPrintBox -ExitBillsPC: ; 2153e (8:553e) +ExitBillsPC: ld a, [wFlags_0xcd60] bit 3, a ; accessing Bill's PC through another PC? jr nz, .next @@ -203,11 +203,11 @@ ExitBillsPC: ; 2153e (8:553e) res 6, [hl] ret -BillsPCPrintBox: ; 21562 (8:5562) +BillsPCPrintBox: callab PrintPCBox jp BillsPCMenu -BillsPCDeposit: ; 2156d (8:556d) +BillsPCDeposit: ld a, [wPartyCount] dec a jr nz, .partyLargeEnough @@ -254,7 +254,7 @@ BillsPCDeposit: ; 2156d (8:556d) call WaitForSoundToFinish ld hl, wBoxNumString ld a, [wCurrentBoxNum] - and " " + and $7f cp 9 jr c, .singleDigitBoxNum sub 9 @@ -271,11 +271,11 @@ BillsPCDeposit: ; 2156d (8:556d) call PrintText jp BillsPCMenu -SleepingPikachuText2: ; 2160e (8:560e) +SleepingPikachuText2: TX_FAR _SleepingPikachuText2 db "@" -BillsPCWithdraw: ; 21613 (8:5613) +BillsPCWithdraw: ld a, [wNumInBox] and a jr nz, .boxNotEmpty @@ -318,7 +318,7 @@ BillsPCWithdraw: ; 21613 (8:5613) call PrintText jp BillsPCMenu -BillsPCRelease: ; 21690 (8:5690) +BillsPCRelease: ld a, [wNumInBox] and a jr nz, .loop @@ -357,11 +357,11 @@ BillsPCRelease: ; 21690 (8:5690) call PrintText jp BillsPCMenu -BillsPCChangeBox: ; 216e7 (8:56e7) +BillsPCChangeBox: callba ChangeBox jp BillsPCMenu -DisplayMonListMenu: ; 216f2 (8:56f2) +DisplayMonListMenu: ld a, l ld [wListPointer], a ld a, h @@ -378,7 +378,7 @@ DisplayMonListMenu: ; 216f2 (8:56f2) ld [wPartyAndBillsPCSavedMenuItem], a ret -BillsPCMenuText: ; 21715 (8:5715) +BillsPCMenuText: db "WITHDRAW ", $4a next "DEPOSIT ", $4a next "RELEASE ", $4a @@ -387,10 +387,10 @@ BillsPCMenuText: ; 21715 (8:5715) next "SEE YA!" db "@" -BoxNoPCText: ; 21751 (8:5751) +BoxNoPCText: db "BOX No.@" -KnowsHMMove:: ; 21759 (8:5759) +KnowsHMMove:: ; returns whether mon with party index [wWhichPokemon] knows an HM move ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 @@ -417,15 +417,15 @@ KnowsHMMove:: ; 21759 (8:5759) and a ret -HMMoveArray: ; 21783 (8:5783) +HMMoveArray: db CUT db FLY db SURF db STRENGTH db FLASH - db $ff + db -1 -DisplayDepositWithdrawMenu: ; 21789 (8:5789) +DisplayDepositWithdrawMenu: coord hl, 9, 10 lb bc, 6, 9 call TextBoxBorder @@ -497,59 +497,59 @@ StatsCancelPCText: db "STATS" next "CANCEL@" -SwitchOnText: ; 21826 (8:5826) +SwitchOnText: TX_FAR _SwitchOnText db "@" -WhatText: ; 2182b (8:582b) +WhatText: TX_FAR _WhatText db "@" -DepositWhichMonText: ; 21830 (8:5830) +DepositWhichMonText: TX_FAR _DepositWhichMonText db "@" -MonWasStoredText: ; 21835 (8:5835) +MonWasStoredText: TX_FAR _MonWasStoredText db "@" -CantDepositLastMonText: ; 2183a (8:583a) +CantDepositLastMonText: TX_FAR _CantDepositLastMonText db "@" -BoxFullText: ; 2183f (8:583f) +BoxFullText: TX_FAR _BoxFullText db "@" -MonIsTakenOutText: ; 21844 (8:5844) +MonIsTakenOutText: TX_FAR _MonIsTakenOutText db "@" -NoMonText: ; 21849 (8:5849) +NoMonText: TX_FAR _NoMonText db "@" -CantTakeMonText: ; 2184e (8:584e) +CantTakeMonText: TX_FAR _CantTakeMonText db "@" -PikachuUnhappyText: ; 21853 (8:5853) +PikachuUnhappyText: TX_FAR _PikachuUnhappyText db "@" -ReleaseWhichMonText: ; 21858 (8:5858) +ReleaseWhichMonText: TX_FAR _ReleaseWhichMonText db "@" -OnceReleasedText: ; 2185d (8:585d) +OnceReleasedText: TX_FAR _OnceReleasedText db "@" -MonWasReleasedText: ; 21862 (8:5862) +MonWasReleasedText: TX_FAR _MonWasReleasedText db "@" -CableClubLeftGameboy:: ; 21867 (8:5867) +CableClubLeftGameboy:: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK ret z @@ -566,7 +566,7 @@ CableClubLeftGameboy:: ; 21867 (8:5867) call EnableAutoTextBoxDrawing tx_pre_jump JustAMomentText -CableClubRightGameboy:: ; 21887 (8:5887) +CableClubRightGameboy:: ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ret z @@ -583,7 +583,7 @@ CableClubRightGameboy:: ; 21887 (8:5887) call EnableAutoTextBoxDrawing tx_pre_jump JustAMomentText -JustAMomentText:: ; 218a7 (8:58a7) +JustAMomentText:: TX_FAR _JustAMomentText db "@" @@ -593,5 +593,6 @@ JustAMomentText:: ; 218a7 (8:58a7) call EnableAutoTextBoxDrawing tx_pre_jump OpenBillsPCText -OpenBillsPCText:: ; 218ba (8:58ba) - db $FD ; FuncTX_BillsPC
\ No newline at end of file +OpenBillsPCText:: + db $FD ; FuncTX_BillsPC + diff --git a/engine/menu/diploma_1.asm b/engine/menu/diploma_1.asm index db156115..3f309bd2 100644 --- a/engine/menu/diploma_1.asm +++ b/engine/menu/diploma_1.asm @@ -1,4 +1,4 @@ -DisplayDiploma: ; 56714 (15:6714) +DisplayDiploma: call SaveScreenTilesToBuffer2 call GBPalWhiteOutWithDelay3 call ClearScreen @@ -14,4 +14,4 @@ DisplayDiploma: ; 56714 (15:6714) call ReloadTilesetTilePatterns call RestoreScreenTilesAndReloadTilePatterns call Delay3 - jp GBPalNormal
\ No newline at end of file + jp GBPalNormal diff --git a/engine/menu/league_pc.asm b/engine/menu/league_pc.asm index 21ee30b0..9946b90d 100755 --- a/engine/menu/league_pc.asm +++ b/engine/menu/league_pc.asm @@ -1,4 +1,4 @@ -PKMNLeaguePC: ; 75dfe (1d:5dfe) +PKMNLeaguePC: ld hl, AccessedHoFPCText call PrintText ld hl, wd730 @@ -50,7 +50,7 @@ PKMNLeaguePC: ; 75dfe (1d:5dfe) call RunDefaultPaletteCommand jp GBPalNormal -LeaguePCShowTeam: ; 75e65 (1d:5e65) +LeaguePCShowTeam: ld c, PARTY_LENGTH .loop push bc @@ -77,7 +77,7 @@ LeaguePCShowTeam: ; 75e65 (1d:5e65) scf ret -LeaguePCShowMon: ; 75e90 (1d:5e90) +LeaguePCShowMon: call GBPalWhiteOutWithDelay3 call ClearScreen ld hl, wHallOfFame @@ -111,9 +111,9 @@ LeaguePCShowMon: ; 75e90 (1d:5e90) call PrintNumber jpba Func_7033f -HallOfFameNoText: ; 75eef (1d:5eef) +HallOfFameNoText: db "HALL OF FAME No @" -AccessedHoFPCText: ; 75f02 (1d:5f02) +AccessedHoFPCText: TX_FAR _AccessedHoFPCText db "@" diff --git a/engine/menu/link_menu.asm b/engine/menu/link_menu.asm index 4d0beb7e..458f653b 100644 --- a/engine/menu/link_menu.asm +++ b/engine/menu/link_menu.asm @@ -1,4 +1,4 @@ -Func_f531b:: ; f531b (3d:531b) +Func_f531b:: ld c,$14 call DelayFrames ld a,$1 @@ -176,25 +176,25 @@ Func_f531b:: ; f531b (3d:531b) and a ret -Func_f5476:: ; f5476 (3d:5476) +Func_f5476:: ld hl,ColosseumIneligibleText call PrintText -asm_f547c:: ; f547c (3d:574c) +asm_f547c:: jp Func_f531b -asm_f547f:: ; f547f (3d:547f) +asm_f547f:: xor a ld [wUnknownSerialCounter],a ld [wUnknownSerialCounter+1],a scf ret -PointerTable_f5488:: ; f5488 (3d:5488) +PointerTable_f5488:: dw PokeCup dw PikaCup dw PetitCup -PokeCup:: ; f548e (3d:548e) +PokeCup:: ld hl,wPartyCount ld a,[hli] cp $3 @@ -240,7 +240,7 @@ PokeCup:: ; f548e (3d:548e) xor a ret -PikaCup:: ; f54e4 (3d:54e4) +PikaCup:: ld hl,wPartyCount ld a,[hli] cp $3 @@ -286,7 +286,7 @@ PikaCup:: ; f54e4 (3d:54e4) xor a ret -PetitCup:: ; f553a (3d:553a) +PetitCup:: ld hl,wPartyCount ld a,[hli] cp $3 @@ -407,79 +407,79 @@ PetitCup:: ; f553a (3d:553a) xor a ret -NotThreeMonsInParty:: ; f561d (3d:516d) +NotThreeMonsInParty:: ld hl,Colosseum3MonsText call PrintText ld a,$1 ret -MewInParty:: ; f5626 (3d:f5626) +MewInParty:: ld hl,ColosseumMewText call PrintText ld a,$2 ret -DuplicateSpecies:: ; f562f (3d:f562f) +DuplicateSpecies:: ld hl,ColosseumDifferentMonsText call PrintText ld a,$3 ret -LevelAbove55:: ; f5638 (3d:5638) +LevelAbove55:: ld hl,ColosseumMaxL55Text call PrintText ld a,$4 ret -LevelUnder50:: ; f5641 (3d:5641) +LevelUnder50:: ld hl,ColosseumMinL50Text call PrintText ld a,$5 ret -CombinedLevelsGreaterThan155:: ; f5641 (3d:564a) +CombinedLevelsGreaterThan155:: ld hl,ColosseumTotalL155Text call PrintText ld a,$6 ret -LevelAbove30:: ; f5653 (3d:5653) +LevelAbove30:: ld hl,ColosseumMaxL30Text call PrintText ld a,$7 ret -LevelUnder25:: ; f565c (3d:565c) +LevelUnder25:: ld hl,ColosseumMinL25Text call PrintText ld a,$8 ret -CombinedLevelsAbove80:: ; f5665 (3d:5665) +CombinedLevelsAbove80:: ld hl,ColosseumTotalL80Text call PrintText ld a,$9 ret -LevelAbove20:: ; f566e (3d:566e) +LevelAbove20:: ld hl,ColosseumMaxL20Text call PrintText ld a,$a ret -LevelUnder15:: ; f5677 (3d:5677) +LevelUnder15:: ld hl,ColosseumMinL15Text call PrintText ld a,$b ret -CombinedLevelsAbove50:: ; f5680 (3d:5680) +CombinedLevelsAbove50:: ld hl,ColosseumTotalL50Text call PrintText ld a,$c ret -asm_f5689:: ; f5689 (3d:5689) +asm_f5689:: pop af pop bc pop hl @@ -490,7 +490,7 @@ asm_f5689:: ; f5689 (3d:5689) ld a,$d ret -asm_f569b:: ; f569b (3d:569b) +asm_f569b:: pop af pop bc pop hl @@ -501,7 +501,7 @@ asm_f569b:: ; f569b (3d:569b) ld a,$e ret -asm_f56ad:: ; f56ad (3d:56ad) +asm_f56ad:: ld a,[hl] ld [wd11e],a call GetMonName @@ -510,7 +510,7 @@ asm_f56ad:: ; f56ad (3d:56ad) ld a,$f ret -Func_f56bd:: ; f56bd (3d:56bd) +Func_f56bd:: xor a ld [H_AUTOBGTRANSFERENABLED],a coord hl, 1,11 @@ -538,101 +538,101 @@ Func_f56bd:: ; f56bd (3d:56bd) ld [H_AUTOBGTRANSFERENABLED],a ret -PointerTable_f56ee:: ; f56ee (3d:56ee) +PointerTable_f56ee:: dw Text_f56f4 dw Text_f5728 dw Text_f575b -Text_f56f4:: ; f56f4 (3d:56f4) +Text_f56f4:: db "LVs of 3<pkmn>:50-55" next "Sum of LVs:155 MAX" next "MEW can't attend.@" -Text_f5728:: ; f5728 (3d:5728) +Text_f5728:: db "LVs of 3<pkmn>:15-20" next "Sum of LVs:50 MAX" next "MEW can't attend.@" -Text_f575b:: ; f575b (3d:575b) +Text_f575b:: db "3 Basic <pkmn>.LV25-30" next "Sum of LVs:80 MAX" next "6′8″ and 44lb MAX@" -Text_f5791:: ; f5791 (3d:5791) +Text_f5791:: db "View" next "Rules@" -Text_f579c:: ; f579c (3d:579c) +Text_f579c:: db "# Cup" next "Pika Cup" next "Petit Cup" next "CANCEL@" -Colosseum3MonsText:: ; f57bc (3d:57bc) +Colosseum3MonsText:: TX_FAR _Colosseum3MonsText ; a0a2b db "@" -ColosseumMewText:: ; f57c1 (3d:57c1) +ColosseumMewText:: TX_FAR _ColosseumMewText ; a0a46 db "@" -ColosseumDifferentMonsText:: ; f57c6 (3d:57c6) +ColosseumDifferentMonsText:: TX_FAR _ColosseumDifferentMonsText ; a0a5f db "@" -ColosseumMaxL55Text:: ; f57cb (3d:57cb) +ColosseumMaxL55Text:: TX_FAR _ColosseumMaxL55Text ; a0a81 db "@" -ColosseumMinL50Text:: ; f57d0 (3d:57d0) +ColosseumMinL50Text:: TX_FAR _ColosseumMinL50Text ; a0a9a db "@" -ColosseumTotalL155Text:: ; f57d5 (3d:57d5) +ColosseumTotalL155Text:: TX_FAR _ColosseumTotalL155Text ; a0aba db "@" -ColosseumMaxL30Text:: ; f57da (3d:57da) +ColosseumMaxL30Text:: TX_FAR _ColosseumMaxL30Text ; a0ad9 db "@" -ColosseumMinL25Text:: ; f57df (3d:57df) +ColosseumMinL25Text:: TX_FAR _ColosseumMinL25Text ; a0af2 db "@" -ColosseumTotalL80Text:: ; f57e4 (3d:57e4) +ColosseumTotalL80Text:: TX_FAR _ColosseumTotalL80Text ; a0b12 db "@" -ColosseumMaxL20Text:: ; f57e9 (3d:57e9) +ColosseumMaxL20Text:: TX_FAR _ColosseumMaxL20Text ; a0b30 db "@" -ColosseumMinL15Text:: ; f57ee (3d:57ee) +ColosseumMinL15Text:: TX_FAR _ColosseumMinL15Text ; a0b49 db "@" -ColosseumTotalL50Text:: ; f57f3 (3d:57f3) +ColosseumTotalL50Text:: TX_FAR _ColosseumTotalL50Text ; a0b69 db "@" -ColosseumHeightText:: ; f57f8 (3d:57f8) +ColosseumHeightText:: TX_FAR _ColosseumHeightText ; a0b87 db "@" -ColosseumWeightText:: ; f57fd (3d:57fd) +ColosseumWeightText:: TX_FAR _ColosseumWeightText ; a0b9f db "@" -ColosseumEvolvedText:: ; f5802 (3d:5802) +ColosseumEvolvedText:: TX_FAR _ColosseumEvolvedText ; a0bbb db "@" -ColosseumIneligibleText:: ; f5807 (3d:5807) +ColosseumIneligibleText:: TX_FAR _ColosseumIneligibleText ; a0bd4 db "@" -LinkMenu: ; f580c (3d:580c) +LinkMenu: xor a ld [wLetterPrintingDelayFlags], a ld hl, wd72e @@ -871,7 +871,7 @@ LinkMenu: ; f580c (3d:580c) ld a,$f0 jp .next -Func_f59ec:: ; f59ec (3d:59ec) +Func_f59ec:: ld a, b Coorda 6, 5 ld a, c @@ -884,27 +884,27 @@ Func_f59ec:: ; f59ec (3d:59ec) call DelayFrames ret -ColosseumWhereToText: ; f5a02 (3d:5a02) +ColosseumWhereToText: TX_FAR _ColosseumWhereToText db "@" -ColosseumPleaseWaitText: ; f5a07 (3d:5a07) +ColosseumPleaseWaitText: TX_FAR _ColosseumPleaseWaitText db "@" -ColosseumCanceledText: ; f5a0c (3d:5a0c) +ColosseumCanceledText: TX_FAR _ColosseumCanceledText db "@" -ColosseumVersionText: ; f5a11 (3d:5a11) +ColosseumVersionText: TX_FAR _ColosseumVersionText ; 28:4c47 db "@" -TextTerminator_f5a16: ; f5a16 (3d:5a16) +TextTerminator_f5a16: db "@" -TradeCenterText: ; f5a17 (3d:5a17) +TradeCenterText: db "TRADE CENTER" next "COLOSSEUM" next "COLOSSEUM2" - next "CANCEL@"
\ No newline at end of file + next "CANCEL@" diff --git a/engine/menu/main_menu.asm b/engine/menu/main_menu.asm index 669b2ba8..cf837a54 100755 --- a/engine/menu/main_menu.asm +++ b/engine/menu/main_menu.asm @@ -1,4 +1,4 @@ -MainMenu: ; 5ba6 (1:5ba6) +MainMenu: ; Check save file call InitOptions xor a @@ -122,7 +122,7 @@ MainMenu: ; 5ba6 (1:5ba6) call SpecialWarpIn jp SpecialEnterMap -InitOptions: ; 5bff (1:5bff) +InitOptions: ld a,1 ; no delay ld [wLetterPrintingDelayFlags],a ld a,3 ; medium speed @@ -131,7 +131,7 @@ InitOptions: ; 5bff (1:5bff) ld [wPrinterSettings], a ret -Func_5cc1: ; 5cc1 (1:5cc1) +Func_5cc1: ; unused? ld a, $6d cp $80 @@ -140,11 +140,11 @@ Func_5cc1: ; 5cc1 (1:5cc1) call PrintText ret -NotEnoughMemoryText: ; 5ccd (1:5ccd) +NotEnoughMemoryText: TX_FAR _NotEnoughMemoryText db "@" -StartNewGame: ; 5cd2 (1:5cd2) +StartNewGame: ld hl, wd732 res 1, [hl] call OakSpeech @@ -154,7 +154,7 @@ StartNewGame: ; 5cd2 (1:5cd2) call DelayFrames ; enter map after using a special warp or loading the game from the main menu -SpecialEnterMap: ; 5ce4 (1:5ce4) +SpecialEnterMap: xor a ld [hJoyPressed], a ld [hJoyHeld], a @@ -171,14 +171,14 @@ SpecialEnterMap: ; 5ce4 (1:5ce4) ret nz jp EnterMap -ContinueText: ; 5d06 (1:5d06) +ContinueText: db "CONTINUE", $4e -NewGameText: ; 5d0f (1:5d0f) +NewGameText: db "NEW GAME", $4e db "OPTION@" -DisplayContinueGameInfo: ; 5d1f (1:5d1f) +DisplayContinueGameInfo: xor a ld [H_AUTOBGTRANSFERENABLED], a coord hl, 4, 7 @@ -201,7 +201,7 @@ DisplayContinueGameInfo: ; 5d1f (1:5d1f) ld c, 30 jp DelayFrames -PrintSaveScreenText: ; 5d58 (1:5d58) +PrintSaveScreenText: xor a ld [H_AUTOBGTRANSFERENABLED], a coord hl, 4, 0 @@ -226,7 +226,7 @@ PrintSaveScreenText: ; 5d58 (1:5d58) ld c, 30 jp DelayFrames -PrintNumBadges: ; 5d97 (1:5d97) +PrintNumBadges: push hl ld hl, wObtainedBadges ld b, $1 @@ -236,7 +236,7 @@ PrintNumBadges: ; 5d97 (1:5d97) lb bc, 1, 2 jp PrintNumber -PrintNumOwnedMons: ; 5daa (1:5daa) +PrintNumOwnedMons: push hl ld hl, wPokedexOwned ld b, wPokedexOwnedEnd - wPokedexOwned @@ -246,7 +246,7 @@ PrintNumOwnedMons: ; 5daa (1:5daa) lb bc, 1, 3 jp PrintNumber -PrintPlayTime: ; 5dbd (1:5dbd) +PrintPlayTime: ld de, wPlayTimeHours lb bc, 1, 3 call PrintNumber @@ -256,17 +256,17 @@ PrintPlayTime: ; 5dbd (1:5dbd) lb bc, LEADING_ZEROES | 1, 2 jp PrintNumber -SaveScreenInfoText: ; 5dd2 (1:5dd2) +SaveScreenInfoText: db "PLAYER" next "BADGES " next "#DEX " next "TIME@" -DisplayOptionMenu: ; 5df2 (1:5df2) +DisplayOptionMenu: callab DisplayOptionMenu_ ; 10:5c70 ret -CheckForPlayerNameInSRAM: ; 5dfb (1:5dfb) +CheckForPlayerNameInSRAM: ; Check if the player name data in SRAM has a string terminator character ; (indicating that a name may have been saved there) and return whether it does ; in carry. @@ -294,4 +294,4 @@ CheckForPlayerNameInSRAM: ; 5dfb (1:5dfb) ld [MBC1SRamEnable], a ld [MBC1SRamBankingMode], a scf - ret
\ No newline at end of file + ret diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index 0eacc8f6..911c4e99 100755 --- a/engine/menu/naming_screen.asm +++ b/engine/menu/naming_screen.asm @@ -1,4 +1,4 @@ -AskName: ; 625d (1:625d) +AskName: call SaveScreenTilesToBuffer1 call GetPredefRegisters push hl @@ -48,11 +48,11 @@ AskName: ; 625d (1:625d) ld bc, NAME_LENGTH jp CopyData -DoYouWantToNicknameText: ; 62c8 (1:62c8) +DoYouWantToNicknameText: TX_FAR _DoYouWantToNicknameText db "@" -DisplayNameRaterScreen: ; 62cd (1:62cd) +DisplayNameRaterScreen: ld hl, wBuffer xor a ld [wUpdateSpritesEnabled], a @@ -80,7 +80,7 @@ DisplayNameRaterScreen: ; 62cd (1:62cd) scf ret -DisplayNamingScreen: ; 6307 (1:6307) +DisplayNamingScreen: push hl ld hl, wd730 set 6, [hl] @@ -321,7 +321,7 @@ DisplayNamingScreen: ; 6307 (1:6307) ld [wTopMenuItemX], a jp EraseMenuCursor -LoadEDTile: ; 675b (1:675b) +LoadEDTile: ; In Red/Blue, the bank for the ED_tile was defined incorrectly as bank0 ; Luckily, the MBC3 treats loading $0 into $2000-$2fff range as loading bank1 into $4000-$7fff range ; Because Yellow uses the MBC5, loading $0 into $2000 - $2fff range will load bank0 instead of bank1 and thus incorrectly load the tile @@ -345,11 +345,11 @@ LoadEDTile: ; 675b (1:675b) jr nz, .waitForHBlankLoop ret -ED_Tile: ; 64e5 (1:64e5) +ED_Tile: INCBIN "gfx/ED_tile.1bpp" ED_TileEnd: -PrintAlphabet: ; 676f (1:676f) +PrintAlphabet: xor a ld [H_AUTOBGTRANSFERENABLED], a ld a, [wAlphabetCase] @@ -379,13 +379,13 @@ PrintAlphabet: ; 676f (1:676f) ld [H_AUTOBGTRANSFERENABLED], a jp Delay3 -LowerCaseAlphabet: ; 651c (1:651c) +LowerCaseAlphabet: db "abcdefghijklmnopqrstuvwxyz ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥UPPER CASE@" -UpperCaseAlphabet: ; 6554 (1:6554) +UpperCaseAlphabet: db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥lower case@" -PrintNicknameAndUnderscores: ; 658c (1:658c) +PrintNicknameAndUnderscores: call CalcStringLength ld a, c ld [wNamingScreenNameLength], a @@ -439,7 +439,7 @@ PrintNicknameAndUnderscores: ; 658c (1:658c) ld [hl], $77 ; raised underscore tile id ret -DakutensAndHandakutens: ; 65ef (1:65ef) +DakutensAndHandakutens: push de call CalcStringLength dec hl @@ -453,7 +453,7 @@ DakutensAndHandakutens: ; 65ef (1:65ef) ld [wNamingScreenLetter], a ret -Dakutens: ; 6603 (1:6603) +Dakutens: db "かが", "きぎ", "くぐ", "けげ", "こご" db "さざ", "しじ", "すず", "せぜ", "そぞ" db "ただ", "ちぢ", "つづ", "てで", "とど" @@ -464,13 +464,13 @@ Dakutens: ; 6603 (1:6603) db "ハバ", "ヒビ", "フブ", "へべ", "ホボ" db $ff -Handakutens: ; 6654 (1:6654) +Handakutens: db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ" db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" db $ff ; calculates the length of the string at wcf4b and stores it in c -CalcStringLength: ; 6669 (1:6669) +CalcStringLength: ld hl, wcf4b ld c, $0 .loop @@ -481,7 +481,7 @@ CalcStringLength: ; 6669 (1:6669) inc c jr .loop -PrintNamingText: ; 6676 (1:6676) +PrintNamingText: coord hl, 0, 1 ld a, [wNamingScreenType] ld de, YourTextString @@ -513,14 +513,14 @@ PrintNamingText: ; 6676 (1:6676) .placeString jp PlaceString -YourTextString: ; 66bd (1:66bd) +YourTextString: db "YOUR @" -RivalsTextString: ; 66c3 (1:66c3) +RivalsTextString: db "RIVAL's @" -NameTextString: ; 66cb (1:66cb) +NameTextString: db "NAME?@" -NicknameTextString: ; 66d1 (1:66d1) +NicknameTextString: db "NICKNAME?@" diff --git a/engine/menu/oaks_pc.asm b/engine/menu/oaks_pc.asm index ce989bf1..e4172ec7 100755 --- a/engine/menu/oaks_pc.asm +++ b/engine/menu/oaks_pc.asm @@ -1,4 +1,4 @@ -OpenOaksPC: ; 1e2ae (7:62ae) +OpenOaksPC: call SaveScreenTilesToBuffer2 ld hl, AccessedOaksPCText call PrintText @@ -14,14 +14,14 @@ OpenOaksPC: ; 1e2ae (7:62ae) call PrintText jp LoadScreenTilesFromBuffer2 -GetDexRatedText: ; 1e2d4 (7:62d4) +GetDexRatedText: TX_FAR _GetDexRatedText db "@" -ClosedOaksPCText: ; 1e2d9 (7:62d9) +ClosedOaksPCText: TX_FAR _ClosedOaksPCText db $0d,"@" -AccessedOaksPCText: ; 1e2df (7:62df) +AccessedOaksPCText: TX_FAR _AccessedOaksPCText db "@" diff --git a/engine/menu/options.asm b/engine/menu/options.asm index 86a55bd2..7bed30ae 100644 --- a/engine/menu/options.asm +++ b/engine/menu/options.asm @@ -1,4 +1,4 @@ -DisplayOptionMenu_: ; 41c70 (10:5c70) +DisplayOptionMenu_: call Func_41f06 .optionMenuLoop call JoypadLowSensitivity @@ -18,7 +18,7 @@ DisplayOptionMenu_: ; 41c70 (10:5c70) .exitOptionMenu ret -Func_41c95: ; 41c95 (10:5c95) +Func_41c95: ld a, [wOptionsCursorLocation] ld e, a ld d, $0 @@ -30,7 +30,7 @@ Func_41c95: ; 41c95 (10:5c95) ld l, a jp hl -OptionMenuJumpTable: ; 41ca4 (10:5ca4) +OptionMenuJumpTable: dw OptionsMenu_TextSpeed dw OptionsMenu_BattleAnimations dw OptionsMenu_BattleStyle @@ -40,7 +40,7 @@ OptionMenuJumpTable: ; 41ca4 (10:5ca4) dw OptionsMenu_Dummy dw OptionsMenu_Cancel -OptionsMenu_TextSpeed: ; 41cb4 (10:5cb4) +OptionsMenu_TextSpeed: call Func_41d07 ld a, [hJoy5] bit 4, a ; right @@ -84,19 +84,19 @@ OptionsMenu_TextSpeed: ; 41cb4 (10:5cb4) and a ret -TextSpeedStringsPointerTable: ; 41cf2 (10:5cf2) +TextSpeedStringsPointerTable: dw FastText dw MidText dw SlowText -FastText: ; 41cf9 (10:5cf9) +FastText: db "FAST@" -MidText: ; 41cfd (10:5cfd) +MidText: db "MID @" -SlowText: ; 41d02 (10:5d02) +SlowText: db "SLOW@" -Func_41d07: ; 41d07 (10:5d07) +Func_41d07: ld a, [wOptions] and $f cp $5 @@ -116,7 +116,7 @@ Func_41d07: ; 41d07 (10:5d07) lb de, 5, 3 ret -OptionsMenu_BattleAnimations: ; 41d26 (10:5d26) +OptionsMenu_BattleAnimations: ld a, [hJoy5] and D_RIGHT | D_LEFT jr nz, .asm_41d33 @@ -142,16 +142,16 @@ OptionsMenu_BattleAnimations: ; 41d26 (10:5d26) and a ret -AnimationOptionStringsPointerTable: ; 41d52 (10:5d52) +AnimationOptionStringsPointerTable: dw AnimationOnText dw AnimationOffText -AnimationOnText: ; 41d56 (10:5d56) +AnimationOnText: db "ON @" -AnimationOffText: ; 41d5a (10:5d5a) +AnimationOffText: db "OFF@" -OptionsMenu_BattleStyle: ; 41d5e (10:5d5e) +OptionsMenu_BattleStyle: ld a, [hJoy5] and D_LEFT | D_RIGHT jr nz, .asm_41d6b @@ -178,16 +178,16 @@ OptionsMenu_BattleStyle: ; 41d5e (10:5d5e) and a ret -BattleStyleOptionStringsPointerTable: ; 41d8c (10:5d8c) +BattleStyleOptionStringsPointerTable: dw BattleStyleShiftText dw BattleStyleSetText -BattleStyleShiftText: ; 41d90 (10:5d90) +BattleStyleShiftText: db "SHIFT@" -BattleStyleSetText: ; 41d96 (10:5d96) +BattleStyleSetText: db "SET @" -OptionsMenu_SpeakerSettings: ; 41d9c (10:5d9c) +OptionsMenu_SpeakerSettings: ld a, [wOptions] and $30 swap a @@ -230,22 +230,22 @@ OptionsMenu_SpeakerSettings: ; 41d9c (10:5d9c) and a ret -SpeakerOptionStringsPointerTable: ; 41ddc (10:5ddc) +SpeakerOptionStringsPointerTable: dw MonoSoundText dw Earphone1SoundText dw Earphone2SoundText dw Earphone3SoundText -MonoSoundText: ; 41de4 (10:5de4) +MonoSoundText: db "MONO @" -Earphone1SoundText: ; 41dee (10:5dee) +Earphone1SoundText: db "EARPHONE1@" -Earphone2SoundText: ; 41df8 (10:5df8) +Earphone2SoundText: db "EARPHONE2@" -Earphone3SoundText: ; 41e02 (10:5e02) +Earphone3SoundText: db "EARPHONE3@" -OptionsMenu_GBPrinterBrightness: ; 41e0c (10:5e0c) +OptionsMenu_GBPrinterBrightness: call Func_41e7b ld a, [hJoy5] bit 4, a @@ -286,25 +286,25 @@ OptionsMenu_GBPrinterBrightness: ; 41e0c (10:5e0c) and a ret -GBPrinterOptionStringsPointerTable: ; 41e44 (10:5e44) +GBPrinterOptionStringsPointerTable: dw LightestPrintText dw LighterPrintText dw NormalPrintText dw DarkerPrintText dw DarkestPrintText -LightestPrintText: ; 41e4e (10:5e4e) +LightestPrintText: db "LIGHTEST@" -LighterPrintText: ; 41e57 (10:5e57) +LighterPrintText: db "LIGHTER @" -NormalPrintText: ; 41e60 (10:5e60) +NormalPrintText: db "NORMAL @" -DarkerPrintText: ; 41e69 (10:5e69) +DarkerPrintText: db "DARKER @" -DarkestPrintText: ; 41e72 (10:5e72) +DarkestPrintText: db "DARKEST @" -Func_41e7b: ; 41e7b (10:5e7b) +Func_41e7b: ld a, [wPrinterSettings] and a jr z, .asm_41e93 @@ -334,11 +334,11 @@ Func_41e7b: ; 41e7b (10:5e7b) lb de, $60, $0 ret -OptionsMenu_Dummy: ; 41eab (10:5eab) +OptionsMenu_Dummy: and a ret -OptionsMenu_Cancel: ; 41ead (10:5ead) +OptionsMenu_Cancel: ld a, [hJoy5] and A_BUTTON jr nz, .pressedCancel @@ -348,7 +348,7 @@ OptionsMenu_Cancel: ; 41ead (10:5ead) scf ret -Func_41eb7: ; 41eb7 (10:5eb7) +Func_41eb7: ld hl, wOptionsCursorLocation ld a, [hJoy5] cp D_DOWN @@ -388,7 +388,7 @@ Func_41eb7: ; 41eb7 (10:5eb7) scf ret -Func_41ee9: ; 41ee9 (10:5ee9) +Func_41ee9: coord hl, 1, 1 ld de, SCREEN_WIDTH ld c, 16 @@ -404,7 +404,7 @@ Func_41ee9: ; 41ee9 (10:5ee9) ld [hl], "▶" ret -Func_41f06: ; 41f06 (10:5f06) +Func_41f06: coord hl, 0, 0 lb bc, SCREEN_HEIGHT - 2, SCREEN_WIDTH - 2 call TextBoxBorder @@ -432,12 +432,12 @@ Func_41f06: ; 41f06 (10:5f06) call Delay3 ret -AllOptionsText: ; 41f3e (10:5f3e) +AllOptionsText: db "TEXT SPEED :" next "ANIMATION :" next "BATTLESTYLE:" next "SOUND:" next "PRINT:@" -OptionMenuCancelText: ; 41f73 (10:5f73) - db "CANCEL@"
\ No newline at end of file +OptionMenuCancelText: + db "CANCEL@" diff --git a/engine/menu/party_menu.asm b/engine/menu/party_menu.asm index 16bea473..669d49db 100755 --- a/engine/menu/party_menu.asm +++ b/engine/menu/party_menu.asm @@ -17,14 +17,14 @@ ; f6: health returned ; f7: revitalized ; f8: leveled up -DrawPartyMenu_: ; 11875 (4:5875) +DrawPartyMenu_: xor a ld [H_AUTOBGTRANSFERENABLED],a call ClearScreen call UpdateSprites callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics -RedrawPartyMenu_: ; 11886 (4:5886) +RedrawPartyMenu_: ld a,[wPartyMenuTypeOrMessageID] cp a,SWAP_MONS_PARTY_MENU jp z,.printMessage @@ -242,7 +242,7 @@ RedrawPartyMenu_: ; 11886 (4:5886) call PrintText jr .done -PartyMenuItemUseMessagePointers: ; 11a1a (4:5a1a) +PartyMenuItemUseMessagePointers: dw AntidoteText dw BurnHealText dw IceHealText @@ -253,7 +253,7 @@ PartyMenuItemUseMessagePointers: ; 11a1a (4:5a1a) dw ReviveText dw RareCandyText -PartyMenuMessagePointers: ; 11a2c (4:5a2c) +PartyMenuMessagePointers: dw PartyMenuNormalText dw PartyMenuItemUseText dw PartyMenuBattleText @@ -261,65 +261,65 @@ PartyMenuMessagePointers: ; 11a2c (4:5a2c) dw PartyMenuSwapMonText dw PartyMenuItemUseText -PartyMenuNormalText: ; 11a38 (4:5a38) +PartyMenuNormalText: TX_FAR _PartyMenuNormalText db "@" -PartyMenuItemUseText: ; 11a3d (4:5a3d) +PartyMenuItemUseText: TX_FAR _PartyMenuItemUseText db "@" -PartyMenuBattleText: ; 11a42 (4:5a42) +PartyMenuBattleText: TX_FAR _PartyMenuBattleText db "@" -PartyMenuUseTMText: ; 11a47 (4:5a47) +PartyMenuUseTMText: TX_FAR _PartyMenuUseTMText db "@" -PartyMenuSwapMonText: ; 11a4c (4:5a4c) +PartyMenuSwapMonText: TX_FAR _PartyMenuSwapMonText db "@" -PotionText: ; 11a51 (4:5a51) +PotionText: TX_FAR _PotionText db "@" -AntidoteText: ; 11a56 (4:5a56) +AntidoteText: TX_FAR _AntidoteText db "@" -ParlyzHealText: ; 11a5b (4:5a5b) +ParlyzHealText: TX_FAR _ParlyzHealText db "@" -BurnHealText: ; 11a60 (4:5a60) +BurnHealText: TX_FAR _BurnHealText db "@" -IceHealText: ; 11a65 (4:5a65) +IceHealText: TX_FAR _IceHealText db "@" -AwakeningText: ; 11a6a (4:5a6a) +AwakeningText: TX_FAR _AwakeningText db "@" -FullHealText: ; 11a6f (4:5a6f) +FullHealText: TX_FAR _FullHealText db "@" -ReviveText: ; 11a74 (4:5a74) +ReviveText: TX_FAR _ReviveText db "@" -RareCandyText: ; 11a79 (4:5a79) +RareCandyText: TX_FAR _RareCandyText db $0B db $06 db "@" -SetPartyMenuHPBarColor: ; 11a80 (4:5a80) +SetPartyMenuHPBarColor: ld hl, wPartyMenuHPBarColors ld a, [wWhichPartyMenuHPBar] ld c, a diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm index 373ae580..c9e2cf08 100755 --- a/engine/menu/pc.asm +++ b/engine/menu/pc.asm @@ -1,4 +1,4 @@ -ActivatePC: ; 17cb0 (5:7cb0) +ActivatePC: call SaveScreenTilesToBuffer2 ld a, SFX_TURN_ON_PC call PlaySound @@ -9,7 +9,7 @@ ActivatePC: ; 17cb0 (5:7cb0) set 3, [hl] call LoadScreenTilesFromBuffer2 call Delay3 -PCMainMenu: ; 17ccc (5:7ccc) +PCMainMenu: callba DisplayPCMainMenu ld hl, wFlags_0xcd60 set 5, [hl] @@ -58,19 +58,19 @@ PCMainMenu: ; 17ccc (5:7ccc) call PrintText callba PlayerPC jr ReloadMainMenu -OaksPC: ; 17d44 (5:7d44) +OaksPC: ld a, SFX_ENTER_PC call PlaySound call WaitForSoundToFinish callba OpenOaksPC jr ReloadMainMenu -PKMNLeague: ; 17d56 (5:7d56) +PKMNLeague: ld a, SFX_ENTER_PC call PlaySound call WaitForSoundToFinish callba PKMNLeaguePC jr ReloadMainMenu -BillsPC: ; 17d68 (5:7d68) +BillsPC: ld a, SFX_ENTER_PC call PlaySound call WaitForSoundToFinish @@ -83,13 +83,13 @@ BillsPC: ; 17d68 (5:7d68) .printText call PrintText callba BillsPC_ -ReloadMainMenu: ; 17d8a (5:7d8a) +ReloadMainMenu: xor a ld [wDoNotWaitForButtonPressAfterDisplayingText], a call ReloadMapData call UpdateSprites jp PCMainMenu -LogOff: ; 17d97 (5:7d97) +LogOff: ld a, SFX_TURN_OFF_PC call PlaySound call WaitForSoundToFinish @@ -98,24 +98,24 @@ LogOff: ; 17d97 (5:7d97) res 5, [hl] ret -TurnedOnPC1Text: ; 17da7 (5:7da7) +TurnedOnPC1Text: TX_FAR _TurnedOnPC1Text db "@" -AccessedBillsPCText: ; 17dac (5:7dac) +AccessedBillsPCText: TX_FAR _AccessedBillsPCText db "@" -AccessedSomeonesPCText: ; 17db1 (5:7db1) +AccessedSomeonesPCText: TX_FAR _AccessedSomeonesPCText db "@" -AccessedMyPCText: ; 17db6 (5:7db6) +AccessedMyPCText: TX_FAR _AccessedMyPCText db "@" ; removes one of the specified item ID [hItemToRemoveID] from bag (if existent) -RemoveItemByID: ; 17dbb (5:7dbb) +RemoveItemByID: ld hl, wBagItems ld a, [hItemToRemoveID] ld b, a @@ -123,10 +123,10 @@ RemoveItemByID: ; 17dbb (5:7dbb) ld [hItemToRemoveIndex], a .loop ld a, [hli] - cp $ff ; have we reached the cancel button (terminator) + cp -1 ; reached terminator? ret z - cp b ; is the current item the item we want? - jr z, .foundItem ; if so, remove it from the inventory + cp b + jr z, .foundItem inc hl ld a, [hItemToRemoveIndex] inc a diff --git a/engine/menu/players_pc.asm b/engine/menu/players_pc.asm index 38cdf2f6..1cc02cbf 100755 --- a/engine/menu/players_pc.asm +++ b/engine/menu/players_pc.asm @@ -1,4 +1,4 @@ -PlayerPC: ; 778e (1:778e) +PlayerPC: ld a, ITEM_NAME ld [wNameListType], a call SaveScreenTilesToBuffer1 @@ -14,7 +14,7 @@ PlayerPC: ; 778e (1:778e) ld hl, TurnedOnPC2Text call PrintText -PlayerPCMenu: ; 790c (1:790c) +PlayerPCMenu: ld hl, wd730 set 6, [hl] ld a, [wParentMenuItem] @@ -61,7 +61,7 @@ PlayerPCMenu: ; 790c (1:790c) dec a jp z, PlayerPCToss -ExitPlayerPC: ; 7814 (1:7814) +ExitPlayerPC: ld a, [wFlags_0xcd60] bit 3, a ; accessing player's PC through another PC? jr nz, .next @@ -82,7 +82,7 @@ ExitPlayerPC: ; 7814 (1:7814) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ret -PlayerPCDeposit: ; 783c (1:783c) +PlayerPCDeposit: xor a ld [wCurrentMenuItem], a ld [wListScrollOffset], a @@ -136,7 +136,7 @@ PlayerPCDeposit: ; 783c (1:783c) call PrintText jp .loop -PlayerPCWithdraw: ; 78b9 (1:78b9) +PlayerPCWithdraw: xor a ld [wCurrentMenuItem], a ld [wListScrollOffset], a @@ -190,7 +190,7 @@ PlayerPCWithdraw: ; 78b9 (1:78b9) call PrintText jp .loop -PlayerPCToss: ; 7936 (1:7936) +PlayerPCToss: xor a ld [wCurrentMenuItem], a ld [wListScrollOffset], a @@ -239,64 +239,64 @@ PlayerPCToss: ; 7936 (1:7936) call TossItem ; disallows tossing key items jp .loop -PlayersPCMenuEntries: ; 799c (1:799c) +PlayersPCMenuEntries: db "WITHDRAW ITEM" next "DEPOSIT ITEM" next "TOSS ITEM" next "LOG OFF@" -TurnedOnPC2Text: ; 79c9 (1:79c9) +TurnedOnPC2Text: TX_FAR _TurnedOnPC2Text db "@" -WhatDoYouWantText: ; 79ce (1:79ce) +WhatDoYouWantText: TX_FAR _WhatDoYouWantText db "@" -WhatToDepositText: ; 79d3 (1:79d3) +WhatToDepositText: TX_FAR _WhatToDepositText db "@" -DepositHowManyText: ; 79d8 (1:79d8) +DepositHowManyText: TX_FAR _DepositHowManyText db "@" -ItemWasStoredText: ; 79dd (1:79dd) +ItemWasStoredText: TX_FAR _ItemWasStoredText db "@" -NothingToDepositText: ; 79e2 (1:79e2) +NothingToDepositText: TX_FAR _NothingToDepositText db "@" -NoRoomToStoreText: ; 79e7 (1:79e7) +NoRoomToStoreText: TX_FAR _NoRoomToStoreText db "@" -WhatToWithdrawText: ; 79ec (1:79ec) +WhatToWithdrawText: TX_FAR _WhatToWithdrawText db "@" -WithdrawHowManyText: ; 79f1 (1:79f1) +WithdrawHowManyText: TX_FAR _WithdrawHowManyText db "@" -WithdrewItemText: ; 79f6 (1:79f6) +WithdrewItemText: TX_FAR _WithdrewItemText db "@" -NothingStoredText: ; 79fb (1:79fb) +NothingStoredText: TX_FAR _NothingStoredText db "@" -CantCarryMoreText: ; 7a00 (1:7a00) +CantCarryMoreText: TX_FAR _CantCarryMoreText db "@" -WhatToTossText: ; 7a05 (1:7a05) +WhatToTossText: TX_FAR _WhatToTossText db "@" -TossHowManyText: ; 7a0a (1:7a0a) +TossHowManyText: TX_FAR _TossHowManyText db "@" diff --git a/engine/menu/pokedex.asm b/engine/menu/pokedex.asm index 7715500b..166e026d 100755 --- a/engine/menu/pokedex.asm +++ b/engine/menu/pokedex.asm @@ -1,4 +1,4 @@ -ShowPokedexMenu: ; 40000 (10:4000) +ShowPokedexMenu: call GBPalWhiteOut call ClearScreen call UpdateSprites @@ -61,7 +61,7 @@ ShowPokedexMenu: ; 40000 (10:4000) ; 00: showed pokemon data or area ; 01: the player chose Quit ; 02: the pokemon has not been seen yet or the player pressed the B button -HandlePokedexSideMenu: ; 40070 (10:4070) +HandlePokedexSideMenu: call PlaceUnfilledArrowMenuCursor ld a, [wCurrentMenuItem] push af @@ -179,7 +179,7 @@ HandlePokedexSideMenu: ; 40070 (10:4070) ; handles the list of pokemon on the left of the pokedex screen ; sets carry flag if player presses A, unsets carry flag if player presses B -HandlePokedexListMenu: ; 40140 (10:4140) +HandlePokedexListMenu: call Pokedex_DrawInterface .loop call Pokedex_PlacePokemonList @@ -255,7 +255,7 @@ HandlePokedexListMenu: ; 40140 (10:4140) and a ret -Pokedex_DrawInterface: ; 401c2 (10:41c2) +Pokedex_DrawInterface: xor a ld [H_AUTOBGTRANSFERENABLED], a ; draw the horizontal line separating the seen and owned amounts from the menu @@ -317,7 +317,7 @@ Pokedex_DrawInterface: ; 401c2 (10:41c2) ld [wDexMaxSeenMon], a ret -DrawPokedexVerticalLine: ; 40243 (10:4243) +DrawPokedexVerticalLine: ld c, 9 ; height of line ld de, SCREEN_WIDTH ; width of screen ld a, $71 ; vertical line tile @@ -329,23 +329,23 @@ DrawPokedexVerticalLine: ; 40243 (10:4243) jr nz, .loop ret -PokedexSeenText: ; 40252 (10:4252) +PokedexSeenText: db "SEEN@" -PokedexOwnText: ; 40257 (10:4257) +PokedexOwnText: db "OWN@" -PokedexContentsText: ; 4025b (10:425b) +PokedexContentsText: db "CONTENTS@" -PokedexMenuItemsText: ; 40264 (10:4264) +PokedexMenuItemsText: db "DATA" next "CRY" next "AREA" next "PRNT" next "QUIT@" -Pokedex_PlacePokemonList: ; 4027c (10:427c) +Pokedex_PlacePokemonList: xor a ld [H_AUTOBGTRANSFERENABLED], a coord hl, 4, 2 @@ -393,7 +393,6 @@ Pokedex_PlacePokemonList: ; 4027c (10:427c) jr nz, .getPokemonName ; if the player has seen the pokemon ld de, .dashedLine ; print a dashed line in place of the name if the player hasn't seen the pokemon jr .skipGettingName - .dashedLine ; for unseen pokemon in the list db "----------@" .getPokemonName @@ -420,7 +419,7 @@ Pokedex_PlacePokemonList: ; 4027c (10:427c) ; INPUT: ; [wd11e] = pokedex number ; hl = address of bit field -IsPokemonBitSet: ; 40303 (10:4303) +IsPokemonBitSet: ld a, [wd11e] dec a ld c, a @@ -431,14 +430,14 @@ IsPokemonBitSet: ; 40303 (10:4303) ret ; function to display pokedex data from outside the pokedex -ShowPokedexData: ; 40312 (10:4312) +ShowPokedexData: call GBPalWhiteOutWithDelay3 call ClearScreen call UpdateSprites callab LoadPokedexTilePatterns ; load pokedex tiles ; function to display pokedex data from inside the pokedex -ShowPokedexDataInternal: ; 40323 (10:4323) +ShowPokedexDataInternal: ld hl, wd72c set 1, [hl] ld a, $33 ; 3/7 volume @@ -475,23 +474,23 @@ ShowPokedexDataInternal: ; 40323 (10:4323) ld [rNR50], a ret -HeightWeightText: ; 40370 (10:4370) +HeightWeightText: db "HT ?", $60, "??", $61 next "WT ???lb@" ; XXX does anything point to this? -PokeText: ; 40385 (10:4385) +PokeText: db "#@" ; horizontal line that divides the pokedex text description from the rest of the data -PokedexDataDividerLine: ; 40387 (10:4387) +PokedexDataDividerLine: db $68, $69, $6B, $69, $6B db $69, $6B, $69, $6B, $6B db $6B, $6B, $69, $6B, $69 db $6B, $69, $6B, $69, $6A db "@" -DrawDexEntryOnScreen: ; 4039c (10:439c) +DrawDexEntryOnScreen: call ClearScreen coord hl, 0, 0 @@ -519,10 +518,9 @@ DrawDexEntryOnScreen: ; 4039c (10:439c) ld a, $6c ; lower left corner tile Coorda 0, 17 ld a, $6e ; lower right corner tile - Coorda 19, 17 - coord hl, 0, 9 + coord hl, 0, 9 ld de, PokedexDataDividerLine call PlaceString ; draw horizontal divider line @@ -649,9 +647,9 @@ DrawDexEntryOnScreen: ; 4039c (10:439c) scf ret -Pokedex_PrintFlavorTextAtRow11: ; 404ae (10:44ae) +Pokedex_PrintFlavorTextAtRow11: coord bc, 1, 11 -Pokedex_PrintFlavorTextAtBC: ; 404b1 (10:44b1) +Pokedex_PrintFlavorTextAtBC: ld a, 2 ld [$fff9], a call TextCommandProcessor ; print pokedex description text @@ -659,7 +657,7 @@ Pokedex_PrintFlavorTextAtBC: ; 404b1 (10:44b1) ld [$fff9], a ret -Pokedex_PrepareDexEntryForPrinting: ; 404bc (10:44bc) +Pokedex_PrepareDexEntryForPrinting: coord hl, 0, 0 ld de, SCREEN_WIDTH lb bc, $66, $d @@ -695,7 +693,7 @@ Pokedex_PrepareDexEntryForPrinting: ; 404bc (10:44bc) ; c = number of tile ID's to write ; de = amount to destination address after each tile (1 for horizontal, 20 for vertical) ; hl = destination address -DrawTileLine: ; 40501 (10:4501) +DrawTileLine: push bc push de .loop @@ -709,7 +707,7 @@ DrawTileLine: ; 40501 (10:4501) INCLUDE "data/pokedex_entries.asm" -PokedexToIndex: ; 41086 (10:5086) +PokedexToIndex: ; converts the Pokédex number at wd11e to an index push bc push hl @@ -730,7 +728,7 @@ PokedexToIndex: ; 41086 (10:5086) pop bc ret -IndexToPokedex: ; 4109d (10:509d) +IndexToPokedex: ; converts the indexédex number at wd11e to a Pokédex number push bc push hl diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm index 0fedcca4..d1b1be3c 100755 --- a/engine/menu/prize_menu.asm +++ b/engine/menu/prize_menu.asm @@ -1,4 +1,4 @@ -CeladonPrizeMenu: ; 5267d (14:667d) +CeladonPrizeMenu: ld b,COIN_CASE call IsItemInBag jr nz,.havingCoinCase @@ -33,7 +33,7 @@ CeladonPrizeMenu: ; 5267d (14:667d) bit 1,a ; keypress = B (Cancel) jr nz, .noChoice ld a,[wCurrentMenuItem] - cp $03 ; "NO,THANKS" choice + cp 3 ; "NO,THANKS" choice jr z, .noChoice call HandlePrizeChoice .noChoice @@ -41,20 +41,20 @@ CeladonPrizeMenu: ; 5267d (14:667d) res 6, [hl] ret -RequireCoinCaseTextPtr: ; 526df (14:66df) +RequireCoinCaseTextPtr: TX_FAR _RequireCoinCaseText db $0D db "@" -ExchangeCoinsForPrizesTextPtr: ; 526e5 (14:66e5) +ExchangeCoinsForPrizesTextPtr: TX_FAR _ExchangeCoinsForPrizesText db "@" -WhichPrizeTextPtr: ; 526ea (14:66ea) +WhichPrizeTextPtr: TX_FAR _WhichPrizeText db "@" -GetPrizeMenuId: ; 526ef (14:66ef) +GetPrizeMenuId: ; determine which one among the three ; prize-texts has been selected ; using the text ID (stored in [hSpriteIndexOrTextID]) @@ -68,7 +68,7 @@ GetPrizeMenuId: ; 526ef (14:66ef) ld [wWhichPrizeWindow], a ; prize-texts' id (relative, i.e. 0, 1 or 2) add a add a - ld d, $0 + ld d, 0 ld e, a ld hl, PrizeDifferentMenuPtrs add hl, de @@ -84,10 +84,10 @@ GetPrizeMenuId: ; 526ef (14:66ef) ld h, [hl] ld l, a ld de, wPrize1Price - ld bc, $6 + ld bc, 6 call CopyData ld a, [wWhichPrizeWindow] - cp $02 ;is TM_menu? + cp 2 ;is TM_menu? jr nz, .putMonName ld a, [wPrize1] ld [wd11e], a @@ -144,21 +144,21 @@ GetPrizeMenuId: ; 526ef (14:66ef) ld c, (1 << 7 | 2) jp PrintBCDNumber -NoThanksText: ; 527a4 (14:67a4) +NoThanksText: db "NO THANKS@" INCLUDE "data/prizes.asm" -PrintPrizePrice: ; 527db (14:67db) +PrintPrizePrice: coord hl, 11, 0 lb bc, 1, 7 call TextBoxBorder call UpdateSprites coord hl, 12, 0 - ld de, CoinString + ld de, .CoinString call PlaceString coord hl, 13, 1 - ld de, SixSpacesString + ld de, .SixSpacesString call PlaceString coord hl, 13, 1 ld de,wPlayerCoins @@ -166,16 +166,16 @@ PrintPrizePrice: ; 527db (14:67db) call PrintBCDNumber ret -CoinString: ; 52805 (14:6805) +.CoinString: db "COIN@" -SixSpacesString: ; 5280a (14:680a) +.SixSpacesString: db " @" -LoadCoinsToSubtract: ; 52811 (14:6811) +LoadCoinsToSubtract: ld a,[wWhichPrize] add a - ld d, $0 + ld d, 0 ld e, a ld hl, wPrize1Price add hl, de ; get selected prize's price @@ -187,17 +187,17 @@ LoadCoinsToSubtract: ; 52811 (14:6811) ld [hCoins + 1], a ret -HandlePrizeChoice: ; 52826 (14:6826) +HandlePrizeChoice: ld a, [wCurrentMenuItem] ld [wWhichPrize], a - ld d, $0 + ld d, 0 ld e, a ld hl, wPrize1 add hl, de ld a, [hl] ld [wd11e], a ld a, [wWhichPrizeWindow] - cp $02 ; is prize a TM? + cp 2 ; is prize a TM? jr nz, .getMonName call GetItemName jr .givePrize @@ -261,35 +261,35 @@ HandlePrizeChoice: ; 52826 (14:6826) ld hl,OhFineThenTextPtr jp PrintText -UnknownData528b1: ; 528b1 (14:68b1) +UnknownPrizeData: ; XXX what's this? db $00,$01,$00,$01,$00,$01,$00,$00,$01 -HereYouGoTextPtr: ; 528ca (14:68ba) +HereYouGoTextPtr: TX_FAR _HereYouGoText db $0D db "@" -SoYouWantPrizeTextPtr: ; 528c0 (14:68c0) +SoYouWantPrizeTextPtr: TX_FAR _SoYouWantPrizeText db "@" -SorryNeedMoreCoinsText: ; 528c5 (14:68c5) +SorryNeedMoreCoinsText: TX_FAR _SorryNeedMoreCoinsText db $0D db "@" -PrizeRoomBagIsFullTextPtr: ; 528cb (14:68cb) +PrizeRoomBagIsFullTextPtr: TX_FAR _OopsYouDontHaveEnoughRoomText db $0D db "@" -OhFineThenTextPtr: ; 528d1 (14:68d1) +OhFineThenTextPtr: TX_FAR _OhFineThenText db $0D ; wait keypress (A/B) without blink db "@" -GetPrizeMonLevel: ; 528d7 (14:68d7) +GetPrizeMonLevel: ld a, [wcf91] ld b, a ld hl, PrizeMonLevelDictionary diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm index 3eeb1c07..af687432 100755 --- a/engine/menu/start_menu.asm +++ b/engine/menu/start_menu.asm @@ -1,13 +1,13 @@ -DisplayStartMenu:: ; 29d1 (0:29d1) +DisplayStartMenu:: switchbank StartMenu_Pokedex ; also bank for other functions ld a, [wWalkBikeSurfState] ; walking/biking/surfing ld [wWalkBikeSurfStateCopy], a - ld a, $8f ; (SFX_02_3f - SFX_Headers_02) / 3 ; Start menu sound + ld a, SFX_START_MENU call PlaySound -RedisplayStartMenu:: ; 29e1 (0:29e1) +RedisplayStartMenu:: callba DrawStartMenu -RedisplayStartMenu_DoNotDrawStartMenu: ; 29e9 (0:29e9) +RedisplayStartMenu_DoNotDrawStartMenu: callba PrintSafariZoneSteps ; print Safari Zone info, if in Safari Zone call UpdateSprites .loop @@ -23,7 +23,7 @@ RedisplayStartMenu_DoNotDrawStartMenu: ; 29e9 (0:29e9) and a jr nz, .loop ; if the player pressed tried to go past the top item, wrap around to the bottom - CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a, 6 ; there are 7 menu items with the pokedex, so the max index is 6 jr nz, .wrapMenuItemId dec a ; there are only 6 menu items without the pokedex @@ -35,7 +35,7 @@ RedisplayStartMenu_DoNotDrawStartMenu: ; 29e9 (0:29e9) bit 7, a jr z, .buttonPressed ; if the player pressed tried to go past the bottom item, wrap around to the top - CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a, [wCurrentMenuItem] ld c, 7 ; there are 7 menu items with the pokedex jr nz, .checkIfPastBottom @@ -56,7 +56,7 @@ RedisplayStartMenu_DoNotDrawStartMenu: ; 29e9 (0:29e9) and a, %00001010 ; was the Start button or B button pressed? jp nz, CloseStartMenu call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2 - CheckEvent EVENT_GOT_POKEDEX ; does the player have the pokedex? + CheckEvent EVENT_GOT_POKEDEX ld a, [wCurrentMenuItem] jr nz, .displayMenuItem inc a ; adjust position to account for missing pokedex menu item @@ -75,7 +75,7 @@ RedisplayStartMenu_DoNotDrawStartMenu: ; 29e9 (0:29e9) jp z, StartMenu_Option ; EXIT falls through to here -CloseStartMenu:: ; 2a72 (0:2a72) +CloseStartMenu:: call Joypad ld a, [hJoyPressed] bit 0, a ; was A button newly pressed? diff --git a/engine/menu/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 792903b7..94469960 100755 --- a/engine/menu/start_sub_menus.asm +++ b/engine/menu/start_sub_menus.asm @@ -1,4 +1,4 @@ -StartMenu_Pokedex: ; 11c22 (4:5c22) +StartMenu_Pokedex: predef ShowPokedexMenu call LoadScreenTilesFromBuffer2 ; restore saved screen call Delay3 @@ -6,7 +6,7 @@ StartMenu_Pokedex: ; 11c22 (4:5c22) call UpdateSprites jp RedisplayStartMenu -StartMenu_Pokemon: ; 11c36 (4:5c36) +StartMenu_Pokemon: ld a,[wPartyCount] and a jp z,RedisplayStartMenu @@ -129,7 +129,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) dw .dig dw .teleport dw .softboiled -.fly ; 11d1b (4:5d1b) +.fly bit 2,a ; does the player have the Thunder Badge? jp z,.newBadgeRequired call CheckIfInOutsideMap @@ -160,7 +160,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) and a jp z,.loop jp CloseTextDisplay -.surf ; 11d66 (4:5d66) +.surf bit 4,a ; does the player have the Soul Badge? jp z,.newBadgeRequired callba IsSurfingAllowed @@ -190,13 +190,13 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) xor a ld [wd473], a jp .loop -.strength ; 11dab (4:5dab) +.strength bit 3,a ; does the player have the Rainbow Badge? jp z,.newBadgeRequired predef PrintStrengthTxt call GBPalWhiteOutWithDelay3 jp .goBackToMap -.flash ; 11dbb (4:5dbb) +.flash bit 0,a ; does the player have the Boulder Badge? jp z,.newBadgeRequired xor a @@ -208,7 +208,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) .flashLightsAreaText TX_FAR _FlashLightsAreaText db "@" -.dig ; 11dd5 (4:5dd5) +.dig ld a,ESCAPE_ROPE ld [wcf91],a ld [wPseudoItemID],a @@ -218,7 +218,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) jp z,.loop call GBPalWhiteOutWithDelay3 jp .goBackToMap -.teleport ; 11ded (4:5ded) +.teleport call CheckIfInOutsideMap jr z,.canTeleport ld a,[wWhichPokemon] @@ -239,7 +239,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) res 4,[hl] ld c,60 call DelayFrames - call GBPalWhiteOutWithDelay3 ; zero all three palettes and wait 3 frames + call GBPalWhiteOutWithDelay3 jp .goBackToMap .warpToLastPokemonCenterText TX_FAR _WarpToLastPokemonCenterText @@ -250,7 +250,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) .cannotFlyHereText TX_FAR _CannotFlyHereText db "@" -.softboiled ; 11e35 (4:5e35) +.softboiled ld hl,wPartyMon1MaxHP ld a,[wWhichPokemon] ld bc,wPartyMon2 - wPartyMon1 @@ -301,7 +301,7 @@ StartMenu_Pokemon: ; 11c36 (4:5c36) db "@" ; writes a blank tile to all possible menu cursor positions on the party menu -ErasePartyMenuCursors: ; 11e98 (4:5e98) +ErasePartyMenuCursors: coord hl, 0, 1 ld bc,2 * 20 ; menu cursor positions are 2 rows apart ld a,6 ; 6 menu cursor positions @@ -312,11 +312,11 @@ ErasePartyMenuCursors: ; 11e98 (4:5e98) jr nz,.loop ret -ItemMenuLoop: ; 11ea7 (4:5ea7) +ItemMenuLoop: call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen call RunDefaultPaletteCommand -StartMenu_Item: ; 11ead (4:5ead) +StartMenu_Item: ld a,[wLinkState] dec a ; is the player in the Colosseum or Trade Centre? jr nz,.notInCableClubRoom @@ -454,16 +454,16 @@ StartMenu_Item: ; 11ead (4:5ead) .tossZeroItems jp ItemMenuLoop -CannotUseItemsHereText: ; 11fd4 (4:5fd4) +CannotUseItemsHereText: TX_FAR _CannotUseItemsHereText db "@" -CannotGetOffHereText: ; 11fd9 (4:5fd9) +CannotGetOffHereText: TX_FAR _CannotGetOffHereText db "@" ; items which bring up the party menu when used -UsableItems_PartyMenu: ; 11fde (4:5fde) +UsableItems_PartyMenu: db MOON_STONE db ANTIDOTE db BURN_HEAL @@ -503,7 +503,7 @@ UsableItems_PartyMenu: ; 11fde (4:5fde) db $ff ; items which close the item menu when used -UsableItems_CloseMenu: ; 12003 (4:6003) +UsableItems_CloseMenu: db ESCAPE_ROPE db ITEMFINDER db POKE_FLUTE @@ -512,7 +512,7 @@ UsableItems_CloseMenu: ; 12003 (4:6003) db SUPER_ROD db $ff -StartMenu_TrainerInfo: ; 1200a (4:600a) +StartMenu_TrainerInfo: call GBPalWhiteOut call ClearScreen call UpdateSprites @@ -538,7 +538,7 @@ StartMenu_TrainerInfo: ; 1200a (4:600a) jp RedisplayStartMenu_DoNotDrawStartMenu ; loads tile patterns and draws everything except for gym leader faces / badges -DrawTrainerInfo: ; 1204c (4:604c) +DrawTrainerInfo: ld de,RedPicFront lb bc, BANK(RedPicFront), $01 predef DisplayPicCenteredOrUpperRight @@ -627,17 +627,17 @@ DrawTrainerInfo: ; 1204c (4:604c) lb bc, LEADING_ZEROES | 1, 2 jp PrintNumber -TrainerInfo_FarCopyData: ; 12131 (4:6131) +TrainerInfo_FarCopyData: ld a,BANK(TrainerInfoTextBoxTileGraphics) jp FarCopyData -TrainerInfo_NameMoneyTimeText: ; 12136 (4:6136) +TrainerInfo_NameMoneyTimeText: db "NAME/" next "MONEY/" next "TIME/@" ; $76 is a circle tile -TrainerInfo_BadgesText: ; 12149 (4:6149) +TrainerInfo_BadgesText: db $76,"BADGES",$76,"@" ; draws a text box on the trainer info screen @@ -647,7 +647,7 @@ TrainerInfo_BadgesText: ; 12149 (4:6149) ; [wTrainerInfoTextBoxWidthPlus1] = width ; [wTrainerInfoTextBoxWidth] = width - 1 ; [wTrainerInfoTextBoxNextRowOffset] = distance from the end of a text box row to the start of the next -TrainerInfo_DrawTextBox: ; 12152 (4:6152) +TrainerInfo_DrawTextBox: ld a,$79 ; upper left corner tile ID lb de, $7a, $7b ; top edge and upper right corner tile ID's call TrainerInfo_DrawHorizontalEdge ; draw top edge @@ -666,7 +666,7 @@ TrainerInfo_DrawTextBox: ; 12152 (4:6152) ld a,$7d ; lower left corner tile ID lb de,$77, $7e ; bottom edge and lower right corner tile ID's -TrainerInfo_DrawHorizontalEdge: ; 12175 (4:6175) +TrainerInfo_DrawHorizontalEdge: ld [hli],a ; place left corner tile ld a,[wTrainerInfoTextBoxWidth] ld c,a @@ -679,7 +679,7 @@ TrainerInfo_DrawHorizontalEdge: ; 12175 (4:6175) ld [hl],a ; place right corner tile ret -TrainerInfo_NextTextBoxRow: ; 12182 (4:6182) +TrainerInfo_NextTextBoxRow: ld a,[wTrainerInfoTextBoxNextRowOffset] ; distance to the start of the next row .loop inc hl @@ -691,7 +691,7 @@ TrainerInfo_NextTextBoxRow: ; 12182 (4:6182) ; INPUT: ; hl = address of top tile in the line ; a = tile ID -TrainerInfo_DrawVerticalLine: ; 1218a (4:618a) +TrainerInfo_DrawVerticalLine: ld de,20 ld c,8 .loop @@ -701,7 +701,7 @@ TrainerInfo_DrawVerticalLine: ; 1218a (4:618a) jr nz,.loop ret -StartMenu_SaveReset: ; 12195 (4:6195) +StartMenu_SaveReset: ld a,[wd72e] bit 6,a ; is the player using the link feature? jp nz,Init @@ -709,7 +709,7 @@ StartMenu_SaveReset: ; 12195 (4:6195) call LoadScreenTilesFromBuffer2 ; restore saved screen jp HoldTextDisplayOpen -StartMenu_Option: ; 121a9 (4:61a9) +StartMenu_Option: xor a ld [H_AUTOBGTRANSFERENABLED],a call ClearScreen @@ -720,7 +720,7 @@ StartMenu_Option: ; 121a9 (4:61a9) call UpdateSprites jp RedisplayStartMenu -SwitchPartyMon: ; 121c5 (4:61c5) +SwitchPartyMon: call SwitchPartyMon_InitVarOrSwapData ; swap data ld a, [wSwappedMenuItem] call SwitchPartyMon_ClearGfx @@ -728,7 +728,7 @@ SwitchPartyMon: ; 121c5 (4:61c5) call SwitchPartyMon_ClearGfx jp RedrawPartyMenu_ -SwitchPartyMon_ClearGfx: ; 121d7 (4:61d7) +SwitchPartyMon_ClearGfx: push af coord hl, 0, 0 ld bc, SCREEN_WIDTH * 2 @@ -754,7 +754,7 @@ SwitchPartyMon_ClearGfx: ; 121d7 (4:61d7) ld a, SFX_SWAP jp PlaySound -SwitchPartyMon_InitVarOrSwapData: ; 12205 (4:6205) +SwitchPartyMon_InitVarOrSwapData: ; This is used to initialise [wMenuItemToSwap] and to actually swap the data. ld a, [wMenuItemToSwap] and a ; has [wMenuItemToSwap] been initialised yet? diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 719cacd1..4adfb543 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -1,15 +1,15 @@ -DrawHP: ; 11468 (4:5468) +DrawHP: ; Draws the HP bar in the stats screen call GetPredefRegisters ld a, $1 jr DrawHP_ -DrawHP2: ; 1146f (4:546f) +DrawHP2: ; Draws the HP bar in the party screen call GetPredefRegisters ld a, $2 -DrawHP_: ; 11474 (4:5474) +DrawHP_: ld [wHPBarType], a push hl ld a, [wLoadedMonHP] @@ -63,7 +63,7 @@ DrawHP_: ; 11474 (4:5474) ; Predef 0x37 -StatusScreen: ; 114cc (4:54cc) +StatusScreen: call LoadMonData ld a, [wMonDataLocation] cp BOX_DATA @@ -209,38 +209,38 @@ StatusScreen: ; 114cc (4:54cc) ld a, [wWhichPokemon] jp SkipFixedLengthTextEntries -OTPointers: ; 1163b (4:563b) +OTPointers: dw wPartyMonOT dw wEnemyMonOT dw wBoxMonOT dw wDayCareMonOT -NamePointers2: ; 11643 (4:5643) +NamePointers2: dw wPartyMonNicks dw wEnemyMonNicks dw wBoxMonNicks dw wDayCareMonName -Type1Text: ; 1164b (4:564b) +Type1Text: db "TYPE1/", $4e -Type2Text: ; 11652 (4:5652) +Type2Text: db "TYPE2/", $4e -IDNoText: ; 11659 (4:5659) +IDNoText: db $73, "№", "/", $4e -OTText: ; 1165d (4:565d) +OTText: db "OT/", $4e, "@" -StatusText: ; 11662 (4:5662) +StatusText: db "STATUS/@" -OKText: ; 1166a (4:566a) +OKText: db "OK@" ; Draws a line starting from hl high b and wide c -DrawLineBox: ; 1166d (4:566d) +DrawLineBox: ld de, SCREEN_WIDTH ; New line .PrintVerticalLine ld [hl], $78 ; │ @@ -257,11 +257,11 @@ DrawLineBox: ; 1166d (4:566d) ld [hl], $6f ; ← (halfarrow ending) ret -PTile: ; 11682 (4:5682) ; This is a single 1bpp "P" tile +PTile: ; This is a single 1bpp "P" tile INCBIN "gfx/p_tile.1bpp" PTileEnd: -PrintStatsBox: ; 1168a (4:568a) +PrintStatsBox: ld a, d and a ; a is 0 from the status screen jr nz, .DifferentBox @@ -294,7 +294,7 @@ PrintStatsBox: ; 1168a (4:568a) call PrintStat ld de, wLoadedMonSpecial jp PrintNumber -PrintStat: ; 116d4 (4:56d4) +PrintStat: push hl call PrintNumber pop hl @@ -302,13 +302,13 @@ PrintStat: ; 116d4 (4:56d4) add hl, de ret -StatsText: ; 116de (4:56de) +StatsText: db "ATTACK" next "DEFENSE" next "SPEED" next "SPECIAL@" -StatusScreen2: ; 116fb (4:56fb) +StatusScreen2: ld a, [hTilesetType] push af xor a @@ -349,11 +349,11 @@ StatusScreen2: ; 116fb (4:56fb) ld c, a ld a, "-" call StatusScreen_PrintPP ; Fill the rest with -- -.InitPP ; 1175e +.InitPP ld hl, wLoadedMonMoves coord de, 14, 10 ld b, 0 -.PrintPP ; 11766 +.PrintPP ld a, [hli] and a jr z, .PPDone @@ -449,7 +449,7 @@ StatusScreen2: ; 116fb (4:56fb) call GBPalWhiteOut jp ClearScreen -CalcExpToLevelUp: ; 11829 (4:5829) +CalcExpToLevelUp: ld a, [wLoadedMonLevel] cp MAX_LEVEL jr z, .atMaxLevel @@ -475,16 +475,16 @@ CalcExpToLevelUp: ; 11829 (4:5829) ld [hl], a ret -StatusScreenExpText: ; 11852 (4:5852) +StatusScreenExpText: db "EXP POINTS" next "LEVEL UP@" -StatusScreen_ClearName: ; 11866 (4:5866) +StatusScreen_ClearName: ld bc, 10 ld a, " " jp FillMemory -StatusScreen_PrintPP: ; 1186e (4:586e) +StatusScreen_PrintPP: ; print PP or -- c times, going down two rows each time ld [hli], a ld [hld], a diff --git a/engine/menu/swap_items.asm b/engine/menu/swap_items.asm index 73304118..b1fa78be 100644 --- a/engine/menu/swap_items.asm +++ b/engine/menu/swap_items.asm @@ -1,4 +1,4 @@ -HandleItemListSwapping: ; 68c9 (1:68c9) +HandleItemListSwapping: ld a,[wListMenuID] cp a,ITEMLISTMENU jp nz,DisplayListMenuIDLoop ; only rearrange item list menus @@ -146,4 +146,4 @@ HandleItemListSwapping: ; 68c9 (1:68c9) ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped pop de pop hl - jp DisplayListMenuIDLoop
\ No newline at end of file + jp DisplayListMenuIDLoop diff --git a/engine/menu/text_ids1.asm b/engine/menu/text_ids1.asm index e9f2a4d7..e2fd76f4 100644 --- a/engine/menu/text_ids1.asm +++ b/engine/menu/text_ids1.asm @@ -1,5 +1,5 @@ ; function that performs initialization for DisplayTextID -DisplayTextIDInit: ; 6f0e (1:6f0e) +DisplayTextIDInit: xor a ld [wListMenuID],a ld a,[wAutoTextBoxDrawingControl] @@ -75,7 +75,7 @@ DisplayTextIDInit: ; 6f0e (1:6f0e) ret ; function that displays the start menu -DrawStartMenu: ; 6f80 (1:6f80) +DrawStartMenu: CheckEvent EVENT_GOT_POKEDEX ; menu with pokedex coord hl, 10, 0 @@ -133,31 +133,31 @@ DrawStartMenu: ; 6f80 (1:6f80) res 6,[hl] ; turn pauses between printing letters back on ret -StartMenuPokedexText: ; 7002 (1:7002) +StartMenuPokedexText: db "POKéDEX@" -StartMenuPokemonText: ; 700a (1:700a) +StartMenuPokemonText: db "#MON@" -StartMenuItemText: ; 700f (1:700f) +StartMenuItemText: db "ITEM@" -StartMenuSaveText: ; 7014 (1:7014) +StartMenuSaveText: db "SAVE@" -StartMenuResetText: ; 7019 (1:7019) +StartMenuResetText: db "RESET@" -StartMenuExitText: ; 701f (1:701f) +StartMenuExitText: db "EXIT@" -StartMenuOptionText: ; 7024 (1:7024) +StartMenuOptionText: db "OPTION@" -PrintStartMenuItem: ; 702b (1:702b) +PrintStartMenuItem: push hl call PlaceString pop hl ld de,SCREEN_WIDTH * 2 add hl,de - ret
\ No newline at end of file + ret diff --git a/engine/menu/text_ids2.asm b/engine/menu/text_ids2.asm index 15a43d5f..fbac3986 100644 --- a/engine/menu/text_ids2.asm +++ b/engine/menu/text_ids2.asm @@ -1,5 +1,5 @@ ; function to draw various text boxes -DisplayTextBoxID_: ; 71bf (1:71bf) +DisplayTextBoxID_: ld a,[wTextBoxID] cp a,TWO_OPTION_MENU jp z,DisplayTwoOptionMenu @@ -50,7 +50,7 @@ DisplayTextBoxID_: ; 71bf (1:71bf) ; function to search a table terminated with $ff for a byte matching c in increments of de ; sets carry flag if a match is found and clears carry flag if not -SearchTextBoxTable: ; 7221 (1:7221) +SearchTextBoxTable: dec de .loop ld a,[hli] @@ -73,7 +73,7 @@ SearchTextBoxTable: ; 7221 (1:7221) ; c = width ; d = row of upper left corner ; e = column of upper left corner -GetTextBoxIDCoords: ; 722f (1:722f) +GetTextBoxIDCoords: ld a,[hli] ; column of upper left corner ld e,a ld a,[hli] ; row of upper left corner @@ -89,7 +89,7 @@ GetTextBoxIDCoords: ; 722f (1:722f) ret ; function to load a text address and text coordinates from the TextBoxTextAndCoordTable -GetTextBoxIDText: ; 723c (1:723c) +GetTextBoxIDText: ld a,[hli] ld e,a ld a,[hli] @@ -109,7 +109,7 @@ GetTextBoxIDText: ; 723c (1:723c) ; e = column ; OUTPUT: ; hl = address of upper left corner of text box -GetAddressOfScreenCoords: ; 724a (1:724a) +GetAddressOfScreenCoords: push bc coord hl, 0, 0 ld bc,20 @@ -128,7 +128,7 @@ GetAddressOfScreenCoords: ; 724a (1:724a) ; Format: ; 00: text box ID ; 01-02: function address -TextBoxFunctionTable: ; 725c (1:725c) +TextBoxFunctionTable: dbw MONEY_BOX, DisplayMoneyBox dbw BUY_SELL_QUIT_MENU, DoBuySellQuitMenu dbw FIELD_MOVE_MON_MENU, DisplayFieldMoveMonMenu @@ -140,7 +140,7 @@ TextBoxFunctionTable: ; 725c (1:725c) ; 02: row of upper left corner ; 03: column of lower right corner ; 04: row of lower right corner -TextBoxCoordTable: ; 7266 (1:7266) +TextBoxCoordTable: db MESSAGE_BOX, 0, 12, 19, 17 db $03, 0, 0, 19, 14 db $07, 0, 0, 11, 6 @@ -159,7 +159,7 @@ TextBoxCoordTable: ; 7266 (1:7266) ; 07: column of beginning of text ; 08: row of beginning of text ; table of window positions and corresponding text [key, start column, start row, end column, end row, text pointer [2 bytes], text column, text row] -TextBoxTextAndCoordTable: ; 7285 (1:7285) +TextBoxTextAndCoordTable: db JP_MOCHIMONO_MENU_TEMPLATE db 0,0,14,17 ; text box coordinates dw JapaneseMochimonoText @@ -217,56 +217,56 @@ TextBoxTextAndCoordTable: ; 7285 (1:7285) ; note that there is no terminator -BuySellQuitText: ; 72e8 (1:72e8) +BuySellQuitText: db "BUY" next "SELL" next "QUIT@@" -UseTossText: ; 72f7 (1:72f7) +UseTossText: db "USE" next "TOSS@" -JapaneseSaveMessageText: ; 7300 (1:7300) +JapaneseSaveMessageText: db "きろく" next "メッセージ@" -JapaneseSpeedOptionsText: ; 7309 (1:7309) +JapaneseSpeedOptionsText: db "はやい" next "おそい@" -MoneyText: ; 7312 (1:7312) +MoneyText: db "MONEY@" -JapaneseMochimonoText: ; 7318 (1:7318) +JapaneseMochimonoText: db "もちもの@" -JapaneseMainMenuText: ; 731d (1:731d) +JapaneseMainMenuText: db "つづきから" next "さいしょから@" -BattleMenuText: ; 732a (1:732a) +BattleMenuText: db "FIGHT ",$E1,$E2 next "ITEM RUN@" -SafariZoneBattleMenuText: ; 733d (1:733d) +SafariZoneBattleMenuText: db "BALL× BAIT" next "THROW ROCK RUN@" -SwitchStatsCancelText: ; 735e (1:735e) +SwitchStatsCancelText: db "SWITCH" next "STATS" next "CANCEL@" -JapaneseAhText: ; 7372 (1:7372) +JapaneseAhText: db "アッ!@" -JapanesePokedexMenu: ; 7376 (1:7376) +JapanesePokedexMenu: db "データをみる" next "なきごえ" next "ぶんぷをみる" next "キャンセル@" -DisplayMoneyBox: ; 738f (1:738f) +DisplayMoneyBox: ld hl, wd730 set 6, [hl] ld a, MONEY_BOX_TEMPLATE @@ -283,10 +283,10 @@ DisplayMoneyBox: ; 738f (1:738f) res 6, [hl] ret -CurrencyString: ; 73b6 (1:73b6) +CurrencyString: db " ¥@" -DoBuySellQuitMenu: ; 73be (1:73be) +DoBuySellQuitMenu: ld a, [wd730] set 6, a ; no printing delay ld [wd730], a @@ -341,7 +341,7 @@ DoBuySellQuitMenu: ; 73be (1:73be) ; b = Y of upper left corner of text region ; c = X of upper left corner of text region ; hl = address where the text box border should be drawn -DisplayTwoOptionMenu: ; 742d (1:742d) +DisplayTwoOptionMenu: push hl ld a, [wd730] set 6, a ; no printing delay @@ -452,7 +452,7 @@ DisplayTwoOptionMenu: ; 742d (1:742d) ; they cover be fully saved/restored by the two functions below. ; The bottom and right edges of the menu may remain after the function returns. -TwoOptionMenu_SaveScreenTiles: ; 74e7 (1:74e7) +TwoOptionMenu_SaveScreenTiles: ld de, wBuffer lb bc, 5, 6 .loop @@ -470,7 +470,7 @@ TwoOptionMenu_SaveScreenTiles: ; 74e7 (1:74e7) jr nz, .loop ret -TwoOptionMenu_RestoreScreenTiles: ; 74ff (1:74ff) +TwoOptionMenu_RestoreScreenTiles: ld de, wBuffer lb bc, 5, 6 .loop @@ -494,7 +494,7 @@ TwoOptionMenu_RestoreScreenTiles: ; 74ff (1:74ff) ; 01: byte height ; 02: byte put blank line before first menu item ; 03: word text pointer -TwoOptionMenuStrings: ; 751a (1:751a) +TwoOptionMenuStrings: db 4,3,0 dw .YesNoMenu db 6,3,0 @@ -527,7 +527,7 @@ TwoOptionMenuStrings: ; 751a (1:751a) .HealCancelMenu ; 757e (1:757e) db "HEAL",$4E,"CANCEL@" -DisplayFieldMoveMonMenu: ; 758a (1:758a) +DisplayFieldMoveMonMenu: xor a ld hl, wFieldMoves ld [hli], a ; wFieldMoves @@ -646,7 +646,7 @@ DisplayFieldMoveMonMenu: ; 758a (1:758a) ld de, PokemonMenuEntries jp PlaceString -FieldMoveNames: ; 7635 (1:7635) +FieldMoveNames: db "CUT@" db "FLY@" db "@" @@ -657,12 +657,12 @@ FieldMoveNames: ; 7635 (1:7635) db "TELEPORT@" db "SOFTBOILED@" -PokemonMenuEntries: ; 766a (1:766a) +PokemonMenuEntries: db "STATS" next "SWITCH" next "CANCEL@" -GetMonFieldMoves: ; 767e (1:767e) +GetMonFieldMoves: ld a, [wWhichPokemon] ld hl, wPartyMon1Moves ld bc, wPartyMon2 - wPartyMon1 @@ -719,7 +719,7 @@ GetMonFieldMoves: ; 767e (1:767e) ; Name index = index of name in FieldMoveNames ; Leftmost tile = -1 + tile column in which the first letter of the move's name should be displayed ; "SOFTBOILED" is $08 because it has 4 more letters than "SURF", for example, whose value is $0C -FieldMoveDisplayData: ; 76cb (1:76cb) +FieldMoveDisplayData: db CUT, $01, $0C db FLY, $02, $0C db $B4, $03, $0C ; unused field move @@ -730,4 +730,4 @@ FieldMoveDisplayData: ; 76cb (1:76cb) db TELEPORT, $08, $0A db SOFTBOILED, $09, $08 db $ff ; list terminator -
\ No newline at end of file + diff --git a/engine/menu/vending_machine.asm b/engine/menu/vending_machine.asm index 74a6aadb..d864141d 100755 --- a/engine/menu/vending_machine.asm +++ b/engine/menu/vending_machine.asm @@ -1,4 +1,4 @@ -VendingMachineMenu: ; 74726 (1d:4726) +VendingMachineMenu: ld hl, VendingMachineText1 call PrintText ld a, MONEY_BOX @@ -79,38 +79,38 @@ VendingMachineMenu: ; 74726 (1d:4726) ld hl, VendingMachineText7 jp PrintText -VendingMachineText1: ; 747de (1d:47de) +VendingMachineText1: TX_FAR _VendingMachineText1 db "@" -DrinkText: ; 747e3 (1d:47e3) +DrinkText: db "FRESH WATER" next "SODA POP" next "LEMONADE" next "CANCEL@" -DrinkPriceText: ; 74808 (1d:4808) +DrinkPriceText: db "¥200" next "¥300" next "¥350",$4E,"@" -VendingMachineText4: ; 74818 (1d:4818) +VendingMachineText4: TX_FAR _VendingMachineText4 db "@" -VendingMachineText5: ; 7481d (1d:481d) +VendingMachineText5: TX_FAR _VendingMachineText5 db "@" -VendingMachineText6: ; 74822 (1d:4822) +VendingMachineText6: TX_FAR _VendingMachineText6 db "@" -VendingMachineText7: ; 74827 (1d:4827) +VendingMachineText7: TX_FAR _VendingMachineText7 db "@" -LoadVendingMachineItem: ; 7482c (1d:482c) +LoadVendingMachineItem: ld hl, VendingPrices ld a, [wCurrentMenuItem] add a @@ -128,7 +128,7 @@ LoadVendingMachineItem: ; 7482c (1d:482c) ld [hVendingMachinePrice + 2], a ret -VendingPrices: ; 74845 (1d:4845) +VendingPrices: db FRESH_WATER money 200 db SODA_POP |