SpriteAnim

This commit is contained in:
PikalaxALT 2015-11-13 10:48:49 -05:00
parent e0b4fc781a
commit 21276b79f1
16 changed files with 347 additions and 271 deletions

View File

@ -189,38 +189,85 @@ NUM_KANTO_BADGES EQU const_value
NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES
const_def
const JUMPTABLE_8D24B_FUNCTION_00
const JUMPTABLE_8D24B_FUNCTION_01
const JUMPTABLE_8D24B_FUNCTION_02
const JUMPTABLE_8D24B_FUNCTION_03
const JUMPTABLE_8D24B_FUNCTION_04
const JUMPTABLE_8D24B_FUNCTION_05
const JUMPTABLE_8D24B_FUNCTION_06
const JUMPTABLE_8D24B_FUNCTION_07
const JUMPTABLE_8D24B_FUNCTION_08
const JUMPTABLE_8D24B_FUNCTION_09
const JUMPTABLE_8D24B_FUNCTION_0A
const JUMPTABLE_8D24B_FUNCTION_0B
const JUMPTABLE_8D24B_FUNCTION_0C
const JUMPTABLE_8D24B_FUNCTION_0D
const JUMPTABLE_8D24B_FUNCTION_0E
const JUMPTABLE_8D24B_FUNCTION_0F
const JUMPTABLE_8D24B_FUNCTION_10
const JUMPTABLE_8D24B_FUNCTION_11
const JUMPTABLE_8D24B_FUNCTION_12
const JUMPTABLE_8D24B_FUNCTION_13
const JUMPTABLE_8D24B_FUNCTION_14
const JUMPTABLE_8D24B_FUNCTION_15
const JUMPTABLE_8D24B_FUNCTION_16
const JUMPTABLE_8D24B_FUNCTION_17
const JUMPTABLE_8D24B_FUNCTION_18
const JUMPTABLE_8D24B_FUNCTION_19
const JUMPTABLE_8D24B_FUNCTION_1A
const JUMPTABLE_8D24B_FUNCTION_1B
const JUMPTABLE_8D24B_FUNCTION_1C
const JUMPTABLE_8D24B_FUNCTION_1D
const JUMPTABLE_8D24B_FUNCTION_1E
const JUMPTABLE_8D24B_FUNCTION_1F
const JUMPTABLE_8D24B_FUNCTION_20
const JUMPTABLE_8D24B_FUNCTION_21
const JUMPTABLE_8D24B_FUNCTION_22
const SPRITE_ANIM_SEQ_00
const SPRITE_ANIM_SEQ_01
const SPRITE_ANIM_SEQ_02
const SPRITE_ANIM_SEQ_03
const SPRITE_ANIM_SEQ_04
const SPRITE_ANIM_SEQ_05
const SPRITE_ANIM_SEQ_06
const SPRITE_ANIM_SEQ_07
const SPRITE_ANIM_SEQ_08
const SPRITE_ANIM_SEQ_09
const SPRITE_ANIM_SEQ_0A
const SPRITE_ANIM_SEQ_0B
const SPRITE_ANIM_SEQ_0C
const SPRITE_ANIM_SEQ_0D
const SPRITE_ANIM_SEQ_0E
const SPRITE_ANIM_SEQ_0F
const SPRITE_ANIM_SEQ_10
const SPRITE_ANIM_SEQ_11
const SPRITE_ANIM_SEQ_12
const SPRITE_ANIM_SEQ_13
const SPRITE_ANIM_SEQ_14
const SPRITE_ANIM_SEQ_15
const SPRITE_ANIM_SEQ_16
const SPRITE_ANIM_SEQ_17
const SPRITE_ANIM_SEQ_18
const SPRITE_ANIM_SEQ_19
const SPRITE_ANIM_SEQ_1A
const SPRITE_ANIM_SEQ_1B
const SPRITE_ANIM_SEQ_1C
const SPRITE_ANIM_SEQ_1D
const SPRITE_ANIM_SEQ_1E
const SPRITE_ANIM_SEQ_1F
const SPRITE_ANIM_SEQ_20
const SPRITE_ANIM_SEQ_21
const SPRITE_ANIM_SEQ_22
const_def
const SPRITE_ANIM_INDEX_00
const SPRITE_ANIM_INDEX_01
const SPRITE_ANIM_INDEX_02
const SPRITE_ANIM_INDEX_03
const SPRITE_ANIM_INDEX_04
const SPRITE_ANIM_INDEX_05
const SPRITE_ANIM_INDEX_06
const SPRITE_ANIM_INDEX_07
const SPRITE_ANIM_INDEX_08
const SPRITE_ANIM_INDEX_09
const SPRITE_ANIM_INDEX_0A
const SPRITE_ANIM_INDEX_0B
const SPRITE_ANIM_INDEX_0C
const SPRITE_ANIM_INDEX_0D
const SPRITE_ANIM_INDEX_0E
const SPRITE_ANIM_INDEX_0F
const SPRITE_ANIM_INDEX_10
const SPRITE_ANIM_INDEX_11
const SPRITE_ANIM_INDEX_12
const SPRITE_ANIM_INDEX_13
const SPRITE_ANIM_INDEX_14
const SPRITE_ANIM_INDEX_15
const SPRITE_ANIM_INDEX_16
const SPRITE_ANIM_INDEX_17
const SPRITE_ANIM_INDEX_18
const SPRITE_ANIM_INDEX_19
const SPRITE_ANIM_INDEX_1A
const SPRITE_ANIM_INDEX_1B
const SPRITE_ANIM_INDEX_1C
const SPRITE_ANIM_INDEX_1D
const SPRITE_ANIM_INDEX_1E
const SPRITE_ANIM_INDEX_1F
const SPRITE_ANIM_INDEX_20
const SPRITE_ANIM_INDEX_21
const SPRITE_ANIM_INDEX_22
const SPRITE_ANIM_INDEX_23
const SPRITE_ANIM_INDEX_24
const SPRITE_ANIM_INDEX_25
const SPRITE_ANIM_INDEX_26
const SPRITE_ANIM_INDEX_27
const SPRITE_ANIM_INDEX_28
const SPRITE_ANIM_INDEX_29
const SPRITE_ANIM_INDEX_2A
const SPRITE_ANIM_INDEX_2B
const SPRITE_ANIM_INDEX_2C

