#include #include #include #include #include #include #include #include #include #include #include // Globals EngineState g_Engine; RaylibAssetLoader asset_loader; int main(){ // int screen_width = 1280; int screen_height = 800; // initialized scene manager SceneManager scene_manager; entt::registry registry; rlImGuiSetup(true); ImGuiStyle& style = ImGui::GetStyle(); // Rounded corners style.WindowRounding = 6.0f; style.ChildRounding = 4.0f; style.FrameRounding = 4.0f; style.PopupRounding = 4.0f; style.ScrollbarRounding = 9.0f; style.GrabRounding = 4.0f; style.TabRounding = 4.0f; // Sizes and Spacing style.WindowPadding = ImVec2(15.0f, 15.0f); style.FramePadding = ImVec2(6.0f, 6.0f); style.ItemSpacing = ImVec2(10.0f, 8.0f); style.ScrollbarSize = 15.0f; SetTargetFPS(60); SetTraceLogLevel(TraceLogLevel::LOG_NONE); InitWindow(screen_width, screen_height, "Bullet bird"); SetWindowState(FLAG_WINDOW_RESIZABLE); while (!WindowShouldClose() && !g_Engine.shouldQuit){ float dt = GetFrameTime(); if (dt > 0.1f) dt = 0.1f; // cap dt just for now scene_manager.update(dt); BeginDrawing(); ClearBackground(RAYWHITE); scene_manager.render(); rlImGuiBegin(); scene_manager.ui(); rlImGuiEnd(); EndDrawing(); scene_manager.process_scene_switch(); // !!! After scene_manager is done with the current loop } CloseWindow(); rlImGuiShutdown(); return 0; }