28#include "text/msg_ids.h"
79#define IMIL_OPEN_SHOP Engine_ShopOpen
81#define IMIL_OPEN_SHOP ((s32 (*)())Engine_ShopOpen)
99 switch (actor->
timer) {
151 ((
u8 *)script)[262] = 0;
411 for (i = 8; i <= 65; i++) {
452 if ((
u32)((
facing << 16) + 0x5fff0000) <= 0x3ffe0000) {
464 if ((
u32)((
facing << 16) + 0x5fff0000) <= 0x3ffe0000) {
487 if ((
u32)((
facing << 16) + 0x5fff0000) <= 0x3ffe0000) {
499 if ((
u32)((
facing << 16) + 0x5fff0000) <= 0x3ffe0000) {
523 if ((
u32)((
facing << 16) + 0x5fff0000) <= 0x3ffe0000) {
534 if ((
u32)((
facing << 16) + 0x5fff0000) <= 0x3ffe0000) {
559 if ((
u16)(leader->
facing + 0x5fff) <= 0x3ffe) {
583 if ((
u16)(leader->
facing + 0x5fff) <= 0x3ffe) {
677 }
else if (entrance == 2) {
682 }
else if (entrance == 4) {
699 }
else if (entrance == 3) {
717 }
else if (entrance == 7) {
757 if (leader !=
NULL) {
761 if (leader !=
NULL) {
948 spark->sprite->image.priority = 0;
988 sprite = work->sprite;
1002 object->effect.y +=
PIXELS(1) / 2;
1003 object->effect.scaleX += 3 *
Q16_ONE / 100;
1004 object->effect.scaleY += 3 *
Q16_ONE / 100;
1005 object->effect.spin += 2;
1013 if (
object !=
NULL) {
1015 object->effect.countdown = 60;
1025 volatile u32 *frame;
1029 if (((
u32)*frame % (
u32)60) == 0) {
1034 if (((
u32)(*frame + 30) % (
u32)60) == 0) {
1039 if (((
u32)(*frame + 10) % (
u32)60) == 0) {
1044 if (((
u32)(*frame + 50) % (
u32)60) == 0) {
1049 if (((
u32)(*frame + 80) % (
u32)60) == 0) {
1072 if ((
u32)(column - 24) <= 7 ||
1073 ((
u32)((actor->
z.
fixed >> 19) - 36) <= 9 && (
u32)(column - 22) <= 9)) {
1082 if (x > 0xE80000 && actor->
y.
fixed > 0x1E0000 && actor->
z.
fixed > 0xD40000) {
1107 a = actor->
x.
fixed >> 20;
1110 b = actor->
z.
fixed >> 20;
1169 if (leader !=
NULL) {
1312 actor = &
object->actor;
1317 actor->
timer = n - 1;
1329 d = (
s16)(d - prev);
1334 actor->
facing = prev + d;
1355 if ((heading << 16) == -0x10000) {
1371 if (marker == 255 ||
1374 subject->
facing = heading;
1402 subject->speed =
PIXELS(2);
1403 subject->acceleration =
PIXELS(1) / 10;
1406 if (marker != goal) {
1411 subject->speed =
PIXELS(2);
1412 subject->acceleration =
PIXELS(1);
1546 SC_CALL(Scene_TurnTowardTarget),
1560 { 0,
CONDITION_ALWAYS, 380, 0, 433,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1561 { 1,
CONDITION_ALWAYS, 288, 0, 488,
FACING_NORTH, 0, -1, -1, -1, -1, 0 },
1562 { 2,
CONDITION_ALWAYS, 480, 0, 280,
FACING_WEST, 0, -1, -1, -1, -1, 0 },
1563 { 3,
CONDITION_ALWAYS, 312, 0, 424,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1564 { 4,
CONDITION_ALWAYS, 424, 0, 392,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1565 { 5,
CONDITION_ALWAYS, 456, 0, 248,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1566 { 6,
CONDITION_ALWAYS, 376, 0, 200,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1567 { 7,
CONDITION_ALWAYS, 120, 0, 208,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1568 { 8,
CONDITION_ALWAYS, 64, 0, 360,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1569 { 9,
CONDITION_ALWAYS, 229, 0, 88,
FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
1574 { 0,
CONDITION_ALWAYS, 136, 0, 248,
FACING_NORTH, 0, -1, -1, -1, -1, 0 },
1575 { 1,
CONDITION_ALWAYS, 144, 0, 242,
FACING_NORTH, 0, 32, 52, 256, 280, 0 },
1576 { 2,
CONDITION_ALWAYS, 143, 0, 596,
FACING_NORTH, 0, 42, 424, 256, 631, 0 },
1577 { 3,
CONDITION_ALWAYS, 399, 0, 322,
FACING_NORTH, 0, 320, 58, 536, 360, 0 },
1578 { 4,
CONDITION_ALWAYS, 400, 0, 659,
FACING_NORTH, 0, 307, 382, 545, 697, 0 },
1579 { 5,
CONDITION_ALWAYS, 129, 0, 915,
FACING_NORTH, 0, 50, 706, 350, 949, 0 },
1580 { 6,
CONDITION_ALWAYS, 446, 0, 825,
FACING_SOUTH, 0, 402, 740, 670, 921, 0 },
1581 { 7,
CONDITION_ALWAYS, 687, 0, 264,
FACING_NORTH, 0, 594, 49, 806, 295, 0 },
1582 { 8,
CONDITION_ALWAYS, 182, 0, 772,
FACING_SOUTH, 0, 50, 706, 350, 949, 0 },
1701 {
EVENT_TALK, 8, 0x82c, MSGNO(MsgImilTheresBeenAnEpidemicGoingAround) },
1709 {
EVENT_TALK, 11, 0x881, MSGNO(MsgImilCoughTheEpidemicHasHitAlmost) },
1713 {
EVENT_TALK, 13, 0x881, MSGNO(MsgImilWereClosedSorryIGetA) },
1715 {
EVENT_TALK, 15, 0x881, MSGNO(MsgImilIfYouWantToBuyAnything) },
1720 {
EVENT_TALK, 17, 0x881, MSGNO(MsgImilWereTheOnlyInnThatStays) },
1773 MAP_CELL_STEP(40, 37, 4, 2, 5),
MAP_CELL_STEP(40, 39, 4, 2, 5),
MAP_CELL_STEPS_END,
1774 MAP_CELL_STEP(35, 35, 2, 2, 5),
MAP_CELL_STEP(33, 35, 2, 2, 5),
MAP_CELL_STEPS_END,
1778 MAP_CELL_STEP(35, 37, 2, 2, 5),
MAP_CELL_STEP(33, 37, 2, 2, 5),
MAP_CELL_STEPS_END,
1782 MAP_CELL_STEP(35, 43, 2, 2, 5),
MAP_CELL_STEP(33, 43, 2, 2, 5),
MAP_CELL_STEPS_END,
1786 MAP_CELL_STEP(35, 39, 2, 2, 5),
MAP_CELL_STEP(33, 39, 2, 2, 5),
MAP_CELL_STEPS_END,
1790 MAP_CELL_STEP(42, 48, 2, 2, 5),
MAP_CELL_STEP(40, 48, 2, 2, 5),
MAP_CELL_STEPS_END,
1794 MAP_CELL_STEP(42, 46, 2, 2, 5),
MAP_CELL_STEP(40, 46, 2, 2, 5),
MAP_CELL_STEPS_END,
1808 { 50, 24 }, { 57, 22 }, { 59, 13 }, { 54, 10 }, { 38, 8 }, { 34, 19 },
Ability numbers, named from the English release.
void ObjectGroup_SetChildValue(struct FieldActor *actor, s32 param)
Sets the param byte of every animated part of an actor's sprite.
void Object_RefreshSelectorById(u32 objectId)
Waits, at most 300 frames, for an actor's script to reach its end (command 0x10).
struct FieldActor * Object_GetById(s32 actor)
Returns an actor, or NULL if it does not exist.
Animated sprites: their layers, frames and colour modes, and the resource slots they draw from.
The battle animation state, render objects and effect entries, and the palette buffer work.
struct FieldActor * Camera_GetEventObject(void)
The event command "get view centre": returns the camera object.
Character numbers, with each character's Japanese name.
The engine calls the debug menus import, and their palette swatch tiles.
static s32 FieldScheduler_AddCallback(SchedulerCallback callback, s32 priority)
Registers a main-image scheduler callback.
FacingObject, the view of an object that turns to face a target.
void ObjectDispatch_SetAnimationSpeed(struct DispatchObject *rawObject, s32 value)
Sets the animation speed (timer step) of all of an object's sprites.
void FieldScene_PrepareActors(struct ScenePlacement *entry)
Field effects, their scripts and the flags that spawn them.
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_ActorFaceActor(s32 actor, s32 target, s32 frames)
static void Actor_SetDestination(s32 actor, s32 x, s32 z)
static void Actor_FaceDirection(s32 actor, s32 facing, s32 frames)
void Engine_ActorSetAnimationAndWait(s32 actor, s32 animation)
void Engine_SanctumOpen(s32 priest)
void Object_SetMode(struct FieldActor *object, s32 animation)
static void Map_AnimateCells(const u16 *steps, s32 destX, s32 destY)
#define SPEAKER_WINDOW_ABOVE
void Engine_ActorSetSpritePriority(s32 actor, s32 priority)
void Engine_PsynergyBegin(s32 ability, s32 flags)
struct FieldActor * Engine_ActorLookup(s32 actor)
static void Event_ShowMessageAndWait(s32 speaker, s32 flags, s32 frames)
static void Actor_SetBuiltinAction(s32 actor, s32 action)
#define SPEAKER_PORTRAIT_RIGHT
void Engine_CameraSetSpeed(s32 speed, s32 acceleration)
static void Actor_WalkToAndWait(s32 actor, s32 x, s32 z)
static void Camera_SetSpeed(s32 speed, s32 acceleration)
void Engine_CameraMoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
void Engine_PsynergyRaiseHands(void)
void Engine_PsynergyLowerHands(void)
void Engine_ActorJump(s32 actor, s32 height, s32 frames)
static void Actor_MoveToAndWait(s32 actor, s32 x, s32 z)
s32 Engine_MathSin(s32 angle)
#define MAP_CELL_STEP(srcX, srcY, width, height, frames)
static void Actor_SetDestinationOffset(s32 actor, s32 dx, s32 dz)
void Engine_InnOpen(s32 inn, s32 keeper)
void Engine_EventCloseScreen(void)
void Engine_ObjectDispatchRelease(struct FieldActor *object)
static void Actor_RunActionScriptAndWait(s32 actor, const s32 *script)
Runs a script, waiting at most 300 frames for its final command.
static void Map_CopyCellsTo(s32 srcX, s32 srcY, s32 destX, s32 destY, s32 width, s32 height)
static void Actor_FaceActor(s32 actor, s32 target, s32 frames)
static void ColorBuffer_ApplyTarget(s32 value, s32 mode)
static void Actor_WalkTo(s32 actor, s32 x, s32 z)
void Engine_EventWaitForScreen(void)
static void Actor_ShowEmote(s32 actor, s32 emote, s32 frames)
s32 Engine_EventAskYesNo(s32 speaker, s32 flags)
void Engine_ObjectSetScript(struct FieldActor *object, const s32 *script)
void Engine_EventOpenScreen(void)
void Engine_GameFlagSet(s32 flag)
void Engine_GameFlagClear(s32 flag)
void Engine_CameraWaitForMove(void)
static void Actor_SetActionScript(s32 actor, const s32 *script)
The engine encodes either a built-in action or an action-script address.
void Engine_ActorWaitForMove(s32 actor)
static void Map_CopyCellAttributes(s32 srcX, s32 srcY, s32 width, s32 height, s32 destX, s32 destY)
void Engine_ActorStop(s32 actor)
void Engine_ActorRunRepeatedMotion(s32 actor, s32 repeats)
void Engine_ActorWalkTo(s32 actor, s32 x, s32 z)
static void Event_ShowMessage(s32 speaker, s32 flags)
void Engine_ActorSetAttachedEffect(s32 actor, s32 effect)
static void Event_PlayCue(s32 cue)
void Engine_ActorSetChildValue(s32 actor, s32 value)
#define MAP_CELL_STEPS_END
s32 Engine_GameFlagIsSet(s32 flag)
void Engine_MapAnimateCells(const u16 *steps, s32 destX, s32 destY)
void Engine_PsynergyPlayEffect(s32 effect)
void Engine_ActorStartRepeatedMotion(s32 actor, s32 repeats)
static struct FieldActor * Object_Create(s32 type, s32 fixed_x, s32 fixed_y, s32 fixed_z)
static s32 Event_AskYesNo(s32 speaker, s32 flags)
static void Actor_CenterAndWalk(s32 actor, s32 priority, s32 dz)
static void Actor_SetSpeed(s32 actor, s32 speed, s32 acceleration)
void Engine_MapRedraw(void)
void Engine_ShopOpen(s32 shop, s32 keeper)
void Engine_ColorBufferInterpolate(s32 frames)
static void Camera_MoveTo(s32 fixed_x, s32 fixed_y, s32 fixed_z, s32 pan)
static void Actor_SetPosition(s32 actor, s32 fixed_x, s32 fixed_z)
void Engine_EventWait(s32 frames)
static void Actor_SetAttachedEffect(s32 actor, s32 effect)
void Engine_PsynergySetTarget(s32 caster, s32 target)
static void ColorBuffer_ApplySource(s32 value, s32 mode)
@ TRANSITION_BACKDROP_FADE
#define SCENE_TRANSITION(style, variant)
@ ACTOR_FACES_MOTION
turns toward its velocity, 1/16 turn a frame
The scene table formats: entrances, exits, placements and events, and the macros that write them.
#define SCENE_EXITS(scene)
#define IF_FLAG_SET(flag)
#define FIND_MESSAGE(message)
#define SCENE_EXIT(exit, scene, entrance)
@ TALK_FACE_PARTY_AND_BACK
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define TOUCH_WALKING_INTO(facing)
#define FIND_COINS(coins)
The scene service layer: one typed inline for each engine service a scene calls by its own name,...
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 FieldVector_AddPolarOffset(s32 radius, s32 heading, struct FieldPosition *probe)
16.16 fixed-point constants, sine and cosine, and the library division.
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Game flags, named where their meaning is shown.
#define FLAG_IMIL_APPRENTICE_OFFERED_HEALING
Her apprentice told the party she can act as its healer in the sanctum.
#define FLAG_SCENE_TEMP_03
#define FLAG_IMIL_HEARD_MIA_WENT_TO_COUPLE
Mia's second apprentice told the party Mia went to the old couple's house.
#define FLAG_IN_PARTY(character)
Flags 0 to 7: the character with that id (character_ids.h) is in the party (Party_AddActiveOwner).
#define FLAG_IMIL_MIA_SAID_FAREWELL
to her two apprentices
#define FLAG_SCENE_TEMP_00
#define FLAG_KEEP_PARTY_POSITION
#define FLAG_IMIL_MET_MIA
Mia healed the old man, and the party saw the Mercury Lighthouse lit.
#define FLAG_SCENE_TEMP_01
#define FLAG_SATUROS_BEATEN_AT_MERCURY
Saturos is beaten at Mercury Lighthouse: the Hermes fountain at its foot flows again.
The frame loop's globals: lag counts, the CPU load display and the VBlank flags.
volatile u32 gFrameCount
Frames WaitFrames has finished.
GameState, the game's state: play time, coins, the scene and the leader's position,...
struct GameState gGameState
The work slots of gWorkSlot, read through their own names.
void * gEffectWork
Slot 56: points to a scene-specific structure.
The screen blend's globals and the graphics routines.
static void Imil_ReadOldWomanMind(void)
Mind Read on the old woman: about Mia's clan, her husband's exaggerating, or Mia running all over tow...
static void Imil_TalkToInnkeeper(void)
Across the counter, the leader facing north, the inn opens; otherwise the innkeeper talks of the two ...
s32 gImil_FaceTargetScript[]
u16 gImil_DoorCellSteps3[]
struct SceneEvent gImil_InteriorEvents[]
static void Imil_ReadApprenticeMind(void)
Mind Read on Mia's apprentice: she will do her best, or, once Mia has joined, she feels grown up.
static void Imil_UpdateRisingEffect(union FieldObject *object)
Moves and enlarges an ambient effect, then releases it when its timer expires.
u16 * gImil_DoorCellSteps[]
static void Imil_ReadCountingChildMind(void)
Mind Read on the counting child: admiration for Mia.
ImilActor
Imil's two maps share actor numbers; each is named on the map it is proved.
@ ACTOR_SECOND_APPRENTICE
@ ACTOR_OLD_WOMAN
the old couple's house
@ ACTOR_ITEM_SHOP_CHILD
minds the shop while the mother is sick
@ ACTOR_APPRENTICE
Mia's apprentices, the first in the sanctum.
@ ACTOR_COLD_VILLAGER
shivering and sneezing in the snow
static void Imil_TalkToColdVillager(void)
The cold villager sneezes and shivers, waiting for Mia; once she travels with the party (flag 3),...
s32 gImil_MiaCheckRoomScript[]
static void Imil_RunIceSlide(void)
The leader slides along the ice until something stops him.
static void Imil_TalkToOldWoman(void)
Once the epidemic is cured, the old woman asks what happened at the lighthouse.
static void Imil_InitializeRisingEffect(struct FieldActor *work)
Resets a rising effect's motion, sprite priority, and initial scale.
static void Imil_TalkToCountingChild(void)
The counting child stops, turns to the leader and goes back to counting.
u16 gImil_DoorCellSteps0[]
static void Imil_OldManBobsAndSpeaks(void)
The old man bobs and speaks as the healing reaches him.
const u32 * Imil_GetExits(void)
static void Imil_LeaveNorth(void)
Walking into the north path, the leader faces north and leaves the town.
u16 gImil_DoorCellSteps4[]
static void Imil_ReadColdVillagerMind(void)
Mind Read on the cold villager: Mia should be here by now, or, once she has joined the party,...
static void Imil_TalkToItemMerchant(void)
The item shop: once the town is cured the mother sells again; before, her child minds the counter whi...
static UNUSED void Imil_SwayAndSpark(struct FieldActor *actor)
Sways an unused actor and occasionally emits a rising spark.
struct SceneEvent gImil_TownEvents[]
static void Imil_UpdateMapLayerByLeaderPosition(void)
The leader walks on map layer 0 near the middle of town and on layer 1 elsewhere.
static void Imil_MeetMiaAtOldCouplesHouse(void)
After hearing where Mia went, the party finds her at the old couple's house.
static void Imil_AskAboutWeapons(void)
Once the epidemic is cured, the weapon merchant asks whether the party wants weapons.
static void Imil_TalkToApprentice(void)
Across the counter, the leader facing north, Mia's apprentice offers the sanctum, the first time sayi...
const struct SceneEvent * Imil_GetEvents(void)
The town's or the interiors' conversations and Psynergy targets.
ImilTownFlag
The town's own flags, kept while the party is there.
@ FLAG_IMIL_MAP_LAYER_0
Which map layer the leader walks on, from where he stands.
@ FLAG_IMIL_SNOWMAN_ON_CHIMNEY
s16 gImil_DoorCellPoints[][2]
Cell position (x, y) for each exit.
struct ScenePlacement gImil_TownPlacements[]
u16 gImil_DoorCellSteps2[]
static void Imil_OpenDoorAndExit(void)
Walking north into a door, everyone stops, the door opens and the leader walks in; door 6 has its own...
static void Imil_SpawnAmbientEffects(void)
Effects rise at five places in the town, staggered over each second.
s32 gImil_ColdVillagerScript[]
static void Imil_TalkToOldMan(void)
The old man moans for help until the old woman hurries to fetch Mia; after Mia's healing he feels muc...
const struct SceneEntrance * Imil_GetEntrances(void)
Imil is two maps: the town and its interiors.
u16 gImil_DoorCellSteps5[]
struct SceneEntrance gImil_InteriorEntrances[]
static void Imil_StartRisingEffect(union FieldObject *object)
Initializes a newly created ambient effect for its one-second rise.
struct ScenePlacement gImil_TownPlacementsCured[]
const struct SceneRegion * Imil_GetRegions(void)
struct ScenePlacement gImil_InteriorPlacements[]
static void Imil_TalkToWeaponMerchant(void)
Across the counter, the leader facing north, the weapon shop opens once the town is cured; before,...
static UNUSED void Imil_UpdateCountdownArc(struct FieldActor *actor)
Moves an unused effect around its stored origin until its timer expires.
static void Imil_AskAboutRestaurantMenu(void)
Once the epidemic is cured, the restaurant owner offers the menu.
static void Imil_GreetVisitor(void)
A villager turns to the leader and asks whether he is new in Imil.
s32 gImil_FollowMiaOutScript[]
static void Imil_MoveSnowmanToChimney(void)
Moved onto the chimney, the snowman stays there and blocks its cell.
static s32 Imil_UpdateShiver(struct ScriptInterpreter *interpreter)
A sick person shivers: a quick squash, then a pause, longer for the old man.
s32 gImil_CaretakerHurryScript[]
static void Imil_StartIceSlide(void)
Stepping onto the ice starts a slide.
static void Imil_MiaCastsPlyOnOldMan(void)
static void Imil_TalkToSecondApprentice(void)
Mia's second apprentice asks whether the party has visited the old couple, where Mia went; once Mia h...
static void Imil_ShowFirstArrival(void)
Arriving for the first time, the leader walks into town.
static void Imil_TalkToArmorMerchant(void)
Across the counter, the leader facing north, the armor shop opens once the town is cured; before,...
u16 gImil_DoorCellSteps1[]
static void Imil_ReadSecondApprenticeMind(void)
Mind Read on the second apprentice: Mia had a bad feeling, or, once she has joined,...
struct SceneEntrance gImil_TownEntrances[]
s32 gImil_MiaRunOutScript[]
s32 gImil_LeaderStepAsideScript[]
static void Imil_TalkToOldManInBed(void)
After Mia's visit, speaking across the bed reaches the old man.
static void Imil_TurnSlidingActor(union FieldObject *object)
While sliding, the leader turns toward the held direction.
static void Imil_MiaSaysFarewellToApprentices(void)
Once the town is cured, Mia says farewell to her two apprentices in the sanctum before leaving with t...
s32 gImil_ArcOrigin[]
The position (x, y, z) the unused arc and sway effects move around.
s32 Imil_Initialize(void)
The town gets its rising effects, map layers and snowman, and the first arrival walks in; each interi...
const struct ScenePlacement * Imil_GetPlacements(void)
Once the epidemic is cured (flag 0x881), the townspeople are well again and the old man is up and abo...
Item numbers, named from the English release.
The IWRAM call layer: the routines the game keeps resident in IWRAM, each at its fixed address,...
#define Iwram_MulQ16(left, right)
The keypad state the VBlank interrupt keeps.
volatile u32 gKeysHeld
Keys down now.
Small statement macros both games use for positions, velocities and bounds.
#define SET_VECTOR(v, x, y, z)
Sets the x, y and z of a three-part vector: a position about to be projected, a per-frame step,...
Maps: their cells, layers, animations and blend scripts, and the map state.
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,...
The reel game's title lettering.
Field object scripts: one s32 command word, then its operands, as gScriptObject_CommandTable runs the...
#define SC_SET(w, v)
Write a work value.
#define SC_LOOP(n, to)
Repeat up to n times.
#define SC_POS(x, y, z)
Set position.
#define SC_SYNC
Wait for arrival.
#define SC_MOVE(x, y, z)
Move toward the target.
#define SC_WAIT(n)
Wait n frames.
#define SC_TOP
Script start.
#define SC_END
Return to the main script.
void BattleEffect_CleanupSceneObjects(void)
Ends a Psynergy effect: frees the effect slots still in use and, unless another effect is being resol...
Declares nothing: an empty header kept for the files that include it.
void FieldObject_WaitForMove(void *fieldObject)
Waits a frame at a time until a field object has arrived at its target, at most 600 frames.
Palette fades, the battle effect palette buffers and the colour channel curves.
@ PALETTE_TRANSFORM_PLAIN
each colour unchanged
Scene numbers, named after their places.
The field object script interpreter and the operands its commands read.
Song and sound effect ids, indices into gSound_SongTable.
#define SE_JUMP
An actor jumps: ObjectMotion_Launch plays the high jump above 5 pixels a frame.
void Engine_ActorSetAnimation()
struct EventWork * gEventWork
void Engine_EventRequestExit()
void Engine_ActorSetPosition(u32 actor, s32 x, s32 z)
void Engine_EventEnd(void)
void Engine_AudioPlayCue()
void Engine_EventBegin(void)
void Engine_EventSetMessage()
void Engine_EventShowMessage()
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
struct AnimationSpritePart image
u16 priority
2 when created
A field object as the object dispatcher's far calls take it.
The running scene's event work: its placement and event tables, its actors, the triggers and exit it ...
s32 startTransition
SCENE_TRANSITION(style, variant).
s16 touchedTrigger
the step event a touch or exit event answers
s32 transitionFrames
frames
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...
s32 speed
speed limit, 16.16 fixed-point pixels per frame
u16 radius
Collision radius in pixels: 16, or half the sprite metadata's boxY, when created; the overlap checks ...
u8 steeringFlags
ActorSteeringFlag bits.
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
u8 priorityFlags
ActorPriorityFlag bits, read by the scrolling camera.
union FieldCoordinate 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....
s32 scaleX
16.16 fixed point, 0x10000 full size
s32 scaleY
16.16 fixed point, 0x10000 full size
void(*) update(union FieldObject *object)
Called each frame before the object's script, while the object is live.
u16 work
The side of the player's next footprint (2 after a stop), or scene scratch.
u8 collisionFlags
bits: 7 refuses to move into a solid object | 4 nearer for Psynergy targets | 3 never a talk or Psyne...
u8 terrainId
The map layer (0 to 3) its ground height is read from, which the scrolling camera updates from the ce...
s32 countdown
Frames until a scene's update hook releases the effect: 20 for Altin Peak's spray,...
u16 spin
Added to the sprite's rotation each frame by the update hooks, in 1/65536 turns per frame; Imil's ris...
s32 z
16.16 fixed-point pixels
s32 selectedActor
the leader: its unit and its actor
The map work in heap slot 8 (struct MapScrollWork), seen as its tile animation channels,...
u8 unk17
MapScrollWork's footprints; Bilibin Cave sets it.
A scene entrance: where and facing which way the party arrives, and the camera's bounds there (-1 for...
A scene event: its kind and detail, the trigger it answers, its condition and its value (a message or...
An actor a scene places: its sprite, the condition for placing it, how it behaves,...
s32 x
16.16 fixed-point pixels
s32 z
16.16 fixed-point pixels
s32 behavior
A built-in action (enum ActorBehavior, 1 to 7) or an action script, for ObjectMotion_SetActionCallbac...
A scene's exit region: the box that, while its condition holds, takes the party leader out through it...
The prefix that command handlers read from a field object's 0x70-byte slot.
The system's routines and globals: interrupts, BIOS sound bias, random numbers and sleep.
s32 GetMapCellCollision(s32 layer, s32 x, s32 y)
Returns the collision code of a layer's cell at (x, y) in 16.16 pixels.
s32 Map_GetTerrainHeight(s32 layer, s32 x, s32 y)
Returns the ground height of a layer at (x, y) in 16.16 pixels: the height function of the cell's ter...
The integer types, TRUE, UNUSED and the fixed-address macros.
s32 fixed
16.16 fixed-point pixels
An object on the field, read as an actor or as an effect.
struct FieldEffect effect
The patch levels: our groups of the measured changes from the Japanese release.