move parts to new common component to avoid circular dependency of zonecommon and objcommon

This commit is contained in:
Jan
2021-03-03 12:56:15 -08:00
parent d616738be4
commit 12461d27e7
38 changed files with 70 additions and 22 deletions

View File

@ -0,0 +1,40 @@
#include "GameIW4.h"
#include <algorithm>
#include "IW4.h"
using namespace IW4;
GameIW4 g_GameIW4;
const std::string GameIW4::NAME = "IW4";
const std::string& GameIW4::GetName()
{
return NAME;
}
void GameIW4::AddZone(Zone* zone)
{
m_zones.push_back(zone);
}
void GameIW4::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*> GameIW4::GetZones()
{
return m_zones;
}
std::vector<GameLanguagePrefix> GameIW4::GetLanguagePrefixes()
{
std::vector<GameLanguagePrefix> prefixes;
return prefixes;
}