Alchemy
Loading...
Searching...
No Matches

mogall_forest.c File Reference

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.

Enumerations

enum  MogallForest1Actor {
  ACTOR_FIRST_AREA_RIVER_LOG = ACTOR_FIRST_PLACED + 1 , ACTOR_FIRST_AREA_NORTH_APE , ACTOR_FIRST_AREA_HOSTILE_APE , ACTOR_FIRST_AREA_EAST_APE ,
  ACTOR_FIRST_AREA_NORTH_HIDEOUT , ACTOR_FIRST_AREA_HOSTILE_HIDEOUT , ACTOR_FIRST_AREA_EAST_HIDEOUT , ACTOR_NUT
}
 The first area. More...
enum  MogallForest2Actor {
  ACTOR_SECOND_AREA_LOG = ACTOR_FIRST_PLACED , ACTOR_SECOND_AREA_RIVER_LOG = ACTOR_FIRST_PLACED + 2 , ACTOR_SECOND_AREA_OBSTACLE , ACTOR_SECOND_AREA_NORTH_APE ,
  ACTOR_SECOND_AREA_EAST_APE , ACTOR_SECOND_AREA_SOUTH_APE , ACTOR_SECOND_AREA_NORTH_HIDEOUT , ACTOR_SECOND_AREA_EAST_HIDEOUT ,
  ACTOR_SECOND_AREA_SOUTH_HIDEOUT , ACTOR_QUARTZ
}
 The second area. More...
enum  MogallForest3Actor {
  ACTOR_THIRD_AREA_LOG = ACTOR_FIRST_PLACED , ACTOR_THIRD_AREA_RIVER_LOG_1 , ACTOR_THIRD_AREA_RIVER_LOG_2 = ACTOR_FIRST_PLACED + 3 , ACTOR_THIRD_AREA_NORTH_OBSTACLE = ACTOR_FIRST_PLACED + 5 ,
  ACTOR_THIRD_AREA_SOUTH_OBSTACLE , ACTOR_THIRD_AREA_HOSTILE_APE , ACTOR_THIRD_AREA_CENTRAL_APE , ACTOR_THIRD_AREA_WEST_APE ,
  ACTOR_THIRD_AREA_EAST_APE , ACTOR_THIRD_AREA_HOSTILE_HIDEOUT , ACTOR_THIRD_AREA_CENTRAL_HIDEOUT , ACTOR_THIRD_AREA_WEST_HIDEOUT ,
  ACTOR_THIRD_AREA_EAST_HIDEOUT
}
 The third area. More...
enum  {
  FLAG_FIRST_AREA_NORTH_APE_OUT = 0x300 , FLAG_FIRST_AREA_HOSTILE_APE_OUT , FLAG_FIRST_AREA_EAST_APE_OUT , FLAG_SECOND_AREA_NORTH_APE_OUT ,
  FLAG_SECOND_AREA_EAST_APE_OUT , FLAG_SECOND_AREA_SOUTH_APE_MOVED , FLAG_SECOND_AREA_SOUTH_APE_OUT , FLAG_THIRD_AREA_HOSTILE_APE_OUT ,
  FLAG_THIRD_AREA_CENTRAL_APE_OUT , FLAG_THIRD_AREA_WEST_APE_OUT , FLAG_THIRD_AREA_EAST_APE_MOVED , FLAG_THIRD_AREA_EAST_APE_OUT ,
  FLAG_FIRST_AREA_LOG_ROLLED = 0x310 , FLAG_SECOND_AREA_LOG_ROLLED , FLAG_THIRD_AREA_FIRST_LOG_ROLLED , FLAG_THIRD_AREA_SECOND_LOG_ROLLED ,
  FLAG_PSYNERGY_STONE = 0x350
}
 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. More...
enum  { FLAG_SOUTH_OBSTACLE_SETTLED = FLAG_SCENE_TEMP_00 + 0x14 }
 Scene flag, kept while the party stays in the area. More...
