2018-06-24 14:09:41 +00:00
|
|
|
DoAnimFrame:
|
2015-12-02 02:54:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
|
|
|
add hl, bc
|
|
|
|
ld e, [hl]
|
|
|
|
ld d, 0
|
|
|
|
ld hl, .Jumptable
|
|
|
|
add hl, de
|
2015-12-27 02:59:03 +00:00
|
|
|
add hl, de
|
2015-12-02 02:54:11 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2017-06-17 23:14:55 +00:00
|
|
|
jp hl
|
2015-12-02 02:54:11 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Jumptable:
|
2017-12-09 05:50:59 +00:00
|
|
|
; entries correspond to SPRITE_ANIM_SEQ_* constants
|
|
|
|
dw .Null
|
|
|
|
dw .PartyMon
|
|
|
|
dw .PartyMonSwitch
|
|
|
|
dw .PartyMonSelected
|
2017-12-12 06:34:46 +00:00
|
|
|
dw .GSTitleTrail
|
|
|
|
dw .NamingScreenCursor
|
2017-12-09 05:50:59 +00:00
|
|
|
dw .GameFreakLogo
|
|
|
|
dw .GSIntroStar
|
|
|
|
dw .GSIntroSparkle
|
|
|
|
dw .SlotsGolem
|
|
|
|
dw .SlotsChansey
|
|
|
|
dw .SlotsChanseyEgg
|
|
|
|
dw .MailCursor
|
2018-01-02 17:25:13 +00:00
|
|
|
dw .UnusedCursor
|
2017-12-12 06:34:46 +00:00
|
|
|
dw .DummyGameCursor
|
|
|
|
dw .PokegearArrow
|
2017-12-09 05:50:59 +00:00
|
|
|
dw .TradePokeBall
|
|
|
|
dw .TradeTubeBulge
|
|
|
|
dw .TrademonInTube
|
|
|
|
dw .RevealNewMon
|
|
|
|
dw .RadioTuningKnob
|
|
|
|
dw .CutLeaves
|
|
|
|
dw .FlyFrom
|
|
|
|
dw .FlyLeaf
|
|
|
|
dw .FlyTo
|
2020-06-16 18:11:49 +00:00
|
|
|
dw .GSIntroHoOhLugia
|
2018-01-02 17:25:13 +00:00
|
|
|
dw .EZChatCursor
|
|
|
|
dw .MobileTradeSentPulse
|
|
|
|
dw .MobileTradeOTPulse
|
2018-01-01 23:32:01 +00:00
|
|
|
dw .IntroSuicune
|
2017-12-09 05:50:59 +00:00
|
|
|
dw .IntroPichuWooper
|
|
|
|
dw .Celebi
|
|
|
|
dw .IntroUnown
|
|
|
|
dw .IntroUnownF
|
|
|
|
dw .IntroSuicuneAway
|
2015-12-02 02:54:11 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Null:
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PartyMon
|
2015-12-15 23:59:49 +00:00
|
|
|
ld a, [wMenuCursorY]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
cp [hl]
|
2017-12-09 05:50:59 +00:00
|
|
|
jr z, .PartyMonSwitch
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
2015-12-07 03:36:09 +00:00
|
|
|
ld [hl], 8 * 2
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
2020-06-17 14:39:17 +00:00
|
|
|
ld [hl], 0
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PartyMonSwitch
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
2015-12-07 03:36:09 +00:00
|
|
|
ld [hl], 8 * 3
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
ld d, a
|
|
|
|
inc [hl]
|
|
|
|
and $f
|
|
|
|
ret nz
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld e, [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, d
|
|
|
|
and $10 ; bit 4
|
2015-12-26 23:11:55 +00:00
|
|
|
jr z, .load_zero
|
2015-12-02 02:54:11 +00:00
|
|
|
ld a, e
|
|
|
|
and a
|
2015-12-07 03:36:09 +00:00
|
|
|
jr z, .load_minus_two
|
2015-12-02 02:54:11 +00:00
|
|
|
cp $1
|
2015-12-07 03:36:09 +00:00
|
|
|
jr z, .load_minus_one
|
2015-12-26 23:11:55 +00:00
|
|
|
.load_zero
|
2015-12-02 02:54:11 +00:00
|
|
|
xor a
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2015-12-07 03:36:09 +00:00
|
|
|
.load_minus_one
|
|
|
|
ld a, -1
|
2015-12-02 02:54:11 +00:00
|
|
|
ld [hl], a
|
|
|
|
ret
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2015-12-07 03:36:09 +00:00
|
|
|
.load_minus_two
|
|
|
|
ld a, -2
|
2015-12-02 02:54:11 +00:00
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PartyMonSelected
|
2015-12-15 23:59:49 +00:00
|
|
|
ld a, [wMenuCursorY]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
cp [hl]
|
2015-12-07 03:36:09 +00:00
|
|
|
jr z, .three_offset_right
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
2015-12-07 03:36:09 +00:00
|
|
|
ld [hl], 8 * 2
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2015-12-07 03:36:09 +00:00
|
|
|
.three_offset_right
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
2015-12-07 03:36:09 +00:00
|
|
|
ld [hl], 8 * 3
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.GSTitleTrail
|
2016-05-14 05:11:01 +00:00
|
|
|
call .AnonymousJumptable
|
2017-06-17 23:14:55 +00:00
|
|
|
jp hl
|
2015-12-02 02:54:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
; Anonymous dw (see .AnonymousJumptable)
|
2015-12-26 23:11:55 +00:00
|
|
|
dw .four_zero
|
2015-12-02 02:54:11 +00:00
|
|
|
dw .four_one
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.four_zero
|
2016-05-14 05:11:01 +00:00
|
|
|
call .IncrementJumptableIndex
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
and $3
|
|
|
|
ld [hl], a
|
|
|
|
inc [hl]
|
|
|
|
swap a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.four_one
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
cp $a4
|
|
|
|
jr nc, .asm_8d356
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
add $4
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
inc [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
sla a
|
|
|
|
sla a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-04 16:09:09 +00:00
|
|
|
ld d, 2
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2020-08-04 16:09:09 +00:00
|
|
|
add 3
|
2015-12-02 02:54:11 +00:00
|
|
|
ld [hl], a
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_8d356
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2020-06-16 18:11:49 +00:00
|
|
|
.GSIntroHoOhLugia
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
inc a
|
|
|
|
ld [hl], a
|
2020-08-04 16:09:09 +00:00
|
|
|
ld d, 2
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.NamingScreenCursor
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar NamingScreen_AnimateCursor
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.MailCursor
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar ComposeMail_AnimateCursor
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2020-08-27 12:52:27 +00:00
|
|
|
.GameFreakLogo
|
2020-08-22 13:49:21 +00:00
|
|
|
callfar GameFreakLogoSpriteAnim
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.GSIntroStar
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
and a
|
|
|
|
jr z, .asm_8d3ba
|
|
|
|
dec [hl]
|
2015-12-27 02:59:03 +00:00
|
|
|
dec [hl]
|
2015-12-02 02:54:11 +00:00
|
|
|
ld d, a
|
|
|
|
and $1f
|
|
|
|
jr nz, .asm_8d395
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
dec [hl]
|
|
|
|
.asm_8d395
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
push af
|
|
|
|
push de
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
pop de
|
|
|
|
pop af
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
add [hl]
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2015-12-02 02:54:11 +00:00
|
|
|
.asm_8d3ba
|
2020-06-17 14:39:17 +00:00
|
|
|
ld a, 1
|
|
|
|
ld [wIntroSceneFrameCounter], a
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.GSIntroSparkle
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
or [hl]
|
|
|
|
jr z, .asm_8d41e
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR4
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld d, [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
push af
|
|
|
|
push de
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
pop de
|
|
|
|
pop af
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld e, [hl]
|
|
|
|
inc hl
|
|
|
|
ld d, [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR3
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
add hl, de
|
|
|
|
ld e, l
|
|
|
|
ld d, h
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR3
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], e
|
|
|
|
inc hl
|
|
|
|
ld [hl], d
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
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 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], e
|
|
|
|
inc hl
|
|
|
|
ld [hl], d
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
xor $20
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2015-12-02 02:54:11 +00:00
|
|
|
.asm_8d41e
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.SlotsGolem:
|
2017-12-28 19:23:17 +00:00
|
|
|
callfar Slots_AnimateGolem
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.SlotsChansey:
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar Slots_AnimateChansey
|
2015-12-02 02:54:11 +00:00
|
|
|
ld hl, wcf64
|
|
|
|
ld a, [hl]
|
|
|
|
cp $2
|
|
|
|
ret nz
|
|
|
|
ld [hl], $3
|
2017-11-29 19:24:19 +00:00
|
|
|
ld a, SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2
|
2015-12-05 20:38:25 +00:00
|
|
|
call _ReinitSpriteAnimFrame
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.SlotsChanseyEgg:
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
dec [hl]
|
|
|
|
ld e, a
|
|
|
|
and $1
|
2015-12-11 03:26:31 +00:00
|
|
|
jr z, .move_vertical
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-12-11 03:26:31 +00:00
|
|
|
cp 15 * 8
|
|
|
|
jr c, .move_right
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ld a, $4
|
|
|
|
ld [wcf64], a
|
|
|
|
ld de, SFX_PLACE_PUZZLE_PIECE_DOWN
|
|
|
|
call PlaySFX
|
|
|
|
ret
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2015-12-11 03:26:31 +00:00
|
|
|
.move_right
|
2015-12-02 02:54:11 +00:00
|
|
|
inc [hl]
|
2015-12-11 03:26:31 +00:00
|
|
|
.move_vertical
|
2015-12-02 02:54:11 +00:00
|
|
|
ld a, e
|
2020-08-04 16:09:09 +00:00
|
|
|
ld d, 32
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.UnusedCursor
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar ret_e00ed
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.PokegearArrow
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar AnimatePokegearModeIndicatorArrow
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.DummyGameCursor
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar DummyGame_InterpretJoypad_AnimateCursor
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradePokeBall
|
2016-05-14 05:11:01 +00:00
|
|
|
call .AnonymousJumptable
|
2017-06-17 23:14:55 +00:00
|
|
|
jp hl
|
2015-12-02 02:54:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
; Anonymous dw (see .AnonymousJumptable)
|
2017-12-09 05:50:59 +00:00
|
|
|
dw .TradePokeBall_zero
|
|
|
|
dw .TradePokeBall_one
|
|
|
|
dw .TradePokeBall_two
|
|
|
|
dw .TradePokeBall_three
|
|
|
|
dw .TradePokeBall_four
|
|
|
|
dw .TradePokeBall_five
|
2015-12-02 02:54:11 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradePokeBall_zero
|
2018-01-19 05:16:08 +00:00
|
|
|
ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WOBBLE
|
2015-12-05 20:38:25 +00:00
|
|
|
call _ReinitSpriteAnimFrame
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $2
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $20
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradePokeBall_two
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
and a
|
|
|
|
jr z, .asm_8d4af
|
|
|
|
dec [hl]
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_8d4af
|
2016-05-14 05:11:01 +00:00
|
|
|
call .IncrementJumptableIndex
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $40
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradePokeBall_three
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2020-08-04 16:09:09 +00:00
|
|
|
cp 48
|
2015-12-02 02:54:11 +00:00
|
|
|
jr c, .asm_8d4cd
|
|
|
|
dec [hl]
|
2020-08-04 16:09:09 +00:00
|
|
|
ld d, 40
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_8d4cd
|
|
|
|
ld de, SFX_GOT_SAFARI_BALLS
|
|
|
|
call PlaySFX
|
2017-12-09 05:50:59 +00:00
|
|
|
jr .TradePokeBall_five
|
2015-12-02 02:54:11 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradePokeBall_one
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $4
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $30
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $24
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradePokeBall_four
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
and a
|
|
|
|
jr z, .asm_8d51c
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-04 16:09:09 +00:00
|
|
|
ld d, a
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-12-04 19:33:29 +00:00
|
|
|
call Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
inc [hl]
|
|
|
|
ld a, [hl]
|
|
|
|
and $3f
|
|
|
|
ret nz
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $20
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
sub $c
|
|
|
|
ld [hl], a
|
|
|
|
ld de, SFX_SWITCH_POKEMON
|
|
|
|
call PlaySFX
|
|
|
|
ret
|
|
|
|
|
|
|
|
.asm_8d51c
|
|
|
|
xor a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2016-05-14 05:11:01 +00:00
|
|
|
call .IncrementJumptableIndex
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradePokeBall_five
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TradeTubeBulge
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
inc [hl]
|
2015-12-27 02:59:03 +00:00
|
|
|
inc [hl]
|
2015-12-02 02:54:11 +00:00
|
|
|
cp $b0
|
2016-05-14 02:46:32 +00:00
|
|
|
jr nc, .delete
|
2015-12-02 02:54:11 +00:00
|
|
|
and $3
|
|
|
|
ret nz
|
|
|
|
ld de, SFX_POKEBALLS_PLACED_ON_TABLE
|
|
|
|
call PlaySFX
|
|
|
|
ret
|
|
|
|
|
2016-05-14 02:46:32 +00:00
|
|
|
.delete
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.TrademonInTube
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar TradeAnim_AnimateTrademonInTube
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.RevealNewMon:
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
cp $80
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nc, .finish_EggShell
|
2015-12-02 02:54:11 +00:00
|
|
|
ld d, a
|
|
|
|
add $8
|
|
|
|
ld [hl], a
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
xor $20
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
push af
|
|
|
|
push de
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
pop de
|
|
|
|
pop af
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2015-12-19 01:07:09 +00:00
|
|
|
.finish_EggShell
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.RadioTuningKnob:
|
2017-12-24 17:47:30 +00:00
|
|
|
callfar AnimateTuningKnob
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.CutLeaves
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
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 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], e
|
|
|
|
inc hl
|
|
|
|
ld [hl], d
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
inc [hl]
|
2016-05-10 16:31:49 +00:00
|
|
|
inc [hl]
|
|
|
|
inc [hl]
|
2015-12-02 02:54:11 +00:00
|
|
|
push af
|
|
|
|
push de
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
pop de
|
|
|
|
pop af
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.FlyFrom:
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
and a
|
|
|
|
ret z
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
inc [hl]
|
|
|
|
cp $40
|
|
|
|
ret c
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
dec [hl]
|
2015-12-27 02:59:03 +00:00
|
|
|
dec [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR4
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
ld d, a
|
|
|
|
cp $40
|
2015-12-19 01:07:09 +00:00
|
|
|
jr nc, .skip
|
2015-12-02 02:54:11 +00:00
|
|
|
add $8
|
|
|
|
ld [hl], a
|
2015-12-19 01:07:09 +00:00
|
|
|
.skip
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR3
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
inc [hl]
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.FlyLeaf:
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_XCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
cp -9 * 8
|
|
|
|
jr nc, .delete_leaf
|
2015-12-02 02:54:11 +00:00
|
|
|
inc [hl]
|
2015-12-27 02:59:03 +00:00
|
|
|
inc [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
dec [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2015-12-19 01:07:09 +00:00
|
|
|
ld d, $40
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
inc [hl]
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
2015-12-19 01:07:09 +00:00
|
|
|
|
|
|
|
.delete_leaf
|
2015-12-04 13:46:11 +00:00
|
|
|
call DeinitializeSprite
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.FlyTo:
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2015-12-19 01:07:09 +00:00
|
|
|
cp 10 * 8 + 4
|
2015-12-02 02:54:11 +00:00
|
|
|
ret z
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
inc [hl]
|
2015-12-27 02:59:03 +00:00
|
|
|
inc [hl]
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR4
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
ld d, a
|
|
|
|
and a
|
|
|
|
jr z, .asm_8d621
|
|
|
|
sub $2
|
|
|
|
ld [hl], a
|
|
|
|
.asm_8d621
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR3
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
inc [hl]
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.MobileTradeSentPulse
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall Function108bc7
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.MobileTradeOTPulse
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall Function108be0
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.IntroSuicune
|
2019-04-19 22:55:04 +00:00
|
|
|
ld a, [wIntroSceneTimer]
|
2015-12-02 02:54:11 +00:00
|
|
|
and a
|
|
|
|
jr nz, .asm_8d645
|
|
|
|
ret
|
|
|
|
.asm_8d645
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], $0
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR2
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2020-08-04 16:09:09 +00:00
|
|
|
add 2
|
2015-12-02 02:54:11 +00:00
|
|
|
ld [hl], a
|
|
|
|
xor $ff
|
|
|
|
inc a
|
2020-08-04 16:09:09 +00:00
|
|
|
ld d, 32
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
2017-11-29 19:24:19 +00:00
|
|
|
ld a, SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2
|
2015-12-05 20:38:25 +00:00
|
|
|
call _ReinitSpriteAnimFrame
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.IntroPichuWooper
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
2020-08-04 16:09:09 +00:00
|
|
|
cp 20
|
2015-12-02 02:54:11 +00:00
|
|
|
jr nc, .asm_8d67f
|
2020-08-04 16:09:09 +00:00
|
|
|
add 2
|
2015-12-02 02:54:11 +00:00
|
|
|
ld [hl], a
|
|
|
|
xor $ff
|
|
|
|
inc a
|
2020-08-04 16:09:09 +00:00
|
|
|
ld d, 32
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
.asm_8d67f
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.IntroUnown
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld d, [hl]
|
|
|
|
inc [hl]
|
2016-05-10 16:31:49 +00:00
|
|
|
inc [hl]
|
|
|
|
inc [hl]
|
2020-08-22 14:22:37 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_VAR1
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
push af
|
|
|
|
push de
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Sine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
pop de
|
|
|
|
pop af
|
2015-12-04 19:33:29 +00:00
|
|
|
call .Sprites_Cosine
|
2015-12-04 13:46:11 +00:00
|
|
|
|
|
|
|
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.IntroUnownF
|
2015-12-02 02:54:11 +00:00
|
|
|
ld a, [wcf64]
|
|
|
|
cp $40
|
|
|
|
ret nz
|
2017-11-29 19:24:19 +00:00
|
|
|
ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2
|
2015-12-05 20:38:25 +00:00
|
|
|
call _ReinitSpriteAnimFrame
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.IntroSuicuneAway
|
2015-12-04 13:46:11 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_YCOORD
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld a, [hl]
|
|
|
|
add $10
|
|
|
|
ld [hl], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.EZChatCursor
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall AnimateEZChatCursor
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Celebi
|
2017-12-24 17:47:30 +00:00
|
|
|
farcall UpdateCelebiPosition
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.AnonymousJumptable:
|
2020-06-17 14:39:17 +00:00
|
|
|
ld hl, sp+0
|
2015-12-02 02:54:11 +00:00
|
|
|
ld e, [hl]
|
|
|
|
inc hl
|
|
|
|
ld d, [hl]
|
|
|
|
inc de
|
2015-12-04 13:46:11 +00:00
|
|
|
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
ld l, [hl]
|
2020-06-17 14:39:17 +00:00
|
|
|
ld h, 0
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, hl
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.IncrementJumptableIndex:
|
2016-05-14 05:11:01 +00:00
|
|
|
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
2015-12-02 02:54:11 +00:00
|
|
|
add hl, bc
|
|
|
|
inc [hl]
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Sprites_Sine:
|
2015-12-04 19:33:29 +00:00
|
|
|
call Sprites_Sine
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
.Sprites_Cosine:
|
2015-12-04 19:33:29 +00:00
|
|
|
call Sprites_Cosine
|
2015-12-02 02:54:11 +00:00
|
|
|
ret
|