Alchemy
Loading...
Searching...
No Matches

kolima_forest_clearing.c File Reference

Kolima Forest's clearing, between the bridge and the river. More...

Go to the source code of this file.

Macros

#define DIRECTION_STEP(dx, dz)
 Pixel step by direction: X in the upper halfword, Z in the lower.

Enumerations

enum  { NUT = 11 }
 Actors 8 to 10 are the logs; 11 is the Nut. More...

Functions

const struct SceneEntrance * KolimaForestClearing_GetEntrances (void)
 Where the party enters from the bridge and the river.
const struct SceneRegion * KolimaForestClearing_GetRegions (void)
const u32 * KolimaForestClearing_GetExits (void)
 The paths to the river and back to the bridge.
const struct ScenePlacement * KolimaForestClearing_GetPlacements (void)
 The three logs and the Nut.
static void KolimaForestClearing_PushLog (void)
 Walking into a log: it rolls ahead until something stops it.
static void KolimaForestClearing_CatchNut (void)
 Catch on the circling Nut: it vanishes and the party finds a Nut.
const struct SceneEvent * KolimaForestClearing_GetEvents (void)
 The logs, the Nut and the two paths.
s32 KolimaForestClearing_Initialize (void)
 On entry the Nut circles until it is caught, the logs mark the cells they cover, and the forest keeps its cursed colours until the curse is lifted.

Variables

s32 gStagedActor_DirectionSteps []
 Pixel step by direction: X in the upper halfword, Z in the lower.
u32 gStagedActor_FootprintKinds []
s32 gStagedActor_FootprintBounds []
struct SceneEntrance gKolimaForestClearing_Entrances []
u32 gKolimaForestClearing_Exits []
 Exit 1 to the river (scene 42), exit 2 to the bridge (scene 40).
struct ScenePlacement gKolimaForestClearing_Placements []
 Until the third patch the Nut's placement tested flag 0xfd0, not the flag catching it sets.
struct SceneEvent gKolimaForestClearing_Events []
u8 gKolimaPalette_First [1792]
u8 gKolimaPalette_Second [896]

Detailed Description

Kolima Forest's clearing, between the bridge and the river.

Three logs lie in the grass for the party to push, and a Nut circles out of reach until Catch pulls it in.

Definition in file kolima_forest_clearing.c.

Macro Definition Documentation

◆ DIRECTION_STEP

#define DIRECTION_STEP ( dx,
dz )
Value:
(((dx) << 16) | ((dz) & 0xffff))

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

Definition at line 100 of file kolima_forest_clearing.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Actors 8 to 10 are the logs; 11 is the Nut.

Enumerator
NUT 

Definition at line 34 of file kolima_forest_clearing.c.

Function Documentation

◆ KolimaForestClearing_GetEntrances()

const struct SceneEntrance * KolimaForestClearing_GetEntrances ( void )

Where the party enters from the bridge and the river.

Definition at line 39 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetEntrances().

◆ KolimaForestClearing_GetRegions()

const struct SceneRegion * KolimaForestClearing_GetRegions ( void )

Definition at line 43 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetRegions().

◆ KolimaForestClearing_GetExits()

const u32 * KolimaForestClearing_GetExits ( void )

The paths to the river and back to the bridge.

Definition at line 46 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetExits().

◆ KolimaForestClearing_GetPlacements()

const struct ScenePlacement * KolimaForestClearing_GetPlacements ( void )

The three logs and the Nut.

Definition at line 51 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetPlacements().

◆ KolimaForestClearing_PushLog()

void KolimaForestClearing_PushLog ( void )
static

Walking into a log: it rolls ahead until something stops it.

Definition at line 56 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_PushLog().

◆ KolimaForestClearing_CatchNut()

void KolimaForestClearing_CatchNut ( void )
static

Catch on the circling Nut: it vanishes and the party finds a Nut.

Definition at line 65 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_CatchNut().

◆ KolimaForestClearing_GetEvents()

const struct SceneEvent * KolimaForestClearing_GetEvents ( void )

The logs, the Nut and the two paths.

Definition at line 75 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetEvents().

◆ KolimaForestClearing_Initialize()

s32 KolimaForestClearing_Initialize ( void )

On entry the Nut circles until it is caught, the logs mark the cells they cover, and the forest keeps its cursed colours until the curse is lifted.

Definition at line 81 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_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 102 of file kolima_forest_clearing.c.

◆ gStagedActor_FootprintKinds

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

Definition at line 112 of file kolima_forest_clearing.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 116 of file kolima_forest_clearing.c.

◆ gKolimaForestClearing_Entrances

struct SceneEntrance gKolimaForestClearing_Entrances[]
Initial value:
= {
{ 0, CONDITION_ALWAYS, 209, 0, 279, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
{ 1, CONDITION_ALWAYS, 480, 0, 376, FACING_WEST, 0, -1, -1, -1, -1, 0 },
{ 2, CONDITION_ALWAYS, 312, 0, 40, FACING_SOUTH, 0, -1, -1, -1, -1, 0 },
}
@ SCENE_TABLE_END
Definition field_scene.h:43
@ CONDITION_ALWAYS
Definition field_scene.h:44
@ FACING_SOUTH
Definition field_scene.h:28
@ FACING_WEST
Definition field_scene.h:30

Definition at line 125 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetEntrances().

◆ gKolimaForestClearing_Exits

u32 gKolimaForestClearing_Exits[]
Initial value:
= {
SCENE_EXIT(1, 42, 1),
SCENE_EXIT(2, 40, 2),
}
#define SCENE_EXITS(scene)
Definition field_scene.h:72
#define SCENE_EXIT(exit, scene, entrance)
Definition field_scene.h:73
#define SCENE_EXITS_END
Definition field_scene.h:77

Exit 1 to the river (scene 42), exit 2 to the bridge (scene 40).

Definition at line 133 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetExits().

◆ gKolimaForestClearing_Placements

struct ScenePlacement gKolimaForestClearing_Placements[]
Initial value:
= {
{ 0xcd, CONDITION_ALWAYS, 7,
{ 0xcf, CONDITION_ALWAYS, 7,
{ 0xcd, CONDITION_ALWAYS, 7,
{ 0x16, 0xfd0, 7,
}
@ TALK_KEEP_FACING
#define PIXELS(value)

Until the third patch the Nut's placement tested flag 0xfd0, not the flag catching it sets.

Definition at line 142 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetPlacements().

◆ gKolimaForestClearing_Events

struct SceneEvent gKolimaForestClearing_Events[]
Initial value:
= {
}
@ ABILITY_CATCH
Definition ability_ids.h:23
#define SCENE_EVENTS_END
@ EVENT_TOUCH
@ EVENT_EXIT
#define PSYNERGY_ON_ACTOR(ability)
#define EVENT_SCRIPT(script)
#define EVENT_TOUCH_WALKING
#define FLAG_KOLIMA_FOREST_NUT_CAUGHT
Catch took the clearing's Nut.
Definition flags.h:265
static void KolimaForestClearing_CatchNut(void)
Catch on the circling Nut: it vanishes and the party finds a Nut.
static void KolimaForestClearing_PushLog(void)
Walking into a log: it rolls ahead until something stops it.

Definition at line 160 of file kolima_forest_clearing.c.

Referenced by KolimaForestClearing_GetEvents().

◆ gKolimaPalette_First

u8 gKolimaPalette_First[1792]

Definition at line 171 of file kolima_forest_clearing.c.

Referenced by KolimaPalette_Restore(), and KolimaPalette_SaveFirst().

◆ gKolimaPalette_Second

u8 gKolimaPalette_Second[896]

Definition at line 172 of file kolima_forest_clearing.c.

Referenced by KolimaPalette_Restore(), and KolimaPalette_SaveSecond().