#pragma once #include "TextureManager.h" #include "Math.h" #include #include "ActiveObject.h" #include #include "BoundaryBox.h" namespace ZL { struct Room{ std::shared_ptr roomTexture; std::vector objects; std::string sound_name; ZL::VertexDataStruct textMesh; ZL::VertexRenderStruct textMeshMutable; CollisionManager collisionMgr; std::function roomLogic; Room() { objects.reserve(30); } std::vector findByHighlighted(bool highlighted) const { std::vector result; for (auto& o : objects) { if (o.highlighted == highlighted) { result.push_back(&o); } } return result; } void removeByPtr(const ActiveObject* ptr) { for (int i = 0; i < objects.size(); i++) { if (ptr == &objects[i]) { objects.erase(objects.begin() + i); return; } } } }; }