Alchemy
Loading...
Searching...
No Matches

intro.h

Go to the documentation of this file.
1#ifndef ALCHEMY_UNIT_GRAPHICS_TITLE_INTRO_H
2#define ALCHEMY_UNIT_GRAPHICS_TITLE_INTRO_H
3
4#include "types.h"
5
6extern const u8 gTitle_IntroSpriteColumns[];
7extern const u8 gTitle_PromptBlendLevels[60];
10s32 Title_ShowIntro(s32 prompt);
11void Title_NoOpPalette(void);
14void Graphics_NoOpColor(void);
15void PaletteFade_ComputeSteps(s16 *sourceComponents, s16 *targetComponents,
16 s16 *componentSteps, s32 frames);
17void PaletteFade_Update(void);
18void Palette_Transform(u32 mode, u16 *source, u16 *destination,
19 s32 paletteHalf);
20void PaletteFade_Init(void);
21void PaletteFade_Release(void);
22void PaletteFade_SetTarget(s32 mode, s32 paletteHalf);
23// UB: the early call implicitly returns int, but the definition returns void.
24// A plain prototype reverses the two argument moves in Title_ShowIntro (EN).
25#ifdef UBFIX
26void PaletteFade_SetCurrent(s32 mode, s32 paletteHalf);
27#endif
29void PaletteFade_Start(s32 frames);
32
33#endif
UNUSED void Graphics_NoOpColor(void)
Unused color entry retained in the far-call table.
Definition intro.c:665
void Palette_Transform(u32 mode, u16 *source, u16 *destination, s32 paletteHalf)
Transforms 512 source colours into destination components (three per colour, each in the high bits of...
Definition intro.c:748
s32 Title_ShowIntro(s32 prompt)
Plays the title intro: the backgrounds scroll down and the sprites rise until frame 278 (A or Start s...
Definition intro.c:295
UNUSED void PaletteFade_SetBackdrop(s32 color)
Replaces the first saved colour, the backdrop. Nothing in ☀️ calls it.
Definition intro.c:1046
void PaletteFade_Update(void)
A task scheduled by PaletteFade_Init: steps the palette fade each frame, adding the step to every col...
Definition intro.c:697
const u8 gTitle_IntroSpriteColumns[]
The x of each of the six columns of intro sprites.
Definition intro.c:64
void PaletteFade_SetCurrent(s32 mode, s32 paletteHalf)
Sets the colours shown now by transforming the saved palettes.
Definition intro.c:1038
void PaletteFade_Init(void)
Allocates the palette fade, saves both hardware palettes in it as the starting colours and schedules ...
Definition intro.c:1005
UNUSED void PaletteFade_SetTarget(s32 mode, s32 paletteHalf)
Sets the fade target by transforming the saved background and/or sprite palettes through the requeste...
Definition intro.c:1029
void PaletteFade_Start(s32 frames)
Starts fading the shown colours to the target over the requested frames.
Definition intro.c:1055
UNUSED void Title_NoOpPalette(void)
Unused palette entry retained in the far-call table.
Definition intro.c:511
s32 Title_ShowAnimatedSplash(void)
Shows the Camelot logo for two seconds, cycling its four frames of tiles.
Definition intro.c:609
s32 Graphics_ClampRgb555Channel(s32 value)
Clamps a five-bit colour channel to 0..31. Called by Palette_Transform.
Definition intro.c:1067
s32 Graphics_ClampRgb555Component(s32 value)
Caps a colour component at 0x7c00, the largest a five-bit channel shifted into the high bits reaches.
Definition intro.c:1078
const u8 gTitle_PromptBlendLevels[60]
The prompt's blend level over its 60-frame pulse.
Definition intro.c:68
UNUSED void PaletteFade_Release(void)
Unschedules the palette fade and frees its buffers.
Definition intro.c:1022
void Title_LoadIntroBackgrounds(void)
Loads the title intro's two scrolling backgrounds and its sprite tiles, builds their maps and sets th...
Definition intro.c:177
void PaletteFade_ComputeSteps(s16 *sourceComponents, s16 *targetComponents, s16 *componentSteps, s32 frames)
Computes each of the 1536 colour components' change per frame from the current components to the targ...
Definition intro.c:673
s32 Title_ShowSplashScreen(s32 mode)
Shows the Nintendo logo with its jingle.
Definition intro.c:517
void Title_UpdateIntroSprites(void)
A VBlank task of the title intro, scheduled by Title_ShowIntro: places the rising sprites along the s...
Definition intro.c:112
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11