Skip to content

Commit 37c993b

Browse files
committed
Build bump to v1.0.1
- + some fixes
1 parent e64d19c commit 37c993b

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.30...4.0.1)
22
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1)
33

44
set(CMAKE_CXX_COMPILER_LAUNCHER sccache)
5-
project("game" VERSION 1.0.0 LANGUAGES C CXX)
5+
project("game" VERSION 1.0.1 LANGUAGES C CXX)
66

77
# Include configuration
88
include(cmake/options.cmake)

cmake/options.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ else()
3232
# Release/RelWithDebInfo: thin LTO
3333
set(CMAKE_EXE_LINKER_FLAGS "-fuse-ld=mold -static-libgcc -static-libstdc++")
3434
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
35-
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto=thin")
3635
endif()
3736

3837
# ==== Tracy warnings ====

src/main.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#include "game/ecs/systems/temporal_camera_system.hpp"
5151
#include "graphics/renderer/framebuffer_manager.hpp"
5252

53-
u8 nbFrames = 0;
53+
std::uint64_t nbFrames = 0;
5454
f32 deltaTime = 0.0f;
5555
f32 lastFrame = 0.0f;
5656
b8 renderUI = true;
@@ -343,10 +343,13 @@ int main()
343343
fb_player.setFloat("near_plane", cam->near_plane);
344344
fb_player.setFloat("far_plane", cam->far_plane);
345345
fb_player.setFloat("scale", scale);
346-
} else if (camera == debug_cam) {
346+
}
347+
#if defined(DEBUG)
348+
else if (camera == debug_cam) {
347349
fb_debug.setFloat("near_plane", cam->near_plane);
348350
fb_debug.setFloat("far_plane", cam->far_plane);
349351
}
352+
#endif
350353
if (input.isPressed(GLFW_KEY_UP))
351354
scale+=0.01f;
352355
if (input.isPressed(GLFW_KEY_DOWN))
@@ -361,9 +364,12 @@ int main()
361364
toggle = !toggle; // flip toggle
362365
if (camera == player.getCamera()) {
363366
fb_player.setInt("toggle", toggle ? 1 : 0);
364-
} else if (camera == debug_cam) {
367+
}
368+
#if defined(DEBUG)
369+
else if (camera == debug_cam) {
365370
fb_debug.setInt("toggle", toggle ? 1 : 0);
366371
}
372+
#endif
367373
}
368374

369375
was_pressed = pressed; // remember state for next frame
@@ -489,7 +495,9 @@ int main()
489495
movement_intent_system(ecs, camera);
490496
movement_physics_system(ecs, manager, deltaTime);
491497
camera_controller_system(ecs, player.getSelf());
498+
#if defined(DEBUG)
492499
debug_camera_system(ecs, deltaTime);
500+
#endif
493501
camera_system(ecs);
494502
frustum_volume_system(ecs);
495503

@@ -612,11 +620,14 @@ int main()
612620
fb_player.setInt("color", 0);
613621
fb_player.setInt("depth", 1);
614622
fb_player.use();
615-
} else if (camera == debug_cam) {
623+
}
624+
#if defined(DEBUG)
625+
else if (camera == debug_cam) {
616626
fb_debug.setInt("color", 0);
617627
fb_debug.setInt("depth", 1);
618628
fb_debug.use();
619629
}
630+
#endif
620631

621632
// NOTE: Make sure to have a VAO bound when making this draw call!!
622633
DrawArraysWrapper(GL_TRIANGLES, 0, 3);
@@ -796,6 +807,7 @@ int main()
796807
#if defined(TRACY_ENABLE)
797808
FrameMark;
798809
#endif
810+
nbFrames++;
799811
}
800812

801813

0 commit comments

Comments
 (0)