Skip to Content
The Alchemy Project

src/window/scales.c

Sprite scales, motion curves and lookup tables of the window and menu code.

Macros

NameDescription
#defineSPRITE_MAP_PORTRAIT (portrait) ((portrait) - PORTRAIT_JUPITER_DJINNI)PORTRAIT_JUPITER_DJINNI's.

Variables

NameDescription
const Uint16WindowSpriteBounceScales [32]A sprite's pulse, as a scale where 256 is its normal size: it swells to 1.5 times and back over 32 steps.
const Sint8WindowSpriteBounceScalesTail [8]Unused: eight offsets after the pulse that nothing reads.
const Sint8MenuCursorBobOffsets [16]The selection cursor's bob: a 16-step wave of up to 3 pixels each way.
const Uint8WindowColorWaveTable [121]The window colour wheel: one colour channel's level (0 to 31) over 96 hue steps.
const Sint8SettingsMenuSpeedIcons [3]The settings menu's command icons for each setting's choices: message speed Slow, Normal and Fast; Speech Off and On; Auto-Sleep Off and On.
const Sint8SettingsMenuSpeechIcons [2]
const Sint8SettingsMenuSleepIcons [2]The command icons of the settings menu's choices: sleep's two, the voice's two and the message speed's three.
const Uint8SettingsMenuHuePresets [6]The window colour presets SELECT cycles through on the settings menu: the colour (hue, 0 to 23) and the brightness (0 to 14, 7 neutral) of each.
const Uint8SettingsMenuBrightnessPresets [6]
const Sint8PauseMenuIcons [8]The command icon of each entry in the Pause menu (Save your quest, Sleep, Change settings, and the debug entries after them).
const Sint16PortraitCharacterMap [20]{character, portrait} pairs of the playable characters, ending in -1, which mnPortraitGetForSpeaker searches for speakers below 20.
const Sint16PortraitSpriteMap [100]{sprite, portrait} pairs of the other speakers, ending in -1: mnPortraitGetForSpeaker numbers portrait n of this list PORTRAIT_SPRITE_MAP_FIRST + n, which mnIconLoadWithPalette draws as the row PORTRAIT_JUPITER_DJINNI + n.

Description

Sprite scales, motion curves and lookup tables of the window and menu code.

Macros in detail

SPRITE_MAP_PORTRAIT

#define SPRITE_MAP_PORTRAIT(portrait) ((portrait) - PORTRAIT_JUPITER_DJINNI)

PORTRAIT_JUPITER_DJINNI's.

Referenced by PortraitSpriteMap.

Definition at line 92 of file scales.c.

Variables in detail

WindowSpriteBounceScales

const Uint16 WindowSpriteBounceScales[32]

A sprite's pulse, as a scale where 256 is its normal size: it swells to 1.5 times and back over 32 steps.

Referenced by mnBattleCommandRowRun(), mnIconMenuDrawIcons() and mnWindowSpriteUpdateScaleAnimation().

Definition at line 10 of file scales.c.

WindowSpriteBounceScalesTail

const Sint8 WindowSpriteBounceScalesTail[8]

Unused: eight offsets after the pulse that nothing reads.

Definition at line 18 of file scales.c.

const Sint8 MenuCursorBobOffsets[16]

The selection cursor's bob: a 16-step wave of up to 3 pixels each way.

Referenced by mnSelectionMenuDraw().

Definition at line 23 of file scales.c.

WindowColorWaveTable

const Uint8 WindowColorWaveTable[121]

The window colour wheel: one colour channel's level (0 to 31) over 96 hue steps.

Referenced by mnWindowColorApply() and mnWindowColorCalculateTint().

Definition at line 28 of file scales.c.

SettingsMenuSpeedIcons

const Sint8 SettingsMenuSpeedIcons[3]

The settings menu's command icons for each setting's choices: message speed Slow, Normal and Fast; Speech Off and On; Auto-Sleep Off and On.

Referenced by mnSettingsMenuOpen() and mnSettingsMenuRun().

Definition at line 41 of file scales.c.

SettingsMenuSpeechIcons

const Sint8 SettingsMenuSpeechIcons[2]

Referenced by mnSettingsMenuOpen() and mnSettingsMenuRun().

Definition at line 47 of file scales.c.

SettingsMenuSleepIcons

const Sint8 SettingsMenuSleepIcons[2]

The command icons of the settings menu's choices: sleep's two, the voice's two and the message speed's three.

Referenced by mnSettingsMenuOpen() and mnSettingsMenuRun().

Definition at line 52 of file scales.c.

SettingsMenuHuePresets

const Uint8 SettingsMenuHuePresets[6]

The window colour presets SELECT cycles through on the settings menu: the colour (hue, 0 to 23) and the brightness (0 to 14, 7 neutral) of each.

Referenced by mnSettingsMenuRun().

Definition at line 59 of file scales.c.

SettingsMenuBrightnessPresets

const Uint8 SettingsMenuBrightnessPresets[6]

Referenced by mnSettingsMenuRun().

Definition at line 62 of file scales.c.

PauseMenuIcons

const Sint8 PauseMenuIcons[8]

The command icon of each entry in the Pause menu (Save your quest, Sleep, Change settings, and the debug entries after them).

Referenced by mnPauseMenuChoose() and mnPauseMenuOpen().

Definition at line 68 of file scales.c.

PortraitCharacterMap

const Sint16 PortraitCharacterMap[20]

{character, portrait} pairs of the playable characters, ending in -1, which mnPortraitGetForSpeaker searches for speakers below 20.

Referenced by mnDebugBrowserPortraits() and mnPortraitGetForSpeaker().

Definition at line 76 of file scales.c.

PortraitSpriteMap

const Sint16 PortraitSpriteMap[100]

{sprite, portrait} pairs of the other speakers, ending in -1: mnPortraitGetForSpeaker numbers portrait n of this list PORTRAIT_SPRITE_MAP_FIRST + n, which mnIconLoadWithPalette draws as the row PORTRAIT_JUPITER_DJINNI + n.

Referenced by mnDebugBrowserPortraits() and mnPortraitGetForSpeaker().

Definition at line 97 of file scales.c.