-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain Test Scene.cpp
More file actions
43 lines (33 loc) · 1.19 KB
/
Main Test Scene.cpp
File metadata and controls
43 lines (33 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "FelissCore/Logger.h"
#include "FelissCore/FileSystem.h"
#include "FelissRenderer/FelissRenderer.h"
#include "SceneSystem.h"
#include "SceneSerializer.h"
class PhysicsWorld {
public:
void AddBody(EntityID id, const float* pos, float mass, bool isStatic) {
FelissCore::Logger::Info("[Physics] Added Body ID: " + std::to_string(id) +
" Mass: " + std::to_string(mass) + (isStatic ? " [Static]" : ""));
}
};
namespace FelissRenderer {
void Renderer::RegisterMesh(EntityID id, const std::string& path) {
FelissCore::Logger::Info("[Render] Registered Mesh ID: " + std::to_string(id) + " -> " + path);
}
}
int main() {
using namespace FelissCore;
using namespace FelissRenderer;
Logger::Log("FelissEngine Scene Test...");
if (!FileSystem::Exists("../test_scene.json")) {
Logger::Error("Missing scene file: ../test_scene.json");
return -1;
}
Scene scene;
SceneSerializer::LoadScene(scene, "../test_scene.json");
Renderer renderer;
PhysicsWorld physics;
scene.DispatchToRenderAndPhysics(&renderer, &physics);
Logger::Log("Scene load + dispatch completed.");
return 0;
}