diff options
Diffstat (limited to 'engine/party_menu.asm')
-rw-r--r-- | engine/party_menu.asm | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/engine/party_menu.asm b/engine/party_menu.asm index 5ef9b50de..9dffa4089 100644 --- a/engine/party_menu.asm +++ b/engine/party_menu.asm @@ -1,7 +1,7 @@ SelectMonFromParty: ; 50000 call DisableSpriteUpdates xor a - ld [PartyMenuActionText], a + ld [wPartyMenuActionText], a call ClearBGPalettes call InitPartyMenuLayout call WaitBGMap @@ -15,7 +15,7 @@ SelectMonFromParty: ; 50000 SelectTradeOrDayCareMon: ; 5001d ld a, b - ld [PartyMenuActionText], a + ld [wPartyMenuActionText], a call DisableSpriteUpdates call ClearBGPalettes call InitPartyMenuLayout @@ -47,7 +47,7 @@ LoadPartyMenuGFX: ; 5004f WritePartyMenuTilemap: ; 0x5005f - ld hl, Options + ld hl, wOptions ld a, [hl] push af set NO_TEXT_SCROLL, [hl] @@ -69,7 +69,7 @@ WritePartyMenuTilemap: ; 0x5005f jr .loop .end pop af - ld [Options], a + ld [wOptions], a ret ; 0x50089 @@ -88,7 +88,7 @@ WritePartyMenuTilemap: ; 0x5005f PlacePartyNicknames: ; 5009b hlcoord 3, 1 - ld a, [PartyCount] + ld a, [wPartyCount] and a jr z, .end ld c, a @@ -97,7 +97,7 @@ PlacePartyNicknames: ; 5009b push bc push hl push hl - ld hl, PartyMonNicknames + ld hl, wPartyMonNicknames ld a, b call GetNick pop hl @@ -126,7 +126,7 @@ PlacePartyNicknames: ; 5009b PlacePartyHPBar: ; 500cf xor a ld [wSGBPals], a - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -169,7 +169,7 @@ PlacePartyHPBar: ; 500cf PlacePartymonHPBar: ; 50117 ld a, b ld bc, PARTYMON_STRUCT_LENGTH - ld hl, PartyMon1HP + ld hl, wPartyMon1HP call AddNTimes ld a, [hli] or [hl] @@ -194,7 +194,7 @@ PlacePartymonHPBar: ; 50117 ; 50138 PlacePartyMenuHPDigits: ; 50138 - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -208,7 +208,7 @@ PlacePartyMenuHPDigits: ; 50138 push hl ld a, b ld bc, PARTYMON_STRUCT_LENGTH - ld hl, PartyMon1HP + ld hl, wPartyMon1HP call AddNTimes ld e, l ld d, h @@ -236,7 +236,7 @@ PlacePartyMenuHPDigits: ; 50138 ; 50176 PlacePartyMonLevel: ; 50176 - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -250,7 +250,7 @@ PlacePartyMonLevel: ; 50176 push hl ld a, b ld bc, PARTYMON_STRUCT_LENGTH - ld hl, PartyMon1Level + ld hl, wPartyMon1Level call AddNTimes ld e, l ld d, h @@ -279,7 +279,7 @@ PlacePartyMonLevel: ; 50176 ; 501b2 PlacePartyMonStatus: ; 501b2 - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -293,7 +293,7 @@ PlacePartyMonStatus: ; 501b2 push hl ld a, b ld bc, PARTYMON_STRUCT_LENGTH - ld hl, PartyMon1Status + ld hl, wPartyMon1Status call AddNTimes ld e, l ld d, h @@ -312,7 +312,7 @@ PlacePartyMonStatus: ; 501b2 ; 501e0 PlacePartyMonTMHMCompatibility: ; 501e0 - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -324,12 +324,12 @@ PlacePartyMonTMHMCompatibility: ; 501e0 call PartyMenuCheckEgg jr z, .next push hl - ld hl, PartySpecies + ld hl, wPartySpecies ld e, b ld d, 0 add hl, de ld a, [hl] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a predef CanLearnTMHMMove pop hl call .PlaceAbleNotAble @@ -368,7 +368,7 @@ PlacePartyMonTMHMCompatibility: ; 501e0 PlacePartyMonEvoStoneCompatibility: ; 5022f - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -382,7 +382,7 @@ PlacePartyMonEvoStoneCompatibility: ; 5022f push hl ld a, b ld bc, PARTYMON_STRUCT_LENGTH - ld hl, PartyMon1Species + ld hl, wPartyMon1Species call AddNTimes ld a, [hl] dec a @@ -407,19 +407,19 @@ PlacePartyMonEvoStoneCompatibility: ; 5022f ; 50268 .DetermineCompatibility: ; 50268 - ld de, StringBuffer1 + ld de, wStringBuffer1 ld a, BANK(EvosAttacksPointers) ld bc, 2 call FarCopyBytes - ld hl, StringBuffer1 + ld hl, wStringBuffer1 ld a, [hli] ld h, [hl] ld l, a - ld de, StringBuffer1 + ld de, wStringBuffer1 ld a, BANK(EvosAttacks) ld bc, $a call FarCopyBytes - ld hl, StringBuffer1 + ld hl, wStringBuffer1 .loop2 ld a, [hli] and a @@ -430,7 +430,7 @@ PlacePartyMonEvoStoneCompatibility: ; 5022f jr nz, .loop2 dec hl dec hl - ld a, [CurItem] + ld a, [wCurItem] cp [hl] inc hl inc hl @@ -452,7 +452,7 @@ PlacePartyMonEvoStoneCompatibility: ; 5022f PlacePartyMonGender: ; 502b1 - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -463,12 +463,12 @@ PlacePartyMonGender: ; 502b1 push hl call PartyMenuCheckEgg jr z, .next - ld [CurPartySpecies], a + ld [wCurPartySpecies], a push hl ld a, b - ld [CurPartyMon], a + ld [wCurPartyMon], a xor a - ld [MonType], a + ld [wMonType], a call GetGender ld de, .unknown jr c, .got_gender @@ -505,7 +505,7 @@ PlacePartyMonGender: ; 502b1 PlacePartyMonMobileBattleSelection: ; 50307 - ld a, [PartyCount] + ld a, [wPartyCount] and a ret z ld c, a @@ -588,10 +588,10 @@ PlacePartyMonMobileBattleSelection: ; 50307 PartyMenuCheckEgg: ; 50389 - ld a, LOW(PartySpecies) + ld a, LOW(wPartySpecies) add b ld e, a - ld a, HIGH(PartySpecies) + ld a, HIGH(wPartySpecies) adc 0 ld d, a ld a, [de] @@ -600,10 +600,10 @@ PartyMenuCheckEgg: ; 50389 ; 50396 GetPartyMenuQualityIndexes: ; 50396 - ld a, [PartyMenuActionText] + ld a, [wPartyMenuActionText] and $f0 jr nz, .skip - ld a, [PartyMenuActionText] + ld a, [wPartyMenuActionText] and $f ld e, a ld d, 0 @@ -624,7 +624,7 @@ INCLUDE "data/party_menu_qualities.asm" InitPartyMenuGFX: ; 503e0 - ld hl, PartyCount + ld hl, wPartyCount ld a, [hli] and a ret z @@ -655,7 +655,7 @@ InitPartyMenuWithCancel: ; 50405 ld [wSwitchMon], a ld de, PartyMenuAttributes call SetMenuAttributes - ld a, [PartyCount] + ld a, [wPartyCount] inc a ld [w2DMenuNumRows], a ; list length dec a @@ -681,7 +681,7 @@ InitPartyMenuNoCancel: ; 0x5042d ; no cancel ld de, PartyMenuAttributes call SetMenuAttributes - ld a, [PartyCount] + ld a, [wPartyCount] ld [w2DMenuNumRows], a ; list length ld b, a ld a, [wPartyMenuCursor] @@ -719,7 +719,7 @@ PartyMenuSelect: ; 0x50457 ; sets carry if exitted menu. call StaticMenuJoypad call PlaceHollowCursor - ld a, [PartyCount] + ld a, [wPartyCount] inc a ld b, a ld a, [wMenuCursorY] ; menu selection? @@ -732,13 +732,13 @@ PartyMenuSelect: ; 0x50457 jr nz, .exitmenu ; B button ld a, [wMenuCursorY] dec a - ld [CurPartyMon], a + ld [wCurPartyMon], a ld c, a ld b, $0 - ld hl, PartySpecies + ld hl, wPartySpecies add hl, bc ld a, [hl] - ld [CurPartySpecies], a + ld [wCurPartySpecies], a ld de, SFX_READ_TEXT_2 call PlaySFX @@ -759,13 +759,13 @@ PrintPartyMenuText: ; 5049a hlcoord 0, 14 lb bc, 2, 18 call TextBox - ld a, [PartyCount] + ld a, [wPartyCount] and a jr nz, .haspokemon ld de, YouHaveNoPKMNString jr .gotstring .haspokemon ; 504ae - ld a, [PartyMenuActionText] + ld a, [wPartyMenuActionText] and $f ; drop high nibble ld hl, PartyMenuStrings ld e, a @@ -776,14 +776,14 @@ PrintPartyMenuText: ; 5049a ld d, [hl] ld e, a .gotstring ; 504be - ld a, [Options] + ld a, [wOptions] push af set 4, a ; disable text delay - ld [Options], a + ld [wOptions], a hlcoord 1, 16 ; Coord call PlaceString pop af - ld [Options], a + ld [wOptions], a ret ; 0x504d2 @@ -828,10 +828,10 @@ YouHaveNoPKMNString: ; 0x50556 db "You have no <PK><MN>!@" PrintPartyMenuActionText: ; 50566 - ld a, [CurPartyMon] - ld hl, PartyMonNicknames + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames call GetNick - ld a, [PartyMenuActionText] + ld a, [wPartyMenuActionText] and $f ld hl, .MenuActionTexts call .PrintText @@ -920,12 +920,12 @@ PrintPartyMenuActionText: ; 50566 ld a, [hli] ld h, [hl] ld l, a - ld a, [Options] + ld a, [wOptions] push af set NO_TEXT_SCROLL, a - ld [Options], a + ld [wOptions], a call PrintText pop af - ld [Options], a + ld [wOptions], a ret ; 505da |