src/scene/shared/world_map_objects.c
The World Map's placed actors, which both the World Map's and the staff credits' overlays keep a copy of, included as text: the exit chosen by the side the leader approaches a place from, the event that shows the places' actors coming into view and releases those leaving it, and the sparks and particles about the ship.
#include "types.h"#include "system.h"#include "game/main_routine_state.h"#include "field/sprite.h"#include "field/script_inline.h"#include "field/actor.h"#include "field/world_map.h"#include "field/field_sprite.h"#include "macros.h"#include "field/field_engine_script.h"#include "field/map_grid.h"#include "field/flag_call.h"#include "field/field_engine.h"
Included by staff_credit.c and world_map.c.
Macros
| Name | Description | |
|---|---|---|
#define | SPARK_RISE_TICKS 32 | The ticks a ship's spark rises for. |
Functions
| Name | Description | |
|---|---|---|
void | scWorldMapSelectExitByX (Sint32 cue, Sint32 exitBefore, Sint32 exitAfter) | Unused: chooses a passage exit from the leader's east-west approach: exitBefore while the leader is west of the place's actor, else exitAfter. |
void | scWorldMapSelectExitByZ (Sint32 cue, Sint32 exitBefore, Sint32 exitAfter) | Chooses a passage exit from the leader's north-south approach. |
void | scWorldMapUpdatePlacedActors (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. |
void | scWorldMapQueueBlend (void) | Unused: unless a menu has suspended the actors, queues the World Map's backgrounds lightened toward white. |
void | scWorldMapStartPlacedActors (void) | Clears the places' actors and starts scWorldMapUpdatePlacedActors. |
Sint32 | scWorldMapGetMetatileIndex (FIXED x, FIXED z) | Unused: the metatile index of a point in 16.16 pixels. |
Bool | scWorldMapRiseFromAnchor (ACTOR *actor) | A spark's rise (WorldMapSparkScript): rises a pixel a tick over the actor it watches, growing and shrinking again over SPARK_RISE_TICKS; returns 0 when done. |
void | scWorldMapSpawnSparkPair (ACTOR *actor) | Spawns a pair of rising sparks at the actor, as The Broken Seal's scMercuryLighthouseSpawnSparkPair does at a spawn point. |
void | scWorldMapSpawnParticle (ACTOR *actor) | Spawns a particle at a random spot near the actor. |
Variables
| Name | Description | |
|---|---|---|
extern ACTOR * | WorldMapPlacedActors [] | |
extern Sint32 | WorldMapPlacedActorScript [] | |
extern Sint32 | WorldMapSparkScript [] | |
extern Uint32 | WorldMapParticleScript [] | Unused: a particle's script on the World Map, which the staff credits keep a copy of: it lasts 39 ticks, is put back at x and z 0, and is gone. |
Description
The World Map's placed actors, which both the World Map's and the staff credits' overlays keep a copy of, included as text: the exit chosen by the side the leader approaches a place from, the event that shows the places' actors coming into view and releases those leaving it, and the sparks and particles about the ship.
Macros in detail
SPARK_RISE_TICKS
#define SPARK_RISE_TICKS 32
The ticks a ship's spark rises for.
Referenced by scWorldMapRiseFromAnchor().
Definition at line 198 of file world_map_objects.c.
Functions in detail
scWorldMapSelectExitByX
void scWorldMapSelectExitByX(Sint32 cue, Sint32 exitBefore, Sint32 exitAfter)
Unused: chooses a passage exit from the leader's east-west approach: exitBefore while the leader is west of the place's actor, else exitAfter.
References fdActorGet(), fdScriptPlaySound(), MainRoutineStateWork, Sint32 and WorldMapPlacedActors.
Definition at line 25 of file world_map_objects.c.
scWorldMapSelectExitByZ
void scWorldMapSelectExitByZ(Sint32 cue, Sint32 exitBefore, Sint32 exitAfter)
Chooses a passage exit from the leader's north-south approach.
References fdActorGet(), fdScriptPlaySound(), MainRoutineStateWork, Sint32 and WorldMapPlacedActors.
Referenced by scWorldMapEnterDaila(), scWorldMapEnterProx() and scWorldMapEnterYallam().
Definition at line 47 of file world_map_objects.c.
scWorldMapUpdatePlacedActors
void scWorldMapUpdatePlacedActors(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.
References fdActorGetById(), fdActorRelease(), fdActorSelectAnimation(), fdActorStartScript(), fdFlagIsClear(), fdPartyGetLeaderActor(), fdWorldMapPlacesGetTable(), MainRoutineStateWork, Sint32, syGameFlagGet(), syImportActorCreate(), WorldMapPlacedActors and WorldMapPlacedActorScript.
Referenced by scWorldMapStartPlacedActors().
Definition at line 73 of file world_map_objects.c.
scWorldMapQueueBlend
void scWorldMapQueueBlend(void)
Unused: unless a menu has suspended the actors, queues the World Map's backgrounds lightened toward white.
Definition at line 170 of file world_map_objects.c.
scWorldMapStartPlacedActors
void scWorldMapStartPlacedActors(void)
Clears the places' actors and starts scWorldMapUpdatePlacedActors.
References scWorldMapUpdatePlacedActors(), sySetTickEvent(), syWordsClear() and WorldMapPlacedActors.
Referenced by scInit().
Definition at line 183 of file world_map_objects.c.
scWorldMapGetMetatileIndex
Sint32 scWorldMapGetMetatileIndex(FIXED x, FIXED z)
Unused: the metatile index of a point in 16.16 pixels.
References Sint32.
Definition at line 191 of file world_map_objects.c.
scWorldMapRiseFromAnchor
Bool scWorldMapRiseFromAnchor(ACTOR *actor)
A spark's rise (WorldMapSparkScript): rises a pixel a tick over the actor it
watches, growing and shrinking again over SPARK_RISE_TICKS; returns 0 when
done.
References Sint32 and sySin().
Referenced by WorldMapSparkScript.
Definition at line 203 of file world_map_objects.c.
scWorldMapSpawnSparkPair
void scWorldMapSpawnSparkPair(ACTOR *actor)
Spawns a pair of rising sparks at the actor, as The Broken Seal's
scMercuryLighthouseSpawnSparkPair does at a spawn point.
References fdActorStartScript(), fdSpriteStartAnimation(), scFieldActorCreate(), syMathMulFX() and WorldMapSparkScript.
Referenced by scStaffCreditFlashPoweringUp() and scWorldMapFlashPoweringUp().
Definition at line 226 of file world_map_objects.c.
scWorldMapSpawnParticle
void scWorldMapSpawnParticle(ACTOR *actor)
Spawns a particle at a random spot near the actor.
References fdActorStartScript(), fdSpriteStartAnimation(), scFieldActorCreate(), scFieldVectorAddPolarOffsetFX(), Sint32, syRandom() and WorldMapParticleScript.
Referenced by scStaffCreditGlowInFlight() and scWorldMapGlowInFlight().
Definition at line 270 of file world_map_objects.c.
Variables in detail
WorldMapPlacedActors
extern ACTOR *WorldMapPlacedActors[]
Referenced by scWorldMapSelectExitByX(), scWorldMapSelectExitByZ(), scWorldMapStartPlacedActors() and scWorldMapUpdatePlacedActors().
Definition at line 21 of file world_map_objects.c.