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

Function isHdAssetValid

TheForceEngine/TFE_Settings/settings.cpp:1319–1365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1317 }
1318
1319 bool isHdAssetValid(const char* assetName, HdAssetType type)
1320 {
1321 bool valid = true;
1322
1323 const size_t listCount = s_modSettings.ignoreList.size();
1324 const ModHdIgnoreList* list = s_modSettings.ignoreList.data();
1325 for (size_t l = 0; l < listCount; l++)
1326 {
1327 if (strcasecmp(list[l].levName.c_str(), s_levelName) != 0)
1328 {
1329 continue;
1330 }
1331 size_t ignoreListCount = 0;
1332 const std::string* ignoreList = nullptr;
1333
1334 switch (type)
1335 {
1336 case HD_ASSET_TYPE_BM:
1337 {
1338 ignoreListCount = list[l].bmIgnoreList.size();
1339 ignoreList = list[l].bmIgnoreList.data();
1340 } break;
1341 case HD_ASSET_TYPE_FME:
1342 {
1343 ignoreListCount = list[l].fmeIgnoreList.size();
1344 ignoreList = list[l].fmeIgnoreList.data();
1345 } break;
1346 case HD_ASSET_TYPE_WAX:
1347 {
1348 ignoreListCount = list[l].waxIgnoreList.size();
1349 ignoreList = list[l].waxIgnoreList.data();
1350 } break;
1351 }
1352
1353 for (size_t i = 0; i < ignoreListCount; i++)
1354 {
1355 if (strcasecmp(ignoreList[i].c_str(), assetName) == 0)
1356 {
1357 valid = false;
1358 break;
1359 }
1360 }
1361 break;
1362 }
1363
1364 return valid;
1365 }
1366
1367 ////////////////////////////////////////////////////////////////////////////
1368 // Handle overrides from MOD_CONF.txt

Callers 3

getFrameFunction · 0.85
getWaxFunction · 0.85
bitmap_loadHDFunction · 0.85

Calls 3

dataMethod · 0.80
c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected