pictures.c
Pictures and command icons loaded for the menus, and BG1's priority.
games/tbs/src/window/battle_command/pictures.c on GitHub
Pictures and command icons loaded for the menus, and BG1's priority.
Functions
RenderResource_LoadPair
void RenderResource_LoadPair(s32 picture, s32 slot)
Decompresses picture picture of gRenderResource_PairSourceTable, a 64x16
heading (Save, Continue, Copy, Erase, Battle, Link, Pause, Setup) of 512
bytes, into VRAM slot slot, through a 1 KB staging block in heap slot 14.
The heap block is not freed when slot is not a valid VRAM slot.
Used by RenderResource_CreatePair.
RenderResource_CreatePair
struct RenderOutput * RenderResource_CreatePair(s32 picture, struct UiWindow *window, s32 x, s32 y)
Shows heading picture of gRenderResource_PairSourceTable as two 32x16
sprites side by side at (x, y) in window, on draw layer 253, and
returns the left one (the right one follows it in the window's list).
Returns NULL when no VRAM slot is free. The save file menu shows its
mode's heading this way (SaveMenu_SelectSlot), and window/options.c the
option screen's Setup and the system menu's Pause.
Used by Menu_RunWorkspaceOptions, Menu_RunWorkspaceSelectionLoop, SaveMenu_SelectSlot.
RenderOutput_BobPair
void RenderOutput_BobPair(struct RenderOutput *obj)
Bobs the two sprites of a pair (see RenderResource_CreatePair) up and down by gUi_PairBobOffsets, one step every four frames.
Used by Menu_RunWorkspaceOptions, Menu_RunWorkspaceSelectionLoop, SaveMenu_SelectSlot.
RenderResource_LoadFrame
void RenderResource_LoadFrame(s32 icon, s32 slot, s32 remap)
Decompresses command icon icon (a 32x32 picture of 256 colours, 1 KB)
into VRAM slot slot, remapping its first 768 bytes' colours by table
when remap is nonzero.
Used by Menu_RunWorkspaceOptions, Menu_RunWorkspaceSelectionLoop, RenderResource_CreateFrame.
RenderResource_CreateFrame
struct RenderOutput *RenderResource_CreateFrame(s32 icon, s32 remap, struct UiWindow *window, s32 x, s32 y)
Shows command icon icon (see RenderResource_LoadFrame) as a 32x32
256-colour sprite at (x, y) in window, on draw layer 251. Returns NULL
when no VRAM slot is free. The option menu's icons come through here
(window/options.c).
Used by OptionMenu_Open, SystemMenu_Open.
Ui_ApplyTableScaleToObject
void Ui_ApplyTableScaleToObject(struct RenderOutput *obj)
Makes the sprite obj pulse: scales it about its centre by
gUi_ObjectPulseScales (in 1/65536, used in 1/256), one step every two
frames, and puts it on draw layer 252. Does nothing when obj is NULL.
The option menu pulses its selected icon with it each frame
(window/options.c).
Used by OptionMenu_AnimateCursors, SystemMenu_AnimateCursor.
Also, functions without a comment: XorWord.
Macros, without a comment: RANGE_PATTERN_SET_COUNT, RANGE_PATTERN_COUNT, RANGE_PATTERN_PAIR_WORDS.
Globals, without a comment: gRenderResource_PairSourceTable.