From 4a8c9993ad182296131ef87111e1b6d6e2af4201 Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 12 Jul 2015 23:00:48 -0700 Subject: named wram variables --- main.asm | 63 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 33 insertions(+), 30 deletions(-) (limited to 'main.asm') diff --git a/main.asm b/main.asm index 7372381a..3a79bdd6 100755 --- a/main.asm +++ b/main.asm @@ -1457,7 +1457,7 @@ DoBuySellQuitMenu: ; 74ea (1:74ea) set 6, a ; no printing delay ld [wd730], a xor a - ld [wd12d], a + ld [wChosenMenuItem], a ld a, BUY_SELL_QUIT_MENU_TEMPLATE ld [wTextBoxID], a call DisplayTextBoxID @@ -1482,24 +1482,24 @@ DoBuySellQuitMenu: ; 74ea (1:74ea) jr nz, .pressedA bit 1, a ; was B pressed? (always true since only A/B are watched) jr z, .pressedA - ld a, $2 - ld [wd12e], a + ld a, CANCELLED_MENU + ld [wMenuExitMethod], a jr .quit .pressedA - ld a, $1 - ld [wd12e], a + ld a, CHOSE_MENU_ITEM + ld [wMenuExitMethod], a ld a, [wCurrentMenuItem] - ld [wd12d], a + ld [wChosenMenuItem], a ld b, a ld a, [wMaxMenuItem] cp b jr z, .quit ret .quit - ld a, $2 - ld [wd12e], a + ld a, CANCELLED_MENU + ld [wMenuExitMethod], a ld a, [wCurrentMenuItem] - ld [wd12d], a + ld [wChosenMenuItem], a scf ret @@ -1512,9 +1512,12 @@ DisplayTwoOptionMenu: ; 7559 (1:7559) ld a, [wd730] set 6, a ; no printing delay ld [wd730], a + +; pointless because both values are overwritten before they are read xor a - ld [wd12d], a - ld [wd12e], a + ld [wChosenMenuItem], a + ld [wMenuExitMethod], a + ld a, A_BUTTON | B_BUTTON ld [wMenuWatchedKeys], a ld a, $1 @@ -1614,23 +1617,23 @@ DisplayTwoOptionMenu: ; 7559 (1:7559) jr nz, .choseSecondMenuItem ; automatically choose the second option if B is pressed .pressedAButton ld a, [wCurrentMenuItem] - ld [wd12d], a + ld [wChosenMenuItem], a and a jr nz, .choseSecondMenuItem ; chose first menu item - ld a, $1 - ld [wd12e], a + ld a, CHOSE_FIRST_ITEM + ld [wMenuExitMethod], a ld c, 15 call DelayFrames call TwoOptionMenu_RestoreScreenTiles and a ret .choseSecondMenuItem - ld a, $1 + ld a, 1 ld [wCurrentMenuItem], a - ld [wd12d], a - ld a, $2 - ld [wd12e], a + ld [wChosenMenuItem], a + ld a, CHOSE_SECOND_ITEM + ld [wMenuExitMethod], a ld c, 15 call DelayFrames call TwoOptionMenu_RestoreScreenTiles @@ -2631,7 +2634,7 @@ ApplyOutOfBattlePoisonDamage: ; c69c (3:469c) .noBlackOut xor a .done - ld [wd12d], a + ld [wOutOfBattleBlackout], a ret LoadTilesetHeader: ; c754 (3:4754) @@ -2777,10 +2780,10 @@ CyclingIsFunText: ; cdff (3:4dff) ; INPUT: ; hl = address of inventory (either wNumBagItems or wNumBoxItems) ; [wcf91] = item ID -; [wcf96] = item quantity +; [wItemQuantity] = item quantity ; sets carry flag if successful, unsets carry flag if unsuccessful AddItemToInventory_: ; ce04 (3:4e04) - ld a,[wcf96] ; a = item quantity + ld a,[wItemQuantity] ; a = item quantity push af push bc push de @@ -2827,12 +2830,12 @@ AddItemToInventory_: ; ce04 (3:4e04) add hl,bc ; hl = address to store the item ld a,[wcf91] ld [hli],a ; store item ID - ld a,[wcf96] + ld a,[wItemQuantity] ld [hli],a ; store item quantity ld [hl],$ff ; store terminator jp .success .increaseItemQuantity ; increase the quantity of an item already in the inventory - ld a,[wcf96] + ld a,[wItemQuantity] ld b,a ; b = quantity to add ld a,[hl] ; a = existing item quantity add b ; a = new item quantity @@ -2841,7 +2844,7 @@ AddItemToInventory_: ; ce04 (3:4e04) ; if the new quantity is greater than or equal to 100, ; try to max out the current slot and add the rest in a new slot sub a,99 - ld [wcf96],a ; a = amount left over (to put in the new slot) + ld [wItemQuantity],a ; a = amount left over (to put in the new slot) ld a,d and a ; is there room for a new item slot? jr z,.increaseItemQuantityFailed @@ -2864,14 +2867,14 @@ AddItemToInventory_: ; ce04 (3:4e04) pop bc pop bc ld a,b - ld [wcf96],a ; restore the initial value from when the function was called + ld [wItemQuantity],a ; restore the initial value from when the function was called ret ; function to remove an item (in varying quantities) from the player's bag or PC box ; INPUT: ; hl = address of inventory (either wNumBagItems or wNumBoxItems) ; [wWhichPokemon] = index (within the inventory) of the item to remove -; [wcf96] = quantity to remove +; [wItemQuantity] = quantity to remove RemoveItemFromInventory_: ; ce74 (3:4e74) push hl inc hl @@ -2883,12 +2886,12 @@ RemoveItemFromInventory_: ; ce74 (3:4e74) inc h .noCarry inc hl - ld a,[wcf96] ; quantity being removed + ld a,[wItemQuantity] ; quantity being removed ld e,a ld a,[hl] ; a = current quantity sub e ld [hld],a ; store new quantity - ld [wcf97],a + ld [wMaxItemQuantity],a and a jr nz,.skipMovingUpSlots ; if the remaining quantity is 0, @@ -2909,7 +2912,7 @@ RemoveItemFromInventory_: ; ce74 (3:4e74) ld [wListScrollOffset],a ld [wCurrentMenuItem],a ld [wcc2c],a - ld [wd07e],a + ld [wSavedListScrollOffset],a pop hl ld a,[hl] ; a = number of items in inventory dec a ; decrement the number of items @@ -3863,7 +3866,7 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d) and a ret ; return success -MoveMon: ; f51e (3:751e) +_MoveMon: ; f51e (3:751e) ld a, [wcf95] and a jr z, .checkPartyMonSlots -- cgit v1.3.1-sl0p From bcfca2e267a6ee023271d90e27e4a7fde06f66fc Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sun, 12 Jul 2015 23:36:56 -0700 Subject: movemon and removepokemon wram variables --- constants/misc_constants.asm | 6 +++++ engine/cable_club.asm | 2 +- engine/in_game_trades.asm | 2 +- engine/menu/bills_pc.asm | 16 ++++++------ home.asm | 4 +-- main.asm | 58 ++++++++++++++++++++++---------------------- scripts/daycarem.asm | 18 +++++++------- wram.asm | 11 ++++++++- 8 files changed, 66 insertions(+), 51 deletions(-) (limited to 'main.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index a96fc59f..8aac849e 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -66,6 +66,12 @@ CANCELLED_MENU EQU 2 ; pressed B CHOSE_FIRST_ITEM EQU 1 CHOSE_SECOND_ITEM EQU 2 +; move mon constants +BOX_TO_PARTY EQU 0 +PARTY_TO_BOX EQU 1 +DAYCARE_TO_PARTY EQU 2 +PARTY_TO_DAYCARE EQU 3 + ; serial ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 diff --git a/engine/cable_club.asm b/engine/cable_club.asm index be403fa6..c115ed4a 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -793,7 +793,7 @@ TradeCenter_Trade: ld a, [hl] ld [wTradedPlayerMonSpecies], a xor a - ld [wcf95], a + ld [wRemoveMonFromBox], a call RemovePokemon ld a, [wTradingWhichEnemyMon] ld c, a diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index 32b55002..3594a26e 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -131,7 +131,7 @@ InGameTrade_DoTrade: ; 71c07 (1c:5c07) ld [wcf91],a xor a ld [wcc49],a - ld [wcf95],a + ld [wRemoveMonFromBox],a call RemovePokemon ld a,$80 ld [wcc49],a diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index b4ac3680..530ab961 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 + 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 + xor a ; BOX_TO_PARTY + ld [wMoveMonType], a call MoveMon - ld a, $1 - ld [wcf95], a + 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] diff --git a/home.asm b/home.asm index b9041fef..51e10118 100644 --- a/home.asm +++ b/home.asm @@ -3599,8 +3599,8 @@ CopyDataUntil:: ; 3913 (0:3913) ; Function to remove a pokemon from the party or the current box. ; wWhichPokemon determines the pokemon. -; [wcf95] == 0 specifies the party. -; [wcf95] != 0 specifies the current box. +; [wRemoveMonFromBox] == 0 specifies the party. +; [wRemoveMonFromBox] != 0 specifies the current box. RemovePokemon:: ; 391f (0:391f) ld hl, _RemovePokemon ld b, BANK(_RemovePokemon) diff --git a/main.asm b/main.asm index 3a79bdd6..54440e60 100755 --- a/main.asm +++ b/main.asm @@ -1916,7 +1916,7 @@ INCLUDE "engine/menu/players_pc.asm" _RemovePokemon: ; 7b68 (1:7b68) ld hl, wPartyCount - ld a, [wcf95] + ld a, [wRemoveMonFromBox] and a jr z, .asm_7b74 ld hl, W_NUMINBOX @@ -1939,7 +1939,7 @@ _RemovePokemon: ; 7b68 (1:7b68) jr nz, .asm_7b81 ld hl, wPartyMonOT ld d, $5 - ld a, [wcf95] + ld a, [wRemoveMonFromBox] and a jr z, .asm_7b97 ld hl, wBoxMonOT @@ -1958,7 +1958,7 @@ _RemovePokemon: ; 7b68 (1:7b68) ld bc, $b add hl, bc ld bc, wPartyMonNicks - ld a, [wcf95] + ld a, [wRemoveMonFromBox] and a jr z, .asm_7bb8 ld bc, wBoxMonNicks @@ -1966,7 +1966,7 @@ _RemovePokemon: ; 7b68 (1:7b68) call CopyDataUntil ld hl, wPartyMons ld bc, wPartyMon2 - wPartyMon1 - ld a, [wcf95] + ld a, [wRemoveMonFromBox] and a jr z, .asm_7bcd ld hl, wBoxMons @@ -1976,7 +1976,7 @@ _RemovePokemon: ; 7b68 (1:7b68) call AddNTimes ld d, h ld e, l - ld a, [wcf95] + ld a, [wRemoveMonFromBox] and a jr z, .asm_7be4 ld bc, wBoxMon2 - wBoxMon1 @@ -1990,7 +1990,7 @@ _RemovePokemon: ; 7b68 (1:7b68) .asm_7beb call CopyDataUntil ld hl, wPartyMonNicks - ld a, [wcf95] + ld a, [wRemoveMonFromBox] and a jr z, .asm_7bfa ld hl, wBoxMonNicks @@ -2003,7 +2003,7 @@ _RemovePokemon: ; 7b68 (1:7b68) ld bc, $b add hl, bc ld bc, wPokedexOwned - ld a, [wcf95] + ld a, [wRemoveMonFromBox] and a jr z, .asm_7c15 ld bc, wBoxMonNicksEnd @@ -3867,12 +3867,12 @@ _AddEnemyMonToPlayerParty: ; f49d (3:749d) ret ; return success _MoveMon: ; f51e (3:751e) - ld a, [wcf95] + ld a, [wMoveMonType] and a jr z, .checkPartyMonSlots - cp $2 + cp DAYCARE_TO_PARTY jr z, .checkPartyMonSlots - cp $3 + cp PARTY_TO_DAYCARE ld hl, wDayCareMon jr z, .asm_f575 ld hl, W_NUMINBOX @@ -3892,17 +3892,17 @@ _MoveMon: ; f51e (3:751e) inc a ld [hl], a ; increment number of mons in party/box ld c, a - ld b, $0 + ld b, 0 add hl, bc - ld a, [wcf95] - cp $2 + ld a, [wMoveMonType] + cp DAYCARE_TO_PARTY ld a, [wDayCareMon] jr z, .asm_f556 ld a, [wcf91] .asm_f556 ld [hli], a ; write new mon ID ld [hl], $ff ; write new sentinel - ld a, [wcf95] + ld a, [wMoveMonType] dec a ld hl, wPartyMons ld bc, wPartyMon2 - wPartyMon1 ; $2c @@ -3918,12 +3918,12 @@ _MoveMon: ; f51e (3:751e) push hl ld e, l ld d, h - ld a, [wcf95] + ld a, [wMoveMonType] and a ld hl, wBoxMons ld bc, wBoxMon2 - wBoxMon1 ; $21 jr z, .asm_f591 - cp $2 + cp DAYCARE_TO_PARTY ld hl, wDayCareMon jr z, .asm_f597 ld hl, wPartyMons @@ -3938,10 +3938,10 @@ _MoveMon: ; f51e (3:751e) call CopyData pop de pop hl - ld a, [wcf95] + ld a, [wMoveMonType] and a jr z, .asm_f5b4 - cp $2 + cp DAYCARE_TO_PARTY jr z, .asm_f5b4 ld bc, wBoxMon2 - wBoxMon1 add hl, bc @@ -3951,8 +3951,8 @@ _MoveMon: ; f51e (3:751e) inc de ld [de], a .asm_f5b4 - ld a, [wcf95] - cp $3 + ld a, [wMoveMonType] + cp PARTY_TO_DAYCARE ld de, W_DAYCAREMONOT jr z, .asm_f5d3 dec a @@ -3968,11 +3968,11 @@ _MoveMon: ; f51e (3:751e) ld e, l .asm_f5d3 ld hl, wBoxMonOT - ld a, [wcf95] + ld a, [wMoveMonType] and a jr z, .asm_f5e6 ld hl, W_DAYCAREMONOT - cp $2 + cp DAYCARE_TO_PARTY jr z, .asm_f5ec ld hl, wPartyMonOT .asm_f5e6 @@ -3981,8 +3981,8 @@ _MoveMon: ; f51e (3:751e) .asm_f5ec ld bc, $b call CopyData - ld a, [wcf95] - cp $3 + ld a, [wMoveMonType] + cp PARTY_TO_DAYCARE ld de, W_DAYCAREMONNAME jr z, .asm_f611 dec a @@ -3998,11 +3998,11 @@ _MoveMon: ; f51e (3:751e) ld e, l .asm_f611 ld hl, wBoxMonNicks - ld a, [wcf95] + ld a, [wMoveMonType] and a jr z, .asm_f624 ld hl, W_DAYCAREMONNAME - cp $2 + cp DAYCARE_TO_PARTY jr z, .asm_f62a ld hl, wPartyMonNicks .asm_f624 @@ -4012,10 +4012,10 @@ _MoveMon: ; f51e (3:751e) ld bc, $b call CopyData pop hl - ld a, [wcf95] - cp $1 + ld a, [wMoveMonType] + cp PARTY_TO_BOX jr z, .asm_f664 - cp $3 + cp PARTY_TO_DAYCARE jr z, .asm_f664 push hl srl a diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index 83b9b3a7..f48584dc 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -45,13 +45,13 @@ DayCareMText1: ; 56254 (15:6254) call GetPartyMonName ld hl, DayCareMText_56419 call PrintText - ld a, $1 + ld a, 1 ld [W_DAYCARE_IN_USE], a - ld a, $3 - ld [wcf95], a + ld a, PARTY_TO_DAYCARE + ld [wMoveMonType], a call MoveMon xor a - ld [wcf95], a + ld [wRemoveMonFromBox], a call RemovePokemon ld a, [wcf91] call PlayCry @@ -163,21 +163,21 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) call DisplayTextBoxID ld hl, DayCareMText_5644f call PrintText - ld a, $2 - ld [wcf95], a + ld a, DAYCARE_TO_PARTY + ld [wMoveMonType], a call MoveMon ld a, [wDayCareMonSpecies] ld [wcf91], a ld a, [wPartyCount] dec a push af - ld bc, $002c + ld bc, wPartyMon2 - wPartyMon1 push bc ld hl, wPartyMon1Moves call AddNTimes ld d, h ld e, l - ld a, $1 + ld a, 1 ld [wHPBarMaxHP], a predef WriteMonMoves pop bc @@ -186,7 +186,7 @@ DayCareMScript_562e1: ; 562e1 (15:62e1) call AddNTimes ld d, h ld e, l - ld bc, $0021 + ld bc, wPartyMon1MaxHP - wPartyMon1HP add hl, bc ld a, [hli] ld [de], a diff --git a/wram.asm b/wram.asm index 65681990..c5f06e53 100755 --- a/wram.asm +++ b/wram.asm @@ -851,7 +851,16 @@ wListMenuID:: ; cf94 ; ID used by DisplayListMenuID ds 1 -wcf95:: ds 1 ; used with RemovePokemon (BoxMons, Daycare, Trades, etc.) +wRemoveMonFromBox:: ; cf95 +; if non-zero, RemovePokemon will remove the mon from the current box, +; else it will remove the mon from the party + +wMoveMonType:: ; cf95 +; 0 = move from box to party +; 1 = move from party to box +; 2 = move from daycare to party +; 3 = move from party to daycare + ds 1 wItemQuantity:: ; cf96 ds 1 -- cgit v1.3.1-sl0p From 95b1660e59283b6f76dca638985c76a7d81d026f Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Mon, 13 Jul 2015 00:32:03 -0700 Subject: menu wram variable names --- engine/battle/core.asm | 2 +- engine/cable_club.asm | 8 ++++---- engine/menu/pokedex.asm | 6 +++--- engine/save.asm | 2 +- engine/slot_machine.asm | 2 +- home.asm | 22 +++++++++++----------- main.asm | 10 +++++----- wram.asm | 11 +++++++++-- 8 files changed, 35 insertions(+), 28 deletions(-) (limited to 'main.asm') diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 95242f5d..f37da950 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2305,7 +2305,7 @@ DisplayBagMenu: ld a, [wCurrentMenuItem] ld [wcc2c], a ld a, $0 - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld [wMenuItemToSwap], a jp c, DisplayBattleMenu ; go back to battle menu if an item was not selected diff --git a/engine/cable_club.asm b/engine/cable_club.asm index c115ed4a..13a95ed5 100755 --- a/engine/cable_club.asm +++ b/engine/cable_club.asm @@ -317,7 +317,7 @@ TradeCenter_SelectMon: ld [hli], a ld [hli], a ld [hl], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld [wCurrentMenuItem], a ld [wLastMenuItem], a ld [wMenuJoypadPollCount], a @@ -326,7 +326,7 @@ TradeCenter_SelectMon: jp .playerMonMenu .enemyMonMenu xor a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a inc a ld [wWhichTradeMonSelectionMenu], a ld a, D_DOWN | D_LEFT | A_BUTTON @@ -390,7 +390,7 @@ TradeCenter_SelectMon: .playerMonMenu xor a ; player mon menu ld [wWhichTradeMonSelectionMenu], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld a, D_DOWN | D_RIGHT | A_BUTTON ld [wMenuWatchedKeys], a ld a, [wPartyCount] @@ -682,7 +682,7 @@ TradeCenter_Trade: xor a ld [wSerialExchangeNybbleSendData + 1], a ; unnecessary ld [wSerialExchangeNybbleReceiveData], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld [wMenuJoypadPollCount], a hlCoord 0, 12 ld b, 4 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/save.asm b/engine/save.asm index cc5e6c4a..2ef59263 100755 --- a/engine/save.asm +++ b/engine/save.asm @@ -421,7 +421,7 @@ Func_7393f: ; 7393f (1c:793f) ld a, $c ld [wTopMenuItemX], a xor a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld a, [wd5a0] and $7f ld [wCurrentMenuItem], a diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm index 0b9f8bc9..6dae7293 100755 --- a/engine/slot_machine.asm +++ b/engine/slot_machine.asm @@ -78,7 +78,7 @@ MainSlotMachineLoop: ; 37395 (d:7395) xor a ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld hl, wTileMap + $ea ld b, $5 ld c, $4 diff --git a/home.asm b/home.asm index 51e10118..f6a1c914 100644 --- a/home.asm +++ b/home.asm @@ -378,7 +378,7 @@ PartyMenuInit:: ; 1420 (0:1420) set 6, [hl] ; turn off letter printing delay xor a ld [wcc49], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld hl, wTopMenuItemY inc a ld [hli], a ; top menu item Y @@ -1391,13 +1391,13 @@ DisplayListMenuID:: ; 2be6 (0:2be6) set 6,[hl] ; turn off letter printing delay xor a ld [wMenuItemToSwap],a ; 0 means no item is currently being swapped - ld [wd12a],a + ld [wListCount],a ld a,[wList] ld l,a ld a,[wList + 1] ld h,a ; hl = address of the list - ld a,[hl] - ld [wd12a],a ; [wd12a] = number of list entries + ld a,[hl] ; the first byte is the number of entries in the list + ld [wListCount],a ld a,LIST_MENU_BOX ld [wTextBoxID],a call DisplayTextBoxID ; draw the menu text box @@ -1411,8 +1411,8 @@ DisplayListMenuID:: ; 2be6 (0:2be6) call UpdateSprites .skipMovingSprites ld a,1 ; max menu item ID is 1 if the list has less than 2 entries - ld [wcc37],a - ld a,[wd12a] + ld [wMenuWatchMovingOutOfBounds],a + ld a,[wListCount] cp a,2 ; does the list have less than 2 entries? jr c,.setMenuVariables ld a,2 ; max menu item ID is 2 if the list has at least 2 entries @@ -1468,13 +1468,13 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) ld [wChosenMenuItem],a xor a - ld [wcc37],a + ld [wMenuWatchMovingOutOfBounds],a ld a,[wCurrentMenuItem] ld c,a ld a,[wListScrollOffset] add c ld c,a - ld a,[wd12a] ; number of list entries + ld a,[wListCount] and a ; is the list empty? jp z,ExitListMenu ; if so, exit the menu dec a @@ -1552,7 +1552,7 @@ DisplayListMenuIDLoop:: ; 2c53 (0:2c53) ld a,[hl] add a,3 ld b,a - ld a,[wd12a] ; number of list entries + ld a,[wListCount] cp b ; will going down scroll past the Cancel button? jp c,DisplayListMenuIDLoop inc [hl] ; if not, go down @@ -1694,7 +1694,7 @@ ExitListMenu:: ; 2e3b (0:2e3b) ld [wChosenMenuItem],a ld a,CANCELLED_MENU ld [wMenuExitMethod],a - ld [wcc37],a + ld [wMenuWatchMovingOutOfBounds],a xor a ld [hJoy7],a ld hl,wd730 @@ -4026,7 +4026,7 @@ HandleMenuInputPokemonSelection:: ; 3ac2 (0:3ac2) ld a,[hJoy5] ret .noWrappingAround - ld a,[wcc37] + ld a,[wMenuWatchMovingOutOfBounds] and a ; should we return if the user tried to go past the top or bottom? jr z,.checkOtherKeys jr .checkIfAButtonOrBButtonPressed diff --git a/main.asm b/main.asm index 54440e60..3a1e0621 100755 --- a/main.asm +++ b/main.asm @@ -922,7 +922,7 @@ HandleItemListSwapping: ; 6b44 (1:6b44) ld l,a dec [hl] ; decrease the number of items ld a,[hl] - ld [wd12a],a ; update number of items variable + ld [wListCount],a ; update number of items variable cp a,1 jr nz,.skipSettingMaxMenuItemID ld [wMaxMenuItem],a ; if the number of items is only one now, update the max menu item ID @@ -1094,7 +1094,7 @@ DrawStartMenu: ; 710b (1:710b) ld [wCurrentMenuItem],a ld [wLastMenuItem],a xor a - ld [wcc37],a + ld [wMenuWatchMovingOutOfBounds],a ld hl,wd730 set 6,[hl] ; no pauses between printing each letter hlCoord 12, 2 @@ -1472,7 +1472,7 @@ DoBuySellQuitMenu: ; 74ea (1:74ea) xor a ld [wCurrentMenuItem], a ld [wLastMenuItem], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a ld a, [wd730] res 6, a ; turn on the printing delay ld [wd730], a @@ -1528,7 +1528,7 @@ DisplayTwoOptionMenu: ; 7559 (1:7559) ld [wTopMenuItemX], a xor a ld [wLastMenuItem], a - ld [wcc37], a + ld [wMenuWatchMovingOutOfBounds], a push hl ld hl, wTwoOptionMenuID bit 7, [hl] ; select second menu item by default? @@ -2917,7 +2917,7 @@ RemoveItemFromInventory_: ; ce74 (3:4e74) ld a,[hl] ; a = number of items in inventory dec a ; decrement the number of items ld [hl],a ; store new number of items - ld [wd12a],a + ld [wListCount],a cp a,2 jr c,.done ld [wMaxMenuItem],a diff --git a/wram.asm b/wram.asm index c5f06e53..a1b9f1d3 100755 --- a/wram.asm +++ b/wram.asm @@ -266,7 +266,12 @@ wListScrollOffset:: ; cc36 ; keeps track of what section of the list is on screen ds 1 -wcc37:: ds 1 ; menu related thing, used in pokedex and dialog boxes +wMenuWatchMovingOutOfBounds:: ; cc37 +; If non-zero, then when wrapping is disabled and the player tries to go past +; the top or bottom of the menu, return from HandleMenuInput. This is useful for +; menus that have too many items to display at once on the screen because it +; allows the caller to scroll the entire menu up or down when this happens. + ds 1 wTradeCenterPointerTableIndex:: ; cc38 ds 1 @@ -1409,7 +1414,9 @@ wItemListPointer:: ; d128 ; pointer to list of items terminated by $FF ds 2 -wd12a:: ds 1 ; Number of list entries for displaying a list +wListCount:: +; number of entries in a list + ds 1 wLinkState:: ; d12b ds 1 -- cgit v1.3.1-sl0p From 0066e09828265cc1cc83eca27e6be76911f187ec Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Mon, 13 Jul 2015 15:40:33 -0700 Subject: named party menu/naming screen wram variables --- constants/misc_constants.asm | 24 +++++++++++++++++++++ engine/battle/animations.asm | 4 ++-- engine/battle/core.asm | 16 +++++++------- engine/in_game_trades.asm | 4 ++-- engine/items/items.asm | 46 ++++++++++++++++++++--------------------- engine/menu/naming_screen.asm | 28 ++++++++++++------------- engine/menu/party_menu.asm | 16 +++++++------- engine/menu/start_sub_menus.asm | 14 ++++++------- engine/oak_speech2.asm | 8 +++---- home.asm | 2 +- main.asm | 4 ++-- scripts/daycarem.asm | 2 +- scripts/namerater.asm | 4 ++-- wram.asm | 8 ++++++- 14 files changed, 105 insertions(+), 75 deletions(-) (limited to 'main.asm') diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index 323e2ab6..eca97408 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -85,6 +85,30 @@ SLOTSFISH EQU $0E0C SLOTSBIRD EQU $1210 SLOTSMOUSE EQU $1614 +; party menu types +NORMAL_PARTY_MENU EQU 0 +USE_ITEM_PARTY_MENU EQU 1 +BATTLE_PARTY_MENU EQU 2 +TMHM_PARTY_MENU EQU 3 +SWAP_MONS_PARTY_MENU EQU 4 +EVO_STONE_PARTY_MENU EQU 5 + +; party memu message IDs +ANTIDOTE_MSG EQU $F0 +BURN_HEAL_MSG EQU $F1 +ICE_HEAL_MSG EQU $F2 +AWAKENING_MSG EQU $F3 +PARALYZ_HEAL_MSG EQU $F4 +POTION_MSG EQU $F5 +FULL_HEAL_MSG EQU $F6 +REVIVE_MSG EQU $F7 +RARE_CANDY_MSG EQU $F8 + +; naming screen types +NAME_PLAYER_SCREEN EQU 0 +NAME_RIVAL_SCREEN EQU 1 +NAME_MON_SCREEN EQU 2 + ; serial ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index ea879e53..83590d4c 100755 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -336,14 +336,14 @@ LoadAnimationTileset: ; 781d2 (1e:41d2) ld d,0 add hl,de ld a,[hli] - ld [wd07d],a ; number of tiles + ld [wTempTilesetNumTiles],a ; number of tiles ld a,[hli] ld e,a ld a,[hl] ld d,a ; de = address of tileset ld hl,vSprites + $310 ld b, BANK(AnimationTileset1) ; ROM bank - ld a,[wd07d] + ld a,[wTempTilesetNumTiles] ld c,a ; number of tiles jp CopyVideoData ; load tileset diff --git a/engine/battle/core.asm b/engine/battle/core.asm index f37da950..a611864d 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1162,8 +1162,8 @@ UseNextMonText: ; 3c7d3 (f:47d3) ; choose next player mon to send out ; stores whether enemy mon has no HP left in Z flag ChooseNextMon: ; 3c7d8 (f:47d8) - ld a, $2 - ld [wd07d], a + ld a, BATTLE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call DisplayPartyMenu .checkIfMonChosen jr nc, .monChosen @@ -1462,8 +1462,8 @@ EnemySendOutFirstMon: ; 3c92a (f:492a) ld a,[wCurrentMenuItem] and a jr nz,.next4 - ld a,2 - ld [wd07d],a + ld a,BATTLE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a call DisplayPartyMenu .next9 ld a,1 @@ -2384,8 +2384,8 @@ PartyMenuOrRockOrRun: jp UseBagItem .partyMenuWasSelected call LoadScreenTilesFromBuffer1 - xor a - ld [wd07d], a + xor a ; NORMAL_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a ld [wMenuItemToSwap], a call DisplayPartyMenu .checkIfPartyMonWasSelected @@ -2403,8 +2403,8 @@ PartyMenuOrRockOrRun: ld bc, $81 ld a, $7f call FillMemory - xor a - ld [wd07d], a + xor a ; NORMAL_PARTY_MENU + ld [wPartyMenuTypeOrMessageID], a call GoBackToPartyMenu jr .checkIfPartyMonWasSelected .partyMonWasSelected diff --git a/engine/in_game_trades.asm b/engine/in_game_trades.asm index 3594a26e..7366996c 100755 --- a/engine/in_game_trades.asm +++ b/engine/in_game_trades.asm @@ -87,8 +87,8 @@ InGameTrade_GetMonName: ; 71b6a (1c:5b6a) INCLUDE "data/trades.asm" InGameTrade_DoTrade: ; 71c07 (1c:5c07) - xor a - ld [wd07d],a + xor a ; NORMAL_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a dec a ld [wUpdateSpritesEnabled],a call DisplayPartyMenu diff --git a/engine/items/items.asm b/engine/items/items.asm index 24ff544e..fae2a871 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -633,8 +633,8 @@ ItemUseEvoStone: ; da5b (3:5a5b) ld a,[wcf91] ld [wd156],a push af - ld a,$05 ; evolution stone party menu - ld [wd07d],a + ld a,EVO_STONE_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a ld a,$ff ld [wUpdateSpritesEnabled],a call DisplayPartyMenu @@ -678,8 +678,8 @@ ItemUseMedicine: ; dabb (3:5abb) push af ld a,[wcf91] push af - ld a,$01 - ld [wd07d],a ; item use party menu + ld a,USE_ITEM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a ld a,$ff ld [wUpdateSpritesEnabled],a ld a,[wd152] @@ -737,22 +737,22 @@ ItemUseMedicine: ; dabb (3:5abb) ld bc,4 add hl,bc ; hl now points to status ld a,[wcf91] - ld bc,$f008 + ld bc, (ANTIDOTE_MSG << 8) | (1 << PSN) cp a,ANTIDOTE jr z,.checkMonStatus - ld bc,$f110 + ld bc, (BURN_HEAL_MSG << 8) | (1 << BRN) cp a,BURN_HEAL jr z,.checkMonStatus - ld bc,$f220 + ld bc, (ICE_HEAL_MSG << 8) | (1 << FRZ) cp a,ICE_HEAL jr z,.checkMonStatus - ld bc,$f307 + ld bc, (AWAKENING_MSG << 8) | SLP cp a,AWAKENING jr z,.checkMonStatus - ld bc,$f440 + ld bc, (PARALYZ_HEAL_MSG << 8) | (1 << PAR) cp a,PARLYZ_HEAL jr z,.checkMonStatus - ld bc,$f6ff ; Full Heal + ld bc, (FULL_HEAL_MSG << 8) | $ff ; Full Heal .checkMonStatus ld a,[hl] ; pokemon's status and c ; does the pokemon have a status ailment the item can cure? @@ -761,7 +761,7 @@ ItemUseMedicine: ; dabb (3:5abb) xor a ld [hl],a ; remove the status ailment in the party data ld a,b - ld [wd07d],a ; the message to display for the item used + ld [wPartyMenuTypeOrMessageID],a ; the message to display for the item used ld a,[wPlayerMonNumber] cp d ; is pokemon the item was used on active in battle? jp nz,.doneHealing @@ -1078,15 +1078,15 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[hFlags_0xFFF6] res 0,a ld [hFlags_0xFFF6],a - ld a,$f7 ; revived message - ld [wd07d],a + ld a,REVIVE_MSG + ld [wPartyMenuTypeOrMessageID],a ld a,[wcf91] cp a,REVIVE jr z,.showHealingItemMessage cp a,MAX_REVIVE jr z,.showHealingItemMessage - ld a,$f5 ; standard HP healed message - ld [wd07d],a + ld a,POTION_MSG + ld [wPartyMenuTypeOrMessageID],a jr .showHealingItemMessage .playStatusAilmentCuringSound ld a,(SFX_02_3e - SFX_Headers_02) / 3 ; status ailment curing sound @@ -1257,8 +1257,8 @@ ItemUseMedicine: ; dabb (3:5abb) ld a,[hl] adc b ld [hl],a - ld a,$f8 ; level up message - ld [wd07d],a + ld a,RARE_CANDY_MSG + ld [wPartyMenuTypeOrMessageID],a call RedrawPartyMenu pop de ld a,d @@ -1878,8 +1878,8 @@ ItemUsePPRestore: ; e31e (3:631e) .chooseMon xor a ld [wUpdateSpritesEnabled],a - ld a,$01 ; item use party menu - ld [wd07d],a + ld a,USE_ITEM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a call DisplayPartyMenu jr nc,.chooseMove jp .itemNotUsed @@ -2118,8 +2118,8 @@ ItemUseTMHM: ; e479 (3:6479) call CopyData ld a,$ff ld [wUpdateSpritesEnabled],a - ld a,$03 ; teach TM/HM party menu - ld [wd07d],a + ld a,TMHM_PARTY_MENU + ld [wPartyMenuTypeOrMessageID],a call DisplayPartyMenu push af ld hl,wd036 @@ -2650,8 +2650,8 @@ SendNewMonToBox: ; e7a4 (3:67a4) jr nz, .asm_e817 .asm_e82a ld hl, wBoxMonNicks - ld a, $2 - ld [wd07d], a + ld a, NAME_MON_SCREEN + ld [wNamingScreenType], a predef AskName ld a, [W_NUMINBOX] dec a diff --git a/engine/menu/naming_screen.asm b/engine/menu/naming_screen.asm index f77f7331..9bdfbee2 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 @@ -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/start_sub_menus.asm b/engine/menu/start_sub_menus.asm index 0a940356..d97c3d99 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 @@ -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 diff --git a/engine/oak_speech2.asm b/engine/oak_speech2.asm index d8043484..49154d13 100755 --- a/engine/oak_speech2.asm +++ b/engine/oak_speech2.asm @@ -12,8 +12,8 @@ LoadDefaultNamesPlayer: ; 695d (1:695d) jr .asm_6999 .asm_697a ld hl, wPlayerName - xor a - ld [wd07d], a + xor a ; NAME_PLAYER_SCREEN + ld [wNamingScreenType], a call DisplayNamingScreen ld a, [wcf4b] cp $50 @@ -45,8 +45,8 @@ LoadDefaultNamesRival: ; 69a4 (1:69a4) jr .asm_69e1 .asm_69c1 ld hl, W_RIVALNAME - ld a, $1 - ld [wd07d], a + ld a, NAME_RIVAL_SCREEN + ld [wNamingScreenType], a call DisplayNamingScreen ld a, [wcf4b] cp $50 diff --git a/home.asm b/home.asm index f7da6e3a..b76713bf 100644 --- a/home.asm +++ b/home.asm @@ -456,7 +456,7 @@ HandlePartyMenuInput:: ; 145a (0:145a) callba ErasePartyMenuCursors xor a ld [wMenuItemToSwap],a - ld [wd07d],a + ld [wPartyMenuTypeOrMessageID],a call RedrawPartyMenu jr HandlePartyMenuInput .handleSwap diff --git a/main.asm b/main.asm index 3a1e0621..d3e2f404 100755 --- a/main.asm +++ b/main.asm @@ -3582,8 +3582,8 @@ _AddPartyMon: ; f2e5 (3:72e5) ld a, [$ffe4] dec a call SkipFixedLengthTextEntries - ld a, $2 - ld [wd07d], a + ld a, NAME_MON_SCREEN + ld [wNamingScreenType], a predef AskName .asm_f33f ld hl, wPartyMons diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index f48584dc..5e80a10f 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -25,7 +25,7 @@ DayCareMText1: ; 56254 (15:6254) call PrintText xor a ld [wUpdateSpritesEnabled], a - ld [wd07d], a + ld [wPartyMenuTypeOrMessageID], a ld [wMenuItemToSwap], a call DisplayPartyMenu push af diff --git a/scripts/namerater.asm b/scripts/namerater.asm index 010dc0cd..c2d028ef 100755 --- a/scripts/namerater.asm +++ b/scripts/namerater.asm @@ -49,7 +49,7 @@ NameRaterText1: ; 1da56 (7:5a56) ld hl, NameRaterText_1dab8 call PrintText xor a - ld [wd07d], a + ld [wPartyMenuTypeOrMessageID], a ld [wUpdateSpritesEnabled], a ld [wMenuItemToSwap], a call DisplayPartyMenu @@ -68,7 +68,7 @@ NameRaterText1: ; 1da56 (7:5a56) jr nz, .asm_1daae ld hl, NameRaterText_1dac2 call PrintText - callba Func_655c + callba DisplayNameRaterScreen jr c, .asm_1daae ld hl, NameRaterText_1dac7 .asm_1daa8 diff --git a/wram.asm b/wram.asm index c1002fcd..13853b55 100755 --- a/wram.asm +++ b/wram.asm @@ -1232,7 +1232,13 @@ W_ANIMATIONID:: ; d07c ; ID number of the current battle animation ds 1 -wd07d:: ds 1 ; used with naming functions and party display type +wNamingScreenType:: ; d07d + +wPartyMenuTypeOrMessageID:: ; d07d + +wTempTilesetNumTiles:: ; d07d +; temporary storage for the number of tiles in a tileset + ds 1 wSavedListScrollOffset:: ; d07e ; used by the pokemart code to save the existing value of wListScrollOffset -- cgit v1.3.1-sl0p