aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 0ec23c5..0472a95 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -9,7 +9,8 @@
#include "yabs_core.h"
#include "yabs_utils.h"
-static yabs::gameState game_state;
+static yabs::gameState game_state = yabs::TITLE;
+
static yabs::Scene3D sc3d{
// camera
{{5.0f, 5.0f, 5.0f}, {0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, 45.0f, 0},
@@ -80,9 +81,6 @@ int main(void) {
break;
}
case (yabs::GAMEPLAY): {
- while (game_state != yabs::NEXT) {
- yabs::core::draw(game_state, model);
- }
break;
}
case (yabs::NEXT): {
@@ -97,13 +95,14 @@ int main(void) {
BeginDrawing();
ClearBackground(GRAY);
BeginMode3D(sc3d.camera);
+
yabs::core::tick(sc3d);
- yabs::core::draw(game_state, model);
+ yabs::core::draw(model);
+
EndMode3D();
DrawFPS(0, 0);
DrawText("Controls: Mouse / WASD / SPACE/CTRL.", YABS_SCREENWIDTH - 400,
0, 20, DARKGRAY);
-
EndDrawing();
}
UnloadTexture(texture);