Skip to Content
The Alchemy Project

include/scene/staff_credit.h

What the world map and the staff credits share: the picture layer they draw over the map, and the placed actors' functions both overlays link.

Included by staff_credit.c and world_map.c.

Macros

NameDescription
#definePICTURE_FIRST_TILE 128The picture layer drawn over the map on background 0: its tiles start at tile 128 of character block 0, its map is screen block 4, and it takes background palette 14.
#definePICTURE_TILES (VRAM + PICTURE_FIRST_TILE * TILE_SIZE_4BPP)
#definePICTURE_MAP (VRAM + 4 * BG_SCREEN_SIZE)
#definePICTURE_PALETTE 14
#definePICTURE_MAP_BYTES (BG_SCREEN_WIDTH * DISPLAY_TILE_HEIGHT * 2)One frame of a picture's map: a screen's 20 rows of 32 tiles.
#definePICTURE_FIRST 4224The lighthouse pictures' frames in their buffer: tiles first, then a frame every PICTURE_STRIDE bytes from PICTURE_FIRST.
#definePICTURE_STRIDE 1536
#definePUSH_PICTURE (frame)Queues frame frame of a lighthouse picture, from the caller's buffer, to the picture layer's map at the next VBlank (scWorldMapPlayLighthouseTransition and the credits' unused copy of it).
#defineGAUGE_SIZE (8 * TILE_SIZE_4BPP)The PP gauge shown over the leader on the world map: a 32x16 sprite of eight tiles.
#defineGAUGE_LEVELS 30The levels of PP the gauge can show.

Enumerations

NameDescription
enumanonymous enum { GAUGE_EMPTY, GAUGE_SHOWN, GAUGE_LOW }What the gauge shows, kept as kind plus level: nothing, the level, or the level blinking low.

Functions

NameDescription
static inline voidscQueueIOWrite16 (Uint32 addr, Uint32 value)Queues a halfword register write for the next VBlank: the picture layer's own call of syIOWriteQueueStore16, an inline over it as script.h's are.
voidscStaffCreditSpawnGrowingPair (struct ACTOR *actor)Unused: two golden rings rise from the actor, one growing and one shrinking (actor_grow_up.c and actor_grow_down.c); only the unused routines above call it.
voidscWorldMapUpdatePlacedActors (void)Each tick: creates the actor of each place (fdWorldMapPlacesGetTable) whose flag shows it as it comes within reach of the camera, releases those that leave it, and raises a place's step cue when the leader touches its actor; in Sand's form on the World Map it asks for Sand again, at no PP, instead.
voidscWorldMapStartPlacedActors (void)Clears the places' actors and starts scWorldMapUpdatePlacedActors.
voidscWorldMapSpawnSparkPair (struct ACTOR *actor)Spawns a pair of rising sparks at the actor, as The Broken Seal's scMercuryLighthouseSpawnSparkPair does at a spawn point.
voidscWorldMapSpawnParticle (struct ACTOR *actor)Spawns a particle at a random spot near the actor.

Variables

NameDescription
extern Uint32StaffCreditGlowColorModes []The colour modes the ship's glow steps through, one every other tick.

Description

What the world map and the staff credits share: the picture layer they draw over the map, and the placed actors' functions both overlays link.

Macros in detail

PICTURE_FIRST_TILE

#define PICTURE_FIRST_TILE 128

The picture layer drawn over the map on background 0: its tiles start at tile 128 of character block 0, its map is screen block 4, and it takes background palette 14.

Referenced by scStaffCreditPlayLighthouseTransition(), scStaffCreditShowBeacon(), scWorldMapLoadTidalWave() and scWorldMapPlayLighthouseTransition().

Definition at line 22 of file staff_credit.h.

PICTURE_TILES

#define PICTURE_TILES (VRAM + PICTURE_FIRST_TILE * TILE_SIZE_4BPP)

Referenced by scStaffCreditPlayLighthouseTransition(), scStaffCreditShowBeacon(), scWorldMapLoadTidalWave() and scWorldMapPlayLighthouseTransition().

Definition at line 23 of file staff_credit.h.

PICTURE_MAP

#define PICTURE_MAP (VRAM + 4 * BG_SCREEN_SIZE)

Referenced by scStaffCreditShowBeacon().

Definition at line 24 of file staff_credit.h.

PICTURE_PALETTE

#define PICTURE_PALETTE 14

Referenced by scStaffCreditPlayLighthouseTransition(), scStaffCreditShowBeacon(), scWorldMapLoadTidalWave() and scWorldMapPlayLighthouseTransition().

Definition at line 25 of file staff_credit.h.

PICTURE_MAP_BYTES

#define PICTURE_MAP_BYTES (BG_SCREEN_WIDTH * DISPLAY_TILE_HEIGHT * 2)

One frame of a picture's map: a screen's 20 rows of 32 tiles.

Referenced by scStaffCreditShowBeacon().

Definition at line 27 of file staff_credit.h.

PICTURE_FIRST

#define PICTURE_FIRST 4224

The lighthouse pictures' frames in their buffer: tiles first, then a frame every PICTURE_STRIDE bytes from PICTURE_FIRST.

Definition at line 30 of file staff_credit.h.

PICTURE_STRIDE

#define PICTURE_STRIDE 1536

Definition at line 31 of file staff_credit.h.

PUSH_PICTURE

#define PUSH_PICTURE(frame)

Queues frame frame of a lighthouse picture, from the caller's buffer, to the picture layer's map at the next VBlank (scWorldMapPlayLighthouseTransition and the credits' unused copy of it).

Referenced by scStaffCreditPlayLighthouseTransition() and scWorldMapPlayLighthouseTransition().

Definition at line 35 of file staff_credit.h.

GAUGE_SIZE

#define GAUGE_SIZE (8 * TILE_SIZE_4BPP)

The PP gauge shown over the leader on the world map: a 32x16 sprite of eight tiles.

Referenced by scGaugeDraw() and scGaugeInit().

Definition at line 43 of file staff_credit.h.

GAUGE_LEVELS

#define GAUGE_LEVELS 30

The levels of PP the gauge can show.

Referenced by scGaugeDraw().

Definition at line 45 of file staff_credit.h.

Enumerations in detail

anonymous enum

enum { GAUGE_EMPTY, GAUGE_SHOWN, GAUGE_LOW }

What the gauge shows, kept as kind plus level: nothing, the level, or the level blinking low.

EnumeratorValueDescription
GAUGE_EMPTY0
GAUGE_SHOWN100
GAUGE_LOW200

Definition at line 49 of file staff_credit.h.

Functions in detail

scQueueIOWrite16

static inline void scQueueIOWrite16(Uint32 addr, Uint32 value)

Queues a halfword register write for the next VBlank: the picture layer's own call of syIOWriteQueueStore16, an inline over it as script.h's are.

References syIOWriteQueueStore16().

Referenced by scStaffCreditBlendBeacon(), scStaffCreditPlayLighthouseTransition(), scStaffCreditShowBeacon(), scStaffCreditUpdateTransitionBlend(), scWorldMapLoadTidalWave(), scWorldMapPlayLighthouseTransition() and scWorldMapUpdateTransitionBlend().

Definition at line 14 of file staff_credit.h.