MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / ResourcePack

Class ResourcePack

olcPixelGameEngine.h:1046–1062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1044 };
1045
1046 class ResourcePack : public std::streambuf
1047 {
1048 public:
1049 ResourcePack();
1050 ~ResourcePack();
1051 bool AddFile(const std::string& sFile);
1052 bool LoadPack(const std::string& sFile, const std::string& sKey);
1053 bool SavePack(const std::string& sFile, const std::string& sKey);
1054 ResourceBuffer GetFileBuffer(const std::string& sFile);
1055 bool Loaded();
1056 private:
1057 struct sResourceFile { uint32_t nSize; uint32_t nOffset; };
1058 std::map<std::string, sResourceFile> mapFiles;
1059 std::ifstream baseFile;
1060 std::vector<char> scramble(const std::vector<char>& data, const std::string& key);
1061 std::string makeposix(const std::string& path);
1062 };
1063
1064
1065 class ImageLoader

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected