mirror of
https://gitlab.com/drummyfish/anarch.git
synced 2024-11-21 16:35:08 -05:00
Move wrong init
This commit is contained in:
parent
15c900cdac
commit
b236900a14
4
game.h
4
game.h
@ -1320,8 +1320,6 @@ void SFG_initPlayer()
|
|||||||
{
|
{
|
||||||
RCL_initCamera(&SFG_player.camera);
|
RCL_initCamera(&SFG_player.camera);
|
||||||
|
|
||||||
SFG_game.frameTime = SFG_getTimeMs();
|
|
||||||
|
|
||||||
SFG_player.camera.resolution.x =
|
SFG_player.camera.resolution.x =
|
||||||
SFG_GAME_RESOLUTION_X / SFG_RAYCASTING_SUBSAMPLE;
|
SFG_GAME_RESOLUTION_X / SFG_RAYCASTING_SUBSAMPLE;
|
||||||
|
|
||||||
@ -1632,6 +1630,7 @@ void SFG_init()
|
|||||||
SFG_LOG("initializing game")
|
SFG_LOG("initializing game")
|
||||||
|
|
||||||
SFG_game.frame = 0;
|
SFG_game.frame = 0;
|
||||||
|
SFG_game.frameTime = 0;
|
||||||
SFG_game.currentRandom = 0;
|
SFG_game.currentRandom = 0;
|
||||||
SFG_game.continues = 1;
|
SFG_game.continues = 1;
|
||||||
|
|
||||||
@ -4763,6 +4762,7 @@ uint8_t SFG_mainLoopBody()
|
|||||||
Each game logic (physics) frame is performed with the SFG_MS_PER_FRAME
|
Each game logic (physics) frame is performed with the SFG_MS_PER_FRAME
|
||||||
delta time. */
|
delta time. */
|
||||||
uint32_t timeNow = SFG_getTimeMs();
|
uint32_t timeNow = SFG_getTimeMs();
|
||||||
|
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user