struct WIN_STATE
The window system's state: its text tile and upload 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 | nextTextTile | The text tile the next search for a free one starts at. |
Uint8 | extraTextTiles | 1 lets text use the second range of tiles. |
Uint8 | dirty | The tilemap's 4-row bands to upload: bit 0 for all, bit n + 1 for band n. |
Uint8 | mindRead | Nonzero while minds are read, which widens a message window by 2 tiles. |
Uint8 | battleMode | Where the windows are drawn (WINDOW_BATTLE_MODE). |
Uint8 | holdTilemapUpload | While set, the tilemap is not uploaded. |
Uint8 | textPalette | Text tiles' palette; 15 by default. |
Uint16 | tilemap [20][32] | The windows' BG tilemap. |
WINDOW | windows [WINDOW_COUNT] | |
MESSAGE | msgs [3] | |
WINDOW_SPR | sprites [WINDOW_SPRITE_COUNT] | |
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 | lineSpacing | The line spacing, outline and colour of the message being drawn, copied from it. |
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 | The spacing of glyph sprites, TEXT_DEFAULT_GLYPH_SPACING from the text style on. |
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; 99 when none. |
Uint16 | glyphTiles | First of the glyph tiles (cache entry 95). |
Uint32 | argumentValues [8] | Message argument values (mnMessageArgumentPush). |
Uint16 | argumentKinds [8] | The MESSAGE_ARGUMENT_ kind of each; 0 when free. |
Uint16 | portraitPictures [2] | Picture shown in each portrait slot; 999 when free. |
Uint16 | portraitSprites [2] | VRAM cache slot of each portrait slot's picture. |
Uint16 | speakerVoiceSound | First of four voice blip sounds; 0 for none. |
Uint16 | speakerVoiceCountdown | 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. |
Uint8 | haltingSpeech | The decode flags set for the next messages |
Uint8 | spacingAfter | (mnMessageSetDecodeFlags): MESSAGE_DECODE_HALTING_SPEECH and MESSAGE_DECODE_SPACING_AFTER. |
Sint8 | textMode | Nonzero lets a tall message fit in 32 pixels, placing its glyphs by y / 320 (MESSAGE.compressLines). |
Description
The window system's state: its text tile and upload 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 fdBattleEffectStartCanvasSprite(), fdMessageSetVoiceFromActor(), fdMessageShowAtActor(), fdPsynergyGreyMindReadPalette(), fdPsynergyParch(), fdPsynergyRestoreMindReadPalette(), mnBattleCollectPartyCommands(), mnBattleCommandRowRun(), mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattleMessageOpen(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun(), mnDebugBrowserPortraits(), mnDjinnMenuDrawPage(), mnDjinnMenuDrawStatPreview(), mnDjinnMenuRunPreview(), mnDjinnMenuSelectDjinn(), mnDjinnMenuShowHelp(), mnDjinnMenuShowMemberStatus(), mnDjinnShowJoinedMessage(), mnFieldMessageShow(), mnFieldMessageShowCentered(), mnFileListFillHighlight(), mnGlyphAddBlankSprite(), mnGlyphDraw(), mnGlyphDrawAsSprite(), mnItemMenuRun(), mnMessageApplyStyle(), mnMessageArgumentClearAll(), mnMessageArgumentLookup(), mnMessageArgumentPush(), mnMessageCopyExpanded(), mnMessageDecode(), mnMessageDecodeAppend(), mnMessageOpenDecoded(), mnMessageOpenWindow(), mnMessageSetDecodeFlags(), mnMessageStart(), mnMessageType(), mnNameEntryEditMemberName(), mnPartyShowJoinedMessage(), mnPartyShowPairJoinedMessage(), mnPartyStatusBuildLayoutBounds(), mnPartyStatusCreateWindow(), mnPartyStatusDraw(), mnPartyStatusDrawBars(), mnPortraitClearSlots(), mnPortraitCloseWindow() and 66 more.
Definition at line 653 of file window.h.
Fields in detail
nextTextTile
Uint16 nextTextTile
The text tile the next search for a free one starts at.
extraTextTiles
Uint8 extraTextTiles
1 lets text use the second range of tiles.
dirty
Uint8 dirty
The tilemap's 4-row bands to upload: bit 0 for all, bit n + 1 for band n.
mindRead
Uint8 mindRead
Nonzero while minds are read, which widens a message window by 2 tiles.
battleMode
Uint8 battleMode
Where the windows are drawn
(WINDOW_BATTLE_MODE).
holdTilemapUpload
Uint8 holdTilemapUpload
While set, the tilemap is not uploaded.
textPalette
Uint8 textPalette
Text tiles' palette; 15 by default.
tilemap
Uint16 tilemap[20][32]
The windows' BG tilemap.
windows
WINDOW windows[WINDOW_COUNT]
msgs
MESSAGE msgs[3]
sprites
WINDOW_SPR sprites[WINDOW_SPRITE_COUNT]
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.
lineSpacing
Uint16 lineSpacing
The line spacing, outline and colour of the message being drawn, copied from it.
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
The spacing of glyph
sprites,
TEXT_DEFAULT_GLYPH_SPACING
from the text style on.
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; 99 when none.
glyphTiles
Uint16 glyphTiles
First of the glyph tiles (cache entry 95).
argumentValues
Uint32 argumentValues[8]
Message argument values
(mnMessageArgumentPush).
argumentKinds
Uint16 argumentKinds[8]
The MESSAGE_ARGUMENT_ kind
of each; 0 when free.
portraitPictures
Uint16 portraitPictures[2]
Picture shown in each portrait slot; 999 when free.
portraitSprites
Uint16 portraitSprites[2]
VRAM cache slot of each
portrait slot's picture.
speakerVoiceSound
Uint16 speakerVoiceSound
First of four voice blip sounds; 0 for none.
speakerVoiceCountdown
Uint16 speakerVoiceCountdown
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.
haltingSpeech
Uint8 haltingSpeech
The decode flags set for the next messages
spacingAfter
Uint8 spacingAfter
(mnMessageSetDecodeFlags):
MESSAGE_DECODE_HALTING_SPEECH and
MESSAGE_DECODE_SPACING_AFTER.
textMode
Sint8 textMode
Nonzero lets a tall message fit in 32
pixels, placing its glyphs by y / 320
(MESSAGE.compressLines).