mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2024-12-04 19:23:28 +01:00
update entt to v3.7.1
This commit is contained in:
parent
4e2dd51ad1
commit
7e1137732b
2
external/entt
vendored
2
external/entt
vendored
@ -1 +1 @@
|
||||
Subproject commit 7a949dd32849e8230b15a5ff8ad1104c7f748c2a
|
||||
Subproject commit 5d15a3d69f433a0e3fce266caaeb87c77c10453c
|
@ -37,7 +37,7 @@ void Camera3D(MM::Scene& scene) {
|
||||
|
||||
MM::ImGuiWidgets::Entity(tracking, scene);
|
||||
if (scene.valid(tracking)) {
|
||||
if (scene.has<MM::Components::Transform2D>(tracking)) {
|
||||
if (scene.all_of<MM::Components::Transform2D>(tracking)) {
|
||||
camera->translation = {scene.get<MM::Components::Transform2D>(tracking).position, 0.f};
|
||||
} else {
|
||||
ImGui::TextUnformatted("error: Entity has no Transform");
|
||||
|
@ -14,7 +14,7 @@ void Entity(MM::Entity& e, MM::Scene& ecs, bool dropTarget) {
|
||||
ImGui::PushID(static_cast<int>(entt::to_integral(e)));
|
||||
|
||||
if (ecs.valid(e)) {
|
||||
if (ecs.has<MM::Components::Name>(e)) {
|
||||
if (ecs.all_of<MM::Components::Name>(e)) {
|
||||
ImGui::Text(ICON_II_CUBE "E: %d v%d (%s)", entt::to_integral(ecs.entity(e)), ecs.version(e), ecs.get<MM::Components::Name>(e).str.c_str());
|
||||
} else {
|
||||
ImGui::Text(ICON_II_CUBE "E: %d v%d", entt::to_integral(ecs.entity(e)), ecs.version(e));
|
||||
|
@ -104,7 +104,7 @@ void BatchedSpriteSheet::render(Services::OpenGLRenderer& rs, Engine& engine) {
|
||||
}
|
||||
|
||||
auto* tmp_col_ptr = &default_color;
|
||||
if (scene.has<Components::Color>(e)) {
|
||||
if (scene.all_of<Components::Color>(e)) {
|
||||
tmp_col_ptr = &scene.get<Components::Color>(e).color;
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ void SimpleRect::render(Services::OpenGLRenderer& rs, Engine& engine) {
|
||||
|
||||
_shader->setUniformMat4f("_WVP", vp * t.getTransform4(t.position.y/10.f + 500.f));
|
||||
|
||||
if (scene.has<Components::Color>(e)) {
|
||||
if (scene.all_of<Components::Color>(e)) {
|
||||
_shader->setUniform4f("_color", scene.get<Components::Color>(e).color);
|
||||
} else {
|
||||
_shader->setUniform4f("_color", default_color);
|
||||
|
@ -90,7 +90,7 @@ void SimpleSprite::render(Services::OpenGLRenderer& rs, Engine& engine) {
|
||||
|
||||
_shader->setUniformMat4f("_WVP", vp * t.getTransform4(t.position.y/10.f + 500.f));
|
||||
|
||||
if (scene.has<Components::Color>(e)) {
|
||||
if (scene.all_of<Components::Color>(e)) {
|
||||
_shader->setUniform4f("_color", scene.get<Components::Color>(e).color);
|
||||
} else {
|
||||
_shader->setUniform4f("_color", default_color);
|
||||
|
@ -101,7 +101,7 @@ void SimpleSpriteSheet::render(Services::OpenGLRenderer& rs, Engine& engine) {
|
||||
_shader->setUniform2ui("_tileCount", spr.sp.tile_count.x, spr.sp.tile_count.y);
|
||||
_shader->setUniform1ui("_atlasIndex", spr.tile_index);
|
||||
|
||||
if (scene.has<Components::Color>(e)) {
|
||||
if (scene.all_of<Components::Color>(e)) {
|
||||
_shader->setUniform4f("_color", scene.get<Components::Color>(e).color);
|
||||
} else {
|
||||
_shader->setUniform4f("_color", default_color);
|
||||
|
Loading…
Reference in New Issue
Block a user