src/scene/title.c
The title: the publisher's and Camelot's logos, the intro, and the starts it leads to, the prologue with Jenna or the game with Felix. More…
#include "field/script_inline.h"#include "field/field.h"#include "field/field_engine_script.h"#include "game/game.h"#include "macros.h"#include "menu/menu.h"#include "scene/scene.h"#include "scene/title.h"#include "shared/scene_entrances_mapless.c"
Structures
| Name | Description | |
|---|---|---|
struct | TITLE_SPR | One sprite of the logo's lettering, as syOAMAddSpriteAtDepthClamped queues it. |
Macros
| Name | Description | |
|---|---|---|
#define | OWN_mnTitleShowCamelotLogo | This unit declares its own form of mnTitleShowCamelotLogo, below. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { TO_BE_CONTINUED_PALETTE } | The sprite palette of the "To Be Continued" lettering. |
Functions
| Name | Description | |
|---|---|---|
static void | scTitleRevealScreen (Sint32 unused) | Shows the Golden Sun logo for TITLE_TO_BE_CONTINUED: its "To Be Continued" lettering is revealed from the left while the logo brightens out of black. |
static void | scTitleLoadBackground (void) | Puts the Golden Sun logo on BG2: its palette, its 600 tiles decoded and copied to VRAM, a 30 by 20 tilemap of them in order with two blank tiles closing each 32-tile row, and every layer's scroll cleared. |
const SCENE_ENTRANCE * | scGetEntrances (void) | Where the party can enter: the cave under the spring has its own entrances. |
const SCENE_REGION * | scGetExitRegions (void) | The regions of the rooms whose exits are rectangles: the Chestbeaters' room and the stream room. |
const Uint32 * | scGetExits (void) | The dock's ways lead back the way the party came into Lemuria, which the harbour and the shore of Ancient Lemuria note in FLAG_LEMURIA_OTHER_WAY_IN. |
const ACTOR_PLACE * | scGetActorPlacements (void) | The scene's actor placements: a room of names for its entrance, else the debug room's. |
const CUE * | scGetCues (void) | The scene's cues: the rooms of names' for any entrance above ENTRANCE_NAMES_ABOVE, else the debug room's. |
void | mnTitleShowCamelotLogo (Sint32 unused) | The title calls the Camelot logo with an argument it does not take, and ignores what it returns. |
Sint32 | scInit (void) | The overlay's initialize entry, which plays what the entrance asks for. |
Sint32 | scPrepareMap (void) | Once Briggs is caught the pool has dried up: its colours take the dry ground's. |
void | scTitleLoadSprites (Sint32 unused) | Loads the logo's lettering sprites and their palette. |
void | scTitleUpdateSpriteReveal (void) | The event that queues the logo's lettering sprites each tick, revealing them from the left: those the reveal has reached are queued, the two newest only on even ticks. |
Variables
| Name | Description | |
|---|---|---|
extern Sint16 | TitleVramBlock | The VRAM cache entry the logo's lettering takes; -1 for none yet. |
Uint8 | TitleUnusedBeforeRevealTick [52] | Unused: nothing reads these bytes. |
Sint16 | TitleRevealTick | Ticks since the lettering's reveal began; a column appears every two. |
Uint8 | TitleUnusedAfterRevealTick [18] | Unused: nothing reads these bytes. |
TITLE_SPR | TitleSprites [18] | The lettering's 18 sprites. |
Uint32 | SceneExits [] | The room has no exits of its own. |
ACTOR_PLACE | ActorPlacements [] | The room's people: the party's four rows, then PSYNERGY_TEST_ACTOR_ID's. |
CUE | SceneCues [] | The room's scripts: talking to its people, Mind Read on them, the metatiles examined, and the field Psynergy each spot answers. |
Description
The title: the publisher's and Camelot's logos, the intro, and the starts it
leads to, the prologue with Jenna or the game with Felix. TITLE_STORY_CRAWL
plays the story crawl a new game opens with, over Vale in the rain, and
TITLE_TO_BE_CONTINUED, which nothing reaches, keeps The Broken Seal's Golden
Sun logo with "To Be Continued" revealed under it.
Macros in detail
OWN_mnTitleShowCamelotLogo
#define OWN_mnTitleShowCamelotLogo
This unit declares its own form of mnTitleShowCamelotLogo, below.
Definition at line 8 of file title.c.
Enumerations in detail
anonymous enum
enum { TO_BE_CONTINUED_PALETTE }
The sprite palette of the "To Be Continued" lettering.
| Enumerator | Value | Description |
|---|---|---|
TO_BE_CONTINUED_PALETTE | 15 |
Definition at line 179 of file title.c.
Functions in detail
scTitleRevealScreen
static void scTitleRevealScreen(Sint32 unused)
Shows the Golden Sun logo for TITLE_TO_BE_CONTINUED: its "To Be Continued"
lettering is revealed from the left while the logo brightens out of black.
References fdScriptStartScreenTransition(), fdScriptWait(), fdScriptWaitTransitionTicks(), scTitleLoadBackground(), scTitleLoadSprites(), scTitleUpdateSpriteReveal(), Sint32, sySetEvent(), sySynch() and TitleRevealTick.
Referenced by scInit().
Definition at lines 21 and 256 of file title.c.
scTitleLoadBackground
static void scTitleLoadBackground(void)
Puts the Golden Sun logo on BG2: its palette, its 600 tiles decoded and
copied to VRAM, a 30 by 20 tilemap of them in order with two blank tiles
closing each 32-tile row, and every layer's scroll cleared.
References BgScrollWork, scFieldDecompressTaggedLZ(), Sint32, syDMAXCopy(), syResourceGetTableEntry() and syScreenFadeToBlack().
Referenced by scTitleRevealScreen().
Definition at lines 22 and 300 of file title.c.
scGetEntrances
const SCENE_ENTRANCE *scGetEntrances(void)
References SceneEntrances.
Definition at line 46 of file title.c.
scGetExitRegions
const SCENE_REGION *scGetExitRegions(void)
Definition at line 51 of file title.c.
scGetExits
const Uint32 *scGetExits(void)
References SceneExits.
Definition at line 56 of file title.c.
scGetActorPlacements
const ACTOR_PLACE *scGetActorPlacements(void)
References ActorPlacements.
Definition at line 61 of file title.c.
scGetCues
const CUE *scGetCues(void)
References SceneCues.
Definition at line 66 of file title.c.
scInit
Sint32 scInit(void)
The overlay's initialize entry, which plays what the entrance asks for.
References fdActorGetById(), fdScriptPlaySound(), fdScriptSetDestination(), fdScriptWait(), gmPartySetLeaderFelix(), gmPartySetLeaderJenna(), MainRoutineStateWork, mnCreditsRun(), mnSaveScanFileSummaries(), mnTitleIntroRun(), mnTitleShowCamelotLogo(), mnTitleShowPublisherLogo(), mnTitleShowTitleScreen(), PerWork, scFieldWindowColorApply(), scTitleRevealScreen(), Sint32, syResourceReservedNoOperation(), syScreenFadeToBlack(), syScreenFadeWait() and sySynch().
Definition at line 76 of file title.c.
scPrepareMap
Sint32 scPrepareMap(void)
References Sint32.
Definition at line 173 of file title.c.
scTitleLoadSprites
void scTitleLoadSprites(Sint32 unused)
Loads the logo's lettering sprites and their palette.
References Sint32, syDecompressTaggedLZ(), syDMAXCopy(), syHeapAllocateEWRAM(), syHeapRelease(), syResourceGetTableEntry(), syVRAMCacheFindFreeEntry(), syVRAMCacheLoad() and TitleVramBlock.
Referenced by scTitleRevealScreen().
Definition at line 185 of file title.c.
scTitleUpdateSpriteReveal
void scTitleUpdateSpriteReveal(void)
The event that queues the logo's lettering sprites each tick, revealing them from the left: those the reveal has reached are queued, the two newest only on even ticks.
References Sint32, syOAMAddSpriteAtDepthClamped(), TickCount, TitleRevealTick, TitleSprites, TitleVramBlock and VramCacheEntries.
Referenced by scTitleRevealScreen().
Definition at line 214 of file title.c.
Variables in detail
TitleVramBlock
extern Sint16 TitleVramBlock
Sint16 TitleVramBlock
The VRAM cache entry the logo's lettering takes; -1 for none yet.
Referenced by scTitleLoadSprites() and scTitleUpdateSpriteReveal().
Definition at lines 19 and 363 of file title.c.
TitleUnusedBeforeRevealTick
Uint8 TitleUnusedBeforeRevealTick[52]
Unused: nothing reads these bytes.
Definition at line 35 of file title.c.
TitleRevealTick
Sint16 TitleRevealTick
Ticks since the lettering's reveal began; a column appears every two.
Referenced by scTitleRevealScreen() and scTitleUpdateSpriteReveal().
Definition at line 38 of file title.c.
TitleUnusedAfterRevealTick
Uint8 TitleUnusedAfterRevealTick[18]
Unused: nothing reads these bytes.
Definition at line 41 of file title.c.
TitleSprites
TITLE_SPR TitleSprites[18]
The lettering's 18 sprites.
Referenced by scTitleUpdateSpriteReveal().
Definition at line 44 of file title.c.
SceneExits
Uint32 SceneExits[]
Referenced by scGetExits().
Definition at line 350 of file title.c.
ActorPlacements
ACTOR_PLACE ActorPlacements[]
Referenced by scGetActorPlacements().
Definition at line 354 of file title.c.
SceneCues
CUE SceneCues[]
Referenced by scGetCues().
Definition at line 358 of file title.c.