aboutsummaryrefslogtreecommitdiffstats
path: root/engine/give_pokemon.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-05-26 14:04:56 -0700
committeryenatch <yenatch@gmail.com>2014-05-26 22:04:39 -0700
commit40c17c906b2b3f65b3b04b1933b90238a7ac5566 (patch)
tree6de26c959808d5a792b692f2300c33557c1dbfab /engine/give_pokemon.asm
parentDon't hardcode wram sections (except for alignment). (diff)
downloadpokeyellow-40c17c906b2b3f65b3b04b1933b90238a7ac5566.tar.gz
pokeyellow-40c17c906b2b3f65b3b04b1933b90238a7ac5566.tar.xz
pokeyellow-40c17c906b2b3f65b3b04b1933b90238a7ac5566.zip
Remove most static wram addresses. Use labels instead.
For unknown addresses, use "w<address>". Label overleads are still an issue.
Diffstat (limited to 'engine/give_pokemon.asm')
-rwxr-xr-xengine/give_pokemon.asm28
1 files changed, 14 insertions, 14 deletions
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm
index 8d8e98e0..8cd58421 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, [W_NUMINPARTY] ; W_NUMINPARTY
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_ENEMYBATTSTATUS3], a ; W_ENEMYBATTSTATUS3
+ ld a, [wcf91]
ld [W_ENEMYMONID], 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
@@ -43,26 +43,26 @@ _GivePokemon: ; 4fda5 (13:7da5)
call SetPokedexOwnedFlag
call AddPokemonToParty
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 [wd11e], a
ld a, $3a
call Predef ; indirect jump to IndexToPokedex (41010 (10:5010))
- ld a, [$d11e]
+ ld a, [wd11e]
dec a
ld c, a
- ld hl, wPokedexOwned ; $d2f7
+ ld hl, wPokedexOwned ; wPokedexOwned
ld b, $1
ld a, $10 ; FlagActionPredef
call Predef
pop af
- ld [$d11e], a
+ ld [wd11e], a
call GetMonName
ld hl, GotMonText
jp PrintText