View File

@ -792,8 +792,8 @@ Function1736d: ; 1736d (5:736d)
add $4c
ld d, a
ld e, $58
ld a, $19
call Function3b2a
ld a, SPRITE_ANIM_INDEX_19
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $0
@ -821,8 +821,8 @@ Function173b3: ; 173b3 (5:73b3)
ld b, a
push hl
push bc
ld a, $1c
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1C
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $0

View File

@ -123,7 +123,7 @@ Functione1f1c: ; e1f1c
.asm_e1f30
ld de, $341c
ld a, $c
call Function3b2a
call _InitSpriteAnimStruct
ld a, $5
ld [wc702], a
ld hl, wJumptableIndex

View File

@ -321,7 +321,7 @@ Function4e7e8: ; 4e7e8
push de
ld de, $4858
ld a, $13
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $b
add hl, bc
ld a, [wJumptableIndex]

View File

@ -828,7 +828,7 @@ TownMapMon: ; 91f7b
; Animation/palette
ld de, 0
ld a, $0
call Function3b2a
call _InitSpriteAnimStruct
ld hl, 3
add hl, bc
@ -869,7 +869,7 @@ TownMapPlayerIcon: ; 91fa6
ld b, $1e ; Female
.asm_91fd3
ld a, b
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc

View File

@ -2388,14 +2388,14 @@ Function2914e: ; 2914e
call Function2985a
pop de
ld a, $11
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $b
add hl, bc
pop bc
ld [hl], b
pop de
ld a, $12
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $b
add hl, bc
pop bc
@ -3082,7 +3082,7 @@ Function29611: ; 29611
Function2961b: ; 2961b
lb de, $54, $58
ld a, $e
call Function3b2a
call _InitSpriteAnimStruct
call Function29114
ld a, $20
ld [wcf64], a
@ -3092,7 +3092,7 @@ Function2961b: ; 2961b
Function2962c: ; 2962c
lb de, $54, $58
ld a, $e
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $b
add hl, bc
ld [hl], $1
@ -3108,7 +3108,7 @@ Function2962c: ; 2962c
Function29649: ; 29649
lb de, $54, $58
ld a, $f
call Function3b2a
call _InitSpriteAnimStruct
call Function29114
ld a, $10
ld [wcf64], a
@ -3122,7 +3122,7 @@ Function29660: ; 29660
call Functioncf8
lb de, $28, $58
ld a, $10
call Function3b2a
call _InitSpriteAnimStruct
call Function29114
ld a, $40
ld [wcf64], a

View File

@ -173,9 +173,9 @@ Function117f5: ; 117f5 (4:57f5)
ld hl, wc300
ld [hli], a
ld [hl], a
ld de, $2420
ld a, $a
call Function3b2a
lb de, $24, $20
ld a, SPRITE_ANIM_INDEX_0A
call _InitSpriteAnimStruct
ld hl, $1
add hl, bc
ld [hl], $0
@ -220,18 +220,18 @@ Function11847: ; 11847 (4:5847)
ld [hli], a
ld [hl], a
pop de
ld b, $a
ld b, SPRITE_ANIM_INDEX_0A
ld a, d
cp $7a
jr nz, .asm_11873
ld a, e
cp $40
jr nz, .asm_11873
ld b, $1e
ld b, SPRITE_ANIM_INDEX_1E
.asm_11873
ld a, b
ld de, $2420
call Function3b2a
lb de, $24, $20
call _InitSpriteAnimStruct
ret
Function1187b: ; 1187b (4:587b)
@ -405,8 +405,8 @@ Function1197b: ; 1197b (4:597b)
jr nz, .asm_11985
ld d, $40
.asm_11985
ld a, $2
call Function3b2a
ld a, SPRITE_ANIM_INDEX_02
call _InitSpriteAnimStruct
ld a, c
ld [wc6d5], a
ld a, b

View File

@ -1037,9 +1037,9 @@ Function92d20: ; 92d20
call Function92fc0
push bc
push af
ld de, $6068
ld a, $6
call Function3b2a
lb de, $60, $68
ld a, SPRITE_ANIM_INDEX_06
call _InitSpriteAnimStruct
ld hl, $e
add hl, bc
pop af
@ -1096,9 +1096,9 @@ Function92d7e: ; 92d7e
add hl, bc
ld [hl], $0
push bc
ld de, $6000
ld a, $7
call Function3b2a
lb de, $60, $00
ld a, SPRITE_ANIM_INDEX_07
call _InitSpriteAnimStruct
pop bc
xor a
ld [wcf64], a
@ -2063,9 +2063,9 @@ Function932fc: ; 932fc (24:72fc)
add hl, bc
dec [hl]
push bc
ld de, $606c
ld a, $8
call Function3b2a
lb de, $60, $6c
ld a, SPRITE_ANIM_INDEX_08
call _InitSpriteAnimStruct
pop bc
ret
; 93316 (24:7316)

View File

@ -113,7 +113,7 @@ Function8cfa8: ; 8cfa8 (23:4fa8)
.done
ret
Function8cfd6:: ; 8cfd6
InitSpriteAnimStruct:: ; 8cfd6
; Find if there's any room in the wc314 array, which is 10x16
push de
push af
@ -235,7 +235,6 @@ Function8d03d: ; 8d03d (23:503d)
Function8d04c: ; 8d04c
; Populate Sprites with the bouncing mon icons
call Function8d0ec ; init WRAM
call Function8d132 ; read from a memory array
cp -3
@ -539,51 +538,51 @@ endr
; 8d1c4
Unknown_8d1c4: ; 8d1c4
db $01, JUMPTABLE_8D24B_FUNCTION_01, $00 ; 00
db $07, JUMPTABLE_8D24B_FUNCTION_04, $00 ; 01
db $08, JUMPTABLE_8D24B_FUNCTION_05, $05 ; 02
db $0a, JUMPTABLE_8D24B_FUNCTION_06, $00 ; 03
db $0b, JUMPTABLE_8D24B_FUNCTION_07, $06 ; 04
db $0c, JUMPTABLE_8D24B_FUNCTION_08, $06 ; 05
db $0d, JUMPTABLE_8D24B_FUNCTION_09, $07 ; 06
db $0e, JUMPTABLE_8D24B_FUNCTION_0A, $07 ; 07
db $10, JUMPTABLE_8D24B_FUNCTION_0B, $07 ; 08
db $08, JUMPTABLE_8D24B_FUNCTION_0C, $05 ; 09
db $11, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 0a
db $12, JUMPTABLE_8D24B_FUNCTION_0D, $08 ; 0b
db $12, JUMPTABLE_8D24B_FUNCTION_0E, $08 ; 0c
db $12, JUMPTABLE_8D24B_FUNCTION_0F, $08 ; 0d
db $13, JUMPTABLE_8D24B_FUNCTION_10, $00 ; 0e
db $15, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 0f
db $16, JUMPTABLE_8D24B_FUNCTION_11, $00 ; 10
db $17, JUMPTABLE_8D24B_FUNCTION_12, $00 ; 11
db $18, JUMPTABLE_8D24B_FUNCTION_12, $00 ; 12
db $19, JUMPTABLE_8D24B_FUNCTION_13, $00 ; 13
db $1a, JUMPTABLE_8D24B_FUNCTION_14, $00 ; 14
db $1b, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 15
db $1d, JUMPTABLE_8D24B_FUNCTION_15, $00 ; 16
db $1e, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 17
db $1d, JUMPTABLE_8D24B_FUNCTION_17, $00 ; 18
db $1f, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 19
db $24, JUMPTABLE_8D24B_FUNCTION_19, $00 ; 1a
db $25, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1b
db $20, JUMPTABLE_8D24B_FUNCTION_13, $00 ; 1c
db $26, JUMPTABLE_8D24B_FUNCTION_1A, $00 ; 1d
db $2d, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1e
db $2e, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 1f
db $2f, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 20
db $30, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 21
db $31, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 22
db $32, JUMPTABLE_8D24B_FUNCTION_1B, $00 ; 23
db $33, JUMPTABLE_8D24B_FUNCTION_1C, $00 ; 24
db $34, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 25
db $35, JUMPTABLE_8D24B_FUNCTION_1D, $00 ; 26
db $37, JUMPTABLE_8D24B_FUNCTION_1E, $00 ; 27
db $38, JUMPTABLE_8D24B_FUNCTION_1E, $00 ; 28
db $39, JUMPTABLE_8D24B_FUNCTION_20, $00 ; 29
db $3f, JUMPTABLE_8D24B_FUNCTION_21, $00 ; 2a
db $3e, JUMPTABLE_8D24B_FUNCTION_22, $00 ; 2b
db $40, JUMPTABLE_8D24B_FUNCTION_00, $00 ; 2c
db $01, SPRITE_ANIM_SEQ_01, $00 ; 00
db $07, SPRITE_ANIM_SEQ_04, $00 ; 01
db $08, SPRITE_ANIM_SEQ_05, $05 ; 02
db $0a, SPRITE_ANIM_SEQ_06, $00 ; 03
db $0b, SPRITE_ANIM_SEQ_07, $06 ; 04
db $0c, SPRITE_ANIM_SEQ_08, $06 ; 05
db $0d, SPRITE_ANIM_SEQ_09, $07 ; 06
db $0e, SPRITE_ANIM_SEQ_0A, $07 ; 07
db $10, SPRITE_ANIM_SEQ_0B, $07 ; 08
db $08, SPRITE_ANIM_SEQ_0C, $05 ; 09
db $11, SPRITE_ANIM_SEQ_00, $00 ; 0a
db $12, SPRITE_ANIM_SEQ_0D, $08 ; 0b
db $12, SPRITE_ANIM_SEQ_0E, $08 ; 0c
db $12, SPRITE_ANIM_SEQ_0F, $08 ; 0d
db $13, SPRITE_ANIM_SEQ_10, $00 ; 0e
db $15, SPRITE_ANIM_SEQ_00, $00 ; 0f
db $16, SPRITE_ANIM_SEQ_11, $00 ; 10
db $17, SPRITE_ANIM_SEQ_12, $00 ; 11
db $18, SPRITE_ANIM_SEQ_12, $00 ; 12
db $19, SPRITE_ANIM_SEQ_13, $00 ; 13
db $1a, SPRITE_ANIM_SEQ_14, $00 ; 14
db $1b, SPRITE_ANIM_SEQ_00, $00 ; 15
db $1d, SPRITE_ANIM_SEQ_15, $00 ; 16
db $1e, SPRITE_ANIM_SEQ_00, $00 ; 17
db $1d, SPRITE_ANIM_SEQ_17, $00 ; 18
db $1f, SPRITE_ANIM_SEQ_00, $00 ; 19
db $24, SPRITE_ANIM_SEQ_19, $00 ; 1a
db $25, SPRITE_ANIM_SEQ_00, $00 ; 1b
db $20, SPRITE_ANIM_SEQ_13, $00 ; 1c
db $26, SPRITE_ANIM_SEQ_1A, $00 ; 1d
db $2d, SPRITE_ANIM_SEQ_00, $00 ; 1e
db $2e, SPRITE_ANIM_SEQ_00, $00 ; 1f
db $2f, SPRITE_ANIM_SEQ_00, $00 ; 20
db $30, SPRITE_ANIM_SEQ_00, $00 ; 21
db $31, SPRITE_ANIM_SEQ_00, $00 ; 22
db $32, SPRITE_ANIM_SEQ_1B, $00 ; 23
db $33, SPRITE_ANIM_SEQ_1C, $00 ; 24
db $34, SPRITE_ANIM_SEQ_00, $00 ; 25
db $35, SPRITE_ANIM_SEQ_1D, $00 ; 26
db $37, SPRITE_ANIM_SEQ_1E, $00 ; 27
db $38, SPRITE_ANIM_SEQ_1E, $00 ; 28
db $39, SPRITE_ANIM_SEQ_20, $00 ; 29
db $3f, SPRITE_ANIM_SEQ_21, $00 ; 2a
db $3e, SPRITE_ANIM_SEQ_22, $00 ; 2b
db $40, SPRITE_ANIM_SEQ_00, $00 ; 2c
; 8d24b

