180 const s32 *actions) {
void ObjectMotion_CenterOnColumn(u32 objectId, s32 priority, s32 zOffset)
The event command "center actor and walk": walks the actor sideways to the middle of its 16-pixel col...
void Object_SetTargetAndCallback(u32 objectId, s32 targetId, const void *script)
Links an actor to the actor in the low 8 bits of targetId and starts script on it.
void ObjectMotion_CommitPositionAndActivate(u32 objectId, s32 xOffset, s32 zOffset)
Walks the actor (xOffset, zOffset) pixels, waits for it to arrive and stands it still.
void Motion_LaunchFromFocusedObject(u32 objectId, s32 xOffset, s32 zOffset, s32 action)
Places an actor on the leader and sends it walking (xOffset, zOffset) pixels away at speed 0....
void(*) SchedulerCallback(void)
The engine call layer: one typed inline for each of the thirteen main-image routines below that the s...
static s32 FieldScheduler_AddCallback(SchedulerCallback callback, s32 priority)
Registers a main-image scheduler callback.
Public interfaces to the engine's code banks.
void Map_SetWindowCellTile(s32 x, s32 y, s32 px, s32 py)
Puts world map tile (x / 16, y / 16) at cell (px / 16, py / 16) of the tile id grid,...
The scene script layer: the engine services a scene's events call, declared once (Engine_EventBegin,...
void Engine_ObjectSetPosition(struct FieldActor *object, s32 fixed_x, s32 fixed_y, s32 fixed_z)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
s32 Engine_EventChooseYesNo(s32 actor, s32 flags)
void Engine_MessageShowCentered(s32 message, s32 flags)
s32 Engine_PartyGiveItem(s32 item, s32 flags)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
void Engine_ItemLoadIcon(s32 item)
s32 Engine_MathSin(s32 angle)
void Engine_ItemShowFound(s32 item, s32 height)
void Engine_ActorSetDestination(s32 actor, s32 x, s32 z)
void Engine_HeapRelease(s32 slot)
s32 Engine_VramLoad(s32 block, s32 size, const void *data)
void Engine_PsynergyCancel(void)
void Engine_EventWaitForScreen(void)
void Engine_EventOpenScreen(void)
void Engine_CameraWaitForMove(void)
void Engine_ActorWaitForMove(s32 actor)
void * Engine_HeapAllocate(s32 slot, s32 size)
void Engine_ActorStop(s32 actor)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
struct FieldActor * Engine_EventGetViewCenter(void)
s32 Engine_MathCos(s32 angle)
void Engine_ObjectMotionSetPositionAndCommit(s32 actor, s32 x, s32 z)
void Engine_MapRedraw(void)
void Engine_ColorBufferInterpolate(s32 frames)
void Engine_ActorSetDestinationOffset(s32 actor, s32 dx, s32 dz)
void Engine_ActorFaceEachOther(s32 actor, s32 other, s32 frames)
void Engine_EventWait(s32 frames)
static void Event_End(void)
static void FieldObject_SetTargetAndCallback(s32 object, s32 target, const s32 *actions)
static s32 Task_AddCallback(void(*callback)(void), s32 priority)
Calls the main-image scheduler through engine_call.h.
static void Psynergy_Cancel(void)
static void Actor_RunRepeatedMotion(s32 actor, s32 repeats)
static struct FieldActor * Event_GetViewCenter(void)
static s32 Vram_Load(s32 block, s32 size, const void *data)
static void Camera_WaitForMove(void)
static void Message_ShowCentered(s32 message, s32 flags)
static s32 Math_Cos(s32 angle)
static void Task_Wait(s32 frames)
static void Event_RequestExit(s32 exit)
static void Actor_Stop(s32 actor)
static void Event_Begin(void)
static void Item_ShowFound(s32 item, s32 height)
static void Actor_StartRepeatedMotion(s32 actor, s32 repeats)
static void FieldObjectMotion_CenterOnColumn(s32 a0, s32 a1, s32 a2)
static void Actor_SetSpriteFlags(struct FieldActor *actor, s32 flags)
static void ColorBuffer_Interpolate(s32 frames)
static void FieldObjectMotion_CommitPositionAndActivate(s32 a0, s32 a1, s32 a2)
static void Actor_WaitForMove(s32 actor)
static void FieldVector_AddPolarOffset(s32 radius, s32 heading, struct FieldPosition *probe)
static s32 Math_Sin(s32 angle)
static s32 Party_GiveItem(s32 item, s32 flags)
static void FieldMotion_LaunchFromFocusedObject(s32 actor, s32 dx, s32 dz, s32 facing)
static void Actor_SetSpritePriority(s32 actor, s32 priority)
static void Map_Redraw(void)
static void Actor_SetAnimation(s32 actor, s32 animation)
static void Actor_SetAnimationAndWait(s32 actor, s32 animation)
static void Event_Wait(s32 frames)
static void Event_WaitForScreen(void)
static void Item_LoadIcon(s32 item)
static s32 FieldScheduler_AddOrUpdateCallback(SchedulerCallback callback, s32 priority)
Calls the main-image scheduler through engine_call.h.
static void FieldObjectMotion_OffsetPositionAndResetMotion(s32 a0, s32 a1, s32 a2)
static void Heap_Release(s32 slot)
static void Actor_Jump(s32 actor, s32 height, s32 frames)
static s32 Event_ChooseYesNo(s32 actor, s32 flags)
static void Actor_FaceEachOther(s32 actor, s32 other, s32 frames)
static void FieldObject_MotionSetPositionAndCommit(s32 actor, s32 x, s32 z)
static void Event_SetMessage(s32 message)
static void Field_SetMapCellCollision(s32 a0, s32 a1, s32 a2, s32 a3)
static void FieldObjectMotion_ResetAndSetPosition(s32 a0, s32 a1, s32 a2)
static void FieldObject_SetPosition(struct FieldActor *object, s32 fixed_x, s32 fixed_y, s32 fixed_z)
static void FieldMap_SetWindowCellTile(s32 a0, s32 a1, s32 a2, s32 a3)
static void * Heap_Allocate(s32 slot, s32 size)
static void Event_OpenScreen(void)
void Vector_AddPolarOffset(s32 radius, s32 angle, void *position)
Moves the point position by radius in direction angle on the ground plane: x by the cosine,...
void Engine_ActorSetAnimation()
void Engine_EventRequestExit()
void Engine_EventEnd(void)
void Engine_EventBegin(void)
void Engine_EventSetMessage()
A field actor: a person or thing on the field with a position, motion toward a target,...
u16 radius
Collision radius in pixels: 16, or half the sprite metadata's boxY, when created; the overlap checks ...
union FieldCoordinate x
16.16 fixed-point pixels
union FieldCoordinate z
16.16 fixed-point pixels
void SetMapCellCollision(u32 layer, s32 x, s32 y, u32 collisionCode)
Sets the collision code of a layer's cell at (x, y) in 16.16 pixels.