pokecrystal-board/engine/gfx/sprite_anims.asm

876 lines
12 KiB
NASM
Raw Normal View History

2018-06-24 07:09:41 -07:00
DoAnimFrame:
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld e, [hl]
ld d, 0
ld hl, .Jumptable
add hl, de
2015-12-26 18:59:03 -08:00
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
jp hl
2018-06-24 07:09:41 -07:00
.Jumptable:
; entries correspond to SPRITE_ANIM_SEQ_* constants
dw AnimSeq_Null
dw AnimSeq_PartyMon
dw AnimSeq_PartyMonSwitch
dw AnimSeq_PartyMonSelected
dw AnimSeq_GSTitleTrail
dw AnimSeq_NamingScreenCursor
dw AnimSeq_GameFreakLogo
dw AnimSeq_GSGameFreakLogoStar
dw AnimSeq_GSGameFreakLogoSparkle
dw AnimSeq_SlotsGolem
dw AnimSeq_SlotsChansey
dw AnimSeq_SlotsChanseyEgg
dw AnimSeq_MailCursor
dw AnimSeq_UnusedCursor
2020-11-08 16:32:57 -08:00
dw AnimSeq_MemoryGameCursor
dw AnimSeq_PokegearArrow
dw AnimSeq_TradePokeBall
dw AnimSeq_TradeTubeBulge
dw AnimSeq_TrademonInTube
dw AnimSeq_RevealNewMon
dw AnimSeq_RadioTuningKnob
dw AnimSeq_CutLeaves
dw AnimSeq_FlyFrom
dw AnimSeq_FlyLeaf
dw AnimSeq_FlyTo
dw AnimSeq_GSIntroHoOhLugia
dw AnimSeq_EZChatCursor
dw AnimSeq_MobileTradeSentPulse
dw AnimSeq_MobileTradeOTPulse
dw AnimSeq_IntroSuicune
dw AnimSeq_IntroPichuWooper
dw AnimSeq_Celebi
dw AnimSeq_IntroUnown
dw AnimSeq_IntroUnownF
dw AnimSeq_IntroSuicuneAway
AnimSeq_Null:
ret
AnimSeq_PartyMon:
2015-12-15 15:59:49 -08:00
ld a, [wMenuCursorY]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_INDEX
add hl, bc
cp [hl]
jr z, AnimSeq_PartyMonSwitch
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
2015-12-06 19:36:09 -08:00
ld [hl], 8 * 2
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], 0
ret
AnimSeq_PartyMonSwitch:
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
2015-12-06 19:36:09 -08:00
ld [hl], 8 * 3
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
ld d, a
inc [hl]
and $f
ret nz
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld e, [hl]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld a, d
and $10 ; bit 4
jr z, .load_zero
ld a, e
and a
2015-12-06 19:36:09 -08:00
jr z, .load_minus_two
cp $1
2015-12-06 19:36:09 -08:00
jr z, .load_minus_one
.load_zero
xor a
ld [hl], a
ret
2015-12-04 05:46:11 -08:00
2015-12-06 19:36:09 -08:00
.load_minus_one
ld a, -1
ld [hl], a
ret
2015-12-04 05:46:11 -08:00
2015-12-06 19:36:09 -08:00
.load_minus_two
ld a, -2
ld [hl], a
ret
AnimSeq_PartyMonSelected:
2015-12-15 15:59:49 -08:00
ld a, [wMenuCursorY]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_INDEX
add hl, bc
cp [hl]
2015-12-06 19:36:09 -08:00
jr z, .three_offset_right
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
2015-12-06 19:36:09 -08:00
ld [hl], 8 * 2
ret
2015-12-04 05:46:11 -08:00
2015-12-06 19:36:09 -08:00
.three_offset_right
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
2015-12-06 19:36:09 -08:00
ld [hl], 8 * 3
ret
AnimSeq_GSTitleTrail:
call AnimSeqs_AnonJumptable
jp hl
.anon_dw
dw .zero
dw .one
.zero
call AnimSeqs_IncAnonJumptableIndex
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_INDEX
add hl, bc
ld a, [hl]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
and $3
ld [hl], a
inc [hl]
swap a
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld [hl], a
.one
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
cp $a4
jr nc, .delete
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
add 4
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld [hl], a
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
inc [hl]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
sla a
sla a
2015-12-04 05:46:11 -08:00
2020-08-04 09:09:09 -07:00
ld d, 2
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
2020-08-04 09:09:09 -07:00
add 3
ld [hl], a
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
ret
.delete
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ret
AnimSeq_GSIntroHoOhLugia:
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
inc a
ld [hl], a
2020-08-04 09:09:09 -07:00
ld d, 2
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
ret
AnimSeq_NamingScreenCursor:
2017-12-24 09:47:30 -08:00
callfar NamingScreen_AnimateCursor
ret
AnimSeq_MailCursor:
2017-12-24 09:47:30 -08:00
callfar ComposeMail_AnimateCursor
ret
AnimSeq_GameFreakLogo:
2020-08-22 06:49:21 -07:00
callfar GameFreakLogoSpriteAnim
ret
AnimSeq_GSGameFreakLogoStar:
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
and a
jr z, .delete
dec [hl]
2015-12-26 18:59:03 -08:00
dec [hl]
ld d, a
and $1f
jr nz, .stay
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
dec [hl]
.stay
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld a, [hl]
push af
push de
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
pop de
pop af
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
2015-12-04 05:46:11 -08:00
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
add [hl]
ld [hl], a
ret
2015-12-04 05:46:11 -08:00
.delete
ld a, 1
ld [wIntroSceneFrameCounter], a
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ret
AnimSeq_GSGameFreakLogoSparkle:
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hli]
or [hl]
jr z, .delete
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR4
add hl, bc
ld d, [hl]
2015-12-04 05:46:11 -08:00
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld a, [hl]
push af
push de
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
pop de
pop af
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld e, [hl]
inc hl
ld d, [hl]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR3
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
add hl, de
ld e, l
ld d, h
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR3
add hl, bc
ld [hl], e
inc hl
ld [hl], d
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
ld de, -$10
add hl, de
ld e, l
ld d, h
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld [hl], e
inc hl
ld [hl], d
2015-12-04 05:46:11 -08:00
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld a, [hl]
xor $20
ld [hl], a
ret
2015-12-04 05:46:11 -08:00
.delete
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ret
AnimSeq_SlotsGolem:
callfar Slots_AnimateGolem
ret
AnimSeq_SlotsChansey:
2017-12-24 09:47:30 -08:00
callfar Slots_AnimateChansey
ld hl, wSlotsDelay
ld a, [hl]
cp $2
ret nz
ld [hl], $3
ld a, SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2
2015-12-05 12:38:25 -08:00
call _ReinitSpriteAnimFrame
ret
AnimSeq_SlotsChanseyEgg:
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld a, [hl]
dec [hl]
ld e, a
and $1
2015-12-10 19:26:31 -08:00
jr z, .move_vertical
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
2015-12-10 19:26:31 -08:00
cp 15 * 8
jr c, .move_right
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ld a, $4
ld [wSlotsDelay], a
ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
call PlaySFX
ret
2015-12-04 05:46:11 -08:00
2015-12-10 19:26:31 -08:00
.move_right
inc [hl]
2015-12-10 19:26:31 -08:00
.move_vertical
ld a, e
2020-08-04 09:09:09 -07:00
ld d, 32
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
ret
AnimSeq_UnusedCursor:
callfar UnusedCursor_InterpretJoypad_AnimateCursor
ret
AnimSeq_PokegearArrow:
2017-12-24 09:47:30 -08:00
callfar AnimatePokegearModeIndicatorArrow
ret
2020-11-08 16:32:57 -08:00
AnimSeq_MemoryGameCursor:
callfar MemoryGame_InterpretJoypad_AnimateCursor
ret
AnimSeq_TradePokeBall:
call AnimSeqs_AnonJumptable
jp hl
.anon_dw
dw .zero
dw .one
dw .two
dw .three
dw .four
dw .delete
.zero
2018-01-18 21:16:08 -08:00
ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WOBBLE
2015-12-05 12:38:25 -08:00
call _ReinitSpriteAnimFrame
2015-12-04 05:46:11 -08:00
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld [hl], 2 ; .two
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld [hl], $20
ret
.two
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
and a
jr z, .next
dec [hl]
ret
.next
call AnimSeqs_IncAnonJumptableIndex
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld [hl], $40
.three
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
2020-08-04 09:09:09 -07:00
cp 48
jr c, .done
dec [hl]
2020-08-04 09:09:09 -07:00
ld d, 40
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
ret
.done
ld de, SFX_GOT_SAFARI_BALLS
call PlaySFX
jr .delete
.one
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld [hl], $4
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld [hl], $30
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld [hl], $24
ret
.four
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
and a
jr z, .done2
2015-12-04 05:46:11 -08:00
2020-08-04 09:09:09 -07:00
ld d, a
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
call Sprites_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
inc [hl]
ld a, [hl]
and $3f
ret nz
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld [hl], $20
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
sub $c
ld [hl], a
ld de, SFX_SWITCH_POKEMON
call PlaySFX
ret
.done2
xor a
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
call AnimSeqs_IncAnonJumptableIndex
ret
.delete
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ret
AnimSeq_TradeTubeBulge:
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
inc [hl]
2015-12-26 18:59:03 -08:00
inc [hl]
cp $b0
jr nc, .delete
and $3
ret nz
ld de, SFX_POKEBALLS_PLACED_ON_TABLE
call PlaySFX
ret
.delete
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ret
AnimSeq_TrademonInTube:
2017-12-24 09:47:30 -08:00
callfar TradeAnim_AnimateTrademonInTube
ret
AnimSeq_RevealNewMon:
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
cp $80
2015-12-18 17:07:09 -08:00
jr nc, .finish_EggShell
ld d, a
add 8
ld [hl], a
2015-12-04 05:46:11 -08:00
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld a, [hl]
xor $20
ld [hl], a
push af
push de
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
pop de
pop af
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
ret
2015-12-18 17:07:09 -08:00
.finish_EggShell
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ret
AnimSeq_RadioTuningKnob:
2017-12-24 09:47:30 -08:00
callfar AnimateTuningKnob
ret
AnimSeq_CutLeaves:
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld e, [hl]
inc hl
ld d, [hl]
ld hl, $80
add hl, de
ld e, l
ld d, h
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld [hl], e
inc hl
ld [hl], d
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
inc [hl]
inc [hl]
inc [hl]
push af
push de
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
pop de
pop af
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
ret
AnimSeq_FlyFrom:
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
and a
ret z
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
inc [hl]
cp $40
ret c
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
dec [hl]
2015-12-26 18:59:03 -08:00
dec [hl]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR4
add hl, bc
ld a, [hl]
ld d, a
cp $40
2015-12-18 17:07:09 -08:00
jr nc, .skip
add 8
ld [hl], a
2015-12-18 17:07:09 -08:00
.skip
ld hl, SPRITEANIMSTRUCT_VAR3
add hl, bc
ld a, [hl]
inc [hl]
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
ret
AnimSeq_FlyLeaf:
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
2015-12-18 17:07:09 -08:00
cp -9 * 8
jr nc, .delete_leaf
inc [hl]
2015-12-26 18:59:03 -08:00
inc [hl]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
dec [hl]
2015-12-04 05:46:11 -08:00
2015-12-18 17:07:09 -08:00
ld d, $40
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
inc [hl]
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
ret
2015-12-18 17:07:09 -08:00
.delete_leaf
2015-12-04 05:46:11 -08:00
call DeinitializeSprite
ret
AnimSeq_FlyTo:
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
2015-12-18 17:07:09 -08:00
cp 10 * 8 + 4
ret z
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
inc [hl]
2015-12-26 18:59:03 -08:00
inc [hl]
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR4
add hl, bc
ld a, [hl]
ld d, a
and a
jr z, .stay
sub $2
ld [hl], a
.stay
ld hl, SPRITEANIMSTRUCT_VAR3
add hl, bc
ld a, [hl]
inc [hl]
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
ret
AnimSeq_MobileTradeSentPulse:
2020-10-22 09:55:46 -07:00
farcall MobileTradeAnim_AnimateSentPulse
ret
AnimSeq_MobileTradeOTPulse:
2020-10-22 09:55:46 -07:00
farcall MobileTradeAnim_AnimateOTPulse
ret
AnimSeq_IntroSuicune:
2019-04-19 15:55:04 -07:00
ld a, [wIntroSceneTimer]
and a
jr nz, .continue
ret
.continue
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], $0
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_VAR2
add hl, bc
ld a, [hl]
2020-08-04 09:09:09 -07:00
add 2
ld [hl], a
xor $ff
inc a
2020-08-04 09:09:09 -07:00
ld d, 32
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
ld a, SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2
2015-12-05 12:38:25 -08:00
call _ReinitSpriteAnimFrame
ret
AnimSeq_IntroPichuWooper:
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
2020-08-04 09:09:09 -07:00
cp 20
jr nc, .done
2020-08-04 09:09:09 -07:00
add 2
ld [hl], a
xor $ff
inc a
2020-08-04 09:09:09 -07:00
ld d, 32
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
.done
ret
AnimSeq_IntroUnown:
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld d, [hl]
inc [hl]
inc [hl]
inc [hl]
ld hl, SPRITEANIMSTRUCT_VAR1
add hl, bc
ld a, [hl]
push af
push de
call AnimSeqs_Sine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YOFFSET
add hl, bc
ld [hl], a
pop de
pop af
call AnimSeqs_Cosine
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld [hl], a
ret
AnimSeq_IntroUnownF:
ld a, [wSlotsDelay]
cp $40
ret nz
ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2
2015-12-05 12:38:25 -08:00
call _ReinitSpriteAnimFrame
ret
AnimSeq_IntroSuicuneAway:
2015-12-04 05:46:11 -08:00
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
add 16
ld [hl], a
ret
AnimSeq_EZChatCursor:
2017-12-24 09:47:30 -08:00
farcall AnimateEZChatCursor
ret
AnimSeq_Celebi:
2017-12-24 09:47:30 -08:00
farcall UpdateCelebiPosition
ret
AnimSeqs_AnonJumptable:
ld hl, sp+0
ld e, [hl]
inc hl
ld d, [hl]
inc de
2015-12-04 05:46:11 -08:00
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld l, [hl]
ld h, 0
add hl, hl
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
ret
AnimSeqs_IncAnonJumptableIndex:
2016-05-13 22:11:01 -07:00
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
inc [hl]
ret
AnimSeqs_Sine:
call Sprites_Sine
ret
AnimSeqs_Cosine:
call Sprites_Cosine
ret