| 2198 | } |
| 2199 | |
| 2200 | void 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 | |
| 2237 | bool PageInSound(int id) { |
| 2238 | if (id == -1) |
no test coverage detected