struct MOTION_OBJECT
An effect object that moves and draws one sprite: its position, scale, velocity and target, and its per-tick update. More…
Declared in battle_actor.h.
Fields
| Name | Description | |
|---|---|---|
const Sint32 * | script | The object script it runs; null when it is free. |
Sint16 | scriptCursor | The script cursor, in words. |
Uint16 | angle | 1/65536 turns. |
FIXED | x | 16.16 fixed-point pixels. |
FIXED | y | 16.16 fixed-point pixels. |
FIXED | z | 16.16 fixed-point pixels. |
FIXED | groundHeight | 16.16 fixed-point pixels. |
FIXED | scaleX | 16.16 fixed point, toFIXED(1) full size. |
FIXED | scaleY | 16.16 fixed point, toFIXED(1) full size. |
Uint16 | height | No code names it through this view. |
Uint8 | layer | The map layer its ground height is read from. |
Uint8 | priorityFlags | ACTOR_PRIORITY_FLAG bits. |
FIXED | velocityX | 16.16 fixed-point pixels per tick. |
FIXED | velocityY | 16.16 fixed-point pixels per tick. |
FIXED | velocityZ | 16.16 fixed-point pixels per tick. |
FIXED | speedLimit | 16.16 fixed-point pixels per tick. |
FIXED | acceleration | Horizontal speed gained each tick towards the target, or lost braking without one, in 16.16 fixed-point pixels per tick. |
FIXED | targetX | 16.16 fixed-point pixels; 0x80000000 for no target. |
FIXED | targetY | 16.16 fixed-point pixels. |
FIXED | targetZ | 16.16 fixed-point pixels. |
FIXED | verticalMotionPhase | With motionFlags bit 1, the 16.16 share of velocityY kept on a bounce. |
FIXED | verticalMotionStrength | Gravity: taken from velocityY each tick above the ground with motionFlags bit 1, in 16.16 fixed-point pixels per tick. |
Sint32 | sceneWord | ACTOR's; no battle code names it. |
void * | records | One sprite, or a table of them (recordStorageKind). |
Uint8 | recordStorageKind | bits: 3..0 how records holds the sprites |
Uint8 | motionFlags | bits: 1 falls under gravity and bounces | 0 follows the terrain |
Uint8 | arrivalAxis | The ARRIVAL_AXIS_* watched for arrival at the target, as ACTOR's. |
Uint8 | conditionResult | The object script's last flag test. |
Uint8 | snapToTarget | Nonzero: lands exactly on the target. |
Uint8 | collisionFlags | ACTOR_COLLISION_FLAG bits. |
Uint8 | autoFaceMotion | Bit 0 turns the object to face where it moves. |
Uint8 | paused | Nonzero: the motion update leaves it where it is. |
Uint8 | retainSpriteCache | Keeps its sprite's VRAM cache entry. |
Uint8 | repeatCount | The object script's loop count. |
Sint16 | wait | The object script's wait, in ticks. |
void * | callback | ACTOR's hook; no battle code names it. |
Sint32 | timer | ACTOR's timer and userValue; no battle code names it. |
struct ACTOR * | watchedActor | |
void (* | update )(union FIELD_OBJECT *object) |
Description
An effect object that moves and draws one sprite: its position, scale,
velocity and target, and its per-tick update. It is one of the object slots
the field engine's FIELD_ACTOR also describes.
struct MOTION_OBJECT
Referenced by btActorDetachSpriteScripts(), btActorGetSprite(), btAutoBattleRunAttackOrItem(), btAutoBattleRunPsynergy(), btCameraSetViewAtPairMidpoint(), btEffectRunAnnihilation(), btEffectRunAttackSlash(), btEffectRunAzul(), btEffectRunBackstab(), btEffectRunBind(), btEffectRunBreak(), btEffectRunBurstShower(), btEffectRunCastingImpact(), btEffectRunCriticalHit(), btEffectRunCruelRuin(), btEffectRunCrystal(), btEffectRunCybele(), btEffectRunDjinnBeams(), btEffectRunDjinnHeal(), btEffectRunDjinniCharge(), btEffectRunDjinniEntrance(), btEffectRunDrainMotes(), btEffectRunFire(), btEffectRunFirePuppet(), btEffectRunFlashingStrike(), btEffectRunFlurry(), btEffectRunFroth(), btEffectRunGaspFamily(), btEffectRunGatheringLights(), btEffectRunGround(), btEffectRunHaunt(), btEffectRunHealingMotes(), btEffectRunLeapingStrike(), btEffectRunLightSurge(), btEffectRunLobbedShells(), btEffectRunMegiddo(), btEffectRunMoteFountain(), btEffectRunNereid(), btEffectRunNereidCopy(), btEffectRunNirvana(), btEffectRunOdyssey(), btEffectRunPlumeEdge(), btEffectRunProcne(), btEffectRunProjectileVolley(), btEffectRunQuake(), btEffectRunRadiantFire(), btEffectRunRagnarok(), btEffectRunRisingDragonEnemy(), btEffectRunRushingStrike(), btEffectRunSerac() and 53 more.
Definition at line 19 of file battle_actor.h.
Fields in detail
script
const Sint32 *script
The object script it runs; null when it is free.
scriptCursor
Sint16 scriptCursor
The script cursor, in words.
angle
Uint16 angle
1/65536 turns.
x
FIXED x
16.16 fixed-point pixels.
y
FIXED y
16.16 fixed-point pixels.
z
FIXED z
16.16 fixed-point pixels.
groundHeight
FIXED groundHeight
16.16 fixed-point pixels.
scaleX
FIXED scaleX
16.16 fixed point, toFIXED(1) full
size.
scaleY
FIXED scaleY
16.16 fixed point, toFIXED(1) full
size.
height
Uint16 height
No code names it through this view.
layer
Uint8 layer
The map layer its ground height is read from.
priorityFlags
Uint8 priorityFlags
ACTOR_PRIORITY_FLAG bits.
velocityX
FIXED velocityX
16.16 fixed-point pixels per tick.
velocityY
FIXED velocityY
16.16 fixed-point pixels per tick.
velocityZ
FIXED velocityZ
16.16 fixed-point pixels per tick.
speedLimit
FIXED speedLimit
16.16 fixed-point pixels per tick.
acceleration
FIXED acceleration
Horizontal speed gained each tick towards the target, or lost braking without one, in 16.16 fixed-point pixels per tick.
targetX
FIXED targetX
16.16 fixed-point pixels; 0x80000000 for no target.
targetY
FIXED targetY
16.16 fixed-point pixels.
targetZ
FIXED targetZ
16.16 fixed-point pixels.
verticalMotionPhase
FIXED verticalMotionPhase
With motionFlags bit 1, the 16.16 share of velocityY kept on a bounce.
verticalMotionStrength
FIXED verticalMotionStrength
Gravity: taken from velocityY each tick above the ground with motionFlags bit 1, in 16.16 fixed-point pixels per tick.
sceneWord
Sint32 sceneWord
ACTOR's; no battle code names it.
records
void *records
One sprite, or a table of them (recordStorageKind).
recordStorageKind
Uint8 recordStorageKind
bits: 3..0 how records holds the sprites
motionFlags
Uint8 motionFlags
bits: 1 falls under gravity and bounces | 0 follows the terrain
arrivalAxis
Uint8 arrivalAxis
The ARRIVAL_AXIS_* watched for
arrival at the target, as ACTOR's.
conditionResult
Uint8 conditionResult
The object script's last flag test.
snapToTarget
Uint8 snapToTarget
Nonzero: lands exactly on the target.
collisionFlags
Uint8 collisionFlags
ACTOR_COLLISION_FLAG bits.
autoFaceMotion
Uint8 autoFaceMotion
Bit 0 turns the object to face where it moves.
paused
Uint8 paused
Nonzero: the motion update leaves it where it is.
retainSpriteCache
Uint8 retainSpriteCache
Keeps its sprite's VRAM cache
entry.
repeatCount
Uint8 repeatCount
The object script's loop count.
wait
Sint16 wait
The object script's wait, in ticks.
callback
void *callback
ACTOR's hook; no battle code names
it.
timer
Sint32 timer
ACTOR's timer and userValue; no battle code names it.
watchedActor
struct ACTOR *watchedActor
update
void (*update)(union FIELD_OBJECT *object)