Alchemy
Loading...
Searching...
No Matches

BattleEffectWork Struct Reference

The running battle effect's work: its canvas image, 64 particles, the display registers it stages and its animation objects. More...

#include <battle/battle_effect_work.h>

Data Structures

union  [union].__unnamed0__
 Images and scanline tables reuse the storage before the particles. More...

Data Fields

union  
struct EffectStep particles [64]
 free while variant is -1
s32 transferMode
 How the canvas transfer callbacks treat the canvas after each copy (enum CanvasTransferMode in effect_internal.h).
s32 transferValue
 The transfer mode's argument: the fill value, the share kept (50 or 75 percent) or the darken or brighten amount.
s32 unk_7788
 not named by TBS code
s32 frame
 frame counter some effects keep, from 0
s32 scrollTimer
 frames since the last interval scroll step
s32 scrollInterval
 frames between interval scroll steps
s32 scrollStepX
 added to BG1 or BG2 x at each step
s32 scrollStepY
 added to BG1 or BG2 y at each step
s32 savedBg1X
 BG1 scroll restored when a shake ends.
s32 savedBg1Y
 BG1 scroll restored when a shake ends.
s32 shakeFrames
 shake frames left; Camera_ApplyShake counts down
s32 cameraDelta
 camera yaw turned per effect frame
s32 cameraPhase
 The effect sets 1 after a frame; Camera_ApplyPhasedDelta then turns the whole cameraDelta and sets 0, else turns half and toggles 0 and 2.
s32 fadeFrames
 backdrop fade frames left (Palette_StepFadeTransfer)
s32 fadeStep
 CANVAS_FADE_STEPs the backdrop has darkened so far.
u16 unk_77ce
 not named by TBS code
struct AnimationObject * objects [16]
 the effect's animation objects
u8 actorTimers [8]
 Each target's flash timer in frames, for effect->actors[n]: set by ObjectGroup_UpdateMembers, counted down by ObjectGroup_TickMemberTimers.
s32 framesSinceTransfer
 1 on a canvas copy's frame, then counts up
s32 transferPending
 1 once the effect has drawn a frame (EFFECT_PRESENT_FRAME); the canvas transfer callback copies the canvas and clears it.
struct BattleEffectArgument * effect
 the command being run
u16 win0h
 Window, display and blend registers, which Graphics_ApplyWindowBlendRegisters writes all at once.
u16 win0v
u16 win1h
u16 win1v
u16 winin
u16 winout
u16 dispcnt
u16 bldcnt
u16 bldalpha
s32 bg2x
 BG2's reference point, written to BG2X and BG2Y by Display_ApplyBg2Reference and BattleFx_AdvanceBg2OnInterval.
s32 bg2y

Detailed Description

The running battle effect's work: its canvas image, 64 particles, the display registers it stages and its animation objects.

It lives in the HEAP_SLOT_BATTLE_EFFECT work slot.

Definition at line 29 of file battle_effect_work.h.

Field Documentation

◆ @063340350041021170222174243340023202240024066077

◆ particles

struct EffectStep BattleEffectWork::particles[64]

free while variant is -1

Definition at line 45 of file battle_effect_work.h.

