Skip to Content
The Alchemy Project

src/scene/kolima_forest_cliff.c

Kolima Forest (SceneIdKolimaForestCliff), the third of the forest's five scenes, between SceneIdKolimaForestGlade and SceneIdKolimaForestFloodgate. More…

Macros

NameDescription
#defineFLAG_KOLIMA_FOREST_CLIFF_LOG_IN_RIVER FLAG_SCENE_TEMP(0x01)The river log has tipped into the river and floats there as ground the party can cross.
#defineCLIFF_RIVER_EDGE_COLUMN 12The column at the water's edge, where the river log pushed west tips in.
#defineCLIFF_CURSE_DIVISOR 6How far the curse tints the cliff until it is lifted: green and blue lose 1 / CLIFF_CURSE_DIVISOR of themselves (scKolimaPaletteCurse).

Enumerations

NameDescription
enumanonymous enum { ACTOR_FIRST_LOG, ACTOR_RIVER_LOG }The scene's actors, numbering the rows of KolimaForestCliffActorPlacements.

Functions

NameDescription
const SCENE_ENTRANCE *scGetEntrances (void)The six rooms share one entrance table.
const SCENE_EXIT_REGION *scGetExitRegions (void)The scene has no exit regions: its regions entry returns none.
const Uint32 *scGetExits (void)Both scenes share one exit table.
const ACTOR_PLACE *scGetActorPlacements (void)The three logs.
static voidscKolimaForestCliffPushLog (void)In Kolima Forest (SceneIdKolimaForestCliff), walking into a log rolls it ahead until something stops it.
const CUE *scGetCues (void)The logs, the two ways out and the hop east from the bank.
Sint32scInit (void)Sets up the logs and the forest's colours 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_ENTRANCEKolimaForestCliffEntrances []
extern Uint32KolimaForestCliffExits [](SceneIdKolimaForestGlade).
extern ACTOR_PLACEKolimaForestCliffActorPlacements []
extern CUEKolimaForestCliffCues []
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 (SceneIdKolimaForestCliff), the third of the forest's five scenes, between SceneIdKolimaForestGlade and SceneIdKolimaForestFloodgate.

It has three logs, rolled by walking into them. The one pushed west to the water's edge tips into the river and floats there, metatiles the party can cross to the far side. From the bank the leader can hop east (step cue 11, scKolimaForestHopEast).

The forest keeps its cursed colours until Tret lifts the curse (FLAG_KOLIMA_CURSE_LIFTED).

FLAG_KOLIMA_FOREST_CLIFF_LOG_IN_RIVER: the log is in the river, until the party next comes in.

The scene's name, Cliff, is ours, for what sets the scene apart. A rock cliff runs across its north side above the river and the logs (places/kolima-forest-cliff_cursed/map-0.png).

Macros in detail

FLAG_KOLIMA_FOREST_CLIFF_LOG_IN_RIVER

#define FLAG_KOLIMA_FOREST_CLIFF_LOG_IN_RIVER FLAG_SCENE_TEMP(0x01)

The river log has tipped into the river and floats there as ground the party can cross.

Referenced by scInit() and scKolimaForestCliffPushLog().

Definition at line 43 of file kolima_forest_cliff.c.

CLIFF_RIVER_EDGE_COLUMN

#define CLIFF_RIVER_EDGE_COLUMN 12

The column at the water's edge, where the river log pushed west tips in.

Referenced by scKolimaForestCliffPushLog().

Definition at line 46 of file kolima_forest_cliff.c.

CLIFF_CURSE_DIVISOR

#define CLIFF_CURSE_DIVISOR 6

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

Referenced by scInit().

Definition at line 49 of file kolima_forest_cliff.c.

Enumerations in detail

anonymous enum

enum { ACTOR_FIRST_LOG, ACTOR_RIVER_LOG }

The scene's actors, numbering the rows of KolimaForestCliffActorPlacements.

EnumeratorValueDescription
ACTOR_FIRST_LOGACTOR_FIRST_PLACEDThe three logs. The third is the
ACTOR_RIVER_LOGACTOR_FIRST_LOG + 2one that can reach the river.

Definition at line 32 of file kolima_forest_cliff.c.

Functions in detail

scGetEntrances

const SCENE_ENTRANCE *scGetEntrances(void)

References KolimaForestCliffEntrances.

Definition at line 51 of file kolima_forest_cliff.c.

scGetExitRegions

const SCENE_EXIT_REGION *scGetExitRegions(void)

Definition at line 56 of file kolima_forest_cliff.c.

scGetExits

const Uint32 *scGetExits(void)

References KolimaForestCliffExits.

Definition at line 61 of file kolima_forest_cliff.c.

scGetActorPlacements

const ACTOR_PLACE *scGetActorPlacements(void)

The three logs.

References KolimaForestCliffActorPlacements.

Definition at line 67 of file kolima_forest_cliff.c.

scKolimaForestCliffPushLog

static void scKolimaForestCliffPushLog(void)

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

References fdActorGet(), fdActorSetAnimation(), fdActorSetDestinationOffset(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), fdScriptEnd(), fdScriptStart(), fdScriptWait(), gmFlagSet(), scMapGridFillCollisionRectangle(), scPushedActorFindClearPos(), scPushedActorRoll() and sySoundPlay().

Referenced by KolimaForestCliffCues.

Definition at line 74 of file kolima_forest_cliff.c.

scGetCues

const CUE *scGetCues(void)

The logs, the two ways out and the hop east from the bank.

References KolimaForestCliffCues.

Definition at line 107 of file kolima_forest_cliff.c.

scInit

Sint32 scInit(void)

Sets up the logs and the forest's colours on entry.

References fdActorGet(), fdActorSetSpriteFlags(), fdMapGridCopyMetatileAttributes(), gmFlagGet(), scKolimaPaletteCurse(), scMapGridFillCollisionRectangle(), scPushedActorBlockFootprint(), Sint32 and state.

Definition at line 113 of file kolima_forest_cliff.c.

Variables in detail

KolimaForestCliffEntrances

extern SCENE_ENTRANCE KolimaForestCliffEntrances[]

SCENE_ENTRANCE KolimaForestCliffEntrances[]

Referenced by scGetEntrances().

Definition at lines 26 and 147 of file kolima_forest_cliff.c.

KolimaForestCliffExits

extern Uint32 KolimaForestCliffExits[]

Uint32 KolimaForestCliffExits[]

(SceneIdKolimaForestGlade).

Referenced by scGetExits().

Definition at lines 27 and 159 of file kolima_forest_cliff.c.

KolimaForestCliffActorPlacements

extern ACTOR_PLACE KolimaForestCliffActorPlacements[]

ACTOR_PLACE KolimaForestCliffActorPlacements[]

Referenced by scGetActorPlacements().

Definition at lines 28 and 170 of file kolima_forest_cliff.c.

KolimaForestCliffCues

extern CUE KolimaForestCliffCues[]

CUE KolimaForestCliffCues[]

References scKolimaForestCliffPushLog() and scKolimaForestHopEast().

Referenced by scGetCues().

Definition at lines 29 and 181 of file kolima_forest_cliff.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 197 of file kolima_forest_cliff.c.

KolimaPaletteCursed

Uint8 KolimaPaletteCursed[896]

The cursed colours, kept by scKolimaPaletteSaveCursed.

Referenced by scKolimaPaletteRestore() and scKolimaPaletteSaveCursed().

Definition at line 199 of file kolima_forest_cliff.c.