| 60 | } |
| 61 | |
| 62 | static void doprecache(FTextureID texid, int palette) |
| 63 | { |
| 64 | if ((palette < (MAXPALOOKUPS - RESERVEDPALS)) && (!lookups.checkTable(palette))) return; |
| 65 | |
| 66 | int palid = TRANSLATION(Translation_Remap + curbasepal, palette).index(); |
| 67 | auto tex = TexMan.GetGameTexture(texid); |
| 68 | PrecacheTex(tex, palid); |
| 69 | |
| 70 | int const mid = -1;// hw_models ? modelManager.CheckModel(texid, palette) : -1; |
| 71 | |
| 72 | if (mid < 0) |
| 73 | { |
| 74 | if (r_voxels) |
| 75 | { |
| 76 | int vox = GetExtInfo(texid).tiletovox; |
| 77 | if (vox >= 0 && vox < MAXVOXELS && voxmodels[vox] && voxmodels[vox]->model) |
| 78 | { |
| 79 | FHWModelRenderer mr(*screen->RenderState(), 0); |
| 80 | voxmodels[vox]->model->BuildVertexBuffer(&mr); |
| 81 | } |
| 82 | } |
| 83 | return; |
| 84 | } |
| 85 | |
| 86 | #if 0 |
| 87 | int const surfaces = (models[mid]->mdnum == 3) ? ((md3model_t *)models[mid])->head.numsurfs : 0; |
| 88 | |
| 89 | for (int i = 0; i <= surfaces; i++) |
| 90 | { |
| 91 | auto skintex = mdloadskin((md2model_t *)models[mid], 0, palette, i, nullptr); |
| 92 | int paletteid = TRANSLATION(Translation_Remap + curbasepal, palette); |
| 93 | if (skintex) PrecacheTex(skintex, paletteid); |
| 94 | } |
| 95 | #endif |
| 96 | } |
| 97 | |
| 98 | |
| 99 | TMap<int64_t, bool> cachemap; |
no test coverage detected