Alchemy
Loading...
Searching...
No Matches

UiRenderWork Struct Reference

The window system's work: the windows' tilemap, the windows, the three text channels, the 64 render outputs, and the decoded message and its arguments. More...

#include <window.h>

Data Fields

u16 tilemap [640]
 the windows' BG tilemap, 32 by 20 tiles
struct UiWindow windows [WINDOW_COUNT]
struct UiChannelSlot channels [3]
struct RenderOutput outputs [UI_OUTPUT_COUNT]
struct RenderOutputList freeOutputs
 the outputs not in any window
u8 tileAttributes [256]
 Per text tile (tiles 0x80 to 0xFF, then 0x200 to 0x27F): bit 0 once allocated, bit 1 while the tilemap shows it, 0 when free.
u16 tileCursor
 the text tile the next search for a free one starts at
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 mode
 Set while Mind Read shows thoughts: round frame corners, colour 8 text with no shadow, and latched button presses to dismiss text.
u8 menuState
 1 from the work's setup; 2 while a battle message is decoded.
u8 menuBusy
 while set, the tilemap is not uploaded
u8 level
 text tiles' palette; 15 by default, 14 or 5 for low HP
u16 lineSpacing
 the current channel's, copied in to draw
u16 unknownAfterLineSpacing
 set to 1 with the text style; not read
u16 outline
 the current channel's, copied in to draw
u16 colour
 the current channel's, copied in to draw
u16 entries [RENDER_ENTRY_MASK+1]
 decoded text, a ring of codes
u16 letterSpacing
 pixels between sprite glyphs; 9
u16 count
 where the next code goes in entries
u16 messageStart
 where the last decoded message began in entries
u16 glyphResource
 VRAM cache slot of the page arrow; 99 when none.
u16 glyphTiles
 first sprite tile of the glyph sheet (picture 95)
u8 unknownBeforeValues [RENDER_VALUE_TABLE_OFFSET - RENDER_COUNTER_OFFSET - 4]
 Not named by TBS code.
u32 values [8]
 Message argument values (UiWork_PushValueSlot).
u16 names [8]
 the MSG_ARG_ kind of each value; 0 for a free slot
u16 resourceIds [2]
 picture shown in each portrait slot; 999 when free
u16 outputIds [2]
 VRAM cache slot of each portrait slot's picture.
u16 speakerVoiceSound
 first of four voice blip sounds; 0 for none
u16 speakerVoiceCountdown
 characters until the next voice blip
u8 pageArrowShown
 1 while the next-page arrow is shown
u8 busy
 Set while a message waits on its sound: the text ends its pauses and pages once the sound is over.
u8 spacingBefore
 1 for halting speech: a pause before each character, broken off with an ellipsis after the first word (UiWork_SetBusyFlags bit 0).
u8 spacingAfter
 1 puts code 222 after certain characters in English and Japanese (UiWork_SetBusyFlags bit 1).

Detailed Description

The window system's work: the windows' tilemap, the windows, the three text channels, the 64 render outputs, and the decoded message and its arguments.

Definition at line 19 of file window.h.

Field Documentation

◆ tilemap

◆ windows

struct UiWindow UiRenderWork::windows[WINDOW_COUNT]

◆ channels

struct UiChannelSlot UiRenderWork::channels[3]

Definition at line 22 of file window.h.

Referenced by UiWork_DrainPending().

◆ outputs

struct RenderOutput UiRenderWork::outputs[UI_OUTPUT_COUNT]

Definition at line 23 of file window.h.

Referenced by RenderOutput_InitFreeList(), RenderOutput_ReleaseFree(), and UiText_DrawGlyph().

◆ freeOutputs

struct RenderOutputList UiRenderWork::freeOutputs

the outputs not in any window

Definition at line 24 of file window.h.

Referenced by RenderOutput_AcquireFree(), RenderOutput_InitFreeList(), and RenderOutput_ReleaseFree().

◆ tileAttributes

u8 UiRenderWork::tileAttributes[256]

Per text tile (tiles 0x80 to 0xFF, then 0x200 to 0x27F): bit 0 once allocated, bit 1 while the tilemap shows it, 0 when free.

The first three hold the bottom frame tiles' lower rows and are 4.

Definition at line 28 of file window.h.

Referenced by UiText_RenderStringTiles(), UiWindow_ClearTileAttributesInRect(), UiWindow_MarkVisibleTileAttributes(), UiWindow_OverlayTilePattern(), UiWork_Initialize(), and UiWork_SetAltFlagAndClearTable().

◆ tileCursor

u16 UiRenderWork::tileCursor

the text tile the next search for a free one starts at

Definition at line 29 of file window.h.

Referenced by UiText_RenderStringTiles(), UiWindow_OverlayTilePattern(), and UiWindow_SetRectPalette().

◆ alt

u8 UiRenderWork::alt

1 lets text use 256 tiles, adding tiles 0x200 to 0x27F

Definition at line 30 of file window.h.

