refactor: 重构项目结构和资源管理

- 将主程序代码和资源文件移动到Game目录下
- 更新构建脚本以适配新的目录结构
- 重构应用初始化流程,移除冗余代码
- 更新着色器文件路径和资源管理逻辑
- 删除废弃的windows.lua构建脚本
- 优化Switch平台构建配置
This commit is contained in:
2026-03-16 02:45:52 +08:00
parent f8c2c26cdc
commit 092a28c30e
18 changed files with 82 additions and 181 deletions

34
Game/src/main.cpp Normal file
View File

@@ -0,0 +1,34 @@
#include "SDL_log.h"
#include <SDL2/SDL.h>
#include <frostbite2D/core/application.h>
#include <frostbite2D/core/window.h>
#include <frostbite2D/graphics/renderer.h>
#include <frostbite2D/graphics/texture.h>
#include <glad/glad.h>
using namespace frostbite2D;
int main(int argc, char **argv) {
AppConfig config = AppConfig::createDefault();
config.appName = "Frostbite2D Test App";
config.appVersion = "1.0.0";
config.windowConfig.width = 800;
config.windowConfig.height = 600;
config.windowConfig.title = "Frostbite2D - Renderer Test";
Application& app = Application::get();
if (!app.init(config)) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Failed to initialize application!");
return -1;
}
SDL_Log("Starting main loop...");
app.run();
app.shutdown();
SDL_Log("Application exited normally");
return 0;
}