This commit is contained in:
wcjbr
2026-08-16 13:34:42 +08:00
parent d36fd6d2ee
commit 07aeced2e4
17 changed files with 40 additions and 40 deletions
+3 -3
View File
@@ -9,11 +9,11 @@
#include <game.hpp>
#include <mesh.hpp>
namespace openceg::render {
namespace boundard::render {
class InputMap;
}
namespace openceg {
namespace boundard {
class Actor {
private:
@@ -109,4 +109,4 @@ class Actor {
void set_mesh(std::shared_ptr<Mesh> mesh) { mesh_ = std::move(mesh); }
};
} // namespace openceg
} // namespace boundard
+3 -3
View File
@@ -7,11 +7,11 @@
#include <actor.hpp>
namespace openceg::render {
namespace boundard::render {
class InputMap;
}
namespace openceg {
namespace boundard {
using ActorInitHandler = std::function<void(Actor&)>;
using ActorTickHandler = std::function<void(Actor&, float, const render::InputMap&)>;
@@ -62,4 +62,4 @@ class BehaviorRegistry {
std::unordered_map<std::string, ActorTickHandler> tick_handlers_;
};
} // namespace openceg
} // namespace boundard
+2 -2
View File
@@ -5,7 +5,7 @@
#include <string>
#include <vector>
namespace openceg {
namespace boundard {
struct WindowConfig {
int width = 800;
@@ -51,4 +51,4 @@ class ConfigLoader {
std::string last_error_;
};
} // namespace openceg
} // namespace boundard
+2 -2
View File
@@ -1,9 +1,9 @@
#pragma once
namespace openceg {
namespace boundard {
// 通用引擎入口:读取 config.ceg,实例化场景并驱动 Actor 的 init/tick。
// 具体游戏行为通过 BehaviorRegistry 注册,因此引擎本身不内置任何游戏逻辑。
int run_engine(int argc, char** argv, const char* default_config_path = "config.ceg");
} // namespace openceg
} // namespace boundard
+2 -2
View File
@@ -1,7 +1,7 @@
#pragma once
#include <cstddef>
namespace openceg {
namespace boundard {
class Game {
private:
size_t id_cnt;
@@ -18,4 +18,4 @@ class Game {
void launch();
size_t new_id();
};
} // namespace openceg
} // namespace boundard
+2 -2
View File
@@ -7,7 +7,7 @@
#include <string>
#include <vector>
namespace openceg {
namespace boundard {
// 渲染组件:描述 Actor 的几何形状、颜色和纹理占位。
class Mesh {
@@ -48,4 +48,4 @@ class Mesh {
std::array<float, 4> color_{1.0F, 1.0F, 1.0F, 1.0F};
};
} // namespace openceg
} // namespace boundard
+2 -2
View File
@@ -13,7 +13,7 @@
#include <actor.hpp>
namespace openceg::render {
namespace boundard::render {
struct InputEvent {
enum class Type {
@@ -136,4 +136,4 @@ class RenderLoop {
std::vector<Actor*> actors_;
};
} // namespace openceg::render
} // namespace boundard::render