Goma Cave: the room with two pillars, a stump and the Djinni Forge. More...
Go to the source code of this file.
Macros | |
| #define | FLAG_GOMA_CAVE_STUMP_FELL 0x300 |
| pushed over into the room below | |
| #define | FLAG_GOMA_CAVE_EAST_PILLAR_IN_PLACE 0x301 |
| sunk into its place | |
| #define | FLAG_GOMA_CAVE_WEST_PILLAR_MOVED 0x302 |
| one step east of its start | |
| #define | WEST_PILLAR 8 |
| #define | STUMP 9 |
| #define | EAST_PILLAR 10 |
| #define | FORGE 12 |
| #define | WITNESS 13 |
| the man who fought Forge and lost it | |
| #define | DIRECTION_STEP(dx, dz) |
| One step per facing: X pixels in the high halfword, Z pixels in the low half. | |
Enumerations | |
| enum | GomaCavePillarFragmentPlane { PLANE_XY = 0 , PLANE_XZ = 1 , PLANE_YZ = 2 } |
Functions | |
| static void | Event_FightForge (void) |
| Talking to Forge: the man beside it jumps in surprise, and the battle with the Djinni begins. | |
| static void | GomaCavePillar_UpdateFragment (union FieldObject *fieldObject) |
| Advances the fragment's selected coordinate plane and keeps its targets in step. | |
| static s32 | GomaCavePillar_FinishFragment (struct ScriptInterpreter *interpreter) |
| Applies child value 15 at the end of a fragment's lifetime. | |
| static void | GomaCavePillar_SpawnFragment (s32 x, s32 y, s32 z, s32 firstRate, s32 secondRate, s32 scriptAndChildValue, s32 planeAndPriority) |
| Creates a fragment with two axis rates, a script and packed plane/priority. | |
| const struct SceneEntrance * | Scene_GetEntrances (void) |
| const struct SceneRegion * | Scene_GetRegions (void) |
| const u32 * | Scene_GetExits (void) |
| Both scenes share one exit table. | |
| const struct ScenePlacement * | Scene_GetPlacements (void) |
| static void | GomaCavePillar_CopyWestPillarCells (s32 sourceColumn) |
| Copies the map cells for the west pillar on either side of its track. | |
| static void | Event_MoveWestPillar (void) |
| Move on the west pillar: it slides between its two places, and the map cells follow it. | |
| static void | GomaCavePillar_SpawnStumpDust (void) |
| While the stump teeters, dust falls from it: one fragment every eighth frame, two on every sixteenth. | |
| static void | Event_PushStumpOver (void) |
| Move on the stump: once it is pushed to the edge (column 25), it teeters shedding dust, tips over and falls into the room below with a crash that shakes the screen. | |
| static void | GomaCavePillar_SettleEastPillar (void) |
| Once the east pillar reaches its place (cell 38, 14), it sinks two pixels into the floor and six fragments fly out around it. | |
| static void | Event_MoveEastPillar (void) |
| Move on the east pillar. | |
| static void | Event_PushEastPillar (void) |
| Walking into the east pillar pushes it a step. | |
| static void | Event_JumpGapWest (void) |
| Walking west at the gap: the leader jumps across it. | |
| const struct SceneEvent * | Scene_GetEvents (void) |
| static void | GomaCavePillar_FidgetWhileForgeFights (void) |
| While the battle with Forge runs, the man reacts on a timer; once the Djinni event is over, it raises event 99. | |
| static void | Event_WitnessCheersForgeCaught (void) |
| Raised once Forge is caught: the man is amazed, then walks off. | |
| s32 | Scene_Initialize (void) |
| Puts the pillars and the stump where the party left them. | |
Variables | |
| s32 | gGomaCavePillar_WitnessFrames |
| s32 | gStagedActor_DirectionSteps [] |
| Pixel step by direction: X in the upper halfword, Z in the lower. | |
| u32 | gStagedActor_FootprintKinds [] |
| s32 | gStagedActor_FootprintBounds [] |
| struct GomaCavePillarFragmentScripts | gGomaCavePillar_FragmentScripts |
| s32 | gGomaCavePillar_FragmentScript0 [] |
| s32 | gGomaCavePillar_FragmentScript1 [] |
| s32 | gGomaCavePillar_FragmentScript2 [] |
| struct SceneEntrance | gGomaCavePillar_Entrances [] |
| u32 | gGomaCavePillar_Exits [] |
| struct ScenePlacement | gGomaCavePillar_Placements [] |
| struct SceneEvent | gGomaCavePillar_Events [] |
Goma Cave: the room with two pillars, a stump and the Djinni Forge.
Definition in file goma_cave_pillar.c.
| #define FLAG_GOMA_CAVE_STUMP_FELL 0x300 |
pushed over into the room below
Definition at line 46 of file goma_cave_pillar.c.
Referenced by Event_PushStumpOver(), and Scene_Initialize().
| #define FLAG_GOMA_CAVE_EAST_PILLAR_IN_PLACE 0x301 |
sunk into its place
Definition at line 47 of file goma_cave_pillar.c.
Referenced by GomaCavePillar_SettleEastPillar(), and Scene_Initialize().
| #define FLAG_GOMA_CAVE_WEST_PILLAR_MOVED 0x302 |
one step east of its start
Definition at line 48 of file goma_cave_pillar.c.
Referenced by Event_MoveWestPillar(), and Scene_Initialize().
| #define WEST_PILLAR 8 |
Definition at line 53 of file goma_cave_pillar.c.
| #define STUMP 9 |
Definition at line 54 of file goma_cave_pillar.c.
| #define EAST_PILLAR 10 |
Definition at line 55 of file goma_cave_pillar.c.
| #define FORGE 12 |
Definition at line 56 of file goma_cave_pillar.c.
Referenced by Event_FightForge().
| #define WITNESS 13 |
the man who fought Forge and lost it
Definition at line 57 of file goma_cave_pillar.c.
Referenced by Event_FightForge(), Event_WitnessCheersForgeCaught(), and GomaCavePillar_FidgetWhileForgeFights().
| #define DIRECTION_STEP | ( | dx, | |
| dz ) |
One step per facing: X pixels in the high halfword, Z pixels in the low half.
Definition at line 545 of file goma_cave_pillar.c.
| Enumerator | |
|---|---|
| PLANE_XY | |
| PLANE_XZ | |
| PLANE_YZ | |
Definition at line 50 of file goma_cave_pillar.c.
|
static |
Talking to Forge: the man beside it jumps in surprise, and the battle with the Djinni begins.
Definition at line 64 of file goma_cave_pillar.c.
Referenced by Event_FightForge().
|
static |
Advances the fragment's selected coordinate plane and keeps its targets in step.
Definition at line 72 of file goma_cave_pillar.c.
Referenced by GomaCavePillar_SpawnFragment(), and GomaCavePillar_UpdateFragment().
|
static |
Applies child value 15 at the end of a fragment's lifetime.
Definition at line 101 of file goma_cave_pillar.c.
Referenced by GomaCavePillar_FinishFragment().
|
static |
Creates a fragment with two axis rates, a script and packed plane/priority.
Definition at line 108 of file goma_cave_pillar.c.
Referenced by Event_PushStumpOver(), GomaCavePillar_SettleEastPillar(), GomaCavePillar_SpawnFragment(), and GomaCavePillar_SpawnStumpDust().
| const struct SceneEntrance * Scene_GetEntrances | ( | void | ) |
Definition at line 147 of file goma_cave_pillar.c.
| const struct SceneRegion * Scene_GetRegions | ( | void | ) |
Definition at line 151 of file goma_cave_pillar.c.
| const u32 * Scene_GetExits | ( | void | ) |
Both scenes share one exit table.
Definition at line 153 of file goma_cave_pillar.c.
| const struct ScenePlacement * Scene_GetPlacements | ( | void | ) |
Definition at line 155 of file goma_cave_pillar.c.
|
inlinestatic |
Copies the map cells for the west pillar on either side of its track.
Definition at line 160 of file goma_cave_pillar.c.
Referenced by Event_MoveWestPillar(), GomaCavePillar_CopyWestPillarCells(), and Scene_Initialize().
|
static |
Move on the west pillar: it slides between its two places, and the map cells follow it.
Definition at line 166 of file goma_cave_pillar.c.
|
static |
While the stump teeters, dust falls from it: one fragment every eighth frame, two on every sixteenth.
Definition at line 188 of file goma_cave_pillar.c.
Referenced by Event_PushStumpOver(), and GomaCavePillar_SpawnStumpDust().
|
static |
Move on the stump: once it is pushed to the edge (column 25), it teeters shedding dust, tips over and falls into the room below with a crash that shakes the screen.
Definition at line 258 of file goma_cave_pillar.c.
Referenced by Event_PushStumpOver(), and Scene_Initialize().
|
static |
Once the east pillar reaches its place (cell 38, 14), it sinks two pixels into the floor and six fragments fly out around it.
Definition at line 347 of file goma_cave_pillar.c.
Referenced by Event_MoveEastPillar(), Event_PushEastPillar(), and GomaCavePillar_SettleEastPillar().
|
static |
Move on the east pillar.
Definition at line 386 of file goma_cave_pillar.c.
|
static |
Walking into the east pillar pushes it a step.
Definition at line 393 of file goma_cave_pillar.c.
Referenced by Event_PushEastPillar(), and Event_PushEastPillar().
|
static |
Walking west at the gap: the leader jumps across it.
Later patches use the shared forward jump.
Definition at line 402 of file goma_cave_pillar.c.
Referenced by Event_JumpGapWest().
| const struct SceneEvent * Scene_GetEvents | ( | void | ) |
Definition at line 440 of file goma_cave_pillar.c.
|
static |
While the battle with Forge runs, the man reacts on a timer; once the Djinni event is over, it raises event 99.
Definition at line 446 of file goma_cave_pillar.c.
Referenced by Event_WitnessCheersForgeCaught(), GomaCavePillar_FidgetWhileForgeFights(), and Scene_Initialize().
|
static |
Raised once Forge is caught: the man is amazed, then walks off.
Definition at line 473 of file goma_cave_pillar.c.
Referenced by Event_WitnessCheersForgeCaught().
| s32 Scene_Initialize | ( | void | ) |
Puts the pillars and the stump where the party left them.
Sets up whichever scene is being entered and runs its arrival events.
Entrance 99 shows the stump falling again; after a Djinni battle, the man's reaction starts.
Definition at line 496 of file goma_cave_pillar.c.
| s32 gGomaCavePillar_WitnessFrames |
Definition at line 253 of file goma_cave_pillar.c.
Referenced by GomaCavePillar_FidgetWhileForgeFights(), and Scene_Initialize().
| s32 gStagedActor_DirectionSteps[] |
Pixel step by direction: X in the upper halfword, Z in the lower.
Definition at line 547 of file goma_cave_pillar.c.
| u32 gStagedActor_FootprintKinds[] |
Definition at line 557 of file goma_cave_pillar.c.
| s32 gStagedActor_FootprintBounds[] |
Definition at line 561 of file goma_cave_pillar.c.
| struct GomaCavePillarFragmentScripts gGomaCavePillar_FragmentScripts |
Definition at line 570 of file goma_cave_pillar.c.
Referenced by GomaCavePillar_SpawnFragment().
| s32 gGomaCavePillar_FragmentScript0[] |
Definition at line 576 of file goma_cave_pillar.c.
| s32 gGomaCavePillar_FragmentScript1[] |
Definition at line 584 of file goma_cave_pillar.c.
| s32 gGomaCavePillar_FragmentScript2[] |
Definition at line 592 of file goma_cave_pillar.c.
| struct SceneEntrance gGomaCavePillar_Entrances[] |
Definition at line 600 of file goma_cave_pillar.c.
Referenced by Scene_GetEntrances().
| u32 gGomaCavePillar_Exits[] |
Definition at line 611 of file goma_cave_pillar.c.
Referenced by Scene_GetExits().
| struct ScenePlacement gGomaCavePillar_Placements[] |
Definition at line 621 of file goma_cave_pillar.c.
Referenced by Scene_GetPlacements().
| struct SceneEvent gGomaCavePillar_Events[] |
Definition at line 631 of file goma_cave_pillar.c.
Referenced by Scene_GetEvents().