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

Function RemapPolyModels

model/polymodel.cpp:3081–3100  ·  view source on GitHub ↗

Goes through all poly models and gets all missing textures

Source from the content-addressed store, hash-verified

3079
3080// Goes through all poly models and gets all missing textures
3081void RemapPolyModels() {
3082 int i;
3083
3084 for (i = 0; i < MAX_POLY_MODELS; i++) {
3085 int remap = 0;
3086
3087 if (Poly_models[i].used == 0 || (Poly_models[i].flags & PMF_NOT_RESIDENT))
3088 continue;
3089
3090 for (int t = 0; t < Poly_models[i].n_textures; t++)
3091 if (Poly_models[i].textures[t] == 0) // is there a bad texture?
3092 remap = 1;
3093
3094 if (remap == 1) {
3095 // remap the damn textures
3096 mprintf(0, "Remapping model textures for model %s.\n", Poly_models[i].name);
3097 ReloadModelTextures(i);
3098 }
3099 }
3100}
3101
3102// MTS: not used?
3103// Returns the total number of faces in a model

Callers 1

RemapEverythingFunction · 0.85

Calls 1

ReloadModelTexturesFunction · 0.85

Tested by

no test coverage detected