16 if (task->
type == 2 || task->
type == 3) {
21 if (task->
type == 0 || task->
type == 2) {
36 switch (task->
state) {
53 talkBox->
setPos(talkBox, newPos.
x, newPos.
y);
109 switch (task->
type) {
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
#define FIELD_LAYER_TEXT
the message and talk boxes
FIELDSTG.PRO: the field mode, where the player walks around the map.
void(* FIELDSTG_scriptHelpers[])()
the script helpers (FIELDSTG_toScreenPos...)
FieldState FIELDSTG_state
FileCache FILE_CACHE
The file cache.
Task * createMessageBox(s32 layerId, void *strings, s32 index)
A message box with string index of a table, typed out in three-line pages.
Speech * FIELDSTG_createTalk(Actor *actor, s32 entry)
Creates the talk box of an actor's text entry, on the side of the screen away from where it faces and...
void FIELDSTG_updateSpeech(Speech *task, void **box)
A speech's update: opens its message box or talk box, moves the talk box with its actor,...
void FIELDSTG_getSpeechPos(Speech *task, Vec2 *out)
Where a talk box goes: beside its actor's head on the screen, on the side its type says.
Speech * FIELDSTG_createSpeech(Actor *actor, s32 entry, s32 type, s32 isMessage)
Creates the speech of an event's text entry: a message box, or a talk box of a type.
A character on the field (FIELDSTG_createActor): the player (kind 0) and the other characters.
s32 eventText
the running event's text file and entry
s32 textFile
the stage's text file, for the talks
void *(* getEntry)(u32 fileAndIndex)
A message box, or a talk box that follows an actor (FIELDSTG_createSpeech, FIELDSTG_createTalk)
s32 isMessage
a message box
s32 type
the talk box's (createTalkBox), its corner
void(* setState)(struct Speech *task, s32 state)
void(* nextState)(struct Speech *task)
s32 entry
the text's entry
void * text
FILE_CACHE.getEntry's.
A box with a speaker's name and a message (createTalkBox).
void(* setPos)(struct TalkBox *box, s32 x, s32 y)
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),...
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find