|
Digimon World 3 decomp
The European version, SLES_039.36
|
#include "engine/game.h"Go to the source code of this file.
Functions | |
| void | setTextBuffer (TextWindow *obj, 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 | 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 | textWindowSetSubString (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 | textWindowDraw (TextWindow *obj) |
| Text window method: draws the visible part of the text as sprites, running the control codes. | |
| 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 | textWindowSetTypeDelay (TextWindow *obj, s32 delay) |
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, u8 blend) |
| Text window method: the glyphs' blending. | |
| void | textWindowSetSpacing (TextWindow *obj, s16 x, s16 y) |
| Text window method: a fixed advance and line height (0, 0: the style's) | |
| void | textWindowSetVisible (TextWindow *obj, u8 visible) |
| Text window method: shows or hides the window (an empty text stays hidden) | |
| void | textWindowSetRightAlign (TextWindow *obj, u8 type) |
| Text window method: aligns the text to its right end, or back to the left. | |
| 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, u8 lines) |
| Text window method: the lines of a page. | |
| void | textWindowSetUnusedC4 (TextWindow *obj, u8 value) |
| Text window method: sets unusedC4, which nothing reads. | |
| 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) | |
| 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. | |
| TextWindow * | createTextWindow (s16 layerId, s16 style, s16 x, s16 y) |
| A text window on a layer, in a font style, at (x, y) | |
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" | |
| s32(* | TEXT_CODE_HANDLERS [11])() |
| The handlers of the control codes 0x02 <code> (processTextChar) | |
| s32 | TEXT_WAIT_BUTTONS [5] = { 13 , 12 , 13 , 14 , 15 } |
| The buttons a wait for a button (code 2) can wait for. | |
| void setTextBuffer | ( | TextWindow * | obj, |
| 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 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 textWindowSetSubString | ( | 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 textWindowDraw | ( | 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().
| 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 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, |
| u8 | blend | ||
| ) |
Text window method: the glyphs' blending.
An old-style definition, as TextWindow.setBlend's unprototyped callers suit: they pass an int, which it takes as a byte. setSpacing, setRightAlign, setLines and setUnusedC4 are old-style for the same reason.
Definition at line 425 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetSpacing | ( | TextWindow * | obj, |
| s16 | x, | ||
| s16 | y | ||
| ) |
Text window method: a fixed advance and line height (0, 0: the style's)
Definition at line 433 of file text_window.c.
Referenced by createTextWindow().
| 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, |
| u8 | type | ||
| ) |
Text window method: aligns the text to its right end, or back to the left.
Definition at line 459 of file text_window.c.
Referenced by createTextWindow().
| 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, |
| u8 | lines | ||
| ) |
Text window method: the lines of a page.
Definition at line 541 of file text_window.c.
Referenced by createTextWindow().
| void textWindowSetUnusedC4 | ( | TextWindow * | obj, |
| u8 | value | ||
| ) |
Text window method: sets unusedC4, which nothing reads.
Definition at line 549 of file text_window.c.
Referenced by createTextWindow().
| 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().
| 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().
| TextWindow * createTextWindow | ( | s16 | layerId, |
| s16 | style, | ||
| 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().
| const char STR_NULL_MESSAGE[] |
"Null message was passed"
Definition at line 5 of file text_window.c.
Referenced by setTextBuffer().
| const char STR_BAD_DIGIT_BUFFER[] |
"Digit: the message's work number is not supported"
Definition at line 8 of file text_window.c.
Referenced by textWindowSetNumber().
| const char STR_BAD_EXT_BUFFER[] |
"ExtMess: the message's work number is not supported"
Definition at line 12 of file text_window.c.
Referenced by textWindowSetSubText().
| const char STR_MESSAGE_NOT_SET[] |
"The message is not set"
Definition at line 17 of file text_window.c.
Referenced by textCodeInsert().
| s32(* TEXT_CODE_HANDLERS[11])() | ( | ) |
The handlers of the control codes 0x02 <code> (processTextChar)
(obj, text, wait): most handlers take only the first two
Definition at line 880 of file text_window.c.
Referenced by processTextChar().
| s32 TEXT_WAIT_BUTTONS[5] = { 13 , 12 , 13 , 14 , 15 } |
The buttons a wait for a button (code 2) can wait for.
Definition at line 887 of file text_window.c.
Referenced by updateTextWindow().