enum  { FLAG_NUT_CAUGHT = 0xfd4 , FLAG_CHEST_APPLE = 0xf1b , FLAG_CHEST_ITEM_5D = 0xf1a }

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 []

Detailed Description

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.

Macro Definition Documentation

◆ FIELD_STAGED_ACTOR_IMPORTS

#define FIELD_STAGED_ACTOR_IMPORTS

Definition at line 19 of file mogall_forest.c.

◆ MOGALL_FOREST_EAST_ACTOR_CONDITION

#define MOGALL_FOREST_EAST_ACTOR_CONDITION   FLAG_THIRD_AREA_EAST_APE_OUT

Definition at line 129 of file mogall_forest.c.

◆ MOGALL_FOREST_EAST_SHARED_SPRITE_CONDITION

#define MOGALL_FOREST_EAST_SHARED_SPRITE_CONDITION   FLAG_THIRD_AREA_EAST_APE_OUT

Definition at line 137 of file mogall_forest.c.

◆ DIRECTION_STEP

#define DIRECTION_STEP ( dx,
dz )
Value:
(((u32)(dx) << 16) | ((dz) & 0xffff))
unsigned int u32
Definition types.h:15

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 1458 of file mogall_forest.c.

Enumeration Type Documentation

◆ MogallForest1Actor

The first area.

Enumerator
ACTOR_FIRST_AREA_RIVER_LOG 
ACTOR_FIRST_AREA_NORTH_APE 
ACTOR_FIRST_AREA_HOSTILE_APE 
ACTOR_FIRST_AREA_EAST_APE 
ACTOR_FIRST_AREA_NORTH_HIDEOUT 
ACTOR_FIRST_AREA_HOSTILE_HIDEOUT 
ACTOR_FIRST_AREA_EAST_HIDEOUT 
ACTOR_NUT 

a Nut floating over the river, caught with Catch

Definition at line 52 of file mogall_forest.c.

◆ MogallForest2Actor

The second area.

Enumerator
ACTOR_SECOND_AREA_LOG 
ACTOR_SECOND_AREA_RIVER_LOG 
ACTOR_SECOND_AREA_OBSTACLE 

sprite 0x125, moved with Move

ACTOR_SECOND_AREA_NORTH_APE 
ACTOR_SECOND_AREA_EAST_APE 
ACTOR_SECOND_AREA_SOUTH_APE 
ACTOR_SECOND_AREA_NORTH_HIDEOUT 
ACTOR_SECOND_AREA_EAST_HIDEOUT 
ACTOR_SECOND_AREA_SOUTH_HIDEOUT 
ACTOR_QUARTZ 

Venus Djinni 2.

Definition at line 64 of file mogall_forest.c.

◆ MogallForest3Actor

The third area.

Enumerator
ACTOR_THIRD_AREA_LOG 
ACTOR_THIRD_AREA_RIVER_LOG_1 
ACTOR_THIRD_AREA_RIVER_LOG_2 
ACTOR_THIRD_AREA_NORTH_OBSTACLE 
ACTOR_THIRD_AREA_SOUTH_OBSTACLE 
ACTOR_THIRD_AREA_HOSTILE_APE 
ACTOR_THIRD_AREA_CENTRAL_APE 
ACTOR_THIRD_AREA_WEST_APE 
ACTOR_THIRD_AREA_EAST_APE 

later the Killer Ape

ACTOR_THIRD_AREA_HOSTILE_HIDEOUT 
ACTOR_THIRD_AREA_CENTRAL_HIDEOUT 
ACTOR_THIRD_AREA_WEST_HIDEOUT 
ACTOR_THIRD_AREA_EAST_HIDEOUT 

Definition at line 78 of file mogall_forest.c.

◆ anonymous enum

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.

Enumerator
FLAG_FIRST_AREA_NORTH_APE_OUT 
FLAG_FIRST_AREA_HOSTILE_APE_OUT 
FLAG_FIRST_AREA_EAST_APE_OUT 
FLAG_SECOND_AREA_NORTH_APE_OUT 
FLAG_SECOND_AREA_EAST_APE_OUT 
FLAG_SECOND_AREA_SOUTH_APE_MOVED 
FLAG_SECOND_AREA_SOUTH_APE_OUT 
FLAG_THIRD_AREA_HOSTILE_APE_OUT 
FLAG_THIRD_AREA_CENTRAL_APE_OUT 
FLAG_THIRD_AREA_WEST_APE_OUT 
FLAG_THIRD_AREA_EAST_APE_MOVED 
FLAG_THIRD_AREA_EAST_APE_OUT 
FLAG_FIRST_AREA_LOG_ROLLED 
FLAG_SECOND_AREA_LOG_ROLLED 
FLAG_THIRD_AREA_FIRST_LOG_ROLLED 
FLAG_THIRD_AREA_SECOND_LOG_ROLLED 
FLAG_PSYNERGY_STONE 

Definition at line 96 of file mogall_forest.c.

◆ anonymous enum

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

anonymous enum
Enumerator
FLAG_NUT_CAUGHT 
FLAG_CHEST_APPLE 
FLAG_CHEST_ITEM_5D 

Definition at line 119 of file mogall_forest.c.

Function Documentation

◆ MogallForest_StartDjinnBattle()

void MogallForest_StartDjinnBattle ( void )
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().

◆ MogallForest_TryJumpLeaderTo()

s32 MogallForest_TryJumpLeaderTo ( struct FieldPosition * position)
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().

◆ MogallForest_CopyTimerToChild()

s32 MogallForest_CopyTimerToChild ( struct ScriptInterpreter * interpreter)
static

Script command: the actor shows the part its timer names.

Definition at line 187 of file mogall_forest.c.

Referenced by MogallForest_CopyTimerToChild().

◆ MogallForest_ClearActorSpriteFlags()

s32 MogallForest_ClearActorSpriteFlags ( struct ScriptInterpreter * interpreter)
static

Clears the actor sprite flags when its script requests it.

Definition at line 195 of file mogall_forest.c.

Referenced by MogallForest_ClearActorSpriteFlags().

◆ MogallForest_HopActorTo()

◆ MogallForest_SpawnPuffRing()

void MogallForest_SpawnPuffRing ( s32 id)
static

◆ MogallForest_ApeComesOut()

◆ MogallForest_ApePointsTheWay()

◆ MogallForest_GetEntrances()

const struct SceneEntrance * MogallForest_GetEntrances ( void )

Definition at line 274 of file mogall_forest.c.

Referenced by MogallForest_GetEntrances().

◆ MogallForest_GetRegions()

const struct SceneRegion * MogallForest_GetRegions ( void )

Definition at line 289 of file mogall_forest.c.

Referenced by MogallForest_GetRegions().

◆ MogallForest_GetExits()

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().

◆ MogallForest_GetPlacements()

const struct ScenePlacement * MogallForest_GetPlacements ( void )

Definition at line 294 of file mogall_forest.c.

Referenced by MogallForest_GetPlacements().

◆ MogallForest_FirstArea_PushLog()

void MogallForest_FirstArea_PushLog ( void )
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().

◆ MogallForest_FirstArea_JumpNorth()

void MogallForest_FirstArea_JumpNorth ( void )
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().

◆ MogallForest_FirstArea_JumpSouth()

void MogallForest_FirstArea_JumpSouth ( void )
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().

◆ MogallForest_ReadBrokenSign()

void MogallForest_ReadBrokenSign ( void )
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().

◆ MogallForest_FirstArea_NorthApeShowsWay()

void MogallForest_FirstArea_NorthApeShowsWay ( void )
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().

◆ MogallForest_FirstArea_ApeAttacks()

void MogallForest_FirstArea_ApeAttacks ( void )
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().

◆ MogallForest_FirstArea_EastApeShowsWay()

void MogallForest_FirstArea_EastApeShowsWay ( void )
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().

◆ MogallForest_CatchNut()

void MogallForest_CatchNut ( void )
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().

◆ MogallForest_SecondArea_PushLog()

void MogallForest_SecondArea_PushLog ( void )
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().

◆ MogallForest_UpdateObstacleFootprint()

void MogallForest_UpdateObstacleFootprint ( s32 column,
s32 row )
inlinestatic

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().

◆ MogallForest_SecondArea_UpdateMovableObstacle()

void MogallForest_SecondArea_UpdateMovableObstacle ( void )
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().

◆ MogallForest_SecondArea_NorthApeShowsWay()

void MogallForest_SecondArea_NorthApeShowsWay ( void )
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().

◆ MogallForest_SecondArea_EastApeShowsWay()

void MogallForest_SecondArea_EastApeShowsWay ( void )
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().

◆ MogallForest_SecondArea_SouthApeHidesAgain()

void MogallForest_SecondArea_SouthApeHidesAgain ( void )
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().

◆ MogallForest_SecondArea_SouthApeShowsWay()

void MogallForest_SecondArea_SouthApeShowsWay ( void )
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().

◆ MogallForest_ThirdArea_PushLog()

void MogallForest_ThirdArea_PushLog ( void )
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().

◆ MogallForest_ThirdArea_JumpWest()

void MogallForest_ThirdArea_JumpWest ( void )
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().

◆ MogallForest_ThirdArea_UpdateNorthObstacle()

void MogallForest_ThirdArea_UpdateNorthObstacle ( void )
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().

◆ MogallForest_ThirdArea_UpdateSouthObstacle()

void MogallForest_ThirdArea_UpdateSouthObstacle ( void )
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().

◆ MogallForest_ThirdArea_ApeAttacks()

void MogallForest_ThirdArea_ApeAttacks ( void )
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().

◆ MogallForest_ThirdArea_CentralApeShowsWay()

void MogallForest_ThirdArea_CentralApeShowsWay ( void )
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().

◆ MogallForest_ThirdArea_WestApeShowsWay()

void MogallForest_ThirdArea_WestApeShowsWay ( void )
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().

◆ MogallForest_ThirdArea_EastApeHidesAgain()

void MogallForest_ThirdArea_EastApeHidesAgain ( void )
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().

◆ MogallForest_ThirdArea_EastApeShowsWay()

void MogallForest_ThirdArea_EastApeShowsWay ( void )
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().

◆ MogallForest_ApeLeadsToKillerApe()

void MogallForest_ApeLeadsToKillerApe ( void )
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().

◆ MogallForest_KillerApeAttacks()

void MogallForest_KillerApeAttacks ( void )
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().

◆ MogallForest_GetEvents()

const struct SceneEvent * MogallForest_GetEvents ( void )

Definition at line 1154 of file mogall_forest.c.

Referenced by MogallForest_GetEvents().

◆ MogallForest_Initialize()

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().

Variable Documentation

◆ gStagedActor_DirectionSteps

s32 gStagedActor_DirectionSteps[]
Initial value:
= {
DIRECTION_STEP(0, 16), DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0),
DIRECTION_STEP(-16, 0), DIRECTION_STEP(-16, 0), DIRECTION_STEP(0, -16),
DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16), DIRECTION_STEP(0, -16),
}
#define DIRECTION_STEP(dx, dz)
Pixel step by direction: X in the upper halfword, Z in the lower.

Pixel step by direction: X in the upper halfword, Z in the lower.

Definition at line 1460 of file mogall_forest.c.

◆ gStagedActor_FootprintKinds

u32 gStagedActor_FootprintKinds[]
Initial value:
= {
207, 205, 228, 229, 298, 297,
}

Definition at line 1470 of file mogall_forest.c.

◆ gStagedActor_FootprintBounds

s32 gStagedActor_FootprintBounds[]
Initial value:
= {
-32, -8, 32, 8,
-8, -32, 8, 32,
-32, -16, 32, 0,
-8, -32, 8, 32,
-32, -8, 32, 8,
-8, -32, 8, 32,
}

