|
Digimon World 3 decomp
The European version, SLES_039.36
|
Text windows, the cursor, the message and talk boxes, the font and the text helpers (text/) More...
#include "common.h"#include <sys/types.h>#include <libgte.h>#include <libgpu.h>#include "engine/task.h"#include "engine/gfx.h"Go to the source code of this file.
Data Structures | |
| struct | Cursor |
| A menu cursor: a text window showing one of the CURSOR_FRAMES glyphs. More... | |
| struct | MessageBoxFrame |
| The frame of a message box: two halves of the bottom panel that grow from the sides (substate 0), stay with a "next" arrow when showArrow is set (substate 1), and fade out through five palette rows (substate 2). More... | |
| struct | TalkBoxChildren |
| The children of a TalkBox. More... | |
| struct | TalkBox |
| A box with a speaker's name and a message (createTalkBox). More... | |
| struct | TalkBoxFrame |
| Draws a TalkBox's panel. More... | |
| struct | TextTools |
| Text helpers (initTextTools) More... | |
| struct | TextBuffer |
| struct | TextWindow |
| A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that control code 5 inserts), drawn glyph by glyph as sprites, optionally typed out one character every typeDelay frames. More... | |
| struct | TalkBoxLayout |
| Where the parts of a TalkBox go, for each of its four types. More... | |
| struct | Font |
| The font (FONT): three text styles, the length of each control code, and decode(), which turns the next character into kind << 8 | value: kind 0 a glyph (value - 4 indexes glyphs), 1 an icon, 2 a control code, 3 a missing character, 4 the end. More... | |
| struct | GlyphMap |
| Maps a Shift-JIS character to a glyph. More... | |
| struct | TextStyle |
| struct | Glyph |
| One glyph of a font sheet. More... | |
| struct | TextDraw |
| Drawing state shared with the control-code handlers. More... | |
| struct | MessageBox |
| The children of a message box (createMessageBox) More... | |
| struct | ZoomBox |
| A blue rectangle outline that zooms in (or out, when closing) around a TalkBox. More... | |
Macros | |
| #define | PALETTE_WHITE 0 |
| The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs, named by the colour of the letters (white letters with a grey shade in PALETTE_WHITE, the default) | |
| #define | PALETTE_BLUE 1 |
| a light blue: what is highlighted or current | |
| #define | PALETTE_DARK_BLUE 2 |
| #define | PALETTE_YELLOW 3 |
| #define | PALETTE_GREEN 4 |
| #define | PALETTE_RED 5 |
| #define | PALETTE_PURPLE 6 |
| #define | PALETTE_GREY 7 |
| what is unavailable | |
Functions | |
| void | drawMessageBoxFrame (struct MessageBoxFrame *task) |
| Draws the two halves of a message box's panel, growing, still or fading. | |
| void | drawMessageBoxArrow (struct MessageBoxFrame *task) |
| Draws a message box's blinking "next" arrow. | |
| void | setTextBuffer (struct TextWindow *obj, struct TextBuffer *buf, const char *text) |
| Copies a string into one of a window's text buffers, growing it as needed (NULL shows STR_NULL_MESSAGE) | |
| void | textWindowSetSubString (struct TextWindow *obj, char *text, s32 id, s32 index) |
Text window method: puts string id of a table (-1: text itself) into text buffer index | |
| void | drawZoomBox (ZoomBox *task) |
| Zooms the outline one frame in or out and draws it as four lines; ends when done. | |
| void | drawTalkBoxArrow (struct TalkBoxFrame *task) |
| Draws a talk box's blinking "next" arrow where its type puts it. | |
| void | drawTalkBoxFrame (struct TalkBoxFrame *task) |
| Draws a talk box's corner sprites and its semi-transparent panel. | |
| void | textWindowSetText (TextWindow *obj, const char *text) |
| Text window method: shows a string. | |
| void | textWindowSetString (TextWindow *obj, char *text, s32 id) |
Text window method: shows string id of a string table (-1: text itself) | |
| void | formatNumber (u8 *buf, s32 value) |
| Writes a number's decimal digits (0 for zero or less) | |
| void | textWindowSetNumber (TextWindow *obj, u32 index, s32 value) |
Text window method: puts a number into text buffer index, in the font's digit glyphs. | |
| void | textWindowSetSubText (TextWindow *obj, const char *text, s32 index) |
Text window method: puts a string into work buffer index (1-5), for control code 5. | |
| void | textWindowSetTypeDelay (TextWindow *, s32) |
Text window method: types the text out a character every delay frames (0 or less: all at once) | |
| void | textWindowSetPos (TextWindow *obj, s16 x, s16 y) |
| Text window method: moves the window. | |
| void | textWindowSetPalette (TextWindow *obj, u8 palette) |
| Text window method: the CLUT row of the glyphs. | |
| void | textWindowSetBlend (TextWindow *obj, s32 blend) |
| old-style: u8 blend | |
| void | textWindowSetSpacing (TextWindow *obj, s32 x, s32 y) |
| old-style: s16 x, y | |
| void | textWindowSetVisible (TextWindow *obj, u8 visible) |
| Text window method: shows or hides the window (an empty text stays hidden) | |
| void | textWindowSetRightAlign (TextWindow *obj, s32 type) |
| old-style: u8 type | |
| void | textWindowInsertPlayerName (TextWindow *obj) |
| Text window method: fills the work buffers that control code 8 asks for with the player's name. | |
| void | textWindowSetTypeSound (TextWindow *obj, s32 sound) |
| Text window method: the sound each typed character plays (0 for none) | |
| void | textWindowSetScale (TextWindow *obj, s32 x, s32 y) |
| Text window method: scales the glyphs. | |
| void | textWindowSetPivot (TextWindow *obj, s32 x, s32 y) |
| Text window method: the point the glyphs scale around. | |
| void | textWindowSetDepth (TextWindow *obj, s32 depth) |
| Text window method: the OT depth the glyphs are drawn at. | |
| void | textWindowSetLines (TextWindow *obj, s32 lines) |
| old-style: u8 lines | |
| void | textWindowSetUnusedC4 (TextWindow *obj, s32 value) |
| old-style: u8 value | |
| s32 | textWindowIsFinished (TextWindow *obj) |
| Text window method: whether the end of the text was reached. | |
| s32 | textWindowIsVisible (TextWindow *obj) |
| Text window method: whether the window is shown. | |
| s32 | textWindowIsWaitingForButton (TextWindow *obj) |
| Text window method: whether the text waits for a button (control code 2) | |
| void | textWindowShowPage (TextWindow *obj) |
| Text window method: makes the whole current page visible at once. | |
| void | textWindowSetStyle (TextWindow *obj, s32 style) |
| Text window method: one of the three font styles (others pick style 1) | |
| void | textWindowDraw (struct TextWindow *obj) |
| Text window method: draws the visible part of the text as sprites, running the control codes. | |
| void | cursorSetVisible (Cursor *task, s32 visible) |
| Cursor method: shows it (from its first frame) or hides it. | |
| void | cursorSetPos (Cursor *task, s32 x, s32 y) |
| Cursor method: moves it. | |
| void | cursorSetPalette (Cursor *task, s32 palette) |
| Cursor method: the CLUT row of its glyph. | |
| void | cursorSetIdleDelay (Cursor *task, s32 delay) |
| Cursor method: the vsyncs it rests between two swings. | |
| void | cursorSetFrameDelay (Cursor *task, s32 delay) |
| Cursor method: the vsyncs of each frame of a swing. | |
| void | cursorSetStill (Cursor *task, s32 still) |
| Cursor method: keeps it on its first frame. | |
| void | updateCursor (Cursor *task, TextWindow **win) |
| The cursor task: creates its text window, then swings it every idleDelay vsyncs. | |
| Cursor * | createCursor (s16 layerId, s32 depth, s16 x, s16 y) |
| A menu cursor on a layer at (x, y) | |
| void | updateMessageBox (Task *task, struct MessageBox *data) |
| The message box task: shows the text once the frame is open, closes when the text ends. | |
| s32 | processTextChar (TextWindow *obj, TextBuffer *text, TextDraw *draw, s16 *pos) |
| Picks the glyph of the next character, or runs its control code; returns what the drawing does next. | |
| s32 | textCodeDefault (TextWindow *obj, TextBuffer *buf) |
| Control codes 0, 7 and 9: show the page, or (code 7) start the text after a speaker's name. | |
| s32 | textCodeNewLine (TextWindow *obj, TextBuffer *buf, TextDraw *draw) |
| Control code 1: a new line, or a new page when the page is full. | |
| s32 | textCodeWaitButton (TextWindow *obj, TextBuffer *buf) |
| Control code 2: waits for one of TEXT_WAIT_BUTTONS. | |
| s32 | textCodePageBreak (TextWindow *obj, TextBuffer *buf) |
| Control code 3: starts a new page. | |
| s32 | textCodeIgnore (void) |
| Control code 4: skipped. | |
| s32 | textCodeInsert (TextWindow *obj, TextBuffer *buf, TextDraw *draw) |
| Control code 5: draws the next character of a work buffer in its place. | |
| s32 | textCodePause (TextWindow *obj, TextBuffer *buf) |
| Control code 6: pauses the typing for some frames, once. | |
| s32 | textCodePlayerName (TextWindow *obj, TextBuffer *buf) |
| Control code 8: puts the player's name into a work buffer, once. | |
| void | updateTextWindow (TextWindow *obj) |
| The text window task: types and draws the text, waits where the control codes say, frees the buffers at the end. | |
| void | updateZoomBox (struct ZoomBox *task) |
| The zoom box task: starts zoomed out (opening) or in (closing), then draws. | |
| ZoomBox * | createZoomBox (s32 layerId, s16 x, s16 y, s32 w, s32 h, s32 type) |
A zoom box around a talk box of type type at (x, y) | |
| void | talkBoxSetPos (TalkBox *task, s32 x, s32 y) |
| Talk box method: moves the box with its outlines and windows. | |
| void | updateTalkBox (TalkBox *task, TalkBoxChildren *children) |
| The talk box task: opens with its outlines, runs the text, then closes and ends. | |
| TextWindow * | createTextWindow (s16 id, s16 type, s16 x, s16 y) |
| A text window on a layer, in a font style, at (x, y) | |
| void | updateMessageBoxFrame (struct MessageBoxFrame *task) |
| The message box frame task: grows, waits with the arrow when asked, then fades out and ends. | |
| MessageBoxFrame * | createMessageBoxFrame (s32 layerId) |
| A message box frame on a layer, with the menu sound. | |
| void | updateTalkBoxFrame (TalkBoxFrame *task) |
| The talk box frame task: idle until the box opens, then draws the frame and the arrow. | |
| TalkBoxFrame * | createTalkBoxFrame (TalkBox *parent) |
| The frame of a talk box. | |
| Task * | createMessageBox (s32 layerId, void *strings, s32 index) |
A message box with string index of a table, typed out in three-line pages. | |
| TalkBox * | createTalkBox (s32 id, s16 x, s16 y, void *strings, s32 index, u32 type) |
A talk box with string index of a table (an optional speaker's name between 02 07 codes), sized to the text. | |
| void | bindTextTools (TextTools *obj) |
Makes obj the text tools the methods work on. | |
| char * | getString (s32 *table, s32 index) |
String index of a string table (a count, then byte offsets from its start), or NULL. | |
| s32 | measureText (TextBuffer *text, TextStyle *style, s32 spacing) |
| old-style: s16 spacing | |
| void | initTextTools (TextTools *obj) |
| Clears a text tools object, gives it its methods and binds it. | |
| void | convertText (void *buf, void *text, s32 mode) |
Converts the string text to buf: mode 0 from font codes to Shift-JIS (a code below 4 is followed by an icon's), mode 1 back. | |
| void | loadFont (void) |
| Loads the font's images into VRAM and starts loading the menu sprites. | |
| s16 | decodeChar (u8 *s, u8 mode, TextStyle *font) |
The next character as kind << 8 | value (see Font); mode set for Shift-JIS text. | |
Variables | |
| const char | STR_NULL_MESSAGE [] |
| "Null message was passed" | |
| const char | STR_BAD_DIGIT_BUFFER [] |
| "Digit: the message's work number is not supported" | |
| const char | STR_BAD_EXT_BUFFER [] |
| "ExtMess: the message's work number is not supported" | |
| const char | STR_MESSAGE_NOT_SET [] |
| "The message is not set" | |
| char * | CURSOR_FRAMES [] |
| The cursor's frames, the last one repeated as it swings back. | |
| s32 | TEXT_WAIT_BUTTONS [] |
| The buttons a wait for a button (code 2) can wait for. | |
| Font | FONT |
| decode is declared without a prototype, as callers would truncate the u8 mode, so decodeChar is cast to it | |
| s32(* | TEXT_CODE_HANDLERS [])() |
| (obj, text, wait): most handlers take only the first two | |
| GlyphMap | FONT_GLYPH_MAP [] |
| The font's Shift-JIS codes of its glyphs and icons, up to 0xFFFF. | |
| GlyphMap | FONT_ICON_MAP [] |
| Glyph | FONT_GLYPHS_1 [] |
| the three font sizes' glyphs and icons (text_tools.c) | |
| Glyph | FONT_ICONS_1 [] |
| Glyph | FONT_GLYPHS_2 [] |
| Glyph | FONT_ICONS_2 [] |
| Glyph | FONT_GLYPHS_3 [] |
| Glyph | FONT_ICONS_3 [] |
| TalkBoxLayout | TALK_BOX_LAYOUTS [] |
Text windows, the cursor, the message and talk boxes, the font and the text helpers (text/)
Definition in file text.h.
| #define PALETTE_WHITE 0 |
The text windows' palettes (TextWindow.palette, setPalette): rows of the font's CLUTs, named by the colour of the letters (white letters with a grey shade in PALETTE_WHITE, the default)
| #define PALETTE_BLUE 1 |
| void drawMessageBoxFrame | ( | struct MessageBoxFrame * | task | ) |
Draws the two halves of a message box's panel, growing, still or fading.
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
Definition at line 4 of file message_box.c.
Referenced by updateMessageBoxFrame().
| void drawMessageBoxArrow | ( | struct MessageBoxFrame * | task | ) |
Draws a message box's blinking "next" arrow.
Definition at line 29 of file message_box.c.
Referenced by updateMessageBoxFrame().
| void setTextBuffer | ( | struct TextWindow * | obj, |
| struct TextBuffer * | buf, | ||
| const char * | text | ||
| ) |
Copies a string into one of a window's text buffers, growing it as needed (NULL shows STR_NULL_MESSAGE)
< the current mode's: freed by main whenever the mode task ends
Definition at line 24 of file text_window.c.
Referenced by setTextBuffer(), textWindowSetNumber(), textWindowSetSubString(), textWindowSetSubText(), and textWindowSetText().
| void textWindowSetSubString | ( | struct TextWindow * | obj, |
| char * | text, | ||
| s32 | id, | ||
| s32 | index | ||
| ) |
Text window method: puts string id of a table (-1: text itself) into text buffer index
Definition at line 136 of file text_window.c.
Referenced by createTextWindow(), textCodePlayerName(), and textWindowSetString().
| void drawZoomBox | ( | ZoomBox * | task | ) |
Zooms the outline one frame in or out and draws it as four lines; ends when done.
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
Definition at line 143 of file talk_box.c.
Referenced by updateZoomBox().
| void drawTalkBoxArrow | ( | struct TalkBoxFrame * | task | ) |
Draws a talk box's blinking "next" arrow where its type puts it.
Definition at line 4 of file talk_box.c.
Referenced by updateTalkBoxFrame().
| void drawTalkBoxFrame | ( | struct TalkBoxFrame * | task | ) |
Draws a talk box's corner sprites and its semi-transparent panel.
Definition at line 35 of file talk_box.c.
Referenced by updateTalkBoxFrame().
| void textWindowSetText | ( | TextWindow * | obj, |
| const char * | text | ||
| ) |
Text window method: shows a string.
Definition at line 68 of file text_window.c.
Referenced by createTextWindow(), textWindowSetNumber(), and textWindowSetSubText().
| void textWindowSetString | ( | TextWindow * | obj, |
| char * | text, | ||
| s32 | id | ||
| ) |
Text window method: shows string id of a string table (-1: text itself)
Definition at line 73 of file text_window.c.
Referenced by createTextWindow().
Writes a number's decimal digits (0 for zero or less)
Definition at line 78 of file text_window.c.
Referenced by textWindowSetNumber().
| void textWindowSetNumber | ( | TextWindow * | obj, |
| u32 | index, | ||
| s32 | value | ||
| ) |
Text window method: puts a number into text buffer index, in the font's digit glyphs.
Definition at line 106 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetSubText | ( | TextWindow * | obj, |
| const char * | text, | ||
| s32 | index | ||
| ) |
Text window method: puts a string into work buffer index (1-5), for control code 5.
Definition at line 127 of file text_window.c.
Referenced by createTextWindow(), textCodeInsert(), and textWindowInsertPlayerName().
| void textWindowSetTypeDelay | ( | TextWindow * | obj, |
| s32 | delay | ||
| ) |
Text window method: types the text out a character every delay frames (0 or less: all at once)
Definition at line 395 of file text_window.c.
Referenced by createTextWindow(), and setTextBuffer().
| void textWindowSetPos | ( | TextWindow * | obj, |
| s16 | x, | ||
| s16 | y | ||
| ) |
Text window method: moves the window.
Definition at line 409 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetPalette | ( | TextWindow * | obj, |
| u8 | palette | ||
| ) |
Text window method: the CLUT row of the glyphs.
Definition at line 415 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetBlend | ( | TextWindow * | obj, |
| s32 | blend | ||
| ) |
old-style: u8 blend
| void textWindowSetSpacing | ( | TextWindow * | obj, |
| s32 | x, | ||
| s32 | y | ||
| ) |
old-style: s16 x, y
| void textWindowSetVisible | ( | TextWindow * | obj, |
| u8 | visible | ||
| ) |
Text window method: shows or hides the window (an empty text stays hidden)
Definition at line 450 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetRightAlign | ( | TextWindow * | obj, |
| s32 | type | ||
| ) |
old-style: u8 type
| void textWindowInsertPlayerName | ( | TextWindow * | obj | ) |
Text window method: fills the work buffers that control code 8 asks for with the player's name.
Definition at line 474 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetTypeSound | ( | TextWindow * | obj, |
| s32 | sound | ||
| ) |
Text window method: the sound each typed character plays (0 for none)
Definition at line 517 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetScale | ( | TextWindow * | obj, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Text window method: scales the glyphs.
< GTE regards 4096 as 1.0
Definition at line 522 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetPivot | ( | TextWindow * | obj, |
| s32 | x, | ||
| s32 | y | ||
| ) |
Text window method: the point the glyphs scale around.
Definition at line 530 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetDepth | ( | TextWindow * | obj, |
| s32 | depth | ||
| ) |
Text window method: the OT depth the glyphs are drawn at.
Definition at line 536 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetLines | ( | TextWindow * | obj, |
| s32 | lines | ||
| ) |
old-style: u8 lines
| void textWindowSetUnusedC4 | ( | TextWindow * | obj, |
| s32 | value | ||
| ) |
old-style: u8 value
| s32 textWindowIsFinished | ( | TextWindow * | obj | ) |
Text window method: whether the end of the text was reached.
Definition at line 557 of file text_window.c.
Referenced by createTextWindow().
| s32 textWindowIsVisible | ( | TextWindow * | obj | ) |
Text window method: whether the window is shown.
Definition at line 562 of file text_window.c.
Referenced by createTextWindow().
| s32 textWindowIsWaitingForButton | ( | TextWindow * | obj | ) |
Text window method: whether the text waits for a button (control code 2)
Definition at line 567 of file text_window.c.
Referenced by createTextWindow().
| void textWindowShowPage | ( | TextWindow * | obj | ) |
Text window method: makes the whole current page visible at once.
Definition at line 309 of file text_window.c.
Referenced by createTextWindow(), textCodeDefault(), and textCodeNewLine().
| void textWindowSetStyle | ( | TextWindow * | obj, |
| s32 | style | ||
| ) |
Text window method: one of the three font styles (others pick style 1)
Definition at line 381 of file text_window.c.
Referenced by createTextWindow().
| void textWindowDraw | ( | struct TextWindow * | obj | ) |
Text window method: draws the visible part of the text as sprites, running the control codes.
< GTE regards 4096 as 1.0
Definition at line 154 of file text_window.c.
Referenced by createTextWindow(), and updateTextWindow().
Cursor method: shows it (from its first frame) or hides it.
Definition at line 4 of file cursor.c.
Referenced by createCursor().
Cursor method: moves it.
Definition at line 14 of file cursor.c.
Referenced by createCursor().
Cursor method: the CLUT row of its glyph.
Definition at line 21 of file cursor.c.
Referenced by createCursor().
Cursor method: the vsyncs it rests between two swings.
Definition at line 27 of file cursor.c.
Referenced by createCursor().
Cursor method: the vsyncs of each frame of a swing.
Definition at line 32 of file cursor.c.
Referenced by createCursor().
Cursor method: keeps it on its first frame.
Definition at line 37 of file cursor.c.
Referenced by createCursor().
| void updateCursor | ( | Cursor * | task, |
| TextWindow ** | win | ||
| ) |
The cursor task: creates its text window, then swings it every idleDelay vsyncs.
Definition at line 42 of file cursor.c.
Referenced by createCursor().
A menu cursor on a layer at (x, y)
Definition at line 92 of file cursor.c.
Referenced by CARDGAME_updateScreen(), createFieldMenuWindows(), createListMenu(), FIELDSTG_runChoice(), showMenuOptions(), STCRDDEK_createEditorWindows(), STCRDDEK_createScreenWindows(), STCRDSHP_createBuyWindows(), STCRDSHP_createPackOpenWindows(), STCRDSHP_createShopWindows(), STGDGLAB_createEntryPanelWindows(), STGDGLAB_createSkillPanelWindows(), STGDGLAB_createSlotScreenWindows(), STGDGLAB_updateEntryList(), STGMCARD_updateSaves(), STGTRAIN_createResultWindows(), STGTRAIN_createSessionWindows(), STITSHOP_createBuyWindows(), STITSHOP_createItemListWindows(), STITSHOP_createSellWindows(), STITSHOP_createShopWindows(), STPLNMET_createConfirmWindows(), STSTATUS_createCardWindows(), STSTATUS_createDemoWindows(), STSTATUS_createDigivolveWindows(), STSTATUS_createEquipWindows(), STSTATUS_createItemListWindows(), STSTATUS_createItemWindows(), STSTATUS_createStatusWindows(), STSTATUS_createTechWindows(), updateEvent1510(), updateEvent1512(), updateEvent1514(), updateEvent1516(), updateEvent1518(), updateEvent1520(), updateEvent9(), updateInn(), and updateMenu().
| void updateMessageBox | ( | Task * | task, |
| struct MessageBox * | data | ||
| ) |
The message box task: shows the text once the frame is open, closes when the text ends.
< SYSTEM04
Definition at line 96 of file message_box.c.
Referenced by createMessageBox().
| s32 processTextChar | ( | TextWindow * | obj, |
| TextBuffer * | text, | ||
| TextDraw * | draw, | ||
| s16 * | pos | ||
| ) |
Picks the glyph of the next character, or runs its control code; returns what the drawing does next.
Definition at line 575 of file text_window.c.
Referenced by textCodeInsert(), and textWindowDraw().
| s32 textCodeDefault | ( | TextWindow * | obj, |
| TextBuffer * | buf | ||
| ) |
Control codes 0, 7 and 9: show the page, or (code 7) start the text after a speaker's name.
Definition at line 636 of file text_window.c.
| s32 textCodeNewLine | ( | TextWindow * | obj, |
| TextBuffer * | buf, | ||
| TextDraw * | draw | ||
| ) |
Control code 1: a new line, or a new page when the page is full.
Definition at line 650 of file text_window.c.
| s32 textCodeWaitButton | ( | TextWindow * | obj, |
| TextBuffer * | buf | ||
| ) |
Control code 2: waits for one of TEXT_WAIT_BUTTONS.
Definition at line 672 of file text_window.c.
| s32 textCodePageBreak | ( | TextWindow * | obj, |
| TextBuffer * | buf | ||
| ) |
Control code 3: starts a new page.
Definition at line 688 of file text_window.c.
| s32 textCodeIgnore | ( | void | ) |
Control code 4: skipped.
Definition at line 722 of file text_window.c.
| s32 textCodeInsert | ( | TextWindow * | obj, |
| TextBuffer * | buf, | ||
| TextDraw * | draw | ||
| ) |
Control code 5: draws the next character of a work buffer in its place.
Definition at line 727 of file text_window.c.
| s32 textCodePause | ( | TextWindow * | obj, |
| TextBuffer * | buf | ||
| ) |
Control code 6: pauses the typing for some frames, once.
Definition at line 756 of file text_window.c.
| s32 textCodePlayerName | ( | TextWindow * | obj, |
| TextBuffer * | buf | ||
| ) |
Control code 8: puts the player's name into a work buffer, once.
Definition at line 769 of file text_window.c.
| void updateTextWindow | ( | TextWindow * | obj | ) |
The text window task: types and draws the text, waits where the control codes say, frees the buffers at the end.
Definition at line 781 of file text_window.c.
Referenced by createTextWindow().
| void updateZoomBox | ( | struct ZoomBox * | task | ) |
The zoom box task: starts zoomed out (opening) or in (closing), then draws.
< GTE regards 4096 as 1.0
Definition at line 196 of file talk_box.c.
Referenced by createZoomBox().
A zoom box around a talk box of type type at (x, y)
Definition at line 221 of file talk_box.c.
Referenced by updateTalkBox().
Talk box method: moves the box with its outlines and windows.
Definition at line 241 of file talk_box.c.
Referenced by createTalkBox().
| void updateTalkBox | ( | TalkBox * | task, |
| TalkBoxChildren * | children | ||
| ) |
The talk box task: opens with its outlines, runs the text, then closes and ends.
< SYSTEM03
< SYSTEM04
Definition at line 285 of file talk_box.c.
Referenced by createTalkBox().
| TextWindow * createTextWindow | ( | s16 | id, |
| s16 | type, | ||
| s16 | x, | ||
| s16 | y | ||
| ) |
A text window on a layer, in a font style, at (x, y)
< GTE regards 4096 as 1.0
Definition at line 834 of file text_window.c.
Referenced by CARDGAME_updateDeckWindow(), CARDGAME_updateScreen(), createFieldMenuWindows(), createListMenu(), createMessageBox(), createNameWindows(), createTalkBox(), FIELDSTG_runChoice(), FIELDSTG_showAreaName(), FIGHTSTG_createItemWindows(), FIGHTSTG_createSwitchInWindows(), FIGHTSTG_createSwitchWindows(), FIGHTSTG_createTechWindows(), FIGHTSTG_drawHud(), FIGHTSTG_showCommands(), FIGHTSTG_showConfusedCommands(), FIGHTSTG_showConfusedMessage(), FIGHTSTG_showDigivolveNames(), FIGHTSTG_showFighterNames(), FIGHTSTG_showMessage(), FIGHTSTG_showPageButtons(), FIGHTSTG_showStats(), FIGHTSTG_showTechs(), FIGHTSTG_updateHud(), FIGHTSTG_updateSwitchMenu(), fillEffectLists(), SHOCKTST_updateEditor(), SHOCKTST_updateLoader(), showMenuOptions(), showMenuPageLabel(), showMenuPageTitle(), showMenuTitle(), showPartyTitle(), SOUNDTST_updateSoundTest(), STAGSLCT_showBiosVersion(), STAGSLCT_startStageSelect(), STCRDABM_createWindows(), STCRDDEK_createEditorWindows(), STCRDDEK_createScreenWindows(), STCRDSHP_createBuyWindows(), STCRDSHP_createPackOpenWindows(), STCRDSHP_createShopWindows(), STDGNAME_showMenuWindow(), STFGTREP_createPartnerWindows(), STFGTREP_createWindows(), STGDGLAB_createEntryListWindows(), STGDGLAB_createEntryPanelWindows(), STGDGLAB_createSkillPanelWindows(), STGDGLAB_createSlotScreenWindows(), STGDGLAB_runSlotScreen(), STGDGLAB_showMenuPage(), STGDGLAB_showPartyPage(), STGDGLAB_updateRecipeScreen(), STGMCARD_updateInfo(), STGMCARD_updateMenu(), STGMCARD_updateSaves(), STGTRAIN_createMenuWindows(), STGTRAIN_createResultWindows(), STGTRAIN_createScreenWindows(), STGTRAIN_createSessionWindows(), STITSHOP_createBuyWindows(), STITSHOP_createInfoWindows(), STITSHOP_createItemListWindows(), STITSHOP_createSellWindows(), STITSHOP_createShopWindows(), STPLNMET_createChoiceWindows(), STPLNMET_createConfirmWindows(), STPLNMET_createTabs(), STPLNMET_updateWelcome(), STSTATUS_createCardWindows(), STSTATUS_createDemoWindows(), STSTATUS_createDigivolveWindows(), STSTATUS_createEquipWindows(), STSTATUS_createItemListWindows(), STSTATUS_createItemWindows(), STSTATUS_createSortWindows(), STSTATUS_createStatusWindows(), STSTATUS_createTechWindows(), STSTATUS_updateMapScreen(), updateCursor(), updateEvent1510(), updateEvent1512(), updateEvent1514(), updateEvent1516(), updateEvent1518(), updateEvent1520(), updateEvent9(), updateInn(), updateMenu(), WFIGHTTS_cameraList(), WFIGHTTS_fighterList(), WFIGHTTS_motionList(), and WFIGHTTS_stageList().
| void updateMessageBoxFrame | ( | struct MessageBoxFrame * | task | ) |
The message box frame task: grows, waits with the arrow when asked, then fades out and ends.
< GTE regards 4096 as 1.0
< GTE regards 4096 as 1.0
Definition at line 46 of file message_box.c.
Referenced by createMessageBoxFrame().
| MessageBoxFrame * createMessageBoxFrame | ( | s32 | layerId | ) |
A message box frame on a layer, with the menu sound.
< SYSTEM03
Definition at line 87 of file message_box.c.
Referenced by createMessageBox().
| void updateTalkBoxFrame | ( | TalkBoxFrame * | task | ) |
The talk box frame task: idle until the box opens, then draws the frame and the arrow.
Definition at line 111 of file talk_box.c.
Referenced by createTalkBoxFrame().
| TalkBoxFrame * createTalkBoxFrame | ( | TalkBox * | parent | ) |
The frame of a talk box.
Definition at line 128 of file talk_box.c.
Referenced by createTalkBox().
A message box with string index of a table, typed out in three-line pages.
Definition at line 142 of file message_box.c.
Referenced by FIELDSTG_updateSpeech().
A talk box with string index of a table (an optional speaker's name between 02 07 codes), sized to the text.
Definition at line 359 of file talk_box.c.
Referenced by FIELDSTG_updateSpeech().
| void bindTextTools | ( | TextTools * | obj | ) |
Makes obj the text tools the methods work on.
Definition at line 10 of file text_tools.c.
Referenced by initTextTools().
String index of a string table (a count, then byte offsets from its start), or NULL.
Definition at line 15 of file text_tools.c.
Referenced by initTextTools().
| s32 measureText | ( | TextBuffer * | text, |
| TextStyle * | style, | ||
| s32 | spacing | ||
| ) |
old-style: s16 spacing
| void initTextTools | ( | TextTools * | obj | ) |
Clears a text tools object, gives it its methods and binds it.
Definition at line 193 of file text_tools.c.
Referenced by CARDGAME_drawCenteredText(), createTalkBox(), getName(), initNewGameData(), setName(), showMessageText(), STGMCARD_loadFiles(), textWindowSetRightAlign(), and textWindowSetSubString().
| void convertText | ( | void * | buf, |
| void * | text, | ||
| s32 | mode | ||
| ) |
Converts the string text to buf: mode 0 from font codes to Shift-JIS (a code below 4 is followed by an icon's), mode 1 back.
Not terminated. The Shift-JIS side is a byte buffer written and read a halfword at a time.
Definition at line 134 of file text_tools.c.
Referenced by initTextTools().
| void loadFont | ( | void | ) |
|
extern |
"Null message was passed"
Definition at line 5 of file text_window.c.
Referenced by setTextBuffer().
|
extern |
"Digit: the message's work number is not supported"
Definition at line 8 of file text_window.c.
Referenced by textWindowSetNumber().
|
extern |
"ExtMess: the message's work number is not supported"
Definition at line 12 of file text_window.c.
Referenced by textWindowSetSubText().
|
extern |
"The message is not set"
Definition at line 17 of file text_window.c.
Referenced by textCodeInsert().
|
extern |
The cursor's frames, the last one repeated as it swings back.
Definition at line 119 of file cursor.c.
Referenced by updateCursor().
|
extern |
The buttons a wait for a button (code 2) can wait for.
Definition at line 887 of file text_window.c.
Referenced by updateTextWindow().
|
extern |
decode is declared without a prototype, as callers would truncate the u8 mode, so decodeChar is cast to it
Definition at line 78 of file font.c.
Referenced by createTextWindow(), main(), measureText(), processTextChar(), STDWTITL_tickMovie(), textCodeInsert(), textCodePageBreak(), textWindowDraw(), textWindowInsertPlayerName(), textWindowSetStyle(), and textWindowShowPage().
|
extern |
(obj, text, wait): most handlers take only the first two
(obj, text, wait): most handlers take only the first two
Definition at line 880 of file text_window.c.
Referenced by processTextChar().
|
extern |
The font's Shift-JIS codes of its glyphs and icons, up to 0xFFFF.
Definition at line 202 of file text_tools.c.
Referenced by convertText().
|
extern |
Definition at line 244 of file text_tools.c.
Referenced by convertText().
|
extern |
the three font sizes' glyphs and icons (text_tools.c)
the three font sizes' glyphs and icons (text_tools.c)
Definition at line 272 of file text_tools.c.
|
extern |
Definition at line 431 of file text_tools.c.
|
extern |
Definition at line 512 of file text_tools.c.
|
extern |
Definition at line 671 of file text_tools.c.
|
extern |
Definition at line 752 of file text_tools.c.
|
extern |
Definition at line 911 of file text_tools.c.
|
extern |
Definition at line 422 of file talk_box.c.
Referenced by createTalkBox(), createZoomBox(), drawTalkBoxArrow(), drawTalkBoxFrame(), and talkBoxSetPos().