Skip to Content
The Alchemy Project

include/graphics/graphics.h

Code the window system copies to RAM to run, and the sprite colour remap. More…

Included by battle_internal.h, battle_effect_internal.h, field_internal.h, field_psynergy_internal.h, script_commands_internal.h, jupiter_lighthouse_upper_hall.c, shop_internal.h, system_internal.h and window_internal.h.

Macros

NameDescription
#defineORB_PICTURES 16The orbs of RESOURCE_COLOURED_ORBS, one 256-colour tile each: sixteen in five colours, large and small, three colours twice.

Functions

NameDescription
voidfdSpriteColorRemapPixelsStub (void *buf, Sint32 size)Remaps size bytes of pixels in place through SpriteColorGreyTable.

Variables

NameDescription
extern const Uint8TextLookupSymbolCode []The text decoder's symbol lookup, which mnMessageFind copies to the heap to run (window/message_decode.s).
extern Uint8TextLookupSymbolCodeSize []The size of TextLookupSymbolCode.
extern Uint8mnScanlineWindowBuildSpansCodeSize []The size of mnScanlineWindowBuildSpansCode, which mnScanlineWindowFillSpans copies to the heap to run.
extern Uint8 *ItemIcons []The compressed item icons, indexed by an item's icon field.
extern Uint8 *ItemIconsEnd []The end of ItemIcons, so mnIconCountItemIcons can count them.
extern Uint8 *IconMiscellaneousIconPointers []The other compressed icons, among them the Status screen's status icons.
extern Uint8 *PsynergyIcons []The compressed Psynergy icons, drawn over the shared icon base.
extern Uint8 *PsynergyIconsEnd []The end of PsynergyIcons, for mnIconCountPsynergyIcons.

Description

Code the window system copies to RAM to run, and the sprite colour remap. The screen fade's state and the decoders belong to the system library (system.h).

A routine of handwritten ARM code that the game copies to RAM before running it (RAM_CODE_LOAD, system.h) is declared as an array of bytes, and a symbol ending in CodeSize is the length of the copy: no object, but an address the linker sets equal to the length, which the loader reads by casting it to a number.

Macros in detail

ORB_PICTURES

#define ORB_PICTURES 16

The orbs of RESOURCE_COLOURED_ORBS, one 256-colour tile each: sixteen in five colours, large and small, three colours twice.

Referenced by fdActorAppearInSparks(), fdTeleportPlaySparks(), fdTeleportPlayWhirl() and scJupiterLighthouseStartSparkRing().

Definition at line 48 of file graphics.h.

Functions in detail

fdSpriteColorRemapPixelsStub

void fdSpriteColorRemapPixelsStub(void *buf, Sint32 size)

Remaps size bytes of pixels in place through SpriteColorGreyTable.

Referenced by mnCommandIconLoad().

Definition at line 29 of file graphics.h.

Variables in detail

TextLookupSymbolCode

extern const Uint8 TextLookupSymbolCode[]

The text decoder's symbol lookup, which mnMessageFind copies to the heap to run (window/message_decode.s).

Referenced by mnMessageFind().

Definition at line 21 of file graphics.h.

TextLookupSymbolCodeSize

extern Uint8 TextLookupSymbolCodeSize[]

The size of TextLookupSymbolCode.

Referenced by mnMessageFind().

Definition at line 23 of file graphics.h.

mnScanlineWindowBuildSpansCodeSize

extern Uint8 mnScanlineWindowBuildSpansCodeSize[]

The size of mnScanlineWindowBuildSpansCode, which mnScanlineWindowFillSpans copies to the heap to run.

Referenced by mnScanlineWindowFillSpans().

Definition at line 26 of file graphics.h.

ItemIcons

extern Uint8 *ItemIcons[]

The compressed item icons, indexed by an item's icon field.

Referenced by mnIconBuildItemIconTiles(), mnIconCountItemIcons(), mnIconDrawItem() and mnItemIconCompose().

Definition at line 32 of file graphics.h.

ItemIconsEnd

extern Uint8 *ItemIconsEnd[]

The end of ItemIcons, so mnIconCountItemIcons can count them.

Referenced by mnIconCountItemIcons().

Definition at line 35 of file graphics.h.

IconMiscellaneousIconPointers

extern Uint8 *IconMiscellaneousIconPointers[]

The other compressed icons, among them the Status screen's status icons.

Referenced by mnIconDrawMiscellaneous().

Definition at line 38 of file graphics.h.

PsynergyIcons

extern Uint8 *PsynergyIcons[]

The compressed Psynergy icons, drawn over the shared icon base.

Referenced by mnIconBuildAbilityIconTiles() and mnIconCountPsynergyIcons().

Definition at line 41 of file graphics.h.

PsynergyIconsEnd

extern Uint8 *PsynergyIconsEnd[]

The end of PsynergyIcons, for mnIconCountPsynergyIcons.

Referenced by mnIconCountPsynergyIcons().

Definition at line 44 of file graphics.h.