Lock FPS to 60 in replay mode

isolation_bkp/dynres
Dominik Madarász 2021-10-27 02:42:54 +02:00
parent 01315fb75d
commit 7d5c519e2f
2 changed files with 5 additions and 4 deletions

View File

@ -115,6 +115,7 @@ void debug_replay_start(void) {
zpl_array_init_reserve(records, zpl_heap(), UINT16_MAX);
last_record_time = zpl_time_rel_ms();
SetTargetFPS(60);
}
void debug_replay_clear(void) {
@ -125,6 +126,7 @@ void debug_replay_clear(void) {
}
void debug_replay_cleanup_ents(void) {
SetTargetFPS(0);
if (!mime) return;
entity_despawn(mime);
@ -165,6 +167,7 @@ void debug_replay_run(void) {
ecs_set(world_ecs(), mime, Inventory, {0});
camera_set_follow(mime);
SetTargetFPS(60);
}
void ActPlaceIceRink(void);

View File

@ -104,12 +104,10 @@ void renderer_init_3d(void) {
render_camera_3d.up = (Vector3){0.0f,0.0f,-1.0f};
render_camera_3d.fovy = 45.f;
render_camera_3d.projection = CAMERA_PERSPECTIVE;
#if 1
SetCameraMode(render_camera_3d, CAMERA_MODE_STATIONARY);
#else
#if 0
SetCameraMode(render_camera_3d, CAMERA_ORBITAL);
render_camera_3d.position = (Vector3){10,10,10};
render_camera_3d.target = (Vector3){0};
SetCameraMode(render_camera_3d, CAMERA_ORBITAL);
#endif
// NOTE(zaklaus): Paint the screen before we load the game