Referenced by UiText_RenderStringTiles(), UiWindow_ClearTileAttributesInRect(), UiWindow_MarkVisibleTileAttributes(), and UiWork_SetAltFlagAndClearTable().

◆ dirty

◆ mode

◆ menuState

u8 UiRenderWork::menuState

1 from the work's setup; 2 while a battle message is decoded.

While nonzero, typing speeds up with the lag frames shown and the bottom rows of a cleared rectangle keep the battle tile.

Definition at line 39 of file window.h.

Referenced by PartyStatusDraw(), UiText_PrepareMessageWork(), UiWindow_BuildLayoutBounds(), UiWindow_DrawColumnBorders(), UiWindow_DrawStatusBarTiles(), UiWindow_EraseBorderRect(), UiWork_Initialize(), and UiWork_StepChannelScript().

◆ menuBusy

◆ level

u8 UiRenderWork::level

text tiles' palette; 15 by default, 14 or 5 for low HP

Definition at line 41 of file window.h.

Referenced by Battle_CollectPartyCommands(), BattleMenu_RunActionSelection(), PartyStatusDraw(), UiText_RenderStringTiles(), UiWork_Initialize(), and UiWork_InitializeWithResourceCounters().

◆ lineSpacing

◆ unknownAfterLineSpacing

u16 UiRenderWork::unknownAfterLineSpacing

set to 1 with the text style; not read

Definition at line 43 of file window.h.

Referenced by UiWork_ResetCounters().

◆ outline

◆ colour

◆ entries

◆ letterSpacing

u16 UiRenderWork::letterSpacing

◆ count

◆ messageStart

u16 UiRenderWork::messageStart

where the last decoded message began in entries

Definition at line 49 of file window.h.

Referenced by UiText_BuildRenderEntries().

◆ glyphResource

u16 UiRenderWork::glyphResource

◆ glyphTiles

u16 UiRenderWork::glyphTiles

first sprite tile of the glyph sheet (picture 95)

Definition at line 51 of file window.h.

Referenced by UiText_DrawGlyph(), UiWork_InitCountersAndScheduleRefresh(), and UiWork_InitCountersWithResourceAndScheduleRefresh().

◆ unknownBeforeValues

u8 UiRenderWork::unknownBeforeValues[RENDER_VALUE_TABLE_OFFSET - RENDER_COUNTER_OFFSET - 4]

Not named by TBS code.

Definition at line 53 of file window.h.

◆ values

u32 UiRenderWork::values[8]

Message argument values (UiWork_PushValueSlot).

A portrait's release writes its palette slot state at RENDER_PALETTE_TABLE_OFFSET, in here.

Definition at line 56 of file window.h.

Referenced by UiText_LookupArgument(), UiWork_ClearValueNameTables(), and UiWork_PushValueSlot().

◆ names

u16 UiRenderWork::names[8]

the MSG_ARG_ kind of each value; 0 for a free slot

Definition at line 57 of file window.h.

Referenced by UiText_LookupArgument(), UiWork_ClearValueNameTables(), and UiWork_PushValueSlot().

◆ resourceIds

u16 UiRenderWork::resourceIds[2]

picture shown in each portrait slot; 999 when free

Definition at line 58 of file window.h.

Referenced by CreateSideObject(), Ui_LoadCharacterEntryForSlot(), UiWork_ClearPortraitSlots(), and UiWork_FinalizeEntityMatchingLocalizedId().

◆ outputIds

u16 UiRenderWork::outputIds[2]

VRAM cache slot of each portrait slot's picture.

Definition at line 59 of file window.h.

Referenced by CreateSideObject(), Ui_LoadCharacterEntryForSlot(), and UiWork_FinalizeEntityMatchingLocalizedId().

◆ speakerVoiceSound

◆ speakerVoiceCountdown

◆ pageArrowShown

u8 UiRenderWork::pageArrowShown

1 while the next-page arrow is shown

Definition at line 62 of file window.h.

Referenced by DjinnMenu_ShowHelp(), and UiWork_StepChannelScript().

◆ busy

u8 UiRenderWork::busy

Set while a message waits on its sound: the text ends its pauses and pages once the sound is over.

Definition at line 65 of file window.h.

Referenced by UiText_CheckPauseSkipped(), and UiText_CheckTextDismissed().

◆ spacingBefore

u8 UiRenderWork::spacingBefore

1 for halting speech: a pause before each character, broken off with an ellipsis after the first word (UiWork_SetBusyFlags bit 0).

Definition at line 68 of file window.h.

Referenced by UiText_BuildRenderEntries(), UiText_OpenMessageWindow(), and UiWork_SetBusyFlags().

◆ spacingAfter

u8 UiRenderWork::spacingAfter

1 puts code 222 after certain characters in English and Japanese (UiWork_SetBusyFlags bit 1).

Definition at line 71 of file window.h.

Referenced by UiText_BuildRenderEntries(), UiText_OpenMessageWindow(), and UiWork_SetBusyFlags().