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

Function markTextureForPrecache

source/core/precache.cpp:101–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99TMap<int64_t, bool> cachemap;
100
101void markTextureForPrecache(FTextureID nTex, int palnum)
102{
103 if (!nTex.isValid()) return;
104 int i, j;
105 assert(palnum >= 0 && palnum < 256);
106 auto& picanm = GetExtInfo(nTex).picanm;
107 if (picanm.type() == PICANM_ANIMTYPE_BACK)
108 {
109 i = nTex.GetIndex() - picanm.num;
110 j = nTex.GetIndex();
111 }
112 else
113 {
114 i = nTex.GetIndex();
115 j = nTex.GetIndex() + picanm.num * ((picanm.type() == PICANM_ANIMTYPE_OSC) ? 2 : 1);
116 }
117
118 for (; i <= j; i = i + 1)
119 {
120 int64_t val = i + (int64_t(palnum) << 32);
121 assert(val >= 0);
122 cachemap.Insert(val, true);
123 }
124}
125
126void markTextureForPrecache(const char* texname, int palnum)
127{

Callers 9

markClassForPrecacheFunction · 0.85
cacheitFunction · 0.85
PreCacheRangeFunction · 0.85
PreCacheOverrideFunction · 0.85
PreCacheActorFunction · 0.85
precacheFunction · 0.85
PrecacheMethod · 0.85
tilePrecacheTileFunction · 0.85
precacheMapFunction · 0.85

Calls 5

CheckForTextureMethod · 0.80
isValidMethod · 0.45
typeMethod · 0.45
GetIndexMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected