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

Method AddFile

olcPixelGameEngine.h:2308–2321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2306 ResourcePack::~ResourcePack() { baseFile.close(); }
2307
2308 bool ResourcePack::AddFile(const std::string& sFile)
2309 {
2310 const std::string file = makeposix(sFile);
2311
2312 if (_gfs::exists(file))
2313 {
2314 sResourceFile e;
2315 e.nSize = (uint32_t)_gfs::file_size(file);
2316 e.nOffset = 0; // Unknown at this stage
2317 mapFiles[file] = e;
2318 return true;
2319 }
2320 return false;
2321 }
2322
2323 bool ResourcePack::LoadPack(const std::string& sFile, const std::string& sKey)
2324 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected