Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
speed.c
Go to the documentation of this file.
1/* FIGHTSTG's battle speed. */
2
4
5/* How many frames the battle moves on this frame by its speed mode: as many
6 as went by, none, a quarter of them or twice as many */
9 s32 time;
10
11 switch (speed->mode) {
12 case 0:
13 default:
15 break;
16 case 1:
18 break;
19 case 2:
20 time = GFX.funcs.getFrameTime();
22 speed->rest += time;
23 while (speed->rest > 4) {
25 speed->rest -= 4;
26 }
27 break;
28 case 3:
30 break;
31 }
32}
33
34/* Sets the battle's speed mode and counts this frame again */
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
Definition battle.c:16
FIGHTSTG.PRO: the battle.
signed int s32
Definition common.h:11
GfxState GFX
GFX: the graphics state and its methods.
Definition display.c:209
void FIGHTSTG_countFrames(void)
How many frames the battle moves on this frame by its speed mode: as many as went by,...
Definition speed.c:7
void FIGHTSTG_setSpeed(s32 mode)
Sets the battle's speed mode and counts this frame again.
Definition speed.c:35
How the battle's frames go by (FIGHTSTG_setSpeed sets it)
Definition battle.h:211
s32 rest
the time mode 2 hasn't counted yet
Definition battle.h:213
s32 mode
1: stopped, 2: slowed (a frame per 4 of time), 3: double
Definition battle.h:212
s32 frames
since the last update
Definition battle.h:239
BattleSpeed speed
Definition battle.h:241
s32(* getFrameTime)(void)
Definition gfx.h:32
GfxFuncs funcs
Definition gfx.h:77