Alchemy
Loading...
Searching...
No Matches

window_internal.h File Reference

What every part of the window object shares: its includes, edition values, macros and the codes of decoded text. More...

Go to the source code of this file.

Macros

#define ITEM_POSSESSIVE_TEXT_COUNT   4
#define TEXT_ARGUMENT_SPACE   143
#define UI_SPRITE_SPACE_WIDTH   5
#define NO_GLYPH_RESOURCE   99
 A glyph resource id meaning no glyph resource is loaded.
#define UI_MESSAGE_CHANNEL_COUNT   3
#define UI_MESSAGE_LINE_COUNT   4
#define UI_TEXT_DEFAULT_COLOUR   15
#define UI_TEXT_DEFAULT_LINE_SPACING   10
#define UI_TILEMAP_PALETTE   15
#define UI_WINDOW_OPEN_FRAMES   8
#define UI_WINDOW_CLOSE_FRAMES   4
#define UI_PALETTE_SLOT_FREE   999
#define UI_CANVAS_BACKGROUND_WORD   0x44444444
#define UI_NUMBER_BUFFER_SIZE   16
#define UI_BYTE_STRING_BUFFER_SIZE   0x200
#define UI_MESSAGE_NAME_HALFWORDS   24
#define UI_ARGUMENT_SLOT_COUNT   8
#define UI_SELECTION_ENTRY_LIMIT   16
#define UI_AREA_NOTICE_FRAMES   90
#define TEXT_CODE_MARK_SHIFT   14
#define TEXT_CODE_VOICED   (1 << TEXT_CODE_MARK_SHIFT)
#define TEXT_CODE_SEMIVOICED   (2 << TEXT_CODE_MARK_SHIFT)
#define UI_WINDOW_EFFECT_SWELL   4
 The window effect a message can start (TEXT_WINDOW_STATE): the window's frame grows by a tile and its text sprites pulse, for the channel's countdown.
#define TEXT_WORK_BLOCK   50
 The heap block the message decoder routine is copied into to run.

Enumerations

enum  {
  TEXT_END = 0 , TEXT_PAGE = 1 , TEXT_WAIT_KEY = 2 , TEXT_NEWLINE = 3 ,
  TEXT_PAUSE_LONG = 4 , TEXT_PAUSE_SHORT = 5 , TEXT_PAUSE_LONGEST = 6 , TEXT_COLOURS_RESET = 7 ,
  TEXT_COLOUR = 8 , TEXT_OUTLINE = 9 , TEXT_LINE_SPACING = 10 , TEXT_WINDOW_STATE = 15 ,
  TEXT_END_ALT = 30 , TEXT_COMMANDS = 31 , TEXT_SPACE = 32 , TEXT_VOICED_MARK = 222 ,
  TEXT_SEMIVOICED_MARK = 223
}
 The control codes of decoded message text (UiRenderWork.entries). More...
enum  { HEAP_SLOT_BATTLE_DISPLAY = 37 }
 The heap slot of the battle display's work block (struct BattleDisplayWork), whose window is the battle message window. More...

Variables

GlyphTransfer * gGlyphWork
 The glyph transfer work in IWRAM (system/iwram.s), which icons are built in.
const void *const Text_MessageContexts [][2]
 Each message context bank's Huffman models and their offsets, which the message catalog built from games/tbs/text defines.

Detailed Description

What every part of the window object shares: its includes, edition values, macros and the codes of decoded text.

window.c includes it before the parts, and each part includes it too, so that a part read on its own still resolves.

Definition in file window_internal.h.

Macro Definition Documentation

◆ ITEM_POSSESSIVE_TEXT_COUNT

#define ITEM_POSSESSIVE_TEXT_COUNT   4

Definition at line 101 of file window_internal.h.

◆ TEXT_ARGUMENT_SPACE

#define TEXT_ARGUMENT_SPACE   143

Definition at line 108 of file window_internal.h.

Referenced by UiText_BuildRenderEntries().

◆ UI_SPRITE_SPACE_WIDTH

#define UI_SPRITE_SPACE_WIDTH   5

Definition at line 114 of file window_internal.h.

Referenced by UiText_DrawGlyph().

◆ NO_GLYPH_RESOURCE

#define NO_GLYPH_RESOURCE   99

A glyph resource id meaning no glyph resource is loaded.

Definition at line 126 of file window_internal.h.

Referenced by UiText_DrawGlyph(), UiWindow_PutGlyph(), UiWork_Initialize(), UiWork_InitializeWithResourceCounters(), and UiWork_StepChannelScript().

◆ UI_MESSAGE_CHANNEL_COUNT

#define UI_MESSAGE_CHANNEL_COUNT   3

◆ UI_MESSAGE_LINE_COUNT

#define UI_MESSAGE_LINE_COUNT   4

Definition at line 130 of file window_internal.h.

Referenced by UiText_QueueRenderEntries(), and UiText_StartBattleMessage().

◆ UI_TEXT_DEFAULT_COLOUR

#define UI_TEXT_DEFAULT_COLOUR   15

◆ UI_TEXT_DEFAULT_LINE_SPACING

#define UI_TEXT_DEFAULT_LINE_SPACING   10

◆ UI_TILEMAP_PALETTE

#define UI_TILEMAP_PALETTE   15

Definition at line 133 of file window_internal.h.

Referenced by UiWork_Initialize(), and UiWork_InitializeWithResourceCounters().

◆ UI_WINDOW_OPEN_FRAMES

#define UI_WINDOW_OPEN_FRAMES   8

Definition at line 136 of file window_internal.h.

Referenced by UiWindow_Create().

◆ UI_WINDOW_CLOSE_FRAMES

#define UI_WINDOW_CLOSE_FRAMES   4

Definition at line 137 of file window_internal.h.

Referenced by UiWork_Finalize().

◆ UI_PALETTE_SLOT_FREE

#define UI_PALETTE_SLOT_FREE   999

Definition at line 138 of file window_internal.h.

Referenced by RenderOutput_Release().

◆ UI_CANVAS_BACKGROUND_WORD

#define UI_CANVAS_BACKGROUND_WORD   0x44444444

Definition at line 139 of file window_internal.h.

Referenced by Ui_FillVramBlockPattern(), and UiWindow_DrawOpened().

◆ UI_NUMBER_BUFFER_SIZE

◆ UI_BYTE_STRING_BUFFER_SIZE

#define UI_BYTE_STRING_BUFFER_SIZE   0x200

◆ UI_MESSAGE_NAME_HALFWORDS

#define UI_MESSAGE_NAME_HALFWORDS   24

Definition at line 144 of file window_internal.h.

Referenced by UiText_BuildRenderEntries().

◆ UI_ARGUMENT_SLOT_COUNT

#define UI_ARGUMENT_SLOT_COUNT   8

◆ UI_SELECTION_ENTRY_LIMIT

#define UI_SELECTION_ENTRY_LIMIT   16

Definition at line 146 of file window_internal.h.

Referenced by Resource_PushPendingPair().

◆ UI_AREA_NOTICE_FRAMES

#define UI_AREA_NOTICE_FRAMES   90

Definition at line 147 of file window_internal.h.

Referenced by UiTimedNotice_Create().

◆ TEXT_CODE_MARK_SHIFT

#define TEXT_CODE_MARK_SHIFT   14

Definition at line 173 of file window_internal.h.

Referenced by UiText_DrawGlyph(), and UiText_RenderGlyphPair().

◆ TEXT_CODE_VOICED

#define TEXT_CODE_VOICED   (1 << TEXT_CODE_MARK_SHIFT)

Definition at line 174 of file window_internal.h.

Referenced by UiText_RenderWideStringAtOffset(), and UiWork_StepChannelScript().

◆ TEXT_CODE_SEMIVOICED

#define TEXT_CODE_SEMIVOICED   (2 << TEXT_CODE_MARK_SHIFT)

Definition at line 175 of file window_internal.h.

Referenced by UiText_RenderWideStringAtOffset(), and UiWork_StepChannelScript().

◆ UI_WINDOW_EFFECT_SWELL

#define UI_WINDOW_EFFECT_SWELL   4

The window effect a message can start (TEXT_WINDOW_STATE): the window's frame grows by a tile and its text sprites pulse, for the channel's countdown.

Definition at line 180 of file window_internal.h.

Referenced by UiWindow_StepSwellEffect(), and UiWork_AnimateSpriteSlots().

◆ TEXT_WORK_BLOCK

#define TEXT_WORK_BLOCK   50

The heap block the message decoder routine is copied into to run.

Definition at line 187 of file window_internal.h.

Referenced by UiText_BuildRenderEntries(), and UiText_DecodeMessage().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

The control codes of decoded message text (UiRenderWork.entries).

Codes from TEXT_SPACE up are characters.

Enumerator
TEXT_END 
TEXT_PAGE 

wait for a button, then clear the window for a new page

TEXT_WAIT_KEY 

wait for a button, then close the window

TEXT_NEWLINE 
TEXT_PAUSE_LONG 

a 60-frame pause

TEXT_PAUSE_SHORT 

a 20-frame pause a button can cut short

TEXT_PAUSE_LONGEST 

a 120-frame pause a button can cut short

TEXT_COLOURS_RESET 
TEXT_COLOUR 

the next entry is the text colour

TEXT_OUTLINE 

the next entry is the outline colour

TEXT_LINE_SPACING 

the next entry is the line spacing

TEXT_WINDOW_STATE 

the next entry is the window effect to run

TEXT_END_ALT 
TEXT_COMMANDS 
TEXT_SPACE 
TEXT_VOICED_MARK 

dakuten

TEXT_SEMIVOICED_MARK 

handakuten

Definition at line 151 of file window_internal.h.

◆ anonymous enum

anonymous enum

The heap slot of the battle display's work block (struct BattleDisplayWork), whose window is the battle message window.

Enumerator
HEAP_SLOT_BATTLE_DISPLAY 

Definition at line 184 of file window_internal.h.

Variable Documentation

◆ gGlyphWork

GlyphTransfer* gGlyphWork
extern

The glyph transfer work in IWRAM (system/iwram.s), which icons are built in.

Referenced by ItemIcon_Compose(), Ui_PrepareTransferForItem(), and Ui_PrepareTransferFromTableEntry().

◆ Text_MessageContexts

const void* const Text_MessageContexts[][2]
extern

Each message context bank's Huffman models and their offsets, which the message catalog built from games/tbs/text defines.

Referenced by UiText_DecodeSymbol().