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

Function precacheMarkedTiles

source/core/precache.cpp:134–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132
133
134void precacheMarkedTiles()
135{
136 screen->StartPrecaching();
137 decltype(cachemap)::Iterator it(cachemap);
138 decltype(cachemap)::Pair* pair;
139 while (it.NextPair(pair))
140 {
141 int texid = pair->Key & 0x7fffffff;
142 int palnum = pair->Key >> 32;
143 doprecache(FSetTextureID(texid), palnum);
144 }
145
146 // Cache everything the map explicitly declares.
147 TMap<FString, bool> cachetexmap;
148 for (auto& tex : currentLevel->PrecacheTextures) cachetexmap.Insert(tex, true);
149
150 decltype(cachetexmap)::Iterator it2(cachetexmap);
151 decltype(cachetexmap)::Pair* pair2;
152 while (it2.NextPair(pair2))
153 {
154 auto tex = TexMan.FindGameTexture(pair2->Key.GetChars(), ETextureType::Any);
155 if (tex) PrecacheTex(tex, 0);
156 }
157
158 cachemap.Clear();
159}
160
161void precacheMap()
162{

Callers 4

LoadTheMapFunction · 0.85
DoTheCacheFunction · 0.85
precacheFunction · 0.85
PreloadCacheFunction · 0.85

Calls 9

doprecacheFunction · 0.85
FSetTextureIDClass · 0.85
PrecacheTexFunction · 0.85
FindGameTextureMethod · 0.80
StartPrecachingMethod · 0.45
NextPairMethod · 0.45
InsertMethod · 0.45
GetCharsMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected