MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / isAssetCustom

Function isAssetCustom

TheForceEngine/TFE_Jedi/Level/rtexture.cpp:304–318  ·  view source on GitHub ↗

This only checks a few names (5 I think) but is still doing a bunch of string compares. TODO: Add a "core archive" flag to the archives themselves.

Source from the content-addressed store, hash-verified

302 // This only checks a few names (5 I think) but is still doing a bunch of string compares.
303 // TODO: Add a "core archive" flag to the archives themselves.
304 bool isAssetCustom(const char* archiveName)
305 {
306 if (!archiveName) { return true; }
307
308 const s32 count = (s32)s_coreAchiveNames.size();
309 const std::string* names = s_coreAchiveNames.data();
310 for (s32 i = 0; i < count; i++)
311 {
312 if (strcasecmp(names[i].c_str(), archiveName) == 0)
313 {
314 return false;
315 }
316 }
317 return true;
318 }
319
320 TextureData* bitmap_load(const char* name, u32 decompress, AssetPool pool, bool addToCache)
321 {

Callers 1

bitmap_loadFunction · 0.85

Calls 3

dataMethod · 0.80
c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected