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.asm34
1 files changed, 28 insertions, 6 deletions
diff --git a/engine/mon_party_sprites.asm b/engine/mon_party_sprites.asm
index aa9bdaeb..6f17f876 100755
--- a/engine/mon_party_sprites.asm
+++ b/engine/mon_party_sprites.asm
@@ -91,7 +91,7 @@ PartyMonSpeeds:
LoadMonPartySpriteGfx:
; Load mon party sprite tile patterns into VRAM during V-blank.
ld hl, MonPartySpritePointers
- ld a, $1c
+ ld a, $1e
LoadAnimSpriteGfx:
; Load animated sprite tile patterns into VRAM during V-blank. hl is the address
@@ -130,9 +130,9 @@ LoadMonPartySpriteGfxWithLCDDisabled:
; LCD.
call DisableLCD
ld hl, MonPartySpritePointers
- ld a, $1c
+ ld a, $1e
ld bc, $0
-.asm_7179c
+.loop
push af
push bc
push hl
@@ -151,7 +151,7 @@ LoadMonPartySpriteGfxWithLCDDisabled:
inc hl
ld d, [hl]
pop hl
- call FarCopyData2
+ call FarCopyData
pop hl
pop bc
ld a, $6
@@ -159,7 +159,7 @@ LoadMonPartySpriteGfxWithLCDDisabled:
ld c, a
pop af
dec a
- jr nz, .asm_7179c
+ jr nz, .loop
jp EnableLCD
MonPartySpritePointers:
@@ -228,6 +228,11 @@ MonPartySpritePointers:
db BANK(MonPartySprites)
dw vSprites + $260
+ dw PikachuSprite
+ db $40 / $10 ; $40 bytes
+ db BANK(PikachuSprite)
+ dw vSprites + $280
+
dw MonPartySprites + $100
db $40 / $10 ; $40 bytes
db BANK(MonPartySprites)
@@ -298,6 +303,11 @@ MonPartySpritePointers:
db BANK(MonPartySprites)
dw vSprites + $660
+ dw PikachuSprite + $C0
+ db $40 / $10 ; $40 bytes
+ db BANK(PikachuSprite)
+ dw vSprites + $680
+
dw MonPartySprites + $140
db $40 / $10 ; $40 bytes
db BANK(MonPartySprites)
@@ -309,6 +319,8 @@ WriteMonPartySpriteOAMByPartyIndex:
push de
push bc
ld a, [hPartyMonIndex]
+ cp $ff
+ jr z, .asm_7191f
ld hl, wPartySpecies
ld e, a
ld d, 0
@@ -322,6 +334,16 @@ WriteMonPartySpriteOAMByPartyIndex:
pop hl
ret
+.asm_7191f
+ ld hl, wOAMBuffer
+ ld de, wMonPartySpritesSavedOAM
+ ld bc, $60
+ call CopyData
+ pop bc
+ pop de
+ pop hl
+ ret
+
WriteMonPartySpriteOAMBySpecies:
; Write OAM blocks for the party sprite of the species in
; [wMonPartySpriteSpecies].
@@ -343,7 +365,7 @@ UnusedPartyMonSpriteFunction:
ld hl, vSprites
call .LoadTilePatterns
pop af
- add $54
+ add $5A
ld hl, vSprites + $40
call .LoadTilePatterns
xor a