More battle anims and bg effects

This commit is contained in:
PikalaxALT 2015-12-23 20:46:23 -05:00
parent 8152ab612c
commit d7a5ea998d
9 changed files with 992 additions and 1065 deletions

View File

@ -96,13 +96,13 @@ BattleAnimRunScript: ; cc11c
call RunBattleAnimScript call RunBattleAnimScript
.done .done
call Functioncc8f6 call BattleAnim_RevertPals
ret ret
; cc163 ; cc163
RunBattleAnimScript: ; cc163 RunBattleAnimScript: ; cc163
call Functioncc8d3 call ClearBattleAnims
.playframe .playframe
call RunBattleAnimCommand call RunBattleAnimCommand
@ -114,32 +114,32 @@ RunBattleAnimScript: ; cc163
; Speed up Rollout's animation. ; Speed up Rollout's animation.
ld a, [FXAnimIDHi] ld a, [FXAnimIDHi]
or a or a
jr nz, .asm_cc193 jr nz, .not_rollout
ld a, [FXAnimIDLo] ld a, [FXAnimIDLo]
cp ROLLOUT cp ROLLOUT
jr nz, .asm_cc193 jr nz, .not_rollout
ld a, $2e ld a, $2e
ld b, 5 ld b, 5
ld de, 4 ld de, 4
ld hl, ActiveBGEffects ld hl, ActiveBGEffects
.asm_cc18c .find
cp [hl] cp [hl]
jr z, .asm_cc196 jr z, .done
add hl, de add hl, de
dec b dec b
jr nz, .asm_cc18c jr nz, .find
.asm_cc193 .not_rollout
call BattleAnimDelayFrame call BattleAnimDelayFrame
.asm_cc196 .done
ld a, [BattleAnimFlags] ld a, [BattleAnimFlags]
bit 0, a bit 0, a
jr z, .playframe jr z, .playframe
call Functioncc23d call BattleAnim_ClearCGB_OAMFlags
ret ret
; cc1a1 ; cc1a1
@ -193,13 +193,13 @@ BattleAnimRequestPals: ; cc1e2
ld b, a ld b, a
ld a, [wBGP] ld a, [wBGP]
cp b cp b
call nz, Functioncc91a call nz, BattleAnim_SetBGPals
ld a, [rOBP0] ld a, [rOBP0]
ld b, a ld b, a
ld a, [wOBP0] ld a, [wOBP0]
cp b cp b
call nz, Functioncc94b call nz, BattleAnim_SetOBPals
ret ret
; cc1fb ; cc1fb
@ -253,11 +253,11 @@ Functioncc220: ; cc220
; cc23d ; cc23d
Functioncc23d: ; cc23d BattleAnim_ClearCGB_OAMFlags: ; cc23d
ld a, [BattleAnimFlags] ld a, [BattleAnimFlags]
bit 3, a bit 3, a
jr z, .skip jr z, .delete
ld hl, Sprites + 3 ld hl, Sprites + 3
ld c, (SpritesEnd - Sprites) / 4 ld c, (SpritesEnd - Sprites) / 4
@ -272,7 +272,7 @@ endr
jr nz, .loop jr nz, .loop
ret ret
.skip .delete
ld hl, Sprites ld hl, Sprites
ld c, SpritesEnd - Sprites ld c, SpritesEnd - Sprites
xor a xor a
@ -341,9 +341,8 @@ RunBattleAnimCommand: ; cc25f
ld e, a ld e, a
ld d, 0 ld d, 0
ld hl, BattleAnimCommands ld hl, BattleAnimCommands
rept 2
add hl, de add hl, de
endr add hl, de
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -460,19 +459,19 @@ BattleAnimCmd_Loop: ; cc348 (33:4348)
call GetBattleAnimByte call GetBattleAnimByte
ld hl, BattleAnimFlags ld hl, BattleAnimFlags
bit 2, [hl] bit 2, [hl]
jr nz, .asm_cc35b jr nz, .continue_loop
and a and a
jr z, .asm_cc363 jr z, .perpetual
dec a dec a
set 2, [hl] set 2, [hl]
ld [BattleAnimLoops], a ld [BattleAnimLoops], a
.asm_cc35b .continue_loop
ld hl, BattleAnimLoops ld hl, BattleAnimLoops
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_cc372 jr z, .return_from_loop
dec [hl] dec [hl]
.asm_cc363 .perpetual
call GetBattleAnimByte call GetBattleAnimByte
ld e, a ld e, a
call GetBattleAnimByte call GetBattleAnimByte
@ -482,26 +481,26 @@ BattleAnimCmd_Loop: ; cc348 (33:4348)
inc hl inc hl
ld [hl], d ld [hl], d
ret ret
.asm_cc372
.return_from_loop
ld hl, BattleAnimFlags ld hl, BattleAnimFlags
res 2, [hl] res 2, [hl]
ld hl, BattleAnimAddress ld hl, BattleAnimAddress
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
rept 2
inc de inc de
endr inc de
ld [hl], d ld [hl], d
dec hl dec hl
ld [hl], e ld [hl], e
ret ret
BattleAnimCmd_JumpUntil: ; cc383 (33:4383) BattleAnimCmd_JumpUntil: ; cc383 (33:4383)
ld hl, wKickCounter ld hl, wBattleAnimParam
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_cc39a jr z, .dont_jump
dec [hl] dec [hl]
call GetBattleAnimByte call GetBattleAnimByte
@ -514,14 +513,13 @@ BattleAnimCmd_JumpUntil: ; cc383 (33:4383)
ld [hl], d ld [hl], d
ret ret
.asm_cc39a .dont_jump
ld hl, BattleAnimAddress ld hl, BattleAnimAddress
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
rept 2
inc de inc de
endr inc de
ld [hl], d ld [hl], d
dec hl dec hl
ld [hl], e ld [hl], e
@ -547,9 +545,8 @@ BattleAnimCmd_JumpVar: ; cc3b2 (33:43b2)
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
rept 2
inc de inc de
endr inc de
ld [hl], d ld [hl], d
dec hl dec hl
ld [hl], e ld [hl], e
@ -568,7 +565,7 @@ endr
BattleAnimCmd_JumpIf: ; cc3d6 (33:43d6) BattleAnimCmd_JumpIf: ; cc3d6 (33:43d6)
call GetBattleAnimByte call GetBattleAnimByte
ld hl, wKickCounter ld hl, wBattleAnimParam
cp [hl] cp [hl]
jr z, .jump jr z, .jump
@ -576,9 +573,8 @@ BattleAnimCmd_JumpIf: ; cc3d6 (33:43d6)
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
rept 2
inc de inc de
endr inc de
ld [hl], d ld [hl], d
dec hl dec hl
ld [hl], e ld [hl], e
@ -598,7 +594,7 @@ endr
BattleAnimCmd_JumpAnd: ; cc3fa (33:43fa) BattleAnimCmd_JumpAnd: ; cc3fa (33:43fa)
call GetBattleAnimByte call GetBattleAnimByte
ld e, a ld e, a
ld a, [wKickCounter] ld a, [wBattleAnimParam]
and e and e
jr nz, .jump jr nz, .jump
@ -606,9 +602,8 @@ BattleAnimCmd_JumpAnd: ; cc3fa (33:43fa)
ld e, [hl] ld e, [hl]
inc hl inc hl
ld d, [hl] ld d, [hl]
rept 2
inc de inc de
endr inc de
ld [hl], d ld [hl], d
dec hl dec hl
ld [hl], e ld [hl], e
@ -697,7 +692,7 @@ BattleAnimCmd_5GFX: ; cc485 (33:4485)
ld [BattleAnimTemps], a ld [BattleAnimTemps], a
.loop .loop
ld a, [BattleAnimTemps] ld a, [BattleAnimTemps]
cp $4f cp (VTiles1 - VTiles0) / $10 - $31
ret nc ret nc
call GetBattleAnimByte call GetBattleAnimByte
ld [hli], a ld [hli], a
@ -713,7 +708,7 @@ endr
ld de, VTiles0 tile $31 ld de, VTiles0 tile $31
add hl, de add hl, de
ld a, [BattleAnimByte] ld a, [BattleAnimByte]
call Functionce846 call LoadBattleAnimObj
ld a, [BattleAnimTemps] ld a, [BattleAnimTemps]
add c add c
ld [BattleAnimTemps], a ld [BattleAnimTemps], a
@ -733,7 +728,7 @@ BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
ld d, [hl] ld d, [hl]
ld a, [BattleAnimByte] ld a, [BattleAnimByte]
cp d cp d
jr z, .increment jr z, .found
ld hl, BATTLEANIMSTRUCT_LENGTH ld hl, BATTLEANIMSTRUCT_LENGTH
add hl, bc add hl, bc
ld c, l ld c, l
@ -742,7 +737,7 @@ BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
jr nz, .loop jr nz, .loop
ret ret
.increment .found
ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX
add hl, bc add hl, bc
inc [hl] inc [hl]
@ -750,49 +745,51 @@ BattleAnimCmd_IncObj: ; cc4c0 (33:44c0)
BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3) BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3)
call GetBattleAnimByte call GetBattleAnimByte
ld e, $5 ld e, 5
ld bc, ActiveBGEffects ld bc, ActiveBGEffects
.asm_cc4eb .loop
ld hl, $0 ld hl, $0
add hl, bc add hl, bc
ld d, [hl] ld d, [hl]
ld a, [BattleAnimByte] ld a, [BattleAnimByte]
cp d cp d
jr z, .asm_cc500 jr z, .found
ld hl, $4 ld hl, 4
add hl, bc add hl, bc
ld c, l ld c, l
ld b, h ld b, h
dec e dec e
jr nz, .asm_cc4eb jr nz, .loop
ret ret
.asm_cc500
ld hl, $1 .found
ld hl, BG_EFFECT_STRUCT_JT_INDEX
add hl, bc add hl, bc
inc [hl] inc [hl]
ret ret
BattleAnimCmd_SetObj: ; cc506 (33:4506) BattleAnimCmd_SetObj: ; cc506 (33:4506)
call GetBattleAnimByte call GetBattleAnimByte
ld e, $a ld e, 10
ld bc, ActiveAnimObjects ld bc, ActiveAnimObjects
.asm_cc50e .loop
ld hl, $0 ld hl, BATTLEANIMSTRUCT_INDEX
add hl, bc add hl, bc
ld d, [hl] ld d, [hl]
ld a, [BattleAnimByte] ld a, [BattleAnimByte]
cp d cp d
jr z, .asm_cc523 jr z, .found
ld hl, $18 ld hl, BATTLEANIMSTRUCT_LENGTH
add hl, bc add hl, bc
ld c, l ld c, l
ld b, h ld b, h
dec e dec e
jr nz, .asm_cc50e jr nz, .loop
ret ret
.asm_cc523
.found
call GetBattleAnimByte call GetBattleAnimByte
ld hl, $e ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX
add hl, bc add hl, bc
ld [hl], a ld [hl], a
ret ret
@ -800,16 +797,15 @@ BattleAnimCmd_SetObj: ; cc506 (33:4506)
BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c) BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c)
ld hl, wBattleAnimTileDict ld hl, wBattleAnimTileDict
.asm_cc52f .loop
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_cc537 jr z, .okay
rept 2
inc hl inc hl
endr inc hl
jr .asm_cc52f jr .loop
.asm_cc537 .okay
ld a, $28 ld a, $28
ld [hli], a ld [hli], a
ld a, $42 ld a, $42
@ -824,48 +820,47 @@ endr
ld a, $70 ld a, $70
ld [BattleAnimTemps], a ld [BattleAnimTemps], a
ld a, $7 ld a, $7
call Functioncc561 call .LoadFootprint
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
ld a, $60 ld a, $60
ld [BattleAnimTemps], a ld [BattleAnimTemps], a
ld a, $6 ld a, $6
call Functioncc561 call .LoadFootprint
ret ret
Functioncc561: ; cc561 (33:4561) .LoadFootprint: ; cc561 (33:4561)
push af push af
push hl push hl
push de push de
ld bc, $3301 lb bc, BANK(BattleAnimCmd_EnemyFeetObj), 1
call Request2bpp call Request2bpp
pop de pop de
ld a, [BattleAnimTemps] ld a, [BattleAnimTemps]
ld l, a ld l, a
ld h, $0 ld h, 0
add hl, de add hl, de
ld e, l ld e, l
ld d, h ld d, h
pop hl pop hl
ld bc, $10 ld bc, 1 tiles
add hl, bc add hl, bc
pop af pop af
dec a dec a
jr nz, Functioncc561 jr nz, .LoadFootprint
ret ret
BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e) BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e)
ld hl, wBattleAnimTileDict ld hl, wBattleAnimTileDict
.asm_cc581 .loop
ld a, [hl] ld a, [hl]
and a and a
jr z, .asm_cc589 jr z, .okay
rept 2
inc hl inc hl
endr inc hl
jr .asm_cc581 jr .loop
.asm_cc589 .okay
ld a, $28 ld a, $28
ld [hli], a ld [hli], a
ld a, $35 ld a, $35
@ -880,33 +875,33 @@ endr
ld a, $70 ld a, $70
ld [BattleAnimTemps], a ld [BattleAnimTemps], a
ld a, $7 ld a, $7
call Functioncc5b3 call .LoadHead
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
ld a, $60 ld a, $60
ld [BattleAnimTemps], a ld [BattleAnimTemps], a
ld a, $6 ld a, $6
call Functioncc5b3 call .LoadHead
ret ret
Functioncc5b3: ; cc5b3 (33:45b3) .LoadHead: ; cc5b3 (33:45b3)
push af push af
push hl push hl
push de push de
ld bc, $3302 lb bc, BANK(BattleAnimCmd_EnemyFeetObj), 2
call Request2bpp call Request2bpp
pop de pop de
ld a, [BattleAnimTemps] ld a, [BattleAnimTemps]
ld l, a ld l, a
ld h, $0 ld h, 0
add hl, de add hl, de
ld e, l ld e, l
ld d, h ld d, h
pop hl pop hl
ld bc, $20 ld bc, 2 tiles
add hl, bc add hl, bc
pop af pop af
dec a dec a
jr nz, Functioncc5b3 jr nz, .LoadHead
ret ret
BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0) BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0)
@ -998,18 +993,18 @@ GetSubstitutePic: ; cc64c
and a and a
jr z, .player jr z, .player
ld hl, MonsterSpriteGFX ld hl, MonsterSpriteGFX + 0 tiles
ld de, sScratch + $130 ld de, sScratch + $13 tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, MonsterSpriteGFX + $10 ld hl, MonsterSpriteGFX + 1 tiles
ld de, sScratch + $1a0 ld de, sScratch + $1a tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, MonsterSpriteGFX + $20 ld hl, MonsterSpriteGFX + 2 tiles
ld de, sScratch + $140 ld de, sScratch + $14 tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, MonsterSpriteGFX + $30 ld hl, MonsterSpriteGFX + 3 tiles
ld de, sScratch + $1b0 ld de, sScratch + $1b tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, VTiles2 tile $00 ld hl, VTiles2 tile $00
ld de, sScratch ld de, sScratch
@ -1018,18 +1013,18 @@ GetSubstitutePic: ; cc64c
jr .done jr .done
.player .player
ld hl, MonsterSpriteGFX + $40 ld hl, MonsterSpriteGFX + 4 tiles
ld de, sScratch + $100 ld de, sScratch + $10 tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, MonsterSpriteGFX + $50 ld hl, MonsterSpriteGFX + 5 tiles
ld de, sScratch + $160 ld de, sScratch + $16 tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, MonsterSpriteGFX + $60 ld hl, MonsterSpriteGFX + 6 tiles
ld de, sScratch + $110 ld de, sScratch + $11 tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, MonsterSpriteGFX + $70 ld hl, MonsterSpriteGFX + 7 tiles
ld de, sScratch + $170 ld de, sScratch + $17 tiles
call CopyMonsterSpriteTile call .CopyTile
ld hl, VTiles2 tile $31 ld hl, VTiles2 tile $31
ld de, sScratch ld de, sScratch
@ -1042,8 +1037,8 @@ GetSubstitutePic: ; cc64c
ld [rSVBK], a ld [rSVBK], a
ret ret
CopyMonsterSpriteTile: ; cc6c6 (33:46c6) .CopyTile: ; cc6c6 (33:46c6)
ld bc, $10 ld bc, 1 tiles
ld a, BANK(MonsterSpriteGFX) ld a, BANK(MonsterSpriteGFX)
call FarCopyBytes call FarCopyBytes
ret ret
@ -1064,7 +1059,7 @@ BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf)
GetMinimizePic: ; cc6e7 (33:46e7) GetMinimizePic: ; cc6e7 (33:46e7)
ld hl, sScratch ld hl, sScratch
ld bc, $310 ld bc, $31 tiles
.loop .loop
xor a xor a
ld [hli], a ld [hli], a
@ -1077,7 +1072,7 @@ GetMinimizePic: ; cc6e7 (33:46e7)
and a and a
jr z, .player jr z, .player
ld de, sScratch + $1a0 ld de, sScratch + $1a tiles
call CopyMinimizePic call CopyMinimizePic
ld hl, VTiles2 tile $00 ld hl, VTiles2 tile $00
ld de, sScratch ld de, sScratch
@ -1131,11 +1126,11 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750)
and a and a
jr z, .player jr z, .player
callab Function3f486 callab DropEnemySub
jr .done jr .done
.player .player
callab Function3f447 callab DropPlayerSub
.done .done
pop af pop af
@ -1152,21 +1147,21 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
ld a, [CurPartySpecies] ; CurPartySpecies ld a, [CurPartySpecies] ; CurPartySpecies
push af push af
ld a, [wKickCounter] ld a, [wBattleAnimParam]
ld [CurPartySpecies], a ; CurPartySpecies ld [CurPartySpecies], a ; CurPartySpecies
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .player jr z, .player
ld hl, BattleMonDVs ; BattleMonDVs ld hl, BattleMonDVs
predef GetUnownLetter predef GetUnownLetter
ld de, VTiles2 tile $00 ld de, VTiles2 tile $00
predef GetFrontpic predef GetFrontpic
jr .done jr .done
.player .player
ld hl, EnemyMonDVs ; EnemyMonDVs ld hl, EnemyMonDVs
predef GetUnownLetter predef GetUnownLetter
ld de, VTiles2 tile $31 ld de, VTiles2 tile $31
predef GetBackpic predef GetBackpic
@ -1385,7 +1380,7 @@ BattleAnimAssignPals: ; cc8a4
ret ret
; cc8d3 ; cc8d3
Functioncc8d3: ; cc8d3 ClearBattleAnims: ; cc8d3
; Clear animation block ; Clear animation block
ld hl, LYOverrides ld hl, LYOverrides
ld bc, wBattleAnimEnd - LYOverrides ld bc, wBattleAnimEnd - LYOverrides
@ -1402,16 +1397,15 @@ Functioncc8d3: ; cc8d3
inc hl inc hl
ld d, [hl] ld d, [hl]
ld hl, BattleAnimations ld hl, BattleAnimations
rept 2
add hl, de add hl, de
endr add hl, de
call GetBattleAnimPointer call GetBattleAnimPointer
call BattleAnimAssignPals call BattleAnimAssignPals
call BattleAnimDelayFrame call BattleAnimDelayFrame
ret ret
; cc8f6 ; cc8f6
Functioncc8f6: ; cc8f6 BattleAnim_RevertPals: ; cc8f6
call WaitTop call WaitTop
ld a, %11100100 ld a, %11100100
ld [wBGP], a ld [wBGP], a
@ -1429,7 +1423,7 @@ Functioncc8f6: ; cc8f6
ret ret
; cc91a ; cc91a
Functioncc91a: ; cc91a BattleAnim_SetBGPals: ; cc91a
ld [rBGP], a ld [rBGP], a
ld a, [hCGB] ld a, [hCGB]
and a and a
@ -1457,7 +1451,7 @@ Functioncc91a: ; cc91a
ret ret
; cc94b ; cc94b
Functioncc94b: ; cc94b BattleAnim_SetOBPals: ; cc94b
ld [rOBP0], a ld [rOBP0], a
ld a, [hCGB] ld a, [hCGB]
and a and a
@ -1481,7 +1475,7 @@ Functioncc94b: ; cc94b
BattleAnim_UpdateOAM_All: ; cc96e BattleAnim_UpdateOAM_All: ; cc96e
ld a, $0 ld a, $0
ld [w5_d418], a ld [wBattleAnimOAMPointerLo], a
ld hl, ActiveAnimObjects ld hl, ActiveAnimObjects
ld e, 10 ld e, 10
.loop .loop
@ -1503,7 +1497,7 @@ BattleAnim_UpdateOAM_All: ; cc96e
add hl, bc add hl, bc
dec e dec e
jr nz, .loop jr nz, .loop
ld a, [w5_d418] ld a, [wBattleAnimOAMPointerLo]
ld l, a ld l, a
ld h, Sprites / $100 ld h, Sprites / $100
.loop2 .loop2

