Battle animation data is like sprite animation data

This commit is contained in:
Remy Oukaour 2017-12-26 19:27:56 -05:00
parent 35a3a19fda
commit 9bc680bd6d
6 changed files with 1197 additions and 1202 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -88,7 +88,7 @@ BattleAnimOAMUpdate: ; cca09
jp z, .delete
push af
ld hl, wBattleAnimTempOAMFlags
ld a, [wBattleAnimTemp7]
ld a, [wBattleAnimTempAddSubFlags]
xor [hl]
and $e0
ld [hl], a
@ -200,7 +200,7 @@ InitBattleAnimBuffer: ; ccaaa
and %10000000
ld [wBattleAnimTempOAMFlags], a
xor a
ld [wBattleAnimTemp7], a
ld [wBattleAnimTempAddSubFlags], a
ld hl, BATTLEANIMSTRUCT_PALETTE
add hl, bc
ld a, [hl]
@ -208,7 +208,7 @@ InitBattleAnimBuffer: ; ccaaa
ld hl, BATTLEANIMSTRUCT_02
add hl, bc
ld a, [hl]
ld [wBattleAnimTemp1], a
ld [wBattleAnimTempField02], a
ld hl, BATTLEANIMSTRUCT_TILEID
add hl, bc
ld a, [hli]
@ -239,7 +239,7 @@ InitBattleAnimBuffer: ; ccaaa
ld [wBattleAnimTempXCoord], a
ld a, [hli]
ld d, a
ld a, [wBattleAnimTemp1]
ld a, [wBattleAnimTempField02]
cp $ff
jr nz, .check_kinesis_softboiled_milkdrink
ld a, 5 * 8

View File

@ -29,10 +29,11 @@ GetBattleAnimFrame: ; ce7d1
inc [hl]
call .GetPointer
ld a, [hli]
cp -2
cp dorestart_command
jr z, .restart
cp -1
cp endanim_command
jr z, .repeat_last
push af
ld a, [hl]
push hl
@ -41,12 +42,11 @@ GetBattleAnimFrame: ; ce7d1
add hl, bc
ld [hl], a
pop hl
.okay
ld a, [hl]
and $c0
srl a
ld [wBattleAnimTemp7], a
ld [wBattleAnimTempAddSubFlags], a
pop af
ret

View File

@ -444,9 +444,9 @@ GetSpriteAnimFrame: ; 8d132
inc [hl]
call .GetPointer ; load pointer from SpriteAnimFrameData
ld a, [hli]
cp -2
cp dorestart_command
jr z, .restart
cp -1
cp endanim_command
jr z, .repeat_last
push af

View File

@ -2941,21 +2941,16 @@ wBattleAnimTemp0:: db
wBattleAnimTemp1:: db
wBattleAnimTemp2:: db
wBattleAnimTemp3:: db
wBattleAnimTemp4:: db
wBattleAnimTemp5:: db
wBattleAnimTemp6:: db
wBattleAnimTemp7:: db
wBattleAnimTemp8:: db
NEXTU ; d419
wBattleAnimTempOAMFlags:: db
ds 1
wBattleAnimTempField02:: db
wBattleAnimTempTileID:: db
wBattleAnimTempXCoord:: db
wBattleAnimTempYCoord:: db
wBattleAnimTempXOffset:: db
wBattleAnimTempYOffset:: db
ds 1
wBattleAnimTempAddSubFlags:: db
wBattleAnimTempPalette:: db
ENDU ; d422