Referenced by BattleFx_RunAnnihilation(), BattleFx_RunAstralBlast(), BattleFx_RunAtalanta(), BattleFx_RunBeamSequence(), BattleFx_RunBind(), BattleFx_RunBladeRain(), BattleFx_RunBolt(), BattleFx_RunBoreas(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCurse(), BattleFx_RunCybele(), BattleFx_RunDjinniEntrance(), BattleFx_RunDouse(), BattleFx_RunDragonCloud(), BattleFx_RunElementBurst(), BattleFx_RunEruption(), BattleFx_RunFlare(), BattleFx_RunFrost(), BattleFx_RunFroth(), BattleFx_RunGaia(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunIce(), BattleFx_RunImpactBurst(), BattleFx_RunJudgment(), BattleFx_RunJupiter(), BattleFx_RunKirin(), BattleFx_RunMars(), BattleFx_RunMercury(), BattleFx_RunNeptune(), BattleFx_RunNereid(), BattleFx_RunOrbitingSkulls(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPrism(), BattleFx_RunProcne(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRamses(), BattleFx_RunRingAndSparkScene(), BattleFx_RunRushingStrike(), BattleFx_RunShatteringOpening(), BattleFx_RunShiningStar(), BattleFx_RunSparkGroups(), BattleFx_RunSpire(), BattleFx_RunStreakVolley(), BattleFx_RunTargetBursts(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunTitanBlade(), BattleFx_RunTriangleStrike(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), BattleFx_RunWhirlwind(), LuckyDice_Run(), ReelGame_InitTitle(), and ReelGame_RunFrame().

◆ transferMode

◆ transferValue

◆ unk_7788

s32 BattleEffectWork::unk_7788

not named by TBS code

Definition at line 52 of file battle_effect_work.h.

◆ frame

s32 BattleEffectWork::frame

frame counter some effects keep, from 0

Definition at line 53 of file battle_effect_work.h.

Referenced by BattleFx_DrawStreaks(), BattleFx_PlayUnitElementEffect(), BattleFx_RunAstralBlast(), BattleFx_RunAtalanta(), BattleFx_RunBind(), BattleFx_RunBolt(), BattleFx_RunBoreas(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCybele(), BattleFx_RunDjinnBeams(), BattleFx_RunDouse(), BattleFx_RunDragonCloud(), BattleFx_RunElementBurst(), BattleFx_RunElementPillar(), BattleFx_RunFire(), BattleFx_RunFlare(), BattleFx_RunFlashingStrike(), BattleFx_RunFrost(), BattleFx_RunGatheringLights(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunHaunt(), BattleFx_RunHealingMotes(), BattleFx_RunIce(), BattleFx_RunLobbedShells(), BattleFx_RunMercury(), BattleFx_RunNeptune(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunProcne(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunShatteringOpening(), BattleFx_RunShiningStar(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunStatBoost(), BattleFx_RunStatReduction(), BattleFx_RunTargetBursts(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTorch(), BattleFx_RunTriangleStrike(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), BattleFx_StartElementStreaks(), ReelGame_Run(), and ReelGame_RunFrame().

◆ scrollTimer

s32 BattleEffectWork::scrollTimer

◆ scrollInterval

s32 BattleEffectWork::scrollInterval

◆ scrollStepX

s32 BattleEffectWork::scrollStepX

◆ scrollStepY

s32 BattleEffectWork::scrollStepY

◆ savedBg1X

s32 BattleEffectWork::savedBg1X

BG1 scroll restored when a shake ends.

Definition at line 58 of file battle_effect_work.h.

Referenced by BattleFx_BeginCanvasLayer(), BattleFx_EndCanvasLayer(), BattleFx_RunShatteringOpening(), and Camera_ApplyShake().

◆ savedBg1Y

s32 BattleEffectWork::savedBg1Y

BG1 scroll restored when a shake ends.

Definition at line 59 of file battle_effect_work.h.

Referenced by BattleFx_BeginCanvasLayer(), BattleFx_EndCanvasLayer(), BattleFx_RunShatteringOpening(), and Camera_ApplyShake().

◆ shakeFrames

s32 BattleEffectWork::shakeFrames

shake frames left; Camera_ApplyShake counts down

Definition at line 60 of file battle_effect_work.h.

Referenced by BattleFx_BeginCanvasLayer(), BattleFx_RunAnnihilation(), BattleFx_RunAstralBlast(), BattleFx_RunAtalanta(), BattleFx_RunBladeRain(), BattleFx_RunBolt(), BattleFx_RunBoreas(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCybele(), BattleFx_RunDeathPlunge(), BattleFx_RunDragonCloud(), BattleFx_RunEruption(), BattleFx_RunFire(), BattleFx_RunFlashingStrike(), BattleFx_RunFroth(), BattleFx_RunGaia(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunHail(), BattleFx_RunHelmSplitter(), BattleFx_RunIce(), BattleFx_RunJupiter(), BattleFx_RunKirin(), BattleFx_RunMars(), BattleFx_RunMercury(), BattleFx_RunMirroredWall(), BattleFx_RunNeptune(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlanetDiver(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunProcne(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunRushingStrike(), BattleFx_RunShiningStar(), BattleFx_RunSparkGroups(), BattleFx_RunSpire(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlSwipe(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), BattleFx_RunWhirlwind(), and Camera_ApplyShake().

◆ cameraDelta

s32 BattleEffectWork::cameraDelta

camera yaw turned per effect frame

Definition at line 61 of file battle_effect_work.h.

Referenced by BattleFx_RunFire(), BattleFx_RunFroth(), and Camera_ApplyPhasedDelta().

◆ cameraPhase

s32 BattleEffectWork::cameraPhase

The effect sets 1 after a frame; Camera_ApplyPhasedDelta then turns the whole cameraDelta and sets 0, else turns half and toggles 0 and 2.

Definition at line 64 of file battle_effect_work.h.

Referenced by BattleFx_RunFire(), BattleFx_RunFroth(), and Camera_ApplyPhasedDelta().

◆ fadeFrames

◆ fadeStep

◆ win0h

u16 BattleEffectWork::win0h

Window, display and blend registers, which Graphics_ApplyWindowBlendRegisters writes all at once.

Definition at line 70 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ win0v

u16 BattleEffectWork::win0v

Definition at line 71 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ win1h

u16 BattleEffectWork::win1h

Definition at line 72 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ win1v

u16 BattleEffectWork::win1v

Definition at line 73 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ winin

u16 BattleEffectWork::winin

Definition at line 74 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ winout

u16 BattleEffectWork::winout

Definition at line 75 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ dispcnt

u16 BattleEffectWork::dispcnt

Definition at line 76 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ bldcnt

u16 BattleEffectWork::bldcnt

Definition at line 77 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ bldalpha

u16 BattleEffectWork::bldalpha

Definition at line 78 of file battle_effect_work.h.

Referenced by Graphics_ApplyWindowBlendRegisters().

◆ unk_77ce

u16 BattleEffectWork::unk_77ce

not named by TBS code

Definition at line 80 of file battle_effect_work.h.

◆ bg2x

s32 BattleEffectWork::bg2x

BG2's reference point, written to BG2X and BG2Y by Display_ApplyBg2Reference and BattleFx_AdvanceBg2OnInterval.

Definition at line 84 of file battle_effect_work.h.

Referenced by BattleFx_AdvanceBg2OnInterval(), BattleFx_RunParticleStreams(), and Display_ApplyBg2Reference().

◆ bg2y

s32 BattleEffectWork::bg2y

◆ objects

◆ actorTimers

u8 BattleEffectWork::actorTimers[8]

Each target's flash timer in frames, for effect->actors[n]: set by ObjectGroup_UpdateMembers, counted down by ObjectGroup_TickMemberTimers.

Definition at line 90 of file battle_effect_work.h.

Referenced by BattleFx_ClearActorTimers(), ObjectGroup_TickMemberTimers(), and ObjectGroup_UpdateMembers().

◆ framesSinceTransfer

s32 BattleEffectWork::framesSinceTransfer

1 on a canvas copy's frame, then counts up

Definition at line 91 of file battle_effect_work.h.

Referenced by BattleFx_ProcessPendingGraphicsTransfer(), and ReelGame_TransferCanvas().

◆ transferPending

s32 BattleEffectWork::transferPending

1 once the effect has drawn a frame (EFFECT_PRESENT_FRAME); the canvas transfer callback copies the canvas and clears it.

Definition at line 94 of file battle_effect_work.h.

Referenced by BattleFx_DrawStreaks(), BattleFx_FlushPendingGraphicsTransfer(), BattleFx_ProcessPendingGraphicsTransfer(), BattleFx_RunSpiderWeb(), BattleFx_RunTorch(), and ReelGame_TransferCanvas().

◆ effect

struct BattleEffectArgument* BattleEffectWork::effect

the command being run

Definition at line 95 of file battle_effect_work.h.

Referenced by BattleFx_ProbeKeysForExtendedActor(), BattleFx_RunAcidBlessing(), BattleFx_RunAnnihilation(), BattleFx_RunAstralBlast(), BattleFx_RunAtalanta(), BattleFx_RunBeamSequence(), BattleFx_RunBind(), BattleFx_RunBladeRain(), BattleFx_RunBolt(), BattleFx_RunBoreas(), BattleFx_RunBreak(), BattleFx_RunBurstScene(), BattleFx_RunBurstShower(), BattleFx_RunCastingImpact(), BattleFx_RunCondemn(), BattleFx_RunCurse(), BattleFx_RunCybele(), BattleFx_RunDarkBlessing(), BattleFx_RunDeadlyGas(), BattleFx_RunDeathPlunge(), BattleFx_RunDjinnBeams(), BattleFx_RunDjinnHeal(), BattleFx_RunDjinniEntrance(), BattleFx_RunDouse(), BattleFx_RunDragonCloud(), BattleFx_RunDrain(), BattleFx_RunElementBurst(), BattleFx_RunElementPillar(), BattleFx_RunEruption(), BattleFx_RunEvilBlessing(), BattleFx_RunFire(), BattleFx_RunFireBlessing(), BattleFx_RunFlare(), BattleFx_RunFlashingStrike(), BattleFx_RunFrost(), BattleFx_RunFroth(), BattleFx_RunGaia(), BattleFx_RunGatheringLights(), BattleFx_RunGround(), BattleFx_RunGrowingColumns(), BattleFx_RunHail(), BattleFx_RunHaunt(), BattleFx_RunHealingMotes(), BattleFx_RunHelmSplitter(), BattleFx_RunIce(), BattleFx_RunJudgment(), BattleFx_RunJupiter(), BattleFx_RunKirin(), BattleFx_RunKite(), BattleFx_RunLobbedShells(), BattleFx_RunMars(), BattleFx_RunMercury(), BattleFx_RunMeteor(), BattleFx_RunMirroredWall(), BattleFx_RunMoteFountain(), BattleFx_RunNeptune(), BattleFx_RunNereid(), BattleFx_RunOrbitingSkulls(), BattleFx_RunOrbitingSpirals(), BattleFx_RunOuterSpace(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunPlanetDiver(), BattleFx_RunPlasma(), BattleFx_RunPrism(), BattleFx_RunProcne(), BattleFx_RunProjectileVolley(), BattleFx_RunQuake(), BattleFx_RunRagnarok(), BattleFx_RunRamses(), BattleFx_RunRay(), BattleFx_RunRingAndSparkScene(), BattleFx_RunRushingStrike(), BattleFx_RunShatteringOpening(), BattleFx_RunShiningStar(), BattleFx_RunSleep(), BattleFx_RunSparkGroups(), BattleFx_RunSpiderWeb(), BattleFx_RunSpire(), BattleFx_RunStatBoost(), BattleFx_RunStatReduction(), BattleFx_RunStormBlessing(), BattleFx_RunStreakVolley(), BattleFx_RunSwirlingStars(), BattleFx_RunSwirlSwipe(), BattleFx_RunTableEffect(), BattleFx_RunTargetBursts(), BattleFx_RunTargetMotes(), BattleFx_RunTargetStrike(), BattleFx_RunThor(), BattleFx_RunThorn(), BattleFx_RunTitanBlade(), BattleFx_RunTorch(), BattleFx_RunTriangleStrike(), BattleFx_RunUndeadSword(), BattleFx_RunVenus(), BattleFx_RunVine(), BattleFx_RunVolcano(), BattleFx_RunWaterBlessing(), BattleFx_RunWhirlwind(), BattleFx_SelectLivingTargets(), CastingImpact_EndPrelude(), and ObjectGroup_TickMemberTimers().