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…
#include "battle/battle.h"#include "debug/debug.h"#include "djinn_ids.h"#include "enemy_ids.h"#include "field/field.h"#include "game/game.h"#include "graphics/graphics.h"#include "system.h"#include "game/main_routine_state.h"#include "menu/menu.h"#include "sound/sound.h"#include "types.h"#include "edition.h"#include "window/window.h"#include "window/articles.h"#include "window/battle_status.h"#include "window/scales.h"#include "window/window_sprite.h"#include "graphics/glyph.h"#include "edition_values.h"#include "window/text_font.h"#include "fixed_math.h"#include "window/message_reader.h"#include "battle/battle_unit.h"#include "game/item.h"#include "window/select.h"#include "text/msg_ids.h"#include "static_assert.h"#include "macros.h"#include "stddef.h"#include "battle/battle_state.h"#include "battle/battle_side.h"#include "game/character.h"#include "field/field_sprite.h"#include "battle/battle_sprites.h"#include "game/stubs.h"#include "field/script.h"#include "window/screens.h"#include "battle/stubs.h"#include "menu/stubs.h"#include "shop/stubs.h"#include "field/actor.h"#include "battle/battle_action.h"#include "window/icon_menu.h"#include "graphics/display_transition.h"#include "field/sprite.h"
Included by screens_internal.h and window.c.
Macros
| Name | Description | |
|---|---|---|
#define | OWN_syOAMAddSpriteAtDepth | The window and screens objects call syOAMAddSpriteAtDepth in a form of their own, declared below. |
#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. |
#define | WINDOW_OPEN_TICKS 8 | Window animation lengths. |
#define | WINDOW_CLOSE_TICKS 4 | |
#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. |
#define | TEXT_ARGUMENT_SPACE ' ' | |
#define | MESSAGE_ARGUMENT_COUNT 8 | The message argument table's places. |
#define | MESSAGE_NAME_HALFWORDS 24 | A name the decoder writes out into a message, decoded first into a buffer of this many halfwords. |
#define | TEXT_NUMBER_BUFFER_SIZE 16 | mnStringFormatNumber writes 14 of them. |
#define | TEXT_WIDE_STRING_BUFFER_SIZE 512 | A byte string widened to codes: 255 bytes and the terminator. |
#define | SELECTION_MENU_ENTRY_LIMIT 16 | Entries a selection row can list. |
#define | AREA_NAME_WINDOW_TICKS 90 | How long the area's name shows. |
#define | MESSAGE_COUNT 3 | WIN_STATE owns three messages, each with four line gaps. |
#define | MESSAGE_LINE_COUNT 4 | Lines a page; spacing has one gap each. |
#define | TEXT_DEFAULT_LINE_SPACING 10 | A message's line spacing at start. |
#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. |
#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. |
#define | TEXT_LINE_HEIGHT 15 | The pixels a line of text takes in a window fitted to it. |
#define | WINDOW_STATE ((WIN_STATE *)RamHeapSlots->windowState) | The window system's state, as The Broken Seal's WINDOW_STATE. |
#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). |
#define | STATUS_PAGE_ARROW_VRAM | The Status screen's arrow tiles in VRAM. |
#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). |
#define | TEXT_CODE_SEMIVOICED (2 << TEXT_MARK_SHIFT) | |
#define | COMMAND_ROW_TOP 17 | The command window's top tile row: it runs along the bottom three rows. |
#define | COMMAND_ICON_BYTES (32 * 32) | A command icon's pixels: 32x32 at a byte a pixel. |
#define | WINDOW_SPRITE_SPACE_WIDTH JAPANESE_OR(7, 5) | A space's width in pixels. |
#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. |
#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. |
#define | BATTLE_DJINN_ELEMENT (0xf << BATTLE_DJINN_ELEMENT_SHIFT) | |
#define | BATTLE_DJINN_NUMBER 0xff | |
#define | BATTLE_DJINN_UNSET 0x10000 | |
#define | BATTLE_DJINN_TURNS_SHIFT 17 | |
#define | BATTLE_DJINN_TURNS (0x1f << BATTLE_DJINN_TURNS_SHIFT) | |
#define | BATTLE_DJINN_END 0x80000000 | |
#define | BATTLE_DJINN_ELEMENT_OF (entry) | An entry's element. |
#define | BATTLE_DJINNI (entry) | An entry's Djinni, for its name and effect messages. |
#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). |
#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. |
Enumerations
| Name | Description | |
|---|---|---|
enum | anonymous enum { TEXT_END, TEXT_PAGE, TEXT_WAIT_KEY, TEXT_NEWLINE, TEXT_PAUSE … } | The control codes of decoded message text (WIN_STATE.textBuf). |
enum | WINDOW_FIT_FLAG { WINDOW_FIT_ALL_PAGES, WINDOW_FIT_SIZE_GIVEN } | mnWindowFitOnScreen's flags. |
enum | anonymous 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. |
enum | SELECTION_ICON_GROUP { SELECTION_ICON_ROW, SELECTION_ICON_CHOSEN } | Which selection icon records mnSelectionMenuFindFreeIcon looks in. |
enum | TXT_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). |
enum | COMMAND_ROW_MODE { COMMAND_ROW_PARTY, COMMAND_ROW_MEMBER } | The two battle command rows mnBattleCommandRowRun runs. |
enum | BATTLE_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
| Name | Description | |
|---|---|---|
Sint32 | syOAMAddSpriteAtDepth () | Queues a sprite at a depth slot of this tick's OAM list. |
void | mnTextResetStyle () | The window object's functions its parts call before their definitions, or with declarations of their own that disagree. |
void | mnWindowMapTextCanvasTiles ( 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). |
void | mnWindowFitOnScreen (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. |
Sint32 | mnGlyphDraw (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. |
Sint32 | mnDebugSceneSelectHandleRowInput (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. |
Sint32 | fdActorGetScreenPosStub (Sint32 object, Sint32 *out) | The stub calls the window object makes into the field, menu and shop modules. |
Sint32 | fdPartyGetLeaderActorStub (void) | The party leader's actor id. |
Sint32 | fdActorGetCueMetatileAheadOfCurrentStub (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.
MENU_PLACE_CURSOR
#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.
| Enumerator | Value | Description |
|---|---|---|
TEXT_END | 0 | The text ends; the window stays open. |
TEXT_PAGE | 1 | Wait for a button, then clear the window for a new page. |
TEXT_WAIT_KEY | 2 | Wait for a button, then close the |
TEXT_NEWLINE | 3 | window. |
TEXT_PAUSE_LONG | 4 | A 60-tick pause. |
TEXT_PAUSE_SHORT | 5 | A 20-tick pause a button can cut short. |
TEXT_PAUSE_LONGEST | 6 | A 120-tick pause a button can cut short. |
TEXT_COLORS_RESET | 7 | The colour, style and line spacing set at start. |
TEXT_COLOR | 8 | The next entry is the text colour. |
TEXT_OUTLINE | 9 | The next entry is the text style. |
TEXT_LINE_SPACING | 10 | The next entry is the line spacing; a glyph sprite sits half of it below its line's top. |
TEXT_UNUSED_11 | 11 | Open 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_12 | 12 | |
TEXT_UNUSED_14 | 14 | |
TEXT_WINDOW_ANIMATION | 15 | The next entry is the window animation to run. |
TEXT_ACTOR_NAME | 17 | MESSAGE_ACTOR_NAME as mnMessageDecodeRaw keeps it, unexpanded: the next entry names the unit, and drawing and measuring skip both. |
TEXT_ACTOR_NAME_START | 28 | MESSAGE_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_CLASS | 29 | MESSAGE_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_ALT | 30 | Ends the text as TEXT_END does. |
TEXT_COMMANDS | 31 | The message runs the codes below it |
TEXT_SPACE | 32 | as control codes and draws the rest. |
TEXT_OPENING_QUOTE | 142 | “, outside Japanese. |
TEXT_INVERTED_EXCLAMATION_MARK | 161 | ¡, outside Japanese. |
TEXT_JAPANESE_FULL_STOP | 161 | 。 |
TEXT_JAPANESE_COMMA | 164 | 、 |
TEXT_JAPANESE_MIDDLE_DOT | 165 | ・ |
TEXT_EM_DASH | 176 | °, 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_MARK | 191 | ¿, outside Japanese. |
Definition at line 120 of file window_internal.h.
WINDOW_FIT_FLAG
enum WINDOW_FIT_FLAG
mnWindowFitOnScreen's flags.
| Enumerator | Value | Description |
|---|---|---|
WINDOW_FIT_ALL_PAGES | 1 | size the window for every page, not the first |
WINDOW_FIT_SIZE_GIVEN | 2 | take 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.
| Enumerator | Value | Description |
|---|---|---|
LIST_TILE_PAGES_LEFT | WINDOW_TILE(820) | Left arrow, tile 820, which mnPageArrowsDraw slides. |
LIST_TILE_PAGES_RIGHT | WINDOW_TILE(821) | Right arrow, tile 821. |
STATUS_TILE_PAGES_LEFT | WINDOW_TILE(822) | The Status screen's own two |
STATUS_TILE_PAGES_RIGHT | WINDOW_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.
| Enumerator | Value | Description |
|---|---|---|
SELECTION_ICON_ROW | 0 | the seven icons of the row |
SELECTION_ICON_CHOSEN | 1 | the 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).
| Enumerator | Value | Description |
|---|---|---|
TEXT_STYLE_PLAIN | 0 | |
TEXT_STYLE_OUTLINED | 1 | Drawn a pixel wider (mnTextDrawGlyphPair). |
TEXT_STYLE_WOBBLE | 2 | |
TEXT_STYLE_SHAKE | 3 | |
TEXT_STYLE_POP | 4 | |
TEXT_STYLE_SPIN | 5 | A 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.
| Enumerator | Value | Description |
|---|---|---|
COMMAND_ROW_PARTY | 0 | the start of a turn: Fight, Flee and Status |
COMMAND_ROW_MEMBER | 1 | a 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.
| Enumerator | Value | Description |
|---|---|---|
TARGET_HINT_NONE | 0 | |
TARGET_HINT_HP | 1 | Heals HP: the party member's HP. |
TARGET_HINT_PP | 2 | Restores PP: the party member's PP. |
TARGET_HINT_CURE_POISON | 3 | Cures poison (ABILITY_EFFECT_CURE_POISON): starts on a poisoned party member. |
TARGET_HINT_RESTORE | 4 | Cures what Restore cures (ABILITY_EFFECT_RESTORE): starts on a party member who has one of those statuses, and lists them. |
TARGET_HINT_REVIVE | 5 | Revives: starts on a downed party member. |
TARGET_HINT_CURE_ALL | 6 | Cures Restore's statuses, poison and the evil spirit, as Tonic does (ABILITY_EFFECT_CURE_ALL). |
TARGET_HINT_SET_DJINNI | 7 | Setting a Djinni: "Set Djinni". |
TARGET_HINT_LAST_TARGET | 8 | Switch: 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.