@@ -16,7 +16,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Sanitize OR CMAKE_BUILD_TYPE STREQUAL "") | |||
add_link_options(-fsanitize=address -fsanitize=undefined) | |||
elseif(CMAKE_BUILD_TYPE STREQUAL Debug) | |||
message(STATUS "Build mode: Debug") | |||
add_compile_options(-g -Og) | |||
add_compile_options(-g -O0) | |||
elseif(CMAKE_BUILD_TYPE STREQUAL Profile) | |||
message(STATUS "Build mode: Profile") | |||
add_compile_options(-g -Og -pg) |
@@ -164,9 +164,9 @@ int main(int argc, char **argv) { | |||
// Complex case: run multiple steps this iteration | |||
} else { | |||
int count = (int)ceilf(dt / (1/30.0)); | |||
int count = (int)ceil(dt / (1/30.0)); | |||
pcounter.countGameUpdatesPerFrame(count); | |||
float delta = dt / count; | |||
float delta = dt / (float)count; | |||
info << "Delta time " << dt << "s. Running " << count << " updates in one frame, with a delta as if we had " << 1.0 / delta << " FPS."; | |||
for (int i = 0; i < count; ++i) | |||
game.update(delta); |