diff options
| author | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2024-09-25 00:45:00 -0500 |
| commit | a02a98ee7ada1a658e28698484058be2796dc0df (patch) | |
| tree | 945986054565bd8b5212fc755415096050d1d3a8 /home/pokemon.asm | |
| parent | Use long option flags for rgbgfx, same as tools/gfx (diff) | |
| parent | Use `const_skip` (diff) | |
| download | pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.gz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.tar.xz pokeyellow-a02a98ee7ada1a658e28698484058be2796dc0df.zip | |
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'home/pokemon.asm')
| -rw-r--r-- | home/pokemon.asm | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/home/pokemon.asm b/home/pokemon.asm index 0e28df50..5d2c1a24 100644 --- a/home/pokemon.asm +++ b/home/pokemon.asm @@ -75,7 +75,7 @@ DrawHPBar:: ; 02: current box ; 03: daycare ; OUTPUT: -; [wcf91] = pokemon ID +; [wCurPartySpecies] = pokemon ID ; wLoadedMon = base address of pokemon data ; wMonHeader = base address of base stats LoadMonData:: @@ -97,12 +97,12 @@ LoadFlippedFrontSpriteByMonIndex:: LoadFrontSpriteByMonIndex:: push hl - ld a, [wd11e] + ld a, [wPokedexNum] push af - ld a, [wcf91] - ld [wd11e], a + ld a, [wCurPartySpecies] + ld [wPokedexNum], a predef IndexToPokedex - ld hl, wd11e + ld hl, wPokedexNum ld a, [hl] pop bc ld [hl], b @@ -113,7 +113,7 @@ LoadFrontSpriteByMonIndex:: jr c, .validDexNumber ; dex >#151 invalid .invalidDexNumber ld a, RHYDON ; $1 - ld [wcf91], a + ld [wCurPartySpecies], a ret .validDexNumber push hl @@ -204,8 +204,8 @@ PartyMenuInit:: ld a, 1 ; hardcoded bank call BankswitchHome call LoadHpBarAndStatusTilePatterns - ld hl, wd730 - set 6, [hl] ; turn off letter printing delay + ld hl, wStatusFlags5 + set BIT_NO_TEXT_DELAY, [hl] xor a ; PLAYER_PARTY_DATA ld [wMonDataLocation], a ld [wMenuWatchMovingOutOfBounds], a @@ -246,7 +246,7 @@ HandlePartyMenuInput:: ld [wPartyMenuAnimMonEnabled], a call HandleMenuInput_ push af ; save hJoy5 OR wMenuWrapping enabled, if no inputs were selected within a certain period of time - bit 1, a ; was B button pressed? + bit BIT_B_BUTTON, a ; was B button pressed? ld a, $0 ld [wPartyMenuAnimMonEnabled], a ld a, [wCurrentMenuItem] @@ -262,14 +262,14 @@ HandlePartyMenuInput:: pop af call PlaceUnfilledArrowMenuCursor ld b, a - ld hl, wd730 - res 6, [hl] ; turn on letter printing delay + ld hl, wStatusFlags5 + res BIT_NO_TEXT_DELAY, [hl] ld a, [wMenuItemToSwap] and a jp nz, .swappingPokemon pop af ldh [hTileAnimations], a - bit 1, b + bit BIT_B_BUTTON, b jr nz, .noPokemonChosen ld a, [wPartyCount] and a @@ -281,7 +281,7 @@ HandlePartyMenuInput:: ld c, a add hl, bc ld a, [hl] - ld [wcf91], a + ld [wCurPartySpecies], a ld [wBattleMonSpecies2], a call BankswitchBack and a @@ -383,8 +383,8 @@ PrintLevelFull:: ld a, [wLoadedMonLevel] ; level PrintLevelCommon:: - ld [wd11e], a - ld de, wd11e + ld [wTempByteValue], a + ld de, wTempByteValue ld b, LEFT_ALIGN | 1 ; 1 byte jp PrintNumber @@ -399,7 +399,7 @@ GetwMoves:: ; copies the base stat data of a pokemon to wMonHeader ; INPUT: -; [wd0b5] = pokemon ID +; [wCurSpecies] = pokemon ID GetMonHeader:: ldh a, [hLoadedROMBank] push af @@ -408,10 +408,10 @@ GetMonHeader:: push bc push de push hl - ld a, [wd11e] + ld a, [wPokedexNum] push af - ld a, [wd0b5] - ld [wd11e], a + ld a, [wCurSpecies] + ld [wPokedexNum], a ld de, FossilKabutopsPic ld b, $66 ; size of Kabutops fossil and Ghost sprites cp FOSSIL_KABUTOPS ; Kabutops fossil @@ -423,8 +423,8 @@ GetMonHeader:: ld b, $77 ; size of Aerodactyl fossil sprite cp FOSSIL_AERODACTYL ; Aerodactyl fossil jr z, .specialID - predef IndexToPokedex ; convert pokemon ID in [wd11e] to pokedex number - ld a, [wd11e] + predef IndexToPokedex + ld a, [wPokedexNum] dec a ld bc, BASE_DATA_SIZE ld hl, BaseStats @@ -441,10 +441,10 @@ GetMonHeader:: inc hl ld [hl], d .done - ld a, [wd0b5] + ld a, [wCurSpecies] ld [wMonHIndex], a pop af - ld [wd11e], a + ld [wPokedexNum], a pop hl pop de pop bc @@ -452,7 +452,7 @@ GetMonHeader:: call BankswitchCommon ret -; copy party pokemon's name to wcd6d +; copy party pokemon's name to wNameBuffer GetPartyMonName2:: ld a, [wWhichPokemon] ; index within party ld hl, wPartyMonNicks @@ -462,7 +462,7 @@ GetPartyMonName:: push hl push bc call SkipFixedLengthTextEntries ; add NAME_LENGTH to hl, a times - ld de, wcd6d + ld de, wNameBuffer push de ld bc, NAME_LENGTH call CopyData |
