Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
start_lerp.inc.c
Go to the documentation of this file.
1
/* Starts moving a value from `from` to `to` over `frames` frames, in 24.8
2
fixed point; nothing when they are the same */
3
void
OVL_NAME
(
startLerp
)(
MenuLerp
*lerp,
s32
from,
s32
to,
s32
frames) {
4
if
(from != to) {
5
lerp->duration = frames;
6
lerp->fixed = from << 8;
7
lerp->value = from;
8
lerp->target = to;
9
lerp->active = 1;
10
lerp->step = ((to - from) << 8) / lerp->duration;
11
}
12
}
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
startLerp
void startLerp(MenuLerp *lerp, s32 from, s32 to, s32 frames)
Starts moving a value from from to to over frames frames, in 24.8 fixed point; nothing when they are ...
Definition
start_lerp.inc.c:3
MenuLerp
Moves a value towards a target in fixed point, as the menu overlays' startLerp and updateLerp do.
Definition
menu.h:27
src
shared
start_lerp.inc.c
Generated by
1.9.8