View File

@ -2016,17 +2016,17 @@ Function3b0c:: ; 3b0c
Function3b2a:: ; 3b2a
_InitSpriteAnimStruct:: ; 3b2a
ld [wc3b8], a
ld a, [hROMBank]
push af
ld a, BANK(Function8cfd6)
ld a, BANK(InitSpriteAnimStruct)
rst Bankswitch
ld a, [wc3b8]
call Function8cfd6
call InitSpriteAnimStruct
pop af
rst Bankswitch

183
main.asm
View File

@ -1392,8 +1392,8 @@ Function639b: ; unreferenced
ld a, [wcf65]
and $3
ret nz
ld bc, wc3a4
ld hl, $a
ld bc, SpriteAnim10
ld hl, SpriteAnim10FrameIndex - SpriteAnim10
add hl, bc ; over-the-top compicated way to load wc3ae into hl
ld l, [hl]
ld h, 0
@ -1418,18 +1418,19 @@ endr
ret z
ld e, a
ld d, [hl]
ld a, $1
call Function3b2a
ld a, SPRITE_ANIM_INDEX_01
call _InitSpriteAnimStruct
ret
; 63ca
Data63ca: ; 63ca
dw $505c, 0
dw $685c, $585c
dw $685c, $785c
dw $885c, $785c
dw 0, $785c
dw 0, $585c
; frame 0 y, x; frame 1 y, x
db $5c, $50, $00, $00
db $5c, $68, $5c, $58
db $5c, $68, $5c, $78
db $5c, $88, $5c, $78
db $00, $00, $5c, $78
db $00, $00, $5c, $58
; 63e2
Copyright: ; 63e2
@ -10421,9 +10422,9 @@ Function11e9a: ; 11e9a (4:5e9a)
ld hl, wc300
ld [hli], a
ld [hl], a
ld de, $1810
ld a, $0
call Function3b2a
lb de, $18, $10
ld a, SPRITE_ANIM_INDEX_00
call _InitSpriteAnimStruct
ld hl, $2
add hl, bc
ld [hl], $0
@ -10554,8 +10555,8 @@ Jumptable_12017: ; 12017 (4:6017)
Function1201b: ; 1201b (4:601b)
lb de, $48, $10
ld a, $9
call Function3b2a
ld a, SPRITE_ANIM_INDEX_09
call _InitSpriteAnimStruct
ld a, c
ld [wc6d5], a
ld a, b
@ -26260,9 +26261,9 @@ Special_CelebiShrineEvent: ; 4989a
xor a
ld [VramState], a
call LoadCelebiGFX
ld de, $750
ld a, $2c
call Function3b2a
lb de, $07, $50
ld a, SPRITE_ANIM_INDEX_2C
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $84
@ -26362,8 +26363,8 @@ Function49944: ; 49944
add $40
ld d, a
ld e, $0
ld a, $18
call Function3b2a
ld a, SPRITE_ANIM_INDEX_18 ; fly land
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $80
@ -39087,8 +39088,8 @@ ShakeHeadbuttTree: ; 8c80a
lb bc, BANK(HeadbuttTreeGFX), 8
call Request2bpp
call Function8cad3
ld a, $1b
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1B
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $84
@ -39237,8 +39238,8 @@ endr
Function8ca23: ; 8ca23 (23:4a23)
call Function8cad3
ld a, $17
call Function3b2a
ld a, SPRITE_ANIM_INDEX_17 ; leaf
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $84
@ -39287,8 +39288,8 @@ Function8ca64: ; 8ca64 (23:4a64)
Function8ca73: ; 8ca73 (23:4a73)
push de
push af
ld a, $16
call Function3b2a
ld a, SPRITE_ANIM_INDEX_16 ; fly takeoff
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $80
@ -39375,9 +39376,9 @@ Function8caed: ; 8caed
xor a
ld [VramState], a
call Function8cb9b
ld de, $5450
ld a, $a
call Function3b2a
lb de, $54, $50
ld a, SPRITE_ANIM_INDEX_0A
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $84
@ -39409,9 +39410,9 @@ Function8cb33: ; 8cb33
xor a
ld [VramState], a
call Function8cb9b
ld de, $fc50
ld a, $a
call Function3b2a
lb de, $fc, $50
ld a, SPRITE_ANIM_INDEX_0A
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $84
@ -39507,8 +39508,8 @@ Function8cbe6: ; 8cbe6 (23:4be6)
add $40
ld d, a
ld e, $0
ld a, $18
call Function3b2a
ld a, SPRITE_ANIM_INDEX_18 ; fly land
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $80
@ -39840,7 +39841,7 @@ Function8ce19: ; 8ce19
ld d, $55
ld a, [wd194 + 1]
ld e, a
ld b, $15
ld b, SPRITE_ANIM_INDEX_15
ld a, [rSVBK]
push af
ld a, $1
@ -39848,13 +39849,13 @@ Function8ce19: ; 8ce19
ld a, [PlayerGender]
bit 0, a
jr z, .asm_8ce31
ld b, $1f
ld b, SPRITE_ANIM_INDEX_1F
.asm_8ce31
pop af
ld [rSVBK], a
ld a, b
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $0
@ -40264,15 +40265,17 @@ Function8e908: ; 8e908 (23:6908)
ld [CurIcon], a
call Function8e9db
ld a, [hObjectStructIndexBuffer]
; and $f \ swap a
; y coord
rept 4
add a
endr
add $1c
ld d, a
; x coord
ld e, $10
ld a, $0
call Function8cfd6
; type is partymon icon
ld a, SPRITE_ANIM_INDEX_00
call InitSpriteAnimStruct
pop af
ld hl, $3
add hl, bc
@ -40317,9 +40320,9 @@ Function8e961: ; 8e961 (23:6961)
ld [CurIcon], a
xor a
call GetIconGFX
ld de, $2420
ld a, $0
call Function8cfd6
lb de, $24, $20
ld a, SPRITE_ANIM_INDEX_00
call InitSpriteAnimStruct
ld hl, $2
add hl, bc
ld [hl], $0
@ -40333,8 +40336,8 @@ Function8e97d: ; 8e97d (23:697d)
call GetIconGFX
ld d, $1a
ld e, $24
ld a, $0
call Function8cfd6
ld a, SPRITE_ANIM_INDEX_00
call InitSpriteAnimStruct
ld hl, $2
add hl, bc
ld [hl], $0
@ -41468,9 +41471,9 @@ INCBIN "gfx/misc/fast_ship.2bpp"
; 90d32
Function90d32: ; 90d32 (24:4d32)
ld de, $2410
ld a, $d
call Function3b2a
lb de, $24, $10
ld a, SPRITE_ANIM_INDEX_0D
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $0
@ -41990,15 +41993,15 @@ Function9102f: ; 9102f (24:502f)
Function9106a: ; 9106a
push af
ld de, 0
ld b, $a
ld b, SPRITE_ANIM_INDEX_0A
ld a, [PlayerGender]
bit 0, a
jr z, .asm_91079
ld b, $1e
ld b, SPRITE_ANIM_INDEX_1E
.asm_91079
ld a, b
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $10
@ -42019,8 +42022,8 @@ Function9106a: ; 9106a
Function91098: ; 91098
push af
ld de, 0
ld a, $d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_0D
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $4
@ -42081,9 +42084,9 @@ Function910e8: ; 910e8
Function910f9: ; 910f9 (24:50f9)
call Function90da8
ld de, $2454
ld a, $14
call Function3b2a
lb de, $24, $54
ld a, SPRITE_ANIM_INDEX_14
call _InitSpriteAnimStruct
ld hl, $3
add hl, bc
ld [hl], $8
@ -42660,7 +42663,7 @@ Function91480: ; 91480 (24:5480)
ld [wJumptableIndex], a
ld a, b
ld [wcf64], a
call Function914ab
call DeleteSpriteAnimStruct2ToEnd
ret
Function91492: ; 91492
@ -42681,13 +42684,13 @@ Function91492: ; 91492
; 914ab
Function914ab: ; 914ab (24:54ab)
ld hl, wc314 + 16
ld bc, $90
DeleteSpriteAnimStruct2ToEnd: ; 914ab (24:54ab)
ld hl, SpriteAnim2
ld bc, wSpriteAnimationStructsEnd - SpriteAnim2
xor a
call ByteFill
ld a, $2
ld [wc3b4], a
ld a, 2
ld [wSpriteAnimCount], a
ret
Function914bb: ; 914bb (24:54bb)
@ -43160,14 +43163,14 @@ INCLUDE "data/wild/fish.asm"
INCLUDE "engine/slot_machine.asm"
SECTION "bank28", ROMX, BANK[$28]
SECTION "Phone Engine", ROMX, BANK[$28]
INCLUDE "engine/more_phone_scripts.asm"
INCLUDE "engine/buena_phone_scripts.asm"
INCLUDE "text/phone/buena.asm"
SECTION "bank29", ROMX, BANK[$29]
SECTION "Phone Text", ROMX, BANK[$29]
INCLUDE "text/phone/anthony_overworld.asm"
INCLUDE "text/phone/todd_overworld.asm"
@ -45377,9 +45380,9 @@ Functione45e8: ; e45e8
pop af
ld [rSVBK], a
callba Function8cf53
ld de, $5458
ld a, $3
call Function3b2a
lb de, $54, $58
ld a, SPRITE_ANIM_INDEX_03
call _InitSpriteAnimStruct
ld hl, $7
add hl, bc
ld [hl], $a0
@ -46057,9 +46060,9 @@ IntroScene7: ; e4b3f (39:4b3f)
ld [hWY], a
call Functione5516
callba Function8cf53
ld de, $6cd8
ld a, $26
call Function3b2a
lb de, $6c, $d8
ld a, SPRITE_ANIM_INDEX_26
call _InitSpriteAnimStruct
ld a, $f0
ld [wc3c0], a
call Functione549e
@ -46146,16 +46149,16 @@ IntroScene10: ; e4c4f (39:4c4f)
.pichu
lb de, $a9, $80
ld a, $27
call Function3b2a
ld a, SPRITE_ANIM_INDEX_27
call _InitSpriteAnimStruct
ld de, SFX_INTRO_PICHU
call PlaySFX
ret
.wooper
lb de, $b0, $30
ld a, $28
call Function3b2a
ld a, SPRITE_ANIM_INDEX_28
call _InitSpriteAnimStruct
ld de, SFX_INTRO_PICHU
call PlaySFX
ret
@ -46332,8 +46335,8 @@ IntroScene13: ; e4d6d (39:4d6d)
ld [hWY], a
callba Function8cf53
lb de, $6c, $58
ld a, $26
call Function3b2a
ld a, SPRITE_ANIM_INDEX_26
call _InitSpriteAnimStruct
ld de, MUSIC_CRYSTAL_OPENING
call PlayMusic
xor a
@ -46443,11 +46446,11 @@ IntroScene15: ; e4e40 (39:4e40)
callba Function8cf53
call Functione549e
lb de, $40, $28
ld a, $2a
call Function3b2a
ld a, SPRITE_ANIM_INDEX_2A
call _InitSpriteAnimStruct
lb de, $60, $00
ld a, $2b
call Function3b2a
ld a, SPRITE_ANIM_INDEX_2B
call _InitSpriteAnimStruct
xor a
ld [wcf64], a
ld [wcf65], a
@ -46595,8 +46598,8 @@ IntroScene19: ; e4f7e (39:4f7e)
ld [hl], $7f
call Functione549e
lb de, $60, $00
ld a, $2b
call Function3b2a
ld a, SPRITE_ANIM_INDEX_2B
call _InitSpriteAnimStruct
xor a
ld [wcf64], a
ld [wcf65], a
@ -46891,8 +46894,8 @@ Unknown_e519c: ; e519c
Functione51dc: ; e51dc (39:51dc)
push de
ld a, $29
call Function3b2a
ld a, SPRITE_ANIM_INDEX_29
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld [hl], $8
@ -46901,8 +46904,8 @@ Functione51dc: ; e51dc (39:51dc)
pop de
push de
ld a, $29
call Function3b2a
ld a, SPRITE_ANIM_INDEX_29
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld [hl], $18
@ -46911,8 +46914,8 @@ Functione51dc: ; e51dc (39:51dc)
pop de
push de
ld a, $29
call Function3b2a
ld a, SPRITE_ANIM_INDEX_29
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld [hl], $28
@ -46920,8 +46923,8 @@ Functione51dc: ; e51dc (39:51dc)
call Function3b3c
pop de
ld a, $29
call Function3b2a
ld a, SPRITE_ANIM_INDEX_29
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld [hl], $38