View File

@ -106,7 +106,7 @@ BattleAnimOAMUpdate: ; cca09
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld a, [w5_d418] ld a, [wBattleAnimOAMPointerLo]
ld e, a ld e, a
ld d, Sprites / $100 ld d, Sprites / $100
.loop .loop
@ -173,7 +173,7 @@ BattleAnimOAMUpdate: ; cca09
inc hl inc hl
inc de inc de
ld a, e ld a, e
ld [w5_d418], a ld [wBattleAnimOAMPointerLo], a
cp $a0 cp $a0
jr nc, .exit_set_carry jr nc, .exit_set_carry
dec c dec c
@ -620,7 +620,7 @@ GetBattleAnimOAMPointer: ; ce83c
; ce846 ; ce846
Functionce846: ; ce846 (33:6846) LoadBattleAnimObj: ; ce846 (33:6846)
push hl push hl
ld l, a ld l, a
ld h, 0 ld h, 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3762,7 +3762,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
xor a xor a
ld [wNumHits], a ld [wNumHits], a
ld [wKickCounter], a ld [wBattleAnimParam], a
call SetEnemyTurn call SetEnemyTurn
ld de, ANIM_SEND_OUT_MON ld de, ANIM_SEND_OUT_MON
call Call_PlayBattleAnim call Call_PlayBattleAnim
@ -3770,7 +3770,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
call BattleCheckEnemyShininess call BattleCheckEnemyShininess
jr nc, .not_shiny jr nc, .not_shiny
ld a, 1 ; shiny anim ld a, 1 ; shiny anim
ld [wKickCounter], a ld [wBattleAnimParam], a
ld de, ANIM_SEND_OUT_MON ld de, ANIM_SEND_OUT_MON
call Call_PlayBattleAnim call Call_PlayBattleAnim
.not_shiny .not_shiny
@ -4268,13 +4268,13 @@ SendOutPlayerMon: ; 3db5f
call SetPlayerTurn call SetPlayerTurn
xor a xor a
ld [wNumHits], a ld [wNumHits], a
ld [wKickCounter], a ld [wBattleAnimParam], a
ld de, ANIM_SEND_OUT_MON ld de, ANIM_SEND_OUT_MON
call Call_PlayBattleAnim call Call_PlayBattleAnim
call BattleCheckPlayerShininess call BattleCheckPlayerShininess
jr nc, .not_shiny jr nc, .not_shiny
ld a, $1 ld a, 1
ld [wKickCounter], a ld [wBattleAnimParam], a
ld de, ANIM_SEND_OUT_MON ld de, ANIM_SEND_OUT_MON
call Call_PlayBattleAnim call Call_PlayBattleAnim
@ -8398,7 +8398,7 @@ GetMonBackpic: ; 3f43d
ld hl, BattleAnimCmd_RaiseSub ld hl, BattleAnimCmd_RaiseSub
jr nz, GetBackpic_DoAnim ; substitute jr nz, GetBackpic_DoAnim ; substitute
Function3f447: ; 3f447 DropPlayerSub: ; 3f447
ld a, [wPlayerMinimized] ld a, [wPlayerMinimized]
and a and a
ld hl, BattleAnimCmd_MinimizeOpp ld hl, BattleAnimCmd_MinimizeOpp
@ -8434,7 +8434,7 @@ GetMonFrontpic: ; 3f47c
ld hl, BattleAnimCmd_RaiseSub ld hl, BattleAnimCmd_RaiseSub
jr nz, GetFrontpic_DoAnim jr nz, GetFrontpic_DoAnim
Function3f486: ; 3f486 DropEnemySub: ; 3f486
ld a, [wEnemyMinimized] ld a, [wEnemyMinimized]
and a and a
ld hl, BattleAnimCmd_MinimizeOpp ld hl, BattleAnimCmd_MinimizeOpp
@ -9595,7 +9595,7 @@ BattleStartMessage: ; 3fc8b
ld a, 1 ld a, 1
ld [hBattleTurn], a ld [hBattleTurn], a
ld a, 1 ld a, 1
ld [wKickCounter], a ld [wBattleAnimParam], a
ld de, ANIM_SEND_OUT_MON ld de, ANIM_SEND_OUT_MON
call Call_PlayBattleAnim call Call_PlayBattleAnim

View File

@ -5584,12 +5584,12 @@ CheckIfStatCanBeRaised: ; 361ef
StatUpAnimation: ; 36281 StatUpAnimation: ; 36281
ld bc, wPlayerMinimized ld bc, wPlayerMinimized
ld hl, Function3f447 ld hl, DropPlayerSub
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .do_player ; 0x3628a $6 jr z, .do_player ; 0x3628a $6
ld bc, wEnemyMinimized ld bc, wEnemyMinimized
ld hl, Function3f486 ld hl, DropEnemySub
.do_player .do_player
ld a, BATTLE_VARS_MOVE_ANIM ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar call GetBattleVar
@ -6174,11 +6174,11 @@ BattleCommand_RaiseSubNoAnim: ; 365af
BattleCommand_LowerSubNoAnim: ; 365c3 BattleCommand_LowerSubNoAnim: ; 365c3
ld hl, Function3f447 ld hl, DropPlayerSub
ld a, [hBattleTurn] ld a, [hBattleTurn]
and a and a
jr z, .PlayerTurn ; 365c9 $3 jr z, .PlayerTurn ; 365c9 $3
ld hl, Function3f486 ld hl, DropEnemySub
.PlayerTurn .PlayerTurn
xor a xor a
ld [hBGMapMode], a ld [hBGMapMode], a
@ -9239,13 +9239,13 @@ BattleCommand_ClearHazards: ; 37b39
BattleCommand_HealMorn: ; 37b74 BattleCommand_HealMorn: ; 37b74
; healmorn ; healmorn
ld b, MORN ld b, MORN
jr BattleCommand_HealMorn6c jr BattleCommand_TimeBasedHealContinue
; 37b78 ; 37b78
BattleCommand_HealDay: ; 37b78 BattleCommand_HealDay: ; 37b78
; healday ; healday
ld b, DAY ld b, DAY
jr BattleCommand_HealMorn6c jr BattleCommand_TimeBasedHealContinue
; 37b7c ; 37b7c
BattleCommand_HealNite: ; 37b7c BattleCommand_HealNite: ; 37b7c
@ -9254,7 +9254,7 @@ BattleCommand_HealNite: ; 37b7c
; fallthrough ; fallthrough
; 37b7e ; 37b7e
BattleCommand_HealMorn6c: ; 37b7e BattleCommand_TimeBasedHealContinue: ; 37b7e
; Time- and weather-sensitive heal. ; Time- and weather-sensitive heal.
ld hl, BattleMonMaxHP ld hl, BattleMonMaxHP
@ -9284,7 +9284,7 @@ BattleCommand_HealMorn6c: ; 37b7e
ld a, [TimeOfDay] ld a, [TimeOfDay]
cp b cp b
jr z, .Weather jr z, .Weather
dec c dec c ; double
.Weather .Weather
ld a, [Weather] ld a, [Weather]

View File

@ -3,51 +3,50 @@ AnimObjGFX: ; cfcf6
object_gfx: MACRO object_gfx: MACRO
; label, # tiles ; label, # tiles
db \2 db \1
db BANK(\1) dba \2
dw \1
ENDM ENDM
object_gfx AnimObj00GFX, 0 object_gfx 0, AnimObj00GFX
object_gfx AnimObj01GFX, 21 object_gfx 21, AnimObj01GFX
object_gfx AnimObj02GFX, 6 object_gfx 6, AnimObj02GFX
object_gfx AnimObj03GFX, 6 object_gfx 6, AnimObj03GFX
object_gfx AnimObj04GFX, 20 object_gfx 20, AnimObj04GFX
object_gfx AnimObj05GFX, 26 object_gfx 26, AnimObj05GFX
object_gfx AnimObj06GFX, 18 object_gfx 18, AnimObj06GFX
object_gfx AnimObj07GFX, 12 object_gfx 12, AnimObj07GFX
object_gfx AnimObj08GFX, 9 object_gfx 9, AnimObj08GFX
object_gfx AnimObj09GFX, 17 object_gfx 17, AnimObj09GFX
object_gfx AnimObj10GFX, 6 object_gfx 6, AnimObj10GFX
object_gfx AnimObj11GFX, 10 object_gfx 10, AnimObj11GFX
object_gfx AnimObj12GFX, 9 object_gfx 9, AnimObj12GFX
object_gfx AnimObj13GFX, 13 object_gfx 13, AnimObj13GFX
object_gfx AnimObj14GFX, 16 object_gfx 16, AnimObj14GFX
object_gfx AnimObj15GFX, 2 object_gfx 2, AnimObj15GFX
object_gfx AnimObj16GFX, 11 object_gfx 11, AnimObj16GFX
object_gfx AnimObj17GFX, 9 object_gfx 9, AnimObj17GFX
object_gfx AnimObj18GFX, 9 object_gfx 9, AnimObj18GFX
object_gfx AnimObj19GFX, 19 object_gfx 19, AnimObj19GFX
object_gfx AnimObj20GFX, 10 object_gfx 10, AnimObj20GFX
object_gfx AnimObj21GFX, 12 object_gfx 12, AnimObj21GFX
object_gfx AnimObj22GFX, 18 object_gfx 18, AnimObj22GFX
object_gfx AnimObj23GFX, 13 object_gfx 13, AnimObj23GFX
object_gfx AnimObj24GFX, 10 object_gfx 10, AnimObj24GFX
object_gfx AnimObj25GFX, 27 object_gfx 27, AnimObj25GFX
object_gfx AnimObj26GFX, 12 object_gfx 12, AnimObj26GFX
object_gfx AnimObj27GFX, 14 object_gfx 14, AnimObj27GFX
object_gfx AnimObj28GFX, 16 object_gfx 16, AnimObj28GFX
object_gfx AnimObj29GFX, 7 object_gfx 7, AnimObj29GFX
object_gfx AnimObj30GFX, 8 object_gfx 8, AnimObj30GFX
object_gfx AnimObj31GFX, 40 object_gfx 40, AnimObj31GFX
object_gfx AnimObj32GFX, 36 object_gfx 36, AnimObj32GFX
object_gfx AnimObj33GFX, 16 object_gfx 16, AnimObj33GFX
object_gfx AnimObj34GFX, 48 object_gfx 48, AnimObj34GFX
object_gfx AnimObj35GFX, 18 object_gfx 18, AnimObj35GFX
object_gfx AnimObj36GFX, 38 object_gfx 38, AnimObj36GFX
object_gfx AnimObj37GFX, 35 object_gfx 35, AnimObj37GFX
object_gfx AnimObj38GFX, 18 object_gfx 18, AnimObj38GFX
object_gfx AnimObj39GFX, 24 object_gfx 24, AnimObj39GFX
object_gfx NULL, 1 object_gfx 1, NULL
object_gfx NULL, 1 object_gfx 1, NULL
; cfd9e ; cfd9e

