Adds r_pr_overridemodelscale to help with getting models in-game, also works with HUD models.

git-svn-id: https://svn.eduke32.com/eduke32@1818 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2011-03-04 05:33:35 +00:00
parent 9c60fd054f
commit b4f5da1141
3 changed files with 8 additions and 1 deletions

View file

@ -59,6 +59,7 @@ extern float pr_hudyadd;
extern float pr_hudzadd; extern float pr_hudzadd;
extern int32_t pr_hudangadd; extern int32_t pr_hudangadd;
extern int32_t pr_hudfov; extern int32_t pr_hudfov;
extern float pr_overridemodelscale;
extern int32_t pr_ati_fboworkaround; extern int32_t pr_ati_fboworkaround;
extern int32_t pr_ati_nodepthoffset; extern int32_t pr_ati_nodepthoffset;
#ifdef __APPLE__ #ifdef __APPLE__

View file

@ -37,6 +37,7 @@ float pr_hudyadd = 0.0f;
float pr_hudzadd = 0.0f; float pr_hudzadd = 0.0f;
int32_t pr_hudangadd = 0; int32_t pr_hudangadd = 0;
int32_t pr_hudfov = 426; int32_t pr_hudfov = 426;
float pr_overridemodelscale = 0.0f;
int32_t pr_ati_fboworkaround = 0; int32_t pr_ati_fboworkaround = 0;
int32_t pr_ati_nodepthoffset = 0; int32_t pr_ati_nodepthoffset = 0;
#ifdef __APPLE__ #ifdef __APPLE__
@ -3734,7 +3735,11 @@ static void polymer_drawmdsprite(spritetype *tspr)
bglLoadIdentity(); bglLoadIdentity();
scale = (1.0/4.0); scale = (1.0/4.0);
scale *= m->scale; scale *= m->scale;
scale *= m->bscale; if (pr_overridemodelscale) {
scale *= pr_overridemodelscale;
} else {
scale *= m->bscale;
}
if (tspriteptr[MAXSPRITESONSCREEN] == tspr) { if (tspriteptr[MAXSPRITESONSCREEN] == tspr) {
float playerang, radplayerang, cosminusradplayerang, sinminusradplayerang, hudzoom; float playerang, radplayerang, cosminusradplayerang, sinminusradplayerang, hudzoom;

View file

@ -6282,6 +6282,7 @@ void polymost_initosdfuncs(void)
{ "r_pr_hudzadd", "r_pr_hudzadd: overriden HUD zadd; see r_pr_overridehud", (void *) &pr_hudzadd, CVAR_FLOAT | CVAR_NOSAVE, -100, 100 }, { "r_pr_hudzadd", "r_pr_hudzadd: overriden HUD zadd; see r_pr_overridehud", (void *) &pr_hudzadd, CVAR_FLOAT | CVAR_NOSAVE, -100, 100 },
{ "r_pr_hudangadd", "r_pr_hudangadd: overriden HUD angadd; see r_pr_overridehud", (void *) &pr_hudangadd, CVAR_INT | CVAR_NOSAVE, -512, 512 }, { "r_pr_hudangadd", "r_pr_hudangadd: overriden HUD angadd; see r_pr_overridehud", (void *) &pr_hudangadd, CVAR_INT | CVAR_NOSAVE, -512, 512 },
{ "r_pr_hudfov", "r_pr_hudfov: overriden HUD fov; see r_pr_overridehud", (void *) &pr_hudfov, CVAR_INT | CVAR_NOSAVE, 0, 1023 }, { "r_pr_hudfov", "r_pr_hudfov: overriden HUD fov; see r_pr_overridehud", (void *) &pr_hudfov, CVAR_INT | CVAR_NOSAVE, 0, 1023 },
{ "r_pr_overridemodelscale", "r_pr_overridemodelscale: overrides model scale if non-zero; use it to fine-tune DEF tokens", (void *) &pr_overridemodelscale, CVAR_FLOAT | CVAR_NOSAVE, 0, 500 },
{ "r_pr_ati_fboworkaround", "r_pr_ati_fboworkaround: enable this to workaround an ATI driver bug that causes sprite shadows to be square - you need to restart the renderer for it to take effect", (void *) &pr_ati_fboworkaround, CVAR_BOOL | CVAR_NOSAVE, 0, 1 }, { "r_pr_ati_fboworkaround", "r_pr_ati_fboworkaround: enable this to workaround an ATI driver bug that causes sprite shadows to be square - you need to restart the renderer for it to take effect", (void *) &pr_ati_fboworkaround, CVAR_BOOL | CVAR_NOSAVE, 0, 1 },
{ "r_pr_ati_nodepthoffset", "r_pr_ati_nodepthoffset: enable this to workaround an ATI driver bug that causes sprite drawing to freeze the game on Radeon X1x00 hardware - you need to restart the renderer for it to take effect", (void *) &pr_ati_nodepthoffset, CVAR_BOOL | CVAR_NOSAVE, 0, 1 }, { "r_pr_ati_nodepthoffset", "r_pr_ati_nodepthoffset: enable this to workaround an ATI driver bug that causes sprite drawing to freeze the game on Radeon X1x00 hardware - you need to restart the renderer for it to take effect", (void *) &pr_ati_nodepthoffset, CVAR_BOOL | CVAR_NOSAVE, 0, 1 },
#endif #endif