Skip to Content
The Alchemy Project

src/scene/kolima_forest_glade.c

Kolima Forest (SceneIdKolimaForestGlade), the second of the forest's five scenes, on the party's way to Tret between SceneIdKolimaForestEntrance and SceneIdKolimaForestCliff. More…

Macros

NameDescription
#defineGLADE_CURSE_DIVISOR 11How far the curse tints the glade until it is lifted: green and blue lose 1 / GLADE_CURSE_DIVISOR of themselves (scKolimaPaletteCurse).

Enumerations

NameDescription
enumKOLIMA_FOREST_GLADE_ACTOR_ID { ACTOR_FIRST_LOG, ACTOR_NUT }Kolima Forest's actors, numbering the rows of KolimaForestGladeActorPlacements.

Functions

NameDescription
const SCENE_ENTRANCE *scGetEntrances (void)Where the party enters, from SceneIdKolimaForestEntrance and SceneIdKolimaForestCliff.
const SCENE_EXIT_REGION *scGetExitRegions (void)The scene has no exit regions: its regions entry returns none.
const Uint32 *scGetExits (void)The ways on into the forest (SceneIdKolimaForestCliff) and back (SceneIdKolimaForestEntrance).
const ACTOR_PLACE *scGetActorPlacements (void)The three logs and the Nut.
static voidscKolimaForestGladePushLog (void)In Kolima Forest (SceneIdKolimaForestGlade), walking into a log rolls it ahead until something stops it.
static voidscKolimaForestGladeCatchNut (void)In Kolima Forest (SceneIdKolimaForestGlade), Catch on the floating Nut makes it vanish, and the party finds a Nut.
const CUE *scGetCues (void)The logs, the Nut and the two ways out.
Sint32scInit (void)Sets up the floating Nut and the logs on entry.
BSS_DATAALIGNED (16)The healthy colours, kept by scKolimaPaletteSaveHealthy: the palette fade's 448 background and sprite colours, in the array's first half.

Variables

NameDescription
extern SCENE_ENTRANCEKolimaForestGladeEntrances []
extern Uint32KolimaForestGladeExits []KOLIMA_FOREST_GLADE_TO_KOLIMA_FOREST_ENTRANCE back.
extern ACTOR_PLACEKolimaForestGladeActorPlacements []FLAG_VALE_NUT_CAUGHT, not the flag catching it sets.
extern CUEKolimaForestGladeCues []
Uint8KolimaPaletteHealthy [1792]The healthy colours, kept by scKolimaPaletteSaveHealthy: the palette fade's 448 background and sprite colours, in the array's first half.
Uint8KolimaPaletteCursed [896]The cursed colours, kept by scKolimaPaletteSaveCursed.

Description

Kolima Forest (SceneIdKolimaForestGlade), the second of the forest's five scenes, on the party's way to Tret between SceneIdKolimaForestEntrance and SceneIdKolimaForestCliff.

Three logs lie in the grass to be rolled by walking into them. A Nut floats out of reach until Catch pulls it in (FLAG_KOLIMA_FOREST_NUT_CAUGHT).

Until Tret lifts the curse (FLAG_KOLIMA_CURSE_LIFTED), scKolimaPaletteCurse gives the forest redder, darker colours.

Until the third patch the Nut's actor placement row tested Vale's FLAG_VALE_NUT_CAUGHT rather than FLAG_KOLIMA_FOREST_NUT_CAUGHT, so once Vale's Nut had been caught this one was never placed.

The scene's name, Glade, is ours, for what sets the scene apart. It is open grass and stumps ringed by trees, with no cliff or river (places/kolima-forest-glade_cursed/map-0.png).

Macros in detail

GLADE_CURSE_DIVISOR

#define GLADE_CURSE_DIVISOR 11

How far the curse tints the glade until it is lifted: green and blue lose 1 / GLADE_CURSE_DIVISOR of themselves (scKolimaPaletteCurse).

Referenced by scInit().

Definition at line 46 of file kolima_forest_glade.c.

Enumerations in detail

KOLIMA_FOREST_GLADE_ACTOR_ID

enum KOLIMA_FOREST_GLADE_ACTOR_ID

Kolima Forest's actors, numbering the rows of KolimaForestGladeActorPlacements.

EnumeratorValueDescription
ACTOR_FIRST_LOGACTOR_FIRST_PLACEDThe three logs.
ACTOR_NUTACTOR_FIRST_LOG + 3The Nut that floats until Catch pulls it in.

Definition at line 37 of file kolima_forest_glade.c.

Functions in detail

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

Where the party enters, from SceneIdKolimaForestEntrance and SceneIdKolimaForestCliff.

References KolimaForestGladeEntrances.

Definition at line 52 of file kolima_forest_glade.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 57 of file kolima_forest_glade.c.

scGetExits

const Uint32 *scGetExits(void)

The ways on into the forest (SceneIdKolimaForestCliff) and back (SceneIdKolimaForestEntrance).

References KolimaForestGladeExits.

Definition at line 64 of file kolima_forest_glade.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

The three logs and the Nut.

References KolimaForestGladeActorPlacements.

Definition at line 70 of file kolima_forest_glade.c.

scKolimaForestGladePushLog

static void scKolimaForestGladePushLog(void)

In Kolima Forest (SceneIdKolimaForestGlade), walking into a log rolls it ahead until something stops it.

References fdScriptEnd(), fdScriptStart(), scPushedActorFindClearPos() and scPushedActorRoll().

Referenced by KolimaForestGladeCues.

Definition at line 77 of file kolima_forest_glade.c.

scKolimaForestGladeCatchNut

static void scKolimaForestGladeCatchNut(void)

In Kolima Forest (SceneIdKolimaForestGlade), Catch on the floating Nut makes it vanish, and the party finds a Nut.

References scCatchNut().

Referenced by KolimaForestGladeCues.

Definition at line 88 of file kolima_forest_glade.c.

scGetCues

const CUE *scGetCues(void)

The logs, the Nut and the two ways out.

References KolimaForestGladeCues.

Definition at line 94 of file kolima_forest_glade.c.

scInit

Sint32 scInit(void)

Sets up the floating Nut and the logs on entry.

References gmFlagGet(), scFloatNut(), scKolimaPaletteCurse(), scPushedActorBlockFootprint() and Sint32.

Definition at line 100 of file kolima_forest_glade.c.

Variables in detail

KolimaForestGladeEntrances

extern SCENE_ENTRANCE KolimaForestGladeEntrances[]

SCENE_ENTRANCE KolimaForestGladeEntrances[]

Referenced by scGetEntrances().

Definition at lines 30 and 124 of file kolima_forest_glade.c.

KolimaForestGladeExits

extern Uint32 KolimaForestGladeExits[]

Uint32 KolimaForestGladeExits[]

KOLIMA_FOREST_GLADE_TO_KOLIMA_FOREST_ENTRANCE back.

Referenced by scGetExits().

Definition at lines 31 and 136 of file kolima_forest_glade.c.

KolimaForestGladeActorPlacements

extern ACTOR_PLACE KolimaForestGladeActorPlacements[]

ACTOR_PLACE KolimaForestGladeActorPlacements[]

FLAG_VALE_NUT_CAUGHT, not the flag catching it sets.

Referenced by scGetActorPlacements().

Definition at lines 32 and 150 of file kolima_forest_glade.c.

KolimaForestGladeCues

extern CUE KolimaForestGladeCues[]

CUE KolimaForestGladeCues[]

References scKolimaForestGladeCatchNut() and scKolimaForestGladePushLog().

Referenced by scGetCues().

Definition at lines 33 and 168 of file kolima_forest_glade.c.

KolimaPaletteHealthy

Uint8 KolimaPaletteHealthy[1792]

The healthy colours, kept by scKolimaPaletteSaveHealthy: the palette fade's 448 background and sprite colours, in the array's first half.

Referenced by scKolimaPaletteRestore() and scKolimaPaletteSaveHealthy().

Definition at line 184 of file kolima_forest_glade.c.

KolimaPaletteCursed

Uint8 KolimaPaletteCursed[896]

The cursed colours, kept by scKolimaPaletteSaveCursed.

Referenced by scKolimaPaletteRestore() and scKolimaPaletteSaveCursed().

Definition at line 186 of file kolima_forest_glade.c.