Skip to Content
The Alchemy Project

src/window/window_internal.h

What the parts of the window object share: their includes, the codes of decoded message text and the sizes several parts read. More…

Included by screens_internal.h and window.c.

Macros

NameDescription
#defineOWN_syOAMAddSpriteAtDepthThe window and screens objects call syOAMAddSpriteAtDepth in a form of their own, declared below.
#defineWINDOW_ANIMATION_SWELL 4The window animation a message can start (its window-state code): the window's frame flashes as it swells, for the message's countdown.
#defineWINDOW_OPEN_TICKS 8Window animation lengths.
#defineWINDOW_CLOSE_TICKS 4
#defineTEXT_APPEND (entries, position, code)Writes code at position in the ring of decoded text and steps position on, wrapping at the ring's end.
#defineTEXT_ARGUMENT_SPACE ' '
#defineMESSAGE_ARGUMENT_COUNT 8The message argument table's places.
#defineMESSAGE_NAME_HALFWORDS 24A name the decoder writes out into a message, decoded first into a buffer of this many halfwords.
#defineTEXT_NUMBER_BUFFER_SIZE 16mnStringFormatNumber writes 14 of them.
#defineTEXT_WIDE_STRING_BUFFER_SIZE 512A byte string widened to codes: 255 bytes and the terminator.
#defineSELECTION_MENU_ENTRY_LIMIT 16Entries a selection row can list.
#defineAREA_NAME_WINDOW_TICKS 90How long the area's name shows.
#defineMESSAGE_COUNT 3WIN_STATE owns three messages, each with four line gaps.
#defineMESSAGE_LINE_COUNT 4Lines a page; spacing has one gap each.
#defineTEXT_DEFAULT_LINE_SPACING 10A message's line spacing at start.
#defineTEXT_DEFAULT_GLYPH_SPACING 9The glyph spacing text starts with (WIN_STATE.letterSpacing): a glyph sprite sits half of it right of its place in the line.
#defineGLYPH_TILES_SIZE (WINDOW_SPRITE_COUNT * 4 * TILE_SIZE_4BPP)The glyph tiles' size in sprite VRAM: the four tiles of a 16x16 glyph for each window sprite.
#defineTEXT_LINE_HEIGHT 15The pixels a line of text takes in a window fitted to it.
#defineWINDOW_STATE ((WIN_STATE *)RamHeapSlots->windowState)The window system's state, as The Broken Seal's WINDOW_STATE.
#defineLIST_PAGE_ARROW_VRAMThe battle lists' two page arrow tiles in VRAM, which mnPageArrowsDraw draws each tick (LIST_TILE_PAGES_LEFT and LIST_TILE_PAGES_RIGHT).
#defineSTATUS_PAGE_ARROW_VRAMThe Status screen's arrow tiles in VRAM.
#defineTEXT_CODE_VOICED (1 << TEXT_MARK_SHIFT)A code carrying the kana mark drawn with its character, in the top bits (TEXT_MARK_SHIFT, the index into FontMarkGlyphCodes).
#defineTEXT_CODE_SEMIVOICED (2 << TEXT_MARK_SHIFT)
#defineCOMMAND_ROW_TOP 17The command window's top tile row: it runs along the bottom three rows.
#defineCOMMAND_ICON_BYTES (32 * 32)A command icon's pixels: 32x32 at a byte a pixel.
#defineWINDOW_SPRITE_SPACE_WIDTH JAPANESE_OR(7, 5)A space's width in pixels.
#definePORTRAIT_FIRST_SPRITE_PORTRAIT 128A sprite speaker's portrait is numbered PORTRAIT_FIRST_SPRITE_PORTRAIT more than its entry in PortraitSpriteMap: mnIconLoadWithPalette takes portrait PORTRAIT_FIRST_SPRITE_PORTRAIT + n from icon PORTRAIT_FIRST_SPRITE_ICON + n.
#defineBATTLE_DJINN_ELEMENT_SHIFT 8A battle Djinn list entry, as the battle Status screen's Djinn page and the battle Djinn menu pack it: bits 21..17 the recovery turns left, 16 set for a Djinni not set (on standby or recovering), 11..8 its element and 7..0 its number (DJINN_COMMAND); BATTLE_DJINN_END ends the list.
#defineBATTLE_DJINN_ELEMENT (0xf << BATTLE_DJINN_ELEMENT_SHIFT)
#defineBATTLE_DJINN_NUMBER 0xff
#defineBATTLE_DJINN_UNSET 0x10000
#defineBATTLE_DJINN_TURNS_SHIFT 17
#defineBATTLE_DJINN_TURNS (0x1f << BATTLE_DJINN_TURNS_SHIFT)
#defineBATTLE_DJINN_END 0x80000000
#defineBATTLE_DJINN_ELEMENT_OF (entry)An entry's element.
#defineBATTLE_DJINNI (entry)An entry's Djinni, for its name and effect messages.
#defineSAVE_SCAN_ALL_CLEARED 100What mnSaveScanFileSummaries adds to its count of files when every file is cleared (its sendFlag set by saving at the game's end).
#defineMENU_PLACE_CURSOR (position, window, row, margin, sprite)Places a battle menu's pointing hand at its list window's selected row: position takes the hand's spot, margin pixels left of the window and 20 below the row's top, and sprite becomes a plain 16x16 sprite, its position still to come.

Enumerations

NameDescription
enumanonymous enum { TEXT_END, TEXT_PAGE, TEXT_WAIT_KEY, TEXT_NEWLINE, TEXT_PAUSE … }The control codes of decoded message text (WIN_STATE.textBuf).
enumWINDOW_FIT_FLAG { WINDOW_FIT_ALL_PAGES, WINDOW_FIT_SIZE_GIVEN }mnWindowFitOnScreen's flags.
enumanonymous enum { LIST_TILE_PAGES_LEFT, LIST_TILE_PAGES_RIGHT, STATUS_TILE_PAG … }Tiles the battle lists draw over their window's top edge beside the page numbers (PAGE_NUMBER_TILE and PAGE_NUMBER_LIT_TILE, window/window.h): the arrows.
enumSELECTION_ICON_GROUP { SELECTION_ICON_ROW, SELECTION_ICON_CHOSEN }Which selection icon records mnSelectionMenuFindFreeIcon looks in.
enumTXT_STYLE { TEXT_STYLE_PLAIN, TEXT_STYLE_OUTLINED, TEXT_STYLE_WOBBLE, TE … }The style of sprite text (WIN_STATE.outline, set by TEXT_OUTLINE): its glyphs outlined, or a motion of the glyph sprites (mnGlyphDraw).
enumCOMMAND_ROW_MODE { COMMAND_ROW_PARTY, COMMAND_ROW_MEMBER }The two battle command rows mnBattleCommandRowRun runs.
enumBATTLE_TARGET_HINT { TARGET_HINT_NONE, TARGET_HINT_HP, TARGET_HINT_PP, TARGET_HIN … }What mnBattleTargetRunSelection shows on a party member for the action being aimed (mnBattleClassifyEntryKind), and which party member it starts on.

Functions

NameDescription
Sint32syOAMAddSpriteAtDepth ()Queues a sprite at a depth slot of this tick's OAM list.
voidmnTextResetStyle ()The window object's functions its parts call before their definitions, or with declarations of their own that disagree.
voidmnWindowMapTextCanvasTiles ( Sint32 x, Sint32 y, Uint32 width, Uint32 height, Sint32 whole)Called before their definitions in window.c; the screens object calls them with no declaration in scope.
MESSAGE *mnMessageStart (WINDOW *window, Sint32 entry, Sint32 x, Sint32 y, Uint16 *spacing, Sint32 flags)Starts a free message typing the decoded text that begins at entry into window, with the pen at pixel (x, y). spacing gives each of four lines an extra gap between characters, in 1/256 pixels (or none for NULL), and is copied, so the caller's array need not outlive the call; flags is kept with the message (nonzero keeps the window's size from page to page).
voidmnWindowFitOnScreen (Sint32 msg, Sint32 *windowX, Sint32 *windowY, Uint32 *windowWidth, Uint32 *windowHeight, Uint16 *spacing, Uint32 flags)Sizes a window for decoded text entryIndex and moves (*windowX, *windowY) so the window fits on the screen, as flags (WINDOW_FIT_FLAG) say.
Sint32mnGlyphDraw (WINDOW *window, Sint32 character, Sint32 x, Sint32 y, Sint32 mode)Draws a character of a window's text with its top-left corner at pixel (x, y) of the window's interior and returns how far the text advances.
Sint32mnDebugSceneSelectHandleRowInput (Sint32 arg, Sint16 value, Sint16 *sub, Sint16 *mode)Edits the debug scene or entrance, returning -1 to exit and -2 to cancel, else the scene after this tick's keys.
Sint32fdActorGetScreenPosStub (Sint32 object, Sint32 *out)The stub calls the window object makes into the field, menu and shop modules.
Sint32fdPartyGetLeaderActorStub (void)The party leader's actor id.
Sint32fdActorGetCueMetatileAheadOfCurrentStub (void)The cell behavior 16 pixels ahead of the leader when there is something to search there, else 0.

Description

What the parts of the window object share: their includes, the codes of decoded message text and the sizes several parts read. window.c includes it before the parts, and each part includes it too, so that a part read on its own still resolves.

Macros in detail

OWN_syOAMAddSpriteAtDepth

#define OWN_syOAMAddSpriteAtDepth

The window and screens objects call syOAMAddSpriteAtDepth in a form of their own, declared below.

Definition at line 11 of file window_internal.h.

WINDOW_ANIMATION_SWELL

#define WINDOW_ANIMATION_SWELL 4

The window animation a message can start (its window-state code): the window's frame flashes as it swells, for the message's countdown.

Referenced by mnWindowStepSwellEffect().

Definition at line 68 of file window_internal.h.

WINDOW_OPEN_TICKS

#define WINDOW_OPEN_TICKS 8

Window animation lengths.

Referenced by mnWindowCreate().

Definition at line 71 of file window_internal.h.

WINDOW_CLOSE_TICKS

#define WINDOW_CLOSE_TICKS 4

Referenced by mnWindowClose().

Definition at line 72 of file window_internal.h.

TEXT_APPEND

#define TEXT_APPEND(entries, position, code)

Writes code at position in the ring of decoded text and steps position on, wrapping at the ring's end.

Referenced by mnMessageAppendArticleName() and mnMessageDecode().

Definition at line 76 of file window_internal.h.

TEXT_ARGUMENT_SPACE

#define TEXT_ARGUMENT_SPACE ' '

#define TEXT_ARGUMENT_SPACE 143

Definition at lines 84 and 86 of file window_internal.h.

MESSAGE_ARGUMENT_COUNT

#define MESSAGE_ARGUMENT_COUNT 8

The message argument table's places.

Referenced by mnMessageArgumentClearAll(), mnMessageArgumentLookup() and mnMessageArgumentPush().

Definition at line 90 of file window_internal.h.

MESSAGE_NAME_HALFWORDS

#define MESSAGE_NAME_HALFWORDS 24

A name the decoder writes out into a message, decoded first into a buffer of this many halfwords.

Referenced by mnMessageDecode().

Definition at line 93 of file window_internal.h.

TEXT_NUMBER_BUFFER_SIZE

#define TEXT_NUMBER_BUFFER_SIZE 16

mnStringFormatNumber writes 14 of them.

Referenced by mnMessageDecode(), mnTextDrawNumber(), mnTextDrawNumberAtOffset(), mnTextDrawNumberInWindow() and mnTextDrawPrefixedNumberAtOffset().

Definition at line 95 of file window_internal.h.

TEXT_WIDE_STRING_BUFFER_SIZE

#define TEXT_WIDE_STRING_BUFFER_SIZE 512

A byte string widened to codes: 255 bytes and the terminator.

Referenced by mnTextDrawString(), mnTextDrawStringAtOffset() and mnTextDrawStringInWindow().

Definition at line 97 of file window_internal.h.

SELECTION_MENU_ENTRY_LIMIT

#define SELECTION_MENU_ENTRY_LIMIT 16

Entries a selection row can list.

Referenced by mnSelectionMenuAddEntry().

Definition at line 99 of file window_internal.h.

AREA_NAME_WINDOW_TICKS

#define AREA_NAME_WINDOW_TICKS 90

How long the area's name shows.

Referenced by mnAreaNameWindowShow().

Definition at line 101 of file window_internal.h.

MESSAGE_COUNT

#define MESSAGE_COUNT 3

WIN_STATE owns three messages, each with four line gaps.

Referenced by mnBattleMessageContinue(), mnMessageAllTyped(), mnMessageResetIdle(), mnMessageStart() and mnMessageUpdateAll().

Definition at line 104 of file window_internal.h.

MESSAGE_LINE_COUNT

#define MESSAGE_LINE_COUNT 4

Lines a page; spacing has one gap each.

Referenced by mnBattleMessageContinue(), mnMessageStart(), mnTextMeasureAllPages() and mnTextMeasureDecoded().

Definition at line 106 of file window_internal.h.

TEXT_DEFAULT_LINE_SPACING

#define TEXT_DEFAULT_LINE_SPACING 10

A message's line spacing at start.

Referenced by mnBattleMessageContinue(), mnMessageAppendArticleName(), mnMessageResetIdle(), mnMessageStart(), mnMessageType(), mnTextResetStyle(), mnWindowSystemStartBattleUpdate() and mnWindowSystemStartFieldUpdate().

Definition at line 108 of file window_internal.h.

TEXT_DEFAULT_GLYPH_SPACING

#define TEXT_DEFAULT_GLYPH_SPACING 9

The glyph spacing text starts with (WIN_STATE.letterSpacing): a glyph sprite sits half of it right of its place in the line.

Referenced by mnTextResetStyle(), mnWindowSystemStartBattleUpdate() and mnWindowSystemStartFieldUpdate().

Definition at line 111 of file window_internal.h.

GLYPH_TILES_SIZE

#define GLYPH_TILES_SIZE (WINDOW_SPRITE_COUNT * 4 * TILE_SIZE_4BPP)

The glyph tiles' size in sprite VRAM: the four tiles of a 16x16 glyph for each window sprite.

Referenced by mnWindowSystemStartBattleUpdate() and mnWindowSystemStartFieldUpdate().

Definition at line 114 of file window_internal.h.

TEXT_LINE_HEIGHT

#define TEXT_LINE_HEIGHT 15

The pixels a line of text takes in a window fitted to it.

Referenced by mnTextDrawMessageToCanvas(), mnTextDrawWideStringAtOffset(), mnTextMeasureAllPages() and mnTextMeasureDecoded().

Definition at line 116 of file window_internal.h.

WINDOW_STATE

#define WINDOW_STATE ((WIN_STATE *)RamHeapSlots->windowState)

The window system's state, as The Broken Seal's WINDOW_STATE.

Referenced by mnBattleCollectPartyCommands(), mnBattleCommandRowRun(), mnBattleMessageContinue(), mnBattleMessageOpen(), mnFieldMessageShow(), mnFieldMessageShowCentered(), mnGlyphDraw(), mnMessageAllTyped(), mnMessageApplyStyle(), mnMessageArgumentClearAll(), mnMessageArgumentLookup(), mnMessageArgumentPush(), mnMessageCloseFinishedWindows(), mnMessageCopyExpanded(), mnMessageDecode(), mnMessageDecodeAppend(), mnMessageOpenDecoded(), mnMessageOpenWindow(), mnMessageResetIdle(), mnMessageSetDecodeFlags(), mnMessageStart(), mnMessageType(), mnMessageUpdateAll(), mnPortraitClearSlots(), mnPortraitCloseWindow(), mnPortraitOpenWindow(), mnTextCheckPauseSkipped(), mnTextCheckTextDismissed(), mnTextDrawGlyphPair(), mnTextDrawMessage(), mnTextDrawMessageAsTiles(), mnTextDrawMessageToCanvas(), mnTextDrawPrefixedNumberAtOffset(), mnTextDrawStringAsTiles(), mnTextDrawStringAtOffset(), mnTextDrawWideStringAsTiles(), mnTextDrawWideStringAtOffset(), mnTextDrawWideStringInWindow(), mnTextMeasureAllPages(), mnTextMeasureDecoded(), mnTextResetStyle(), mnTextSetColor(), mnTextSetStyle(), mnTextUseExtraTiles(), mnWindowClearInteriorTiles(), mnWindowClearTextTilesInRect(), mnWindowCloseAll(), mnWindowCreate(), mnWindowDrawBorder(), mnWindowDrawDividerLine() and 18 more.

Definition at line 188 of file window_internal.h.

LIST_PAGE_ARROW_VRAM

#define LIST_PAGE_ARROW_VRAM

The battle lists' two page arrow tiles in VRAM, which mnPageArrowsDraw draws each tick (LIST_TILE_PAGES_LEFT and LIST_TILE_PAGES_RIGHT).

Referenced by mnBattleCollectPartyCommands() and mnBattleMenuUpdateEachTick().

Definition at line 255 of file window_internal.h.

STATUS_PAGE_ARROW_VRAM

#define STATUS_PAGE_ARROW_VRAM

The Status screen's arrow tiles in VRAM.

Referenced by mnBattleStatusScreenRun().

