Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
update_fader.inc.c
Go to the documentation of this file.
1/* The screen fade's task: once started, moves the level one frame on and
2 draws it; TASK_DONE at the end, still drawn */
4 switch (task->state) {
5 case TASK_INIT:
6 default:
7 task->nextState(task);
8 break;
9 case TASK_RUN:
10 if (task->substate == 0) {
11 break;
12 }
13 task->level += task->levelStep;
14 if (task->fadeIn == 0) {
15 if (task->level > FADE_LEVEL_MAX) {
16 task->level = FADE_LEVEL_MAX;
17 task->state = TASK_DONE;
18 }
19 } else if (task->level < 0) {
20 task->level = 0;
21 task->state = TASK_DONE;
22 }
23 /* fallthrough */
24 case TASK_DONE:
25 OVL_NAME(drawFader)(task);
26 break;
27 case TASK_KILL:
28 break;
29 }
30}
#define OVL_NAME(name)
The name of this overlay's copy of a function of src/shared/.
Definition battle_mode.h:26
void drawFader(ScreenFade *task)
Darkens the whole screen by the fade's level: a POLY_F4 with subtractive blending (tpage 0xE1000245)
#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 FADE_LEVEL_MAX
ScreenFade.level when the screen is black: 0xFF in 8.8 fixed point.
Definition gfx.h:358
Fades the whole screen to black and back with a subtractive rectangle.
Definition gfx.h:361
void updateFader(ScreenFade *task)
The screen fade's task: once started, moves the level one frame on and draws it; TASK_DONE at the end...