mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 07:18:11 -05:00
ZoneLoading: Add ZoneMemory and the possibility to unload zones and their memory
This commit is contained in:
@ -8,5 +8,6 @@ class IGame
|
||||
{
|
||||
public:
|
||||
virtual void AddZone(Zone* zone) = 0;
|
||||
virtual void RemoveZone(Zone* zone) = 0;
|
||||
virtual std::vector<Zone*> GetZones() = 0;
|
||||
};
|
@ -10,6 +10,14 @@ void GameT6::AddZone(Zone* zone)
|
||||
m_zones.push_back(zone);
|
||||
}
|
||||
|
||||
void GameT6::RemoveZone(Zone* zone)
|
||||
{
|
||||
const auto foundEntry = std::find(m_zones.begin(), m_zones.end(), zone);
|
||||
|
||||
if (foundEntry != m_zones.end())
|
||||
m_zones.erase(foundEntry);
|
||||
}
|
||||
|
||||
std::vector<Zone*> GameT6::GetZones()
|
||||
{
|
||||
return m_zones;
|
||||
|
@ -7,6 +7,7 @@ class GameT6 : public IGame
|
||||
|
||||
public:
|
||||
void AddZone(Zone* zone) override;
|
||||
void RemoveZone(Zone* zone) override;
|
||||
std::vector<Zone*> GetZones() override;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user