1#ifndef ALCHEMY_WINDOW_H
2#define ALCHEMY_WINDOW_H
Declares nothing of its own: it only includes edition.h and render_input.h.
STATIC_ASSERT, a compile-time check that emits nothing.
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
#define offsetof(type, member)
A list of render outputs: its first output and the link to append after.
A render output: a sprite in a window's output list (a character, an icon or a portrait),...
A text channel, one of three, which types decoded text into a window a few characters a frame and run...
The window system's work: the windows' tilemap, the windows, the three text channels,...
struct UiWindow windows[WINDOW_COUNT]
u8 mode
Set while Mind Read shows thoughts: round frame corners, colour 8 text with no shadow,...
u16 speakerVoiceCountdown
characters until the next voice blip
u32 values[8]
Message argument values (UiWork_PushValueSlot).
struct RenderOutput outputs[UI_OUTPUT_COUNT]
u8 spacingBefore
1 for halting speech: a pause before each character, broken off with an ellipsis after the first word...
u16 tilemap[640]
the windows' BG tilemap, 32 by 20 tiles
u16 unknownAfterLineSpacing
set to 1 with the text style; not read
u8 alt
1 lets text use 256 tiles, adding tiles 0x200 to 0x27F
u8 dirty
The tilemap's 4-row bands to upload: bit 0 for all, bit n + 1 for band n.
u8 level
text tiles' palette; 15 by default, 14 or 5 for low HP
u16 entries[RENDER_ENTRY_MASK+1]
decoded text, a ring of codes
u16 speakerVoiceSound
first of four voice blip sounds; 0 for none
u16 tileCursor
the text tile the next search for a free one starts at
struct UiChannelSlot channels[3]
u16 count
where the next code goes in entries
u8 unknownBeforeValues[RENDER_VALUE_TABLE_OFFSET - RENDER_COUNTER_OFFSET - 4]
Not named by TBS code.
u16 glyphResource
VRAM cache slot of the page arrow; 99 when none.
u16 colour
the current channel's, copied in to draw
u16 letterSpacing
pixels between sprite glyphs; 9
u16 outputIds[2]
VRAM cache slot of each portrait slot's picture.
u16 resourceIds[2]
picture shown in each portrait slot; 999 when free
u16 names[8]
the MSG_ARG_ kind of each value; 0 for a free slot
u16 outline
the current channel's, copied in to draw
u8 busy
Set while a message waits on its sound: the text ends its pauses and pages once the sound is over.
u8 tileAttributes[256]
Per text tile (tiles 0x80 to 0xFF, then 0x200 to 0x27F): bit 0 once allocated, bit 1 while the tilema...
u8 menuState
1 from the work's setup; 2 while a battle message is decoded.
u8 spacingAfter
1 puts code 222 after certain characters in English and Japanese (UiWork_SetBusyFlags bit 1).
u8 pageArrowShown
1 while the next-page arrow is shown
u16 glyphTiles
first sprite tile of the glyph sheet (picture 95)
u8 menuBusy
while set, the tilemap is not uploaded
struct RenderOutputList freeOutputs
the outputs not in any window
u16 lineSpacing
the current channel's, copied in to draw
u16 messageStart
where the last decoded message began in entries
A window: a framed rectangle of the tilemap with its sprite outputs, its opening or closing animation...
Values that differ by patch level or language, chosen once for their code.
#define RENDER_OUTPUT_TABLE_OFFSET
#define RENDER_ALT_OFFSET
#define RENDER_VALUE_TABLE_OFFSET
#define RENDER_SLOT_VALUE_OFFSET
#define RENDER_SLOT_ID_OFFSET
#define RENDER_FREE_HEAD_OFFSET
#define RENDER_TILE_ATTR_OFFSET
#define RENDER_FREE_TAIL_OFFSET
#define RENDER_RESULT_OFFSET
#define RENDER_COUNTER_OFFSET
#define RENDER_BUSY_OFFSET
#define RENDER_PARAM_OFFSET
#define RENDER_DIRTY_OFFSET
#define RENDER_WORD_OFFSET
#define RENDER_ENTRY_COUNT_OFFSET
#define RENDER_ENTRY_TABLE_OFFSET
#define RENDER_WORD2_OFFSET
#define RENDER_CHANNEL_OFFSET
#define RENDER_NAME_TABLE_OFFSET
#define RENDER_ENTRY_MASK
The integer types, TRUE, UNUSED and the fixed-address macros.
Declares nothing of its own: it only includes edition.h and uiwindow.h.