Skip to Content
The Alchemy Project

include/window/window.h

Windows, the messages that type into them, and the window system's state, as window.c declares them for the files that use them.

Included by battle_internal.h, unused_portrait_pairs.c, battle_effect_internal.h, level.c, psynergy_test.c, shop_test.c, field_engine_internal.h, field_psynergy_internal.h, field_psynergy_lookups.c, field_world_map.c, script_commands_internal.h, super_lucky_dice.c, game_units.c, menu_internal.h, title_intro.c, airs_rock_inside.c, aqua_rock_inside.c, champa.c, clear.c, contigo.c, daila_rooms.c, epilogue.c, gabomba_statue_chamber.c, jupiter_lighthouse_aerie_beacon.c, jupiter_lighthouse_locked_doors.c, lemuria_entrance.c, lemuria_spring.c, lobby.c, madra.c, mars_lighthouse_aerie.c, mars_lighthouse_entrance.c, mars_lighthouse_hall.c, mars_lighthouse_star_room.c, naribwe_rooms.c, prox.c, shaman_village.c, staff_credit.c, trial_road.c, world_map.c, yallam.c, yallam_rooms.c, shop_internal.h, system_debug_text.c, fixed_tile_blocks.c, glyph_arm.c, scales.c, window_internal.h, window_spans.c, system_call.h, icon_menu.h and 1 more.

Structures

NameDescription
structWINDOWA window: a bordered rectangle of the tilemap with its sprite outputs, its opening or closing animation and the rectangle it last drew.
structMESSAGEA message, one of the three in WIN_STATE.msgs, which types decoded text into a window a few characters a tick and runs its control codes. spacing[] holds each line's extra advance in 1/256 pixels: after every character in Japanese, after a space in the other editions except German, which takes none.
structWIN_STATEThe 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.

Macros

NameDescription
#defineWINDOW_MARK_TILEMAP_ROW (state, row)Marks the 4-row band of the window tilemap that holds row for upload (WIN_STATE.dirty): the battle lists mark their top border's row so, and the Djinn list its preview's.
#defineWINDOW_PALETTE 15The BG palette of the windows and their text, the UI palette.
#defineWINDOW_TILE (tile) (BG_TILE_PALETTE(WINDOW_PALETTE) | (tile))A window tilemap entry: the tile in WINDOW_PALETTE.
#defineTEXT_TILE_FIRST 128The window tiles text is drawn into: TEXT_TILES from TEXT_TILE_FIRST, and with WIN_STATE.extraTextTiles as many more from TEXT_EXTRA_TILE_FIRST.
#defineTEXT_TILES 128
#defineTEXT_EXTRA_TILE_FIRST 512
#defineWINDOW_COUNT 12How many windows can be open at once.
#defineNO_GLYPH_RESOURCE 99WIN_STATE.glyphResource while the page arrow has no VRAM cache slot.
#defineTEXT_LAST_FONT_CODE 255The last character code the window's text tiles cover.
#defineKANJI_FIRST_CODE (TEXT_LAST_FONT_CODE + 1)In Japanese, the codes after the font's are kanji (FontKanjiGlyphs).
#defineGLYPH_ROW_BITS 16A main-font glyph row's pixels fill its halfword from the high bit, a bit each: shifted up by this, the leftmost pixel is the word's sign bit.
#defineTEXT_CANVAS_VRAM ((void *)0x06002500)The text canvas tiles in VRAM: 120 4bpp tiles from tile 296, enough for the interior of a full-width window six tiles tall.
#defineTEXT_CANVAS_SIZE (120 * TILE_SIZE_4BPP)
#defineTEXT_CANVAS_FIRST_TILE 296
#defineWINDOW_TILEMAP_VRAM ((Uint8 *)0x06002000)The UI tilemap in VRAM (BG screen block 4), which mnWindowSystemUploadTilemap copies the state's tilemap to.
#definePORTRAIT_PALETTE 14The sprite palette of portrait slot 0; slot 1 uses the next.
#defineHIGHLIGHT_PALETTE 14The BG palette the menus keep for their selected row or page: a copy of WINDOW_PALETTE with its background lightened (mnPaletteLightenHighlight), which the item icons borrow.
#defineWINDOW_BACKGROUND_COLOR 4The window palette's background colour, behind its text; in HIGHLIGHT_PALETTE, the selected row's.
#defineTEXT_CANVAS_BACKGROUND_WORD 0x44444444Eight 4bpp pixels of WINDOW_BACKGROUND_COLOR, for filling the text canvas or a tile a word at a time.
#defineTEXT_BACKGROUND_COLOR 14The colour that text drawn in a palette other than WINDOW_PALETTE stands on; the menus copy WINDOW_BACKGROUND_COLOR into it.
#defineWINDOW_COLOR_WHITE 1WINDOW_PALETTE's white, black and two greys, which Mind Read turns grey while it shows thoughts.
#defineWINDOW_COLOR_BLACK 3
#defineWINDOW_COLOR_DARK_GREY 11
#defineWINDOW_COLOR_LIGHT_GREY 12
#defineBASIC_COLORS_PALETTE 5The BG palette that battle and the Djinn menu fill with the first basic sprite palette, its TEXT_BACKGROUND_COLOR the window background: the element icons and the coloured numbers are drawn in it.
#defineSTATUS_COLORS_PALETTE 1The BG palette the Status screens fill with the first basic sprite palette, its TEXT_BACKGROUND_COLOR the window background: TILEMAP_ENTRY_ICON draws the element icons in it.
#definePAGE_ARROW_TILE 296The two page arrows beside a paged list's page numbers, in the menus and the File Screen: tiles 296 and 297 of character block 0, which mnPageArrowsDraw slides back and forth each tick, and their tilemap entries.
#definePAGE_ARROW_VRAM
#definePAGE_ARROW_LEFT WINDOW_TILE(PAGE_ARROW_TILE)
#definePAGE_ARROW_RIGHT WINDOW_TILE(PAGE_ARROW_TILE + 1)
#definePAGE_DIGITS_TILE 768The page numbers of a paged list, the battle lists' and the File Screen password grid's: 20 tiles from this one of character block 0, which mnGraphicsExpandVRAMTilesByColorTable builds from the UI's digits '0' to '9', first with colour 1 drawn as 10, then in their own colours; and their tilemap entries, + n giving page n + 1's number, the page shown lit.
#definePAGE_NUMBER_TILE WINDOW_TILE(PAGE_DIGITS_TILE + 1)
#definePAGE_NUMBER_LIT_TILE WINDOW_TILE(PAGE_DIGITS_TILE + 10 + 1)
#defineELEMENT_ICON_TILE (BG_TILE_PALETTE(BASIC_COLORS_PALETTE) | 1)The window map entry of the first element icon, in BASIC_COLORS_PALETTE; the four elements follow it in order (ELEMENT).
#defineWINDOW_TILE_PAIR (entry) ((Uint32)(entry) << 16 | (entry))Two copies of a tilemap entry, for filling a run of entries a word at a time.
#defineTILE_NUMBER_MASK 0x3ffA tilemap entry's tile number, the bits below its flip bits and palette number in the hardware's screen entry.
#defineTILE_HFLIP 0x400The tilemap entry flip bits.
#defineTILE_VFLIP 0x800
#defineFLIP_XY (n) ((n) | TILE_HFLIP | TILE_VFLIP)A screen entry of tile n turned half a turn, flipped both ways.
#defineFLIP_Y (n) ((n) | TILE_VFLIP)A screen entry of tile n flipped top to bottom.
#defineWINDOW_TILE_PP_LABEL_END WINDOW_TILE(5)
#defineWINDOW_SPRITE_SIZE_16X16 0x40000000The OAM shape and size a window sprite is created with (mnWindowSpriteCreate): attribute 0's shape in the low half, attribute 1's size in the high half, as the hardware reads them.
#defineWINDOW_SPRITE_SIZE_32X32 0x80000000
#defineWINDOW_SPRITE_SIZE_32X8 0x40004000
#defineWINDOW_SPRITE_SIZE_32X16 0x80004000
#defineWINDOW_SPRITE_SIZE_16X32 0x80008000
#defineICON_BASE 1The layers mnItemIconCompose draws over an item's icon.
#defineICON_COUNT_ABOVE_ONE 2the count, unless it is 1
#defineICON_COUNT 4the count, always
#defineICON_BROKEN 8mark 1, the cross, on an item with INVENTORY_BROKEN
#defineICON_EQUIPPED
#defineICON_CURSEDINVENTORY_EQUIPPED
#defineACTION_ID_MASK 0x3fffAn action's id in its encoded list entry, below its flags.
#definePORTRAIT_SLOT_EMPTY 999WIN_STATE.portraitPictures of a free portrait slot, as mnPortraitClearSlots writes it.
#defineCENTERED_TEXT_COLOR OBJ_PLTT_COLOR(0, 15)The colour a bare centred message is written in, which a scene sets white again before each one while the screen is warm-tinted (Mars Lighthouse's inscriptions, the Gabomba Statue's chamber).
#defineQUESTION_MESSAGEThe flags a yes-or-no question's message takes: it zooms open, stays open for the Yes/No menu below it and sits lower.
#defineWINDOW_COLOR_COUNT 24"Window color" takes 0 to 23
#defineWINDOW_BRIGHTNESS_COUNT 15"Window brightness" takes 0 to 14
#defineWINDOW_BRIGHTNESS_NEUTRAL 7The brightness that adds nothing to the hue's colour.
#defineWINDOW_COLOR_WHEEL_STEPS 96Steps round WindowColorWaveTable's colour wheel; each hue is four.
#defineHIGHLIGHT_LIGHTEN_STEPS 9How many levels HIGHLIGHT_PALETTE lightens each channel of WINDOW_BACKGROUND_COLOR by (mnPaletteLightenHighlight).
#defineCURSOR_BOB_Y () (sySin(TickCount * (TRIG_TURN / 16)) / (toFIXED(1) / 2))The bob of a prompt or cursor: up and down by up to 2 pixels, a sine every 16 ticks.
#defineMESSAGE_WINDOW_VOICE (voice) ((voice) << 16)mnMessageOpenWindow's packed argument: the speaker's voice in bits 16 to 27, above the window options.
#defineMESSAGE_WINDOW_VOICE_OF (packed) (((Uint32)(packed) << 4) >> 20)The speaker's voice in a packed argument, as mnMessageOpenWindow takes it out.
#defineMESSAGE_WINDOW_OPTIONS_MASK (MESSAGE_WINDOW_VOICE(1) - 1)The window options of a packed argument: the bits below the speaker's voice.
#definePORTRAIT_WINDOW_TILES 5mnPortraitOpenWindow's window is PORTRAIT_WINDOW_TILES tiles square, a tile wider while minds are read.

Enumerations

NameDescription
enumanonymous enum { MESSAGE_ARGUMENT_NONE, MESSAGE_ARGUMENT_ACTOR, MESSAGE_ARGUM … }The kinds of message argument (mnMessageArgumentPush), which the message codes such as {argument_item_name} read; the window state keeps each kind beside its value (WIN_STATE.argumentKinds).
enumanonymous enum { WINDOW_SPRITE_COUNT }The window sprites WIN_STATE keeps, free or in a window.
enumMESSAGE_DECODE_FLAG { MESSAGE_DECODE_HALTING_SPEECH, MESSAGE_DECODE_SPACING_AFTER }mnMessageSetDecodeFlags' flags, which set WIN_STATE.haltingSpeech and spacingAfter for the messages decoded next.
enumWINDOW_SPR_KIND { WINDOW_SPRITE_PLAIN, WINDOW_SPRITE_ICON, WINDOW_SPRITE_PORTR … }WINDOW_SPR.kind: what a window sprite owns besides itself, which mnWindowSpriteRelease frees.
enumGLYPH_DRAW_MODE { GLYPH_DRAW_CHARACTER, GLYPH_DRAW_PAGE_ARROW }What mnWindowPutGlyph draws.
enumTILEMAP_ENTRY_MODE { TILEMAP_ENTRY_PLAIN, TILEMAP_ENTRY_NONE, TILEMAP_ENTRY_HIGHL … }How mnWindowSetTilemapEntry writes its value: as it is, not at all, or as a tile in one of three palettes.
enumCOMMAND_ICON { COMMAND_ICON_ATTACK, COMMAND_ICON_PSYNERGY, COMMAND_ICON_ITE … }The command icons (ResourceIdCommandIcons), each drawn with the command name of the same number (MsgCommandName + icon).
enumanonymous enum { WINDOW_TILE_BLANK, WINDOW_TILE_FLASH_TOP_LEFT, WINDOW_TILE_F … }The window border's tiles.
enumanonymous enum { NUMBER_LABEL_HP, NUMBER_LABEL_PP }Which label mnTextDrawPrefixedNumberAtOffset draws before its number.
enumanonymous enum { WINDOW_SPRITE_MOTION_STILL, WINDOW_SPRITE_MOTION_PAGE_ARROW, … }How a window sprite moves (WINDOW_SPR.motion), run each tick by mnWindowSpriteUpdateAll; 0 is a free window sprite.
enumTEXT_COL { TEXT_COLOR_RED, TEXT_COLOR_YELLOW, TEXT_COLOR_PINK, TEXT_COL … }Text colours (mnTextSetColor), named as the basic sprite palette (BASIC_COLORS_PALETTE) shows them.
enumanonymous enum { WINDOW_FLAG_OPEN, WINDOW_FLAG_INSTANT, WINDOW_FLAG_UNREAD, W … }The flags of a UI window (WINDOW.flags), which mnWindowCreate takes as its attributes.
enumWINDOW_BATTLE_MODE { WINDOW_FIELD, WINDOW_BATTLE, WINDOW_BATTLE_MESSAGE, WINDOW_G … }Where the windows are drawn (WIN_STATE.battleMode).
enumCENTERED_MESSAGE_MODE { CENTERED_MESSAGE_BARE, CENTERED_MESSAGE_WINDOW }The window mnFieldMessageShowCentered shows its message in.
enumFIELD_MESSAGE_FLAG { FIELD_MESSAGE_ZOOM, FIELD_MESSAGE_WAITING_FOR_SOUND, FIELD_M … }The flags mnFieldMessageShow takes.
enumPAUSE_MENU_ENTRY { PAUSE_MENU_SAVE_QUEST, PAUSE_MENU_SLEEP, PAUSE_MENU_CHANGE_S … }The Pause menu's entries, as mnPauseMenuChoose returns them (counted from Save your quest even when only Change settings shows).
enumMESSAGE_WINDOW_OPTION { MESSAGE_WINDOW_ZOOM, MESSAGE_WINDOW_UNREAD, MESSAGE_WINDOW_T … }mnMessageOpenWindow's window options, in packed's low bits.
enumCHARACTER_PORTRAIT { PORTRAIT_ISAAC, PORTRAIT_GARET, PORTRAIT_IVAN, PORTRAIT_MIA, … }The party members' portraits, the icon bank's first rows, as PortraitCharacterMap pairs them with the party.
enumSPR_PORTRAIT { SPRITE_PORTRAIT_JUPITER_DJINNI, SPRITE_PORTRAIT_VENUS_DJINNI … }The other speakers' portraits, from the icon bank's row PORTRAIT_FIRST_SPRITE_ICON on, as PortraitSpriteMap pairs them with sprites; each is named for its picture.

Functions

NameDescription
voidmnWindowSystemInitField (void)Sets up the window system for the field and the other screens outside battle: allocates and clears its state, blanks the tilemap, frees every window sprite and starts the two per-tick events, the tilemap upload and the window update.
voidmnWindowSystemInitBattle (Sint32 loadGlyphTiles)Sets up the window system for battle, as mnWindowSystemInitField does for the field, starting the field's window update when loadGlyphTiles is set (mnWindowSystemStartBattleUpdate).
WINDOW *mnWindowCreate ( Sint32 x, Sint32 y, Sint32 width, Sint32 height, Sint32 attributes)Opens a window at tile (x, y), width by height tiles, in the first free slot, with the WINDOW_FLAG_ flags in attributes; NULL when every slot is taken.
voidmnWindowClose (WINDOW *window, Sint32 instant)Closes a window: with instant 0 it zooms shut over WINDOW_CLOSE_TICKS; otherwise it is erased at once and freed.
voidmnMessageDecodeRawUnbounded (Sint32 msg, Uint16 *text)Decodes message into text (a Uint16 string) with no length limit: text must have room for the whole message and its terminator.
voidmnMessageDecodeRaw (Sint32 msg, Uint16 *text, Sint32 capacity)Decodes message into text, at most capacity codes and a terminator, keeping style codes with their operands.
Sint32mnMessageCopyExpanded (Sint32 msg, Uint16 *dest, Uint32 capacity)Decodes message into dest, at most capacity halfwords with the terminator, and returns its length.
WINDOW *mnMessageOpenWindow (Sint32 msg, Sint32 x, Sint32 y, Uint32 packed)Opens a window sized to a message near tile (x, y) and starts typing the message into it. packed holds the window options in its low bits (MESSAGE_WINDOW_OPTION) and the speaker's voice sound in bits 16 to 27 (MESSAGE_WINDOW_VOICE).
voidmnFieldMessageShow (Sint32 msg, Sint32 flags)Shows a message in a window centred on the screen, waits until it is typed out and closes it, as its flags say.
BoolmnMessageAllTyped (void)Returns 1 once every message's window has its text typed out, or 0 while one is still typing (its state 0).
BoolmnWindowIsClosed (WINDOW *window)Returns 1 when a window is fully closed (its slot free), and 0 while it is open or closing.
voidmnMessageSetDecodeFlags (Uint32 flags)Sets the decode flags the next message is decoded with (mnMessageDecode): MESSAGE_DECODE_HALTING_SPEECH makes it halting speech, a short pause before each character, broken off with an ellipsis after the first word; MESSAGE_DECODE_SPACING_AFTER puts a wide gap (ENTRY_WIDE_GAP) after certain characters in English and Japanese.
voidmnWindowSpritePrepareForRedraw (WINDOW *window)Clears a window's contents: redraws it empty and releases the window sprites it carries.
voidmnWindowClearInteriorTiles ( const WINDOW *window, Uint32 left, Uint32 top, Uint32 right, Uint32 bottom)Clears an area of a window's interior to the window fill. left, top, right and bottom are pixels inside the window, and the area covers every tile they touch.
voidmnWindowDrawDividerLine ( WINDOW *window, Uint32 x1, Uint32 y1, Uint32 x2, Uint32 y2)Draws a divider line from tile (x1, y1) to (x2, y2), joining the border and the dividers already drawn.
voidmnTextDrawMessage (Sint32 msg, Sint32 window, Sint32 x, Sint32 y)Decodes a message and draws it into a text canvas window at pixel (x, y), all at once.
voidmnTextDrawMessageAsTiles (Sint32 msg, WINDOW *window, Uint32 offsetX, Uint32 offsetY)Decodes a message and draws it as tiles in a window at pixel (offsetX, offsetY) of its interior. offsetY is rounded down to a tile row; offsetX picks the tile, and its remainder is where the text starts in it.
voidmnTextDrawString (Uint8 *text, Sint32 window, Sint32 x, Sint32 y)Draws a byte string into a text canvas window at pixel (x, y).
voidmnTextDrawStringAtOffset (Uint8 *text, WINDOW *window, Sint32 offsetX, Sint32 offsetY)Draws a byte string as tiles in window at pixel (offsetX, offsetY) of its interior.
voidmnTextDrawStringInWindow (Uint8 *text, Sint32 window, Uint32 x, Uint32 y)Draws a byte string into a window's tilemap at pixel (x, y) of its interior, rounded down to tiles.
voidmnTextDrawNumber ( Sint32 value, Sint32 width, Sint32 window, Sint32 x, Sint32 y)Draws a number (width as mnStringFormatNumber) into a text canvas window at pixel (x, y).
voidmnTextDrawNumberAtOffset ( Sint32 value, Sint32 width, WINDOW *window, Sint32 x, Sint32 y)Draws a number (width as mnStringFormatNumber) as tiles in a window at pixel (x, y) of its interior.
voidmnTextDrawNumberInWindow ( Sint32 value, Sint32 width, Sint32 window, Sint32 x, Sint32 y)Draws a number (width as mnStringFormatNumber takes it) into a window's tilemap at pixel (x, y) of its interior.
voidmnTextSetColor (Sint32 color)Sets the colour (TEXT_COL) the next text is drawn in.
voidmnTextSetStyle (Sint32 style)Sets the text style (TXT_STYLE) of drawn text: outlined, or a motion of the glyph sprites.
WINDOW_SPR *mnWindowSpriteCreate (Sint32 slot, Sint32 oamFlags, WINDOW *window, Sint32 offsetX, Sint32 offsetY)Creates a window sprite for the VRAM cache slot slot and attaches it to window, placed at (offsetX, offsetY) pixels from the window's inner corner (one tile in from its top-left border).
WINDOW_SPR *mnWindowSpriteCreateFromResource ( Sint32 mode, Sint32 resource, WINDOW *window, Sint32 x, Sint32 y)Loads resource resource in loading mode mode into a VRAM slot and shows it as a 16x16 sprite at (x, y) in window.
WINDOW_SPR *mnPortraitCreate (Sint32 character, Sint32 option, Sint32 side, WINDOW *window, Sint32 x, Sint32 y)Shows the 32x32 portrait of character at (x, y) in window, in portrait slot side (0 or 1, or any other value for the first free one; the second is tried first), in PORTRAIT_PALETTE + side.
voidmnPortraitReload (Uint32 slot, Sint32 speaker, Sint32 unused)Reloads speaker's portrait into a portrait slot with that slot's palette (PORTRAIT_PALETTE + slot), reusing the slot's VRAM cache entry.
voidmnWindowSpriteSetMotion (WINDOW_SPR *sprite, Sint32 motion)Sets a window sprite's motion and starts it from its first step; does nothing for NULL.
voidmnWindowSpriteSetPriority (void *sprite, Sint32 priority)Sets the depth of the window sprite sprite to ~priority, which is OAM_DEPTH_FRONT - priority: a higher priority draws further back.
WINDOW *mnPortraitOpenWindow (Sint32 speaker, Sint32 portraitOption, Sint32 x, Sint32 y)Opens a portrait window at tile (x, y) showing the speaker's portrait. portraitOption is passed on through mnPortraitCreate to mnIconLoadWithPalette, which ignores it.
voidmnPortraitCloseWindow (Sint32 speaker)Closes at once the portrait window showing speaker's portrait, if one is open.
Sint32mnTextGetMessageSize ( Sint32 msg, Sint32 *x, Sint32 *y, Uint32 *width, Uint32 *height)Sizes a message's window by its first page.
Sint32mnTextGetMessageSizeAllPages ( Sint32 msg, Sint32 *x, Sint32 *y, Uint32 *width, Uint32 *height)Sizes a message's window to hold every page.
voidmnMessageArgumentClearAll (void)Empties the table of message arguments.
voidmnMessageArgumentPush (Uint32 value, Uint32 kind)Adds a message argument of kind (MESSAGE_ARGUMENT_) with value, dropped when all eight places are in use.
voidmnPartyStatusCreateWindow (Sint32 flags)Opens the party status window, sized by mnPartyStatusBuildLayoutBounds, and draws it, holding the tilemap upload meanwhile.
voidmnPartyStatusDraw (Sint32 flags)Draws the party status window with flags (PARTY_STATUS_): each member's name, HP and PP, and in battle the standby Djinn.
voidmnPartyStatusClose (void)Closes the party status window and frees its heap block.
voidmnMessageCloseFinishedWindows (void)Closes each message's window whose text has ended, then waits ten ticks.
voidmnWindowCloseAll (void)Closes every window: first the messages' windows, waiting until they have closed, then the windows opened directly, which it does not wait for.
voidmnSelectionMenuCreate (void)Allocates and resets the selection screen: the row of icons the player picks from, with arrows at each end and a pointing hand over the chosen target, whose picture takes a VRAM cache entry.
voidmnSelectionMenuClear (void)Empties the selection screen's list of entries.
voidmnSelectionMenuAddEntry (Uint32 kind, Uint32 base)Adds an entry to the selection screen's list, up to SELECTION_MENU_ENTRY_LIMIT.
voidmnSelectionMenuStartDrawing (void)Starts drawing the selection screen each tick, in the vertical blank pass (EVENT_PASS_TICK).
voidmnSelectionMenuStopDrawing (void)Stops drawing the selection screen.
voidmnSelectionMenuOpenNameWindow (Sint32 mode, Uint32 count)Opens or refits the name window above the selection row and writes the name of the icon under the cursor, or that nothing is known (ICON_KIND_ABILITY) or held (ICON_KIND_ITEM).
voidmnSelectionMenuClose (void)Closes the selection screen and frees its icons, tiles and state.
voidmnSetupSelectionBothSides (void)Sets up both end arrows of the selection row.
Sint32mnSelectionMenuRun (Sint32 mode)Runs the selection row until the player chooses (the chosen entry's index) or, when mode allows it, cancels with B (-1).
Uint32mnSelectionMenuRunWithSounds (Uint32 mode)As mnSelectionMenuRun, with the menu sounds.
voidmnArrowNoOperation2 (void)Does nothing.
voidmnArrowNoOperation3 (void)Does nothing.
voidmnSelectionMenuBuildEntries (Uint32 unused)Makes the icons of the listed entries from top, as many as the row's places, in a row along the bottom of the screen, and loads the large icon of the one under the cursor.
voidmnSelectionMenuReservedNoOperation (void)Does nothing; reached only through the window stub table.
Sint32mnBattleCollectPartyCommands (struct BATTLE_ACTION *commands, Uint16 *actors, Sint32 commandCount)Collects the party's commands for a turn into commands, one for each of the commandCount units in actors, with two nested functions: the party panels' clear and the link wait's message (mnLinkDrawWaitingForOpponent).
voidmnBattleMessageShowAndWait (Sint32 msg)Shows a message in the battle message window and waits until it has been typed out.
voidmnBattleMessageOpen (Sint32 msg)Decodes message and starts it in the message window along the bottom of the screen (tiles 0, 15, 30 by 6), creating the window first if it is not open; a message that decodes to nothing shows nothing.
voidmnArrowNoOperation6 (void)Does nothing.
Sint32mnPortraitGetForSpeaker (Uint32 speaker)Returns the portrait of a character (ids below PORTRAIT_FIRST_SPRITE_SPEAKER) or another speaker's sprite (from PORTRAIT_FIRST_SPRITE_PORTRAIT for those), or -1 when it has none.
Sint32mnFieldMenuRun (void)Runs the field menu until the player picks something that leaves it, and returns the chosen screen's result.
Sint32mnFileListSelectAction (void)The File Screen's row of icons, from the save summaries: New Game, Continue, Copy and Erase for one or two files (starting on Continue); no New Game or Copy with three; with every file cleared no Continue, and only Erase with three such files; then Battle and Update when they are enabled.
Sint32mnIconMenuChooseSendOption (Sint32 mode)Selects the transfer method or the password level (mode, enum SEND_OPTION_MENU), with a heading window above and an explanation of the selected icon below, redrawn by an event while the menu runs.
voidmnAreaNameWindowShow (void)Shows the area's name in a window near the top of the screen for AREA_NAME_WINDOW_TICKS, kept in the field state until mnAreaNameWindowUpdate closes it.
voidmnAreaNameWindowHide (void)Closes the area name at once, if it is shown.
voidmnFieldMessageShowCentered (Sint32 msg, Sint32 mode, Sint32 yOffset)Shows a message centred across the screen and in its top 15 rows (yOffset tiles lower) and waits until it is typed out, then closes it, in the window mode (CENTERED_MESSAGE_) gives.
voidmnBattleMessageClose (void)Closes the battle message window at once, if one is open, and forgets it, so the next battle message (mnBattleMessageOpen) opens a new one.
voidmnMessageResetIdle (void)Resets the pen and text style of the first idle message, clearing the canvas when the message still has a window.
voidmnArrowCreate (struct MENU_SPR *sprite, Sint32 *slot)Sets up a sprite as the right-pointing arrow, in a free VRAM cache entry returned in *slot, which mnArrowRelease frees.
voidmnArrowSetPos (struct MENU_SPR *sprite, Sint32 x, Sint32 y)Places an arrow sprite at screen pixel (x, y) and queues it for drawing this tick, at depth OAM_DEPTH_FRONT - 3; the caller calls it every tick it shows.
voidmnArrowRelease (Sint32 slot)Frees an arrow sprite's tile slot.
Sint32mnItemRemoveFromInventory (Sint32 unused, Sint32 itemId)Removes itemId from the party's inventory and returns 0.
voidmnIconDrawItem (Sint32 code)Decodes item code's icon (the first icon for code 0) into the glyph buffer.
voidmnTextDrawWideStringAtOffset (Uint16 *text, WINDOW *window, Sint32 x, Sint32 y)Draws a zero-terminated string of 16-bit character codes into a text canvas window at pixel (x, y), running its colour, outline, line spacing and new line codes; other control codes are skipped with their arguments.
voidmnScanlineWindowFillSpans (void *spans)Fills spans, a page of the screen transition's window edges past its WININ and WINOUT, with the windows' horizontal extent on each of the 160 scan lines: (left << 8) | right in the second halfword (WIN1H) of each line's pair, read from the UI tilemap by the ARM function mnScanlineWindowBuildSpans (window_spans.c), copied into RAM for the call.
voidmnWindowSpriteRedrawSavedRect (WINDOW *window)Redraws a window empty, its border and fill, at its current rectangle.
voidmnWindowSpriteClearList (void *sprites)Releases every window sprite in a list, or in a window's list, and empties it.
voidmnWindowSetTilemapEntry ( WINDOW *window, Sint32 value, Sint32 x, Sint32 y, Uint32 mode)Writes value into a window's tilemap at tile (x, y) of its interior, in the palette mode given (TILEMAP_ENTRY_).
Sint16mnDebugSceneSelectRun (void)The debug destination menu: picks a scene and an entrance, starting from the scene the party came from, and sends the party there with A; returns -1 after setting the destination and -2 when B cancels.
Sint32mnDebugFlagEditorRun (void)The flag browser: shows a page of flags and takes input until closed, starting on page 8.
Sint32mnSelectionIconLoadIntoSlot (Sint32 kind, Sint32 value, Sint32 slot, Sint32 option)Loads the icon of a selection entry, of kind (ICON_KIND) and number value, into VRAM cache entry slot (a free one when -1) and returns the slot, or -1 when none was free.
voidmnWindowMarkVisibleTextTiles (void)Marks the text tiles the tilemap shows, and frees those it no longer shows.
Sint32mnItemIconCompose (Uint32 code, Uint32 layers)Draws an item's icon into the glyph buffer from its inventory code with the layers asked for (ICON_ flags).
Sint32mnPartyStatusHighlightMembers (Uint16 *ids)Highlights the party status columns of the units in ids, ended by BATTLE_UNIT_LIST_END.
voidmnIconBuildItemIconTiles (Uint32 glyph, Sint32 withBase, Sint32 *cacheSlot, Sint32 *tileOut, Sint32 reuse)Builds item icon glyph, over the icon base when withBase is set, and loads it into *cacheSlot (a free slot unless reuse is set).
voidmnIconBuildAbilityIconTiles (Uint32 glyph, Sint32 withBase, Sint32 *cacheSlot, Sint32 *tileOut, Sint32 reuse)Builds a Psynergy icon, over the icon base when withBase is set, and loads it into *cacheSlot (a free slot unless reuse is set).
WINDOW_SPR *mnWindowSpriteCreateLoaded ( Sint32 icon, Sint32 layers, WINDOW *window, Sint32 x, Sint32 y)Copies icon icon (with layers passed on to the copier) into a free VRAM slot and shows it as a 16x16 sprite at (x, y) in window.
Sint32mnSaveToChosenFile (void)Lets the player choose a file and saves the game to it, asking before it writes over a file in use.
Sint32mnSaveChooseAndLoadFile (Sint32 purpose)Lets the player choose a file for purpose (FILE_LIST_PURPOSE) and loads it.
Sint32mnSaveCopyFile (void)Selects a file and copies it to a free file.
Sint32mnSaveEraseSelectedFile (void)Selects a file and erases it.
Sint32mnSaveWriteLinkTallies (void)Writes the link lobby's tallies (MainRoutineStateWork.linkTallies) into the current file's first part (BupSlot), under the saving screen, leaving the rest of the part as it was saved.
Sint32mnSaveWriteFile (Sint32 file)Writes both halves of the save buffer, as they are, to save file file.
Sint32mnSaveScanFileSummaries (void)Loads the save files' summaries for the File Screen, sets the title's Battle and Update options from them, and returns how many files there are.
Sint32mnNameEntryEditMemberName (Sint32 member)The name entry screen for party member member: the player types a name on its keyboard and ends with End.
voidmnPointingHandLoadIntoSlot (Sint32 slot)Loads the pointing hand's tiles into VRAM cache entry slot.
voidmnNameCaretLoadIntoSlot (Sint32 slot)Loads the name entry caret's tiles into VRAM cache entry slot.
voidmnSelectionMenuSetPos (Uint32 x, Uint32 y)Moves the row of icons to start at pixel (x, y), 16 pixels apart.
Sint32mnDebugBrowserIcons (void)Browses pages of item, Psynergy and status-pattern icons, suspending the field's actor system while the browser owns its window and cache entries.
Sint32mnDebugBrowserPortraits (void)A debug browser of the portraits: left and right step through PortraitCharacterMap and then PortraitSpriteMap, L and R by DEBUG_LARGE_STEP, each drawn with its number and its name from MsgNamesMasterPoi; A or B leaves.
voidmnDjinnShowJoinedMessage (Sint32 member, Sint32 element, Sint32 djinn)Shows that a Djinni joined a party member while the join jingle (MUS_A_NEW_ALLY) plays, until it ends or A, B, L or R is pressed.
voidmnPartyShowJoinedMessage (Sint32 member)Shows that a party member joined the party while the join jingle (MUS_A_NEW_ALLY) plays, until it ends or A, B, L or R is pressed.
voidmnPartyShowPairJoinedMessage (Sint32 first, Sint32 second)Shows that two party members joined the party while the join jingle (MUS_A_NEW_ALLY) plays, until it ends or A, B, L or R is pressed.
voidmnSummonShowLearnedMessage (Sint32 summon)Announces a summon the party can now use: "... can now summon ..." (MsgCanNowSummon) until the jingle ends or a button is pressed, then "To summon" (MsgToSummon) with its two largest Djinn counts, until a button is pressed.
voidmnWindowColorApply (Sint32 color, Sint32 brightness)Sets the window colours (WINDOW_SHADE) for a window colour (0 to WINDOW_COLOR_COUNT - 1, a hue around the colour wheel) and brightness (0 to WINDOW_BRIGHTNESS_COUNT - 1, WINDOW_BRIGHTNESS_NEUTRAL the plain one).
Sint32mnSettingsMenuRun (void)Runs the settings menu: 0 when A or START keeps the settings, -1 when B drops them.
Sint32mnPauseMenuRun (void)Handles Save your quest, Sleep and Change settings from the Pause menu.
voidmnBgScreenFillRect ( Sint32 unusedA, Sint32 unusedB, Uint32 width, Uint32 height, Sint32 value)Fills the top-left width x height tiles of WINDOW_TILEMAP_VRAM, a BG_SCREEN_WIDTH-tile map, with the tilemap entry value.
Sint32mnSelectShopCommand (Sint32 selection)Selects a shop command (Buy, Sell, Artifacts, Repair), centred on the bottom row, starting on position selection, and returns the position chosen.
Sint32mnSelectSanctumService (Sint32 selection)Selects a Sanctum service (Revive, Cure Poison, Repel Evil, Remove Curse), centred on the bottom row, starting on position selection.
Sint32mnYesNoMenuRun (Sint32 bottom, Sint32 msg, Sint32 labelWidth, Sint32 selection)Selects Yes or No, starting on selection; cancelling answers No.
Sint32mnSelectCoinsOrMedals (Sint32 selection)Selects Coins or Lucky Medals, centred on the bottom row, starting on selection, and returns the position chosen.
Sint32mnScreensReturnZero (void)Returns 0; only the stub table refers to it.
Sint32mnYesNoMenuRunAt (Sint32 x, Sint32 y, Sint32 selection)Selects Yes or No with the icons from tile (x, y), starting on selection; cancelling answers No.
Sint32mnPointingHandLoadIntoFreeSlot (void)Loads the pointing hand cursor's tiles into a free VRAM slot and returns the slot, which the caller frees with syVRAMCacheFreeEntry.
voidmnTextMeasureMessage (Sint32 msg, Sint32 *width, Sint32 *height)Decodes message and returns its text's width and height in pixels.
voidmnWindowHighlightRect ( Sint32 x, Sint32 y, Sint32 width, Sint32 height, Sint32 paletteBit)Switches the UI tilemap entries of the width x height tile rectangle at screen tile (x, y) to WINDOW_PALETTE or HIGHLIGHT_PALETTE by bit 12, keeping the rest of each entry: the menus' row highlight.
voidmnAbilityBuildIconTiles ( Sint32 action, Sint32 withBase, Sint32 *slot, Sint32 *tile, Sint32 reuse)Builds the Psynergy icon of a battle action, as mnIconBuildAbilityIconTiles.
voidmnGraphicsExpandVRAMTilesByColorTable (Uint16 *dest)Copies the UI's ten digit tiles ('0' to '9', tiles 48 to 57) twice into dest, each pixel mapped through GraphicsExpandNibbleTable: first with colour 1 drawn as colour 10, then unchanged.
voidmnTextUseExtraTiles (Sint32 allowAlternateTiles)Frees the second range of text tiles, and with allowAlternateTiles set lets text take them too.
Sint32mnAnimateSelectionToEntry (Sint32 start, Sint32 command)The Djinn lesson's show of the field menu: opens it and moves the cursor by itself from position start to command (FIELD_MENU_COMMAND), then closes it.
Sint32mnWindowSpriteGetPointerTiles (Sint32 no)Returns WindowFixedTileBlocks[0], whatever no is.
Sint32mnMessageOpenDecoded (Sint32 window, Sint32 msg)Decodes message and starts it typing in window, which is already open; returns 0 when the message is empty or there is no window.
Sint32mnSaveCountFilesExcludingSent (Sint32 excludeSent)Returns how many save files there are, leaving out those whose summary has its send flag set (the files saved at the end of the game) when excludeSent is nonzero, or SAVE_ERROR_NO_MEMORY when the backup memory cannot be read.
voidmnWindowDrawBorder (Sint32 x, Sint32 y, Uint32 width, Uint32 height)Draws an empty window: a border around a filled interior, at tile (x, y) of width by height tiles, and frees the text tiles the rectangle showed.
voidmnWindowEraseBorderRect (Sint32 x, Sint32 y, Uint32 width, Uint32 height)Erases a rectangle of the window tilemap, in tiles, and frees the text tiles it showed.
voidmnPageArrowsDraw (Sint32 offset)Draws the two page arrows (PageArrowTiles) into the two tiles at VRAM address offset, sliding outward: the left arrow 2 or 3 pixels to the left, the right one as far to the right, eight ticks each.
Uint8 *mnStringFormatStopwatch (Uint32 ticks, Uint8 *out)Unused: writes ticks as "HHH:MM:SS:CC", hours to hundredths, into out and returns out.
Sint32mnSaveToFile (Uint32 file)Saves the game to file, the last file for any past it.
Sint32mnItemIconLoadLayersIntoSlot (Sint32 inventoryCode, Sint32 layers, Sint32 cacheSlot)Draws an item's icon as mnItemIconCompose does and loads it into VRAM cache entry cacheSlot.
Sint32mnTextDrawMessageToCanvas (Sint32 msg, Uint8 *canvas)Draws message centred in a 192-pixel canvas of one byte a pixel, as the story crawl draws its lines.
Sint32mnGlyphDrawAsSprite (WINDOW *window, Sint32 character, Sint32 x, Sint32 y)Draws character as a glyph sprite on the window at x, y and returns its width, or 0 when no window sprite is free.
voidmnGlyphDrawToTiles (Sint32 character, void *dest)Draws the glyph of the character code passed in character into a 16x16 tile pair and copies it to dest.
void *mnGlyphAddBlankSprite (WINDOW *window, Sint32 character, Sint32 x, Sint32 y)Places a glyph sprite on the window at x, y as mnGlyphDrawAsSprite does, but draws nothing, and returns the VRAM address of its tiles for the caller to fill, or NULL when no window sprite is free.
voidmnWindowSpriteInitFreeList (void)Links all 64 window sprites of the pool into the free list.
Sint32mnTextGetWideStringWidth (Uint16 *text)The width in pixels of a string of 16-bit character codes.
Sint32mnPauseMenuChoose (Sint32 init)Runs the Pause menu from entry init and returns the chosen entry (enum PAUSE_MENU_ENTRY), or -1 when B or START cancels.
voidmnIconLoadWithPalette (Uint32 icon, Sint32 unused, Sint32 *slot, Sint32 *tile, Sint32 palette, Sint32 reuse)Loads a 32x32 icon into sprite tile slot *slot (a free one unless reuse is set) and its colours into sprite palette palette; its tile goes to *tile.
Sint32mnBattlePartyChooseReserve (Sint32 slot)Lets the player choose the reserve member who takes party slot slot in battle.
Sint32btDjinnCountStandbyStub (Uint32 unitId, Uint8 *counts)Counts the standby Djinn on unitId's side, and each element's into counts when it is not NULL (btDjinnCountStandby).
Sint32mnDjinnGetGiveTutorialMessage (void)The Djinn tutorial's message on giving a Djinni.
Sint32mnMessageDecodeAndClearArguments (Sint32 msg)Decodes message and empties the argument table; returns where its text starts.
voidmnMessageDecodeAppend (Sint32 msg)Decodes message after the text decoded last.
Uint8 *mnStringFormatNumber (Uint8 *buf, Sint32 input, Sint32 width)Writes input as decimal text into buf and returns where it starts: with width 0 unpadded and signed, else right-aligned in width characters.
voidmnFileListPlacePartySprites (void)An event: draws each party sprite of the file list at its place and scale.
Sint32mnTextFillCanvasBackground (void)Fills the text canvas with the window background colour.
voidmnPartyStatusOpenAndWait (void)Opens the party status window of the field menu and waits a tick.
voidmnIconDrawMiscellaneous (Uint32 index)Draws one of the other icons into the glyph buffer.
voidmnIconBuildCommandIconTiles (Sint32 overlayIcon, Sint32 baseIcon, Sint32 *slot, Sint32 *tile, Sint32 reuse)Builds a command icon, overlayIcon over baseIcon, and loads it into a sprite tile slot: *slot, or a free one when reuse is 0.
Sint32mnTextDrawStringAsTiles (Uint16 *text, Uint16 *tiles, Uint16 *mirror, Sint32 x)Draws a string of 16-bit character codes into tiles of its own, starting x pixels into the first tile, and points tiles (and the same entries in mirror) at them.
Sint32mnTextClearCanvas (void)Clears the text canvas to transparent.
voidmnWindowSystemStartFieldUpdate (void)Starts the field's per-tick window update, after reserving the glyph sprites' tiles and resetting the text style.
voidmnWindowSystemStartBattleUpdate (Sint32 loadGlyphTiles)Starts the per-tick window update: the field's when loadGlyphTiles is set, else the battle's.
voidmnWindowUpdateZooms (void)Steps each window's open or close animation.
voidmnMessageUpdateAll (void)Types more of each message whose window is open, and closes or marks its window at the text's end.
voidmnWindowSystemUploadTilemap (void)Copies each band of the window tilemap marked dirty to VRAM, a frame event.
voidmnWindowClearTextTilesInRect (Sint32 x, Sint32 y, Uint32 width, Uint32 height)Frees the text tiles under a rectangle of the window tilemap, in tiles.
voidmnWindowSpriteUpdateAll (void)Moves each sprite an open window carries and queues it for drawing.
voidmnWindowSpriteRelease (WINDOW_SPR *node)Frees a window sprite and the VRAM cache entry it showed.
voidmnPortraitClearSlots (void)Marks both portrait slots free.

Variables

NameDescription
STATIC_ASSERT(offsetof (WIN_STATE, freeSprites.head)
extern const Uint8MenuAnimatedCursorTiles []The spinning hand of the selection screen and the battle target cursor, 16 by 16 pixels in 256 colours, 256 bytes a picture (sprite_cursors.list.tsv).
extern const Uint8PointingHandTiles []The pointing hand cursor, a 16x16 sprite, shared by the battle menus, the name entry screen and the talk choices.
extern const Uint8FontGlyphWidths []Each main font glyph's width in pixels, from the space (32) on.
extern Sint32WindowFixedTileBlocks []The window sprites' fixed tile blocks (window/fixed_tile_blocks.c).
extern const Sint8WindowPartyColumnOffsets []The party status window's column lines, ended by -1: the Djinn column's first, then one between members.

Description

Windows, the messages that type into them, and the window system's state, as window.c declares them for the files that use them.

Macros in detail

WINDOW_MARK_TILEMAP_ROW

#define WINDOW_MARK_TILEMAP_ROW(state, row)

Marks the 4-row band of the window tilemap that holds row for upload (WIN_STATE.dirty): the battle lists mark their top border's row so, and the Djinn list its preview's.

Referenced by mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnBattleSummonMenuRun(), mnDjinnMenuRunPreview(), mnDjinnMenuShowMemberStatus(), mnWindowHighlightRect() and mnWindowSetRectPalette().

Definition at line 81 of file window.h.

WINDOW_PALETTE

#define WINDOW_PALETTE 15

The BG palette of the windows and their text, the UI palette.

Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectRunAtalanta(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunJudgment(), btEffectRunNeptune(), btPaletteCopyWithBrightnessOffset(), dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), fdPsynergyGreyMindReadPalette(), fdPsynergyRestoreMindReadPalette(), fdScreenTransitionFillTilemapAndColorTile(), fdStartEncounterTransition(), mnBattleCollectPartyCommands(), mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun(), mnDjinnMenuAdjustPalettes(), mnDjinnMenuRunPreview(), mnDjinnMenuShowHelp(), mnDjinnMenuShowMemberStatus(), mnItemMenuShowSelectedRow(), mnNameEntryEditMemberName(), mnOpenBackdropScreen(), mnPaletteLightenHighlight(), mnPaletteLoadIconsIntoHighlight(), mnPartyStatusDraw(), mnPartyStatusDrawBars(), mnPartyStatusHighlightMembers(), mnPsynergyMenuShowSelectedRow(), mnStatusScreenDrawSelectionCursor(), mnStatusScreenRun(), mnStatusScreenRunPartyRow(), mnStatusScreenShowEquipmentRow(), mnStatusScreenShowPsynergyRow(), mnTextDrawStringAsTiles(), mnUiPanelHighlightGridCell(), mnWindowSetHighlightRect(), mnWindowSetRectPalette(), mnWindowSetTextTileRect(), mnWindowSetTilemapEntry(), mnWindowSystemInitBattle(), mnWindowSystemInitField(), scClearEnterPassword(), syPrint() and 2 more.

Definition at line 102 of file window.h.

WINDOW_TILE

#define WINDOW_TILE(tile) (BG_TILE_PALETTE(WINDOW_PALETTE) | (tile))

A window tilemap entry: the tile in WINDOW_PALETTE.

Referenced by fdPaletteEditorRun(), mnBattleDjinnMenuShowChangePreview(), mnDjinnMenuDrawStatPreview(), mnDjinnMenuRunPreview(), mnDjinnMenuShowMemberStatus(), mnPsynergyMenuDrawRange(), mnRangeIconDraw(), mnSaveProgressAdvance(), mnScanlineWindowBuildSpans(), mnStatusPanelDraw(), mnWindowMapTextCanvasTiles(), mnWindowOverlayTilePattern(), mnWindowPutGlyph(), scClearFillTileGrid() and scClearFillTileGridInOrder().

Definition at line 105 of file window.h.

TEXT_TILE_FIRST

#define TEXT_TILE_FIRST 128

The window tiles text is drawn into: TEXT_TILES from TEXT_TILE_FIRST, and with WIN_STATE.extraTextTiles as many more from TEXT_EXTRA_TILE_FIRST.

Referenced by mnTextDrawStringAsTiles(), mnWindowClearTextTilesInRect(), mnWindowMarkVisibleTextTiles(), mnWindowOverlayTilePattern() and mnWindowSystemInitBattle().

Definition at line 643 of file window.h.

TEXT_TILES

#define TEXT_TILES 128

Referenced by mnTextDrawStringAsTiles(), mnTextUseExtraTiles(), mnWindowClearTextTilesInRect(), mnWindowMarkVisibleTextTiles() and mnWindowOverlayTilePattern().

Definition at line 644 of file window.h.

TEXT_EXTRA_TILE_FIRST

#define TEXT_EXTRA_TILE_FIRST 512

Referenced by mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnTextDrawStringAsTiles(), mnWindowClearTextTilesInRect() and mnWindowMarkVisibleTextTiles().

Definition at line 645 of file window.h.

WINDOW_COUNT

#define WINDOW_COUNT 12

How many windows can be open at once.

Referenced by mnPortraitCloseWindow(), mnWindowCloseAll(), mnWindowCreate(), mnWindowSpriteUpdateAll() and mnWindowUpdateZooms().

Definition at line 648 of file window.h.

NO_GLYPH_RESOURCE

#define NO_GLYPH_RESOURCE 99

WIN_STATE.glyphResource while the page arrow has no VRAM cache slot.

Referenced by mnDjinnMenuShowHelp(), mnGlyphDraw(), mnMessageType(), mnWindowPutGlyph(), mnWindowSystemInitBattle() and mnWindowSystemInitField().

Definition at line 766 of file window.h.

TEXT_LAST_FONT_CODE

#define TEXT_LAST_FONT_CODE 255

The last character code the window's text tiles cover.

Referenced by mnGlyphDrawArm(), mnMessageDecode(), mnTextDrawGlyphToCanvas(), mnTextDrawWideStringAtOffset(), mnTextGetWideStringWidth() and mnWindowPutGlyph().

Definition at line 769 of file window.h.

KANJI_FIRST_CODE

#define KANJI_FIRST_CODE (TEXT_LAST_FONT_CODE + 1)

In Japanese, the codes after the font's are kanji (FontKanjiGlyphs).

Referenced by mnGlyphDrawArm(), mnTextDrawGlyphPair() and mnTextDrawGlyphToCanvas().

Definition at line 771 of file window.h.

GLYPH_ROW_BITS

#define GLYPH_ROW_BITS 16

A main-font glyph row's pixels fill its halfword from the high bit, a bit each: shifted up by this, the leftmost pixel is the word's sign bit.

Referenced by mnGlyphDrawArm() and mnTextPlotGlyphRows().

Definition at line 774 of file window.h.

TEXT_CANVAS_VRAM

#define TEXT_CANVAS_VRAM ((void *)0x06002500)

The text canvas tiles in VRAM: 120 4bpp tiles from tile 296, enough for the interior of a full-width window six tiles tall.

Referenced by mnGlyphDrawArm(), mnTextClearCanvas(), mnTextFillCanvasBackground(), mnTextScrollCanvasUp() and mnWindowDrawOpened().

Definition at line 799 of file window.h.

TEXT_CANVAS_SIZE

#define TEXT_CANVAS_SIZE (120 * TILE_SIZE_4BPP)

Referenced by mnTextClearCanvas(), mnTextFillCanvasBackground() and mnWindowDrawOpened().

Definition at line 800 of file window.h.

TEXT_CANVAS_FIRST_TILE

#define TEXT_CANVAS_FIRST_TILE 296

Referenced by mnWindowMapTextCanvasTiles().

Definition at line 801 of file window.h.

WINDOW_TILEMAP_VRAM

#define WINDOW_TILEMAP_VRAM ((Uint8 *)0x06002000)

The UI tilemap in VRAM (BG screen block 4), which mnWindowSystemUploadTilemap copies the state's tilemap to.

Referenced by mnBgScreenFillRect(), mnSaveProgressAdvance(), mnTextDrawMessageAsTiles(), mnTextDrawPrefixedNumberAtOffset(), mnTextDrawStringAtOffset(), mnTextDrawWideStringAsTiles(), mnWindowCopyTilemapRegion(), scClearFillTileGrid(), scClearFillTileGridInOrder() and scShamanVillageBlowAwaySand().

Definition at line 805 of file window.h.

PORTRAIT_PALETTE

#define PORTRAIT_PALETTE 14

The sprite palette of portrait slot 0; slot 1 uses the next.

Referenced by mnBattleCollectPartyCommands(), mnBattleStatusScreenRun(), mnDebugBrowserPortraits(), mnDjinnShowJoinedMessage(), mnPartyShowJoinedMessage(), mnPartyShowPairJoinedMessage(), mnPortraitCreate(), mnPortraitLoad(), mnPortraitReload(), mnWindowSpriteRelease() and scEpilogueLoadPortraitFrame().

Definition at line 808 of file window.h.

HIGHLIGHT_PALETTE

#define HIGHLIGHT_PALETTE 14

The BG palette the menus keep for their selected row or page: a copy of WINDOW_PALETTE with its background lightened (mnPaletteLightenHighlight), which the item icons borrow.

Referenced by dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), mnBattleDjinnMenuRun(), mnBattleItemMenuRun(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun(), mnDjinnMenuRun(), mnDjinnMenuRunPreview(), mnDjinnMenuShowHelp(), mnDjinnMenuShowMemberStatus(), mnFileListFillHighlight(), mnFileListUpdatePulse(), mnItemMenuRun(), mnItemMenuShowDetails(), mnItemMenuShowSelectedRow(), mnNameEntryEditMemberName(), mnPaletteLoadIconsIntoHighlight(), mnPartyStatusDraw(), mnPartyStatusDrawBars(), mnPartyStatusHighlightMembers(), mnPsynergyMenuRun(), mnPsynergyMenuShowSelectedRow(), mnStatusScreenDrawSelectionCursor(), mnStatusScreenRun(), mnStatusScreenRunPartyRow(), mnStatusScreenShowEquipmentRow(), mnStatusScreenShowPsynergyRow(), mnUiPanelHighlightGridCell(), mnWindowSetHighlightRect(), mnWindowSetTextTileRect(), mnWindowSetTilemapEntry() and scClearEnterPassword().

Definition at line 813 of file window.h.

WINDOW_BACKGROUND_COLOR

#define WINDOW_BACKGROUND_COLOR 4

The window palette's background colour, behind its text; in HIGHLIGHT_PALETTE, the selected row's.

Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectRunAtalanta(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunJudgment(), btEffectRunNeptune(), dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), mnNameEntryEditMemberName(), mnOpenBackdropScreen(), mnPaletteLightenHighlight(), mnPaletteLoadIconsIntoHighlight(), mnPartyStatusDrawBars(), mnStatusScreenRun(), mnStatusScreenRunPartyRow(), mnTextDrawStringAsTiles(), scClearEnterPassword() and syWindowLoadGraphics().

Definition at line 816 of file window.h.

TEXT_CANVAS_BACKGROUND_WORD

#define TEXT_CANVAS_BACKGROUND_WORD 0x44444444

Eight 4bpp pixels of WINDOW_BACKGROUND_COLOR, for filling the text canvas or a tile a word at a time.

Referenced by mnBattleDjinnMenuRun(), mnBuildPatternTiles(), mnDjinnMenuRunPreview(), mnDjinnMenuShowMemberStatus(), mnRangeIconBuildTiles(), mnTextFillCanvasBackground(), mnWatchStart() and mnWindowDrawOpened().

Definition at line 819 of file window.h.

TEXT_BACKGROUND_COLOR

#define TEXT_BACKGROUND_COLOR 14

The colour that text drawn in a palette other than WINDOW_PALETTE stands on; the menus copy WINDOW_BACKGROUND_COLOR into it.

Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectRunAtalanta(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunJudgment(), btEffectRunNeptune(), dbIncreaseItemAndLevelSelectItem(), dbShopTestSelectItem(), mnOpenBackdropScreen(), mnPaletteLoadIconsIntoHighlight(), mnPartyStatusDrawBars(), mnStatusScreenRun(), mnStatusScreenRunPartyRow() and mnTextDrawStringAsTiles().

Definition at line 822 of file window.h.

WINDOW_COLOR_WHITE

#define WINDOW_COLOR_WHITE 1

WINDOW_PALETTE's white, black and two greys, which Mind Read turns grey while it shows thoughts.

Referenced by fdPsynergyGreyMindReadPalette() and fdPsynergyRestoreMindReadPalette().

Definition at line 825 of file window.h.

WINDOW_COLOR_BLACK

#define WINDOW_COLOR_BLACK 3

Referenced by fdPsynergyRestoreMindReadPalette(), fdStartEncounterTransition() and mnTextDrawStringAsTiles().

Definition at line 826 of file window.h.

WINDOW_COLOR_DARK_GREY

#define WINDOW_COLOR_DARK_GREY 11

Referenced by fdPsynergyRestoreMindReadPalette().

Definition at line 827 of file window.h.

WINDOW_COLOR_LIGHT_GREY

#define WINDOW_COLOR_LIGHT_GREY 12

Referenced by fdPsynergyRestoreMindReadPalette().

Definition at line 828 of file window.h.

BASIC_COLORS_PALETTE

#define BASIC_COLORS_PALETTE 5

The BG palette that battle and the Djinn menu fill with the first basic sprite palette, its TEXT_BACKGROUND_COLOR the window background: the element icons and the coloured numbers are drawn in it.

Referenced by btBackgroundLoad(), btBackgroundSetMode(), btEffectRunAtalanta(), btEffectRunCoatlicue(), btEffectRunCruelRuin(), btEffectRunDaedalus(), btEffectRunFlora(), btEffectRunJudgment(), btEffectRunNeptune(), btPaletteCopyWithBrightnessOffset(), mnBattleCollectPartyCommands(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnDjinnMenuAdjustPalettes(), mnOpenBackdropScreen() and mnPartyStatusDraw().

Definition at line 832 of file window.h.

STATUS_COLORS_PALETTE

#define STATUS_COLORS_PALETTE 1

The BG palette the Status screens fill with the first basic sprite palette, its TEXT_BACKGROUND_COLOR the window background: TILEMAP_ENTRY_ICON draws the element icons in it.

Referenced by mnStatusScreenRun(), mnStatusScreenRunPartyRow() and mnWindowSetTilemapEntry().

Definition at line 836 of file window.h.

PAGE_ARROW_TILE

#define PAGE_ARROW_TILE 296

The two page arrows beside a paged list's page numbers, in the menus and the File Screen: tiles 296 and 297 of character block 0, which mnPageArrowsDraw slides back and forth each tick, and their tilemap entries.

Definition at line 841 of file window.h.

PAGE_ARROW_VRAM

#define PAGE_ARROW_VRAM

Referenced by mnDjinnMenuRun(), mnItemMenuRun(), mnPagedListHandleInput(), mnPsynergyMenuRun(), mnStatusScreenRun() and mnStatusScreenShowDjinnList().

Definition at line 842 of file window.h.

PAGE_ARROW_LEFT

#define PAGE_ARROW_LEFT WINDOW_TILE(PAGE_ARROW_TILE)

Referenced by mnDjinnMenuRunPreview(), mnDjinnMenuShowMemberStatus() and mnPagedListDrawPageNumbers().

Definition at line 844 of file window.h.

PAGE_ARROW_RIGHT

#define PAGE_ARROW_RIGHT WINDOW_TILE(PAGE_ARROW_TILE + 1)

Referenced by mnDjinnMenuRunPreview(), mnDjinnMenuShowMemberStatus() and mnPagedListDrawPageNumbers().

Definition at line 845 of file window.h.

PAGE_DIGITS_TILE

#define PAGE_DIGITS_TILE 768

The page numbers of a paged list, the battle lists' and the File Screen password grid's: 20 tiles from this one of character block 0, which mnGraphicsExpandVRAMTilesByColorTable builds from the UI's digits '0' to '9', first with colour 1 drawn as 10, then in their own colours; and their tilemap entries, + n giving page n + 1's number, the page shown lit.

Referenced by mnBattleCollectPartyCommands() and scClearEnterPassword().

Definition at line 852 of file window.h.

PAGE_NUMBER_TILE

#define PAGE_NUMBER_TILE WINDOW_TILE(PAGE_DIGITS_TILE + 1)

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

Definition at line 853 of file window.h.

PAGE_NUMBER_LIT_TILE

#define PAGE_NUMBER_LIT_TILE WINDOW_TILE(PAGE_DIGITS_TILE + 10 + 1)

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

Definition at line 854 of file window.h.

ELEMENT_ICON_TILE

#define ELEMENT_ICON_TILE (BG_TILE_PALETTE(BASIC_COLORS_PALETTE) | 1)

The window map entry of the first element icon, in BASIC_COLORS_PALETTE; the four elements follow it in order (ELEMENT).

Referenced by mnBattleCollectPartyCommands(), mnBattleDjinnMenuRun(), mnBattleDjinnMenuShowChangePreview(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun(), mnBattleSummonMenuRun(), mnDjinnMenuDrawEntry(), mnDjinnMenuDrawStatPreview(), mnDjinnMenuSelectDjinn() and mnPartyStatusDraw().

Definition at line 870 of file window.h.

WINDOW_TILE_PAIR

#define WINDOW_TILE_PAIR(entry) ((Uint32)(entry) << 16 | (entry))

Two copies of a tilemap entry, for filling a run of entries a word at a time.

Referenced by btTransitionBuildFlatTilemap(), fdPsynergyEndRing(), fdScreenTransitionFillTilemapAndColorTile(), fdWorldMapLoadGraphics(), mnWindowDrawBorder(), mnWindowDrawFlashBorder(), mnWindowSystemInitBattle(), mnWindowSystemInitField() and syPrintClear().

Definition at line 932 of file window.h.

TILE_NUMBER_MASK

#define TILE_NUMBER_MASK 0x3ff

A tilemap entry's tile number, the bits below its flip bits and palette number in the hardware's screen entry.

Referenced by mnBattleStatusDrawPageArrows(), mnPageArrowsDraw(), mnPartyStatusDrawBars(), mnTextDrawStringAsTiles(), mnVRAMCopyTile(), mnWindowClearTextTilesInRect(), mnWindowMarkVisibleTextTiles(), mnWindowSystemInitBattle() and scShamanVillageBlowAwaySand().

Definition at line 936 of file window.h.

TILE_HFLIP

#define TILE_HFLIP 0x400

The tilemap entry flip bits.

Referenced by mnBattleDjinnMenuShowChangePreview(), mnPsynergyMenuDrawRange(), mnRangeIconDraw(), mnWindowDrawBorder(), scShamanVillageBlowAwaySand() and scStaffCreditShowBeacon().

Definition at line 938 of file window.h.

TILE_VFLIP

#define TILE_VFLIP 0x800

Referenced by btTransitionDrawRows(), mnWindowDrawBorder(), scShamanVillageBlowAwaySand() and scStaffCreditShowBeacon().

Definition at line 939 of file window.h.

FLIP_XY

#define FLIP_XY(n) ((n) | TILE_HFLIP | TILE_VFLIP)

A screen entry of tile n turned half a turn, flipped both ways.

Referenced by RingPictureTiles.

Definition at line 941 of file window.h.

FLIP_Y

#define FLIP_Y(n) ((n) | TILE_VFLIP)

A screen entry of tile n flipped top to bottom.

Referenced by RingPictureTiles.

Definition at line 943 of file window.h.

WINDOW_TILE_PP_LABEL_END

#define WINDOW_TILE_PP_LABEL_END WINDOW_TILE(5)

#define WINDOW_TILE_PP_LABEL_END WINDOW_TILE_HP_LABEL_END

Referenced by mnBattleCollectPartyCommands(), mnBattleDjinnMenuShowChangePreview(), mnBattlePsynergyMenuRun(), mnBattleStatusScreenRun() and mnTextDrawPrefixedNumberAtOffset().

Definition at lines 1007 and 1009 of file window.h.

WINDOW_SPRITE_SIZE_16X16

#define WINDOW_SPRITE_SIZE_16X16 0x40000000

The OAM shape and size a window sprite is created with (mnWindowSpriteCreate): attribute 0's shape in the low half, attribute 1's size in the high half, as the hardware reads them.

Referenced by mnCursorCreate(), mnDebugBrowserIcons(), mnDebugMenuOpen(), mnDebugShortcutOpen(), mnDebugSoundTestOpen(), mnDebugWarpOpen(), mnForgeRun(), mnIconCreateDjinnArrow(), mnIconCreateHandCursor(), mnIconCreatePsynergyIcon(), mnIconCreateStatChangeArrow(), mnIconLoadSlots(), mnItemIconGridLoadItems(), mnItemPickerRun(), mnNameEntryEditMemberName(), mnOpenBackdropScreen(), mnPauseMenuOpen(), mnSanctumHighlightMembers(), mnSanctumRun(), mnSettingsMenuOpen(), mnShopDrawEquipComparison(), mnShopDrawParty(), mnShopDrawStock(), mnShopRun(), mnWindowSpriteCreateAbilityIcon(), mnWindowSpriteCreateCommandIcon(), mnWindowSpriteCreateFromResource(), mnWindowSpriteCreateLoaded() and scClearEnterPassword().

Definition at line 1065 of file window.h.

WINDOW_SPRITE_SIZE_32X32

#define WINDOW_SPRITE_SIZE_32X32 0x80000000

Referenced by mnCommandIconCreate() and mnPortraitCreate().

Definition at line 1066 of file window.h.

WINDOW_SPRITE_SIZE_32X8

#define WINDOW_SPRITE_SIZE_32X8 0x40004000

Referenced by mnItemMenuSelectGiveQuantity(), mnSettingsMenuOpen() and mnShopSelectQuantity().

Definition at line 1067 of file window.h.

WINDOW_SPRITE_SIZE_32X16

#define WINDOW_SPRITE_SIZE_32X16 0x80004000

Referenced by mnTitleCreate().

Definition at line 1068 of file window.h.

WINDOW_SPRITE_SIZE_16X32

#define WINDOW_SPRITE_SIZE_16X32 0x80008000

Referenced by mnShopCreatePriceSprite().

Definition at line 1069 of file window.h.

ICON_BASE

#define ICON_BASE 1

The layers mnItemIconCompose draws over an item's icon.

the base under the icon

Referenced by mnItemIconCompose() and mnItemIconGridShowInventory().

Definition at line 1150 of file window.h.

ICON_COUNT_ABOVE_ONE

#define ICON_COUNT_ABOVE_ONE 2

the count, unless it is 1

Referenced by mnItemIconCompose(), mnItemIconGridShowInventory(), mnItemIconLoadIntoSlot(), mnSelectionIconLoad() and mnSelectionIconLoadIntoSlot().

Definition at line 1151 of file window.h.

ICON_COUNT

#define ICON_COUNT 4

the count, always

Referenced by mnItemIconCompose().

Definition at line 1152 of file window.h.

ICON_BROKEN

#define ICON_BROKEN 8

mark 1, the cross, on an item with INVENTORY_BROKEN

Referenced by mnItemIconCompose(), mnItemIconGridShowInventory(), mnItemIconLoadIntoSlot(), mnSelectionIconLoad() and mnSelectionIconLoadIntoSlot().

Definition at line 1153 of file window.h.

ICON_EQUIPPED

#define ICON_EQUIPPED

Referenced by mnItemIconCompose(), mnItemIconGridShowInventory(), mnItemIconLoadIntoSlot(), mnSelectionIconLoad() and mnSelectionIconLoadIntoSlot().

Definition at line 1154 of file window.h.

ICON_CURSED

#define ICON_CURSED

INVENTORY_EQUIPPED

Referenced by mnItemIconCompose() and mnSelectionIconLoadIntoSlot().

Definition at line 1157 of file window.h.

ACTION_ID_MASK

#define ACTION_ID_MASK 0x3fff

An action's id in its encoded list entry, below its flags.

Referenced by btAwardSpoils(), mnBattleCollectPartyCommands(), mnBattleDjinnMenuShowChangePreview(), mnBattlePsynergyMenuRun(), mnBattleSummonMenuRun() and mnStatusScreenShowPsynergyRow().

Definition at line 1162 of file window.h.

PORTRAIT_SLOT_EMPTY

#define PORTRAIT_SLOT_EMPTY 999

WIN_STATE.portraitPictures of a free portrait slot, as mnPortraitClearSlots writes it.

Referenced by mnPortraitClearSlots(), mnPortraitCreate() and mnWindowSpriteRelease().

Definition at line 1180 of file window.h.

CENTERED_TEXT_COLOR

#define CENTERED_TEXT_COLOR OBJ_PLTT_COLOR(0, 15)

The colour a bare centred message is written in, which a scene sets white again before each one while the screen is warm-tinted (Mars Lighthouse's inscriptions, the Gabomba Statue's chamber).

Referenced by scGabombaStatueChamberGabombaNamesWitchDoctor(), scGabombaStatueChamberStatueSpeaks(), scInit(), scMarsLighthouseAerieFaceDoomDragon(), scMarsLighthouseHallHearDragonStatue(), scMarsLighthouseHallReadEarthInscription(), scMarsLighthouseHallReadFireInscription(), scMarsLighthouseHallReadWaterInscription(), scMarsLighthouseHallReadWindInscription() and scMarsLighthouseStarRoomTakeMarsStar().

Definition at line 1194 of file window.h.

QUESTION_MESSAGE

#define QUESTION_MESSAGE

The flags a yes-or-no question's message takes: it zooms open, stays open for the Yes/No menu below it and sits lower.

Referenced by scInit(), scTrialRoadExamineChest() and scTrialRoadOfferToGiveUp().

Definition at line 1212 of file window.h.

WINDOW_COLOR_COUNT

#define WINDOW_COLOR_COUNT 24

"Window color" takes 0 to 23

Referenced by mnSettingsMenuInitState() and mnWindowColorApply().

Definition at line 1228 of file window.h.

WINDOW_BRIGHTNESS_COUNT

#define WINDOW_BRIGHTNESS_COUNT 15

"Window brightness" takes 0 to 14

Referenced by mnSettingsMenuInitState().

Definition at line 1229 of file window.h.

WINDOW_BRIGHTNESS_NEUTRAL

#define WINDOW_BRIGHTNESS_NEUTRAL 7

The brightness that adds nothing to the hue's colour.

Referenced by gmMainRoutineStateInitDefaults() and mnWindowColorApply().

Definition at line 1232 of file window.h.

WINDOW_COLOR_WHEEL_STEPS

#define WINDOW_COLOR_WHEEL_STEPS 96

Steps round WindowColorWaveTable's colour wheel; each hue is four.

Referenced by mnWindowColorApply().

Definition at line 1235 of file window.h.

HIGHLIGHT_LIGHTEN_STEPS

#define HIGHLIGHT_LIGHTEN_STEPS 9

How many levels HIGHLIGHT_PALETTE lightens each channel of WINDOW_BACKGROUND_COLOR by (mnPaletteLightenHighlight).

Referenced by mnPaletteLightenHighlight().

Definition at line 1239 of file window.h.

CURSOR_BOB_Y

#define CURSOR_BOB_Y() (sySin(TickCount * (TRIG_TURN / 16)) / (toFIXED(1) / 2))

The bob of a prompt or cursor: up and down by up to 2 pixels, a sine every 16 ticks.

Referenced by btMessageWaitForAdvance() and btPlaybackRun().

Definition at line 1243 of file window.h.

MESSAGE_WINDOW_VOICE

#define MESSAGE_WINDOW_VOICE(voice) ((voice) << 16)

mnMessageOpenWindow's packed argument: the speaker's voice in bits 16 to 27, above the window options.

Referenced by fdMessageShowAtActor(), fdScriptShowTwoMessagesAndWait(), mnSanctumShowKeeperMessage(), mnSanctumShowKeeperMessageHidingCursor(), mnShopShowKeeperMessage(), mnShopShowKeeperMessageHidingCursor(), scChampaShowTwoMessages(), scEpilogueShowLineAt() and scLemuriaEntranceShowLineWithPortrait().

Definition at line 1247 of file window.h.

MESSAGE_WINDOW_VOICE_OF

#define MESSAGE_WINDOW_VOICE_OF(packed) (((Uint32)(packed) << 4) >> 20)

The speaker's voice in a packed argument, as mnMessageOpenWindow takes it out.

Referenced by mnMessageOpenWindow().

Definition at line 1250 of file window.h.

MESSAGE_WINDOW_OPTIONS_MASK

#define MESSAGE_WINDOW_OPTIONS_MASK (MESSAGE_WINDOW_VOICE(1) - 1)

The window options of a packed argument: the bits below the speaker's voice.

Referenced by mnMessageOpenWindow().

Definition at line 1252 of file window.h.

PORTRAIT_WINDOW_TILES

#define PORTRAIT_WINDOW_TILES 5

mnPortraitOpenWindow's window is PORTRAIT_WINDOW_TILES tiles square, a tile wider while minds are read.

Referenced by fdMessageShowAtActor(), mnPortraitOpenWindow() and scEpilogueShowLine().

Definition at line 1267 of file window.h.

Enumerations in detail

anonymous enum

enum { MESSAGE_ARGUMENT_NONE, MESSAGE_ARGUMENT_ACTOR, MESSAGE_ARGUMENT_ITEM, MESSAGE_ARGUMENT_CLASS, … }

The kinds of message argument (mnMessageArgumentPush), which the message codes such as {argument_item_name} read; the window state keeps each kind beside its value (WIN_STATE.argumentKinds).

EnumeratorValueDescription
MESSAGE_ARGUMENT_NONE0an empty place in the argument table
MESSAGE_ARGUMENT_ACTOR1
MESSAGE_ARGUMENT_ITEM2
MESSAGE_ARGUMENT_CLASS3
MESSAGE_ARGUMENT_ABILITY4
MESSAGE_ARGUMENT_NUMBER5
MESSAGE_ARGUMENT_LOCATION6

Definition at line 90 of file window.h.

anonymous enum

enum { WINDOW_SPRITE_COUNT }

The window sprites WIN_STATE keeps, free or in a window.

EnumeratorValueDescription
WINDOW_SPRITE_COUNT64

Definition at line 636 of file window.h.

MESSAGE_DECODE_FLAG

enum MESSAGE_DECODE_FLAG

mnMessageSetDecodeFlags' flags, which set WIN_STATE.haltingSpeech and spacingAfter for the messages decoded next.

EnumeratorValueDescription
MESSAGE_DECODE_HALTING_SPEECH1a pause before each character
MESSAGE_DECODE_SPACING_AFTER2a wide gap after some characters

Definition at line 759 of file window.h.

WINDOW_SPR_KIND

enum WINDOW_SPR_KIND

WINDOW_SPR.kind: what a window sprite owns besides itself, which mnWindowSpriteRelease frees.

EnumeratorValueDescription
WINDOW_SPRITE_PLAIN0nothing to free: window glyph tile, or shop-freed cursor/arrow
WINDOW_SPRITE_ICON1its own VRAM cache entry
WINDOW_SPRITE_PORTRAIT2a VRAM cache entry and a palette slot

Definition at line 778 of file window.h.

GLYPH_DRAW_MODE

enum GLYPH_DRAW_MODE

What mnWindowPutGlyph draws.

EnumeratorValueDescription
GLYPH_DRAW_CHARACTER0the character given, as a tile
GLYPH_DRAW_PAGE_ARROW1the next-page arrow, in the window's corner

Definition at line 787 of file window.h.

TILEMAP_ENTRY_MODE

enum TILEMAP_ENTRY_MODE

How mnWindowSetTilemapEntry writes its value: as it is, not at all, or as a tile in one of three palettes.

EnumeratorValueDescription
TILEMAP_ENTRY_PLAIN0
TILEMAP_ENTRY_NONE1
TILEMAP_ENTRY_HIGHLIGHT2in HIGHLIGHT_PALETTE
TILEMAP_ENTRY_WINDOW3in WINDOW_PALETTE
TILEMAP_ENTRY_ICON4in STATUS_COLORS_PALETTE (the Status screens' element icons)

Definition at line 858 of file window.h.

COMMAND_ICON

enum COMMAND_ICON

The command icons (ResourceIdCommandIcons), each drawn with the command name of the same number (MsgCommandName + icon).

EnumeratorValueDescription
COMMAND_ICON_ATTACK0
COMMAND_ICON_PSYNERGY1
COMMAND_ICON_ITEM2
COMMAND_ICON_DEFEND3
COMMAND_ICON_FLEE4
COMMAND_ICON_YES5
COMMAND_ICON_NO6
COMMAND_ICON_STATUS7
COMMAND_ICON_CHECK8
COMMAND_ICON_USE9
COMMAND_ICON_GIVE10
COMMAND_ICON_DROP11
COMMAND_ICON_SPEAK12
COMMAND_ICON_EQUIP13
COMMAND_ICON_FIGHT14
COMMAND_ICON_DJINN15
COMMAND_ICON_SUMMON16
COMMAND_ICON_BUY17
COMMAND_ICON_SELL18
COMMAND_ICON_ARTIFACTS19
COMMAND_ICON_REPAIR20
COMMAND_ICON_NEW_GAME21
COMMAND_ICON_CONTINUE22
COMMAND_ICON_COPY23
COMMAND_ICON_ERASE24
COMMAND_ICON_REVIVE25
COMMAND_ICON_CURE_POISON26
COMMAND_ICON_REPEL_EVIL27
COMMAND_ICON_REMOVE_CURSE28
COMMAND_ICON_BATTLE29
COMMAND_ICON_SEND30
COMMAND_ICON_UPDATE31
COMMAND_ICON_COINS32
COMMAND_ICON_LUCKY_MEDALS33
COMMAND_ICON_SPEED_SLOW34The settings menu's choices and the Pause menu's entries (SettingsMenuSpeedIcons to SettingsMenuSleepIcons), whose command names are placeholders.
COMMAND_ICON_SPEED_NORMAL35
COMMAND_ICON_SPEED_FAST36
COMMAND_ICON_SPEECH_OFF37
COMMAND_ICON_SPEECH_ON38
COMMAND_ICON_AUTO_SLEEP_OFF39
COMMAND_ICON_AUTO_SLEEP_ON40
COMMAND_ICON_SAVE_QUEST41
COMMAND_ICON_SLEEP42
COMMAND_ICON_CHANGE_SETTINGS43
COMMAND_ICON_PASSWORD44
COMMAND_ICON_LINK45
COMMAND_ICON_GOLD46
COMMAND_ICON_SILVER47
COMMAND_ICON_BRONZE48
COMMAND_ICON_SWITCH49

Definition at line 874 of file window.h.

anonymous enum

enum { WINDOW_TILE_BLANK, WINDOW_TILE_FLASH_TOP_LEFT, WINDOW_TILE_FLASH_TOP, WINDOW_TILE_FLASH_TOP_RIGHT, … }

The window border's tiles.

EnumeratorValueDescription
WINDOW_TILE_BLANKWINDOW_TILE(0)
WINDOW_TILE_FLASH_TOP_LEFTWINDOW_TILE(8)The border a window flashes with as it swells (mnWindowDrawFlashBorder), which mnWindowShowFlashFrame loads over tiles 8 to 15.
WINDOW_TILE_FLASH_TOPWINDOW_TILE(9)
WINDOW_TILE_FLASH_TOP_RIGHTWINDOW_TILE(10)
WINDOW_TILE_FLASH_BOTTOM_LEFTWINDOW_TILE(11)
WINDOW_TILE_FLASH_BOTTOMWINDOW_TILE(12)
WINDOW_TILE_FLASH_BOTTOM_RIGHTWINDOW_TILE(13)
WINDOW_TILE_FLASH_LEFTWINDOW_TILE(14)
WINDOW_TILE_FLASH_RIGHTWINDOW_TILE(15)
WINDOW_TILE_BORDER_TOP_LEFTWINDOW_TILE(16)
WINDOW_TILE_BORDER_TOPWINDOW_TILE(17)
WINDOW_TILE_BORDER_TOP_RIGHTWINDOW_TILE(18)
WINDOW_TILE_BORDER_BOTTOM_LEFTWINDOW_TILE(19)
WINDOW_TILE_BORDER_BOTTOMWINDOW_TILE(20)
WINDOW_TILE_BORDER_BOTTOM_RIGHTWINDOW_TILE(21)
WINDOW_TILE_BORDER_LEFTWINDOW_TILE(22)
WINDOW_TILE_BORDER_RIGHTWINDOW_TILE(23)
WINDOW_TILE_BORDER_ROUND_CORNERWINDOW_TILE(28)
WINDOW_TILE_WINDOW_FILLWINDOW_TILE(32)
WINDOW_TILE_DIVIDER_TEE_DOWNWINDOW_TILE(9)Divider lines (mnWindowDrawDividerLine) and their joins, in the tiles the flash borrows: a tee with its stem leaving below, above, right or left, a cross, and the two straight lines.
WINDOW_TILE_DIVIDER_TEE_UPWINDOW_TILE(10)
WINDOW_TILE_DIVIDER_TEE_RIGHTWINDOW_TILE(11)
WINDOW_TILE_DIVIDER_TEE_LEFTWINDOW_TILE(12)
WINDOW_TILE_DIVIDER_CROSSWINDOW_TILE(13)
WINDOW_TILE_DIVIDER_HORIZONTALWINDOW_TILE(14)
WINDOW_TILE_DIVIDER_VERTICALWINDOW_TILE(15)
WINDOW_TILE_BORDER_TOP_TEEWINDOW_TILE(24)The border's top, bottom, left and right edges where a divider line meets them.
WINDOW_TILE_BORDER_BOTTOM_TEEWINDOW_TILE(25)
WINDOW_TILE_BORDER_LEFT_TEEWINDOW_TILE(26)
WINDOW_TILE_BORDER_RIGHT_TEEWINDOW_TILE(27)
WINDOW_TILE_BATTLE_BORDER_BOTTOM_LEFTWINDOW_TILE(128)In battle, the bottom border tiles' lower rows, which mnWindowSystemInitBattle copies to tiles 128 to 130.
WINDOW_TILE_BATTLE_BORDER_BOTTOMWINDOW_TILE(129)
WINDOW_TILE_BATTLE_BORDER_BOTTOM_RIGHTWINDOW_TILE(130)
WINDOW_TILE_COMMAND_PANELWINDOW_TILE(127)In battle, the tile the command row fills its empty panels with, and mnWindowEraseBorderRect below row 16.
WINDOW_TILE_HP_LABELWINDOW_TILE(29)The HP and PP labels before a number (mnTextDrawPrefixedNumberAtOffset) or a Psynergy's cost: each label's first tile, and the second tile the HP label always takes.
WINDOW_TILE_HP_LABEL_ENDWINDOW_TILE(30)
WINDOW_TILE_PP_LABELWINDOW_TILE(31)

Definition at line 946 of file window.h.

anonymous enum

enum { NUMBER_LABEL_HP, NUMBER_LABEL_PP }

Which label mnTextDrawPrefixedNumberAtOffset draws before its number.

EnumeratorValueDescription
NUMBER_LABEL_HP0
NUMBER_LABEL_PP1

Definition at line 1013 of file window.h.

anonymous enum

enum { WINDOW_SPRITE_MOTION_STILL, WINDOW_SPRITE_MOTION_PAGE_ARROW, WINDOW_SPRITE_MOTION_WOBBLE, WINDOW_SPRITE_MOTION_SHAKE, … }

How a window sprite moves (WINDOW_SPR.motion), run each tick by mnWindowSpriteUpdateAll; 0 is a free window sprite.

EnumeratorValueDescription
WINDOW_SPRITE_MOTION_STILL1
WINDOW_SPRITE_MOTION_PAGE_ARROW2The next-page arrow, bobbing.
WINDOW_SPRITE_MOTION_WOBBLE4Swings along a small arc.
WINDOW_SPRITE_MOTION_SHAKE5Jitters by a pixel every other tick.
WINDOW_SPRITE_MOTION_POP6Shown at double size, then normal size.
WINDOW_SPRITE_MOTION_SPIN7Turns while circling its place.
WINDOW_SPRITE_MOTION_SWELL9Pulses between 1 and 1.5 times its size.
WINDOW_SPRITE_MOTION_SWELL_HALF10The same at half the scale.
WINDOW_SPRITE_MOTION_SHRINK11Shrinks from 1.5 times to its size, once.
WINDOW_SPRITE_MOTION_SHRINK_HALF12The same at half the scale.
WINDOW_SPRITE_MOTION_HIDDEN13Not drawn.
WINDOW_SPRITE_MOTION_HOP_RIGHT14A hop and back, each in a direction of its own.
WINDOW_SPRITE_MOTION_HOP_DOWN_NEXT_PAGE15
WINDOW_SPRITE_MOTION_HOP_LEFT16
WINDOW_SPRITE_MOTION_HOP_UP17
WINDOW_SPRITE_MOTION_HOP_DOWN_LEFT18
WINDOW_SPRITE_MOTION_ON_SCREEN19Still, and drawn only while within 64 pixels of the screen.

Definition at line 1021 of file window.h.

TEXT_COL

enum TEXT_COL

Text colours (mnTextSetColor), named as the basic sprite palette (BASIC_COLORS_PALETTE) shows them.

EnumeratorValueDescription
TEXT_COLOR_RED2
TEXT_COLOR_YELLOW4
TEXT_COLOR_PINK9a sealed party member's Psynergy
TEXT_COLOR_GREY14
TEXT_COLOR_WHITE15a message's colour at start

Definition at line 1053 of file window.h.

anonymous enum

enum { WINDOW_FLAG_OPEN, WINDOW_FLAG_INSTANT, WINDOW_FLAG_UNREAD, WINDOW_FLAG_TEXT_CANVAS, … }

The flags of a UI window (WINDOW.flags), which mnWindowCreate takes as its attributes.

EnumeratorValueDescription
WINDOW_FLAG_OPEN0x1The window slot is in use.
WINDOW_FLAG_INSTANT0x2Opens and closes at once, with no zoom.
WINDOW_FLAG_UNREAD0x4Passed beside WINDOW_FLAG_INSTANT by the battle menus and the party status window; mnWindowCreate never reads it.
WINDOW_FLAG_TEXT_CANVAS0x8Text is drawn into a canvas of bitmap tiles (mnWindowMapTextCanvasTiles).
WINDOW_FLAG_BORDERED_CANVAS0x20The canvas has a border and a filled background; without it the canvas is transparent and borderless.
WINDOW_FLAG_OUTLINED_TEXT0x40The canvas text gets an outline.
WINDOW_FLAG_ANCHOR_BOTTOM0x80When a new page resizes the window, its bottom edge stays put.
WINDOW_FLAG_FIXED_X0x100When a new page resizes the window, its left edge stays put.

Definition at line 1073 of file window.h.

WINDOW_BATTLE_MODE

enum WINDOW_BATTLE_MODE

Where the windows are drawn (WIN_STATE.battleMode).

EnumeratorValueDescription
WINDOW_FIELD0On the field; the field setup clears the block.
WINDOW_BATTLE1In battle, from mnWindowSystemInitBattle.
WINDOW_BATTLE_MESSAGE2In battle, while mnBattleMessageOpen decodes a battle message: the Japanese decoder then sets names off with spaces and style codes.
WINDOW_GLYPHS_BLENDED4A flag with WINDOW_BATTLE: glyphs are drawn blended (semi-transparent), while the Djinn tutorial's line shows over the command row.

Definition at line 1165 of file window.h.

CENTERED_MESSAGE_MODE

enum CENTERED_MESSAGE_MODE

The window mnFieldMessageShowCentered shows its message in.

EnumeratorValueDescription
CENTERED_MESSAGE_BARE0A window of no border and no size, opened and closed at once: the text stands alone.
CENTERED_MESSAGE_WINDOW1A zooming window sized to the message, waited for as it closes.

Definition at line 1183 of file window.h.

FIELD_MESSAGE_FLAG

enum FIELD_MESSAGE_FLAG

The flags mnFieldMessageShow takes.

EnumeratorValueDescription
FIELD_MESSAGE_ZOOM0x01the window zooms open and shut
FIELD_MESSAGE_WAITING_FOR_SOUND0x02the window state is busy while it shows
FIELD_MESSAGE_KEEP_OPEN0x04the window is left open
FIELD_MESSAGE_LOWER0x084 tiles below the top rows' centre
FIELD_MESSAGE_HOLD_UPLOAD0x20the tilemap upload is held off
FIELD_MESSAGE_LOWEST0x4012 tiles below the top rows' centre

Definition at line 1197 of file window.h.

PAUSE_MENU_ENTRY

enum PAUSE_MENU_ENTRY

The Pause menu's entries, as mnPauseMenuChoose returns them (counted from Save your quest even when only Change settings shows).

EnumeratorValueDescription
PAUSE_MENU_SAVE_QUEST0
PAUSE_MENU_SLEEP1
PAUSE_MENU_CHANGE_SETTINGS2
PAUSE_MENU_DEBUG_R20In debug mode, R and L also leave the
PAUSE_MENU_DEBUG_L21menu with these; mnPauseMenuRun acts on neither.

Definition at line 1217 of file window.h.

MESSAGE_WINDOW_OPTION

enum MESSAGE_WINDOW_OPTION

mnMessageOpenWindow's window options, in packed's low bits.

EnumeratorValueDescription
MESSAGE_WINDOW_ZOOM1zoom open rather than appear at once
MESSAGE_WINDOW_UNREAD2set by shopkeepers' windows and others; never read
MESSAGE_WINDOW_TEXT_CANVAS8WINDOW_FLAG_TEXT_CANVAS
MESSAGE_WINDOW_ANCHOR_BOTTOM16WINDOW_FLAG_ANCHOR_BOTTOM
MESSAGE_WINDOW_FIXED_X32WINDOW_FLAG_FIXED_X

Definition at line 1255 of file window.h.

CHARACTER_PORTRAIT

enum CHARACTER_PORTRAIT

The party members' portraits, the icon bank's first rows, as PortraitCharacterMap pairs them with the party.

EnumeratorValueDescription
PORTRAIT_ISAAC
PORTRAIT_GARET
PORTRAIT_IVAN
PORTRAIT_MIA
PORTRAIT_FELIX
PORTRAIT_JENNA
PORTRAIT_SHEBA
PORTRAIT_PIERS
PORTRAIT_PIERS_SPEAKINGthe one Piers's messages show

Definition at line 1271 of file window.h.

SPR_PORTRAIT

enum SPR_PORTRAIT

The other speakers' portraits, from the icon bank's row PORTRAIT_FIRST_SPRITE_ICON on, as PortraitSpriteMap pairs them with sprites; each is named for its picture.

EnumeratorValueDescription
SPRITE_PORTRAIT_JUPITER_DJINNI0
SPRITE_PORTRAIT_VENUS_DJINNI
SPRITE_PORTRAIT_MARS_DJINNI
SPRITE_PORTRAIT_MERCURY_DJINNI
SPRITE_PORTRAIT_KRADEN
SPRITE_PORTRAIT_SATUROS
SPRITE_PORTRAIT_MENARDI
SPRITE_PORTRAIT_ALEX
SPRITE_PORTRAIT_DORA
SPRITE_PORTRAIT_KYLE
SPRITE_PORTRAIT_WOMAN_IN_GREEN_HEADSCARF
SPRITE_PORTRAIT_WOMAN_WITH_ORANGE_PONYTAIL
SPRITE_PORTRAIT_BOY_WITH_ORANGE_HAIR
SPRITE_PORTRAIT_MAN_IN_TEAL_SHIRT
SPRITE_PORTRAIT_MAN_IN_TALL_HAT
SPRITE_PORTRAIT_BEARDED_MAN_IN_LONG_ROBE
SPRITE_PORTRAIT_BALD_MAN_IN_RED
SPRITE_PORTRAIT_YOUNG_MAN_IN_GREEN
SPRITE_PORTRAIT_WOMAN_WITH_PONYTAIL
SPRITE_PORTRAIT_WOMAN_IN_PINK_APRON
SPRITE_PORTRAIT_MAN_WITH_DARK_HAIR
SPRITE_PORTRAIT_ISAAC_CHILD
SPRITE_PORTRAIT_GARET_CHILD
SPRITE_PORTRAIT_FELIX_CHILD
SPRITE_PORTRAIT_JENNA_CHILD
SPRITE_PORTRAIT_FELIX_MASKED
SPRITE_PORTRAIT_FELIX_ADULT27
SPRITE_PORTRAIT_INVISIBLE_BABI
SPRITE_PORTRAIT_FARAN
SPRITE_PORTRAIT_POI
SPRITE_PORTRAIT_RIKI
SPRITE_PORTRAIT_TAVI
SPRITE_PORTRAIT_MADRAS_MAYOR
SPRITE_PORTRAIT_MADRAS_ELDER
SPRITE_PORTRAIT_ALHAFRAS_MAYOR
SPRITE_PORTRAIT_FORTUNE_TELLER
SPRITE_PORTRAIT_AKAFUBU
SPRITE_PORTRAIT_MOAPA
SPRITE_PORTRAIT_MAHA
SPRITE_PORTRAIT_JENNAS_FATHER
SPRITE_PORTRAIT_JENNAS_MOTHER
SPRITE_PORTRAIT_BRIGGS
SPRITE_PORTRAIT_CHAUCHA
SPRITE_PORTRAIT_EOLEO
SPRITE_PORTRAIT_OBABA
SPRITE_PORTRAIT_SUSA
SPRITE_PORTRAIT_LADY_UZUME
SPRITE_PORTRAIT_KUSHINADA
SPRITE_PORTRAIT_HYDROS
SPRITE_PORTRAIT_CONSERVATO
SPRITE_PORTRAIT_KARST
SPRITE_PORTRAIT_AGATIO
SPRITE_PORTRAIT_WEAPON_MERCHANT54
SPRITE_PORTRAIT_ARMOR_MERCHANT
SPRITE_PORTRAIT_WOMAN_WITH_TEAL_HEADBAND
SPRITE_PORTRAIT_INNKEEPER
SPRITE_PORTRAIT_INN_WORKER
SPRITE_PORTRAIT_WOMAN_WITH_ORANGE_HAIR
SPRITE_PORTRAIT_ARTIFACT_MERCHANT
SPRITE_PORTRAIT_LUNPA
SPRITE_PORTRAIT_PUELLE
SPRITE_PORTRAIT_MASKED_SHAMAN
SPRITE_PORTRAIT_PROX_ELDER
SPRITE_PORTRAIT_SUNSHINE
SPRITE_PORTRAIT_MAN_WITH_ORANGE_BEARD
SPRITE_PORTRAIT_GIRL_WITH_LONG_BLONDE_HAIR
SPRITE_PORTRAIT_IZUMO_WOMAN_IN_CREAM
SPRITE_PORTRAIT_IZUMO_MAN_IN_RED
SPRITE_PORTRAIT_IZUMO_WOMAN_IN_ORANGE
SPRITE_PORTRAIT_OLD_MAN_WITH_GREY_BEARD
SPRITE_PORTRAIT_OLD_WOMAN_WITH_GREY_HAIR
SPRITE_PORTRAIT_FEIZHI
SPRITE_PORTRAIT_HAMMA
SPRITE_PORTRAIT_MISSING76A row of the icon bank with no picture.

Definition at line 1287 of file window.h.

Functions in detail

btDjinnCountStandbyStub

Sint32 btDjinnCountStandbyStub(Uint32 unitId, Uint8 *counts)

Counts the standby Djinn on unitId's side, and each element's into counts when it is not NULL (btDjinnCountStandby).

Referenced by mnBattleCollectPartyCommands(), mnBattleCommandRowRun() and mnPartyStatusDraw().

Definition at line 1121 of file window.h.

Variables in detail

offsetof

STATIC_ASSERT(offsetof(WIN_STATE, freeSprites.head)

STATIC_ASSERT(offsetof(WIN_STATE, freeSprites.tailLink)

Definition at lines 733 and 734 of file window.h.

extern const Uint8 MenuAnimatedCursorTiles[]

The spinning hand of the selection screen and the battle target cursor, 16 by 16 pixels in 256 colours, 256 bytes a picture (sprite_cursors.list.tsv).

Referenced by mnBattleTargetRunSelection(), mnSelectionMenuCreate() and mnSelectionMenuDraw().

Definition at line 1097 of file window.h.

PointingHandTiles

extern const Uint8 PointingHandTiles[]

The pointing hand cursor, a 16x16 sprite, shared by the battle menus, the name entry screen and the talk choices.

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

Definition at line 1141 of file window.h.

On this page

StructuresMacrosEnumerationsFunctionsVariablesDescriptionMacros in detailWINDOW_MARK_TILEMAP_ROWWINDOW_PALETTEWINDOW_TILETEXT_TILE_FIRSTTEXT_TILESTEXT_EXTRA_TILE_FIRSTWINDOW_COUNTNO_GLYPH_RESOURCETEXT_LAST_FONT_CODEKANJI_FIRST_CODEGLYPH_ROW_BITSTEXT_CANVAS_VRAMTEXT_CANVAS_SIZETEXT_CANVAS_FIRST_TILEWINDOW_TILEMAP_VRAMPORTRAIT_PALETTEHIGHLIGHT_PALETTEWINDOW_BACKGROUND_COLORTEXT_CANVAS_BACKGROUND_WORDTEXT_BACKGROUND_COLORWINDOW_COLOR_WHITEWINDOW_COLOR_BLACKWINDOW_COLOR_DARK_GREYWINDOW_COLOR_LIGHT_GREYBASIC_COLORS_PALETTESTATUS_COLORS_PALETTEPAGE_ARROW_TILEPAGE_ARROW_VRAMPAGE_ARROW_LEFTPAGE_ARROW_RIGHTPAGE_DIGITS_TILEPAGE_NUMBER_TILEPAGE_NUMBER_LIT_TILEELEMENT_ICON_TILEWINDOW_TILE_PAIRTILE_NUMBER_MASKTILE_HFLIPTILE_VFLIPFLIP_XYFLIP_YWINDOW_TILE_PP_LABEL_ENDWINDOW_SPRITE_SIZE_16X16WINDOW_SPRITE_SIZE_32X32WINDOW_SPRITE_SIZE_32X8WINDOW_SPRITE_SIZE_32X16WINDOW_SPRITE_SIZE_16X32ICON_BASEICON_COUNT_ABOVE_ONEICON_COUNTICON_BROKENICON_EQUIPPEDICON_CURSEDACTION_ID_MASKPORTRAIT_SLOT_EMPTYCENTERED_TEXT_COLORQUESTION_MESSAGEWINDOW_COLOR_COUNTWINDOW_BRIGHTNESS_COUNTWINDOW_BRIGHTNESS_NEUTRALWINDOW_COLOR_WHEEL_STEPSHIGHLIGHT_LIGHTEN_STEPSCURSOR_BOB_YMESSAGE_WINDOW_VOICEMESSAGE_WINDOW_VOICE_OFMESSAGE_WINDOW_OPTIONS_MASKPORTRAIT_WINDOW_TILESEnumerations in detailanonymous enumanonymous enumMESSAGE_DECODE_FLAGWINDOW_SPR_KINDGLYPH_DRAW_MODETILEMAP_ENTRY_MODECOMMAND_ICONanonymous enumanonymous enumanonymous enumTEXT_COLanonymous enumWINDOW_BATTLE_MODECENTERED_MESSAGE_MODEFIELD_MESSAGE_FLAGPAUSE_MENU_ENTRYMESSAGE_WINDOW_OPTIONCHARACTER_PORTRAITSPR_PORTRAITFunctions in detailbtDjinnCountStandbyStubVariables in detailoffsetofMenuAnimatedCursorTilesPointingHandTiles