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 */
7
void
START_FADE
(
PanelAnim
*fade,
s32
fadeIn) {
8
fade->
active
= 1;
9
if
(fadeIn != 0) {
10
SOUND
.
playSound
(
SOUND_MENU_OPEN
);
11
fade->
level
= 0;
12
fade->
step
= ONE / fade->
duration
;
13
}
else
{
14
SOUND
.
playSound
(
SOUND_MENU_CLOSE
);
15
fade->
level
= ONE;
16
fade->
step
= -((ONE / fade->
duration
) * 2);
17
}
18
}
19
#undef START_FADE
s32
signed int s32
Definition
common.h:11
SOUND
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
SOUND_MENU_CLOSE
#define SOUND_MENU_CLOSE
SYSTEM04.
Definition
sound.h:42
SOUND_MENU_OPEN
#define SOUND_MENU_OPEN
SYSTEM03.
Definition
sound.h:41
START_FADE
#define START_FADE
Definition
start_fade.inc.c:2
PanelAnim
Opens or closes a menu panel: level goes 0 -> ONE in duration frames (or back at twice the speed),...
Definition
menu.h:18
PanelAnim::step
s32 step
Definition
menu.h:20
PanelAnim::level
s32 level
Definition
menu.h:21
PanelAnim::active
s32 active
Definition
menu.h:22
PanelAnim::duration
s32 duration
Definition
menu.h:19
SoundState::playSound
short(* playSound)(s32 id)
returns the voice of a key-on
Definition
sound.h:187
src
shared
start_fade.inc.c
Generated by
1.9.8