Alchemy

orbit.h

games/tbs/include/orbit.h on GitHub

Structures

OrbitingSceneObjectSprite

struct OrbitingSceneObjectSprite

A floating Nut's sprite, seen as the attribute bits, palette and state its scenes set.

FieldDeclared as
padding00u8 padding00[5]AnimationObject's queue link and attribute 0's y
flags05Lowu8 flags05Low : 5AnimationObject's attribute 0 high byte. bits: 7..6 shape | 5 full colour | 4 mosaic | 3..2 object mode | 1..0 affine @{ affine, object mode and mosaic; not named by scenes
flags05Bit5u8 flags05Bit5 : 1full colour; the Nut's scenes clear it
flags05Highu8 flags05High : 2shape; not named by scenes
padding06u8 padding06[3]@} attribute 1 and the low byte of attribute 2
flags09Lowu8 flags09Low : 2AnimationObject's attribute 2 high byte. bits: 7..4 palette | 3..2 priority | 1..0 tile bits 9..8 @{ tile bits 9..8; not named by scenes
flags09Modeu8 flags09Mode : 2priority; the Nut's scenes set 1
flags09Highu8 flags09High : 4palette; the Nut's scenes set 0
padding0au8 padding0a[18]@}
paletteu8 paletteAnimationObject's slot: the VRAM cache entry the Nut's icon is loaded into.
padding1du8 padding1d[10]
stateu8 stateAnimationObject's count of layers; the Nut's scenes zero it

Used by Kalay_PrepareTown, Scene_FloatNut.

Line 11

OrbitingSceneObject

struct OrbitingSceneObject

A floating Nut's actor: its position, the spot it sways around and how far through the sway it is, its sprite and its callback.

FieldDeclared as
padding00u8 padding00[8]
xs32 x16.16 fixed-point pixels
ys32 y16.16 fixed-point pixels
zs32 z16.16 fixed-point pixels
padding14u8 padding14[15]
flags23u8 flags23FieldActor's priorityFlags; the Nut's scenes clear bit 0, ACTOR_PRIORITY_AUTOMATIC.
padding24u8 padding24[12]
orbitAngles32 orbitAngle1/65536 turns; advanced by 0x400 plus two random steps each frame.
padding34u8 padding34[4]
orbitCenterXs32 orbitCenterX16.16 fixed-point pixels
orbitCenterYs32 orbitCenterY16.16 fixed-point pixels
orbitCenterZs32 orbitCenterZ16.16 fixed-point pixels
padding44u8 padding44[12]
spriteOrbitingSceneObjectSprite *sprite
padding54u8 padding54
modeu8 modeFieldActor's motionFlags; the Nut's scenes zero it
stateu8 stateFieldActor's first unk56 byte; Scene_FloatNut zeroes it
padding57u8 padding57[5]
activeu8 activeFieldActor.retainSpriteCache: the Nut's scenes keep its sprite's VRAM cache entry.
padding5du8 padding5d[4]
visibleu8 visibleFieldActor's frozen, which skips steering, terrain, gravity and floating; the Nut's scenes set it.
padding62u8 padding62[10]
callbacku32 callbackFieldActor's update hook; Scene_FloatNut sets SceneEffect_UpdateOrbitPosition.

Used by Kalay_PrepareTown, Scene_FloatNut.

Line 39

On this page