Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
update_lerp.inc.c
Go to the documentation of this file.
1
/* Moves the value one frame on: 1 once it has reached the target */
2
s32
OVL_NAME
(
updateLerp
)(
MenuLerp
*lerp) {
3
if
(lerp->active == 0) {
4
return
1;
5
}
6
lerp->fixed += lerp->step;
7
lerp->value = lerp->fixed >> 8;
8
if
(lerp->step > 0) {
9
if
(lerp->target < lerp->value) {
10
lerp->value = lerp->target;
11
lerp->active = 0;
12
return
1;
13
}
14
}
else
if
(lerp->value < lerp->target) {
15
lerp->value = lerp->target;
16
lerp->active = 0;
17
return
1;
18
}
19
return
0;
20
}
OVL_NAME
#define OVL_NAME(name)
The name of this overlay's copy of a function of src/shared/.
Definition
battle_mode.h:26
s32
signed int s32
Definition
common.h:11
MenuLerp
Moves a value towards a target in fixed point, as the menu overlays' startLerp and updateLerp do.
Definition
menu.h:27
updateLerp
s32 updateLerp(MenuLerp *lerp)
Moves the value one frame on: 1 once it has reached the target.
Definition
update_lerp.inc.c:2
src
shared
update_lerp.inc.c
Generated by
1.9.8