9#define SPRITE_ATTR2_HIGH(sprite) (((u8 *)(sprite))[9])
42 ->camera->movementState != 0)
48 delta = work->
zoom - *from;
57 if (*step == *frames) {
121 void *self = (
void *)fieldObject;
151 if ((emote & 0xff) == 6) {
166 bubble->motionFlags = 0;
168 bubble->work = actor;
169 sprite = bubble->sprite;
177 bubble->linkedObject = target;
180 if ((emote & 0x100) != 0) {
223 if ((
flags & 3) != 0) {
233 object->linkedObject = 0;
244 object->linkedObject = effect;
255 effect->
work = actor;
265 effect->linkedObject = object;
291#undef SPRITE_ATTR2_HIGH
void * ObjectTable_Get(u32 actorIndex)
Returns the actor in slot index (0 to 65), or NULL.
const s32 gBattleFx_LinkedObjectScript[]
void(*) SchedulerCallback(void)
struct ObjectRuntime * Object_CreateFar(s32 id, s32 x, s32 y, s32 z)
Far call to FieldObject_Create.
void ObjectDispatch_ReleaseFar(struct DispatchObject *obj)
void ObjectDispatch_SelectAnimationFar(void *raw, s32 no)
void ObjectDispatch_InitializeFar(struct DispatchObject *obj, const s32 *script)
struct AnimationMetadata * Resource_GetMetadataRecordFar(u32 number)
void AudioCommand_PlayFar(s32 id)
const u8 gObjectMotion_WaitScript[]
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
void * Runtime_AllocateBlock(s32 kind, s32 size)
As Runtime_AllocateHeapBlock, but tries EWRAM first, for blocks that need room more than speed: the b...
static s32 Iwram_RatioMulQ14(s32 divisor, s32 value)
All calls go through this layer.
#define Iwram_MulQ16(left, right)
struct ScenePlacement * Scene_FindActorPlacement(s32 id)
Returns the placement of actor id in the scene's placement tables, or NULL: for a party character (0 ...
void FieldEvent_WaitFrames(s32 frames)
The event command "wait": waits the requested frames, unless debug fast forward (Event_UpdateDebugSki...
void Map_SetViewBounds(s32 minX, s32 minY, s32 maxX, s32 maxY)
The event command "set view bounds": the camera keeps the screen inside these map coordinates (Camera...
void BattleFx_ScheduleRatioTransition(s32 zoom, s32 frames)
Starts a zoom to zoom (16.16) over frames frames, on the world map (event mode 3) only.
void Event_WaitForZoomTransition(void)
Waits for a zoom transition to end (on the world map only, at most 300 frames).
void BattleFx_SpawnLinked(s32 actor, s32 emote, s32 wait)
The event command "actor show emote": shows an emote bubble (object 21) over an actor,...
void BattleFx_ConfigureLinkedObject(s32 actor, s32 flags)
The event command "actor set attached effect": with mode (the low 2 bits) 0 removes the object attach...
s32 BattleFx_CopyLinkedObjectPosition(union FieldObject *fieldObject)
#define SPRITE_ATTR2_HIGH(sprite)
The high byte of the first sprite part's OAM attribute 2.
s32 FieldFx_StepRatioTransition(void)
What every part of psynergy_effects.c shares: its includes and the macros and types more than one par...
s32 Scheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 order)
Schedules callback with order, or gives a task already running it the new order, and re-sorts the tab...
s32 Scheduler_RemoveCallback(SchedulerCallback callback)
Unschedules the task running callback: clears its routine and gives it order 0x7fff,...
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
u8 flags
bits: 1 outlined in ObjectSystemWork's edge and fill colours | 0 shadow drawn (set when created)
A field object as the object dispatcher's far calls take it.
A field actor: a person or thing on the field with a position, motion toward a target,...
s16 timer
The parameter its action script reads (a follow distance or an angle to face), the player's frames to...
struct FieldActor * linkedObject
The object its action script follows or faces.
u8 motionFlags
ActorMotionFlag bits; zero is free flight in 3D, and 3 is set on creation.
union FieldCoordinate x
16.16 fixed-point pixels
union FieldCoordinate y
16.16 fixed-point pixels
s32 terrainHeight
16.16 fixed-point pixels
union FieldCoordinate z
16.16 fixed-point pixels
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
u16 wait
the object script's wait, in frames (ScriptMotionObject)
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
struct AnimationObject * sprite
the sprite spin turns
Full event work allocated by Field_RunScene (heap slot 27).
The world map's perspective view: the followed position, screen shake, view position,...
s32 farPlane
0x1fe0000 at load
s32 zoom
16.16 fixed point, 0x10000 full size
s32 previousZoom
the zoom a transition starts from
s16 zoomTransitionStep
frames of the transition done
u16 zoomTransitionFrames
a zoom transition's length; 0 when none
s32 distance
farPlane scaled by the zoom
s16 sprite
The actor's sprite; 0 to 7 are the party's characters, each in its own actor slot,...
s32 fixed
16.16 fixed-point pixels
An object on the field, read as an actor or as an effect.
struct FieldEffect effect
#define MODE_WORLD_MAP
the world map