mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-11-29 07:47:48 +00:00
refactor: get rid of global game variables
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
#pragma once
|
||||
#include "Game/IGame.h"
|
||||
|
||||
class GameIW4 final : public IGame
|
||||
namespace IW4
|
||||
{
|
||||
public:
|
||||
GameId GetId() override;
|
||||
std::string GetFullName() override;
|
||||
std::string GetShortName() override;
|
||||
void AddZone(Zone* zone) override;
|
||||
void RemoveZone(Zone* zone) override;
|
||||
std::vector<Zone*> GetZones() override;
|
||||
const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() override;
|
||||
class Game final : public IGame
|
||||
{
|
||||
public:
|
||||
[[nodiscard]] GameId GetId() const override;
|
||||
[[nodiscard]] const std::string& GetFullName() const override;
|
||||
[[nodiscard]] const std::string& GetShortName() const override;
|
||||
void AddZone(Zone* zone) override;
|
||||
void RemoveZone(Zone* zone) override;
|
||||
[[nodiscard]] const std::vector<Zone*>& GetZones() const override;
|
||||
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
|
||||
|
||||
private:
|
||||
std::vector<Zone*> m_zones;
|
||||
};
|
||||
|
||||
extern GameIW4 g_GameIW4;
|
||||
private:
|
||||
std::vector<Zone*> m_zones;
|
||||
};
|
||||
} // namespace IW4
|
||||
|
||||
Reference in New Issue
Block a user