diff options
author | yenatch <yenatch@gmail.com> | 2014-07-12 09:02:49 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2014-07-12 09:02:49 -0400 |
commit | fb11ff7e55be56cef9234c8443614f04f2157a1e (patch) | |
tree | a6aa8d0745bd07d0b80090491b5e4b6652de4420 /engine/give_pokemon.asm | |
parent | 15427f532085846ab6b51719be687951a094cb6c (diff) | |
parent | 9f29f21d9d43baa7124991dcf3b093fc6c615706 (diff) |
Merge pull request #48 from yenatch/master
Clean up post-split main.asm. Get rid of static wram addresses. Lay out a foundation for Yellow.
Diffstat (limited to 'engine/give_pokemon.asm')
-rwxr-xr-x | engine/give_pokemon.asm | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm index ba1461c3..9399fb05 100755 --- a/engine/give_pokemon.asm +++ b/engine/give_pokemon.asm @@ -1,22 +1,22 @@ _GivePokemon: ; 4fda5 (13:7da5) call EnableAutoTextBoxDrawing xor a - ld [$ccd3], a - ld a, [W_NUMINPARTY] ; $d163 + ld [wccd3], a + ld a, [wPartyCount] ; wPartyCount cp $6 jr c, .asm_4fe01 - ld a, [W_NUMINBOX] ; $da80 + ld a, [W_NUMINBOX] ; wda80 cp $14 jr nc, .asm_4fdf9 xor a - ld [W_ENEMYBATTSTATUS3], a ; $d069 - ld a, [$cf91] - ld [W_ENEMYMONID], a + ld [W_ENEMYBATTSTATUS3], a ; W_ENEMYBATTSTATUS3 + ld a, [wcf91] + ld [wEnemyMonSpecies2], a callab Func_3eb01 call SetPokedexOwnedFlag callab Func_e7a4 - ld hl, $cf4b - ld a, [$d5a0] + ld hl, wcf4b + ld a, [wd5a0] and $7f cp $9 jr c, .asm_4fdec @@ -41,28 +41,26 @@ _GivePokemon: ; 4fda5 (13:7da5) ret .asm_4fe01 call SetPokedexOwnedFlag - call AddPokemonToParty + call AddPartyMon ld a, $1 - ld [$cc3c], a - ld [$ccd3], a + ld [wcc3c], a + ld [wccd3], a scf ret SetPokedexOwnedFlag: ; 4fe11 (13:7e11) - ld a, [$cf91] + ld a, [wcf91] push af - ld [$d11e], a - ld a, $3a - call Predef ; indirect jump to IndexToPokedex (41010 (10:5010)) - ld a, [$d11e] + ld [wd11e], a + predef IndexToPokedex + ld a, [wd11e] dec a ld c, a - ld hl, wPokedexOwned ; $d2f7 + ld hl, wPokedexOwned ; wPokedexOwned ld b, $1 - ld a, $10 - call Predef ; indirect jump to HandleBitArray (f666 (3:7666)) + predef FlagActionPredef pop af - ld [$d11e], a + ld [wd11e], a call GetMonName ld hl, GotMonText jp PrintText |