Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
start_fade.inc.c
Go to the documentation of this file.
1#ifndef START_FADE
2#define START_FADE OVL_NAME(startFade)
3#endif
4/* Starts opening (fadeIn) or closing a menu panel, with its sound: its level
5 goes 0 -> ONE in `duration` frames, and back at twice the speed. The name
6 entry has a copy of its own, which it names with START_FADE */
7void START_FADE(PanelAnim *fade, s32 fadeIn) {
8 fade->active = 1;
9 if (fadeIn != 0) {
11 fade->level = 0;
12 fade->step = ONE / fade->duration;
13 } else {
15 fade->level = ONE;
16 fade->step = -((ONE / fade->duration) * 2);
17 }
18}
19#undef START_FADE
signed int s32
Definition common.h:11
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
Definition sound.c:180
#define SOUND_MENU_CLOSE
SYSTEM04.
Definition sound.h:42
#define SOUND_MENU_OPEN
SYSTEM03.
Definition sound.h:41
#define START_FADE
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
Definition menu.h:18
s32 step
Definition menu.h:20
s32 level
Definition menu.h:21
s32 active
Definition menu.h:22
s32 duration
Definition menu.h:19
short(* playSound)(s32 id)
returns the voice of a key-on
Definition sound.h:187