MCPcopy Create free account
hub / github.com/ZDoom/Raze / loadMapHack

Function loadMapHack

source/core/maphack.cpp:283–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void loadMapHack(const char* filename, const uint8_t* md4, SpawnSpriteDef& sprites)
284{
285 FString internal = "engine/compatibility/";
286 for (int j = 0; j < 16; ++j)
287 {
288 internal.AppendFormat("%02x", md4[j]);
289 }
290 LoadMapHack((internal + ".mhk").GetChars(), sprites);
291 FString hack = StripExtension(filename) + ".mhk";
292
293 if (LoadMapHack(hack.GetChars(), sprites))
294 {
295 for (auto& mhk : usermaphacks)
296 {
297 if (!memcmp(md4, mhk.md4, 16))
298 {
299 LoadMapHack(mhk.mhkfile.GetChars(), sprites);
300 }
301 }
302 }
303}
304
305// Map hacks use MD4 instead of MD5. Oh, well...
306CCMD(md4sum)

Callers 2

dbLoadMapFunction · 0.85
loadMapFunction · 0.85

Calls 4

LoadMapHackFunction · 0.85
StripExtensionFunction · 0.85
AppendFormatMethod · 0.80
GetCharsMethod · 0.45

Tested by

no test coverage detected