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

Go to the source code of this file.

Functions

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)
 

Variables

static char CURSOR_TEXT_3 [4] = "\x81\x88"
 The cursor's frames as text, each the code of one of its glyphs in the font.
 
static char CURSOR_TEXT_2 [4] = "\x81\x87"
 
static char CURSOR_TEXT_1 [4] = "\x81\x86"
 
static char CURSOR_TEXT_0 [4] = "\x81\x85"
 
char * CURSOR_FRAMES [5] = { CURSOR_TEXT_0, CURSOR_TEXT_1, CURSOR_TEXT_2, CURSOR_TEXT_3, CURSOR_TEXT_2 }
 The cursor's frames, the last one repeated as it swings back.
 

Function Documentation

◆ cursorSetVisible()

void cursorSetVisible ( Cursor *  task,
s32  visible 
)

Cursor method: shows it (from its first frame) or hides it.

Definition at line 4 of file cursor.c.

Referenced by createCursor().

Here is the caller graph for this function:

◆ cursorSetPos()

void cursorSetPos ( Cursor *  task,
s32  x,
s32  y 
)

Cursor method: moves it.

Definition at line 14 of file cursor.c.

Referenced by createCursor().

Here is the caller graph for this function:

◆ cursorSetPalette()

void cursorSetPalette ( Cursor *  task,
s32  palette 
)

Cursor method: the CLUT row of its glyph.

Definition at line 21 of file cursor.c.

Referenced by createCursor().

Here is the caller graph for this function:

◆ cursorSetIdleDelay()

void cursorSetIdleDelay ( Cursor *  task,
s32  delay 
)

Cursor method: the vsyncs it rests between two swings.

Definition at line 27 of file cursor.c.

Referenced by createCursor().

Here is the caller graph for this function:

◆ cursorSetFrameDelay()

void cursorSetFrameDelay ( Cursor *  task,
s32  delay 
)

Cursor method: the vsyncs of each frame of a swing.

Definition at line 32 of file cursor.c.

Referenced by createCursor().

Here is the caller graph for this function:

◆ cursorSetStill()

void cursorSetStill ( Cursor *  task,
s32  still 
)

Cursor method: keeps it on its first frame.

Definition at line 37 of file cursor.c.

Referenced by createCursor().

Here is the caller graph for this function:

◆ updateCursor()

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

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

◆ createCursor()

Cursor * createCursor ( s16  layerId,
s32  depth,
s16  x,
s16  y 
)

Variable Documentation

◆ CURSOR_TEXT_3

char CURSOR_TEXT_3[4] = "\x81\x88"
static

The cursor's frames as text, each the code of one of its glyphs in the font.

-G8 unit: they are small, so they go to the small data (.sdata)

Definition at line 113 of file cursor.c.

◆ CURSOR_TEXT_2

char CURSOR_TEXT_2[4] = "\x81\x87"
static

Definition at line 114 of file cursor.c.

◆ CURSOR_TEXT_1

char CURSOR_TEXT_1[4] = "\x81\x86"
static

Definition at line 115 of file cursor.c.

◆ CURSOR_TEXT_0

char CURSOR_TEXT_0[4] = "\x81\x85"
static

Definition at line 116 of file cursor.c.

◆ CURSOR_FRAMES

The cursor's frames, the last one repeated as it swings back.

Definition at line 119 of file cursor.c.

Referenced by updateCursor().