mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Fix some constants surrounding sprite animations
Also commented the use of the field surrounding the struct initialization functions. SPRITEANIMSTRUCT_0C -> SPRITEANIMSTRUCT_VAR1 SPRITEANIMSTRUCT_0D -> SPRITEANIMSTRUCT_VAR2 SPRITEANIMSTRUCT_0E -> SPRITEANIMSTRUCT_VAR3 SPRITEANIMSTRUCT_0F -> SPRITEANIMSTRUCT_VAR4 BATTLEANIMSTRUCT_01 -> BATTLEANIMSTRUCT_OAMFLAGS BATTLEANIMSTRUCT_ANON_JT_INDEX -> BATTLEANIMSTRUCT_JUMPTABLE_INDEX BATTLEANIMSTRUCT_0F -> BATTLEANIMSTRUCT_VAR1 BATTLEANIMSTRUCT_10 -> BATTLEANIMSTRUCT_VAR2
This commit is contained in:
parent
733664b18f
commit
13c4a93cea
@ -1,7 +1,7 @@
|
||||
; battle_anim_struct members (see macros/wram.asm)
|
||||
const_def
|
||||
const BATTLEANIMSTRUCT_INDEX
|
||||
const BATTLEANIMSTRUCT_01
|
||||
const BATTLEANIMSTRUCT_OAMFLAGS
|
||||
const BATTLEANIMSTRUCT_02
|
||||
const BATTLEANIMSTRUCT_FRAMESET_ID
|
||||
const BATTLEANIMSTRUCT_FUNCTION
|
||||
@ -14,9 +14,9 @@
|
||||
const BATTLEANIMSTRUCT_PARAM
|
||||
const BATTLEANIMSTRUCT_DURATION
|
||||
const BATTLEANIMSTRUCT_FRAME
|
||||
const BATTLEANIMSTRUCT_ANON_JT_INDEX
|
||||
const BATTLEANIMSTRUCT_0F
|
||||
const BATTLEANIMSTRUCT_10
|
||||
const BATTLEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
const BATTLEANIMSTRUCT_VAR1
|
||||
const BATTLEANIMSTRUCT_VAR2
|
||||
const_skip 7
|
||||
BATTLEANIMSTRUCT_LENGTH EQU const_value
|
||||
NUM_ANIM_OBJECTS EQU 10 ; see wActiveAnimObjects
|
||||
|
@ -12,10 +12,10 @@
|
||||
const SPRITEANIMSTRUCT_DURATIONOFFSET ; 9
|
||||
const SPRITEANIMSTRUCT_FRAME ; a
|
||||
const SPRITEANIMSTRUCT_JUMPTABLE_INDEX ; b
|
||||
const SPRITEANIMSTRUCT_0C ; c
|
||||
const SPRITEANIMSTRUCT_0D ; d
|
||||
const SPRITEANIMSTRUCT_0E ; e
|
||||
const SPRITEANIMSTRUCT_0F ; f
|
||||
const SPRITEANIMSTRUCT_VAR1 ; c
|
||||
const SPRITEANIMSTRUCT_VAR2 ; d
|
||||
const SPRITEANIMSTRUCT_VAR3 ; e
|
||||
const SPRITEANIMSTRUCT_VAR4 ; f
|
||||
SPRITEANIMSTRUCT_LENGTH EQU const_value
|
||||
NUM_SPRITE_ANIM_STRUCTS EQU 10 ; see wSpriteAnimationStructs
|
||||
|
||||
|
@ -319,7 +319,6 @@ RunBattleAnimCommand:
|
||||
ld hl, BattleAnimCommands
|
||||
add hl, de
|
||||
add hl, de
|
||||
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
@ -714,7 +713,7 @@ BattleAnimCmd_IncObj:
|
||||
ret
|
||||
|
||||
.found
|
||||
ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX
|
||||
ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ret
|
||||
@ -765,7 +764,7 @@ BattleAnimCmd_SetObj:
|
||||
|
||||
.found
|
||||
call GetBattleAnimByte
|
||||
ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX
|
||||
ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
@ -39,42 +39,42 @@ endr
|
||||
ld hl, BATTLEANIMSTRUCT_INDEX
|
||||
add hl, bc
|
||||
ld a, [wLastAnimObjectIndex]
|
||||
ld [hli], a ; Index
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_INDEX
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a ; 01
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_OAMFLAGS
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a ; 02
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_02
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a ; Frameset ID
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_FRAMESET_ID
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a ; Function
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_FUNCTION
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a ; 05
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_PALETTE
|
||||
ld a, [de]
|
||||
call GetBattleAnimTileOffset
|
||||
ld [hli], a ; Tile ID
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_TILEID
|
||||
ld a, [wBattleObjectTempXCoord]
|
||||
ld [hli], a ; X Coord
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_XCOORD
|
||||
ld a, [wBattleObjectTempYCoord]
|
||||
ld [hli], a ; Y Coord
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_YCOORD
|
||||
xor a
|
||||
ld [hli], a ; X Offset
|
||||
ld [hli], a ; Y Offset
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_XOFFSET
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_YOFFSET
|
||||
ld a, [wBattleObjectTempParam]
|
||||
ld [hli], a ; Param
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_PARAM
|
||||
xor a
|
||||
ld [hli], a ; 0c
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_DURATION
|
||||
dec a
|
||||
ld [hli], a ; 0d
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_FRAME
|
||||
xor a
|
||||
ld [hli], a ; 0e
|
||||
ld [hli], a ; 0f
|
||||
ld [hl], a ; 10
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
ld [hli], a ; BATTLEANIMSTRUCT_VAR1
|
||||
ld [hl], a ; BATTLEANIMSTRUCT_VAR2
|
||||
ret
|
||||
|
||||
BattleAnimOAMUpdate:
|
||||
@ -199,7 +199,7 @@ BattleAnimOAMUpdate:
|
||||
ret
|
||||
|
||||
InitBattleAnimBuffer:
|
||||
ld hl, BATTLEANIMSTRUCT_01
|
||||
ld hl, BATTLEANIMSTRUCT_OAMFLAGS
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
||||
@ -232,7 +232,7 @@ InitBattleAnimBuffer:
|
||||
and a
|
||||
ret z
|
||||
|
||||
ld hl, BATTLEANIMSTRUCT_01
|
||||
ld hl, BATTLEANIMSTRUCT_OAMFLAGS
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [wBattleAnimTempOAMFlags], a
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,7 @@ CelebiShrineEvent:
|
||||
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||
add hl, bc
|
||||
ld [hl], SPRITE_ANIM_SEQ_CELEBI
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
ld hl, SPRITEANIMSTRUCT_VAR4
|
||||
add hl, bc
|
||||
ld a, $80
|
||||
ld [hl], a
|
||||
@ -138,7 +138,7 @@ UpdateCelebiPosition:
|
||||
ld hl, SPRITEANIMSTRUCT_YCOORD
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
ld hl, SPRITEANIMSTRUCT_VAR4
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld d, a
|
||||
@ -148,7 +148,7 @@ UpdateCelebiPosition:
|
||||
sub $3
|
||||
ld [hl], a
|
||||
.skip
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
|
@ -222,11 +222,11 @@ Cut_SpawnLeaf:
|
||||
ld hl, SPRITEANIMSTRUCT_TILE_ID
|
||||
add hl, bc
|
||||
ld [hl], FIELDMOVE_GRASS
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld [hl], $4
|
||||
pop af
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
pop de
|
||||
@ -346,7 +346,7 @@ FlyToAnim:
|
||||
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||
add hl, bc
|
||||
ld [hl], SPRITE_ANIM_SEQ_FLY_TO
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
ld hl, SPRITEANIMSTRUCT_VAR4
|
||||
add hl, bc
|
||||
ld [hl], 11 * 8
|
||||
ld a, 64
|
||||
|
@ -523,7 +523,7 @@ DummyGame_InterpretJoypad_AnimateCursor:
|
||||
ret
|
||||
|
||||
.pressed_a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc a
|
||||
@ -538,7 +538,7 @@ DummyGame_InterpretJoypad_AnimateCursor:
|
||||
ret z
|
||||
sub 1 tiles
|
||||
ld [hl], a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
dec [hl]
|
||||
ret
|
||||
@ -551,7 +551,7 @@ DummyGame_InterpretJoypad_AnimateCursor:
|
||||
ret z
|
||||
add 1 tiles
|
||||
ld [hl], a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ret
|
||||
@ -564,7 +564,7 @@ DummyGame_InterpretJoypad_AnimateCursor:
|
||||
ret z
|
||||
sub 1 tiles
|
||||
ld [hl], a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
sub 9
|
||||
@ -579,7 +579,7 @@ DummyGame_InterpretJoypad_AnimateCursor:
|
||||
ret z
|
||||
add 1 tiles
|
||||
ld [hl], a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
add 9
|
||||
|
@ -1140,7 +1140,7 @@ ReelAction_InitGolem:
|
||||
depixel 12, 13
|
||||
ld a, SPRITE_ANIM_INDEX_SLOTS_GOLEM
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
pop af
|
||||
ld [hl], a
|
||||
@ -1968,7 +1968,7 @@ Slots_AnimateGolem:
|
||||
dw .roll
|
||||
|
||||
.init
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -1985,7 +1985,7 @@ Slots_AnimateGolem:
|
||||
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $30
|
||||
ld hl, SPRITEANIMSTRUCT_XOFFSET
|
||||
@ -1993,7 +1993,7 @@ Slots_AnimateGolem:
|
||||
ld [hl], $0
|
||||
|
||||
.fall
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $20
|
||||
@ -2012,7 +2012,7 @@ Slots_AnimateGolem:
|
||||
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], $2
|
||||
ld a, 1
|
||||
@ -2031,7 +2031,7 @@ Slots_AnimateGolem:
|
||||
jr nc, .restart
|
||||
and $3
|
||||
ret nz
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
xor $ff
|
||||
@ -2101,11 +2101,11 @@ Slots_AnimateChansey:
|
||||
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $8
|
||||
.two
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
|
@ -194,7 +194,7 @@ SetPartyMonIconAnimSpeed:
|
||||
ld [hl], a
|
||||
rlca
|
||||
rlca
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
@ -74,7 +74,7 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld [hl], 8 * 3
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld d, a
|
||||
@ -82,7 +82,7 @@ DoAnimFrame:
|
||||
and $f
|
||||
ret nz
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
|
||||
@ -145,14 +145,14 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
and $3
|
||||
ld [hl], a
|
||||
inc [hl]
|
||||
swap a
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
@ -163,7 +163,7 @@ DoAnimFrame:
|
||||
cp $a4
|
||||
jr nc, .asm_8d356
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
add $4
|
||||
|
||||
@ -175,14 +175,14 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
sla a
|
||||
sla a
|
||||
|
||||
ld d, 2
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
add 3
|
||||
@ -199,7 +199,7 @@ DoAnimFrame:
|
||||
ret
|
||||
|
||||
.GSIntroHoOhLugia
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc a
|
||||
@ -225,7 +225,7 @@ DoAnimFrame:
|
||||
ret
|
||||
|
||||
.GSIntroStar
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -236,7 +236,7 @@ DoAnimFrame:
|
||||
and $1f
|
||||
jr nz, .asm_8d395
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
dec [hl]
|
||||
.asm_8d395
|
||||
@ -258,7 +258,7 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
||||
@ -275,13 +275,13 @@ DoAnimFrame:
|
||||
ret
|
||||
|
||||
.GSIntroSparkle
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr z, .asm_8d41e
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
ld hl, SPRITEANIMSTRUCT_VAR4
|
||||
add hl, bc
|
||||
ld d, [hl]
|
||||
|
||||
@ -303,13 +303,13 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@ -318,13 +318,13 @@ DoAnimFrame:
|
||||
ld e, l
|
||||
ld d, h
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@ -334,7 +334,7 @@ DoAnimFrame:
|
||||
ld e, l
|
||||
ld d, h
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], e
|
||||
inc hl
|
||||
@ -431,13 +431,13 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld [hl], $2
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $20
|
||||
ret
|
||||
|
||||
.TradePokeBall_two
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -448,12 +448,12 @@ DoAnimFrame:
|
||||
.asm_8d4af
|
||||
call .IncrementJumptableIndex
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $40
|
||||
|
||||
.TradePokeBall_three
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 48
|
||||
@ -477,24 +477,24 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld [hl], $4
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $30
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], $24
|
||||
ret
|
||||
|
||||
.TradePokeBall_four
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_8d51c
|
||||
|
||||
ld d, a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call Sprites_Sine
|
||||
@ -503,18 +503,18 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ld a, [hl]
|
||||
and $3f
|
||||
ret nz
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $20
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
sub $c
|
||||
@ -559,7 +559,7 @@ DoAnimFrame:
|
||||
ret
|
||||
|
||||
.RevealNewMon:
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $80
|
||||
@ -600,7 +600,7 @@ DoAnimFrame:
|
||||
ret
|
||||
|
||||
.CutLeaves
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
@ -610,13 +610,13 @@ DoAnimFrame:
|
||||
ld e, l
|
||||
ld d, h
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
@ -645,7 +645,7 @@ DoAnimFrame:
|
||||
and a
|
||||
ret z
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
@ -657,7 +657,7 @@ DoAnimFrame:
|
||||
dec [hl]
|
||||
dec [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
ld hl, SPRITEANIMSTRUCT_VAR4
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld d, a
|
||||
@ -666,7 +666,7 @@ DoAnimFrame:
|
||||
add $8
|
||||
ld [hl], a
|
||||
.skip
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
@ -691,7 +691,7 @@ DoAnimFrame:
|
||||
dec [hl]
|
||||
|
||||
ld d, $40
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
@ -718,7 +718,7 @@ DoAnimFrame:
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0F
|
||||
ld hl, SPRITEANIMSTRUCT_VAR4
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld d, a
|
||||
@ -727,7 +727,7 @@ DoAnimFrame:
|
||||
sub $2
|
||||
ld [hl], a
|
||||
.asm_8d621
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
inc [hl]
|
||||
@ -756,7 +756,7 @@ DoAnimFrame:
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
add 2
|
||||
@ -774,7 +774,7 @@ DoAnimFrame:
|
||||
ret
|
||||
|
||||
.IntroPichuWooper
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 20
|
||||
@ -799,7 +799,7 @@ DoAnimFrame:
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
inc [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
push af
|
||||
|
@ -160,44 +160,45 @@ _InitSpriteAnimStruct::
|
||||
add hl, bc
|
||||
; Load the index.
|
||||
ld a, [wSpriteAnimCount]
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_INDEX
|
||||
; Copy the table entry to the next two fields.
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_FRAMESET_ID
|
||||
inc de
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_ANIM_SEQ_ID
|
||||
inc de
|
||||
; Look up the third field from the table in the wSpriteAnimDict array (10x2).
|
||||
; Take the value and load it in
|
||||
ld a, [de]
|
||||
call GetSpriteAnimVTile
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_TILE_ID
|
||||
pop de
|
||||
; Set hl to field 4 (X coordinate). Kinda pointless, because we're presumably already here.
|
||||
ld hl, SPRITEANIMSTRUCT_XCOORD
|
||||
add hl, bc
|
||||
; Load the original value of de into here.
|
||||
ld a, e
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_XCOORD
|
||||
ld a, d
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_YCOORD
|
||||
; load 0 into the next four fields
|
||||
xor a
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_XOFFSET
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_YOFFSET
|
||||
xor a
|
||||
ld [hli], a
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_DURATION
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_DURATIONOFFSET
|
||||
; load -1 into the next field
|
||||
dec a
|
||||
ld [hli], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_FRAME
|
||||
; load 0 into the last five fields
|
||||
xor a
|
||||
rept 4
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hl], a
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_VAR1
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_VAR2
|
||||
ld [hli], a ; SPRITEANIMSTRUCT_VAR3
|
||||
ld [hl], a ; SPRITEANIMSTRUCT_VAR4
|
||||
; back up the address of the first field to wSpriteAnimAddrBackup
|
||||
ld a, c
|
||||
ld [wSpriteAnimAddrBackup], a
|
||||
|
@ -385,7 +385,7 @@ NamingScreenJoypadLoop:
|
||||
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, wJumptableIndex
|
||||
@ -425,10 +425,10 @@ NamingScreenJoypadLoop:
|
||||
ld c, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $8
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], $4
|
||||
call NamingScreen_IsTargetBox
|
||||
@ -468,7 +468,7 @@ NamingScreenJoypadLoop:
|
||||
ld b, [hl]
|
||||
|
||||
NamingScreen_GetCursorPosition:
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
push bc
|
||||
@ -480,7 +480,7 @@ NamingScreen_GetCursorPosition:
|
||||
cp b
|
||||
pop bc
|
||||
jr nz, .not_bottom_row
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $3
|
||||
@ -504,7 +504,7 @@ NamingScreen_GetCursorPosition:
|
||||
|
||||
NamingScreen_AnimateCursor:
|
||||
call .GetDPad
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld e, a
|
||||
@ -524,13 +524,13 @@ NamingScreen_AnimateCursor:
|
||||
ld de, .CaseDelEnd
|
||||
ld a, SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR_BIG - SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 1
|
||||
.ok2
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
add [hl] ; default SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR
|
||||
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld l, [hl]
|
||||
ld h, $0
|
||||
@ -567,7 +567,7 @@ NamingScreen_AnimateCursor:
|
||||
call NamingScreen_GetCursorPosition
|
||||
and a
|
||||
jr nz, .asm_11ab7
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $8
|
||||
@ -587,7 +587,7 @@ NamingScreen_AnimateCursor:
|
||||
ld e, a
|
||||
add a
|
||||
add e
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
@ -596,7 +596,7 @@ NamingScreen_AnimateCursor:
|
||||
call NamingScreen_GetCursorPosition
|
||||
and a
|
||||
jr nz, .asm_11ad8
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -618,13 +618,13 @@ NamingScreen_AnimateCursor:
|
||||
ld e, a
|
||||
add a
|
||||
add e
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.down
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
call NamingScreen_IsTargetBox
|
||||
@ -645,7 +645,7 @@ NamingScreen_AnimateCursor:
|
||||
ret
|
||||
|
||||
.up
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -1059,7 +1059,7 @@ INCBIN "gfx/icons/mail_big.2bpp"
|
||||
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, wJumptableIndex
|
||||
@ -1109,10 +1109,10 @@ INCBIN "gfx/icons/mail_big.2bpp"
|
||||
ld c, [hl]
|
||||
inc hl
|
||||
ld b, [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $9
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], $5
|
||||
ret
|
||||
@ -1155,7 +1155,7 @@ INCBIN "gfx/icons/mail_big.2bpp"
|
||||
|
||||
ComposeMail_AnimateCursor:
|
||||
call .GetDPad
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld e, a
|
||||
@ -1170,13 +1170,13 @@ ComposeMail_AnimateCursor:
|
||||
ld de, .CaseDelEnd
|
||||
ld a, 1
|
||||
.got_pointer
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
add [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld l, [hl]
|
||||
ld h, 0
|
||||
@ -1213,7 +1213,7 @@ ComposeMail_AnimateCursor:
|
||||
call ComposeMail_GetCursorPosition
|
||||
and a
|
||||
jr nz, .case_del_done_right
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $9
|
||||
@ -1233,7 +1233,7 @@ ComposeMail_AnimateCursor:
|
||||
ld e, a
|
||||
add a
|
||||
add e
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
@ -1242,7 +1242,7 @@ ComposeMail_AnimateCursor:
|
||||
call ComposeMail_GetCursorPosition
|
||||
and a
|
||||
jr nz, .caps_del_done_left
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -1264,13 +1264,13 @@ ComposeMail_AnimateCursor:
|
||||
ld e, a
|
||||
add a
|
||||
add e
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.down
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $5
|
||||
@ -1283,7 +1283,7 @@ ComposeMail_AnimateCursor:
|
||||
ret
|
||||
|
||||
.up
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -1302,12 +1302,12 @@ NamingScreen_PressedA_GetCursorCommand:
|
||||
ld b, [hl]
|
||||
|
||||
ComposeMail_GetCursorPosition:
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $5
|
||||
jr nz, .letter
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp $3
|
||||
|
@ -324,7 +324,7 @@ EvolutionAnimation:
|
||||
ld hl, SPRITEANIMSTRUCT_TILE_ID
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $10
|
||||
ret
|
||||
|
@ -1190,7 +1190,7 @@ CrystalIntro_InitUnownAnim:
|
||||
push de
|
||||
ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $8
|
||||
ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_4
|
||||
@ -1200,7 +1200,7 @@ CrystalIntro_InitUnownAnim:
|
||||
push de
|
||||
ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $18
|
||||
ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_3
|
||||
@ -1210,7 +1210,7 @@ CrystalIntro_InitUnownAnim:
|
||||
push de
|
||||
ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $28
|
||||
ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1
|
||||
@ -1219,7 +1219,7 @@ CrystalIntro_InitUnownAnim:
|
||||
|
||||
ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $38
|
||||
ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_2
|
||||
|
@ -94,10 +94,10 @@ GameFreakPresentsInit:
|
||||
ld hl, SPRITEANIMSTRUCT_YOFFSET
|
||||
add hl, bc
|
||||
ld [hl], 160
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], 96
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], 48
|
||||
xor a
|
||||
@ -231,7 +231,7 @@ GameFreakLogo_Bounce:
|
||||
; Sine offset starts at 48 (32+32/2, or pi+pi/2), so it starts at the maximum
|
||||
; value of the sine wave (i.e. the top of the screen).
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_0C ; jump height
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1 ; jump height
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
@ -239,7 +239,7 @@ GameFreakLogo_Bounce:
|
||||
|
||||
; Load the sine offset, make sure it doesn't reach the negative part of the wave
|
||||
ld d, a
|
||||
ld hl, SPRITEANIMSTRUCT_0D ; sine offset
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2 ; sine offset
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and $3f ; full circle = 2*pi = 2*32
|
||||
@ -255,7 +255,7 @@ GameFreakLogo_Bounce:
|
||||
ld [hl], e
|
||||
|
||||
; Decrement the sine offset
|
||||
ld hl, SPRITEANIMSTRUCT_0D ; sine offset
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2 ; sine offset
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
dec [hl]
|
||||
@ -263,7 +263,7 @@ GameFreakLogo_Bounce:
|
||||
ret nz
|
||||
|
||||
; If the ditto's reached the ground, decrement the jump height and play the sfx
|
||||
ld hl, SPRITEANIMSTRUCT_0C ; jump height
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1 ; jump height
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
sub 48
|
||||
@ -276,7 +276,7 @@ GameFreakLogo_Bounce:
|
||||
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
ld de, SFX_DITTO_POP_UP
|
||||
@ -285,7 +285,7 @@ GameFreakLogo_Bounce:
|
||||
|
||||
GameFreakLogo_Ditto:
|
||||
; Wait a little, then start transforming
|
||||
ld hl, SPRITEANIMSTRUCT_0D ; frame count
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2 ; frame count
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 32
|
||||
@ -297,7 +297,7 @@ GameFreakLogo_Ditto:
|
||||
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ld hl, SPRITEANIMSTRUCT_0D
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
ld de, SFX_DITTO_TRANSFORM
|
||||
@ -305,7 +305,7 @@ GameFreakLogo_Ditto:
|
||||
ret
|
||||
|
||||
GameFreakLogo_Transform:
|
||||
ld hl, SPRITEANIMSTRUCT_0D ; frame count
|
||||
ld hl, SPRITEANIMSTRUCT_VAR2 ; frame count
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 64
|
||||
|
@ -1084,13 +1084,13 @@ TradeAnim_AnimateTrademonInTube:
|
||||
|
||||
.InitTimer:
|
||||
call .JumptableNext
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $80
|
||||
ret
|
||||
|
||||
.WaitTimer1:
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
dec [hl]
|
||||
@ -1148,13 +1148,13 @@ TradeAnim_AnimateTrademonInTube:
|
||||
|
||||
.done_move_left
|
||||
call .JumptableNext
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld [hl], $80
|
||||
ret
|
||||
|
||||
.WaitTimer2:
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
dec [hl]
|
||||
|
@ -418,7 +418,7 @@ EZChat_MasterLoop:
|
||||
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $1
|
||||
ld [hl], a
|
||||
@ -426,7 +426,7 @@ EZChat_MasterLoop:
|
||||
depixel 9, 2, 2, 0
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $3
|
||||
ld [hl], a
|
||||
@ -434,7 +434,7 @@ EZChat_MasterLoop:
|
||||
depixel 10, 16
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $4
|
||||
ld [hl], a
|
||||
@ -442,7 +442,7 @@ EZChat_MasterLoop:
|
||||
depixel 10, 4
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $5
|
||||
ld [hl], a
|
||||
@ -450,7 +450,7 @@ EZChat_MasterLoop:
|
||||
depixel 10, 2
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $2
|
||||
ld [hl], a
|
||||
@ -2453,7 +2453,7 @@ Function11d035:
|
||||
ret
|
||||
|
||||
AnimateEZChatCursor:
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
jumptable .Jumptable, hl
|
||||
|
||||
@ -2820,7 +2820,7 @@ AnimateEZChatCursor:
|
||||
ld hl, wcd23
|
||||
and [hl]
|
||||
jr z, .reset_y_offset
|
||||
ld hl, SPRITEANIMSTRUCT_0E
|
||||
ld hl, SPRITEANIMSTRUCT_VAR3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and a
|
||||
|
@ -485,7 +485,7 @@ Function171b4b:
|
||||
depixel 8, 2
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $8
|
||||
ld [hl], a
|
||||
@ -493,7 +493,7 @@ Function171b4b:
|
||||
depixel 8, 19
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $9
|
||||
ld [hl], a
|
||||
@ -501,7 +501,7 @@ Function171b4b:
|
||||
depixel 17, 14, 2, 0
|
||||
ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR
|
||||
call InitSpriteAnimStruct
|
||||
ld hl, SPRITEANIMSTRUCT_0C
|
||||
ld hl, SPRITEANIMSTRUCT_VAR1
|
||||
add hl, bc
|
||||
ld a, $a
|
||||
ld [hl], a
|
||||
|
Loading…
Reference in New Issue
Block a user