refactor(core): 重构代码组织结构,将类型定义移至types目录
将核心类型定义从core目录迁移至新创建的types目录,包括: - 基础类型别名(type_alias.h) - 数学相关类型(type_math.h) - 颜色类型(type_color.h) - 窗口配置合并至application.h 删除不再使用的平台配置和旧类型文件 优化头文件包含关系,减少编译依赖
This commit is contained in:
@@ -1,12 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <fostbite2D/core/window.h>
|
||||
#include <fostbite2D/module/module.h>
|
||||
#include <fostbite2D/config/app_config.h>
|
||||
#include <fostbite2D/platform/window.h>
|
||||
#include <fostbite2D/types/type_alias.h>
|
||||
#include <string>
|
||||
|
||||
namespace frostbite2D {
|
||||
|
||||
/**
|
||||
* @brief 应用配置结构体
|
||||
* 仅包含应用级别的配置项,模块配置由各模块自行管理
|
||||
*/
|
||||
struct AppConfig {
|
||||
std::string appName = "frostbite2D App";
|
||||
std::string appVersion = "1.0.0";
|
||||
std::string organization = "frostbite";
|
||||
|
||||
WindowConfig windowConfig;
|
||||
PlatformType targetPlatform = PlatformType::Auto;
|
||||
|
||||
/**
|
||||
* @brief 创建默认配置
|
||||
* @return 默认的应用配置实例
|
||||
*/
|
||||
static AppConfig createDefault() {
|
||||
AppConfig config;
|
||||
config.appName = "Frostbite2D App";
|
||||
config.appVersion = "1.0.0";
|
||||
config.organization = "frostbite";
|
||||
config.targetPlatform = PlatformType::Auto;
|
||||
config.windowConfig = WindowConfig();
|
||||
return config;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief 应用程序类
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user