mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-23 17:32:16 -05:00
Move wrong init
This commit is contained in:
parent
b236900a14
commit
cf46b52180
4
game.h
4
game.h
@ -4763,6 +4763,10 @@ uint8_t SFG_mainLoopBody()
|
|||||||
delta time. */
|
delta time. */
|
||||||
uint32_t timeNow = SFG_getTimeMs();
|
uint32_t timeNow = SFG_getTimeMs();
|
||||||
|
|
||||||
|
#if SFG_TIME_MULTIPLIER != 1024
|
||||||
|
timeNow = (timeNow * SFG_TIME_MULTIPLIER) / 1024;
|
||||||
|
#endif
|
||||||
|
|
||||||
int32_t timeSinceLastFrame = timeNow - SFG_game.frameTime;
|
int32_t timeSinceLastFrame = timeNow - SFG_game.frameTime;
|
||||||
|
|
||||||
if (timeSinceLastFrame >= SFG_MS_PER_FRAME)
|
if (timeSinceLastFrame >= SFG_MS_PER_FRAME)
|
||||||
|
15
settings.h
15
settings.h
@ -19,6 +19,15 @@
|
|||||||
#ifndef _SFG_SETTINGS_H
|
#ifndef _SFG_SETTINGS_H
|
||||||
#define _SFG_SETTINGS_H
|
#define _SFG_SETTINGS_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
Time multiplier in SFG_Units (1.0 == 1024). This can be used to slow down or
|
||||||
|
speed up the game.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef SFG_TIME_MULTIPLIER
|
||||||
|
#define SFG_TIME_MULTIPLIER 1024
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Target FPS (frames per second). This sets the game logic FPS and will try to
|
Target FPS (frames per second). This sets the game logic FPS and will try to
|
||||||
render at the same rate. If such fast rendering can't be achieved, frames will
|
render at the same rate. If such fast rendering can't be achieved, frames will
|
||||||
@ -34,6 +43,12 @@
|
|||||||
#define SFG_FPS 60
|
#define SFG_FPS 60
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SFG_FPS ((SFG_FPS * SFG_TIME_MULTIPLIER) / 1024)
|
||||||
|
|
||||||
|
#if SFG_FPS == 0
|
||||||
|
#define SFG_FPS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
On platforms with mouse this sets its horizontal sensitivity. 128 means 1
|
On platforms with mouse this sets its horizontal sensitivity. 128 means 1
|
||||||
RCL_Unit per mouse pixel travelled.
|
RCL_Unit per mouse pixel travelled.
|
||||||
|
Loading…
Reference in New Issue
Block a user