Identify wBattleAnimTemp0-3

This commit is contained in:
Rangi
2020-11-09 15:05:14 -05:00
parent 62b756c46e
commit 03e149e559
5 changed files with 145 additions and 136 deletions

View File

@ -814,7 +814,7 @@ BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture
const BG_EFFECT_STRUCT_FUNCTION const BG_EFFECT_STRUCT_FUNCTION
const BG_EFFECT_STRUCT_JT_INDEX const BG_EFFECT_STRUCT_JT_INDEX
const BG_EFFECT_STRUCT_BATTLE_TURN const BG_EFFECT_STRUCT_BATTLE_TURN
const BG_EFFECT_STRUCT_03 const BG_EFFECT_STRUCT_PARAM
BG_EFFECT_STRUCT_LENGTH EQU const_value BG_EFFECT_STRUCT_LENGTH EQU const_value
NUM_BG_EFFECTS EQU 5 ; see wActiveBGEffects NUM_BG_EFFECTS EQU 5 ; see wActiveBGEffects

View File

@ -611,13 +611,13 @@ BattleAnimCmd_Obj:
BattleAnimCmd_BGEffect: BattleAnimCmd_BGEffect:
call GetBattleAnimByte call GetBattleAnimByte
ld [wBattleAnimTemp0], a ld [wBattleBGEffectTempID], a
call GetBattleAnimByte call GetBattleAnimByte
ld [wBattleAnimTemp1], a ld [wBattleBGEffectTempJumptableIndex], a
call GetBattleAnimByte call GetBattleAnimByte
ld [wBattleAnimTemp2], a ld [wBattleBGEffectTempTurn], a
call GetBattleAnimByte call GetBattleAnimByte
ld [wBattleAnimTemp3], a ld [wBattleBGEffectTempParam], a
call _QueueBGEffect call _QueueBGEffect
ret ret
@ -667,14 +667,14 @@ BattleAnimCmd_5GFX:
ld c, a ld c, a
ld hl, wBattleAnimTileDict ld hl, wBattleAnimTileDict
xor a xor a
ld [wBattleAnimTemp0], a ld [wBattleAnimGFXTempTileID], a
.loop .loop
ld a, [wBattleAnimTemp0] ld a, [wBattleAnimGFXTempTileID]
cp (vTiles1 - vTiles0) / LEN_2BPP_TILE - BATTLEANIM_BASE_TILE cp (vTiles1 - vTiles0) / LEN_2BPP_TILE - BATTLEANIM_BASE_TILE
ret nc ret nc
call GetBattleAnimByte call GetBattleAnimByte
ld [hli], a ld [hli], a
ld a, [wBattleAnimTemp0] ld a, [wBattleAnimGFXTempTileID]
ld [hli], a ld [hli], a
push bc push bc
push hl push hl
@ -687,9 +687,9 @@ endr
add hl, de add hl, de
ld a, [wBattleAnimByte] ld a, [wBattleAnimByte]
call LoadBattleAnimGFX call LoadBattleAnimGFX
ld a, [wBattleAnimTemp0] ld a, [wBattleAnimGFXTempTileID]
add c add c
ld [wBattleAnimTemp0], a ld [wBattleAnimGFXTempTileID], a
pop hl pop hl
pop bc pop bc
dec c dec c
@ -795,12 +795,12 @@ BattleAnimCmd_BattlerGFX_1Row:
ld hl, vTiles0 tile ($80 - 6 - 7) ld hl, vTiles0 tile ($80 - 6 - 7)
ld de, vTiles2 tile $06 ; Enemy feet start tile ld de, vTiles2 tile $06 ; Enemy feet start tile
ld a, 7 tiles ; Enemy pic height ld a, 7 tiles ; Enemy pic height
ld [wBattleAnimTemp0], a ld [wBattleAnimGFXTempPicHeight], a
ld a, 7 ; Copy 7x1 tiles ld a, 7 ; Copy 7x1 tiles
call .LoadFeet call .LoadFeet
ld de, vTiles2 tile $31 ; Player head start tile ld de, vTiles2 tile $31 ; Player head start tile
ld a, 6 tiles ; Player pic height ld a, 6 tiles ; Player pic height
ld [wBattleAnimTemp0], a ld [wBattleAnimGFXTempPicHeight], a
ld a, 6 ; Copy 6x1 tiles ld a, 6 ; Copy 6x1 tiles
call .LoadFeet call .LoadFeet
ret ret
@ -812,7 +812,7 @@ BattleAnimCmd_BattlerGFX_1Row:
lb bc, BANK(@), 1 lb bc, BANK(@), 1
call Request2bpp call Request2bpp
pop de pop de
ld a, [wBattleAnimTemp0] ld a, [wBattleAnimGFXTempPicHeight]
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, de add hl, de
@ -849,12 +849,12 @@ BattleAnimCmd_BattlerGFX_2Row:
ld hl, vTiles0 tile ($80 - 6 * 2 - 7 * 2) ld hl, vTiles0 tile ($80 - 6 * 2 - 7 * 2)
ld de, vTiles2 tile $05 ; Enemy feet start tile ld de, vTiles2 tile $05 ; Enemy feet start tile
ld a, 7 tiles ; Enemy pic height ld a, 7 tiles ; Enemy pic height
ld [wBattleAnimTemp0], a ld [wBattleAnimGFXTempPicHeight], a
ld a, 7 ; Copy 7x2 tiles ld a, 7 ; Copy 7x2 tiles
call .LoadHead call .LoadHead
ld de, vTiles2 tile $31 ; Player head start tile ld de, vTiles2 tile $31 ; Player head start tile
ld a, 6 tiles ; Player pic height ld a, 6 tiles ; Player pic height
ld [wBattleAnimTemp0], a ld [wBattleAnimGFXTempPicHeight], a
ld a, 6 ; Copy 6x2 tiles ld a, 6 ; Copy 6x2 tiles
call .LoadHead call .LoadHead
ret ret
@ -866,7 +866,7 @@ BattleAnimCmd_BattlerGFX_2Row:
lb bc, BANK(@), 2 lb bc, BANK(@), 2
call Request2bpp call Request2bpp
pop de pop de
ld a, [wBattleAnimTemp0] ld a, [wBattleAnimGFXTempPicHeight]
ld l, a ld l, a
ld h, 0 ld h, 0
add hl, de add hl, de

File diff suppressed because it is too large Load Diff

View File

@ -386,8 +386,8 @@ battle_anim_struct: MACRO
ENDM ENDM
battle_bg_effect: MACRO battle_bg_effect: MACRO
\1Function:: db \1Function:: db
\1Field01:: ds 1 \1JumptableIndex:: db
\1Field02:: ds 1 \1BattleTurn:: db
\1Field03:: ds 1 \1Param:: db
ENDM ENDM

View File

@ -3337,18 +3337,17 @@ wBattleAnimByte:: db
wBattleAnimOAMPointerLo:: db wBattleAnimOAMPointerLo:: db
UNION UNION
; unidentified
wBattleAnimTemp0:: db
wBattleAnimTemp1:: db
wBattleAnimTemp2:: db
wBattleAnimTemp3:: db
NEXTU
wBattleObjectTempID:: db wBattleObjectTempID:: db
wBattleObjectTempXCoord:: db wBattleObjectTempXCoord:: db
wBattleObjectTempYCoord:: db wBattleObjectTempYCoord:: db
wBattleObjectTempParam:: db wBattleObjectTempParam:: db
NEXTU
wBattleBGEffectTempID:: db
wBattleBGEffectTempJumptableIndex:: db
wBattleBGEffectTempTurn:: db
wBattleBGEffectTempParam:: db
NEXTU NEXTU
wBattleAnimTempOAMFlags:: db wBattleAnimTempOAMFlags:: db
wBattleAnimTempFixY:: db wBattleAnimTempFixY:: db
@ -3359,6 +3358,20 @@ wBattleAnimTempXOffset:: db
wBattleAnimTempYOffset:: db wBattleAnimTempYOffset:: db
wBattleAnimTempFrameOAMFlags:: db wBattleAnimTempFrameOAMFlags:: db
wBattleAnimTempPalette:: db wBattleAnimTempPalette:: db
NEXTU
wBattleAnimGFXTempTileID::
wBattleAnimGFXTempPicHeight:: db
NEXTU
wBattleSineWaveTempProgress:: db
wBattleSineWaveTempOffset:: db
wBattleSineWaveTempAmplitude:: db
wBattleSineWaveTempTimer:: db
NEXTU
wBattlePicResizeTempBaseTileID:: db
wBattlePicResizeTempPointer:: dw
ENDU ENDU
UNION UNION