Mogall Forest's three areas. More...
Go to the source code of this file.
Macros | |
| #define | FIELD_STAGED_ACTOR_IMPORTS |
| #define | MOGALL_FOREST_EAST_ACTOR_CONDITION FLAG_THIRD_AREA_EAST_APE_OUT |
| #define | MOGALL_FOREST_EAST_SHARED_SPRITE_CONDITION FLAG_THIRD_AREA_EAST_APE_OUT |
| #define | DIRECTION_STEP(dx, dz) |
| Pixel step by direction: X in the upper halfword, Z in the lower. | |
Functions | |
| static void | MogallForest_StartDjinnBattle (void) |
| Talking to Quartz in the second area: the Djinni battle (Djinni 2). | |
| static s32 | MogallForest_TryJumpLeaderTo (struct FieldPosition *position) |
| Jumps the leader to an unobstructed fixed-point position and restores motion. | |
| static s32 | MogallForest_CopyTimerToChild (struct ScriptInterpreter *interpreter) |
| Script command: the actor shows the part its timer names. | |
| static s32 | MogallForest_ClearActorSpriteFlags (struct ScriptInterpreter *interpreter) |
| Clears the actor sprite flags when its script requests it. | |
| static void | MogallForest_HopActorTo (s32 actorId, s32 targetX, s32 targetZ, s32 verticalSpeed) |
| Hops an actor to a pixel destination with the requested vertical speed. | |
| static void | MogallForest_SpawnPuffRing (s32 id) |
| Scatters a complete ring of rising puffs around an actor. | |
| static void | MogallForest_ApeComesOut (s32 actorId, s32 drawParameter) |
| The camera goes to the ape's hiding place, which bursts in a ring of puffs, and the ape shows itself. | |
| static void | MogallForest_ApePointsTheWay (s32 guideId) |
| The ape turns to the leader, hops and gestures down the way to go. | |
| const struct SceneEntrance * | MogallForest_GetEntrances (void) |
| const struct SceneRegion * | MogallForest_GetRegions (void) |
| const u32 * | MogallForest_GetExits (void) |
| The exits, shared by the three areas. | |
| const struct ScenePlacement * | MogallForest_GetPlacements (void) |
| static void | MogallForest_FirstArea_PushLog (void) |
| Pushing a log in the first area (walking into trigger 20): the river log pushed to row 26 rolls into the water and can be crossed. | |
| static void | MogallForest_FirstArea_JumpNorth (void) |
| Walking north into trigger 25: the leader jumps north across the log. | |
| static void | MogallForest_FirstArea_JumpSouth (void) |
| Walking south into trigger 26: the leader jumps onto the log, which bobs under the weight. | |
| static void | MogallForest_ReadBrokenSign (void) |
| Searching the sign (trigger 27). | |
| static void | MogallForest_FirstArea_NorthApeShowsWay (void) |
| Force on the north hiding place in the first area: the ape comes out, points the way and hops off south. | |
| static void | MogallForest_FirstArea_ApeAttacks (void) |
| Force on the hostile ape's hiding place: it comes out angry, leaps at the leader and the battle with the Ape begins (encounter table 53, slot 0). | |
| static void | MogallForest_FirstArea_EastApeShowsWay (void) |
| Force on the east hiding place in the first area: the ape comes out, points the way and hops off east. | |
| static void | MogallForest_CatchNut (void) |
| Catch on the Nut floating over the river: it is caught and found. | |
| static void | MogallForest_SecondArea_PushLog (void) |
| Pushing a log in the second area (walking into trigger 20): the log at row 23 changes the ground beside it; the river log pushed to column 35 rolls into the water. | |
| static void | MogallForest_UpdateObstacleFootprint (s32 column, s32 row) |
| Marks the obstacle cell and clears the cells it could have moved from. | |
| static void | MogallForest_SecondArea_UpdateMovableObstacle (void) |
| Move on the second area's obstacle: its footprint follows it, and at (36, 24) it sinks two pixels into place. | |
| static void | MogallForest_SecondArea_NorthApeShowsWay (void) |
| Force on the north hiding place in the second area: the ape points the way and hops off south. | |
| static void | MogallForest_SecondArea_EastApeShowsWay (void) |
| Force on the east hiding place in the second area: the ape points the way and hops off east. | |
| static void | MogallForest_SecondArea_SouthApeHidesAgain (void) |
| Force on the south hiding place the first time: the ape bolts to another hiding place nearby. | |
| static void | MogallForest_SecondArea_SouthApeShowsWay (void) |
| Force on its new hiding place: the ape points the way and hops off west. | |
| static void | MogallForest_ThirdArea_PushLog (void) |
| Pushing a log in the third area (walking into trigger 20): each river log rolls into the water at its column (42 and 40) and can be crossed. | |
| static void | MogallForest_ThirdArea_JumpWest (void) |
| Walking west into trigger 25: the leader jumps onto the second river log, which bobs under the weight. | |
| static void | MogallForest_ThirdArea_UpdateNorthObstacle (void) |
| Move on the third area's north obstacle: at (45, 6) it sinks into place. | |
| static void | MogallForest_ThirdArea_UpdateSouthObstacle (void) |
| Move on the south obstacle: on row 27 it sinks into place and stays. | |
| static void | MogallForest_ThirdArea_ApeAttacks (void) |
| Force on the third area's hostile hiding place: the ape leaps at the leader and the battle with the Ape begins. | |
| static void | MogallForest_ThirdArea_CentralApeShowsWay (void) |
| Force on the central hiding place: the ape points the way and hops off south. | |
| static void | MogallForest_ThirdArea_WestApeShowsWay (void) |
| Force on the west hiding place: the ape points the way and hops off west. | |
| static void | MogallForest_ThirdArea_EastApeHidesAgain (void) |
| Force on the east hiding place the first time: the ape bolts to another hiding place to the south. | |
| static void | MogallForest_ThirdArea_EastApeShowsWay (void) |
| Force on its new hiding place: the ape points the way and hops off south. | |
| static void | MogallForest_ApeLeadsToKillerApe (void) |
| Touching trigger 22 in the third area, once: the ape appears again, turns to the party and leads it south to a hiding place. | |
| static void | MogallForest_KillerApeAttacks (void) |
| Touching trigger 23 until it is beaten: the hiding place shakes twice and out comes the Killer Ape, a fifth again as big, to fight (encounter table 53, slot 1); the party returns to entrance 15. | |
| const struct SceneEvent * | MogallForest_GetEvents (void) |
| s32 | MogallForest_Initialize (void) |
| On entering an area: the first time, an ape peeks out and hides (the first area); apes already out stay gone, rolled logs and moved obstacles stay put; back from the Killer Ape (entrance 15) it is marked beaten. | |
Variables | |
| s32 | gStagedActor_DirectionSteps [] |
| Pixel step by direction: X in the upper halfword, Z in the lower. | |
| u32 | gStagedActor_FootprintKinds [] |
| s32 | gStagedActor_FootprintBounds [] |
| s32 | gEffectScript0 [] |
| s32 | gEffectScript1 [] |
| s32 | gEffectScript2 [] |
| const s32 * | gEffectScripts [] |
| s32 | gMogallForestPlacements2_0 [] |
| s32 | gMogallForest_ActorScript [] |
| s32 | gMogallForestPlacements1_1 [] |
| struct SceneEntrance | gMogallForestEntrances1 [] |
| struct SceneEntrance | gMogallForestEntrances2 [] |
| struct SceneEntrance | gMogallForestEntrances3 [] |
| struct SceneEntrance | gMogallForestEntrancesOther [] |
| u32 | gMogallForest_Exits [] |
| struct ScenePlacement | gMogallForestPlacements1 [] |
| struct ScenePlacement | gMogallForestPlacements2 [] |
| struct ScenePlacement | gMogallForestPlacements3 [] |
| struct ScenePlacement | gMogallForestPlacementsOther [] |
| struct SceneEvent | gMogallForestEvents1 [] |
| struct SceneEvent | gMogallForestEvents2 [] |
| struct SceneEvent | gMogallForestEvents3 [] |
| struct SceneEvent | gMogallForestEventsOther [] |
Mogall Forest's three areas.
Apes (sprite 0xbf) hide in the undergrowth; Force on a hiding place (an invisible actor, sprite 0x16, on the same spot) brings one out. Most point the way on and leave; the hostile ones attack, fought as encounter table 53 slot 0, the "Ape", and the last is the Killer Ape of slot 1. Logs (sprites 0xcd and 0xcf) can be pushed into the river.
Definition in file mogall_forest.c.
| #define FIELD_STAGED_ACTOR_IMPORTS |
Definition at line 19 of file mogall_forest.c.
| #define MOGALL_FOREST_EAST_ACTOR_CONDITION FLAG_THIRD_AREA_EAST_APE_OUT |
Definition at line 129 of file mogall_forest.c.
| #define MOGALL_FOREST_EAST_SHARED_SPRITE_CONDITION FLAG_THIRD_AREA_EAST_APE_OUT |
Definition at line 137 of file mogall_forest.c.
| #define DIRECTION_STEP | ( | dx, | |
| dz ) |
Pixel step by direction: X in the upper halfword, Z in the lower.
Definition at line 1458 of file mogall_forest.c.
| enum MogallForest1Actor |
The first area.
Definition at line 52 of file mogall_forest.c.
| enum MogallForest2Actor |
The second area.
Definition at line 64 of file mogall_forest.c.
| enum MogallForest3Actor |
The third area.
Definition at line 78 of file mogall_forest.c.
| anonymous enum |
Kept until the party leaves the forest: each ape once it has come out (or, for two, moved on to a second hiding place) and each rolled log.
Definition at line 96 of file mogall_forest.c.
| anonymous enum |
Scene flag, kept while the party stays in the area.
| Enumerator | |
|---|---|
| FLAG_SOUTH_OBSTACLE_SETTLED | |
Definition at line 117 of file mogall_forest.c.
| anonymous enum |
| Enumerator | |
|---|---|
| FLAG_NUT_CAUGHT | |
| FLAG_CHEST_APPLE | |
| FLAG_CHEST_ITEM_5D | |
Definition at line 119 of file mogall_forest.c.
|
static |
Talking to Quartz in the second area: the Djinni battle (Djinni 2).
Definition at line 146 of file mogall_forest.c.
Referenced by MogallForest_StartDjinnBattle().
|
static |
Jumps the leader to an unobstructed fixed-point position and restores motion.
Definition at line 152 of file mogall_forest.c.
Referenced by MogallForest_FirstArea_JumpNorth(), MogallForest_FirstArea_JumpSouth(), MogallForest_ThirdArea_JumpWest(), and MogallForest_TryJumpLeaderTo().
|
static |
Script command: the actor shows the part its timer names.
Definition at line 187 of file mogall_forest.c.
Referenced by MogallForest_CopyTimerToChild().
|
static |
Clears the actor sprite flags when its script requests it.
Definition at line 195 of file mogall_forest.c.
Referenced by MogallForest_ClearActorSpriteFlags().
Hops an actor to a pixel destination with the requested vertical speed.
Definition at line 202 of file mogall_forest.c.
Referenced by MogallForest_ApeLeadsToKillerApe(), MogallForest_FirstArea_ApeAttacks(), MogallForest_FirstArea_EastApeShowsWay(), MogallForest_FirstArea_NorthApeShowsWay(), MogallForest_HopActorTo(), MogallForest_Initialize(), MogallForest_KillerApeAttacks(), MogallForest_SecondArea_EastApeShowsWay(), MogallForest_SecondArea_NorthApeShowsWay(), MogallForest_SecondArea_SouthApeHidesAgain(), MogallForest_SecondArea_SouthApeShowsWay(), MogallForest_ThirdArea_ApeAttacks(), MogallForest_ThirdArea_CentralApeShowsWay(), MogallForest_ThirdArea_EastApeHidesAgain(), MogallForest_ThirdArea_EastApeShowsWay(), and MogallForest_ThirdArea_WestApeShowsWay().
|
static |
Scatters a complete ring of rising puffs around an actor.
Definition at line 221 of file mogall_forest.c.
Referenced by MogallForest_ApeComesOut(), MogallForest_Initialize(), MogallForest_KillerApeAttacks(), MogallForest_SecondArea_SouthApeHidesAgain(), MogallForest_SpawnPuffRing(), and MogallForest_ThirdArea_EastApeHidesAgain().
The camera goes to the ape's hiding place, which bursts in a ring of puffs, and the ape shows itself.
Definition at line 252 of file mogall_forest.c.
Referenced by MogallForest_ApeComesOut(), MogallForest_ApeLeadsToKillerApe(), MogallForest_FirstArea_ApeAttacks(), MogallForest_FirstArea_EastApeShowsWay(), MogallForest_FirstArea_NorthApeShowsWay(), MogallForest_SecondArea_EastApeShowsWay(), MogallForest_SecondArea_NorthApeShowsWay(), MogallForest_SecondArea_SouthApeHidesAgain(), MogallForest_SecondArea_SouthApeShowsWay(), MogallForest_ThirdArea_ApeAttacks(), MogallForest_ThirdArea_CentralApeShowsWay(), MogallForest_ThirdArea_EastApeHidesAgain(), MogallForest_ThirdArea_EastApeShowsWay(), and MogallForest_ThirdArea_WestApeShowsWay().
|
inlinestatic |
The ape turns to the leader, hops and gestures down the way to go.
Definition at line 265 of file mogall_forest.c.
Referenced by MogallForest_ApePointsTheWay(), MogallForest_FirstArea_EastApeShowsWay(), MogallForest_FirstArea_NorthApeShowsWay(), MogallForest_SecondArea_EastApeShowsWay(), MogallForest_SecondArea_NorthApeShowsWay(), MogallForest_SecondArea_SouthApeShowsWay(), MogallForest_ThirdArea_CentralApeShowsWay(), MogallForest_ThirdArea_EastApeShowsWay(), and MogallForest_ThirdArea_WestApeShowsWay().
| const struct SceneEntrance * MogallForest_GetEntrances | ( | void | ) |
Definition at line 274 of file mogall_forest.c.
Referenced by MogallForest_GetEntrances().
| const struct SceneRegion * MogallForest_GetRegions | ( | void | ) |
Definition at line 289 of file mogall_forest.c.
Referenced by MogallForest_GetRegions().
| const u32 * MogallForest_GetExits | ( | void | ) |
The exits, shared by the three areas.
Definition at line 292 of file mogall_forest.c.
Referenced by MogallForest_GetExits().
| const struct ScenePlacement * MogallForest_GetPlacements | ( | void | ) |
Definition at line 294 of file mogall_forest.c.
Referenced by MogallForest_GetPlacements().
|
static |
Pushing a log in the first area (walking into trigger 20): the river log pushed to row 26 rolls into the water and can be crossed.
Definition at line 311 of file mogall_forest.c.
Referenced by MogallForest_FirstArea_PushLog().
|
static |
Walking north into trigger 25: the leader jumps north across the log.
Definition at line 336 of file mogall_forest.c.
Referenced by MogallForest_FirstArea_JumpNorth().
|
static |
Walking south into trigger 26: the leader jumps onto the log, which bobs under the weight.
Definition at line 354 of file mogall_forest.c.
Referenced by MogallForest_FirstArea_JumpSouth().
|
static |
Searching the sign (trigger 27).
"The broken sign reads: North: Fuchin Temple / South: Mogall Prairie..."
Definition at line 391 of file mogall_forest.c.
Referenced by MogallForest_ReadBrokenSign().
|
static |
Force on the north hiding place in the first area: the ape comes out, points the way and hops off south.
Definition at line 400 of file mogall_forest.c.
Referenced by MogallForest_FirstArea_NorthApeShowsWay().
|
static |
Force on the hostile ape's hiding place: it comes out angry, leaps at the leader and the battle with the Ape begins (encounter table 53, slot 0).
Definition at line 436 of file mogall_forest.c.
Referenced by MogallForest_FirstArea_ApeAttacks().
|
static |
Force on the east hiding place in the first area: the ape comes out, points the way and hops off east.
Definition at line 476 of file mogall_forest.c.
Referenced by MogallForest_FirstArea_EastApeShowsWay().
|
static |
Catch on the Nut floating over the river: it is caught and found.
Definition at line 510 of file mogall_forest.c.
Referenced by MogallForest_CatchNut().
|
static |
Pushing a log in the second area (walking into trigger 20): the log at row 23 changes the ground beside it; the river log pushed to column 35 rolls into the water.
Definition at line 522 of file mogall_forest.c.
Referenced by MogallForest_SecondArea_PushLog().
Marks the obstacle cell and clears the cells it could have moved from.
Definition at line 566 of file mogall_forest.c.
Referenced by MogallForest_SecondArea_UpdateMovableObstacle(), MogallForest_ThirdArea_UpdateNorthObstacle(), MogallForest_ThirdArea_UpdateSouthObstacle(), and MogallForest_UpdateObstacleFootprint().
|
static |
Move on the second area's obstacle: its footprint follows it, and at (36, 24) it sinks two pixels into place.
Definition at line 576 of file mogall_forest.c.
Referenced by MogallForest_SecondArea_UpdateMovableObstacle().
|
static |
Force on the north hiding place in the second area: the ape points the way and hops off south.
Definition at line 600 of file mogall_forest.c.
Referenced by MogallForest_SecondArea_NorthApeShowsWay().
|
static |
Force on the east hiding place in the second area: the ape points the way and hops off east.
Definition at line 631 of file mogall_forest.c.
Referenced by MogallForest_SecondArea_EastApeShowsWay().
|
static |
Force on the south hiding place the first time: the ape bolts to another hiding place nearby.
Definition at line 672 of file mogall_forest.c.
Referenced by MogallForest_SecondArea_SouthApeHidesAgain().
|
static |
Force on its new hiding place: the ape points the way and hops off west.
Definition at line 691 of file mogall_forest.c.
Referenced by MogallForest_SecondArea_SouthApeShowsWay().
|
static |
Pushing a log in the third area (walking into trigger 20): each river log rolls into the water at its column (42 and 40) and can be crossed.
Definition at line 734 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_PushLog().
|
static |
Walking west into trigger 25: the leader jumps onto the second river log, which bobs under the weight.
Definition at line 780 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_JumpWest().
|
static |
Move on the third area's north obstacle: at (45, 6) it sinks into place.
Definition at line 822 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_UpdateNorthObstacle().
|
static |
Move on the south obstacle: on row 27 it sinks into place and stays.
Definition at line 846 of file mogall_forest.c.
Referenced by MogallForest_Initialize(), and MogallForest_ThirdArea_UpdateSouthObstacle().
|
static |
Force on the third area's hostile hiding place: the ape leaps at the leader and the battle with the Ape begins.
Definition at line 874 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_ApeAttacks().
|
static |
Force on the central hiding place: the ape points the way and hops off south.
Definition at line 912 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_CentralApeShowsWay().
|
static |
Force on the west hiding place: the ape points the way and hops off west.
Definition at line 950 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_WestApeShowsWay().
|
static |
Force on the east hiding place the first time: the ape bolts to another hiding place to the south.
Definition at line 989 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_EastApeHidesAgain().
|
static |
Force on its new hiding place: the ape points the way and hops off south.
Definition at line 1007 of file mogall_forest.c.
Referenced by MogallForest_ThirdArea_EastApeShowsWay().
|
static |
Touching trigger 22 in the third area, once: the ape appears again, turns to the party and leads it south to a hiding place.
Definition at line 1049 of file mogall_forest.c.
Referenced by MogallForest_ApeLeadsToKillerApe().
|
static |
Touching trigger 23 until it is beaten: the hiding place shakes twice and out comes the Killer Ape, a fifth again as big, to fight (encounter table 53, slot 1); the party returns to entrance 15.
Definition at line 1083 of file mogall_forest.c.
Referenced by MogallForest_KillerApeAttacks().
| const struct SceneEvent * MogallForest_GetEvents | ( | void | ) |
Definition at line 1154 of file mogall_forest.c.
Referenced by MogallForest_GetEvents().
| s32 MogallForest_Initialize | ( | void | ) |
On entering an area: the first time, an ape peeks out and hides (the first area); apes already out stay gone, rolled logs and moved obstacles stay put; back from the Killer Ape (entrance 15) it is marked beaten.
Definition at line 1172 of file mogall_forest.c.
Referenced by MogallForest_Initialize().
| s32 gStagedActor_DirectionSteps[] |
Pixel step by direction: X in the upper halfword, Z in the lower.
Definition at line 1460 of file mogall_forest.c.
| u32 gStagedActor_FootprintKinds[] |
Definition at line 1470 of file mogall_forest.c.
| s32 gStagedActor_FootprintBounds[] |
Definition at line 1474 of file mogall_forest.c.
| s32 gEffectScript0[] |
| s32 gEffectScript1[] |
| s32 gEffectScript2[] |
| const s32* gEffectScripts[] |
Definition at line 1510 of file mogall_forest.c.
| s32 gMogallForestPlacements2_0[] |
Definition at line 1516 of file mogall_forest.c.
| s32 gMogallForest_ActorScript[] |
Definition at line 1523 of file mogall_forest.c.
Referenced by MogallForest_Initialize().
| s32 gMogallForestPlacements1_1[] |
Definition at line 1532 of file mogall_forest.c.
| struct SceneEntrance gMogallForestEntrances1[] |
Definition at line 1541 of file mogall_forest.c.
Referenced by MogallForest_GetEntrances().
| struct SceneEntrance gMogallForestEntrances2[] |
Definition at line 1554 of file mogall_forest.c.
Referenced by MogallForest_GetEntrances().
| struct SceneEntrance gMogallForestEntrances3[] |
Definition at line 1571 of file mogall_forest.c.
Referenced by MogallForest_GetEntrances().
| struct SceneEntrance gMogallForestEntrancesOther[] |
Definition at line 1590 of file mogall_forest.c.
Referenced by MogallForest_GetEntrances().
| u32 gMogallForest_Exits[] |
Definition at line 1604 of file mogall_forest.c.
Referenced by MogallForest_GetExits().
| struct ScenePlacement gMogallForestPlacements1[] |
Definition at line 1664 of file mogall_forest.c.
Referenced by MogallForest_GetPlacements().
| struct ScenePlacement gMogallForestPlacements2[] |
Definition at line 1686 of file mogall_forest.c.
Referenced by MogallForest_GetPlacements().
| struct ScenePlacement gMogallForestPlacements3[] |
Definition at line 1712 of file mogall_forest.c.
Referenced by MogallForest_GetPlacements().
| struct ScenePlacement gMogallForestPlacementsOther[] |
Definition at line 1746 of file mogall_forest.c.
Referenced by MogallForest_GetPlacements().
| struct SceneEvent gMogallForestEvents1[] |
Definition at line 1750 of file mogall_forest.c.
Referenced by MogallForest_GetEvents().
| struct SceneEvent gMogallForestEvents2[] |
Definition at line 1771 of file mogall_forest.c.
Referenced by MogallForest_GetEvents().
| struct SceneEvent gMogallForestEvents3[] |
Definition at line 1796 of file mogall_forest.c.
Referenced by MogallForest_GetEvents().
| struct SceneEvent gMogallForestEventsOther[] |
Definition at line 1844 of file mogall_forest.c.
Referenced by MogallForest_GetEvents().