This commit is contained in:
Martin Slachta
2026-07-18 14:31:15 +02:00
commit a04f0dc262
3343 changed files with 1140208 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#include <entt/core/attribute.h>
#include <entt/entity/mixin.hpp>
#include <entt/entity/registry.hpp>
#include <entt/entity/view.hpp>
#include "../../../common/boxed_type.h"
#include "../../../common/empty.h"
template class entt::basic_registry<entt::entity>;
ENTT_API void update(entt::registry &registry, int value) {
registry.view<test::boxed_int, test::empty>().each([value](auto &elem) {
elem.value += value;
});
}
ENTT_API void insert(entt::registry &registry) {
// forces the creation of the pool for the empty type
static_cast<void>(registry.storage<test::empty>());
const auto view = registry.view<test::boxed_int>();
registry.insert<test::empty>(view.begin(), view.end());
}