Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
scene.c
Go to the documentation of this file.
1/* STDGNAME's scene: the mode's root task, and the screen fade */
2
4
5/* The mode's root task: sets up the 320x240 display and its black layer, then
6 creates the renaming screen */
7void STDGNAME_updateScene(Task *task, ScreenTask **screen) {
8 RECT rect;
9 Layer *layer;
10
11 switch (task->state) {
12 case TASK_INIT:
13 default:
14 GFX.funcs.reset();
17 rect.x = 0;
18 rect.y = 0;
19 rect.w = 320;
20 rect.h = 240;
21 layer = GFX.funcs.createLayer(&rect, 3, SCREEN_LAYER);
22 layer->setBgColor(layer, 0, 0, 0);
23 *screen = STDGNAME_createScreen();
24 task->nextState(task);
25 break;
26 case TASK_RUN:
27 case TASK_DONE:
28 case TASK_KILL:
29 break;
30 }
31}
32
33/* The mode's entry point (MODE_ENTRY_POINTS): starts the root task */
35 return createTask(STDGNAME_updateScene, sizeof(Task), sizeof(ScreenTask *));
36}
37
41#define FADER_DEPTH 6
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
#define TASK_RUN
Definition task.h:35
#define TASK_KILL
Definition task.h:37
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
Definition task.h:34
#define TASK_DONE
Definition task.h:36
#define SCREEN_WIDTH
The screen the modes draw on (setDisplayMode, their layers' rects)
Definition gfx.h:36
#define SCREEN_HEIGHT
Definition gfx.h:37
#define SCREEN_LAYER
The layer over the whole screen that most modes create first and draw their menus on (FIELDSTG and ST...
Definition gfx.h:45
Task * STDGNAME_start(void)
The mode's entry point (MODE_ENTRY_POINTS): starts the root task.
Definition scene.c:34
void STDGNAME_updateScene(Task *task, ScreenTask **screen)
The mode's root task: sets up the 320x240 display and its black layer, then creates the renaming scre...
Definition scene.c:7
ScreenTask * STDGNAME_createScreen(void)
Creates the renaming screen (task)
Definition screen.c:121
STDGNAME.PRO: the screen where the partners are renamed.
void(* reset)(void)
Definition gfx.h:17
void(* allocPrimBuffers)(s32 size)
Definition gfx.h:18
struct Layer *(* createLayer)(RECT *rect, s32 otShift, s32 id)
Definition gfx.h:24
void(* setDisplayMode)(s32 w, s32 h, s32 hires, s32 interlace)
Definition gfx.h:26
GfxFuncs funcs
Definition gfx.h:77
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
Definition gfx.h:128
void(* setBgColor)()
no prototype: callers would truncate u8 args
Definition gfx.h:152
The screen's controller.
Any task, seen through its header.
Definition task.h:62
void(* nextState)(struct Task *task)
Definition task.h:63
s32 state
Definition task.h:63
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
Definition task.c:105