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). | |
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.
| u16 UiRenderWork::tilemap[640] |
the windows' BG tilemap, 32 by 20 tiles
Definition at line 20 of file window.h.
Referenced by Menu_RunCommandRow(), NameEntry_EditOwnerName(), Render_SetTilemapFlagRect(), SaveMenu_FillTileBlock(), SaveMenu_FillTileGrid(), Ui_SetRectHighlight(), UiText_DrawCharacterAtOffset(), UiText_DrawPrefixedNumberAtOffset(), UiText_DrawStringAtOffset(), UiText_RenderGlyphTileAtWorkOffset(), UiWindow_ClearInteriorTiles(), UiWindow_CopyTilemapRegion(), UiWindow_DrawColumnBorders(), UiWindow_DrawDividerLine(), UiWindow_DrawFrame(), UiWindow_DrawStatusBarTiles(), UiWindow_EraseBorderRect(), UiWindow_FillTilemapRect(), UiWindow_MapTextCanvasTiles(), UiWindow_PutGlyph(), UiWindow_SetRectPalette(), UiWindow_SetTileAttributeBitRect(), UiWindow_SetTileAttributeRect(), UiWindow_SetTilemapEntry(), UiWork_Initialize(), UiWork_InitializeWithResourceCounters(), and UiWork_UploadDirtyBlocks().
| struct UiWindow UiRenderWork::windows[WINDOW_COUNT] |
Definition at line 21 of file window.h.
Referenced by UiWork_AnimateSpriteSlots(), UiWork_DrainPending(), and UiWork_FinalizeEntityMatchingLocalizedId().
| struct UiChannelSlot UiRenderWork::channels[3] |
Definition at line 22 of file window.h.
Referenced by UiWork_DrainPending().
| struct RenderOutput UiRenderWork::outputs[UI_OUTPUT_COUNT] |
Definition at line 23 of file window.h.
Referenced by RenderOutput_InitFreeList(), RenderOutput_ReleaseFree(), and UiText_DrawGlyph().
| 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().
| 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().
| 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().
| 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().
| u8 UiRenderWork::dirty |
The tilemap's 4-row bands to upload: bit 0 for all, bit n + 1 for band n.
Definition at line 32 of file window.h.
Referenced by Battle_SelectAbility(), BattleMenu_RunActionSelection(), Djinn_ShowJoinedMessage(), ItemList_SelectEntry(), Menu_RunCommandRow(), NameEntry_EditOwnerName(), OwnerAction_RunCompareLoop(), Party_ShowJoinedMessage(), Party_ShowPairJoinedMessage(), Render_SetTilemapFlagRect(), SaveMenu_SelectSlot(), SummonMenu_SelectSummon(), Ui_RunOwnerStatusScreen(), UiText_RenderWideStringInWindow(), UiWindow_ClearInteriorTiles(), UiWindow_DrawColumnBorders(), UiWindow_DrawFrame(), UiWindow_DrawOpened(), UiWindow_EraseBorderRect(), UiWindow_FillTilemapRect(), UiWindow_MapTextCanvasTiles(), UiWindow_SetTileAttributeBitRect(), UiWindow_SetTileAttributeRect(), UiWork_Initialize(), UiWork_InitializeWithResourceCounters(), and UiWork_UploadDirtyBlocks().
| u8 UiRenderWork::mode |
Set while Mind Read shows thoughts: round frame corners, colour 8 text with no shadow, and latched button presses to dismiss text.
Definition at line 35 of file window.h.
Referenced by Battle_CollectPartyCommands(), RenderOutput_SetAnimation(), Ui_FillBank15PaletteGrey(), Ui_SetBank15PaletteAndClearRenderMode(), UiText_CheckTextDismissed(), UiText_DrawGlyph(), UiText_MeasureAllPages(), UiText_MeasureEntryDimensions(), UiText_OpenMessageAtObject(), UiText_RenderGlyphPair(), UiWindow_DrawFrame(), UiWindow_PutGlyph(), UiWindow_SetTilemapEntry(), UiWork_Initialize(), UiWork_StepChannelScript(), and Vault_UpdateRoofComplainerProximity().
| 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().
| u8 UiRenderWork::menuBusy |
while set, the tilemap is not uploaded
Definition at line 40 of file window.h.
Referenced by Battle_SelectAbility(), BattleMenu_RunActionSelection(), DjinnMenu_ShowHelp(), DjinnMenu_ShowOwnerStatus(), ItemList_SelectEntry(), ItemMenu_Run(), Menu_RunCommandRow(), OwnerAction_RunCompareLoop(), PartyStatusDraw(), PsynergyMenu_Run(), StatusMenu_Run(), SummonMenu_SelectSummon(), UiWork_ClearMenuBusy(), UiWork_SetMenuBusy(), and UiWork_UploadDirtyBlocks().
| 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().
| u16 UiRenderWork::lineSpacing |
the current channel's, copied in to draw
Definition at line 42 of file window.h.
Referenced by UiText_ApplyChannelStyle(), UiText_DrawGlyph(), UiText_RenderWideStringAtOffset(), UiWork_InitCountersAndScheduleRefresh(), UiWork_InitCountersWithResourceAndScheduleRefresh(), and UiWork_ResetCounters().
| u16 UiRenderWork::unknownAfterLineSpacing |
set to 1 with the text style; not read
Definition at line 43 of file window.h.
Referenced by UiWork_ResetCounters().
| u16 UiRenderWork::outline |
the current channel's, copied in to draw
Definition at line 44 of file window.h.
Referenced by UiText_ApplyChannelStyle(), UiText_DrawGlyph(), UiText_MeasureAllPages(), UiText_MeasureEntryDimensions(), UiText_RenderGlyphPair(), UiText_RenderWideStringAtOffset(), UiWork_InitCountersAndScheduleRefresh(), UiWork_InitCountersWithResourceAndScheduleRefresh(), UiWork_ResetCounters(), UiWork_SetRenderWord(), and UiWork_StepChannelScript().
| u16 UiRenderWork::colour |
the current channel's, copied in to draw
Definition at line 45 of file window.h.
Referenced by UiText_ApplyChannelStyle(), UiText_RenderGlyphPair(), UiText_RenderStringTiles(), UiText_RenderWideStringAtOffset(), UiWindow_DrawStatusBarTiles(), UiWork_InitCountersAndScheduleRefresh(), UiWork_InitCountersWithResourceAndScheduleRefresh(), UiWork_ResetCounters(), and UiWork_SetParamNibble().
| u16 UiRenderWork::entries[RENDER_ENTRY_MASK+1] |
decoded text, a ring of codes
Definition at line 46 of file window.h.
Referenced by UiText_BuildRenderEntries(), UiText_CopyMessageString(), UiText_DrawCharacterAtOffset(), UiText_DrawResource(), UiText_MeasureAllPages(), UiText_MeasureEntryDimensions(), UiText_OpenEntryMessage(), UiText_OpenMessageWindow(), UiText_PrepareMessageWork(), UiText_RenderGlyphTileAtWorkOffset(), UiText_RenderWideStringAtOffset(), UiText_RenderWideStringInWindow(), UiText_SetRenderString(), UiText_ShowCenteredMessage(), and UiWork_StepChannelScript().
| u16 UiRenderWork::letterSpacing |
pixels between sprite glyphs; 9
Definition at line 47 of file window.h.
Referenced by UiText_DrawGlyph(), UiWork_InitCountersAndScheduleRefresh(), UiWork_InitCountersWithResourceAndScheduleRefresh(), and UiWork_ResetCounters().
| u16 UiRenderWork::count |
where the next code goes in entries
Definition at line 48 of file window.h.
Referenced by PartyStatusDraw(), UiText_BuildRenderEntries(), UiText_CopyMessageString(), UiText_DrawCharacterAtOffset(), UiText_DrawResource(), UiText_MeasureAllPages(), UiText_MeasureEntryDimensions(), UiText_RenderGlyphTileAtWorkOffset(), UiText_RenderWideStringAtOffset(), UiText_RenderWideStringInWindow(), UiText_SetRenderString(), UiWork_InitCountersAndScheduleRefresh(), and UiWork_InitCountersWithResourceAndScheduleRefresh().
| u16 UiRenderWork::messageStart |
where the last decoded message began in entries
Definition at line 49 of file window.h.
Referenced by UiText_BuildRenderEntries().
| u16 UiRenderWork::glyphResource |
VRAM cache slot of the page arrow; 99 when none.
Definition at line 50 of file window.h.
Referenced by DjinnMenu_ShowHelp(), UiText_DrawGlyph(), UiWindow_PutGlyph(), UiWork_AnimateSpriteSlots(), UiWork_Initialize(), UiWork_InitializeWithResourceCounters(), and UiWork_StepChannelScript().
| 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().
| u8 UiRenderWork::unknownBeforeValues[RENDER_VALUE_TABLE_OFFSET - RENDER_COUNTER_OFFSET - 4] |
| 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().
| 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().
| 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().
| 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().
| u16 UiRenderWork::speakerVoiceSound |
first of four voice blip sounds; 0 for none
Definition at line 60 of file window.h.
Referenced by Djinn_ShowJoinedMessage(), Party_ShowJoinedMessage(), Party_ShowPairJoinedMessage(), Ui_SetMessageVoiceFromActor(), UiText_OpenEntryMessage(), UiText_OpenMessageWindow(), UiText_ShowCenteredMessage(), UiWork_StepChannelScript(), and VenusLighthouseAerie_PlayShebasFall().
| u16 UiRenderWork::speakerVoiceCountdown |
characters until the next voice blip
Definition at line 61 of file window.h.
Referenced by Djinn_ShowJoinedMessage(), Party_ShowJoinedMessage(), Party_ShowPairJoinedMessage(), Ui_SetMessageVoiceFromActor(), UiText_OpenEntryMessage(), UiText_OpenMessageWindow(), UiText_ShowCenteredMessage(), UiWork_StepChannelScript(), and VenusLighthouseAerie_PlayShebasFall().
| 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().
| 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().
| 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().
| 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().