View File

@ -495,39 +495,39 @@ Jumptable_11c2bb: ; 11c2bb (47:42bb)
Function11c2e9: ; 11c2e9 (47:42e9)
lb de, $1a, $0d
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
lb de, $42, $0d
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $1
ld [hl], a
lb de, $4a, $10
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $3
ld [hl], a
lb de, $50, $80
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $4
ld [hl], a
lb de, $50, $20
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $5
ld [hl], a
lb de, $50, $10
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $2

View File

@ -493,13 +493,13 @@ Function10830e: ; 10830e
call DelayFrames
call Function108bec
lb de, $54, $58
ld a, $20
call Function3b2a
ld a, SPRITE_ANIM_INDEX_20
call _InitSpriteAnimStruct
ld de, SFX_BALL_POOF
call PlaySFX
hlcoord 0, 0
ld bc, $00f0
ld a, $7f
ld a, " "
call ByteFill
ld c, $50
call Function1082cc
@ -528,8 +528,8 @@ Function10839b: ; 10839b
ld a, $90
ld [hWY], a
lb de, $54, $58
ld a, $21
call Function3b2a
ld a, SPRITE_ANIM_INDEX_21
call _InitSpriteAnimStruct
call Function108b45
ld a, $1
call Function108b98
@ -628,13 +628,13 @@ Function10842c: ; 10842c
call DelayFrames
call Function108c2b
lb de, $54, $58
ld a, $20
call Function3b2a
ld a, SPRITE_ANIM_INDEX_20
call _InitSpriteAnimStruct
ld de, SFX_BALL_POOF
call PlaySFX
hlcoord 0, 0
ld bc, $00f0
ld a, $7f
ld a, " "
call ByteFill
ld c, $50
call Function1082cc
@ -672,8 +672,8 @@ Function1084d7: ; 1084d7
ld a, $90
ld [hWY], a
lb de, $54, $58
ld a, $21
call Function3b2a
ld a, SPRITE_ANIM_INDEX_21
call _InitSpriteAnimStruct
call Function108b45
ld a, $1
call Function108b98
@ -741,8 +741,8 @@ Function108589: ; 108589
ld a, $90
ld [hWY], a
lb de, $54, $58
ld a, $21
call Function3b2a
ld a, SPRITE_ANIM_INDEX_21
call _InitSpriteAnimStruct
call Function108b45
ld a, $1
call Function108b98
@ -928,8 +928,8 @@ endr
cp $f8
jr nz, .asm_10878a
lb de, $54, $58
ld a, $22
call Function3b2a
ld a, SPRITE_ANIM_INDEX_22
call _InitSpriteAnimStruct
.asm_10878a
ld c, $1
@ -954,8 +954,8 @@ endr
.asm_1087a9
lb de, $54, $58
ld a, $22
call Function3b2a
ld a, SPRITE_ANIM_INDEX_22
call _InitSpriteAnimStruct
xor a
call Function108ad4
jr .asm_1087c4
@ -986,8 +986,8 @@ Function1087cf: ; 1087cf
call Function108af4
call Function108b5a
lb de, $4a, $50
ld a, $25
call Function3b2a
ld a, SPRITE_ANIM_INDEX_25
call _InitSpriteAnimStruct
ld de, SFX_FORESIGHT
call PlaySFX
ld c, $a
@ -995,8 +995,8 @@ Function1087cf: ; 1087cf
xor a
ld [wcf64], a
lb de, $4a, $50
ld a, $23
call Function3b2a
ld a, SPRITE_ANIM_INDEX_23
call _InitSpriteAnimStruct
.asm_1087fc
ld a, [hSCY]
cp $90
@ -1022,8 +1022,8 @@ Function108811: ; 108811
ld c, $3c
call Function1082cc
lb de, $f2, $50
ld a, $24
call Function3b2a
ld a, SPRITE_ANIM_INDEX_24
call _InitSpriteAnimStruct
call Function1082b7
ld de, SFX_THROW_BALL
call PlaySFX
@ -1042,11 +1042,11 @@ Function108838: ; 108838
; 10884c
Function10884c: ; 10884c
ld c, $50
ld c, 80
call DelayFrames
lb de, $f2, $50
ld a, $24
call Function3b2a
ld a, SPRITE_ANIM_INDEX_24
call _InitSpriteAnimStruct
call Function1082b7
ld de, SFX_THROW_BALL
call PlaySFX
@ -1069,8 +1069,8 @@ Function108863: ; 108863
.asm_108879
callba Function8d03d
lb de, $4a, $50
ld a, $25
call Function3b2a
ld a, SPRITE_ANIM_INDEX_25
call _InitSpriteAnimStruct
ld de, SFX_GLASS_TING_2
call PlaySFX
call Function108af4
@ -1106,14 +1106,14 @@ endr
.asm_1088c5
lb de, $54, $58
ld a, $22
call Function3b2a
ld a, SPRITE_ANIM_INDEX_22
call _InitSpriteAnimStruct
jr .asm_1088e7
.asm_1088cf
lb de, $54, $58
ld a, $22
call Function3b2a
ld a, SPRITE_ANIM_INDEX_22
call _InitSpriteAnimStruct
xor a
call Function108ad4
jr .asm_1088e7

