struct WIN_STATE
The window system's state: the windows' tilemap, the windows, the three text messages, the 64 window sprites, and the decoded message and its arguments.
Declared in window.h.
Fields
| Name | Description | |
|---|---|---|
Uint16 | tilemap [640] | The windows' BG tilemap, 32 by 20 tiles. |
WINDOW | windows [WINDOW_COUNT] | 12 in Japanese, 8 in the others. |
MESSAGE | msgs [3] | The messages, a NULL |
WINDOW_SPR | sprites [WINDOW_SPRITE_COUNT] | window when free. |
WINDOW_SPR_LIST | freeSprites | The sprites not in any window. |
Uint8 | textTileState [2 * TEXT_TILES] | Per text tile (tiles 128 to 255, then 512 to 639): bit 0 once allocated, bit 1 while the tilemap shows it, 0 when free. |
Uint16 | nextTextTile | The text tile the next search for a free one starts at. |
Uint8 | extraTextTiles | 1 lets text use 256 tiles, adding tiles 512 to 639. |
Uint8 | dirty | The tilemap's 4-row bands to upload: bit 0 for all, bit n + 1 for band n. |
Uint8 | mindRead | Set while Mind Read shows thoughts: round border corners, colour 8 text with no shadow, and latched button presses to dismiss text. |
Uint8 | battleMode | WINDOW_SCREEN. |
Uint8 | holdTilemapUpload | While set, the tilemap is not uploaded. |
Uint8 | textPalette | Text tiles' palette; 15 by default, 14 or 5 for low HP. |
Uint16 | lineSpacing | The line spacing, outline and colour of the message being drawn (mnMessageApplyStyle). |
Uint16 | unusedAfterLineSpacing | Set to 1 with the text style; not read. |
Uint16 | outline | |
Uint16 | colour | |
Uint16 | textBuf [TEXT_BUFFER_MASK + 1] | Decoded text, a ring of codes. |
Uint16 | letterSpacing | Pixels between sprite glyphs; 9. |
Uint16 | textBufEnd | Where the next code goes in textBuf. |
Uint16 | lastMsgStart | Where the last decoded message began in textBuf. |
Uint16 | glyphResource | VRAM cache slot of the page arrow; NO_GLYPH_RESOURCE when none. |
Uint16 | glyphTiles | First of the sprite tiles letters are drawn into (VRAM_CACHE_ENTRY_GLYPH_TILES). |
Uint32 | argumentValues [8] | Message argument values (mnMessageArgumentPush). |
Uint16 | argumentKinds [8] | The MESSAGE_ARGUMENT_ kind of each value; 0 for a free slot. |
Uint16 | portraitPictures [2] | Picture shown in each portrait slot; PORTRAIT_SLOT_EMPTY when free. |
Uint16 | portraitSprites [2] | VRAM cache slot of each portrait slot's picture. |
Uint16 | voiceSound | First of four voice blip sounds; 0 for none. |
Uint16 | voiceCountdown | Characters until the next voice blip. |
Uint8 | pageArrowShown | 1 while the next-page arrow is shown. |
Uint8 | waitingForSound | Set while a message waits on its sound: the text ends its pauses and pages once the sound is over. |
Uint8 | haltingSpeech | 1 for halting speech: a pause before each character, broken off with an ellipsis after the first word (MESSAGE_DECODE_HALTING_SPEECH). |
Uint8 | voicedSpeech | 1 writes a voiced mark (TEXT_MARK_VOICED) after each kana, in English after each character from code 128 on (MESSAGE_DECODE_VOICED_SPEECH); no message is decoded with it. |
Description
The window system's state: the windows' tilemap, the windows, the three text messages, the 64 window sprites, and the decoded message and its arguments.
struct WIN_STATE
Referenced by btDebugBattleViewMessages(), fdMessageSetVoiceFromActor(), fdMessageShowAtActor(), fdPsynergyRestoreMindReadPalette(), mnBattleCollectPartyCommands(), mnBattleCommandRowRun(), mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattleMessageOpen(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun(), mnDebugBrowserPortraits(), mnDjinnMenuDrawElementList(), mnDjinnMenuRunPreview(), mnDjinnMenuShowHelp(), mnDjinnMenuShowMemberStatus(), mnDjinnShowJoinedMessage(), mnFieldMessageShow(), mnFieldMessageShowCentered(), mnFileListSelectFile(), mnGlyphDraw(), mnMessageApplyStyle(), mnMessageArgumentClearAll(), mnMessageArgumentLookup(), mnMessageArgumentPush(), mnMessageCopyExpanded(), mnMessageDecode(), mnMessageOpenDecoded(), mnMessageOpenWindow(), mnMessageSetDecodeFlags(), mnMessageType(), mnNameEntryEditMemberName(), mnPartyShowJoinedMessage(), mnPartyShowPairJoinedMessage(), mnPartyStatusBuildLayoutBounds(), mnPartyStatusDraw(), mnPartyStatusDrawBars(), mnPortraitClearSlots(), mnPortraitCloseWindow(), mnPortraitCreate(), mnPortraitOpenWindow(), mnPortraitReload(), mnTextCheckPauseSkipped(), mnTextCheckTextDismissed(), mnTextDrawGlyphPair(), mnTextDrawMessage(), mnTextDrawMessageAsTiles(), mnTextDrawPrefixedNumberAtOffset(), mnTextDrawStringAsTiles() and 48 more.
Definition at line 126 of file window.h.
Fields in detail
tilemap
Uint16 tilemap[640]
The windows' BG tilemap, 32 by 20 tiles.
windows
WINDOW windows[WINDOW_COUNT]
12 in Japanese, 8 in the others.
msgs
MESSAGE msgs[3]
The messages, a NULL
sprites
WINDOW_SPR sprites[WINDOW_SPRITE_COUNT]
window when free.
freeSprites
WINDOW_SPR_LIST freeSprites
The sprites not in any window.
textTileState
Uint8 textTileState[2 * TEXT_TILES]
Per text tile (tiles 128 to 255, then 512 to 639): bit 0 once allocated, bit 1 while the tilemap shows it, 0 when free.
nextTextTile
Uint16 nextTextTile
The text tile the next search for a free one starts at.
extraTextTiles
Uint8 extraTextTiles
1 lets text use 256 tiles, adding tiles 512 to 639.
dirty
Uint8 dirty
The tilemap's 4-row bands to upload: bit 0 for all, bit n + 1 for band n.
mindRead
Uint8 mindRead
Set while Mind Read shows thoughts: round border corners, colour 8 text with no shadow, and latched button presses to dismiss text.
battleMode
Uint8 battleMode
holdTilemapUpload
Uint8 holdTilemapUpload
While set, the tilemap is not uploaded.
textPalette
Uint8 textPalette
Text tiles' palette; 15 by default, 14 or 5 for low HP.
lineSpacing
Uint16 lineSpacing
The line spacing, outline
and colour of the message
being drawn
(mnMessageApplyStyle).
unusedAfterLineSpacing
Uint16 unusedAfterLineSpacing
Set to 1 with the text style; not read.
outline
Uint16 outline
colour
Uint16 colour
textBuf
Uint16 textBuf[TEXT_BUFFER_MASK + 1]
Decoded text, a ring of codes.
letterSpacing
Uint16 letterSpacing
Pixels between sprite glyphs; 9.
textBufEnd
Uint16 textBufEnd
Where the next code goes in textBuf.
lastMsgStart
Uint16 lastMsgStart
Where the last decoded message began in textBuf.
glyphResource
Uint16 glyphResource
VRAM cache slot of the
page arrow;
NO_GLYPH_RESOURCE when
none.
glyphTiles
Uint16 glyphTiles
First of the sprite tiles letters
are drawn into
(VRAM_CACHE_ENTRY_GLYPH_TILES).
argumentValues
Uint32 argumentValues[8]
Message argument values
(mnMessageArgumentPush).
argumentKinds
Uint16 argumentKinds[8]
The MESSAGE_ARGUMENT_ kind of each
value; 0 for a free slot.
portraitPictures
Uint16 portraitPictures[2]
Picture shown in each portrait slot;
PORTRAIT_SLOT_EMPTY when free.
portraitSprites
Uint16 portraitSprites[2]
VRAM cache slot of each portrait
slot's picture.
voiceSound
Uint16 voiceSound
First of four voice blip sounds; 0 for none.
voiceCountdown
Uint16 voiceCountdown
Characters until the next voice blip.
pageArrowShown
Uint8 pageArrowShown
1 while the next-page arrow is shown.
waitingForSound
Uint8 waitingForSound
Set while a message waits on its sound: the text ends its pauses and pages once the sound is over.
haltingSpeech
Uint8 haltingSpeech
1 for halting speech: a pause before
each character, broken off with an
ellipsis after the first word
(MESSAGE_DECODE_HALTING_SPEECH).
voicedSpeech
Uint8 voicedSpeech
1 writes a voiced mark
(TEXT_MARK_VOICED) after each kana,
in English after each character from
code 128 on
(MESSAGE_DECODE_VOICED_SPEECH); no
message is decoded with it.