Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
talk_box.c File Reference
#include "engine/game.h"
Include dependency graph for talk_box.c:

Go to the source code of this file.

Data Structures

struct  Order4
 
struct  Delays3
 

Functions

void drawTalkBoxArrow (TalkBoxFrame *task)
 Draws a talk box's blinking "next" arrow where its type puts it.
 
void drawTalkBoxFrame (TalkBoxFrame *task)
 Draws a talk box's corner sprites and its semi-transparent panel.
 
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.
 
void drawZoomBox (ZoomBox *task)
 Zooms the outline one frame in or out and draws it as four lines; ends when done.
 
void updateZoomBox (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.
 
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.
 

Variables

const Order4 OUTLINE_ORDER = {{1, 3, 0, 2}}
 The corner of the box each corner's side of the outline goes to.
 
const Delays3 ZOOM_BOX_DELAYS = {{0, 2, 4}}
 The frames before each of the three zoom boxes of an opening or closing.
 
TalkBoxLayout TALK_BOX_LAYOUTS [4]
 

Function Documentation

◆ drawTalkBoxArrow()

void drawTalkBoxArrow ( 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTalkBoxFrame()

void drawTalkBoxFrame ( 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateTalkBoxFrame()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTalkBoxFrame()

TalkBoxFrame * createTalkBoxFrame ( TalkBox *  parent)

The frame of a talk box.

Definition at line 128 of file talk_box.c.

Referenced by createTalkBox().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawZoomBox()

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().

Here is the caller graph for this function:

◆ updateZoomBox()

void updateZoomBox ( 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createZoomBox()

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)

Definition at line 221 of file talk_box.c.

Referenced by updateTalkBox().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ talkBoxSetPos()

void talkBoxSetPos ( TalkBox *  task,
s32  x,
s32  y 
)

Talk box method: moves the box with its outlines and windows.

Definition at line 241 of file talk_box.c.

Referenced by createTalkBox().

Here is the caller graph for this function:

◆ updateTalkBox()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createTalkBox()

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.

Definition at line 359 of file talk_box.c.

Referenced by FIELDSTG_updateSpeech().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ OUTLINE_ORDER

const Order4 OUTLINE_ORDER = {{1, 3, 0, 2}}

The corner of the box each corner's side of the outline goes to.

Definition at line 140 of file talk_box.c.

Referenced by drawZoomBox().

◆ ZOOM_BOX_DELAYS

const Delays3 ZOOM_BOX_DELAYS = {{0, 2, 4}}

The frames before each of the three zoom boxes of an opening or closing.

Definition at line 282 of file talk_box.c.

Referenced by updateTalkBox().

◆ TALK_BOX_LAYOUTS

TalkBoxLayout TALK_BOX_LAYOUTS[4]
Initial value:
= {
{ 3, { 0, -16 }, { 0, -74 }, { 16, -74 }, { 16, -74 }, 6, -71, 6, -58, { 16, -38 } },
{ 5, { 0, 0 }, { 0, 12 }, { 16, 12 }, { 16, 12 }, 6, 15, 6, 28, { 16, 48 } },
{ 4, { -16, -16 }, { -26, -74 }, { -10, -74 }, { 125, -74 }, -20, -71, -20, -58, { 125, -38 } },
{ 6, { -20, 0 }, { -26, 12 }, { -10, 12 }, { 125, 12 }, -20, 15, -20, 28, { 125, 48 } },
}

Definition at line 422 of file talk_box.c.

Referenced by createTalkBox(), createZoomBox(), drawTalkBoxArrow(), drawTalkBoxFrame(), and talkBoxSetPos().