remove entt test code

This commit is contained in:
MihailRis 2024-06-11 22:19:00 +03:00
parent fb998ddd5d
commit e07ddaee38

View File

@ -10,44 +10,9 @@
static debug::Logger logger("main");
#include <entt/entt.hpp>
struct position {
float x;
float y;
};
struct velocity {
float dx;
float dy;
};
void update(entt::registry &registry) {
auto view = registry.view<const position, velocity>();
view.each([](const auto &pos, const auto &vel) {
logger.info() << pos.x << "," << pos.y << " - " << vel.dx << ", " << vel.dy;
});
}
int entt_test() {
entt::registry registry;
for(auto i = 0u; i < 10u; ++i) {
const auto entity = registry.create();
registry.emplace<position>(entity, i * 1.f, i * 1.f);
if(i % 2 == 0) { registry.emplace<velocity>(entity, i * .1f, i * .1f); }
}
update(registry);
return EXIT_SUCCESS;
}
int main(int argc, char** argv) {
debug::Logger::init("latest.log");
return entt_test();
EnginePaths paths;
if (!parse_cmdline(argc, argv, paths))
return EXIT_SUCCESS;