Definition at line 1474 of file mogall_forest.c.

◆ gEffectScript0

s32 gEffectScript0[]
Initial value:
= {
SC_WAIT(1),
SC_WAIT(1),
SC_POS(0, 0, 0),
SC_WAIT(1),
}
#define SC_LOOP(n, to)
Repeat up to n times.
Definition objcmd.h:28
#define SC_POS(x, y, z)
Set position.
Definition objcmd.h:18
#define SC_FREE
Release.
Definition objcmd.h:43
#define SC_WAIT(n)
Wait n frames.
Definition objcmd.h:16
#define SC_TOP
Script start.
Definition objcmd.h:13

Definition at line 1483 of file mogall_forest.c.

◆ gEffectScript1

s32 gEffectScript1[]
Initial value:
= {
SC_WAIT(1),
SC_WAIT(1),
SC_POS(0, 0, 0),
SC_WAIT(1),
}

Definition at line 1492 of file mogall_forest.c.

◆ gEffectScript2

s32 gEffectScript2[]
Initial value:
= {
SC_WAIT(1),
SC_LOOP(126, SC_TOP),
SC_WAIT(1),
SC_POS(0, 0, 0),
SC_WAIT(1),
}

Definition at line 1501 of file mogall_forest.c.

◆ gEffectScripts

const s32* gEffectScripts[]
Initial value:
= {
}
s32 gEffectScript0[]
s32 gEffectScript1[]
s32 gEffectScript2[]

Definition at line 1510 of file mogall_forest.c.

◆ gMogallForestPlacements2_0

s32 gMogallForestPlacements2_0[]
Initial value:
= {
SC_ARG(2),
SC_SET(0x23, 6),
}
static s32 MogallForest_CopyTimerToChild(struct ScriptInterpreter *interpreter)
Script command: the actor shows the part its timer names.
#define SC_SET(w, v)
Write a work value.
Definition objcmd.h:37
#define SC_ARG(v)
Definition objcmd.h:44
#define SC_END
Return to the main script.
Definition objcmd.h:32
#define SC_CALL(fn)
Definition objcmd.h:50

Definition at line 1516 of file mogall_forest.c.

◆ gMogallForest_ActorScript

s32 gMogallForest_ActorScript[]
Initial value:
= {
SC_SET(0x23, 15),
}
#define Q16_ONE
One in the engine's signed 16.16 fixed-point format.
Definition fixed_math.h:10
static s32 MogallForest_ClearActorSpriteFlags(struct ScriptInterpreter *interpreter)
Clears the actor sprite flags when its script requests it.
@ SW_SCALE_Y
Definition objcmd.h:63
@ SW_SCALE_X
Definition objcmd.h:62

Definition at line 1523 of file mogall_forest.c.

Referenced by MogallForest_Initialize().

◆ gMogallForestPlacements1_1

s32 gMogallForestPlacements1_1[]
Initial value:
= {
SC_SET(SW_Y, 0),
SC_WAIT(2),
}
#define PIXELS(value)
@ SW_TARGET_Y
Definition objcmd.h:70
@ SW_MOTION
Definition objcmd.h:75
@ SW_Y
Definition objcmd.h:59

Definition at line 1532 of file mogall_forest.c.

◆ gMogallForestEntrances1

struct SceneEntrance gMogallForestEntrances1[]
Initial value:
= {
{ 1, CONDITION_ALWAYS, 136, 0, 24, FACING_SOUTH, 0, 0, 0, 272, 224, 0 },
{ 2, CONDITION_ALWAYS, 24, 0, 128, FACING_EAST, 0, 0, 0, 272, 224, 0 },
{ 3, CONDITION_ALWAYS, 248, 0, 128, FACING_WEST, 0, 0, 0, 272, 224, 0 },
{ 4, CONDITION_ALWAYS, 136, 0, 200, FACING_NORTH, 0, 0, 0, 272, 224, 0 },
{ 5, CONDITION_ALWAYS, 72, 0, 264, FACING_SOUTH, 0, 0, 240, 272, 464, 0 },
{ 6, CONDITION_ALWAYS, 200, 0, 440, FACING_NORTH, 0, 0, 240, 272, 464, 0 },
{ 7, CONDITION_ALWAYS, 416, 0, 264, FACING_SOUTH, 0, 288, 240, 672, 624, 0 },
{ 8, CONDITION_ALWAYS, 560, 0, 264, FACING_SOUTH, 0, 288, 240, 672, 624, 0 },
{ 9, CONDITION_ALWAYS, 648, 0, 344, FACING_WEST, 0, 288, 240, 672, 624, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_EAST
Definition field_scene.h:26
@ FACING_NORTH
Definition field_scene.h:32
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30

Definition at line 1541 of file mogall_forest.c.

Referenced by MogallForest_GetEntrances().

◆ gMogallForestEntrances2

struct SceneEntrance gMogallForestEntrances2[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 120, 0, 149, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 24, 0, 128, FACING_EAST, 0, 0, 0, 272, 224, 0 },
{ 2, CONDITION_ALWAYS, 248, 0, 128, FACING_WEST, 0, 0, 0, 272, 224, 0 },
{ 3, CONDITION_ALWAYS, 424, 0, 24, FACING_SOUTH, 0, 288, 0, 560, 224, 0 },
{ 4, CONDITION_ALWAYS, 312, 0, 136, FACING_EAST, 0, 288, 0, 560, 224, 0 },
{ 5, CONDITION_ALWAYS, 536, 0, 120, FACING_WEST, 0, 288, 0, 560, 224, 0 },
{ 6, CONDITION_ALWAYS, 424, 0, 200, FACING_NORTH, 0, 288, 0, 560, 224, 0 },
{ 7, CONDITION_ALWAYS, 744, 0, 24, FACING_SOUTH, 0, 576, 0, 848, 224, 0 },
{ 8, CONDITION_ALWAYS, 744, 0, 200, FACING_NORTH, 0, 576, 0, 848, 224, 0 },
{ 9, CONDITION_ALWAYS, 24, 0, 368, FACING_EAST, 0, 0, 240, 272, 464, 0 },
{ 10, CONDITION_ALWAYS, 488, 0, 264, FACING_SOUTH, 0, 288, 240, 736, 624, 0 },
{ 11, CONDITION_ALWAYS, 312, 0, 528, FACING_EAST, 0, 288, 240, 736, 624, 0 },
{ 12, CONDITION_ALWAYS, 360, 0, 600, FACING_NORTH, 0, 288, 240, 736, 624, 0 },
}

Definition at line 1554 of file mogall_forest.c.

Referenced by MogallForest_GetEntrances().

◆ gMogallForestEntrances3

struct SceneEntrance gMogallForestEntrances3[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 172, 0, 160, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 24, 0, 128, FACING_EAST, 0, 0, 0, 272, 224, 0 },
{ 2, CONDITION_ALWAYS, 248, 0, 128, FACING_WEST, 0, 0, 0, 272, 224, 0 },
{ 3, CONDITION_ALWAYS, 424, 0, 24, FACING_SOUTH, 0, 288, 0, 560, 224, 0 },
{ 4, CONDITION_ALWAYS, 312, 0, 160, FACING_EAST, 0, 288, 0, 560, 224, 0 },
{ 5, CONDITION_ALWAYS, 536, 0, 160, FACING_WEST, 0, 288, 0, 560, 224, 0 },
{ 6, CONDITION_ALWAYS, 424, 0, 200, FACING_NORTH, 0, 288, 0, 560, 224, 0 },
{ 7, CONDITION_ALWAYS, 824, 0, 136, FACING_WEST, 0, 576, 0, 848, 224, 0 },
{ 8, CONDITION_ALWAYS, 728, 0, 264, FACING_SOUTH, 0, 400, 240, 848, 640, 0 },
{ 9, CONDITION_ALWAYS, 824, 0, 512, FACING_WEST, 0, 400, 240, 848, 640, 0 },
{ 10, CONDITION_ALWAYS, 824, 0, 608, FACING_WEST, 0, 400, 240, 848, 640, 0 },
{ 11, CONDITION_ALWAYS, 736, 0, 616, FACING_NORTH, 0, 400, 240, 848, 640, 0 },
{ 12, CONDITION_ALWAYS, 264, 0, 264, FACING_SOUTH, 0, 0, 240, 384, 496, 0 },
{ 13, CONDITION_ALWAYS, 136, 0, 472, FACING_NORTH, 0, 0, 240, 384, 496, 0 },
{ 15, CONDITION_ALWAYS, 136, 0, 432, FACING_NORTH, 0, 0, 240, 384, 496, 0 },
}

