diff options
| author | Sylvie <35663410+Rangi42@users.noreply.github.com> | 2024-08-04 10:05:33 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-04 10:05:33 -0400 |
| commit | 77d051479bd0ed96cc2efdba52f837afd1e119c3 (patch) | |
| tree | 72a22aeb8dd6edc10323f0ee72fe9dbf73e5481a /engine/pokemon | |
| parent | Identify wcd6d as wNameBuffer and others (#455) (diff) | |
| download | pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.tar.gz pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.tar.xz pokeyellow-77d051479bd0ed96cc2efdba52f837afd1e119c3.zip | |
Identify wcf91 as wCurPartySpecies, wCurItem, and wCurListMenuItem (#457)
Diffstat (limited to 'engine/pokemon')
| -rw-r--r-- | engine/pokemon/add_mon.asm | 14 | ||||
| -rw-r--r-- | engine/pokemon/bills_pc.asm | 6 | ||||
| -rw-r--r-- | engine/pokemon/evos_moves.asm | 12 | ||||
| -rw-r--r-- | engine/pokemon/load_mon_data.asm | 6 | ||||
| -rw-r--r-- | engine/pokemon/status_screen.asm | 6 |
5 files changed, 22 insertions, 22 deletions
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm index 73ba8071..ab167a24 100644 --- a/engine/pokemon/add_mon.asm +++ b/engine/pokemon/add_mon.asm @@ -21,7 +21,7 @@ _AddPartyMon:: jr nc, .noCarry inc d .noCarry - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [de], a ; write species of new mon in party list inc de ld a, $ff ; terminator @@ -64,7 +64,7 @@ _AddPartyMon:: ld e, l ld d, h push hl - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [wd0b5], a call GetMonHeader ld hl, wMonHeader @@ -80,7 +80,7 @@ _AddPartyMon:: jr nz, .next4 ; If the mon is being added to the player's party, update the pokedex. - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [wd11e], a push de predef IndexToPokedex @@ -275,7 +275,7 @@ AddPartyMon_WriteMovePP: jr nz, .pploop ; there are still moves to read ret -; adds enemy mon [wcf91] (at position [wWhichPokemon] in enemy list) to own party +; adds enemy mon [wCurPartySpecies] (at position [wWhichPokemon] in enemy list) to own party ; used in the cable club trade center _AddEnemyMonToPlayerParty:: ld hl, wPartyCount @@ -288,7 +288,7 @@ _AddEnemyMonToPlayerParty:: ld c, a ld b, $0 add hl, bc - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [hli], a ; add mon as last list entry ld [hl], $ff ; write new sentinel ld hl, wPartyMons @@ -322,7 +322,7 @@ _AddEnemyMonToPlayerParty:: call SkipFixedLengthTextEntries ld bc, NAME_LENGTH call CopyData ; write new mon's nickname (from an enemy mon) - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [wd11e], a predef IndexToPokedex ld a, [wd11e] @@ -371,7 +371,7 @@ _MoveMon:: cp DAYCARE_TO_PARTY ld a, [wDayCareMon] jr z, .copySpecies - ld a, [wcf91] + ld a, [wCurPartySpecies] .copySpecies ld [hli], a ; write new mon ID ld [hl], $ff ; write new sentinel diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 59933762..736c104c 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -224,7 +224,7 @@ BillsPCDeposit: jp c, BillsPCMenu call DisplayDepositWithdrawMenu jp nc, BillsPCMenu - ld a, [wcf91] + ld a, [wCurPartySpecies] call GetCryData call PlaySoundWaitForCurrent ld a, PARTY_TO_BOX @@ -276,7 +276,7 @@ BillsPCWithdraw: ld a, [wWhichPokemon] ld hl, wBoxMonNicks call GetPartyMonName - ld a, [wcf91] + ld a, [wCurPartySpecies] call GetCryData call PlaySoundWaitForCurrent xor a ; BOX_TO_PARTY @@ -311,7 +311,7 @@ BillsPCRelease: ld [wRemoveMonFromBox], a call RemovePokemon call WaitForSoundToFinish - ld a, [wcf91] + ld a, [wCurPartySpecies] call PlayCry ld hl, MonWasReleasedText call PrintText diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm index 1c7c328c..aae6cb87 100644 --- a/engine/pokemon/evos_moves.asm +++ b/engine/pokemon/evos_moves.asm @@ -53,13 +53,13 @@ Evolution_PartyMonLoop: ; loop over party mons ld h, [hl] ld l, a push hl - ld a, [wcf91] + ld a, [wCurPartySpecies] push af xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a call LoadMonData pop af - ld [wcf91], a + ld [wCurPartySpecies], a pop hl .evoEntryLoop ; loop over evolution entries @@ -95,7 +95,7 @@ Evolution_PartyMonLoop: ; loop over party mons .checkItemEvo ld a, [hli] ld b, a ; evolution item - ld a, [wcf91] ; this is supposed to be the last item used, but it is also used to hold species numbers + ld a, [wCurItem] cp b ; was the evolution item in this entry used? jp nz, .nextEvoEntry1 ; if not, go to the next evolution entry .checkLevel @@ -320,7 +320,7 @@ Evolution_ReloadTilesetTilePatterns: LearnMoveFromLevelUp: ld hl, EvosMovesPointerTable ld a, [wd11e] ; species - ld [wcf91], a + ld [wCurPartySpecies], a dec a ld bc, 0 ld hl, EvosMovesPointerTable @@ -371,7 +371,7 @@ LearnMoveFromLevelUp: call CopyToStringBuffer predef LearnMove .done - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [wd11e], a ret @@ -384,7 +384,7 @@ WriteMonMoves: push bc ld hl, EvosMovesPointerTable ld b, 0 - ld a, [wcf91] ; cur mon ID + ld a, [wCurPartySpecies] dec a add a rl b diff --git a/engine/pokemon/load_mon_data.asm b/engine/pokemon/load_mon_data.asm index c5e2041a..3d0548e0 100644 --- a/engine/pokemon/load_mon_data.asm +++ b/engine/pokemon/load_mon_data.asm @@ -4,11 +4,11 @@ LoadMonData_:: ; 1: enemymon ; 2: boxmon ; 3: daycaremon -; Return monster id at wcf91 and its data at wLoadedMon. +; Return monster id at wCurPartySpecies and its data at wLoadedMon. ; Also load base stats at wMonHeader for convenience. ld a, [wDayCareMonSpecies] - ld [wcf91], a + ld [wCurPartySpecies], a ld a, [wMonDataLocation] cp DAYCARE_DATA jr z, .GetMonHeader @@ -18,7 +18,7 @@ LoadMonData_:: callfar GetMonSpecies .GetMonHeader - ld a, [wcf91] + ld a, [wCurPartySpecies] ld [wd0b5], a ; input for GetMonHeader call GetMonHeader diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm index d29c23fe..4ae4327a 100644 --- a/engine/pokemon/status_screen.asm +++ b/engine/pokemon/status_screen.asm @@ -170,9 +170,9 @@ StatusScreen: call GBPalNormal hlcoord 1, 0 call LoadFlippedFrontSpriteByMonIndex ; draw Pokémon picture - ld a, [wcf91] - call PlayCry ; play Pokémon cry - call WaitForTextScrollButtonPress ; wait for button + ld a, [wCurPartySpecies] + call PlayCry + call WaitForTextScrollButtonPress pop af ldh [hTileAnimations], a ret |
