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

Function markClassForPrecache

source/games/duke/src/premap.cpp:1006–1021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1004
1005static TMap<uint64_t, bool> checked;
1006static void markClassForPrecache(PClass* cls, unsigned pal)
1007{
1008 uint64_t key = cls->TypeName.GetIndex() + pal * (1ull << 32);
1009 if (checked.CheckKey(key)) return;
1010 checked.Insert(key, true);
1011 auto ainf = static_cast<PClassActor*>(cls)->ActorInfo();
1012 for (auto clss : ainf->precacheClasses)
1013 {
1014 markClassForPrecache(clss, pal);
1015 }
1016 for (auto tex : ainf->SpriteSet)
1017 {
1018 markTextureForPrecache(tex, pal);
1019 }
1020
1021}
1022void cacheit(void)
1023{
1024 checked.Clear();

Callers 1

cacheitFunction · 0.85

Calls 5

markTextureForPrecacheFunction · 0.85
ActorInfoMethod · 0.80
GetIndexMethod · 0.45
CheckKeyMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected