From afbd5bae6b5c374e2219862880695aae48b3b578 Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Thu, 26 Feb 2026 09:46:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=A8=A1=E5=9D=97=E5=B9=B6=E6=B8=85=E7=90=86=E4=B8=BB?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frostbite2D/src/main.cpp | 42 ---------------------------------------- 1 file changed, 42 deletions(-) diff --git a/Frostbite2D/src/main.cpp b/Frostbite2D/src/main.cpp index 208625f..06faaf7 100644 --- a/Frostbite2D/src/main.cpp +++ b/Frostbite2D/src/main.cpp @@ -2,51 +2,12 @@ #include #include #include -#include #include #include using namespace frostbite2D; -class TestModule : public Module { -public: - const char* getName() const override { return "TestModule"; } - - void setupModule() override { - SDL_Log("TestModule: setupModule()"); - } - - void onUpdate() override { - static int frameCount = 0; - frameCount++; - - if (frameCount % 120 == 0) { - SDL_Log("TestModule: onUpdate() - Frame %d, FPS: %d", frameCount, Application::get().fps()); - } - - if (frameCount > 600) { - SDL_Log("TestModule: Requesting quit after 600 frames"); - Application::get().quit(); - } - } - - void beforeRender() override { - glClearColor(0.2f, 0.3f, 0.8f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - } - - void onRender() override { - } - - void afterRender() override { - } - - void destroyModule() override { - SDL_Log("TestModule: destroyModule()"); - } -}; - int main(int argc, char **argv) { AppConfig config = AppConfig::createDefault(); config.appName = "Frostbite2D Test App"; @@ -57,9 +18,6 @@ int main(int argc, char **argv) { Application &app = Application::get(); - TestModule testModule; - app.use(testModule); - if (!app.init(config)) { SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to initialize application!"); return -1;