View File

@ -299,34 +299,60 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
ANIM_BG_FLASH_INVERTED EQU $01 const_value SET 1
ANIM_BG_FLASH_WHITE EQU $02 const ANIM_BG_FLASH_INVERTED
ANIM_BG_WHITE_HUES EQU $03 const ANIM_BG_FLASH_WHITE
ANIM_BG_BLACK_HUES EQU $04 const ANIM_BG_WHITE_HUES
ANIM_BG_ALTERNATE_HUES EQU $05 const ANIM_BG_BLACK_HUES
; ???? EQU $06 const ANIM_BG_ALTERNATE_HUES
; ???? EQU $07 const ANIM_BG_06
; ???? EQU $08 const ANIM_BG_07
ANIM_BG_HIDE_MON EQU $09 const ANIM_BG_08
ANIM_BG_SHOW_MON EQU $0a const ANIM_BG_HIDE_MON
ANIM_BG_ENTER_MON EQU $0b const ANIM_BG_SHOW_MON
ANIM_BG_RETURN_MON EQU $0c const ANIM_BG_ENTER_MON
ANIM_BG_SURF EQU $0d const ANIM_BG_RETURN_MON
ANIM_BG_WHIRLPOOL EQU $0e const ANIM_BG_SURF
ANIM_BG_TELEPORT EQU $0f const ANIM_BG_WHIRLPOOL
ANIM_BG_NIGHT_SHADE EQU $10 const ANIM_BG_TELEPORT
ANIM_BG_FEET_FOLLOW EQU $11 const ANIM_BG_NIGHT_SHADE
ANIM_BG_HEAD_FOLLOW EQU $12 const ANIM_BG_FEET_FOLLOW
ANIM_BG_DOUBLE_TEAM EQU $13 const ANIM_BG_HEAD_FOLLOW
ANIM_BG_ACID_ARMOR EQU $14 const ANIM_BG_DOUBLE_TEAM
ANIM_BG_RAPID_FLASH EQU $15 ; unused const ANIM_BG_ACID_ARMOR
const ANIM_BG_RAPID_FLASH
ANIM_BG_TACKLE EQU $24 const ANIM_BG_16
const ANIM_BG_17
ANIM_BG_PSYCHIC EQU $29 const ANIM_BG_18
const ANIM_BG_19
ANIM_BG_VIBRATE_MON EQU $33 const ANIM_BG_1A
ANIM_BG_WOBBLE_MON EQU $34 const ANIM_BG_1B
const ANIM_BG_1C
const ANIM_BG_1D
const ANIM_BG_1E
const ANIM_BG_1F
const ANIM_BG_20
const ANIM_BG_21
const ANIM_BG_22
const ANIM_BG_23
const ANIM_BG_TACKLE
const ANIM_BG_25
const ANIM_BG_26
const ANIM_BG_27
const ANIM_BG_28
const ANIM_BG_PSYCHIC
const ANIM_BG_2A
const ANIM_BG_2B
const ANIM_BG_2C
const ANIM_BG_2D
const ANIM_BG_2E
const ANIM_BG_2F
const ANIM_BG_30
const ANIM_BG_31
const ANIM_BG_32
const ANIM_BG_VIBRATE_MON
const ANIM_BG_WOBBLE_MON
const ANIM_BG_35
const_def const_def
const ANIM_MON_SLOW ; 0 const ANIM_MON_SLOW ; 0
@ -338,3 +364,9 @@ ANIM_BG_WOBBLE_MON EQU $34
const ANIM_MON_UNUSED ; 6 const ANIM_MON_UNUSED ; 6
const ANIM_MON_EGG1 ; 7 const ANIM_MON_EGG1 ; 7
const ANIM_MON_EGG2 ; 8 const ANIM_MON_EGG2 ; 8
const_def
const BG_EFFECT_STRUCT_FUNCTION
const BG_EFFECT_STRUCT_JT_INDEX
const BG_EFFECT_STRUCT_02
const BG_EFFECT_STRUCT_03

View File

@ -755,6 +755,7 @@ EnemyDamageTaken:: ; c684
ds 2 ds 2
wBattleReward:: ds 3 wBattleReward:: ds 3
wBattleAnimParam::
wKickCounter:: wKickCounter::
wPresentPower:: ds 1 wPresentPower:: ds 1
wc68a:: wc68a::
@ -3317,10 +3318,22 @@ AnimObject09:: battle_anim_struct AnimObject09
AnimObject10:: battle_anim_struct AnimObject10 AnimObject10:: battle_anim_struct AnimObject10
ActiveAnimObjectsEnd:: ; d3aa ActiveAnimObjectsEnd:: ; d3aa
ActiveBGEffects:: ; d3fa battle_bg_effect: MACRO
ds 4 * 5 \1_Function:: ds 1
\1_01:: ds 1
\1_02:: ds 1
\1_03:: ds 1
endm
wNumActiveBattleAnims:: ds 1 ActiveBGEffects:: ; d3fa
BGEffect1:: battle_bg_effect BGEffect1
BGEffect2:: battle_bg_effect BGEffect2
BGEffect3:: battle_bg_effect BGEffect3
BGEffect4:: battle_bg_effect BGEffect4
BGEffect5:: battle_bg_effect BGEffect5
ActiveBGEffectsEnd::
wNumActiveBattleAnims:: ds 1 ; d40e
BattleAnimFlags:: ; d40f BattleAnimFlags:: ; d40f
ds 1 ds 1
@ -3336,14 +3349,12 @@ BattleAnimVar:: ; d416
ds 1 ds 1
BattleAnimByte:: ; d417 BattleAnimByte:: ; d417
ds 1 ds 1
w5_d418:: ds 1 wBattleAnimOAMPointerLo:: ds 1 ; d418
BattleAnimTemps:: ; d419 BattleAnimTemps:: ; d419
ds 8 ds 8
ds 1 ds 1
w5_d422:: ds $32 w5_d422:: ds $32
wBattleAnimEnd:: wBattleAnimEnd::
ds $e
; d462
SECTION "WRAM 5 MOBILE", WRAMX [$d800], BANK [5] SECTION "WRAM 5 MOBILE", WRAMX [$d800], BANK [5]
w5_d800:: ds $200 w5_d800:: ds $200