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

Method GuesstimateNumTextures

source/common/textures/texturemanager.cpp:1409–1437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1407//===========================================================================
1408
1409int FTextureManager::GuesstimateNumTextures ()
1410{
1411 int numtex = 0;
1412
1413 for(int i = fileSystem.GetNumEntries()-1; i>=0; i--)
1414 {
1415 int space = fileSystem.GetFileNamespace(i);
1416 switch(space)
1417 {
1418 case ns_flats:
1419 case ns_sprites:
1420 case ns_newtextures:
1421 case ns_hires:
1422 case ns_patches:
1423 case ns_graphics:
1424 numtex++;
1425 break;
1426
1427 default:
1428 if (fileSystem.GetFileFlags(i) & RESFF_MAYBEFLAT) numtex++;
1429
1430 break;
1431 }
1432 }
1433
1434 //numtex += CountBuildTiles (); // this cannot be done with a lot of overhead so just leave it out.
1435 numtex += CountTexturesX ();
1436 return numtex;
1437}
1438
1439//===========================================================================
1440//

Callers

nothing calls this directly

Calls 3

GetNumEntriesMethod · 0.80
GetFileNamespaceMethod · 0.80
GetFileFlagsMethod · 0.80

Tested by

no test coverage detected