2016-06-12 00:24:04 +00:00
|
|
|
AnimatePartyMon_ForceSpeed1:
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-03-13 12:33:16 +00:00
|
|
|
ld [wCurrentMenuItem], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld b, a
|
|
|
|
inc a
|
|
|
|
jr GetAnimationSpeed
|
|
|
|
|
2015-08-12 09:16:56 +00:00
|
|
|
; wPartyMenuHPBarColors contains the party mon's health bar colors
|
2014-05-22 22:13:20 +00:00
|
|
|
; 0: green
|
|
|
|
; 1: yellow
|
|
|
|
; 2: red
|
2016-06-12 00:24:04 +00:00
|
|
|
AnimatePartyMon:
|
2015-08-12 09:16:56 +00:00
|
|
|
ld hl, wPartyMenuHPBarColors
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [wCurrentMenuItem]
|
|
|
|
ld c, a
|
2015-08-13 05:14:31 +00:00
|
|
|
ld b, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GetAnimationSpeed:
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, a
|
|
|
|
ld hl, PartyMonSpeeds
|
|
|
|
add hl, bc
|
2014-09-13 07:50:56 +00:00
|
|
|
ld a, [wOnSGB]
|
2014-05-22 22:13:20 +00:00
|
|
|
xor $1
|
|
|
|
add [hl]
|
|
|
|
ld c, a
|
|
|
|
add a
|
|
|
|
ld b, a
|
2015-07-13 20:35:35 +00:00
|
|
|
ld a, [wAnimCounter]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
|
|
|
jr z, .resetSprites
|
|
|
|
cp c
|
|
|
|
jr z, .animateSprite
|
|
|
|
.incTimer
|
|
|
|
inc a
|
|
|
|
cp b
|
2015-03-13 12:33:16 +00:00
|
|
|
jr nz, .skipResetTimer
|
|
|
|
xor a ; reset timer
|
|
|
|
.skipResetTimer
|
2015-07-13 20:35:35 +00:00
|
|
|
ld [wAnimCounter], a
|
2014-05-22 22:13:20 +00:00
|
|
|
jp DelayFrame
|
|
|
|
.resetSprites
|
|
|
|
push bc
|
2015-08-13 05:14:31 +00:00
|
|
|
ld hl, wMonPartySpritesSavedOAM
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, wOAMBuffer
|
|
|
|
ld bc, $60
|
|
|
|
call CopyData
|
|
|
|
pop bc
|
|
|
|
xor a
|
|
|
|
jr .incTimer
|
|
|
|
.animateSprite
|
|
|
|
push bc
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wOAMBuffer + $02 ; OAM tile id
|
2014-05-22 22:13:20 +00:00
|
|
|
ld bc, $10
|
|
|
|
ld a, [wCurrentMenuItem]
|
|
|
|
call AddNTimes
|
|
|
|
ld c, $40 ; amount to increase the tile id by
|
|
|
|
ld a, [hl]
|
|
|
|
cp $4 ; tile ID for SPRITE_BALL_M
|
|
|
|
jr z, .editCoords
|
|
|
|
cp $8 ; tile ID for SPRITE_HELIX
|
|
|
|
jr nz, .editTileIDS
|
|
|
|
; SPRITE_BALL_M and SPRITE_HELIX only shake up and down
|
|
|
|
.editCoords
|
|
|
|
dec hl
|
|
|
|
dec hl ; dec hl to the OAM y coord
|
|
|
|
ld c, $1 ; amount to increase the y coord by
|
|
|
|
; otherwise, load a second sprite frame
|
|
|
|
.editTileIDS
|
|
|
|
ld b, $4
|
|
|
|
ld de, $4
|
|
|
|
.loop
|
|
|
|
ld a, [hl]
|
|
|
|
add c
|
|
|
|
ld [hl], a
|
|
|
|
add hl, de
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
pop bc
|
|
|
|
ld a, c
|
|
|
|
jr .incTimer
|
|
|
|
|
2015-03-13 12:33:16 +00:00
|
|
|
; Party mon animations cycle between 2 frames.
|
|
|
|
; 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.
|
2016-06-12 00:24:04 +00:00
|
|
|
PartyMonSpeeds:
|
2015-08-13 05:14:31 +00:00
|
|
|
db 5, 16, 32
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
LoadMonPartySpriteGfx:
|
2015-03-13 12:33:16 +00:00
|
|
|
; Load mon party sprite tile patterns into VRAM during V-blank.
|
|
|
|
ld hl, MonPartySpritePointers
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $1c
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
LoadAnimSpriteGfx:
|
2015-03-13 12:33:16 +00:00
|
|
|
; 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.
|
2014-05-22 22:13:20 +00:00
|
|
|
ld bc, $0
|
2015-03-13 12:33:16 +00:00
|
|
|
.loop
|
2014-05-22 22:13:20 +00:00
|
|
|
push af
|
|
|
|
push bc
|
|
|
|
push hl
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld c, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call CopyVideoData
|
|
|
|
pop hl
|
|
|
|
pop bc
|
|
|
|
ld a, $6
|
|
|
|
add c
|
|
|
|
ld c, a
|
|
|
|
pop af
|
|
|
|
dec a
|
2015-03-13 12:33:16 +00:00
|
|
|
jr nz, .loop
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
LoadMonPartySpriteGfxWithLCDDisabled:
|
2015-03-13 12:33:16 +00:00
|
|
|
; Load mon party sprite tile patterns into VRAM immediately by disabling the
|
|
|
|
; LCD.
|
2014-05-22 22:13:20 +00:00
|
|
|
call DisableLCD
|
2015-03-13 12:33:16 +00:00
|
|
|
ld hl, MonPartySpritePointers
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, $1c
|
|
|
|
ld bc, $0
|
2016-06-12 04:30:05 +00:00
|
|
|
.loop
|
2014-05-22 22:13:20 +00:00
|
|
|
push af
|
|
|
|
push bc
|
|
|
|
push hl
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
push de
|
|
|
|
ld a, [hli]
|
|
|
|
ld c, a
|
|
|
|
swap c
|
|
|
|
ld b, $0
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, [hl]
|
|
|
|
inc hl
|
|
|
|
ld d, [hl]
|
|
|
|
pop hl
|
|
|
|
call FarCopyData2
|
|
|
|
pop hl
|
|
|
|
pop bc
|
|
|
|
ld a, $6
|
|
|
|
add c
|
|
|
|
ld c, a
|
|
|
|
pop af
|
|
|
|
dec a
|
2016-06-12 04:30:05 +00:00
|
|
|
jr nz, .loop
|
2014-05-22 22:13:20 +00:00
|
|
|
jp EnableLCD
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
MonPartySpritePointers:
|
2014-05-22 22:13:20 +00:00
|
|
|
dw SlowbroSprite + $c0
|
|
|
|
db $40 / $10 ; 40 bytes
|
|
|
|
db BANK(SlowbroSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw BallSprite
|
|
|
|
db $80 / $10 ; $80 bytes
|
|
|
|
db BANK(BallSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $40
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw ClefairySprite + $c0
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(ClefairySprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $c0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw BirdSprite + $c0
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(BirdSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $100
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw SeelSprite
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(SeelSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $140
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $40
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $180
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $50
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $1a0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $60
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $1c0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $70
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $1e0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $80
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $200
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $90
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $220
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $A0
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $240
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $B0
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $260
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $100
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $380
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw SlowbroSprite
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(SlowbroSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $400
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw BallSprite
|
|
|
|
db $80 / $10 ; $80 bytes
|
|
|
|
db BANK(BallSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $440
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw ClefairySprite
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(ClefairySprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $4c0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw BirdSprite
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(BirdSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $500
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw SeelSprite + $C0
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(SeelSprite)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $540
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $580
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $10
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $5a0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $20
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $5c0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $30
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $5E0
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $C0
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $600
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $D0
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $620
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $E0
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $640
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $F0
|
|
|
|
db $10 / $10 ; $10 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $660
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
dw MonPartySprites + $140
|
|
|
|
db $40 / $10 ; $40 bytes
|
|
|
|
db BANK(MonPartySprites)
|
2014-05-29 08:31:46 +00:00
|
|
|
dw vSprites + $780
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
WriteMonPartySpriteOAMByPartyIndex:
|
2015-03-13 12:33:16 +00:00
|
|
|
; Write OAM blocks for the party mon in [hPartyMonIndex].
|
2014-05-22 22:13:20 +00:00
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
push bc
|
2015-03-13 12:33:16 +00:00
|
|
|
ld a, [hPartyMonIndex]
|
2014-06-14 11:12:40 +00:00
|
|
|
ld hl, wPartySpecies
|
2014-05-22 22:13:20 +00:00
|
|
|
ld e, a
|
2015-03-13 12:33:16 +00:00
|
|
|
ld d, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
add hl, de
|
|
|
|
ld a, [hl]
|
|
|
|
call GetPartyMonSpriteID
|
2015-07-14 02:24:07 +00:00
|
|
|
ld [wOAMBaseTile], a
|
2015-03-13 12:33:16 +00:00
|
|
|
call WriteMonPartySpriteOAM
|
2014-05-22 22:13:20 +00:00
|
|
|
pop bc
|
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
WriteMonPartySpriteOAMBySpecies:
|
2015-03-14 22:25:21 +00:00
|
|
|
; Write OAM blocks for the party sprite of the species in
|
|
|
|
; [wMonPartySpriteSpecies].
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-03-13 12:33:16 +00:00
|
|
|
ld [hPartyMonIndex], a
|
2015-03-14 22:25:21 +00:00
|
|
|
ld a, [wMonPartySpriteSpecies]
|
2014-05-22 22:13:20 +00:00
|
|
|
call GetPartyMonSpriteID
|
2015-07-14 02:24:07 +00:00
|
|
|
ld [wOAMBaseTile], a
|
2015-03-13 12:33:16 +00:00
|
|
|
jr WriteMonPartySpriteOAM
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
UnusedPartyMonSpriteFunction:
|
2015-03-14 02:22:55 +00:00
|
|
|
; 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
|
2015-03-14 22:25:21 +00:00
|
|
|
; the mon party sprite associated with the species in [wcf91].
|
2015-03-14 02:22:55 +00:00
|
|
|
; However, its calculations are off and it loads garbage data.
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wcf91]
|
2014-05-22 22:13:20 +00:00
|
|
|
call GetPartyMonSpriteID
|
|
|
|
push af
|
2014-05-29 08:31:46 +00:00
|
|
|
ld hl, vSprites
|
2015-03-13 12:33:16 +00:00
|
|
|
call .LoadTilePatterns
|
2014-05-22 22:13:20 +00:00
|
|
|
pop af
|
|
|
|
add $54
|
2014-05-29 08:31:46 +00:00
|
|
|
ld hl, vSprites + $40
|
2015-03-13 12:33:16 +00:00
|
|
|
call .LoadTilePatterns
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-03-14 22:25:21 +00:00
|
|
|
ld [wMonPartySpriteSpecies], a
|
|
|
|
jr WriteMonPartySpriteOAMBySpecies
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 06:42:19 +00:00
|
|
|
.LoadTilePatterns
|
2014-05-22 22:13:20 +00:00
|
|
|
push hl
|
|
|
|
add a
|
|
|
|
ld c, a
|
2015-03-13 12:33:16 +00:00
|
|
|
ld b, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
ld hl, MonPartySpritePointers
|
|
|
|
add hl, bc
|
|
|
|
add hl, bc
|
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld c, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld b, a
|
|
|
|
pop hl
|
|
|
|
jp CopyVideoData
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
WriteMonPartySpriteOAM:
|
2015-03-13 12:33:16 +00:00
|
|
|
; Write the OAM blocks for the first animation frame into the OAM buffer and
|
2015-08-13 05:14:31 +00:00
|
|
|
; make a copy at wMonPartySpritesSavedOAM.
|
2014-05-22 22:13:20 +00:00
|
|
|
push af
|
|
|
|
ld c, $10
|
2014-05-27 18:08:52 +00:00
|
|
|
ld h, wOAMBuffer / $100
|
2015-03-13 12:33:16 +00:00
|
|
|
ld a, [hPartyMonIndex]
|
2014-05-22 22:13:20 +00:00
|
|
|
swap a
|
|
|
|
ld l, a
|
|
|
|
add $10
|
|
|
|
ld b, a
|
|
|
|
pop af
|
2015-03-13 12:33:16 +00:00
|
|
|
cp SPRITE_HELIX << 2
|
|
|
|
jr z, .helix
|
|
|
|
call WriteSymmetricMonPartySpriteOAM
|
|
|
|
jr .makeCopy
|
|
|
|
.helix
|
|
|
|
call WriteAsymmetricMonPartySpriteOAM
|
|
|
|
; Make a copy of the OAM buffer with the first animation frame written so that
|
|
|
|
; we can flip back to it from the second frame by copying it back.
|
|
|
|
.makeCopy
|
2014-05-22 22:13:20 +00:00
|
|
|
ld hl, wOAMBuffer
|
2015-08-13 05:14:31 +00:00
|
|
|
ld de, wMonPartySpritesSavedOAM
|
2014-05-22 22:13:20 +00:00
|
|
|
ld bc, $60
|
|
|
|
jp CopyData
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GetPartyMonSpriteID:
|
2014-05-26 21:04:56 +00:00
|
|
|
ld [wd11e], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef IndexToPokedex
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd11e]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, a
|
|
|
|
dec a
|
|
|
|
srl a
|
2015-02-07 10:43:08 +00:00
|
|
|
ld hl, MonPartyData
|
2014-05-22 22:13:20 +00:00
|
|
|
ld e, a
|
2015-03-13 12:33:16 +00:00
|
|
|
ld d, 0
|
2014-05-22 22:13:20 +00:00
|
|
|
add hl, de
|
|
|
|
ld a, [hl]
|
|
|
|
bit 0, c
|
2015-03-13 12:33:16 +00:00
|
|
|
jr nz, .skipSwap
|
|
|
|
swap a ; use lower nybble if pokedex num is even
|
|
|
|
.skipSwap
|
2014-05-22 22:13:20 +00:00
|
|
|
and $f0
|
|
|
|
srl a
|
|
|
|
srl a
|
|
|
|
ret
|
|
|
|
|
|
|
|
INCLUDE "data/mon_party_sprites.asm"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
MonPartySprites:
|
2014-05-22 22:13:20 +00:00
|
|
|
INCBIN "gfx/mon_ow_sprites.2bpp"
|