Files
school_stm32/game_engine/physics/ge_collison.h
ZZY 5ce660e3a6 feat(game): 添加基础游戏引擎和渲染模块
- 新增游戏引擎核心模块,包括初始化和运行逻辑
- 实现基本的渲染功能,支持控制台输出
- 添加物理引擎基础,包括碰撞检测
- 集成日志系统,用于调试和信息输出
- 创建窗口和输入管理模块
2025-06-24 02:16:01 +08:00

28 lines
963 B
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// // 在 ge_common.h 中定义通用碰撞类型
// typedef enum ge_collision_type {
// GE_COLLISION_TYPE_BOX, // 实体间碰撞
// GE_COLLISION_TYPE_TILEMAP // 实体与瓦片地图碰撞
// } ge_collision_type_t;
// // 通用碰撞数据结构
// typedef struct {
// ge_collision_type_t type;
// void* entityA; // 主要实体(通常是被检测的实体)
// void* entityB; // 对于BOX碰撞这是另一个实体对于TILEMAP这是瓦片地图
// ge_vector2i_t collision_point;
// union {
// struct {
// int tile_x;
// int tile_y;
// } tilemap_data; // 瓦片地图碰撞特有数据
// struct {
// // 可以添加实体间碰撞特有数据
// } box_data;
// } specific;
// } ge_collision_event_t;
// // 碰撞回调函数类型
// typedef void (*ge_collision_callback_t)(ge_collision_event_t* event);