mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-17 23:21:22 +00:00
add gr_modelinterpolation
This commit is contained in:
parent
e7e3c6ccbb
commit
8ac49d8855
4 changed files with 11 additions and 4 deletions
|
@ -83,6 +83,7 @@ extern consvar_t cv_grcoronasize;
|
|||
#endif
|
||||
extern consvar_t cv_grfov;
|
||||
extern consvar_t cv_grmodels;
|
||||
extern consvar_t cv_grmodelinterpolation;
|
||||
extern consvar_t cv_grfog;
|
||||
extern consvar_t cv_grfogcolor;
|
||||
extern consvar_t cv_grfogdensity;
|
||||
|
|
|
@ -840,11 +840,15 @@ static void HWR_GetBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, INT
|
|||
|
||||
static boolean HWR_CanInterpolateModel(mobj_t *mobj, model_t *model)
|
||||
{
|
||||
if (cv_grmodelinterpolation.value == 2) // Always
|
||||
return true;
|
||||
return model->interpolate[(mobj->frame & FF_FRAMEMASK)];
|
||||
}
|
||||
|
||||
static boolean HWR_CanInterpolateSprite2(modelspr2frames_t *spr2frame)
|
||||
{
|
||||
if (cv_grmodelinterpolation.value == 2) // Always
|
||||
return true;
|
||||
return spr2frame->interpolate;
|
||||
}
|
||||
|
||||
|
@ -1101,7 +1105,7 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
|
|||
|
||||
#ifdef USE_MODEL_NEXTFRAME
|
||||
#define INTERPOLERATION_LIMIT TICRATE/4
|
||||
if (cv_grmodels.value == 1 && tics <= durs && tics <= INTERPOLERATION_LIMIT)
|
||||
if (cv_grmodelinterpolation.value && tics <= durs && tics <= INTERPOLERATION_LIMIT)
|
||||
{
|
||||
if (durs > INTERPOLERATION_LIMIT)
|
||||
durs = INTERPOLERATION_LIMIT;
|
||||
|
|
|
@ -1216,6 +1216,7 @@ void R_RegisterEngineStuff(void)
|
|||
CV_RegisterVar(&cv_grcoronas);
|
||||
CV_RegisterVar(&cv_grcoronasize);
|
||||
#endif
|
||||
CV_RegisterVar(&cv_grmodelinterpolation);
|
||||
CV_RegisterVar(&cv_grmodels);
|
||||
CV_RegisterVar(&cv_grspritebillboarding);
|
||||
CV_RegisterVar(&cv_grskydome);
|
||||
|
|
|
@ -89,6 +89,7 @@ static void CV_Gammaxxx_ONChange(void);
|
|||
// but they won't do anything.
|
||||
static CV_PossibleValue_t grgamma_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t grsoftwarefog_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "LightPlanes"}, {0, NULL}};
|
||||
static CV_PossibleValue_t grmodelinterpolation_cons_t[] = {{0, "Off"}, {1, "Sometimes"}, {2, "Always"}, {0, NULL}};
|
||||
|
||||
consvar_t cv_grfovchange = {"gr_fovchange", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_grfog = {"gr_fog", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -107,9 +108,9 @@ consvar_t cv_grcoronas = {"gr_coronas", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL,
|
|||
consvar_t cv_grcoronasize = {"gr_coronasize", "1", CV_SAVE| CV_FLOAT, 0, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
||||
static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NULL}};
|
||||
// console variables in development
|
||||
consvar_t cv_grmodels = {"gr_models", "Off", CV_SAVE, CV_MD2, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_grmodels = {"gr_models", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_grmodelinterpolation = {"gr_modelinterpolation", "Sometimes", CV_SAVE, grmodelinterpolation_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_grspritebillboarding = {"gr_spritebillboarding", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_grskydome = {"gr_skydome", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue