Skip to Content
The Alchemy Project

include/scene/flame_throwers.h

The state of the Mars Lighthouse rooms' flame throwers and of the fireballs that knock the leader back, or carry him along on a ride, when they hit him; it is kept in the inventory snapshot's spare space.

Included by mars_lighthouse_entrance.c, mars_lighthouse_hall.c, mars_lighthouse_star_room.c and mars_lighthouse_towers.c.

Structures

NameDescription
structFLAME_THROWEROne of the state's four flame throwers.
structKNOCK_BACK_DIRECTIONThe way the leader was last knocked back along x and z, 1 or -1; the other axis is 0.
structFLAME_STOPAn actor the flames check against as they move: a flame stops beside it unless it is marked blocked, which sets the state's own blocked flag.
structFLAME_HIT_STATEThe flame throwers' state: the hit counter, what a flame met, the flame throwers and the actors they stop at, and the fireball carrying the leader.

Macros

NameDescription
#defineFLAME_THROWER_REACH_BITS 0xfA flame thrower's packed state: the flame's reach in the low four bits, FLAME_THROWER_FLAGS in the next four.
#defineFLAME_THROWER_FLAG_BITS 0xf0
#defineFLAME_THROWERS_STATEThe flame-hit state, in the inventory snapshot's spare space.
#defineKNOCK_BACK fdLeaderKnockBackThe knock-back (shared/leader_knock_back.c) as the four Mars Lighthouse rooms that keep a copy name it, and what it calls: the fall damage the leader takes, the update hook that blinks him while he is thrown, his animation, the terrain of his metatile, and the collision check a step ahead.
#defineKNOCK_BACK_TAKE_DAMAGE gmPartyTakeFallDamage
#defineKNOCK_BACK_BLINK fdActorBlink
#defineKNOCK_BACK_SET_ANIMATION fdActorSelectAnimation
#defineKNOCK_BACK_METATILE_ATTRIBUTE fdMapGridGetTerrainKindOrBumpAt
#defineKNOCK_BACK_CHECK_COLLISION fdMapGridCheckCollision

Enumerations

NameDescription
enumFLAME_THROWER_FLAGS { FLAME_FORWARD, FLAME_EAST, FLAME_WEST, FLAME_BACKWARD, FLAME … }A flame thrower's flags (the flame thrower tables): the flame's reach in the low four bits, and which flame it sends, or none.
enumanonymous enum { STEP_CUE_FLAME_HIT, STEP_CUE_FIREBALL_HIT }The step cues the flame throwers raise: a flame that hits the leader raises the cue scFlameThrowersStart is given, a rolling fireball that reaches him two more.

Description

The state of the Mars Lighthouse rooms' flame throwers and of the fireballs that knock the leader back, or carry him along on a ride, when they hit him; it is kept in the inventory snapshot's spare space.

Macros in detail

FLAME_THROWER_REACH_BITS

#define FLAME_THROWER_REACH_BITS 0xf

A flame thrower's packed state: the flame's reach in the low four bits, FLAME_THROWER_FLAGS in the next four.

Referenced by scFlameThrowerSet() and scFlameThrowersStart().

Definition at line 28 of file flame_throwers.h.

FLAME_THROWER_FLAG_BITS

#define FLAME_THROWER_FLAG_BITS 0xf0

Referenced by scFlameThrowerSet(), scFlameThrowersPuff() and scFlameThrowersStart().

Definition at line 29 of file flame_throwers.h.

FLAME_THROWERS_STATE

#define FLAME_THROWERS_STATE

The flame-hit state, in the inventory snapshot's spare space.

Referenced by KNOCK_BACK(), scActorRollAndCrumble(), scActorScatterCrumbs(), scFireballCarryLeader(), scFireballCarryLeaderIfHit(), scFlameThrowerGetFlags(), scFlameThrowerIsActive(), scFlameThrowersAdvanceCounter(), scFlameThrowersCreate(), scFlameThrowerSet(), scFlameThrowerSetActive(), scFlameThrowerSetPuffsOffScreen(), scFlameThrowersGetCounter(), scFlameThrowersHasHitLeader(), scFlameThrowersPuff(), scFlameThrowersRelease(), scFlameThrowersReleaseFlame(), scFlameThrowersSetMode(), scFlameThrowersSetStop(), scFlameThrowersStart(), scFlameUpdateForward(), scFlameUpdateSideways(), scMarsLighthouseEntranceKnockBackIfHit(), scMarsLighthouseEntranceRideFireball(), scMarsLighthouseEntranceRideFireballIfHit(), scMarsLighthouseHallKnockBackIfHit(), scMarsLighthouseStarRoomIsLeaderHit(), scMarsLighthouseStarRoomKnockBackIfHit() and scMarsLighthouseTowersKnockBackIfHit().

Definition at line 102 of file flame_throwers.h.

KNOCK_BACK

#define KNOCK_BACK fdLeaderKnockBack

The knock-back (shared/leader_knock_back.c) as the four Mars Lighthouse rooms that keep a copy name it, and what it calls: the fall damage the leader takes, the update hook that blinks him while he is thrown, his animation, the terrain of his metatile, and the collision check a step ahead.

Definition at line 109 of file flame_throwers.h.

KNOCK_BACK_TAKE_DAMAGE

#define KNOCK_BACK_TAKE_DAMAGE gmPartyTakeFallDamage

Referenced by KNOCK_BACK().

Definition at line 110 of file flame_throwers.h.

#define KNOCK_BACK_BLINK fdActorBlink

Referenced by KNOCK_BACK().

Definition at line 111 of file flame_throwers.h.

KNOCK_BACK_SET_ANIMATION

#define KNOCK_BACK_SET_ANIMATION fdActorSelectAnimation

Referenced by KNOCK_BACK().

Definition at line 112 of file flame_throwers.h.

KNOCK_BACK_METATILE_ATTRIBUTE

#define KNOCK_BACK_METATILE_ATTRIBUTE fdMapGridGetTerrainKindOrBumpAt

Referenced by KNOCK_BACK().

Definition at line 113 of file flame_throwers.h.

KNOCK_BACK_CHECK_COLLISION

#define KNOCK_BACK_CHECK_COLLISION fdMapGridCheckCollision

Referenced by KNOCK_BACK().

Definition at line 114 of file flame_throwers.h.

Enumerations in detail

FLAME_THROWER_FLAGS

enum FLAME_THROWER_FLAGS

A flame thrower's flags (the flame thrower tables): the flame's reach in the low four bits, and which flame it sends, or none.

EnumeratorValueDescription
FLAME_FORWARD0x00scFlameThrowerSendForward
FLAME_EAST0x10scFlameThrowerSendEast
FLAME_WEST0x20scFlameThrowerSendWest
FLAME_BACKWARD0x30scFlameThrowerSendBackward
FLAME_THROWER_DRY0x40nothing comes out of it
FLAME_SPARK0x80scFlameThrowerSendSpark

Definition at line 16 of file flame_throwers.h.

anonymous enum

enum { STEP_CUE_FLAME_HIT, STEP_CUE_FIREBALL_HIT }

The step cues the flame throwers raise: a flame that hits the leader raises the cue scFlameThrowersStart is given, a rolling fireball that reaches him two more.

EnumeratorValueDescription
STEP_CUE_FLAME_HIT88
STEP_CUE_FIREBALL_HITSTEP_CUE_FLAME_HIT + 2

Definition at line 95 of file flame_throwers.h.