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

Function GetNormalizedKeyframe

model/polymodel.cpp:3069–3078  ·  view source on GitHub ↗

MTS: used only in this file. Given an actual keyframe number, returns the normalized (0 to 1) position of that keyframe Handle is an index into the Poly_models array

Source from the content-addressed store, hash-verified

3067// keyframe
3068// Handle is an index into the Poly_models array
3069float GetNormalizedKeyframe(int handle, float num) {
3070 poly_model *pm = &Poly_models[handle];
3071
3072 ASSERT(!(pm->flags & PMF_NOT_RESIDENT));
3073
3074 ASSERT(pm->used);
3075 ASSERT(num >= 0 && num <= pm->max_keys);
3076
3077 return ((num / (float)pm->max_keys));
3078}
3079
3080// Goes through all poly models and gets all missing textures
3081void RemapPolyModels() {

Callers 1

SetNormalizedTimeObjFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected