Kolima Forest's bend, between the river and Tret's tree. More...
Go to the source code of this file.
Enumerations | |
| enum | { SHORT_LOG = 8 , FLOODGATE_SWITCH = 9 , SIGN = 10 } |
Functions | |
| static void | KolimaForestBend_MarkShortLogCells (void) |
| Gives the short log's column of cells its collision: column 4 at the west place, column 6 at the east. | |
| static void | KolimaForestBend_CreateLogs (struct BendLog *entry) |
| Makes each log at the middle of its four cells, standing on the ground. | |
| static void | KolimaForestBend_RollLog (struct BendLog *runs) |
| Finds the log ahead of the leader and rolls it on, a cell at a time, up to eleven cells or until a cell is not free; the leader follows its shove. | |
| const struct SceneEntrance * | KolimaForestBend_GetEntrances (void) |
| Where the party enters from the river and from Tret's tree. | |
| const struct SceneRegion * | KolimaForestBend_GetRegions (void) |
| const u32 * | KolimaForestBend_GetExits (void) |
| The paths back to the river and on to Tret's tree. | |
| const struct ScenePlacement * | KolimaForestBend_GetPlacements (void) |
| The short log, the switch and the sign. | |
| const struct SceneEvent * | KolimaForestBend_GetEvents (void) |
| The logs, the switch, the sign, the jump and the chest. | |
| static void | KolimaForestBend_PushLog (void) |
| Walking into a log: it rolls ahead, and the cells of the logs are marked again where they now lie. | |
| static void | KolimaForestBend_JumpSouth (void) |
| Walking south into the gap: the leader jumps across. | |
| static void | KolimaForestBend_DrawWaterLevel (void) |
| Draws the river at its level and sets each log to match: high water floats the logs 26 pixels up over their own cells, low water lays them on the riverbed. | |
| static void | KolimaForestBend_ShakeLines (void) |
| HBlank callback: selects the captured shake scroll above the split line. | |
| static void | KolimaForestBend_CaptureShakeScroll (void) |
| Captures three background scroll pairs and adds the vertical shake offset. | |
| static void | KolimaForestBend_FlipFloodgateSwitch (void) |
| Searching the floodgate switch flips it. | |
| static void | KolimaForestBend_PushShortLogWest (void) |
| Walking west into the short log: the leader shoves it west to x 72. | |
| static void | KolimaForestBend_PushShortLogEast (void) |
| Walking east into the short log: the leader shoves it east to x 104. | |
| s32 | KolimaForestBend_Initialize (void) |
| On entry: the logs' records come back from gSceneState, or on a first visit from the defaults with the water high; the logs are made and the river is drawn at its level. | |
| void | State_StampRecordCells (const struct BendLog *records, s32 value) |
| Writes a collision code into the four cells of each log. | |
| static struct BendLog * | KolimaForestBend_FindLogAt (struct BendLog *run, s32 x, s32 y) |
| The log lying across the cell, or none. | |
| static s32 | KolimaForestBend_CheckLogFits (s32 x, s32 z, s32 mode) |
| Whether four cells from the one given, across or down, are free for a log: none is marked 0xff or holds a wall. | |
Variables | |
| struct BendLog | gKolimaForestBend_DefaultRecords [] |
| The logs on a first visit, as struct BendLog: sprite 0xcd runs north to south and 0xcf west to east. | |
| u8 | gKolimaForestBend_PushAnimations [] = {2, 2, 3, 3} |
| s8 | gKolimaForestBend_PushStepX [] = {8, 0, -8, 0} |
| s8 | gKolimaForestBend_PushStepZ [] = {0, 8, 0, -8} |
| struct SceneEntrance | gKolimaForestBendEntrances [] |
| u32 | gKolimaForestBendExits [] |
| Exit 1 to the river (scene 42), exit 2 to Tret's tree (scene 44). | |
| struct ScenePlacement | gKolimaForestBendPlacements [] |
| struct SceneEvent | gKolimaForestBendEvents [] |
Kolima Forest's bend, between the river and Tret's tree.
A floodgate switch raises and lowers the river: with the water high the logs float (26 pixels up) and can be rolled along it; with it low they lie on the riverbed. A short log slides between two places, and a sign warns the party off the switch.
The water level, the short log's place and each log's cells are kept in gSceneState (gKolimaForestBendLayout, gKolimaForestBendReturned and gKolimaForestBendRecords), so they survive a battle.
Definition in file kolima_forest_bend.c.
| anonymous enum |
| Enumerator | |
|---|---|
| SHORT_LOG | slides between x 72 and x 104 |
| FLOODGATE_SWITCH | |
| SIGN | reads a warning. "Do not touch Floodgate Switch!" |
Definition at line 49 of file kolima_forest_bend.c.
|
static |
Gives the short log's column of cells its collision: column 4 at the west place, column 6 at the east.
Definition at line 95 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_DrawWaterLevel(), KolimaForestBend_MarkShortLogCells(), and KolimaForestBend_PushLog().
|
static |
Makes each log at the middle of its four cells, standing on the ground.
Definition at line 393 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_CreateLogs(), and KolimaForestBend_Initialize().
|
static |
Finds the log ahead of the leader and rolls it on, a cell at a time, up to eleven cells or until a cell is not free; the leader follows its shove.
Definition at line 493 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_PushLog(), and KolimaForestBend_RollLog().
| const struct SceneEntrance * KolimaForestBend_GetEntrances | ( | void | ) |
Where the party enters from the river and from Tret's tree.
Definition at line 60 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetEntrances(), and STATIC_ASSERT().
| const struct SceneRegion * KolimaForestBend_GetRegions | ( | void | ) |
Definition at line 64 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetRegions(), and STATIC_ASSERT().
| const u32 * KolimaForestBend_GetExits | ( | void | ) |
The paths back to the river and on to Tret's tree.
Definition at line 67 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetExits(), and STATIC_ASSERT().
| const struct ScenePlacement * KolimaForestBend_GetPlacements | ( | void | ) |
The short log, the switch and the sign.
Definition at line 70 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetPlacements(), and STATIC_ASSERT().
| const struct SceneEvent * KolimaForestBend_GetEvents | ( | void | ) |
The logs, the switch, the sign, the jump and the chest.
Definition at line 75 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetEvents(), and STATIC_ASSERT().
|
static |
Walking into a log: it rolls ahead, and the cells of the logs are marked again where they now lie.
Definition at line 81 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_PushLog().
|
static |
Walking south into the gap: the leader jumps across.
Definition at line 89 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_JumpSouth().
|
static |
Draws the river at its level and sets each log to match: high water floats the logs 26 pixels up over their own cells, low water lays them on the riverbed.
Definition at line 106 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_DrawWaterLevel(), KolimaForestBend_FlipFloodgateSwitch(), and KolimaForestBend_Initialize().
|
static |
HBlank callback: selects the captured shake scroll above the split line.
Definition at line 165 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_FlipFloodgateSwitch(), and KolimaForestBend_ShakeLines().
|
static |
Captures three background scroll pairs and adds the vertical shake offset.
Definition at line 188 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_CaptureShakeScroll(), and KolimaForestBend_FlipFloodgateSwitch().
|
static |
Searching the floodgate switch flips it.
"Isaac flipped the switch." The camera turns to the floodgate, which opens or closes; the ground rumbles and the top of the screen shakes harder for 100 frames, and the river rises or falls.
Definition at line 208 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_FlipFloodgateSwitch().
|
static |
Walking west into the short log: the leader shoves it west to x 72.
Definition at line 306 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_PushShortLogWest().
|
static |
Walking east into the short log: the leader shoves it east to x 104.
Definition at line 332 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_PushShortLogEast().
| s32 KolimaForestBend_Initialize | ( | void | ) |
On entry: the logs' records come back from gSceneState, or on a first visit from the defaults with the water high; the logs are made and the river is drawn at its level.
The forest keeps its cursed colours until the curse is lifted.
Definition at line 361 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_Initialize(), and STATIC_ASSERT().
Writes a collision code into the four cells of each log.
Definition at line 426 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_DrawWaterLevel(), KolimaForestBend_Initialize(), KolimaForestBend_PushLog(), State_StampRecordCells(), and STATIC_ASSERT().
The log lying across the cell, or none.
Definition at line 450 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_FindLogAt(), and KolimaForestBend_RollLog().
Whether four cells from the one given, across or down, are free for a log: none is marked 0xff or holds a wall.
Definition at line 472 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_CheckLogFits(), and KolimaForestBend_RollLog().
| struct BendLog gKolimaForestBend_DefaultRecords[] |
The logs on a first visit, as struct BendLog: sprite 0xcd runs north to south and 0xcf west to east.
Definition at line 570 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_Initialize(), and STATIC_ASSERT().
| u8 gKolimaForestBend_PushAnimations[] = {2, 2, 3, 3} |
Definition at line 579 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_RollLog(), and STATIC_ASSERT().
| s8 gKolimaForestBend_PushStepX[] = {8, 0, -8, 0} |
Definition at line 581 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_RollLog(), and STATIC_ASSERT().
| s8 gKolimaForestBend_PushStepZ[] = {0, 8, 0, -8} |
Definition at line 583 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_RollLog(), and STATIC_ASSERT().
| struct SceneEntrance gKolimaForestBendEntrances[] |
Definition at line 585 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetEntrances(), and STATIC_ASSERT().
| u32 gKolimaForestBendExits[] |
Exit 1 to the river (scene 42), exit 2 to Tret's tree (scene 44).
Definition at line 593 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetExits(), and STATIC_ASSERT().
| struct ScenePlacement gKolimaForestBendPlacements[] |
Definition at line 600 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetPlacements(), and STATIC_ASSERT().
| struct SceneEvent gKolimaForestBendEvents[] |
Definition at line 611 of file kolima_forest_bend.c.
Referenced by KolimaForestBend_GetEvents(), and STATIC_ASSERT().