Definition at line 1571 of file mogall_forest.c.

Referenced by MogallForest_GetEntrances().

◆ gMogallForestEntrancesOther

struct SceneEntrance gMogallForestEntrancesOther[]
Initial value:
= {
{ 1, CONDITION_ALWAYS, 312, 0, 128, FACING_EAST, 0, 288, 0, 560, 224, 0 },
{ 2, CONDITION_ALWAYS, 248, 0, 368, FACING_WEST, 0, 0, 240, 272, 464, 0 },
{ 3, CONDITION_ALWAYS, 424, 0, 440, FACING_NORTH, 0, 288, 240, 560, 464, 0 },
{ 4, CONDITION_ALWAYS, 712, 0, 264, FACING_SOUTH, 0, 576, 240, 848, 464, 0 },
{ 5, CONDITION_ALWAYS, 136, 0, 680, FACING_NORTH, 0, 0, 480, 272, 704, 0 },
{ 6, CONDITION_ALWAYS, 312, 0, 552, FACING_EAST, 0, 288, 480, 560, 704, 0 },
{ 7, CONDITION_ALWAYS, 312, 0, 648, FACING_EAST, 0, 288, 480, 560, 704, 0 },
{ 8, CONDITION_ALWAYS, 648, 0, 680, FACING_NORTH, 0, 576, 480, 848, 704, 0 },
{ 9, CONDITION_ALWAYS, 536, 0, 128, FACING_WEST, 0, 288, 0, 560, 224, 0 },
{ 10, CONDITION_ALWAYS, 24, 0, 368, FACING_EAST, 0, 0, 240, 272, 464, 0 },
}

Definition at line 1590 of file mogall_forest.c.

Referenced by MogallForest_GetEntrances().

◆ gMogallForest_Exits

u32 gMogallForest_Exits[]

Definition at line 1604 of file mogall_forest.c.

Referenced by MogallForest_GetExits().

◆ gMogallForestPlacements1

struct ScenePlacement gMogallForestPlacements1[]
Initial value:
= {
{ 0xcd, CONDITION_ALWAYS, 7,
{ 0xcf, CONDITION_ALWAYS, 7,
{ 0x16, FLAG_NUT_CAUGHT, 7,
}
@ TALK_KEEP_FACING
#define PLACEMENT_SHARE_PREVIOUS_SPRITE
@ FLAG_FIRST_AREA_EAST_APE_OUT
@ FLAG_FIRST_AREA_NORTH_APE_OUT
@ FLAG_FIRST_AREA_HOSTILE_APE_OUT
s32 gMogallForest_ActorScript[]
s32 gMogallForestPlacements1_1[]
@ FLAG_NUT_CAUGHT
signed int s32
Definition types.h:14

Definition at line 1664 of file mogall_forest.c.

Referenced by MogallForest_GetPlacements().

◆ gMogallForestPlacements2

struct ScenePlacement gMogallForestPlacements2[]
Initial value:
= {
{ 0xcf, CONDITION_ALWAYS, 7,
{ 0xcf, CONDITION_ALWAYS, 7,
{ 0xcd, CONDITION_ALWAYS, 7,
{ 0x5a, FLAG_DJINNI_0 + 2, ACTOR_STAND,
PIXELS(488), 0, PIXELS(568), FACING_EAST, TALK_FACE_PARTY, 0 },
}
@ TALK_FACE_PARTY
@ ACTOR_STAND
#define FLAG_DJINNI_0
the flag of Djinni 0, set once it is caught
Definition flags.h:15
@ FLAG_SECOND_AREA_NORTH_APE_OUT
@ FLAG_SECOND_AREA_EAST_APE_OUT
@ FLAG_SECOND_AREA_SOUTH_APE_OUT
s32 gMogallForestPlacements2_0[]

Definition at line 1686 of file mogall_forest.c.

Referenced by MogallForest_GetPlacements().

◆ gMogallForestPlacements3

struct ScenePlacement gMogallForestPlacements3[]

Definition at line 1712 of file mogall_forest.c.

Referenced by MogallForest_GetPlacements().

◆ gMogallForestPlacementsOther

struct ScenePlacement gMogallForestPlacementsOther[]
Initial value:
= {
}

Definition at line 1746 of file mogall_forest.c.

Referenced by MogallForest_GetPlacements().

◆ gMogallForestEvents1

struct SceneEvent gMogallForestEvents1[]
Initial value:
= {
}
@ ABILITY_FORCE
Definition ability_ids.h:17
@ ABILITY_CATCH
Definition ability_ids.h:23
#define SCENE_EVENTS_END
@ EVENT_EXIT
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define SEARCH(target)
#define TOUCH_WALKING_INTO(facing)
#define TOUCH_WALKING
@ SEARCH_UNNAMED
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 ...
static void MogallForest_ReadBrokenSign(void)
Searching the sign (trigger 27).
@ ACTOR_FIRST_AREA_NORTH_HIDEOUT
@ ACTOR_FIRST_AREA_EAST_HIDEOUT
@ ACTOR_NUT
a Nut floating over the river, caught with Catch
@ ACTOR_FIRST_AREA_HOSTILE_HIDEOUT
static void MogallForest_FirstArea_JumpNorth(void)
Walking north into trigger 25: the leader jumps north across the log.
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 sou...
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 ...
static void MogallForest_CatchNut(void)
Catch on the Nut floating over the river: it is caught and found.
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_FirstArea_JumpSouth(void)
Walking south into trigger 26: the leader jumps onto the log, which bobs under the weight.

Definition at line 1750 of file mogall_forest.c.

Referenced by MogallForest_GetEvents().

◆ gMogallForestEvents2

struct SceneEvent gMogallForestEvents2[]
Initial value:
= {
}
@ ABILITY_MOVE
Definition ability_ids.h:15
#define FIND_ITEM(item)
@ EVENT_TALK
@ SEARCH_CHEST
@ ITEM_APPLE
Definition item_ids.h:52
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_SecondArea_PushLog(void)
Pushing a log in the second area (walking into trigger 20): the log at row 23 changes the ground besi...
@ FLAG_SECOND_AREA_SOUTH_APE_MOVED
@ ACTOR_SECOND_AREA_NORTH_HIDEOUT
@ ACTOR_SECOND_AREA_EAST_HIDEOUT
@ ACTOR_SECOND_AREA_OBSTACLE
sprite 0x125, moved with Move
@ ACTOR_QUARTZ
Venus Djinni 2.
@ ACTOR_SECOND_AREA_SOUTH_HIDEOUT
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_StartDjinnBattle(void)
Talking to Quartz in the second area: the Djinni battle (Djinni 2).
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_UpdateMovableObstacle(void)
Move on the second area's obstacle: its footprint follows it, and at (36, 24) it sinks two pixels int...
@ FLAG_CHEST_APPLE

Definition at line 1771 of file mogall_forest.c.

Referenced by MogallForest_GetEvents().

◆ gMogallForestEvents3

struct SceneEvent gMogallForestEvents3[]

Definition at line 1796 of file mogall_forest.c.

Referenced by MogallForest_GetEvents().

◆ gMogallForestEventsOther