9#define TILE_CELLS ((struct MapCell *)Ram_MapCellBuffer)
10#define TILE_CELLS_SOUTH ((struct MapCell *)(Ram_MapCellBuffer + 0x200))
11#define TILE_CELLS_NORTH ((struct MapCell *)(Ram_MapCellBuffer - 0x200))
44 (leader->
z & 0xfff00000) + 0x80000);
49 (leader->
z & 0xfff00000) + 0x80000);
80 leader->terrainHeight -= 0x10000;
83 leader->terrainHeight -= 0x10000;
86 leader->terrainHeight += 0x10000;
89 leader->terrainHeight += 0x10000;
131 s32 index = gridX / 16 + (gridZ / 16) * 128;
151 object->speedLimit = 0x10000;
154 object->actionFlags = 1;
159 (gridZ << 16) + 0x100000);
169 object->velocityY = 0x40000;
170 object->terrainHeight =
object->y;
174 object->actionFlags = 1;
175 object->angle = 0xc000;
212 s32 index = gridX / 16 + (gridZ / 16) * 128;
229 object->actionFlags = 0;
234 object->velocityY = 0x40000;
240 object->speedLimit = 0x10000;
241 object->velocityY = 0;
245 object->actionFlags = 1;
255 (gridZ << 16) - 0x100000);
259 object->terrainHeight =
object->y;
264 object->actionFlags = 1;
276#undef TILE_CELLS_SOUTH
277#undef TILE_CELLS_NORTH
void ObjectMotion_CommitCurrentPositionAndActivate(u32 objectId)
The event command "wait for actor": waits (at most 600 frames) for the actor to arrive and stands it ...
void Object_RefreshSelectorById(u32 objectId)
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
void ObjectMotion_ArmCallback(s32 objectId, s32 angle, s32 wait)
The event command "actor face direction": the actor turns toward angle (0x10000 a full turn; ObjectMo...
void ObjectMotion_SetPositionAndCommit(u32 objectId, s32 x, s32 z)
The event command "move actor and wait": as ObjectMotion_ResetAndSetPosition, then waits (at most 600...
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
struct ObjectRuntime * Object_FindNearestFacingTarget(struct ObjectRuntime *self, s32 sprite)
Finds the nearest animated object to self within 40 pixels and 48 pixels of height,...
s32 Field_ClimbUp(void)
Climbing up (the player presses up at a climbable wall).
s32 Field_ClimbDown(void)
Climbing down (the player presses down at a climbable wall).
s32 Field_TryJumpForward(void)
Makes the leader jump two tiles forward, over the tile in front, when the map allows it (Map_CheckObj...
void ObjectDispatch_SetSingleChildFlagsFar(struct DispatchObject *obj, u32 flags)
void ObjectDispatch_SelectAnimationFar(void *raw, s32 no)
void Object_SetMoveTargetFar(struct ObjectRuntime *object, s32 x, s32 y, s32 z)
s32 Map_CheckObjectStepFar(struct ObjectRuntime *object, struct FieldPosition *position)
s32 GetMapCellCollisionFar(s32 layer, s32 x, s32 y)
s32 CheckMapPositionCellOccupiedFar(struct WorldPosition *position)
void AudioCommand_PlayFar(s32 id)
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
struct GameState gGameState
#define Iwram_MulQ16(left, right)
#define SET_POSITION(p, px, py, pz)
Sets the position or the velocity of a particle, a piece of debris or an object in one statement.
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 FieldEvent_End(void)
Ends an event: stops the debug fast-forward callback, gives the camera back to the leader and refresh...
void FieldEvent_WaitFrames(s32 frames)
The event command "wait": waits the requested frames, unless debug fast forward (Event_UpdateDebugSki...
void FieldEvent_Begin(void)
The event command "begin event": closes any timed notice, stops the leader, resets the message and ti...
What every part of psynergy_effects.c shares: its includes and the macros and types more than one par...
#define SE_JUMP
An actor jumps: ObjectMotion_Launch plays the high jump above 5 pixels a frame.
struct EventWork * gEventWork
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.
s32 z
16.16 fixed-point pixels
Full event work allocated by Field_RunScene (heap slot 27).
s32 walkingDistanceScale
scales movement for PP and status updates
s32 walkingDistance
accumulated 16.16 distance awaiting an update
u8 movementMode
1 while the leader is climbing, 0 otherwise
s32 selectedActor
the leader: its unit and its actor
One of the 64 field objects in the object pool (heap slot 5): its script, position,...
s32 velocityY
16.16 fixed-point pixels per frame
s32 z
16.16 fixed-point pixels
s32 acceleration
Added toward the target each frame, or taken off the speed when there is none, in 16....
u8 flags
FieldActor.motionFlags: 3 when created, 4 for a placed actor above the ground; zero is free flight in...
void * animation
its sprite, or its list of four, by animationKind
s32 x
16.16 fixed-point pixels
s32 speedLimit
16.16 fixed-point pixels per frame
s32 y
16.16 fixed-point pixels
u8 animationKind
Low four bits: 0 no sprite, 1 one sprite, 2 a group of up to four.
A position on the world map, as its walkability check reads it.
A field coordinate, read whole or as its fraction and its whole pixels.