feat(engine): 重构游戏引擎核心逻辑

- 重新设计了引擎的初始化和运行流程
- 引入了实体组件系统(ECS)和物理系统
- 优化了渲染系统和输入系统
- 移除了不必要的资源管理系统
- 调整了日志系统的实现
This commit is contained in:
ZZY
2025-06-29 18:46:36 +08:00
parent 5ce660e3a6
commit 89bede93a9
37 changed files with 1294 additions and 350 deletions

View File

@@ -54,13 +54,13 @@ struct __ge_kfifo {
*/
#define DECLARE_GE_KFIFO(fifo, type, size, tname) struct tname __STRUCT_GE_KFIFO(type, size) fifo
#define INIT_GE_KFIFO(fifo, type) do { \
#define INIT_GE_KFIFO(fifo) do { \
struct __ge_kfifo *__kfifo = &((fifo)->kfifo); \
__kfifo->in = 0; \
__kfifo->out = 0; \
__kfifo->mask = GE_ARRAY_SIZE((fifo).buf) - 1; \
__kfifo->esize = sizeof(*(fifo).buf); \
__kfifo->data = (fifo).buf; \
__kfifo->mask = GE_ARRAY_SIZE((fifo)->buf) - 1; \
__kfifo->esize = sizeof(*((fifo)->buf)); \
__kfifo->data = (fifo)->buf; \
} while (0)
/**
@@ -173,7 +173,7 @@ struct __ge_kfifo {
#define ge_kfifo_peek(fifo, val) do { \
unsigned int __ret; \
struct __ge_kfifo *__kfifo = &((fifo)->kfifo); \
__ret = !kfifo_is_empty(fifo); \
__ret = !ge_kfifo_is_empty(fifo); \
if (__ret) { \
*val = ((fifo)->buf)[__kfifo->out & __kfifo->mask]; \
/*smp_wmb();*/ \

View File

@@ -14,7 +14,7 @@
#undef GE_ABS
#define GE_ABS(x) ((x) > 0 ? (x) : -(x))
#endif
typedef int ge_unit_t; /**< 坐标值类型定义 */
typedef int32_t ge_unit_t; /**< 坐标值类型定义 */
/**
* @struct ge_vector2_t