2013-12-17 20:54:25 -08:00
|
|
|
; Objects used in battle animations.
|
|
|
|
|
2015-12-04 11:33:29 -08:00
|
|
|
QueueBattleAnimation: ; cc9a1 (33:49a1)
|
|
|
|
ld hl, ActiveAnimObjects
|
|
|
|
ld e, 10
|
|
|
|
.loop
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hl]
|
|
|
|
and a
|
2015-12-04 11:33:29 -08:00
|
|
|
jr z, .done
|
2015-12-23 11:00:29 -08:00
|
|
|
ld bc, BATTLEANIMSTRUCT_LENGTH
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
dec e
|
2015-12-04 11:33:29 -08:00
|
|
|
jr nz, .loop
|
2013-12-17 20:54:25 -08:00
|
|
|
scf
|
|
|
|
ret
|
2015-12-04 11:33:29 -08:00
|
|
|
|
|
|
|
.done
|
2013-12-17 20:54:25 -08:00
|
|
|
ld c, l
|
|
|
|
ld b, h
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, wNumActiveBattleAnims
|
2013-12-17 20:54:25 -08:00
|
|
|
inc [hl]
|
2015-12-23 11:00:29 -08:00
|
|
|
call InitBattleAnimation
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-23 11:00:29 -08:00
|
|
|
DeinitBattleAnimation: ; cc9bd
|
|
|
|
ld hl, BATTLEANIMSTRUCT_INDEX
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $0
|
|
|
|
ret
|
|
|
|
|
2015-12-04 11:33:29 -08:00
|
|
|
; cc9c4
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 11:00:29 -08:00
|
|
|
InitBattleAnimation: ; cc9c4 (33:49c4)
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps]
|
2013-12-17 20:54:25 -08:00
|
|
|
ld e, a
|
2014-05-05 00:30:21 -07:00
|
|
|
ld d, 0
|
2014-05-05 13:28:20 -07:00
|
|
|
ld hl, BattleAnimObjects
|
2015-07-20 19:18:18 -07:00
|
|
|
rept 6
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, de
|
2015-07-20 19:18:18 -07:00
|
|
|
endr
|
2013-12-17 20:54:25 -08:00
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_INDEX
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
2015-12-23 11:00:29 -08:00
|
|
|
ld a, [wNumActiveBattleAnims]
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 00
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [de]
|
|
|
|
inc de
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 01
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a ; 02
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a ; 03
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a ; 04
|
|
|
|
ld a, [de]
|
|
|
|
inc de
|
|
|
|
ld [hli], a ; 05
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [de]
|
2015-12-23 14:10:50 -08:00
|
|
|
call GetBattleAnimTileOffset
|
|
|
|
ld [hli], a ; 06
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 1]
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 07
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 2]
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 08
|
2013-12-17 20:54:25 -08:00
|
|
|
xor a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 09
|
|
|
|
ld [hli], a ; 0a
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 3]
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 0b
|
2013-12-17 20:54:25 -08:00
|
|
|
xor a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 0c
|
2013-12-17 20:54:25 -08:00
|
|
|
dec a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 0d
|
2013-12-17 20:54:25 -08:00
|
|
|
xor a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hli], a ; 0e
|
|
|
|
ld [hli], a ; 0f
|
|
|
|
ld [hl], a ; 10
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
BattleAnimOAMUpdate: ; cca09
|
2013-12-17 20:54:25 -08:00
|
|
|
call Functionccaaa
|
2015-12-23 14:10:50 -08:00
|
|
|
call GetBattleAnimFrame
|
2015-12-04 11:33:29 -08:00
|
|
|
cp -3
|
2015-12-23 14:10:50 -08:00
|
|
|
jp z, .exit_no_carry
|
2015-12-04 11:33:29 -08:00
|
|
|
cp -4
|
2015-12-23 14:10:50 -08:00
|
|
|
jp z, .delete_exit
|
2013-12-17 20:54:25 -08:00
|
|
|
push af
|
2015-02-08 00:03:32 -08:00
|
|
|
ld hl, BattleAnimTemps
|
|
|
|
ld a, [BattleAnimTemps + 7]
|
2013-12-17 20:54:25 -08:00
|
|
|
xor [hl]
|
|
|
|
and $e0
|
|
|
|
ld [hl], a
|
|
|
|
pop af
|
|
|
|
push bc
|
2015-12-23 14:10:50 -08:00
|
|
|
call GetBattleAnimOAMPointer
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 2]
|
2013-12-17 20:54:25 -08:00
|
|
|
add [hl]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 2], a
|
2013-12-17 20:54:25 -08:00
|
|
|
inc hl
|
|
|
|
ld a, [hli]
|
|
|
|
ld c, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2015-02-10 15:14:21 -08:00
|
|
|
ld a, [w5_d418]
|
2013-12-17 20:54:25 -08:00
|
|
|
ld e, a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld d, Sprites / $100
|
|
|
|
.loop
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 4]
|
2013-12-17 20:54:25 -08:00
|
|
|
ld b, a
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 6]
|
2013-12-17 20:54:25 -08:00
|
|
|
add b
|
|
|
|
ld b, a
|
|
|
|
push hl
|
|
|
|
ld a, [hl]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld hl, BattleAnimTemps
|
2013-12-17 20:54:25 -08:00
|
|
|
bit 6, [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
jr z, .no_yflip
|
2013-12-17 20:54:25 -08:00
|
|
|
add $8
|
|
|
|
xor $ff
|
|
|
|
inc a
|
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.no_yflip
|
2013-12-17 20:54:25 -08:00
|
|
|
pop hl
|
|
|
|
add b
|
|
|
|
ld [de], a
|
|
|
|
inc hl
|
|
|
|
inc de
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 3]
|
2013-12-17 20:54:25 -08:00
|
|
|
ld b, a
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 5]
|
2013-12-17 20:54:25 -08:00
|
|
|
add b
|
|
|
|
ld b, a
|
|
|
|
push hl
|
|
|
|
ld a, [hl]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld hl, BattleAnimTemps
|
2013-12-17 20:54:25 -08:00
|
|
|
bit 5, [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
jr z, .no_xflip
|
2013-12-17 20:54:25 -08:00
|
|
|
add $8
|
|
|
|
xor $ff
|
|
|
|
inc a
|
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.no_xflip
|
2013-12-17 20:54:25 -08:00
|
|
|
pop hl
|
|
|
|
add b
|
|
|
|
ld [de], a
|
|
|
|
inc hl
|
|
|
|
inc de
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 2]
|
2013-12-17 20:54:25 -08:00
|
|
|
add $31
|
|
|
|
add [hl]
|
|
|
|
ld [de], a
|
|
|
|
inc hl
|
|
|
|
inc de
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps]
|
2013-12-17 20:54:25 -08:00
|
|
|
ld b, a
|
|
|
|
ld a, [hl]
|
|
|
|
xor b
|
|
|
|
and $e0
|
|
|
|
ld b, a
|
|
|
|
ld a, [hl]
|
|
|
|
and $10
|
|
|
|
or b
|
|
|
|
ld b, a
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 8]
|
2013-12-17 20:54:25 -08:00
|
|
|
and $f
|
|
|
|
or b
|
|
|
|
ld [de], a
|
|
|
|
inc hl
|
|
|
|
inc de
|
|
|
|
ld a, e
|
2015-02-10 15:14:21 -08:00
|
|
|
ld [w5_d418], a
|
2013-12-17 20:54:25 -08:00
|
|
|
cp $a0
|
2015-12-23 14:10:50 -08:00
|
|
|
jr nc, .exit_set_carry
|
2013-12-17 20:54:25 -08:00
|
|
|
dec c
|
2015-12-23 14:10:50 -08:00
|
|
|
jr nz, .loop
|
2013-12-17 20:54:25 -08:00
|
|
|
pop bc
|
2015-12-23 14:10:50 -08:00
|
|
|
jr .exit_no_carry
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.delete_exit
|
2015-12-23 11:00:29 -08:00
|
|
|
call DeinitBattleAnimation
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.exit_no_carry
|
2013-12-17 20:54:25 -08:00
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.exit_set_carry
|
2013-12-17 20:54:25 -08:00
|
|
|
pop bc
|
|
|
|
scf
|
|
|
|
ret
|
2015-12-04 11:33:29 -08:00
|
|
|
|
2013-12-17 20:54:25 -08:00
|
|
|
; ccaaa
|
|
|
|
|
|
|
|
Functionccaaa: ; ccaaa
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_01
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
and $80
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps], a
|
2013-12-17 20:54:25 -08:00
|
|
|
xor a
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 7], a
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_05
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 8], a
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_02
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 1], a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_TILEID
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 2], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 3], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 4], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 5], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 6], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hBattleTurn]
|
|
|
|
and a
|
|
|
|
ret z
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_01
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps], a
|
2013-12-17 20:54:25 -08:00
|
|
|
bit 0, [hl]
|
|
|
|
ret z
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_07
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, $b4
|
|
|
|
sub d
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 3], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
2015-02-08 00:03:32 -08:00
|
|
|
ld a, [BattleAnimTemps + 1]
|
2013-12-17 20:54:25 -08:00
|
|
|
cp $ff
|
2015-12-23 14:10:50 -08:00
|
|
|
jr nz, .check_kinesis_softboiled_milkdrink
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, $28
|
|
|
|
add d
|
2015-12-23 14:10:50 -08:00
|
|
|
jr .done
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.check_kinesis_softboiled_milkdrink
|
2013-12-17 20:54:25 -08:00
|
|
|
sub d
|
|
|
|
push af
|
|
|
|
ld a, [FXAnimIDHi]
|
|
|
|
or a
|
2015-12-23 14:10:50 -08:00
|
|
|
jr nz, .no_sub
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [FXAnimIDLo]
|
2015-12-23 14:10:50 -08:00
|
|
|
cp KINESIS
|
|
|
|
jr z, .kinesis
|
|
|
|
cp SOFTBOILED
|
|
|
|
jr z, .softboiled
|
|
|
|
cp MILK_DRINK
|
|
|
|
jr nz, .no_sub
|
|
|
|
.kinesis
|
|
|
|
.softboiled
|
|
|
|
.milk_drink
|
2013-12-17 20:54:25 -08:00
|
|
|
pop af
|
|
|
|
sub $8
|
2015-12-23 14:10:50 -08:00
|
|
|
jr .done
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.no_sub
|
2013-12-17 20:54:25 -08:00
|
|
|
pop af
|
2015-12-23 14:10:50 -08:00
|
|
|
.done
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 4], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
|
|
|
xor $ff
|
|
|
|
inc a
|
2015-02-08 00:03:32 -08:00
|
|
|
ld [BattleAnimTemps + 5], a
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-04 11:33:29 -08:00
|
|
|
; ccb31
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
GetBattleAnimTileOffset: ; ccb31 (33:4b31)
|
2013-12-17 20:54:25 -08:00
|
|
|
push hl
|
|
|
|
push bc
|
2015-12-23 11:00:29 -08:00
|
|
|
ld hl, wBattleAnimTileDict
|
2013-12-17 20:54:25 -08:00
|
|
|
ld b, a
|
2015-12-23 11:00:29 -08:00
|
|
|
ld c, 10 / 2
|
|
|
|
.loop
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
|
|
|
cp b
|
2015-12-23 11:00:29 -08:00
|
|
|
jr z, .load
|
2013-12-17 20:54:25 -08:00
|
|
|
inc hl
|
|
|
|
dec c
|
2015-12-23 11:00:29 -08:00
|
|
|
jr nz, .loop
|
2013-12-17 20:54:25 -08:00
|
|
|
xor a
|
2015-12-23 11:00:29 -08:00
|
|
|
jr .done
|
2015-12-04 11:33:29 -08:00
|
|
|
|
2015-12-23 11:00:29 -08:00
|
|
|
.load
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hl]
|
2015-12-23 11:00:29 -08:00
|
|
|
.done
|
2013-12-17 20:54:25 -08:00
|
|
|
pop bc
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2015-12-04 11:33:29 -08:00
|
|
|
_ExecuteBGEffects: ; ccb48
|
|
|
|
callab ExecuteBGEffects
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-04 11:33:29 -08:00
|
|
|
; ccb4f
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-04 11:33:29 -08:00
|
|
|
_QueueBGEffect: ; ccb4f (33:4b4f)
|
|
|
|
callab QueueBGEffect
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
2015-12-04 11:33:29 -08:00
|
|
|
|
2013-12-17 20:54:25 -08:00
|
|
|
; ccb56 (33:4b56)
|
|
|
|
|
2014-05-05 13:28:20 -07:00
|
|
|
BattleAnimObjects: ; ccb56
|
2015-12-23 14:10:50 -08:00
|
|
|
battleanimobj: MACRO
|
|
|
|
db \1, \2, \3, \4, \5, \6
|
|
|
|
endm
|
|
|
|
|
|
|
|
battleanimobj $01, $ff, $00, $00, $02, $01 ; 00
|
|
|
|
battleanimobj $01, $ff, $01, $00, $02, $01 ; 01
|
|
|
|
battleanimobj $01, $ff, $02, $00, $02, $01 ; 02
|
|
|
|
battleanimobj $01, $90, $00, $00, $02, $01 ; 03
|
|
|
|
battleanimobj $01, $90, $01, $00, $02, $01 ; 04
|
|
|
|
battleanimobj $01, $90, $02, $00, $02, $01 ; 05
|
|
|
|
battleanimobj $01, $ff, $03, $00, $02, $01 ; 06
|
|
|
|
battleanimobj $01, $ff, $04, $1b, $02, $01 ; 07
|
|
|
|
battleanimobj $01, $ff, $05, $00, $02, $01 ; 08
|
|
|
|
battleanimobj $01, $ff, $06, $00, $02, $01 ; 09
|
|
|
|
battleanimobj $01, $90, $07, $09, $02, $01 ; 0a
|
|
|
|
battleanimobj $01, $aa, $10, $10, $04, $03 ; 0b
|
|
|
|
battleanimobj $01, $90, $0e, $04, $04, $03 ; 0c
|
|
|
|
battleanimobj $01, $90, $0f, $03, $04, $03 ; 0d
|
|
|
|
battleanimobj $01, $90, $10, $08, $04, $03 ; 0e
|
|
|
|
battleanimobj $01, $90, $0f, $0a, $04, $03 ; 0f
|
|
|
|
battleanimobj $01, $90, $11, $03, $04, $03 ; 10
|
|
|
|
battleanimobj $01, $90, $12, $08, $06, $0a ; 11
|
|
|
|
battleanimobj $01, $90, $13, $00, $06, $0a ; 12
|
|
|
|
battleanimobj $01, $90, $14, $01, $06, $0a ; 13
|
|
|
|
battleanimobj $21, $78, $16, $0b, $05, $06 ; 14
|
|
|
|
battleanimobj $00, $00, $09, $12, $04, $0b ; 15
|
|
|
|
battleanimobj $00, $00, $09, $13, $04, $0b ; 16
|
|
|
|
battleanimobj $01, $90, $18, $00, $04, $08 ; 17
|
|
|
|
battleanimobj $01, $ff, $18, $00, $04, $08 ; 18
|
|
|
|
battleanimobj $01, $90, $1d, $06, $02, $0c ; 19
|
|
|
|
battleanimobj $01, $b4, $1f, $38, $02, $0c ; 1a
|
|
|
|
battleanimobj $01, $90, $08, $00, $02, $07 ; 1b
|
|
|
|
battleanimobj $01, $a0, $08, $00, $02, $07 ; 1c
|
|
|
|
battleanimobj $01, $ff, $19, $07, $07, $09 ; 1d
|
|
|
|
battleanimobj $01, $ff, $1a, $07, $07, $09 ; 1e
|
|
|
|
battleanimobj $01, $b0, $1b, $36, $07, $09 ; 1f
|
|
|
|
battleanimobj $01, $b0, $84, $36, $06, $21 ; 20
|
|
|
|
battleanimobj $01, $90, $21, $0c, $06, $0d ; 21
|
|
|
|
battleanimobj $00, $00, $23, $0d, $06, $0d ; 22
|
|
|
|
battleanimobj $01, $90, $24, $0e, $02, $0e ; 23
|
|
|
|
battleanimobj $61, $80, $27, $0f, $06, $04 ; 24
|
|
|
|
battleanimobj $01, $b4, $2a, $00, $06, $04 ; 25
|
|
|
|
battleanimobj $01, $40, $2b, $11, $05, $0f ; 26
|
|
|
|
battleanimobj $61, $98, $2c, $00, $03, $10 ; 27
|
|
|
|
battleanimobj $61, $98, $2d, $09, $03, $10 ; 28
|
|
|
|
battleanimobj $01, $b8, $2e, $00, $06, $0a ; 29
|
|
|
|
battleanimobj $01, $b8, $2f, $00, $06, $0a ; 2a
|
|
|
|
battleanimobj $01, $b8, $30, $14, $07, $11 ; 2b
|
|
|
|
battleanimobj $01, $90, $21, $14, $03, $0d ; 2c
|
|
|
|
battleanimobj $21, $b0, $31, $00, $03, $05 ; 2d
|
|
|
|
battleanimobj $21, $b0, $32, $00, $03, $05 ; 2e
|
|
|
|
battleanimobj $21, $b0, $33, $00, $03, $05 ; 2f
|
|
|
|
battleanimobj $21, $90, $34, $15, $03, $05 ; 30
|
|
|
|
battleanimobj $21, $90, $36, $00, $03, $05 ; 31
|
|
|
|
battleanimobj $21, $90, $37, $03, $02, $08 ; 32
|
|
|
|
battleanimobj $21, $90, $38, $00, $03, $05 ; 33
|
|
|
|
battleanimobj $21, $90, $39, $03, $02, $08 ; 34
|
|
|
|
battleanimobj $21, $90, $3a, $16, $02, $02 ; 35
|
|
|
|
battleanimobj $01, $90, $3c, $17, $02, $02 ; 36
|
|
|
|
battleanimobj $21, $ff, $3e, $00, $02, $02 ; 37
|
|
|
|
battleanimobj $21, $ff, $3f, $00, $02, $02 ; 38
|
|
|
|
battleanimobj $21, $ff, $40, $00, $02, $02 ; 39
|
|
|
|
battleanimobj $21, $ff, $41, $00, $02, $02 ; 3a
|
|
|
|
battleanimobj $21, $ff, $42, $00, $02, $02 ; 3b
|
|
|
|
battleanimobj $01, $88, $43, $18, $05, $12 ; 3c
|
|
|
|
battleanimobj $01, $88, $44, $00, $05, $12 ; 3d
|
|
|
|
battleanimobj $21, $b8, $45, $19, $02, $13 ; 3e
|
|
|
|
battleanimobj $21, $ff, $46, $00, $02, $14 ; 3f
|
|
|
|
battleanimobj $21, $ff, $47, $00, $02, $14 ; 40
|
|
|
|
battleanimobj $21, $ff, $48, $1a, $02, $14 ; 41
|
|
|
|
battleanimobj $21, $ff, $49, $1a, $02, $14 ; 42
|
|
|
|
battleanimobj $21, $98, $4a, $01, $02, $14 ; 43
|
|
|
|
battleanimobj $21, $80, $4b, $00, $03, $11 ; 44
|
|
|
|
battleanimobj $01, $88, $4c, $1c, $05, $12 ; 45
|
|
|
|
battleanimobj $21, $b0, $4d, $1d, $02, $15 ; 46
|
|
|
|
battleanimobj $01, $b0, $51, $1e, $03, $11 ; 47
|
|
|
|
battleanimobj $21, $ff, $52, $1f, $05, $16 ; 48
|
|
|
|
battleanimobj $21, $ff, $54, $1f, $05, $16 ; 49
|
|
|
|
battleanimobj $21, $68, $56, $20, $05, $06 ; 4a
|
|
|
|
battleanimobj $21, $90, $59, $21, $02, $0e ; 4b
|
|
|
|
battleanimobj $21, $90, $5c, $02, $02, $17 ; 4c
|
|
|
|
battleanimobj $01, $90, $5d, $22, $03, $11 ; 4d
|
|
|
|
battleanimobj $61, $88, $5f, $00, $03, $10 ; 4e
|
|
|
|
battleanimobj $61, $88, $2d, $09, $03, $10 ; 4f
|
|
|
|
battleanimobj $21, $88, $60, $00, $03, $18 ; 50
|
|
|
|
battleanimobj $21, $80, $60, $00, $02, $18 ; 51
|
|
|
|
battleanimobj $21, $50, $61, $23, $03, $19 ; 52
|
|
|
|
battleanimobj $01, $80, $63, $24, $02, $19 ; 53
|
|
|
|
battleanimobj $01, $80, $66, $25, $02, $19 ; 54
|
|
|
|
battleanimobj $01, $50, $1c, $00, $02, $0c ; 55
|
|
|
|
battleanimobj $21, $a8, $67, $26, $07, $1a ; 56
|
|
|
|
battleanimobj $21, $a8, $68, $00, $07, $1a ; 57
|
|
|
|
battleanimobj $21, $90, $69, $01, $02, $1a ; 58
|
|
|
|
battleanimobj $21, $90, $6d, $28, $03, $19 ; 59
|
|
|
|
battleanimobj $21, $90, $6a, $27, $02, $1b ; 5a
|
|
|
|
battleanimobj $00, $00, $6f, $29, $02, $1c ; 5b
|
|
|
|
battleanimobj $21, $48, $70, $29, $02, $1c ; 5c
|
|
|
|
battleanimobj $21, $48, $6f, $29, $02, $1c ; 5d
|
|
|
|
battleanimobj $21, $78, $6f, $2a, $02, $1c ; 5e
|
|
|
|
battleanimobj $61, $90, $71, $2b, $02, $1d ; 5f
|
|
|
|
battleanimobj $61, $90, $72, $2c, $02, $1d ; 60
|
|
|
|
battleanimobj $01, $48, $73, $2d, $04, $1e ; 61
|
|
|
|
battleanimobj $01, $90, $74, $06, $02, $15 ; 62
|
|
|
|
battleanimobj $01, $ff, $75, $2e, $07, $19 ; 63
|
|
|
|
battleanimobj $21, $90, $4a, $02, $02, $14 ; 64
|
|
|
|
battleanimobj $01, $80, $30, $2f, $02, $11 ; 65
|
|
|
|
battleanimobj $01, $78, $76, $2a, $04, $23 ; 66
|
|
|
|
battleanimobj $01, $80, $77, $30, $02, $1f ; 67
|
|
|
|
battleanimobj $01, $90, $77, $02, $02, $1f ; 68
|
|
|
|
battleanimobj $01, $ff, $77, $00, $02, $1f ; 69
|
|
|
|
battleanimobj $01, $80, $78, $08, $03, $23 ; 6a
|
|
|
|
battleanimobj $21, $90, $79, $00, $02, $1f ; 6b
|
|
|
|
battleanimobj $01, $ff, $7a, $31, $03, $11 ; 6c
|
|
|
|
battleanimobj $01, $88, $7a, $31, $03, $11 ; 6d
|
|
|
|
battleanimobj $21, $88, $7b, $32, $02, $20 ; 6e
|
|
|
|
battleanimobj $21, $98, $7c, $00, $02, $04 ; 6f
|
|
|
|
battleanimobj $21, $80, $7d, $00, $02, $18 ; 70
|
|
|
|
battleanimobj $01, $80, $21, $2f, $06, $0d ; 71
|
|
|
|
battleanimobj $01, $b0, $7e, $33, $03, $12 ; 72
|
|
|
|
battleanimobj $01, $80, $7f, $2f, $02, $08 ; 73
|
|
|
|
battleanimobj $21, $a0, $6f, $34, $02, $1c ; 74
|
|
|
|
battleanimobj $21, $a0, $74, $35, $02, $15 ; 75
|
|
|
|
battleanimobj $21, $b0, $80, $33, $02, $14 ; 76
|
|
|
|
battleanimobj $01, $88, $81, $37, $02, $11 ; 77
|
|
|
|
battleanimobj $01, $88, $85, $00, $02, $22 ; 78
|
|
|
|
battleanimobj $01, $88, $86, $00, $02, $22 ; 79
|
|
|
|
battleanimobj $01, $90, $87, $39, $02, $1f ; 7a
|
|
|
|
battleanimobj $01, $80, $30, $3a, $03, $11 ; 7b
|
|
|
|
battleanimobj $21, $90, $34, $00, $03, $05 ; 7c
|
|
|
|
battleanimobj $a1, $88, $88, $3b, $06, $13 ; 7d
|
|
|
|
battleanimobj $01, $80, $76, $25, $04, $23 ; 7e
|
|
|
|
battleanimobj $01, $98, $10, $34, $04, $03 ; 7f
|
|
|
|
battleanimobj $01, $a8, $0f, $3c, $04, $03 ; 80
|
|
|
|
battleanimobj $21, $68, $89, $29, $02, $1f ; 81
|
|
|
|
battleanimobj $21, $b0, $8a, $00, $02, $1f ; 82
|
|
|
|
battleanimobj $21, $80, $8c, $00, $02, $1f ; 83
|
|
|
|
battleanimobj $21, $50, $8d, $00, $03, $1f ; 84
|
|
|
|
battleanimobj $01, $40, $24, $40, $02, $0e ; 85
|
|
|
|
battleanimobj $21, $a8, $8e, $41, $04, $1f ; 86
|
|
|
|
battleanimobj $21, $88, $8f, $3e, $02, $1f ; 87
|
|
|
|
battleanimobj $21, $88, $93, $3e, $02, $1f ; 88
|
|
|
|
battleanimobj $21, $90, $97, $3d, $02, $1f ; 89
|
|
|
|
battleanimobj $21, $90, $78, $3d, $03, $23 ; 8a
|
|
|
|
battleanimobj $01, $ff, $99, $2e, $02, $19 ; 8b
|
|
|
|
battleanimobj $21, $a0, $74, $02, $02, $15 ; 8c
|
|
|
|
battleanimobj $21, $a0, $99, $35, $04, $19 ; 8d
|
|
|
|
battleanimobj $21, $70, $8b, $3f, $02, $1f ; 8e
|
|
|
|
battleanimobj $01, $90, $15, $08, $02, $0a ; 8f
|
|
|
|
battleanimobj $01, $90, $11, $02, $04, $03 ; 90
|
|
|
|
battleanimobj $01, $80, $7f, $42, $02, $08 ; 91
|
|
|
|
battleanimobj $01, $90, $9a, $00, $02, $1b ; 92
|
|
|
|
battleanimobj $21, $a0, $9b, $35, $04, $23 ; 93
|
|
|
|
battleanimobj $21, $80, $9c, $23, $02, $25 ; 94
|
|
|
|
battleanimobj $21, $80, $9d, $25, $02, $25 ; 95
|
|
|
|
battleanimobj $21, $80, $9c, $00, $02, $25 ; 96
|
|
|
|
battleanimobj $21, $80, $9e, $00, $06, $25 ; 97
|
|
|
|
battleanimobj $61, $80, $9f, $3a, $05, $23 ; 98
|
|
|
|
battleanimobj $21, $80, $a0, $16, $02, $23 ; 99
|
|
|
|
battleanimobj $21, $70, $78, $43, $03, $23 ; 9a
|
|
|
|
battleanimobj $21, $c0, $a2, $01, $02, $25 ; 9b
|
|
|
|
battleanimobj $21, $40, $a3, $44, $03, $24 ; 9c
|
|
|
|
battleanimobj $01, $80, $a4, $00, $02, $24 ; 9d
|
|
|
|
battleanimobj $01, $80, $a5, $00, $03, $24 ; 9e
|
|
|
|
battleanimobj $01, $88, $43, $45, $04, $12 ; 9f
|
|
|
|
battleanimobj $21, $ff, $a6, $00, $02, $02 ; a0
|
|
|
|
battleanimobj $21, $ff, $a7, $00, $02, $02 ; a1
|
|
|
|
battleanimobj $21, $00, $b4, $4a, $07, $0f ; a2
|
|
|
|
battleanimobj $21, $90, $a8, $02, $03, $05 ; a3
|
|
|
|
battleanimobj $21, $40, $9c, $11, $02, $25 ; a4
|
|
|
|
battleanimobj $61, $90, $a9, $46, $02, $23 ; a5
|
|
|
|
battleanimobj $00, $00, $24, $47, $02, $0e ; a6
|
|
|
|
battleanimobj $01, $80, $aa, $00, $02, $24 ; a7
|
|
|
|
battleanimobj $21, $b8, $ab, $48, $02, $13 ; a8
|
|
|
|
battleanimobj $21, $90, $ac, $44, $02, $13 ; a9
|
|
|
|
battleanimobj $01, $a8, $05, $00, $02, $01 ; aa
|
|
|
|
battleanimobj $01, $90, $24, $43, $02, $0e ; ab
|
|
|
|
battleanimobj $01, $88, $ad, $00, $06, $17 ; ac
|
|
|
|
battleanimobj $01, $a8, $ae, $49, $02, $01 ; ad
|
|
|
|
battleanimobj $21, $90, $af, $01, $03, $11 ; ae
|
|
|
|
battleanimobj $21, $00, $b0, $4a, $02, $04 ; af
|
|
|
|
battleanimobj $00, $00, $70, $4b, $04, $1c ; b0
|
|
|
|
battleanimobj $01, $88, $b1, $4c, $02, $19 ; b1
|
|
|
|
battleanimobj $01, $b8, $19, $4d, $07, $09 ; b2
|
|
|
|
battleanimobj $61, $98, $b3, $00, $03, $27 ; b3
|
|
|
|
battleanimobj $61, $98, $74, $04, $06, $15 ; b4
|
|
|
|
battleanimobj $21, $ff, $19, $4e, $07, $09 ; b5
|
|
|
|
battleanimobj $01, $90, $73, $08, $04, $1e ; b6
|
|
|
|
battleanimobj $01, $ff, $89, $4f, $04, $1f ; b7
|
|
|
|
battleanimobj $00, $00, $b5, $00, $00, $28 ; b8
|
|
|
|
battleanimobj $00, $00, $b6, $00, $01, $29 ; b9
|
|
|
|
battleanimobj $00, $00, $b7, $00, $00, $28 ; ba
|
|
|
|
battleanimobj $00, $00, $b8, $00, $01, $29 ; bb
|
2014-05-05 13:28:20 -07:00
|
|
|
; ccfbe
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
INCLUDE "battle/objects/functions.asm"
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
ReinitBattleAnimFrameset: ; ce7bf (33:67bf)
|
|
|
|
ld hl, BATTLEANIMSTRUCT_FRAMESET_ID
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_DURATION
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hl], 0
|
|
|
|
ld hl, BATTLEANIMSTRUCT_FRAME
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
2015-12-23 14:10:50 -08:00
|
|
|
ld [hl], -1
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
GetBattleAnimFrame: ; ce7d1
|
|
|
|
.loop
|
|
|
|
ld hl, BATTLEANIMSTRUCT_DURATION
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
and a
|
|
|
|
jr z, .next_frame
|
2013-12-17 20:54:25 -08:00
|
|
|
dec [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
call .GetPointer
|
|
|
|
ld a, [hli]
|
2013-12-17 20:54:25 -08:00
|
|
|
push af
|
2015-12-23 14:10:50 -08:00
|
|
|
jr .okay
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.next_frame
|
|
|
|
ld hl, BATTLEANIMSTRUCT_FRAME
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
inc [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
call .GetPointer
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hli]
|
2015-12-23 14:10:50 -08:00
|
|
|
cp -2
|
|
|
|
jr z, .restart
|
|
|
|
cp -1
|
|
|
|
jr z, .repeat_last
|
|
|
|
push af
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
push hl
|
|
|
|
and $3f
|
|
|
|
ld hl, BATTLEANIMSTRUCT_DURATION
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-23 14:10:50 -08:00
|
|
|
pop hl
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.okay
|
2013-12-17 20:54:25 -08:00
|
|
|
ld a, [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
and $c0
|
|
|
|
srl a
|
|
|
|
ld [BattleAnimTemps + 7], a
|
|
|
|
pop af
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
2015-12-04 11:33:29 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.repeat_last
|
|
|
|
xor a
|
|
|
|
ld hl, BATTLEANIMSTRUCT_DURATION
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-23 14:10:50 -08:00
|
|
|
ld hl, BATTLEANIMSTRUCT_FRAME
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
dec [hl]
|
2015-12-23 14:10:50 -08:00
|
|
|
dec [hl]
|
|
|
|
jr .loop
|
2015-12-04 11:33:29 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
.restart
|
|
|
|
xor a
|
|
|
|
ld hl, BATTLEANIMSTRUCT_DURATION
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-23 14:10:50 -08:00
|
|
|
dec a
|
|
|
|
ld hl, BATTLEANIMSTRUCT_FRAME
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-23 14:10:50 -08:00
|
|
|
jr .loop
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
; ce823
|
|
|
|
|
|
|
|
.GetPointer: ; ce823
|
|
|
|
ld hl, BATTLEANIMSTRUCT_FRAMESET_ID
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
2015-12-23 14:10:50 -08:00
|
|
|
ld e, [hl]
|
|
|
|
ld d, 0
|
|
|
|
ld hl, BattleAnimFrameData
|
|
|
|
add hl, de
|
|
|
|
add hl, de
|
|
|
|
ld e, [hl]
|
|
|
|
inc hl
|
|
|
|
ld d, [hl]
|
|
|
|
ld hl, BATTLEANIMSTRUCT_FRAME
|
2013-12-17 20:54:25 -08:00
|
|
|
add hl, bc
|
2015-12-23 14:10:50 -08:00
|
|
|
ld l, [hl]
|
|
|
|
ld h, $0
|
|
|
|
add hl, hl
|
|
|
|
add hl, de
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
; ce83c
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
GetBattleAnimOAMPointer: ; ce83c
|
|
|
|
ld l, a
|
|
|
|
ld h, 0
|
|
|
|
ld de, BattleAnimOAMData
|
|
|
|
add hl, hl
|
|
|
|
add hl, hl
|
|
|
|
add hl, de
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
; ce846
|
2013-12-17 20:54:25 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
Functionce846: ; ce846 (33:6846)
|
|
|
|
push hl
|
|
|
|
ld l, a
|
|
|
|
ld h, 0
|
|
|
|
add hl, hl
|
|
|
|
add hl, hl
|
|
|
|
ld de, AnimObjGFX
|
|
|
|
add hl, de
|
|
|
|
ld c, [hl]
|
|
|
|
inc hl
|
|
|
|
ld b, [hl]
|
2013-12-17 20:54:25 -08:00
|
|
|
inc hl
|
|
|
|
ld a, [hli]
|
2015-12-23 14:10:50 -08:00
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
pop de
|
|
|
|
push bc
|
|
|
|
call DecompressRequest2bpp
|
|
|
|
pop bc
|
2013-12-17 20:54:25 -08:00
|
|
|
ret
|
|
|
|
|
2015-12-04 11:33:29 -08:00
|
|
|
; ce85e (33:685e)
|
2013-12-18 00:18:16 -08:00
|
|
|
|
2015-12-23 14:10:50 -08:00
|
|
|
INCLUDE "battle/objects/framesets.asm"
|
|
|
|
INCLUDE "battle/objects/oam.asm"
|
|
|
|
INCLUDE "battle/objects/gfx_headers.asm"
|