struct SCRIPT_OPERANDS
The whole 112-byte slot as SC_SET, SC_ADD and SC_CMP see it: each field is one state value (ACTOR_SCRIPT_VALUE in actor_script.h), reached through ActorScriptOperandHandlerTable, and named for what the field keeps there.
Declared in script_operands.h.
Fields
| Name | Description | |
|---|---|---|
Uint32 | scriptAddr | SW_SCRIPT; an add steps it by whole words |
Uint16 | cursor | SW_CURSOR, compared as signed |
Uint16 | facing | SW_FACING, and the state values either side |
Uint32 | x | SW_X, 16.16 fixed-point pixels |
Uint32 | y | SW_Y |
Uint32 | z | SW_Z |
Uint32 | groundHeight | SW_GROUND |
Uint32 | scaleX | SW_SCALE_X, 16.16 fixed point |
Uint32 | scaleY | SW_SCALE_Y, and the state value after it |
Uint16 | radius | SW_RADIUS, in pixels; compared as signed |
Uint8 | layer | no state value |
Uint8 | priorityFlags | no state value |
Uint32 | velocityX | SW_VELOCITY_X, 16.16 fixed-point pixels per tick |
Uint32 | velocityY | SW_VELOCITY_Y |
Uint32 | velocityZ | SW_VELOCITY_Z |
Uint32 | speedLimit | SW_SPEED |
Uint32 | acceleration | SW_ACCELERATION |
Uint32 | targetX | SW_TARGET_X; ACTOR_NO_TARGET when unset |
Uint32 | targetY | SW_TARGET_Y |
Uint32 | targetZ | SW_TARGET_Z |
Uint32 | bounce | SW_BOUNCE, or a floating actor's phase |
Uint32 | gravity | SW_GRAVITY |
Uint32 | sceneWord | SW_SCENE_WORD: word fdActorCreate zeroes; only scene code reads |
Uint32 | sprite | SW_SPRITE: the sprite, or its list of four |
Uint8 | spriteStorageKind | SW_SPRITE_KIND, an ACTOR_SPR_KIND |
Uint8 | motionFlags | SW_MOTION, ACTOR_MOTION_FLAG bits |
Uint8 | arrivalAxis | SW_ARRIVAL |
Uint8 | conditionResult | SW_RESULT, the last test; every compare sets it |
Uint8 | snapToTarget | SW_SNAP |
Uint8 | collisionFlags | SW_COLLISION |
Uint8 | steeringFlags | SW_STEERING |
Uint8 | paused | SW_PAUSED |
Uint8 | retainSpriteCache | keeps the sprite's VRAM; no state value |
Uint8 | repeatCount | SW_REPEAT, SC_LOOP's count |
Sint16 | wait | SW_WAIT |
Uint8 | refused | ACTOR.refused; no state value |
Uint8 | frozen | ACTOR_ARM_VIEW.frozen; no state value |
Uint8 | sceneCount | SW_SCENE_COUNTER, kept by scene code |
Uint8 | sceneByte | SW_SCENE_BYTE, kept by scene code |
Sint16 | timer | SW_TIMER, what its actor script reads |
Sint16 | userValue | SW_USER_VALUE, or scene scratch |
Uint32 | watchedActor | SW_WATCHED_ACTOR, the actor it follows or faces |
Uint32 | update | SW_HOOK, the function run each tick |
Description
The whole 112-byte slot as SC_SET, SC_ADD and SC_CMP see it: each field is
one state value (ACTOR_SCRIPT_VALUE in actor_script.h), reached through
ActorScriptOperandHandlerTable, and named for what the field keeps there.
struct SCRIPT_OPERANDS
Referenced by fdActorScriptApplyOperandAdd(), fdActorScriptApplyOperandCommand(), fdActorScriptApplyOperandCompare(), fdActorScriptApplyOperandSet(), fdActorScriptSetOrCompareCursor() and fdActorScriptSetOrCompareRadius().
Definition at line 20 of file script_operands.h.
Fields in detail
scriptAddr
Uint32 scriptAddr
SW_SCRIPT; an add steps it by whole words
cursor
Uint16 cursor
SW_CURSOR, compared as signed
facing
Uint16 facing
SW_FACING, and the state values either side
x
Uint32 x
SW_X, 16.16 fixed-point pixels
y
Uint32 y
z
Uint32 z
groundHeight
Uint32 groundHeight
scaleX
Uint32 scaleX
SW_SCALE_X, 16.16 fixed point
scaleY
Uint32 scaleY
SW_SCALE_Y, and the state value after it
radius
Uint16 radius
SW_RADIUS, in pixels; compared as signed
layer
Uint8 layer
no state value
priorityFlags
Uint8 priorityFlags
no state value
velocityX
Uint32 velocityX
SW_VELOCITY_X, 16.16 fixed-point pixels per
tick
velocityY
Uint32 velocityY
velocityZ
Uint32 velocityZ
speedLimit
Uint32 speedLimit
acceleration
Uint32 acceleration
targetX
Uint32 targetX
SW_TARGET_X; ACTOR_NO_TARGET when unset
targetY
Uint32 targetY
targetZ
Uint32 targetZ
bounce
Uint32 bounce
SW_BOUNCE, or a floating actor's phase
gravity
Uint32 gravity
sceneWord
Uint32 sceneWord
SW_SCENE_WORD: word fdActorCreate zeroes; only
scene code reads
sprite
Uint32 sprite
SW_SPRITE: the sprite, or its list of four
spriteStorageKind
Uint8 spriteStorageKind
SW_SPRITE_KIND, an ACTOR_SPR_KIND
motionFlags
Uint8 motionFlags
SW_MOTION, ACTOR_MOTION_FLAG bits
arrivalAxis
Uint8 arrivalAxis
conditionResult
Uint8 conditionResult
SW_RESULT, the last test; every compare sets it
snapToTarget
Uint8 snapToTarget
collisionFlags
Uint8 collisionFlags
steeringFlags
Uint8 steeringFlags
paused
Uint8 paused
retainSpriteCache
Uint8 retainSpriteCache
keeps the sprite's VRAM; no state value
repeatCount
Uint8 repeatCount
wait
Sint16 wait
refused
Uint8 refused
ACTOR.refused; no state value
frozen
Uint8 frozen
ACTOR_ARM_VIEW.frozen; no state value
sceneCount
Uint8 sceneCount
SW_SCENE_COUNTER, kept by scene code
sceneByte
Uint8 sceneByte
SW_SCENE_BYTE, kept by scene code
timer
Sint16 timer
SW_TIMER, what its actor script reads
userValue
Sint16 userValue
SW_USER_VALUE, or scene scratch
watchedActor
Uint32 watchedActor
SW_WATCHED_ACTOR, the actor it follows or faces
update
Uint32 update
SW_HOOK, the function run each tick