MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / fileDeRNC

Method fileDeRNC

Source/Resources.cpp:40–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40tSharedBuffer cResources::fileDeRNC(tSharedBuffer pBuffer) {
41 uint32 Header = readBEDWord(pBuffer->data());
42 if (Header != 'RNC\01')
43 return pBuffer;
44
45 uint32 Size = readBEDWord(pBuffer->data() + 4);
46
47 auto Unpacked = std::make_shared<std::vector<uint8>>();
48 Unpacked->resize(Size);
49 rnc_unpack(pBuffer->data(), Unpacked->data());
50 return Unpacked;
51}
52
53size_t cResources::fileLoadTo( const std::string& pFilename, uint8* pTarget ) {
54

Callers

nothing calls this directly

Calls 3

readBEDWordFunction · 0.85
rnc_unpackFunction · 0.85
resizeMethod · 0.80

Tested by

no test coverage detected