29 cameraX = map->
viewX & 0xffff0000;
30 cameraZ = map->
viewY & 0xffff0000;
36 cameraX = camera[0] & 0xffff0000;
37 cameraZ = camera[1] & 0xffff0000;
39 x =
object->x - cameraX;
40 z =
object->z - cameraZ -
object->y;
41 *position++ = x / 0x10000;
42 *position = z / 0x10000;
79 for (i = 0; i < 16; i++) {
89 for (i = 0; i < 16; i++) {
109 context =
object->animation;
114 context->
flags = zero;
118 object->x = (
object->x & 0xFFF00000) + 0x80000;
119 object->z = (
object->z & 0xFFF00000) + 0x100000;
120 object->velocityX = zero;
121 object->velocityZ = zero;
159 spriteAnimation->
flags = zero;
161 leader->
x = (leader->
x & mask) + 0x80000;
165 spriteAnimation->
count = 1;
167 spriteAnimation->
entries[1] = (
void *)zero;
168 spriteAnimation->
flags = 1;
207 leader->
y += 0x00a00000;
void * ObjectTable_Get(u32 actorIndex)
Returns the actor in slot index (0 to 65), or NULL.
void Camera_MoveWithinMapBounds(s32 requestedX, s32 requestedY, s32 requestedZ, s32 glide)
The event command "camera move to": sends the camera to the requested axes, 16.16 pixels (-1 keeps th...
void Camera_FollowActor(s32 actor, s32 keepPosition)
The event command "camera follow actor": the camera (the event's view centre) follows actor.
s32 Object_GetScreenPosition(s32 objectId, s32 *position)
Finds where an actor is on screen: position[0] and position[1] receive its x and y in pixels,...
void ObjectEffect_PrepareContextEffect(s32 animation)
Starts the leader's animation for leaving through an exit: centres it on its tile,...
s32 Field_StartEncounterTransition(s32 unused)
Starts the transition into a random battle: plays the scene's battle cue and the encounter sounds,...
void ObjectEffect_EndContextEffect(s32 animation)
Plays the leader's arrival animation through an exit: centred on its tile at the tile's north edge,...
void ObjectEffect_BeginContextEffect25(void)
Leaves through an exit of kind 0x30 (animation 25), recorded in flag 0x121.
void ObjectEffect_BeginContextEffect26(void)
Leaves through an exit of kind 0x20 (animation 26); flag 0x120 makes the next scene play the matching...
UNUSED void ObjectEffect_ReservedNoOp941DC(void)
s32 ObjectEffect_RunPendingFlagEvent(void)
Plays the leader's arrival for the way the last scene was left: through an exit of kind 0x20 (flag 0x...
void ObjectDispatch_SelectAnimationFar(void *raw, s32 no)
s32 ResourceMetadata_RegisterFar(struct AnimationObject *state, s32 id)
void ResourceMetadata_ClearRecordFar(struct AnimationEntry *layer)
void Object_SetMoveTargetFar(struct ObjectRuntime *object, s32 x, s32 y, s32 z)
void FieldObject_WaitForMoveFar(void *fieldObject)
s32 GameFlag_TestFar(s32 flag)
s32 GameFlag_SetBitFar(s32 flag)
void GameFlag_ClearBitFar(s32 flag)
struct AnimationMetadata * Resource_GetMetadataRecordFar(u32 number)
void AudioCommand_PlayFar(s32 id)
#define ACTOR_NO_TARGET
A target coordinate that is not set: the object has no target.
void WaitFrames(s32 frames)
The game's frame loop: runs frames frames and returns.
struct GameState gGameState
#define RGB(r, g, b)
A 15-bit colour from its red, green and blue levels (0 to 31 each), as the palette stores it: blue in...
#define BG_PLTT_COLOR(palette, color)
#define Io_Write16(v, reg)
Writes a value to a 16-bit register or memory location.
void DisplayTransition_Finish(s32 mode, s32 frames)
Fades the screen out over frames frames, as DisplayTransition_Start fades it in.
void FieldEvent_WaitFrames(s32 frames)
The event command "wait": waits the requested frames, unless debug fast forward (Event_UpdateDebugSki...
What every part of psynergy_effects.c shares: its includes and the macros and types more than one par...
struct EventWork * gEventWork
One animation layer of a sprite: its animation id, frames, running script and timer.
u8 param
SpriteColorMode its pixels are drawn with; 0 when taken.
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)
struct AnimationEntry * entries[4]
its layers; empty ones null
u8 count
layers in use, up to the last one present
Full event work allocated by Field_RunScene (heap slot 27).
u16 transitionActive
set once the opening transition has started
s16 mode
MODE_WORLD_MAP (3) on the world map.
s16 sceneCue
the battle music chosen for the encounter
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 terrainHeight
16.16 fixed-point pixels
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....
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.
#define MODE_WORLD_MAP
the world map