36 lines
913 B
C++
36 lines
913 B
C++
#include "raylib.h"
|
|
#include "core/Game.hpp"
|
|
#include "debug/DebugSystem.hpp"
|
|
|
|
int main(int argc, char* argv[]) {
|
|
dnr::DebugSystem::get().parseArgs(argc, argv);
|
|
const auto& debugConfig = dnr::DebugSystem::get().getConfig();
|
|
|
|
const int screenWidth = 1280;
|
|
const int screenHeight = 720;
|
|
|
|
if (!debugConfig.turboMode) {
|
|
SetConfigFlags(FLAG_VSYNC_HINT);
|
|
}
|
|
InitWindow(screenWidth, screenHeight, "DoorNroll // Cyber-Revolver Cyberspace Crawler");
|
|
SetExitKey(KEY_NULL); // Prevent ESC from closing the game window
|
|
|
|
if (debugConfig.turboMode) {
|
|
SetTargetFPS(0);
|
|
} else {
|
|
SetTargetFPS(60);
|
|
}
|
|
|
|
dnr::Game game;
|
|
game.init();
|
|
|
|
while (!game.shouldClose()) {
|
|
float dt = GetFrameTime();
|
|
if (dt > 0.1f) dt = 0.1f; // Clamp delta time on frame lag
|
|
game.update(dt);
|
|
game.draw();
|
|
}
|
|
|
|
CloseWindow();
|
|
return 0;
|
|
}
|