wip procgen
This commit is contained in:
parent
a653eae745
commit
79a678f162
18 changed files with 1317 additions and 127 deletions
11
src/pxl8.c
11
src/pxl8.c
|
|
@ -147,6 +147,17 @@ pxl8_game_result pxl8_update(pxl8_game* game) {
|
|||
game->last_time = current_time;
|
||||
game->time += dt;
|
||||
|
||||
game->fps_accumulator += dt;
|
||||
game->fps_frame_count++;
|
||||
if (game->fps_accumulator >= 1.0f) {
|
||||
game->fps = (f32)game->fps_frame_count / game->fps_accumulator;
|
||||
if (!game->repl_mode) {
|
||||
pxl8_debug("FPS: %.1f (%.2fms)", game->fps, (game->fps_accumulator / game->fps_frame_count) * 1000.0f);
|
||||
}
|
||||
game->fps_accumulator = 0.0f;
|
||||
game->fps_frame_count = 0;
|
||||
}
|
||||
|
||||
pxl8_script_check_reload(game->script);
|
||||
|
||||
if (game->repl_mode && !game->repl_started) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue