Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
update_fade.inc.c
Go to the documentation of this file.
1
#ifndef UPDATE_FADE
2
#define UPDATE_FADE OVL_NAME(updateFade)
3
#endif
4
/* Moves a panel's opening or closing one frame on: 1 once it is fully open or
5
closed. The name entry has a copy of its own, which it names with
6
UPDATE_FADE */
7
s32
UPDATE_FADE
(
PanelAnim
*fade) {
8
if
(fade->
active
== 0) {
9
return
1;
10
}
11
fade->
level
+= fade->
step
;
12
if
(fade->
step
> 0) {
13
if
(fade->
level
> ONE) {
14
fade->
level
= ONE;
15
fade->
active
= 0;
16
return
1;
17
}
18
}
else
if
(fade->
level
< 0) {
19
fade->
level
= 0;
20
fade->
active
= 0;
21
return
1;
22
}
23
return
0;
24
}
25
#undef UPDATE_FADE
s32
signed int s32
Definition
common.h:11
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
UPDATE_FADE
#define UPDATE_FADE
Definition
update_fade.inc.c:2
src
shared
update_fade.inc.c
Generated by
1.9.8