MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / PageInLevelTexture

Function PageInLevelTexture

Descent3/gamesequence.cpp:2200–2235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2198}
2199
2200void PageInLevelTexture(int id) {
2201 if (id == -1 || id == 0)
2202 return;
2203
2204 if (Dedicated_server)
2205 return;
2206
2207 TouchTexture(id);
2208
2209 // Upload all these textures to the card
2210 if (GameTextures[id].flags & TF_ANIMATED) {
2211 vclip *vc = &GameVClips[GameTextures[id].bm_handle];
2212 for (int i = 0; i < vc->num_frames; i++) {
2213 if (!(GameTextures[id].flags & TF_PROCEDURAL) && !(GameTextures[id].flags & TF_SPECULAR))
2214 GameBitmaps[vc->frames[i]].flags |= BF_COMPRESSABLE;
2215 else
2216 GameBitmaps[vc->frames[i]].flags &= ~BF_COMPRESSABLE;
2217
2218 if (!Dedicated_server && GameBitmaps[vc->frames[i]].cache_slot == -1)
2219 rend_PreUploadTextureToCard(vc->frames[i], MAP_TYPE_BITMAP);
2220 }
2221 } else {
2222 if (!(GameTextures[id].flags & TF_PROCEDURAL) && !(GameTextures[id].flags & TF_SPECULAR))
2223 GameBitmaps[GameTextures[id].bm_handle].flags |= BF_COMPRESSABLE;
2224 else
2225 GameBitmaps[GameTextures[id].bm_handle].flags &= ~BF_COMPRESSABLE;
2226
2227 if (!Dedicated_server && GameBitmaps[GameTextures[id].bm_handle].cache_slot == -1)
2228 rend_PreUploadTextureToCard(GameTextures[id].bm_handle, MAP_TYPE_BITMAP);
2229 }
2230
2231 if (GameTextures[id].flags & TF_DESTROYABLE && GameTextures[id].destroy_handle != -1)
2232 PageInLevelTexture(GameTextures[id].destroy_handle);
2233
2234 Textures_to_free[id] = 1;
2235}
2236
2237bool PageInSound(int id) {
2238 if (id == -1)

Callers 5

PageInDoorFunction · 0.85
PageInWeaponFunction · 0.85
PageInShipFunction · 0.85
PageInGenericFunction · 0.85
PageInAllDataFunction · 0.85

Calls 2

TouchTextureFunction · 0.85

Tested by

no test coverage detected