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

Method saveCF1Map

Source/Map/Original.cpp:154–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154bool cOriginalMap::saveCF1Map(const std::string& pFilename) {
155
156 std::ofstream outfile(pFilename, std::ofstream::binary);
157
158 // The original game stores the maps in big endian
159 tool_EndianSwap(mData->data() + 0x60, mData->size() - 0x60);
160 outfile.write((const char*)mData->data(), mData->size());
161 outfile.close();
162
163 // Now we can swap it back to little endian
164 tool_EndianSwap(mData->data() + 0x60, mData->size() - 0x60);
165
166 return true;
167}
168
169bool cOriginalMap::saveCF1Sprites(std::string pFilename) {
170

Callers

nothing calls this directly

Calls 3

tool_EndianSwapFunction · 0.85
closeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected