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.asm56
1 files changed, 28 insertions, 28 deletions
diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm
index e3323cfc..864ac136 100755
--- a/engine/mon_party_sprites.asm
+++ b/engine/mon_party_sprites.asm
@@ -1,23 +1,23 @@
-AnimatePartyMon_ForceSpeed1: ; 716f7 (1c:56f7)
+AnimatePartyMon_ForceSpeed1:
xor a
ld [wCurrentMenuItem], a
ld b, a
inc a
jr GetAnimationSpeed
-; wcf1f contains the party mon's health bar colors
+; wPartyMenuHPBarColors contains the party mon's health bar colors
; 0: green
; 1: yellow
; 2: red
-AnimatePartyMon: ; 716ff (1c:56ff)
- ld hl, wcf1f
+AnimatePartyMon:
+ ld hl, wPartyMenuHPBarColors
ld a, [wCurrentMenuItem]
ld c, a
- ld b, $0
+ ld b, 0
add hl, bc
ld a, [hl]
-GetAnimationSpeed: ; 7170a (1c:570a)
+GetAnimationSpeed:
ld c, a
ld hl, PartyMonSpeeds
add hl, bc
@@ -27,7 +27,7 @@ GetAnimationSpeed: ; 7170a (1c:570a)
ld c, a
add a
ld b, a
- ld a, [wPartyMonAnimCounter]
+ ld a, [wAnimCounter]
and a
jr z, .resetSprites
cp c
@@ -38,11 +38,11 @@ GetAnimationSpeed: ; 7170a (1c:570a)
jr nz, .skipResetTimer
xor a ; reset timer
.skipResetTimer
- ld [wPartyMonAnimCounter], a
+ ld [wAnimCounter], a
jp DelayFrame
.resetSprites
push bc
- ld hl, wcc5b
+ ld hl, wMonPartySpritesSavedOAM
ld de, wOAMBuffer
ld bc, $60
call CopyData
@@ -85,15 +85,15 @@ GetAnimationSpeed: ; 7170a (1c:570a)
; The members of the PartyMonSpeeds array specify the number of V-blanks
; that each frame lasts for green HP, yellow HP, and red HP in order.
; On the naming screen, the yellow HP speed is always used.
-PartyMonSpeeds: ; 71769 (1c:5769)
- db $05,$10,$20
+PartyMonSpeeds:
+ db 5, 16, 32
-LoadMonPartySpriteGfx: ; 7176c (1c:576c)
+LoadMonPartySpriteGfx:
; Load mon party sprite tile patterns into VRAM during V-blank.
ld hl, MonPartySpritePointers
ld a, $1c
-LoadAnimSpriteGfx: ; 71771 (1c:5771)
+LoadAnimSpriteGfx:
; Load animated sprite tile patterns into VRAM during V-blank. hl is the address
; of an array of structures that contain arguments for CopyVideoData and a is
; the number of structures in the array.
@@ -125,14 +125,14 @@ LoadAnimSpriteGfx: ; 71771 (1c:5771)
jr nz, .loop
ret
-LoadMonPartySpriteGfxWithLCDDisabled: ; 71791 (1c:5791)
+LoadMonPartySpriteGfxWithLCDDisabled:
; Load mon party sprite tile patterns into VRAM immediately by disabling the
; LCD.
call DisableLCD
ld hl, MonPartySpritePointers
ld a, $1c
ld bc, $0
-.asm_7179c
+.loop
push af
push bc
push hl
@@ -159,10 +159,10 @@ LoadMonPartySpriteGfxWithLCDDisabled: ; 71791 (1c:5791)
ld c, a
pop af
dec a
- jr nz, .asm_7179c
+ jr nz, .loop
jp EnableLCD
-MonPartySpritePointers: ; 717c0 (1c:57c0)
+MonPartySpritePointers:
dw SlowbroSprite + $c0
db $40 / $10 ; 40 bytes
db BANK(SlowbroSprite)
@@ -303,7 +303,7 @@ MonPartySpritePointers: ; 717c0 (1c:57c0)
db BANK(MonPartySprites)
dw vSprites + $780
-WriteMonPartySpriteOAMByPartyIndex: ; 71868 (1c:5868)
+WriteMonPartySpriteOAMByPartyIndex:
; Write OAM blocks for the party mon in [hPartyMonIndex].
push hl
push de
@@ -315,24 +315,24 @@ WriteMonPartySpriteOAMByPartyIndex: ; 71868 (1c:5868)
add hl, de
ld a, [hl]
call GetPartyMonSpriteID
- ld [wcd5b], a
+ ld [wOAMBaseTile], a
call WriteMonPartySpriteOAM
pop bc
pop de
pop hl
ret
-WriteMonPartySpriteOAMBySpecies: ; 71882 (1c:5882)
+WriteMonPartySpriteOAMBySpecies:
; Write OAM blocks for the party sprite of the species in
; [wMonPartySpriteSpecies].
xor a
ld [hPartyMonIndex], a
ld a, [wMonPartySpriteSpecies]
call GetPartyMonSpriteID
- ld [wcd5b], a
+ ld [wOAMBaseTile], a
jr WriteMonPartySpriteOAM
-UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
+UnusedPartyMonSpriteFunction:
; This function is unused and doesn't appear to do anything useful. It looks
; like it may have been intended to load the tile patterns and OAM data for
; the mon party sprite associated with the species in [wcf91].
@@ -350,7 +350,7 @@ UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
ld [wMonPartySpriteSpecies], a
jr WriteMonPartySpriteOAMBySpecies
-.LoadTilePatterns ; 718ac (1c:58ac)
+.LoadTilePatterns
push hl
add a
ld c, a
@@ -370,9 +370,9 @@ UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)
pop hl
jp CopyVideoData
-WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
+WriteMonPartySpriteOAM:
; Write the OAM blocks for the first animation frame into the OAM buffer and
-; make a copy at wcc5b.
+; make a copy at wMonPartySpritesSavedOAM.
push af
ld c, $10
ld h, wOAMBuffer / $100
@@ -392,11 +392,11 @@ WriteMonPartySpriteOAM: ; 718c3 (1c:58c3)
; we can flip back to it from the second frame by copying it back.
.makeCopy
ld hl, wOAMBuffer
- ld de, wcc5b
+ ld de, wMonPartySpritesSavedOAM
ld bc, $60
jp CopyData
-GetPartyMonSpriteID: ; 718e9 (1c:58e9)
+GetPartyMonSpriteID:
ld [wd11e], a
predef IndexToPokedex
ld a, [wd11e]
@@ -419,5 +419,5 @@ GetPartyMonSpriteID: ; 718e9 (1c:58e9)
INCLUDE "data/mon_party_sprites.asm"
-MonPartySprites: ; 71959 (1c:5959)
+MonPartySprites:
INCBIN "gfx/mon_ow_sprites.2bpp"