summaryrefslogtreecommitdiff
path: root/engine/mon_party_sprites.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/mon_party_sprites.asm')
-rwxr-xr-xengine/mon_party_sprites.asm99
1 files changed, 49 insertions, 50 deletions
diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm
index eb95d9bd..e05bdd55 100755
--- a/engine/mon_party_sprites.asm
+++ b/engine/mon_party_sprites.asm
@@ -1,16 +1,16 @@
AnimatePartyMon_ForceSpeed1: ; 716f7 (1c:56f7)
xor a
- ld [wCurrentMenuItem], a ; $cc26
+ ld [wCurrentMenuItem], a ; wCurrentMenuItem
ld b, a
inc a
jr GetAnimationSpeed
-; $cf1f contains the party mon's health bar colors
+; wcf1f contains the party mon's health bar colors
; 0: green
; 1: yellow
; 2: red
AnimatePartyMon: ; 716ff (1c:56ff)
- ld hl, $cf1f
+ ld hl, wcf1f
ld a, [wCurrentMenuItem]
ld c, a
ld b, $0
@@ -21,13 +21,13 @@ GetAnimationSpeed: ; 7170a (1c:570a)
ld c, a
ld hl, PartyMonSpeeds
add hl, bc
- ld a, [$cf1b]
+ ld a, [wcf1b]
xor $1
add [hl]
ld c, a
add a
ld b, a
- ld a, [W_SUBANIMTRANSFORM] ; $d08b
+ ld a, [W_SUBANIMTRANSFORM] ; W_SUBANIMTRANSFORM
and a
jr z, .resetSprites
cp c
@@ -38,11 +38,11 @@ GetAnimationSpeed: ; 7170a (1c:570a)
jr nz, .resetTimer
xor a
.resetTimer
- ld [W_SUBANIMTRANSFORM], a ; $d08b
+ ld [W_SUBANIMTRANSFORM], a ; W_SUBANIMTRANSFORM
jp DelayFrame
.resetSprites
push bc
- ld hl, $cc5b
+ ld hl, wcc5b
ld de, wOAMBuffer
ld bc, $60
call CopyData
@@ -51,7 +51,7 @@ GetAnimationSpeed: ; 7170a (1c:570a)
jr .incTimer
.animateSprite
push bc
- ld hl, $c302 ; OAM tile id
+ ld hl, wOAMBuffer + $02 ; OAM tile id
ld bc, $10
ld a, [wCurrentMenuItem]
call AddNTimes
@@ -156,155 +156,155 @@ MonPartySpritePointers: ; 717c0 (1c:57c0)
dw SlowbroSprite + $c0
db $40 / $10 ; 40 bytes
db BANK(SlowbroSprite)
- dw $8000
+ dw vSprites
dw BallSprite
db $80 / $10 ; $80 bytes
db BANK(BallSprite)
- dw $8040
+ dw vSprites + $40
dw ClefairySprite + $c0
db $40 / $10 ; $40 bytes
db BANK(ClefairySprite)
- dw $80C0
+ dw vSprites + $c0
dw BirdSprite + $c0
db $40 / $10 ; $40 bytes
db BANK(BirdSprite)
- dw $8100
+ dw vSprites + $100
dw SeelSprite
db $40 / $10 ; $40 bytes
db BANK(SeelSprite)
- dw $8140
+ dw vSprites + $140
dw MonPartySprites + $40
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8180
+ dw vSprites + $180
dw MonPartySprites + $50
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $81A0
+ dw vSprites + $1a0
dw MonPartySprites + $60
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $81C0
+ dw vSprites + $1c0
dw MonPartySprites + $70
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $81E0
+ dw vSprites + $1e0
dw MonPartySprites + $80
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8200
+ dw vSprites + $200
dw MonPartySprites + $90
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8220
+ dw vSprites + $220
dw MonPartySprites + $A0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8240
+ dw vSprites + $240
dw MonPartySprites + $B0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8260
+ dw vSprites + $260
dw MonPartySprites + $100
db $40 / $10 ; $40 bytes
db BANK(MonPartySprites)
- dw $8380
+ dw vSprites + $380
dw SlowbroSprite
db $40 / $10 ; $40 bytes
db BANK(SlowbroSprite)
- dw $8400
+ dw vSprites + $400
dw BallSprite
db $80 / $10 ; $80 bytes
db BANK(BallSprite)
- dw $8440
+ dw vSprites + $440
dw ClefairySprite
db $40 / $10 ; $40 bytes
db BANK(ClefairySprite)
- dw $84C0
+ dw vSprites + $4c0
dw BirdSprite
db $40 / $10 ; $40 bytes
db BANK(BirdSprite)
- dw $8500
+ dw vSprites + $500
dw SeelSprite + $C0
db $40 / $10 ; $40 bytes
db BANK(SeelSprite)
- dw $8540
+ dw vSprites + $540
dw MonPartySprites
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8580
+ dw vSprites + $580
dw MonPartySprites + $10
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $85A0
+ dw vSprites + $5a0
dw MonPartySprites + $20
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $85C0
+ dw vSprites + $5c0
dw MonPartySprites + $30
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $85E0
+ dw vSprites + $5E0
dw MonPartySprites + $C0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8600
+ dw vSprites + $600
dw MonPartySprites + $D0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8620
+ dw vSprites + $620
dw MonPartySprites + $E0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8640
+ dw vSprites + $640
dw MonPartySprites + $F0
db $10 / $10 ; $10 bytes
db BANK(MonPartySprites)
- dw $8660
+ dw vSprites + $660
dw MonPartySprites + $140
db $40 / $10 ; $40 bytes
db BANK(MonPartySprites)
- dw $8780
+ dw vSprites + $780
Func_71868: ; 71868 (1c:5868)
push hl
push de
push bc
ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
- ld hl, W_PARTYMON1 ; $d164
+ ld hl, wPartySpecies
ld e, a
ld d, $0
add hl, de
ld a, [hl]
call GetPartyMonSpriteID
- ld [$cd5b], a
+ ld [wcd5b], a
call Func_718c3
pop bc
pop de
@@ -314,23 +314,23 @@ Func_71868: ; 71868 (1c:5868)
Func_71882: ; 71882 (1c:5882)
xor a
ld [H_DOWNARROWBLINKCNT2], a ; $ff8c
- ld a, [$cd5d]
+ ld a, [wcd5d]
call GetPartyMonSpriteID
- ld [$cd5b], a
+ ld [wcd5b], a
jr Func_718c3
Func_71890: ; 71890 (1c:5890)
- ld a, [$cf91]
+ ld a, [wcf91]
call GetPartyMonSpriteID
push af
- ld hl, $8000
+ ld hl, vSprites
call Func_718ac
pop af
add $54
- ld hl, $8040
+ ld hl, vSprites + $40
call Func_718ac
xor a
- ld [$cd5d], a
+ ld [wcd5d], a
jr Func_71882
Func_718ac: ; 718ac (1c:58ac)
@@ -356,7 +356,7 @@ Func_718ac: ; 718ac (1c:58ac)
Func_718c3: ; 718c3 (1c:58c3)
push af
ld c, $10
- ld h, $c3
+ ld h, wOAMBuffer / $100
ld a, [H_DOWNARROWBLINKCNT2] ; $ff8c
swap a
ld l, a
@@ -371,15 +371,14 @@ Func_718c3: ; 718c3 (1c:58c3)
call Func_71281
.asm_718dd
ld hl, wOAMBuffer
- ld de, $cc5b
+ ld de, wcc5b
ld bc, $60
jp CopyData
GetPartyMonSpriteID: ; 718e9 (1c:58e9)
- 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]
ld c, a
dec a
srl a