mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Identified another user of wBattleAnimTemp
QueueBattleAnimation loads an object using these wram addresses. Usually populated by the anim_obj command, but in a couple of cases also manually.
This commit is contained in:
parent
2746288030
commit
41f39211ca
@ -595,13 +595,13 @@ BattleAnimCmd_IfParamAnd:
|
||||
BattleAnimCmd_Obj:
|
||||
; index, x, y, param
|
||||
call GetBattleAnimByte
|
||||
ld [wBattleAnimTemp0], a
|
||||
ld [wBattleObjectTempID], a
|
||||
call GetBattleAnimByte
|
||||
ld [wBattleAnimTemp1], a
|
||||
ld [wBattleObjectTempXCoord], a
|
||||
call GetBattleAnimByte
|
||||
ld [wBattleAnimTemp2], a
|
||||
ld [wBattleObjectTempYCoord], a
|
||||
call GetBattleAnimByte
|
||||
ld [wBattleAnimTemp3], a
|
||||
ld [wBattleObjectTemp0b], a
|
||||
call QueueBattleAnimation
|
||||
ret
|
||||
|
||||
|
@ -427,20 +427,20 @@ BattleBGEffect_FeetFollow:
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn
|
||||
ld a, ANIM_OBJ_PLAYERFEETFOLLOW
|
||||
ld [wBattleAnimTemp0], a
|
||||
ld a, 16 * 8 + 4
|
||||
ld [wBattleObjectTempID], a
|
||||
ld a, 16 * TILE_WIDTH + 4
|
||||
jr .okay
|
||||
|
||||
.player_turn
|
||||
ld a, ANIM_OBJ_ENEMYFEETFOLLOW
|
||||
ld [wBattleAnimTemp0], a
|
||||
ld a, 6 * 8
|
||||
ld [wBattleObjectTempID], a
|
||||
ld a, 6 * TILE_WIDTH
|
||||
.okay
|
||||
ld [wBattleAnimTemp1], a
|
||||
ld a, 8 * 8
|
||||
ld [wBattleAnimTemp2], a
|
||||
ld [wBattleObjectTempXCoord], a
|
||||
ld a, 8 * TILE_WIDTH
|
||||
ld [wBattleObjectTempYCoord], a
|
||||
xor a
|
||||
ld [wBattleAnimTemp3], a
|
||||
ld [wBattleObjectTemp0b], a
|
||||
call _QueueBattleAnimation
|
||||
pop bc
|
||||
ret
|
||||
@ -494,20 +494,20 @@ BattleBGEffect_HeadFollow:
|
||||
call BGEffect_CheckBattleTurn
|
||||
jr nz, .player_turn
|
||||
ld a, ANIM_OBJ_PLAYERHEADFOLLOW
|
||||
ld [wBattleAnimTemp0], a
|
||||
ld a, 16 * 8 + 4
|
||||
ld [wBattleObjectTempID], a
|
||||
ld a, 16 * TILE_WIDTH + 4
|
||||
jr .okay
|
||||
|
||||
.player_turn
|
||||
ld a, ANIM_OBJ_ENEMYHEADFOLLOW
|
||||
ld [wBattleAnimTemp0], a
|
||||
ld a, 6 * 8
|
||||
ld [wBattleObjectTempID], a
|
||||
ld a, 6 * TILE_WIDTH
|
||||
.okay
|
||||
ld [wBattleAnimTemp1], a
|
||||
ld a, 8 * 8
|
||||
ld [wBattleAnimTemp2], a
|
||||
ld [wBattleObjectTempXCoord], a
|
||||
ld a, 8 * TILE_WIDTH
|
||||
ld [wBattleObjectTempYCoord], a
|
||||
xor a
|
||||
ld [wBattleAnimTemp3], a
|
||||
ld [wBattleObjectTemp0b], a
|
||||
call _QueueBattleAnimation
|
||||
pop bc
|
||||
ret
|
||||
|
@ -27,7 +27,7 @@ DeinitBattleAnimation:
|
||||
ret
|
||||
|
||||
InitBattleAnimation:
|
||||
ld a, [wBattleAnimTemp0]
|
||||
ld a, [wBattleObjectTempID]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, BattleAnimObjects
|
||||
@ -58,14 +58,14 @@ endr
|
||||
ld a, [de]
|
||||
call GetBattleAnimTileOffset
|
||||
ld [hli], a ; Tile ID
|
||||
ld a, [wBattleAnimTemp1]
|
||||
ld a, [wBattleObjectTempXCoord]
|
||||
ld [hli], a ; X Coord
|
||||
ld a, [wBattleAnimTemp2]
|
||||
ld a, [wBattleObjectTempYCoord]
|
||||
ld [hli], a ; Y Coord
|
||||
xor a
|
||||
ld [hli], a ; X Offset
|
||||
ld [hli], a ; Y Offset
|
||||
ld a, [wBattleAnimTemp3]
|
||||
ld a, [wBattleObjectTemp0b]
|
||||
ld [hli], a ; 0b
|
||||
xor a
|
||||
ld [hli], a ; 0c
|
||||
|
Loading…
Reference in New Issue
Block a user