include/scene/scene_puzzles.h
Dungeon and room puzzle structs, metatile keys, cracked-tile constants, traps, springs, doors and thawed map offsets shared by scenes.
Included by scene.h.
Structures
| Name | Description | |
|---|---|---|
struct | CELL | A map metatile, or a step between metatiles, kept as one 8-byte pair. |
struct | ANKOHL_RUINS_SPR | One of the eight sprites the sand draws: where it starts, how the level moves it, and its OAM entry as syOAMAddSpriteAtDepthClamped takes it. |
struct | ANKOHL_RUINS_SPR_STATE | Ankohl Ruins' sand (AnkohlRuinsSand): its sprites' VRAM cache entry, its level, map layer 1's offset before it rose, and its eight sprites. |
struct | ANKOHL_RUINS_SAND_ROW | A block of metatiles the sand fills in Ankohl Ruins once its level reaches level: width by height metatiles from (x, z). |
struct | PUZZLE_METATILE | A metatile of Gabomba Statue's channel puzzle: its kind, whether it is blocked, its shape and what stands on it. |
struct | TRAP_ENTRY | A row of a scene's trap table, ended by an actor of 0xffff: an actor and its flag. |
struct | SPRING_TOSS_MOTION | Lemuria spring's toss (LemuriaSpringToss): the tick the coin is let go, its trail of positions and its shadow, its velocity, and the ticks the spring still draws it in. |
struct | SPRING_OBSTACLE | One of the spring's moving obstacles: its position and heading, and the timers its motion and its hits keep. |
struct | LEMURIAN_SHIP_WARP | A door of the Lemurian ship: the step cue it answers, its opening's metatile animation and the metatile it opens at. |
struct | SPOT | A place on the Sea of Time's lap, in 16.16 pixels. |
struct | SPOTS | The six places of the Sea of Time's lap where spray rises once the lap has been run more than three times. |
struct | SAVED_COL | The 14 colours of BG palette 3 (entries 1 to 14) that the fade returns to, copied from palette RAM by scInit and rotated by scSeaOfTimeAnimateSea in step with BG palette entries 49 to 62. |
struct | TREASURE_ISLE_METATILE | A spiky rock's metatile on Treasure Isle (scTreasureIsleRaiseSpikyRock). |
Macros
| Name | Description | |
|---|---|---|
#define | PILLAR_SINK_DEPTH 32 | How far a pillar sinks, its top then level with the floor: into the floor as Blaze at a torch lowers it in Magma Rock, and into its gap as Move drops it in Jupiter Lighthouse. |
#define | METATILE_KEY (x, z) (((x) << 16) + (z)) | The metatile stampers of Air's Rock's and Magma Rock's insides keep the last metatile they stamped under the leader in one word, x in the high half and z in the low (scAirsRockInsideStampMetatileUnderLeader, scMagmaRockInsideStampStepMetatile): the word for metatile (x, z), and the x and z a word holds. |
#define | METATILE_KEY_X (key) ((key) >> 16) | |
#define | METATILE_KEY_Z (key) ((key) & 0xffff) | |
#define | MARS_LIGHTHOUSE_THAWED_MAPS |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { METATILE_BEHAVIOR_CRACKED_TILE } | The metatile behavior of a cracked tile in the Jupiter Lighthouse rooms with cracked floors (the left tower's lower room, the cracked floor room and the right tower's upper room), the kind scCrackedTileFind looks for; a tile takes the next one up as it cracks. |
enum | anonymous enum { THROUGH_CRACKED_TILE } | The fall through such a tile to the floor below, on the room's own map: the exit it takes and the entrance it lands at share the number. |
Variables
| Name | Description | |
|---|---|---|
extern char | MapIndexMarsLighthouseOutside | MapsWork holds Mars Lighthouse's nineteen maps twice, from its outside to its Venus ledge: frozen, then again in the colours the lighthouse takes once it is thawed (FLAG_MARS_LIGHTHOUSE_THAWED). |
extern char | MapIndexMarsLighthouseOutsideThawed |
Description
Dungeon and room puzzle structs, metatile keys, cracked-tile constants, traps, springs, doors and thawed map offsets shared by scenes.
Macros in detail
PILLAR_SINK_DEPTH
#define PILLAR_SINK_DEPTH 32
How far a pillar sinks, its top then level with the floor: into the floor as Blaze at a torch lowers it in Magma Rock, and into its gap as Move drops it in Jupiter Lighthouse.
Referenced by scInit(), scPrepareMap() and SinkPillar().
Definition at line 20 of file scene_puzzles.h.
METATILE_KEY
#define METATILE_KEY(x, z) (((x) << 16) + (z))
The metatile stampers of Air's Rock's and Magma Rock's insides keep the last
metatile they stamped under the leader in one word, x in the high half and z
in the low (scAirsRockInsideStampMetatileUnderLeader,
scMagmaRockInsideStampStepMetatile): the word for metatile (x, z), and the x
and z a word holds.
Referenced by scAirsRockInsideRestoreMetatileBehindLeader(), scAirsRockInsideStampMetatileUnderLeader(), scAirsRockInsideStampOtherMetatileUnderLeader(), scAirsRockInsideStampWideMetatileUnderLeader(), scMagmaRockInsideStampOtherStepMetatile(), scMagmaRockInsideStampStepMetatile() and scMagmaRockInsideTrackStepMetatile().
Definition at line 151 of file scene_puzzles.h.
METATILE_KEY_X
#define METATILE_KEY_X(key) ((key) >> 16)
Referenced by scAirsRockInsideRestoreMetatileBehindLeader() and scMagmaRockInsideTrackStepMetatile().
Definition at line 152 of file scene_puzzles.h.
METATILE_KEY_Z
#define METATILE_KEY_Z(key) ((key) & 0xffff)
Referenced by scAirsRockInsideRestoreMetatileBehindLeader() and scMagmaRockInsideTrackStepMetatile().
Definition at line 153 of file scene_puzzles.h.
MARS_LIGHTHOUSE_THAWED_MAPS
#define MARS_LIGHTHOUSE_THAWED_MAPS
Referenced by scMarsLighthouseStarRoomUseMarsStar() and scPrepareMap().
Definition at line 161 of file scene_puzzles.h.
Enumerations in detail
anonymous enum
enum { METATILE_BEHAVIOR_CRACKED_TILE }
The metatile behavior of a cracked tile in the Jupiter Lighthouse rooms with
cracked floors (the left tower's lower room, the cracked floor room and the
right tower's upper room), the kind scCrackedTileFind looks for; a tile takes
the next one up as it cracks.
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_CRACKED_TILE | 33 |
Definition at line 169 of file scene_puzzles.h.
anonymous enum
enum { THROUGH_CRACKED_TILE }
The fall through such a tile to the floor below, on the room's own map: the exit it takes and the entrance it lands at share the number.
| Enumerator | Value | Description |
|---|---|---|
THROUGH_CRACKED_TILE | 13 |
Definition at line 176 of file scene_puzzles.h.
Variables in detail
MapIndexMarsLighthouseOutside
extern char MapIndexMarsLighthouseOutside
MapsWork holds Mars Lighthouse's nineteen maps twice, from its outside to its
Venus ledge: frozen, then again in the colours the lighthouse takes once it
is thawed (FLAG_MARS_LIGHTHOUSE_THAWED). A frozen map's thawed copy is
MARS_LIGHTHOUSE_THAWED_MAPS rows on, the distance the linker gives between
the two first rows (map/resources.s).
Definition at line 159 of file scene_puzzles.h.
MapIndexMarsLighthouseOutsideThawed
extern char MapIndexMarsLighthouseOutsideThawed
Definition at line 160 of file scene_puzzles.h.