View File

@ -7759,14 +7759,14 @@ Function117738: ; 117738 (45:7738)
callba Function171ccd
lb de, $30, $18
ld a, $1d
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $6
ld [hl], a
lb de, $48, $20
ld a, $1d
call Function3b2a
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $7

View File

@ -1761,22 +1761,22 @@ Function171b42: ; 171b42 (5c:5b42)
Function171b4b: ; 171b4b (5c:5b4b)
lb de, $40, $10
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $8
ld [hl], a
lb de, $40, $98
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $9
ld [hl], a
lb de, $8a, $70
ld a, $1d
call Function3b2a
ld a, SPRITE_ANIM_INDEX_1D
call _InitSpriteAnimStruct
ld hl, $c
add hl, bc
ld a, $a

View File

@ -380,23 +380,50 @@ wc310:: ds 1
wc311:: ds 1
wc312:: ds 1
wc313:: ds 1
; wPartyMonMenuIconAnims::
wSpriteAnimationStructs::
sprite_anim_struct: MACRO
\1Index:: ds 1
ds 1
\1AnimSeqID:: ds 1
\1TileID:: ds 1
\1XCoord:: ds 1
\1YCoord:: ds 1
\1XOffset:: ds 1
\1YOffset:: ds 1
\1FrameTimer:: ds 1
ds 1
\1FrameIndex:: ds 1
ds 5
ENDM
; Field 0: Index
; Fields 1-3: Loaded from Unknown_8d1c4
wc314:: ds 16 ; c314
wc324:: ds 16 ; c324
wc334:: ds 16 ; c334
wc344:: ds 16 ; c344
wc354:: ds 16 ; c354
wc364:: ds 16 ; c364
wc374:: ds 16 ; c374
wc384:: ds 16 ; c384
wc394:: ds 16 ; c394
wc3a4:: ds 16 ; c3a4
; wPartyMonMenuIconAnimsEnd::
wc314::
SpriteAnim1:: sprite_anim_struct SpriteAnim1
wc324::
SpriteAnim2:: sprite_anim_struct SpriteAnim2
wc334::
SpriteAnim3:: sprite_anim_struct SpriteAnim3
wc344::
SpriteAnim4:: sprite_anim_struct SpriteAnim4
wc354::
SpriteAnim5:: sprite_anim_struct SpriteAnim5
wc364::
SpriteAnim6:: sprite_anim_struct SpriteAnim6
wc374::
SpriteAnim7:: sprite_anim_struct SpriteAnim7
wc384::
SpriteAnim8:: sprite_anim_struct SpriteAnim8
wc394::
SpriteAnim9:: sprite_anim_struct SpriteAnim9
wc3a4::
SpriteAnim10:: sprite_anim_struct SpriteAnim10
wSpriteAnimationStructsEnd::
ds -8
wc3ac:: ds 8 ; c3ac
wc3b4:: ds 1 ; something to do with wc314
wSpriteAnimCount::
wc3b4:: ds 1
wc3b5:: ds 1
CurIcon:: ; c3b6