mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
git subrepo clone https://github.com/HarbourMasters/ZAPDTR.git
subrepo: subdir: "ZAPDTR" merged: "a53a53ea4" upstream: origin: "https://github.com/HarbourMasters/ZAPDTR.git" branch: "master" commit: "a53a53ea4" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
This commit is contained in:
parent
f52a2a6406
commit
5dda5762ba
217 changed files with 47152 additions and 0 deletions
58
ZAPDTR/ZAPD/GameConfig.h
Normal file
58
ZAPDTR/ZAPD/GameConfig.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "Utils/Directory.h"
|
||||
#include "tinyxml2.h"
|
||||
|
||||
struct TexturePoolEntry
|
||||
{
|
||||
fs::path path = ""; // Path to Shared Texture
|
||||
};
|
||||
|
||||
class ExternalFile
|
||||
{
|
||||
public:
|
||||
fs::path xmlPath, outPath;
|
||||
|
||||
ExternalFile(fs::path nXmlPath, fs::path nOutPath);
|
||||
};
|
||||
|
||||
class ZFile;
|
||||
|
||||
class GameConfig
|
||||
{
|
||||
public:
|
||||
std::string configFilePath;
|
||||
std::map<int32_t, std::vector<ZFile*>> segmentRefFiles;
|
||||
std::map<uint32_t, std::string> symbolMap;
|
||||
std::vector<std::string> actorList;
|
||||
std::vector<std::string> objectList;
|
||||
std::map<uint32_t, TexturePoolEntry> texturePool; // Key = CRC
|
||||
|
||||
// ZBackground
|
||||
uint32_t bgScreenWidth = 320, bgScreenHeight = 240;
|
||||
|
||||
// ExternalFile
|
||||
fs::path externalXmlFolder;
|
||||
std::vector<ExternalFile> externalFiles;
|
||||
|
||||
GameConfig() = default;
|
||||
~GameConfig();
|
||||
|
||||
void ReadTexturePool(const fs::path& texturePoolXmlPath);
|
||||
void GenSymbolMap(const fs::path& symbolMapPath);
|
||||
|
||||
void ConfigFunc_SymbolMap(const tinyxml2::XMLElement& element);
|
||||
void ConfigFunc_ActorList(const tinyxml2::XMLElement& element);
|
||||
void ConfigFunc_ObjectList(const tinyxml2::XMLElement& element);
|
||||
void ConfigFunc_TexturePool(const tinyxml2::XMLElement& element);
|
||||
void ConfigFunc_BGConfig(const tinyxml2::XMLElement& element);
|
||||
void ConfigFunc_ExternalXMLFolder(const tinyxml2::XMLElement& element);
|
||||
void ConfigFunc_ExternalFile(const tinyxml2::XMLElement& element);
|
||||
|
||||
void ReadConfigFile(const fs::path& configFilePath);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue