21 p[12] = p[12] + ((((
u32)a << 9) >> 16) + (((
u32)b << 9) >> 16)) + 0x400;
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
void Engine_ItemLoadIcon(s32 item)
s32 Engine_MathSin(s32 angle)
void Engine_HeapRelease(s32 slot)
s32 Engine_VramLoad(s32 block, s32 size, const void *data)
void * Engine_HeapAllocate(s32 slot, s32 size)
s32 Engine_GameFlagIsSet(s32 flag)
s32 Engine_MathCos(s32 angle)
Game flags, named where their meaning is shown.
#define FLAG_KEEP_PARTY_POSITION
The views of an orbiting scene object's sprite.
void Scene_FloatNut(s32 id)
Draws actor id as the Nut's icon and starts it floating, 32 pixels up unless the party returns to whe...
static s32 SceneEffect_UpdateOrbitPosition(s32 *p)
The Nut's callback, each frame: it sways up to two pixels either side of its spot and dips up to two ...
A field actor: a person or thing on the field with a position, motion toward a target,...
A floating Nut's sprite, seen as the attribute bits, palette and state its scenes set.
u8 state
AnimationObject's count of layers; the Nut's scenes zero it.
u8 palette
AnimationObject's slot: the VRAM cache entry the Nut's icon is loaded into.
u8 flags09Mode
priority; the Nut's scenes set 1
u8 flags05Bit5
full colour; the Nut's scenes clear it
u8 flags09High
palette; the Nut's scenes set 0
A floating Nut's actor: its position, the spot it sways around and how far through the sway it is,...
s32 orbitCenterY
16.16 fixed-point pixels
s32 y
16.16 fixed-point pixels
OrbitingSceneObjectSprite * sprite
u8 flags23
FieldActor's priorityFlags; the Nut's scenes clear bit 0, ACTOR_PRIORITY_AUTOMATIC.
u32 callback
FieldActor's update hook; Scene_FloatNut sets SceneEffect_UpdateOrbitPosition.
u8 visible
FieldActor's frozen, which skips steering, terrain, gravity and floating; the Nut's scenes set it.
u8 mode
FieldActor's motionFlags; the Nut's scenes zero it.
s32 x
16.16 fixed-point pixels
s32 orbitAngle
1/65536 turns; advanced by 0x400 plus two random steps each frame.
u8 active
FieldActor.retainSpriteCache: the Nut's scenes keep its sprite's VRAM cache entry.
u8 state
FieldActor's first unk56 byte; Scene_FloatNut zeroes it.
s32 orbitCenterX
16.16 fixed-point pixels