Definition at line 259 of file window_internal.h.

TEXT_CODE_VOICED

#define TEXT_CODE_VOICED (1 << TEXT_MARK_SHIFT)

A code carrying the kana mark drawn with its character, in the top bits (TEXT_MARK_SHIFT, the index into FontMarkGlyphCodes).

Referenced by mnMessageType().

Definition at line 317 of file window_internal.h.

TEXT_CODE_SEMIVOICED

#define TEXT_CODE_SEMIVOICED (2 << TEXT_MARK_SHIFT)

Referenced by mnMessageType().

Definition at line 318 of file window_internal.h.

COMMAND_ROW_TOP

#define COMMAND_ROW_TOP 17

The command window's top tile row: it runs along the bottom three rows.

Referenced by mnBattleCommandRowRun(), mnGraphicsInstallBg1VCountHandler() and mnWindowEraseBorderRect().

Definition at line 321 of file window_internal.h.

COMMAND_ICON_BYTES

#define COMMAND_ICON_BYTES (32 * 32)

A command icon's pixels: 32x32 at a byte a pixel.

Referenced by mnBattleCollectPartyCommands(), mnBattleCommandRowLoadIconTiles(), mnCommandIconLoad(), mnCommandIconLoadIntoSlot() and mnSelectionMenuLoadLargeIcon().

Definition at line 323 of file window_internal.h.

WINDOW_SPRITE_SPACE_WIDTH

#define WINDOW_SPRITE_SPACE_WIDTH JAPANESE_OR(7, 5)

A space's width in pixels.

Referenced by mnGlyphDraw().

Definition at line 326 of file window_internal.h.

PORTRAIT_FIRST_SPRITE_PORTRAIT

#define PORTRAIT_FIRST_SPRITE_PORTRAIT 128

A sprite speaker's portrait is numbered PORTRAIT_FIRST_SPRITE_PORTRAIT more than its entry in PortraitSpriteMap: mnIconLoadWithPalette takes portrait PORTRAIT_FIRST_SPRITE_PORTRAIT + n from icon PORTRAIT_FIRST_SPRITE_ICON + n.

Referenced by mnDebugBrowserPortraits(), mnIconLoadWithPalette() and mnPortraitGetForSpeaker().

Definition at line 331 of file window_internal.h.

BATTLE_DJINN_ELEMENT_SHIFT

#define BATTLE_DJINN_ELEMENT_SHIFT 8

A battle Djinn list entry, as the battle Status screen's Djinn page and the battle Djinn menu pack it: bits 21..17 the recovery turns left, 16 set for a Djinni not set (on standby or recovering), 11..8 its element and 7..0 its number (DJINN_COMMAND); BATTLE_DJINN_END ends the list.

Referenced by mnBattleStatusScreenRun().

Definition at line 337 of file window_internal.h.

BATTLE_DJINN_ELEMENT

#define BATTLE_DJINN_ELEMENT (0xf << BATTLE_DJINN_ELEMENT_SHIFT)

Definition at line 338 of file window_internal.h.

BATTLE_DJINN_NUMBER

#define BATTLE_DJINN_NUMBER 0xff

Definition at line 339 of file window_internal.h.

BATTLE_DJINN_UNSET

#define BATTLE_DJINN_UNSET 0x10000

Referenced by mnBattleDjinnMenuRun() and mnBattleStatusScreenRun().

Definition at line 340 of file window_internal.h.

BATTLE_DJINN_TURNS_SHIFT

#define BATTLE_DJINN_TURNS_SHIFT 17

Referenced by mnBattleDjinnMenuRun() and mnBattleStatusScreenRun().

Definition at line 341 of file window_internal.h.

BATTLE_DJINN_TURNS

#define BATTLE_DJINN_TURNS (0x1f << BATTLE_DJINN_TURNS_SHIFT)

Referenced by mnBattleDjinnMenuRun() and mnBattleStatusScreenRun().

Definition at line 342 of file window_internal.h.

BATTLE_DJINN_END

#define BATTLE_DJINN_END 0x80000000

Referenced by mnBattleDjinnMenuRun() and mnBattleStatusScreenRun().

Definition at line 343 of file window_internal.h.

BATTLE_DJINN_ELEMENT_OF

#define BATTLE_DJINN_ELEMENT_OF(entry)

An entry's element.

Referenced by mnBattleDjinnMenuRun() and mnBattleStatusScreenRun().

Definition at line 345 of file window_internal.h.

BATTLE_DJINNI

#define BATTLE_DJINNI(entry)

An entry's Djinni, for its name and effect messages.

Referenced by mnBattleStatusScreenRun().

Definition at line 348 of file window_internal.h.

SAVE_SCAN_ALL_CLEARED

#define SAVE_SCAN_ALL_CLEARED 100

What mnSaveScanFileSummaries adds to its count of files when every file is cleared (its sendFlag set by saving at the game's end).

Referenced by mnFileListSelectAction() and mnSaveScanFileSummaries().

Definition at line 354 of file window_internal.h.

#define MENU_PLACE_CURSOR(position, window, row, margin, sprite)

Places a battle menu's pointing hand at its list window's selected row: position takes the hand's spot, margin pixels left of the window and 20 below the row's top, and sprite becomes a plain 16x16 sprite, its position still to come. The Djinn, item, summon and Psynergy battle menus each place their cursor so.

Referenced by mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun() and mnBattleSummonMenuRun().

Definition at line 361 of file window_internal.h.

Enumerations in detail

anonymous enum

enum { TEXT_END, TEXT_PAGE, TEXT_WAIT_KEY, TEXT_NEWLINE, … }

The control codes of decoded message text (WIN_STATE.textBuf). Codes from TEXT_SPACE up are characters.

EnumeratorValueDescription
TEXT_END0The text ends; the window stays open.
TEXT_PAGE1Wait for a button, then clear the window for a new page.
TEXT_WAIT_KEY2Wait for a button, then close the
TEXT_NEWLINE3window.
TEXT_PAUSE_LONG4A 60-tick pause.
TEXT_PAUSE_SHORT5A 20-tick pause a button can cut short.
TEXT_PAUSE_LONGEST6A 120-tick pause a button can cut short.
TEXT_COLORS_RESET7The colour, style and line spacing set at start.
TEXT_COLOR8The next entry is the text colour.
TEXT_OUTLINE9The next entry is the text style.
TEXT_LINE_SPACING10The next entry is the line spacing; a glyph sprite sits half of it below its line's top.
TEXT_UNUSED_1111Open question (no evidence in reach): what codes 11 and 12 (one operand) and 14 (two) are for, which drawing and measuring skip with their operands; only MsgLemuriaRoomsWhatInWhatsWithAll carries one (12, before "What's with all these bathrobes?!?"), so nothing the game shows tells them apart.
TEXT_UNUSED_1212
TEXT_UNUSED_1414
TEXT_WINDOW_ANIMATION15The next entry is the window animation to run.
TEXT_ACTOR_NAME17MESSAGE_ACTOR_NAME as mnMessageDecodeRaw keeps it, unexpanded: the next entry names the unit, and drawing and measuring skip both.
TEXT_ACTOR_NAME_START28MESSAGE_ACTOR_NAME_START as mnMessageDecodeRaw keeps it, unexpanded: the next two entries name the unit and its letters, and drawing and measuring skip all three.
TEXT_ARTICLE_CLASS29MESSAGE_ARTICLE_CLASS as mnMessageDecodeRaw keeps it outside Japanese, at the head of an item or class name: drawing skips it and its class.
TEXT_END_ALT30Ends the text as TEXT_END does.
TEXT_COMMANDS31The message runs the codes below it
TEXT_SPACE32as control codes and draws the rest.
TEXT_OPENING_QUOTE142“, outside Japanese.
TEXT_INVERTED_EXCLAMATION_MARK161¡, outside Japanese.
TEXT_JAPANESE_FULL_STOP161。
TEXT_JAPANESE_COMMA164、
TEXT_JAPANESE_MIDDLE_DOT165・
TEXT_EM_DASH176°, outside Japanese the em dash's message code (MESSAGE_EM_DASH) where it is left in the text: drawing and measuring skip it.
TEXT_INVERTED_QUESTION_MARK191¿, outside Japanese.

Definition at line 120 of file window_internal.h.

WINDOW_FIT_FLAG

enum WINDOW_FIT_FLAG

mnWindowFitOnScreen's flags.

EnumeratorValueDescription
WINDOW_FIT_ALL_PAGES1size the window for every page, not the first
WINDOW_FIT_SIZE_GIVEN2take the size given, in tiles, rather than measuring the text

Definition at line 191 of file window_internal.h.

anonymous enum

enum { LIST_TILE_PAGES_LEFT, LIST_TILE_PAGES_RIGHT, STATUS_TILE_PAGES_LEFT, STATUS_TILE_PAGES_RIGHT }

Tiles the battle lists draw over their window's top edge beside the page numbers (PAGE_NUMBER_TILE and PAGE_NUMBER_LIT_TILE, window/window.h): the arrows.

EnumeratorValueDescription
LIST_TILE_PAGES_LEFTWINDOW_TILE(820)Left arrow, tile 820, which mnPageArrowsDraw slides.
LIST_TILE_PAGES_RIGHTWINDOW_TILE(821)Right arrow, tile 821.
STATUS_TILE_PAGES_LEFTWINDOW_TILE(822)The Status screen's own two
STATUS_TILE_PAGES_RIGHTWINDOW_TILE(823)arrows, tiles 822 and 823, which mnBattleStatusDrawPageArrows slides.

Definition at line 240 of file window_internal.h.

SELECTION_ICON_GROUP

enum SELECTION_ICON_GROUP

Which selection icon records mnSelectionMenuFindFreeIcon looks in.

EnumeratorValueDescription
SELECTION_ICON_ROW0the seven icons of the row
SELECTION_ICON_CHOSEN1the five icons already chosen; any nonzero

Definition at line 264 of file window_internal.h.

TXT_STYLE

enum TXT_STYLE

The style of sprite text (WIN_STATE.outline, set by TEXT_OUTLINE): its glyphs outlined, or a motion of the glyph sprites (mnGlyphDraw).

EnumeratorValueDescription
TEXT_STYLE_PLAIN0
TEXT_STYLE_OUTLINED1Drawn a pixel wider (mnTextDrawGlyphPair).
TEXT_STYLE_WOBBLE2
TEXT_STYLE_SHAKE3
TEXT_STYLE_POP4
TEXT_STYLE_SPIN5A pixel wider too.

Definition at line 272 of file window_internal.h.

COMMAND_ROW_MODE

enum COMMAND_ROW_MODE

The two battle command rows mnBattleCommandRowRun runs.

EnumeratorValueDescription
COMMAND_ROW_PARTY0the start of a turn: Fight, Flee and Status
COMMAND_ROW_MEMBER1a party member's commands; any mode but 0 is this row

Definition at line 285 of file window_internal.h.

BATTLE_TARGET_HINT

enum BATTLE_TARGET_HINT

What mnBattleTargetRunSelection shows on a party member for the action being aimed (mnBattleClassifyEntryKind), and which party member it starts on.

EnumeratorValueDescription
TARGET_HINT_NONE0
TARGET_HINT_HP1Heals HP: the party member's HP.
TARGET_HINT_PP2Restores PP: the party member's PP.
TARGET_HINT_CURE_POISON3Cures poison (ABILITY_EFFECT_CURE_POISON): starts on a poisoned party member.
TARGET_HINT_RESTORE4Cures what Restore cures (ABILITY_EFFECT_RESTORE): starts on a party member who has one of those statuses, and lists them.
TARGET_HINT_REVIVE5Revives: starts on a downed party member.
TARGET_HINT_CURE_ALL6Cures Restore's statuses, poison and the evil spirit, as Tonic does (ABILITY_EFFECT_CURE_ALL).
TARGET_HINT_SET_DJINNI7Setting a Djinni: "Set Djinni".
TARGET_HINT_LAST_TARGET8Switch: starts on the party member the last command was aimed at (BATTLE_MENU_STATE.lastTarget).

Definition at line 294 of file window_internal.h.

Functions in detail

fdActorGetScreenPosStub

Sint32 fdActorGetScreenPosStub(Sint32 object, Sint32 *out)

The stub calls the window object makes into the field, menu and shop modules. Writes an actor's position on screen, in pixels, to out[0] and out[1]; returns -1 when the actor does not exist.

Referenced by mnFieldMessageShow().

Definition at line 230 of file window_internal.h.

fdPartyGetLeaderActorStub

Sint32 fdPartyGetLeaderActorStub(void)

The party leader's actor id.

Referenced by mnFieldMessageShow().

Definition at line 232 of file window_internal.h.

fdActorGetCueMetatileAheadOfCurrentStub

Sint32 fdActorGetCueMetatileAheadOfCurrentStub(void)

The cell behavior 16 pixels ahead of the leader when there is something to search there, else 0.

Referenced by mnFieldMenuRun().

Definition at line 235 of file window_internal.h.