mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-11 23:38:09 -05:00
Restructure ZoneDefinitionWriting
This commit is contained in:
@ -1,13 +1,21 @@
|
||||
#pragma once
|
||||
#include "GameLanguage.h"
|
||||
#include <vector>
|
||||
#include "GameLanguage.h"
|
||||
|
||||
class Zone;
|
||||
|
||||
class IGame
|
||||
{
|
||||
public:
|
||||
virtual const std::string& GetName() = 0;
|
||||
IGame() = default;
|
||||
virtual ~IGame() = default;
|
||||
IGame(const IGame& other) = default;
|
||||
IGame(IGame&& other) noexcept = default;
|
||||
IGame& operator=(const IGame& other) = default;
|
||||
IGame& operator=(IGame&& other) noexcept = default;
|
||||
|
||||
virtual std::string GetFullName() = 0;
|
||||
virtual std::string GetShortName() = 0;
|
||||
virtual void AddZone(Zone* zone) = 0;
|
||||
virtual void RemoveZone(Zone* zone) = 0;
|
||||
virtual std::vector<Zone*> GetZones() = 0;
|
||||
|
@ -8,11 +8,14 @@ using namespace IW4;
|
||||
|
||||
GameIW4 g_GameIW4;
|
||||
|
||||
const std::string GameIW4::NAME = "IW4";
|
||||
|
||||
const std::string& GameIW4::GetName()
|
||||
std::string GameIW4::GetFullName()
|
||||
{
|
||||
return NAME;
|
||||
return "Call Of Duty: Modern Warfare 2";
|
||||
}
|
||||
|
||||
std::string GameIW4::GetShortName()
|
||||
{
|
||||
return "IW4";
|
||||
}
|
||||
|
||||
void GameIW4::AddZone(Zone* zone)
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
class GameIW4 : public IGame
|
||||
{
|
||||
static const std::string NAME;
|
||||
std::vector<Zone*> m_zones;
|
||||
|
||||
public:
|
||||
const std::string& GetName() override;
|
||||
std::string GetFullName() override;
|
||||
std::string GetShortName() override;
|
||||
void AddZone(Zone* zone) override;
|
||||
void RemoveZone(Zone* zone) override;
|
||||
std::vector<Zone*> GetZones() override;
|
||||
|
@ -8,11 +8,14 @@ using namespace T6;
|
||||
|
||||
GameT6 g_GameT6;
|
||||
|
||||
const std::string GameT6::NAME = "T6";
|
||||
|
||||
const std::string& GameT6::GetName()
|
||||
std::string GameT6::GetFullName()
|
||||
{
|
||||
return NAME;
|
||||
return "Call Of Duty: Black Ops II";
|
||||
}
|
||||
|
||||
std::string GameT6::GetShortName()
|
||||
{
|
||||
return "T6";
|
||||
}
|
||||
|
||||
void GameT6::AddZone(Zone* zone)
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
class GameT6 : public IGame
|
||||
{
|
||||
static const std::string NAME;
|
||||
std::vector<Zone*> m_zones;
|
||||
|
||||
public:
|
||||
const std::string& GetName() override;
|
||||
std::string GetFullName() override;
|
||||
std::string GetShortName() override;
|
||||
void AddZone(Zone* zone) override;
|
||||
void RemoveZone(Zone* zone) override;
|
||||
std::vector<Zone*> GetZones() override;
|
||||
|
Reference in New Issue
Block a user