Skip to Content
The Alchemy Project

struct BATTLE_OBJECT

A unit's place on the battlefield: its sprite object, resources and animations, its anchor spot and scale, and the conditions it shows.

Declared in battle_action.h.

Fields

NameDescription
struct MOTION_OBJECT *objectNULL once released
Uint16resourcethe unit's sprite
Uint16overlaya second sprite drawn over it; 0 for none
Uint16animationthe status icon's animation shown; 0 for none
Uint16shadowthe shadow sprite drawn under the unit
FIXEDanchorX16.16 fixed-point pixels
FIXEDanchorZ16.16 fixed-point pixels
Sint32palettethe unit sprite's colour mode, an SPR_COL_MODE
FIXEDscale16.16 fixed point, toFIXED(1) full size
Uint16activeStatusesa bit per status with an icon
Uint8selectedConditionthe status whose icon is shown
Sint8cycleTimerticks until the next status icon
struct SPR_ANIMATION *animationEntrythe status icon's sprite, or NULL
struct SPR_ANIMATION *shadowEntrythe shadow sprite, or NULL
Sint16activebtObjectMarkForRelease: released with the others
Uint8fadingset while a fallen enemy's picture is being removed
Uint8borrowed1 while a called beast borrows the object (btObjectReset), which keeps its status icons off; 0 from btObjectMake.

Description

A unit's place on the battlefield: its sprite object, resources and animations, its anchor spot and scale, and the conditions it shows.

struct BATTLE_OBJECT

Referenced by btAbilityApplyToTarget(), btAutoBattleApplyDamage(), btChangeEnemyForm(), btEffectHopBackToSpot(), btEffectRunAzul(), btEffectRunCybele(), btEffectRunDeathPlunge(), btEffectRunProcne(), btEffectSetApproachMotion(), btEffectStartActorMotion(), btEffectStartActorMotionOutward(), btEffectStartActorMotionRandomDistance(), btEffectTintBattler(), btHighlightSetSpriteMode(), btMotionApplyKnockback(), btMotionApplyPairMidpoint(), btMotionApproachTarget(), btMotionCallBeast(), btMotionDestroyAllSlotObjects(), btMotionDismissBeast(), btMotionHopBack(), btMotionLeapBack(), btMotionPlayHitFlash(), btMotionReturnObjectToSpot(), btMotionReturnToSpot(), btMotionSetupEscapeObject(), btObjectDestroySprites(), btObjectFindSlot(), btObjectGet(), btObjectMake(), btObjectMarkForRelease(), btObjectReset(), btObjectSetSpritePriority(), btObjectSpawnObjectsForList(), btObjectUpdateSpritePriorities(), btPartySwapInReserves(), btPlacementRelayoutEnemies(), btPlaybackRun(), btStagingRunAttack(), btStagingRunItem(), btStatusIconCycle(), btTransitionRun(), btUnitBuildStatusFlags(), btUnitRemoveEnemy() and mnBattlePartyChooseReserve().

Definition at line 16 of file battle_action.h.

Fields in detail

object

struct MOTION_OBJECT *object

NULL once released

resource

Uint16 resource

the unit's sprite

overlay

Uint16 overlay

a second sprite drawn over it; 0 for none

animation

Uint16 animation

the status icon's animation shown; 0 for none

shadow

Uint16 shadow

the shadow sprite drawn under the unit

anchorX

FIXED anchorX

16.16 fixed-point pixels

anchorZ

FIXED anchorZ

16.16 fixed-point pixels

palette

Sint32 palette

the unit sprite's colour mode, an SPR_COL_MODE

scale

FIXED scale

16.16 fixed point, toFIXED(1) full size

activeStatuses

Uint16 activeStatuses

a bit per status with an icon

selectedCondition

Uint8 selectedCondition

the status whose icon is shown

cycleTimer

Sint8 cycleTimer

ticks until the next status icon

animationEntry

struct SPR_ANIMATION *animationEntry

the status icon's sprite, or NULL

shadowEntry

struct SPR_ANIMATION *shadowEntry

the shadow sprite, or NULL

active

Sint16 active

btObjectMarkForRelease: released with the others

fading

Uint8 fading

set while a fallen enemy's picture is being removed

borrowed

Uint8 borrowed

1 while a called beast borrows the object (btObjectReset), which keeps its status icons off; 0 from btObjectMake.