mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Clean up a couple of other getrendermode() related bits that the previous commit missed
git-svn-id: https://svn.eduke32.com/eduke32@3347 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
79e45c23d5
commit
cbf9d2cff3
2 changed files with 18 additions and 10 deletions
|
@ -16,7 +16,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum {
|
||||
enum rendmode_t {
|
||||
REND_CLASSIC,
|
||||
REND_POLYMOST = 3,
|
||||
REND_POLYMER
|
||||
|
@ -579,7 +579,7 @@ EXTERN int32_t editorzrange[2];
|
|||
static inline int32_t getrendermode(void)
|
||||
{
|
||||
#ifndef USE_OPENGL
|
||||
return 0;
|
||||
return REND_CLASSIC;
|
||||
#else
|
||||
return rendmode;
|
||||
#endif
|
||||
|
|
|
@ -215,19 +215,27 @@ static int32_t osdfunc_setrendermode(const osdfuncparm_t *parm)
|
|||
int32_t m;
|
||||
char *p;
|
||||
|
||||
const char *modestrs[] =
|
||||
{
|
||||
"classic software", "",
|
||||
"", "polygonal OpenGL", "great justice (Polymer)"
|
||||
};
|
||||
|
||||
if (parm->numparms != 1) return OSDCMD_SHOWHELP;
|
||||
m = Bstrtol(parm->parms[0], &p, 10);
|
||||
|
||||
if (m < 0 || m > 4) return OSDCMD_SHOWHELP;
|
||||
if (m < REND_CLASSIC || m > REND_POLYMER) return OSDCMD_SHOWHELP;
|
||||
|
||||
setrendermode(m);
|
||||
OSD_Printf("Rendering method changed to %s\n", modestrs[ getrendermode()]);
|
||||
|
||||
switch(getrendermode())
|
||||
{
|
||||
case REND_CLASSIC:
|
||||
p = "classic software";
|
||||
break;
|
||||
case REND_POLYMOST:
|
||||
p = "polygonal OpenGL";
|
||||
break;
|
||||
case REND_POLYMER:
|
||||
p = "great justice (Polymer)";
|
||||
break;
|
||||
}
|
||||
|
||||
OSD_Printf("Rendering method changed to %s\n", p);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue