include/scene/magma_rock.h
What Magma Rock's outside (magma_rock.c) and inside (magma_rock_inside.c) share: where a statue's fire stops, the flag set while its Burst plays, and the outside's tables and scripts.
Included by magma_rock.c and magma_rock_inside.c.
Structures
| Name | Description | |
|---|---|---|
struct | MAGMA_ROCK_CRUMBLING_PILLAR | A crumbling pillar of Magma Rock (scMagmaRockCrumblePillar): its actor and its flag. |
Macros
| Name | Description | |
|---|---|---|
#define | FLAG_FIRE_BURST_PLAYING FLAG_SCENE_TEMP(0xf0) | Set while a statue's fire bursts where it lands, so that Burst there does not target the statue again (scMagmaRockFireFromStatue, scMagmaRockInsideFireFromStatue). |
Enumerations
| Name | Description | |
|---|---|---|
enum | MAGMA_ROCK_FIRE_STOP_METATILE { METATILE_BEHAVIOR_MAGMA_ROCK_FIRE_EDGE, METATILE_BEHAVIOR_MA … } | The collision codes a statue's fire stops at as it flies (scMagmaRockFireFromStatue, scMagmaRockInsideFireFromStatue): the edge of its way, and a lava fall, which it floods the room from (scMagmaRockInsideRaiseLava). |
Functions
| Name | Description | |
|---|---|---|
Sint32 | scMapMetatileGetAttributes (Uint32 layer, Sint32 x, Sint32 z) | Returns a metatile's collision code and attributes as a halfword. |
void | scMagmaRockMoveFireball (struct ACTOR *actor) | A fireball's update: it flies toward the other statue of its pair leaving embers; running into Felix raises CUE_FIREBALL_HITS_LEADER and takes it away, and reaching the statue hands it over (scMagmaRockThrowEmbers). |
void | scMagmaRockBurnStatue (struct ACTOR *actor) | A statue's update once it burns: embers first, then at tick 33 its flame column of four parts rises, and the cap on its top with it (scMagmaRockRaiseFlameTop). |
void | scStatueFlashUnderBurst (struct ACTOR *actor) | The update of a statue Burst is going off at: it blinks red on the ticks its mask picks. |
void | scMagmaRockDropRocks (Sint32 x, Sint32 y, Sint32 z, Sint32 count) | Drops count rocks from (x, y, z), each flung out at a random angle. |
void | scMagmaRockStartFallingRocks (void) | Starts the falling rocks: loads their picture, prepares a small sprite for each rock and adds the event that draws them. |
void | scMagmaRockBurstCrackedPillar (Sint32 mode, Sint32 sound) | Burst goes off at a cracked pillar: rocks fly up round it, one a tick while the explosions shake the ground and eight at the last blast, the pillar crumbles to a stump at PILLAR_CRUMBLE_TICK, and the last blast takes it away. |
void | fdActorSetMetatileShape (Sint32 level, Sint32 layer, Sint32 id) | Gives the metatile of layer under an actor the shape of the ground there, level steps of 8 pixels (METATILE_HEIGHT_STEPS) higher, or lower when negative, as a crumbling pillar sinks 4. |
struct ACTOR * | scActorFindInMetatile (Sint32 *pos, struct ACTOR *self) | Returns the first placed actor (ACTOR_FIRST_PLACED up to the treasure spots, FIELD_TREASURE_ACTOR) standing in the same 16-pixel metatile as position (x, y and z), or NULL. |
void | scMagmaRockRestoreCrumblingPillars (const Uint16 *table) | On entry: sets each listed pillar from its two flags (cracked, then fallen), then lifts the leader onto the ground under it. |
void | scMagmaRockPlaceTightrope () | Lays a tightrope between its two posts (fdTightropePlace, through the overlay's own import row). |
void | scDustScatter (Sint32 spread) | Eight clouds of dust rise in a row across the leader, 2 pixels apart, and fly out from him in eight directions when spread is set. |
void | scMagmaRockFireStatue (void) | After Felix's Burst, the yellow statue he cast it at flashes white and spits a fireball straight ahead: on the entrance's statues' ledge and the high west level at the cracked pillar beyond it, which the fireball's blast breaks, and on the top at the great fire. |
void | scMagmaRockIgniteStatue (void) | After Felix's Burst, a yellow statue with a grey cap blinks red for about ten seconds, faster at first; then fire bursts from it and its cap rides up on a column of flame for about five seconds, carrying Felix up to the ledge above if he is standing on it, before it sinks again. |
void | scMagmaRockResetCaveDoor (void) | Nothing visible happens when Felix, come out of the Ember Stone's room (MAGMA_ROCK_ENTRANCE_MAGMA_ROCK_INSIDE_EMBER_STONE), takes his first step of his own in the cave mouth above the entrance's cracked pillars (metatile (16, 28)). |
void | scMagmaRockEnterCave (void) | Felix walks north into the dark cave mouth above the entrance's cracked pillars (metatile (16, 28)) and goes inside Magma Rock, to the room of the Ember Stone. |
void | scMagmaRockResolveBeforeBurst (void) | Nothing visible happens as Felix begins to cast Burst at one of the yellow statues; the game settles whatever the field engine has pending before the statue's own scripts run (scMagmaRockTargetStatue). |
void | scMagmaRockCheckCrumblingPillars (void) | |
void | scMagmaRockReadyHighWestStatue (void) | Nothing visible happens when Felix steps onto the metatile just behind the yellow statue on the cliff's high west level (metatile (15, 34)); from then on Burst cast at the statue wakes it, so that it spits a fireball east at the cracked pillar. |
void | scMagmaRockResetHighWestStatue (void) | Nothing visible happens when Felix steps a metatile further west from behind the high west level's yellow statue (metatile (14, 34)); Burst no longer wakes the statue until he steps back behind it. |
void | scMagmaRockKnockLeaderOffWall (void) | A fireball flying between a pair of yellow statues on the cliff's high east wall hits Felix as he climbs: he turns grey among dark puffs, falls to the foot of the wall with a thump that shakes the ground, and shakes his head. |
void | scMagmaRockPushPillarEast (void) | |
void | scMagmaRockPushPillarWest (void) | Felix walks west into the striped stone pillar beside the cracked pillar on the cliff's low east level, from any of metatiles (37, 38) to (40, 38), and pushes it a metatile west along a grey track; after four pushes it stands on the grey square at the track's end, metatile (35, 38), and stays there when the party comes back. |
Variables
| Name | Description | |
|---|---|---|
extern Sint16 | MagmaRockEntrancePillars [] | The pillars Move pushes at the entrance, ended by -1. |
extern Sint16 | MagmaRockCliffHighWestPillars [] | The pillars Move pushes on the cliff's high west level, ended by -1. |
extern Sint16 | MagmaRockCliffHighEastPillars [] | The pillars Move pushes on the high east level, ended by -1. |
extern Sint16 | MagmaRockCliffLowWestPillars [] | The pillars Move pushes on the low west level, ended by -1. |
extern Sint16 | MagmaRockCliffLowEastPillars [] | The pillars Move pushes on the low east level, ended by -1. |
extern Uint32 | MagmaRockEmberScript [] | An ember's actor script. |
extern Sint16 | MagmaRockEntranceStatues [] | The entrance's statues (scStatueFindUnderBurst): each row a statue, the metatile Burst finds it by and the cap its flame column raises (-1 for none), ended by -1. |
extern Sint16 | MagmaRockCliffHighWestStatues [] | The high west level's statues, as MagmaRockEntranceStatues. |
extern Sint16 | MagmaRockCliffHighEastStatues [] | The high east level's statues, as MagmaRockEntranceStatues. |
extern Sint16 | MagmaRockCliffLowWestStatues [] | The low west level's statues, as MagmaRockEntranceStatues. |
extern Sint16 | MagmaRockCliffLowEastStatues [] | The low east level's statues, as MagmaRockEntranceStatues. |
extern Sint16 | MagmaRockSummitStatues [] | The statue on the top, as MagmaRockEntranceStatues. |
extern Sint16 | MagmaRockCrumblingPillars [] | The high west level's crumbling pillars: (actor, flag) rows ended by -1, the flag set once the pillar has cracked and the next once it has fallen. |
extern Uint32 | DustScatterScript [] | It lasts 33 ticks, then stops and is gone. |
extern Uint32 | DustBurstScript [] | It lasts 44 ticks, then stops and is gone. |
extern Uint32 | FieldEffectShortScript [] | |
extern Uint32 | FieldEffectMediumScript [] | The flash about the Tomegathericon: held 45 ticks, then put away and freed. |
extern Uint32 | FieldEffectLongScript [] |
Description
What Magma Rock's outside (magma_rock.c) and inside (magma_rock_inside.c)
share: where a statue's fire stops, the flag set while its Burst plays, and
the outside's tables and scripts.
Macros in detail
FLAG_FIRE_BURST_PLAYING
#define FLAG_FIRE_BURST_PLAYING FLAG_SCENE_TEMP(0xf0)
Set while a statue's fire bursts where it lands, so that Burst there does not
target the statue again (scMagmaRockFireFromStatue,
scMagmaRockInsideFireFromStatue).
Referenced by MagmaRockCliffHighWestCues, MagmaRockCliffLowEastCues, MagmaRockCues, MagmaRockInsideCrackedPillarsCues, MagmaRockSummitCues, scMagmaRockFireFromStatue() and scMagmaRockInsideFireFromStatue().
Definition at line 25 of file magma_rock.h.
Enumerations in detail
MAGMA_ROCK_FIRE_STOP_METATILE
enum MAGMA_ROCK_FIRE_STOP_METATILE
The collision codes a statue's fire stops at as it flies
(scMagmaRockFireFromStatue, scMagmaRockInsideFireFromStatue): the edge of its
way, and a lava fall, which it floods the room from
(scMagmaRockInsideRaiseLava).
| Enumerator | Value | Description |
|---|---|---|
METATILE_BEHAVIOR_MAGMA_ROCK_FIRE_EDGE | 212 | |
METATILE_BEHAVIOR_MAGMA_ROCK_LAVA_FALL | 222 |
Definition at line 16 of file magma_rock.h.
Functions in detail
scMagmaRockPlaceTightrope
void scMagmaRockPlaceTightrope()
Lays a tightrope between its two posts (fdTightropePlace, through the
overlay's own import row).
Referenced by scInit().
Definition at line 75 of file magma_rock.h.