Add predefined REND_CLASSIC, REND_POLYMOST and REND_POLYMER constants and use them everywhere getrendermode() is called.

git-svn-id: https://svn.eduke32.com/eduke32@3346 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2012-12-30 20:34:34 +00:00
parent 5fc9bb9779
commit 79e45c23d5
13 changed files with 96 additions and 90 deletions

View file

@ -16,6 +16,12 @@
extern "C" { extern "C" {
#endif #endif
enum {
REND_CLASSIC,
REND_POLYMOST = 3,
REND_POLYMER
};
#define PI 3.14159265358979323846 #define PI 3.14159265358979323846
#define MAXSECTORSV8 4096 #define MAXSECTORSV8 4096

View file

@ -683,7 +683,7 @@ static void yax_scanbunches(int32_t bbeg, int32_t numhere, const uint8_t *lastgo
if (checkthisec) if (checkthisec)
{ {
numscans = numbunches = 0; numscans = numbunches = 0;
if (getrendermode()==0) if (getrendermode() == REND_CLASSIC)
scansector(k); scansector(k);
#ifdef USE_OPENGL #ifdef USE_OPENGL
else else
@ -823,14 +823,14 @@ static void yax_copytsprites()
void yax_preparedrawrooms(void) void yax_preparedrawrooms(void)
{ {
if (getrendermode()==4 || numyaxbunches==0) if (getrendermode() == REND_POLYMER || numyaxbunches==0)
return; return;
g_nodraw = 1; g_nodraw = 1;
Bmemset(yax_spritesortcnt, 0, sizeof(yax_spritesortcnt)); Bmemset(yax_spritesortcnt, 0, sizeof(yax_spritesortcnt));
Bmemset(haveymost, 0, (numyaxbunches+7)>>3); Bmemset(haveymost, 0, (numyaxbunches+7)>>3);
if (getrendermode()==0 && ymostallocsize < xdimen*numyaxbunches) if (getrendermode() == REND_CLASSIC && ymostallocsize < xdimen*numyaxbunches)
{ {
ymostallocsize = xdimen*numyaxbunches; ymostallocsize = xdimen*numyaxbunches;
yumost = (int16_t *)Brealloc(yumost, ymostallocsize*sizeof(int16_t)); yumost = (int16_t *)Brealloc(yumost, ymostallocsize*sizeof(int16_t));
@ -864,7 +864,7 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
uint64_t t; uint64_t t;
#endif #endif
if (getrendermode()==4 || numyaxbunches==0) if (getrendermode() == REND_POLYMER || numyaxbunches==0)
{ {
#ifdef ENGINE_SCREENSHOT_DEBUG #ifdef ENGINE_SCREENSHOT_DEBUG
engine_screenshot = 0; engine_screenshot = 0;
@ -906,7 +906,7 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
j = yax_getbunch(i, cf); j = yax_getbunch(i, cf);
if (j >= 0 && !(havebunch[j>>3]&(1<<(j&7)))) if (j >= 0 && !(havebunch[j>>3]&(1<<(j&7))))
{ {
if (getrendermode()==0 && (haveymost[j>>3]&(1<<(j&7)))==0) if (getrendermode() == REND_CLASSIC && (haveymost[j>>3]&(1<<(j&7)))==0)
{ {
yaxdebug("%s, l %d: skipped bunch %d (no *most)", cf?"v":"^", lev, j); yaxdebug("%s, l %d: skipped bunch %d (no *most)", cf?"v":"^", lev, j);
continue; continue;
@ -996,7 +996,7 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
if (editstatus==1) if (editstatus==1)
{ {
if (getrendermode()==0) if (getrendermode() == REND_CLASSIC)
{ {
begindrawing(); begindrawing();
draw_rainbow_background(); draw_rainbow_background();
@ -1097,7 +1097,7 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
#endif #endif
#ifdef YAX_DEBUG_YMOSTS #ifdef YAX_DEBUG_YMOSTS
if (getrendermode()==0 && numyaxbunches>0) if (getrendermode() == REND_CLASSIC && numyaxbunches>0)
{ {
char purple = getclosestcol(63, 0, 63); char purple = getclosestcol(63, 0, 63);
char yellow = getclosestcol(63, 63, 0); char yellow = getclosestcol(63, 63, 0);
@ -2390,7 +2390,7 @@ static void setpalettefade_calc(uint8_t offset);
void fade_screen_black(int32_t moreopaquep) void fade_screen_black(int32_t moreopaquep)
{ {
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3) if (getrendermode() >= REND_POLYMOST)
{ {
fullscreen_tint_gl(0,0,0, moreopaquep ? 168 : 84); fullscreen_tint_gl(0,0,0, moreopaquep ? 168 : 84);
} }
@ -8510,11 +8510,11 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
{ {
// switch on renderers to make fog look almost the same everywhere // switch on renderers to make fog look almost the same everywhere
case 0: case REND_CLASSIC:
globalvisibility = mulscale16(g_visibility,i); globalvisibility = mulscale16(g_visibility,i);
break; break;
#ifdef USE_OPENGL #ifdef USE_OPENGL
case 3: case REND_POLYMOST:
// NOTE: In Polymost, the fragment depth depends on the x screen size! // NOTE: In Polymost, the fragment depth depends on the x screen size!
if (r_usenewshading==2) if (r_usenewshading==2)
globalvisibility = scale(g_visibility<<2, xdimen, 1680); globalvisibility = scale(g_visibility<<2, xdimen, 1680);
@ -8522,7 +8522,7 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
globalvisibility = scale(g_visibility<<2, xdimen, 1100); globalvisibility = scale(g_visibility<<2, xdimen, 1100);
break; break;
# ifdef POLYMER # ifdef POLYMER
case 4: case REND_POLYMER:
globalvisibility = g_visibility<<2; globalvisibility = g_visibility<<2;
break; break;
# endif # endif
@ -8545,7 +8545,7 @@ int32_t drawrooms(int32_t daposx, int32_t daposy, int32_t daposz,
Bmemset(gotsector, 0, ((numsectors+7)>>3)); Bmemset(gotsector, 0, ((numsectors+7)>>3));
if (getrendermode()!=0 if (getrendermode() != REND_CLASSIC
#ifdef YAX_ENABLE #ifdef YAX_ENABLE
|| yax_globallev==YAX_MAXDRAWS || yax_globallev==YAX_MAXDRAWS
#endif #endif
@ -13470,7 +13470,7 @@ int32_t setaspect_new_use_dimen = 0;
void setaspect_new() void setaspect_new()
{ {
if (r_usenewaspect && newaspect_enable && getrendermode()!=4) if (r_usenewaspect && newaspect_enable && getrendermode() != REND_POLYMER)
{ {
// the correction factor 100/107 has been found // the correction factor 100/107 has been found
// out experimentally. squares ftw! // out experimentally. squares ftw!

View file

@ -486,7 +486,7 @@ void A_DeleteSprite(int32_t s)
} }
#ifdef POLYMER #ifdef POLYMER
if (getrendermode() == 4 && actor[s].lightptr != NULL) if (getrendermode() == REND_POLYMER && actor[s].lightptr != NULL)
A_DeleteLight(s); A_DeleteLight(s);
#endif #endif
@ -689,7 +689,7 @@ void G_AddGameLight(int32_t radius, int32_t srcsprite, int32_t zoffset, int32_t
#ifdef POLYMER #ifdef POLYMER
spritetype *s = &sprite[srcsprite]; spritetype *s = &sprite[srcsprite];
if (getrendermode() != 4) if (getrendermode() != REND_POLYMER)
return; return;
if (actor[srcsprite].lightptr == NULL) if (actor[srcsprite].lightptr == NULL)
@ -7714,7 +7714,7 @@ static void G_DoEffectorLights(void) // STATNUM 14
#ifdef POLYMER #ifdef POLYMER
case SE_49_POINT_LIGHT: case SE_49_POINT_LIGHT:
{ {
if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == 4 && if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == REND_POLYMER &&
!(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) !(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384))
{ {
if (actor[i].lightptr == NULL) if (actor[i].lightptr == NULL)
@ -7780,7 +7780,7 @@ static void G_DoEffectorLights(void) // STATNUM 14
} }
case SE_50_SPOT_LIGHT: case SE_50_SPOT_LIGHT:
{ {
if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == 4 && if (!A_CheckSpriteFlags(i, SPRITE_NOLIGHT) && getrendermode() == REND_POLYMER &&
!(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384)) !(A_CheckSpriteFlags(i, SPRITE_USEACTIVATOR) && sector[sprite[i].sectnum].lotag & 16384))
{ {
if (actor[i].lightptr == NULL) if (actor[i].lightptr == NULL)
@ -8254,7 +8254,7 @@ void G_MoveWorld(void)
int32_t j = nextspritestat[i]; int32_t j = nextspritestat[i];
#ifdef POLYMER #ifdef POLYMER
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
A_DoLight(i); A_DoLight(i);
#endif #endif
if (!G_HaveEvent(EVENT_GAME) || A_CheckSpriteFlags(i, SPRITE_NOEVENTCODE)) if (!G_HaveEvent(EVENT_GAME) || A_CheckSpriteFlags(i, SPRITE_NOEVENTCODE))

View file

@ -241,7 +241,7 @@ void G_PlayAnim(const char *fn,char t)
} }
#ifdef USE_LIBVPX #ifdef USE_LIBVPX
while (getrendermode() >= 3 && glinfo.glsl) // if, really while (getrendermode() >= REND_POLYMOST && glinfo.glsl) // if, really
{ {
char vpxfn[BMAX_PATH], *dot; char vpxfn[BMAX_PATH], *dot;
animvpx_ivf_header_t info; animvpx_ivf_header_t info;

View file

@ -4162,7 +4162,7 @@ restart:
tilescreen_drawrest(iSelected, showmsg); tilescreen_drawrest(iSelected, showmsg);
if (getrendermode()>=3 && qsetmode==200 && lazyselector) if (getrendermode() >= REND_POLYMOST && qsetmode==200 && lazyselector)
{ {
if (runi==0) if (runi==0)
{ {
@ -10589,7 +10589,7 @@ void ExtPreCheckKeys(void) // just before drawrooms
#ifdef POLYMER #ifdef POLYMER
if (sprite[i].lotag == 49) if (sprite[i].lotag == 49)
{ {
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
{ {
if (spritelightptr[i] == NULL) if (spritelightptr[i] == NULL)
{ {
@ -10622,7 +10622,7 @@ void ExtPreCheckKeys(void) // just before drawrooms
} }
if (sprite[i].lotag == 50) if (sprite[i].lotag == 50)
{ {
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
{ {
if (spritelightptr[i] == NULL) if (spritelightptr[i] == NULL)
{ {

View file

@ -796,7 +796,7 @@ nextdemo_nomenu:
{ {
framewaiting--; framewaiting--;
#if 0 #if 0
if (ud.statusbarmode == 1 && (ud.statusbarscale == 100 || !getrendermode())) if (ud.statusbarmode == 1 && (ud.statusbarscale == 100 || getrendermode() == REND_CLASSIC))
{ {
ud.statusbarmode = 0; ud.statusbarmode = 0;
G_UpdateScreenArea(); G_UpdateScreenArea();

View file

@ -758,7 +758,7 @@ static void G_DrawInvNum(int32_t x, int32_t yofs, int32_t y, char num1, char ha,
if (num1 > 99) if (num1 > 99)
{ {
if (shd && ud.screen_size == 4 && getrendermode() >= 3 && althud_shadows) if (shd && ud.screen_size == 4 && getrendermode() >= REND_POLYMOST && althud_shadows)
{ {
for (i=0; i<=2; i++) for (i=0; i<=2; i++)
rotatesprite_fs(sbarx(x+(-4+4*i)+1),sbyp1,sbscale,0,THREEBYFIVE+dabuf[i]-'0', rotatesprite_fs(sbarx(x+(-4+4*i)+1),sbyp1,sbscale,0,THREEBYFIVE+dabuf[i]-'0',
@ -772,7 +772,7 @@ static void G_DrawInvNum(int32_t x, int32_t yofs, int32_t y, char num1, char ha,
if (num1 > 9) if (num1 > 9)
{ {
if (shd && ud.screen_size == 4 && getrendermode() >= 3 && althud_shadows) if (shd && ud.screen_size == 4 && getrendermode() >= REND_POLYMOST && althud_shadows)
{ {
rotatesprite_fs(sbarx(x+1),sbyp1,sbscale,0,THREEBYFIVE+dabuf[0]-'0',ha,4,POLYMOSTTRANS|sbits); rotatesprite_fs(sbarx(x+1),sbyp1,sbscale,0,THREEBYFIVE+dabuf[0]-'0',ha,4,POLYMOSTTRANS|sbits);
rotatesprite_fs(sbarx(x+4+1),sbyp1,sbscale,0,THREEBYFIVE+dabuf[1]-'0',ha,4,POLYMOSTTRANS|sbits); rotatesprite_fs(sbarx(x+4+1),sbyp1,sbscale,0,THREEBYFIVE+dabuf[1]-'0',ha,4,POLYMOSTTRANS|sbits);
@ -1038,7 +1038,7 @@ static void G_DrawAltDigiNum(int32_t x, int32_t y, int32_t n, char s, int32_t cs
for (k=0; k<i; k++) for (k=0; k<i; k++)
{ {
p = althud_numbertile + b[k]-'0'; p = althud_numbertile + b[k]-'0';
if (shd && getrendermode() >= 3 && althud_shadows) if (shd && getrendermode() >= REND_POLYMOST && althud_shadows)
rotatesprite_fs(sbarxr(c+j-1),sbary(y+1),sbscale,0,p,s,4,cs|POLYMOSTTRANS2); rotatesprite_fs(sbarxr(c+j-1),sbary(y+1),sbscale,0,p,s,4,cs|POLYMOSTTRANS2);
rotatesprite_fs(sbarxr(c+j),sbary(y),sbscale,0,p,s,althud_numberpal,cs); rotatesprite_fs(sbarxr(c+j),sbary(y),sbscale,0,p,s,althud_numberpal,cs);
j -= tilesizx[p]+1; j -= tilesizx[p]+1;
@ -1050,7 +1050,7 @@ static void G_DrawAltDigiNum(int32_t x, int32_t y, int32_t n, char s, int32_t cs
for (k=0; k<i; k++) for (k=0; k<i; k++)
{ {
p = althud_numbertile + b[k]-'0'; p = althud_numbertile + b[k]-'0';
if (shd && getrendermode() >= 3 && althud_shadows) if (shd && getrendermode() >= REND_POLYMOST && althud_shadows)
rotatesprite_fs(sbarx(c+j+1),sbary(y+1),sbscale,0,p,s,4,cs|POLYMOSTTRANS2); rotatesprite_fs(sbarx(c+j+1),sbary(y+1),sbscale,0,p,s,4,cs|POLYMOSTTRANS2);
rotatesprite_fs(sbarx(c+j),sbary(y),sbscale,0,p,s,althud_numberpal,cs); rotatesprite_fs(sbarx(c+j),sbary(y),sbscale,0,p,s,althud_numberpal,cs);
j += tilesizx[p]+1; j += tilesizx[p]+1;
@ -1206,7 +1206,7 @@ static void G_DrawStatusBar(int32_t snum)
Bmemcpy(item_icons, iicons, sizeof(item_icons)); Bmemcpy(item_icons, iicons, sizeof(item_icons));
} }
if (getrendermode() >= 3) pus = NUMPAGES; // JBF 20040101: always redraw in GL if (getrendermode() >= REND_POLYMOST) pus = NUMPAGES; // JBF 20040101: always redraw in GL
if ((g_netServer || ud.multimode > 1) && ((GametypeFlags[ud.coop] & GAMETYPE_FRAGBAR) || g_fakeMultiMode)) if ((g_netServer || ud.multimode > 1) && ((GametypeFlags[ud.coop] & GAMETYPE_FRAGBAR) || g_fakeMultiMode))
{ {
@ -1251,7 +1251,7 @@ static void G_DrawStatusBar(int32_t snum)
// rotatesprite_fs(sbarx(5+1),sbary(200-25+1),sb15h,0,SIXPAK,0,4,10+16+1+32); // rotatesprite_fs(sbarx(5+1),sbary(200-25+1),sb15h,0,SIXPAK,0,4,10+16+1+32);
// rotatesprite_fs(sbarx(5),sbary(200-25),sb15h,0,SIXPAK,0,0,10+16); // rotatesprite_fs(sbarx(5),sbary(200-25),sb15h,0,SIXPAK,0,0,10+16);
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
rotatesprite_fs(sbarx(2+1),sbary(200-21+1),sb15h,0,COLA,0,4,10+16+256+POLYMOSTTRANS2); rotatesprite_fs(sbarx(2+1),sbary(200-21+1),sb15h,0,COLA,0,4,10+16+256+POLYMOSTTRANS2);
rotatesprite_fs(sbarx(2),sbary(200-21),sb15h,0,COLA,0,0,10+16+256); rotatesprite_fs(sbarx(2),sbary(200-21),sb15h,0,COLA,0,0,10+16+256);
@ -1265,7 +1265,7 @@ static void G_DrawStatusBar(int32_t snum)
G_DrawAltDigiNum(40,-(200-22),p->last_extra,s,10+16+256); G_DrawAltDigiNum(40,-(200-22),p->last_extra,s,10+16+256);
} }
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
rotatesprite_fs(sbarx(62+1),sbary(200-25+1),sb15h,0,SHIELD,0,4,10+16+POLYMOSTTRANS2+256); rotatesprite_fs(sbarx(62+1),sbary(200-25+1),sb15h,0,SHIELD,0,4,10+16+POLYMOSTTRANS2+256);
rotatesprite_fs(sbarx(62),sbary(200-25),sb15h,0,SHIELD,0,0,10+16+256); rotatesprite_fs(sbarx(62),sbary(200-25),sb15h,0,SHIELD,0,0,10+16+256);
@ -1275,7 +1275,7 @@ static void G_DrawStatusBar(int32_t snum)
G_DrawAltDigiNum(105,-(200-22),lAmount,-16,10+16+256); G_DrawAltDigiNum(105,-(200-22),lAmount,-16,10+16+256);
} }
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
{ {
if (p->got_access&1) rotatesprite_fs(sbarxr(39-1),sbary(200-43+1),sb15,0,ACCESSCARD,0,4,10+16+POLYMOSTTRANS2+512); if (p->got_access&1) rotatesprite_fs(sbarxr(39-1),sbary(200-43+1),sb15,0,ACCESSCARD,0,4,10+16+POLYMOSTTRANS2+512);
if (p->got_access&4) rotatesprite_fs(sbarxr(34-1),sbary(200-41+1),sb15,0,ACCESSCARD,0,4,10+16+POLYMOSTTRANS2+512); if (p->got_access&4) rotatesprite_fs(sbarxr(34-1),sbary(200-41+1),sb15,0,ACCESSCARD,0,4,10+16+POLYMOSTTRANS2+512);
@ -1288,7 +1288,7 @@ static void G_DrawStatusBar(int32_t snum)
i = (p->curr_weapon == PISTOL_WEAPON) ? 16384 : 32768; i = (p->curr_weapon == PISTOL_WEAPON) ? 16384 : 32768;
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
rotatesprite_fs(sbarxr(57-1),sbary(200-15+1),sbarsc(i),0,ammo_sprites[p->curr_weapon],0,4,10+POLYMOSTTRANS2+512); rotatesprite_fs(sbarxr(57-1),sbary(200-15+1),sbarsc(i),0,ammo_sprites[p->curr_weapon],0,4,10+POLYMOSTTRANS2+512);
rotatesprite_fs(sbarxr(57),sbary(200-15),sbarsc(i),0,ammo_sprites[p->curr_weapon],0,0,10+512); rotatesprite_fs(sbarxr(57),sbary(200-15),sbarsc(i),0,ammo_sprites[p->curr_weapon],0,0,10+512);
@ -1309,12 +1309,12 @@ static void G_DrawStatusBar(int32_t snum)
i = ((unsigned)p->inven_icon < ICON_MAX) ? item_icons[p->inven_icon] : -1; i = ((unsigned)p->inven_icon < ICON_MAX) ? item_icons[p->inven_icon] : -1;
if (i >= 0) if (i >= 0)
{ {
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
rotatesprite_fs(sbarx(231-o+1),sbary(200-21-2+1),sb16,0,i,0,4, orient+POLYMOSTTRANS2); rotatesprite_fs(sbarx(231-o+1),sbary(200-21-2+1),sb16,0,i,0,4, orient+POLYMOSTTRANS2);
rotatesprite_fs(sbarx(231-o),sbary(200-21-2),sb16,0,i,0,0,orient); rotatesprite_fs(sbarx(231-o),sbary(200-21-2),sb16,0,i,0,0,orient);
} }
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
minitext(292-30-o+1,190-3+1,"%",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX); minitext(292-30-o+1,190-3+1,"%",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX);
minitext(292-30-o,190-3,"%",6, orient+ROTATESPRITE_MAX); minitext(292-30-o,190-3,"%",6, orient+ROTATESPRITE_MAX);
@ -1325,20 +1325,20 @@ static void G_DrawStatusBar(int32_t snum)
if (j > 0) if (j > 0)
{ {
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
minitext(288-30-o+1,180-3+1,"On",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX); minitext(288-30-o+1,180-3+1,"On",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX);
minitext(288-30-o,180-3,"On",0, orient+ROTATESPRITE_MAX); minitext(288-30-o,180-3,"On",0, orient+ROTATESPRITE_MAX);
} }
else if ((uint32_t)j != 0x80000000) else if ((uint32_t)j != 0x80000000)
{ {
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
minitext(284-30-o+1,180-3+1,"Off",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX); minitext(284-30-o+1,180-3+1,"Off",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX);
minitext(284-30-o,180-3,"Off",2, orient+ROTATESPRITE_MAX); minitext(284-30-o,180-3,"Off",2, orient+ROTATESPRITE_MAX);
} }
if (p->inven_icon >= ICON_SCUBA) if (p->inven_icon >= ICON_SCUBA)
{ {
if (getrendermode() >= 3 && althud_shadows) if (getrendermode() >= REND_POLYMOST && althud_shadows)
minitext(284-35-o+1,180-3+1,"Auto",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX); minitext(284-35-o+1,180-3+1,"Auto",4, POLYMOSTTRANS+orient+ROTATESPRITE_MAX);
minitext(284-35-o,180-3,"Auto",2, orient+ROTATESPRITE_MAX); minitext(284-35-o,180-3,"Auto",2, orient+ROTATESPRITE_MAX);
} }
@ -1949,7 +1949,7 @@ void G_FadePalette(int32_t r,int32_t g,int32_t b,int32_t e)
{ {
setpalettefade(r,g,b,e&63); setpalettefade(r,g,b,e&63);
// if (getrendermode() >= 3) pus = pub = NUMPAGES; // JBF 20040110: redraw the status bar next time // if (getrendermode() >= REND_POLYMOST) pus = pub = NUMPAGES; // JBF 20040110: redraw the status bar next time
if ((e&128) == 0) if ((e&128) == 0)
{ {
int32_t tc; int32_t tc;
@ -1965,7 +1965,7 @@ void G_FadePalette(int32_t r,int32_t g,int32_t b,int32_t e)
// STEP must evenly divide END-START, i.e. abs(end-start)%step == 0 // STEP must evenly divide END-START, i.e. abs(end-start)%step == 0
void fadepal(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_t step) void fadepal(int32_t r, int32_t g, int32_t b, int32_t start, int32_t end, int32_t step)
{ {
if (getrendermode() >= 3) if (getrendermode() >= REND_POLYMOST)
{ {
G_FadePalette(r, g, b, end); G_FadePalette(r, g, b, end);
return; return;
@ -2483,7 +2483,7 @@ void G_SetCrosshairColor(int32_t r, int32_t g, int32_t b)
ii = tilesizx[CROSSHAIR]*tilesizy[CROSSHAIR]; ii = tilesizx[CROSSHAIR]*tilesizy[CROSSHAIR];
if (ii <= 0) return; if (ii <= 0) return;
if (getrendermode() < 3) if (getrendermode() != REND_CLASSIC)
i = getclosestcol(CrosshairColors.r>>2, CrosshairColors.g>>2, CrosshairColors.b>>2); i = getclosestcol(CrosshairColors.r>>2, CrosshairColors.g>>2, CrosshairColors.b>>2);
else i = getclosestcol(63, 63, 63); // use white in GL so we can tint it to the right color else i = getclosestcol(63, 63, 63); // use white in GL so we can tint it to the right color
@ -2623,7 +2623,7 @@ void G_DisplayRest(int32_t smoothratio)
#ifdef USE_OPENGL #ifdef USE_OPENGL
// this takes care of fullscreen tint for OpenGL // this takes care of fullscreen tint for OpenGL
if (getrendermode() >= 3) if (getrendermode() >= REND_POLYMOST)
{ {
if (pp->palette == WATERPAL) if (pp->palette == WATERPAL)
{ {
@ -3139,7 +3139,7 @@ void G_DrawBackground(void)
clearallviews(0); clearallviews(0);
// when not rendering a game, fullscreen wipe // when not rendering a game, fullscreen wipe
#define MENUTILE (!getrendermode()?MENUSCREEN:LOADSCREEN) #define MENUTILE (getrendermode() == REND_CLASSIC?MENUSCREEN:LOADSCREEN)
// Gv_SetVar(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1); // Gv_SetVar(g_iReturnVarID,tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE, -1, -1);
bgtile = (tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE); bgtile = (tilesizx[MENUTILE]==320&&tilesizy[MENUTILE]==200?MENUTILE:BIGHOLE);
if (G_HaveEvent(EVENT_GETMENUTILE)) if (G_HaveEvent(EVENT_GETMENUTILE))
@ -3321,7 +3321,7 @@ static void G_SE40(int32_t smoothratio)
} }
#ifdef POLYMER #ifdef POLYMER
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
polymer_setanimatesprites(G_DoSpriteAnimations, ud.camera.x, ud.camera.y, ud.cameraang, smoothratio); polymer_setanimatesprites(G_DoSpriteAnimations, ud.camera.x, ud.camera.y, ud.cameraang, smoothratio);
#endif #endif
@ -3384,7 +3384,7 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, int32_t a, int32_t horiz, i
{ {
if ((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) if ((gotpic[MIRROR>>3]&(1<<(MIRROR&7)))
#ifdef POLYMER #ifdef POLYMER
&& (getrendermode() != 4) && (getrendermode() != REND_POLYMER)
#endif #endif
) )
{ {
@ -3436,7 +3436,7 @@ void G_HandleMirror(int32_t x, int32_t y, int32_t z, int32_t a, int32_t horiz, i
j = g_visibility; j = g_visibility;
g_visibility = (j>>1) + (j>>2); g_visibility = (j>>1) + (j>>2);
if (getrendermode()==0) if (getrendermode() == REND_CLASSIC)
{ {
int32_t didmirror; int32_t didmirror;
@ -3480,14 +3480,14 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
if (g_networkMode == NET_DEDICATED_SERVER) return; if (g_networkMode == NET_DEDICATED_SERVER) return;
if (pub > 0 || getrendermode() >= 3) // JBF 20040101: redraw background always if (pub > 0 || getrendermode() >= REND_POLYMOST) // JBF 20040101: redraw background always
{ {
if (ud.screen_size >= 8) if (ud.screen_size >= 8)
G_DrawBackground(); G_DrawBackground();
pub = 0; pub = 0;
} }
if (ud.overhead_on == 2 || ud.show_help || (p->cursectnum == -1 && getrendermode() < 3)) if (ud.overhead_on == 2 || ud.show_help || (p->cursectnum == -1 && getrendermode() != REND_CLASSIC))
return; return;
if (r_usenewaspect) if (r_usenewaspect)
@ -3522,7 +3522,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
G_SE40(smoothratio); G_SE40(smoothratio);
#ifdef POLYMER #ifdef POLYMER
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
polymer_setanimatesprites(G_DoSpriteAnimations, s->x, s->y, ud.cameraang, smoothratio); polymer_setanimatesprites(G_DoSpriteAnimations, s->x, s->y, ud.cameraang, smoothratio);
#endif #endif
yax_preparedrawrooms(); yax_preparedrawrooms();
@ -3538,7 +3538,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
const int32_t vr = divscale22(1,sprite[p->i].yrepeat+28); const int32_t vr = divscale22(1,sprite[p->i].yrepeat+28);
const int32_t software_screen_tilting = const int32_t software_screen_tilting =
(getrendermode() == 0 && ((ud.screen_tilting && p->rotscrnang && !g_fakeMultiMode) || !ud.detail)); (getrendermode() == REND_CLASSIC && ((ud.screen_tilting && p->rotscrnang && !g_fakeMultiMode) || !ud.detail));
if (!r_usenewaspect) if (!r_usenewaspect)
{ {
@ -3558,7 +3558,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
if (waloff[TILE_SAVESHOT] == 0) if (waloff[TILE_SAVESHOT] == 0)
allocache(&waloff[TILE_SAVESHOT],200*320,&walock[TILE_SAVESHOT]); allocache(&waloff[TILE_SAVESHOT],200*320,&walock[TILE_SAVESHOT]);
if (getrendermode()==0) if (getrendermode() == REND_CLASSIC)
setviewtotile(TILE_SAVESHOT, 200, 320); setviewtotile(TILE_SAVESHOT, 200, 320);
} }
else if (software_screen_tilting) else if (software_screen_tilting)
@ -3622,7 +3622,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
tmpvr = i>>1; tmpvr = i>>1;
tmpyx = (65536*ydim*8)/(xdim*5); tmpyx = (65536*ydim*8)/(xdim*5);
} }
else if (getrendermode() > 0 && (ud.screen_tilting && !g_fakeMultiMode) /*&& (p->rotscrnang || p->orotscrnang)*/) else if (getrendermode() >= REND_POLYMOST && (ud.screen_tilting && !g_fakeMultiMode) /*&& (p->rotscrnang || p->orotscrnang)*/)
{ {
#ifdef USE_OPENGL #ifdef USE_OPENGL
setrollangle(p->orotscrnang + mulscale16(((p->rotscrnang - p->orotscrnang + 1024)&2047)-1024, smoothratio)); setrollangle(p->orotscrnang + mulscale16(((p->rotscrnang - p->orotscrnang + 1024)&2047)-1024, smoothratio));
@ -3743,7 +3743,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
G_SE40(smoothratio); G_SE40(smoothratio);
#ifdef POLYMER #ifdef POLYMER
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
polymer_setanimatesprites(G_DoSpriteAnimations, ud.camera.x,ud.camera.y,ud.cameraang,smoothratio); polymer_setanimatesprites(G_DoSpriteAnimations, ud.camera.x,ud.camera.y,ud.cameraang,smoothratio);
#endif #endif
// for G_PrintCoords // for G_PrintCoords
@ -3794,7 +3794,7 @@ void G_DrawRooms(int32_t snum, int32_t smoothratio)
{ {
g_screenCapture = 0; g_screenCapture = 0;
if (getrendermode()==0) if (getrendermode() == REND_CLASSIC)
{ {
setviewback(); setviewback();
// walock[TILE_SAVESHOT] = 1; // walock[TILE_SAVESHOT] = 1;
@ -6275,7 +6275,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
continue; continue;
case CHAIR3__STATIC: case CHAIR3__STATIC:
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
{ {
t->cstat &= ~4; t->cstat &= ~4;
break; break;
@ -6489,7 +6489,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
break; break;
case RPG__STATIC: case RPG__STATIC:
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0 && if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0 &&
!(spriteext[i].flags & SPREXT_NOTMD)) !(spriteext[i].flags & SPREXT_NOTMD))
{ {
int32_t v = getangle(t->xvel, t->zvel>>4); int32_t v = getangle(t->xvel, t->zvel>>4);
@ -6505,7 +6505,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
case RECON__STATIC: case RECON__STATIC:
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
{ {
t->cstat &= ~4; t->cstat &= ~4;
break; break;
@ -6621,7 +6621,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
if (s->owner == -1) if (s->owner == -1)
{ {
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
{ {
k = 0; k = 0;
t->cstat &= ~4; t->cstat &= ~4;
@ -6664,7 +6664,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
if (s->owner >= 0 && display_mirror == 0 && g_player[p].ps->over_shoulder_on == 0) if (s->owner >= 0 && display_mirror == 0 && g_player[p].ps->over_shoulder_on == 0)
if ((!g_netServer && ud.multimode < 2) || ((g_netServer || ud.multimode > 1) && p == screenpeek)) if ((!g_netServer && ud.multimode < 2) || ((g_netServer || ud.multimode > 1) && p == screenpeek))
{ {
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
t->cstat |= 16384; t->cstat |= 16384;
else else
{ {
@ -6674,7 +6674,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
} }
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
{ {
k = 0; k = 0;
t->cstat &= ~4; t->cstat &= ~4;
@ -6766,7 +6766,7 @@ PALONLY:
#endif #endif
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(s->picnum,t->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
{ {
k = 0; k = 0;
t->cstat &= ~4; t->cstat &= ~4;
@ -6851,7 +6851,7 @@ skip:
if (actor[i].flags & SPRITE_NOFLOORSHADOW) if (actor[i].flags & SPRITE_NOFLOORSHADOW)
continue; continue;
if (ud.shadows && spritesortcnt < (MAXSPRITESONSCREEN-2) && getrendermode() != 4) if (ud.shadows && spritesortcnt < (MAXSPRITESONSCREEN-2) && getrendermode() != REND_POLYMER)
{ {
int32_t daz; int32_t daz;
@ -6885,14 +6885,14 @@ skip:
newt->yrepeat = yrep; newt->yrepeat = yrep;
*/ */
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(t->picnum,t->pal) >= 0)
{ {
newt->yrepeat = 0; newt->yrepeat = 0;
// 512:trans reverse // 512:trans reverse
//1024:tell MD2SPRITE.C to use Z-buffer hacks to hide overdraw issues //1024:tell MD2SPRITE.C to use Z-buffer hacks to hide overdraw issues
newt->cstat |= (512+1024); newt->cstat |= (512+1024);
} }
else if (getrendermode() >= 3) else if (getrendermode() >= REND_POLYMOST)
{ {
int32_t ii; int32_t ii;
@ -6953,7 +6953,7 @@ skip:
break; break;
case PLAYERONWATER__STATIC: case PLAYERONWATER__STATIC:
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(s->picnum,s->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(s->picnum,s->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
{ {
k = 0; k = 0;
t->cstat &= ~4; t->cstat &= ~4;
@ -7009,7 +7009,7 @@ skip:
case CAMERA1__STATIC: case CAMERA1__STATIC:
case RAT__STATIC: case RAT__STATIC:
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(s->picnum,s->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD)) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(s->picnum,s->pal) >= 0 && !(spriteext[i].flags&SPREXT_NOTMD))
{ {
t->cstat &= ~4; t->cstat &= ~4;
break; break;
@ -7553,7 +7553,7 @@ void G_HandleLocalKeys(void)
{ {
if (ud.screen_size > 0) if (ud.screen_size > 0)
S_PlaySound(THUD); S_PlaySound(THUD);
if (getrendermode() >= 3 && ud.screen_size == 8 && ud.statusbarmode == 0) if (getrendermode() >= REND_POLYMOST && ud.screen_size == 8 && ud.statusbarmode == 0)
ud.statusbarmode = 1; ud.statusbarmode = 1;
else ud.screen_size -= 4; else ud.screen_size -= 4;
@ -7577,7 +7577,7 @@ void G_HandleLocalKeys(void)
if (!SHIFTS_IS_PRESSED) if (!SHIFTS_IS_PRESSED)
{ {
if (ud.screen_size < 64) S_PlaySound(THUD); if (ud.screen_size < 64) S_PlaySound(THUD);
if (getrendermode() >= 3 && ud.screen_size == 8 && ud.statusbarmode == 1) if (getrendermode() >= REND_POLYMOST && ud.screen_size == 8 && ud.statusbarmode == 1)
ud.statusbarmode = 0; ud.statusbarmode = 0;
else ud.screen_size += 4; else ud.screen_size += 4;
} }
@ -10807,7 +10807,7 @@ MAIN_LOOP_RESTART:
if (framewaiting) if (framewaiting)
{ {
framewaiting--; framewaiting--;
if (ud.statusbarmode == 1 && (ud.statusbarscale == 100 || !getrendermode())) if (ud.statusbarmode == 1 && (ud.statusbarscale == 100 || getrendermode() == REND_CLASSIC))
{ {
ud.statusbarmode = 0; ud.statusbarmode = 0;
G_UpdateScreenArea(); G_UpdateScreenArea();
@ -10831,7 +10831,7 @@ MAIN_LOOP_RESTART:
i = 65536; i = 65536;
G_DrawRooms(screenpeek,i); G_DrawRooms(screenpeek,i);
if (getrendermode() >= 3) if (getrendermode() >= REND_POLYMOST)
G_DrawBackground(); G_DrawBackground();
G_DisplayRest(i); G_DisplayRest(i);

View file

@ -2552,7 +2552,7 @@ nullquote:
G_HandleMirror(x, y, z, a, horiz, smoothratio); G_HandleMirror(x, y, z, a, horiz, smoothratio);
#ifdef POLYMER #ifdef POLYMER
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
polymer_setanimatesprites(G_DoSpriteAnimations, x,y,a,smoothratio); polymer_setanimatesprites(G_DoSpriteAnimations, x,y,a,smoothratio);
#endif #endif
yax_preparedrawrooms(); yax_preparedrawrooms();

View file

@ -2610,7 +2610,7 @@ cheat_for_port_credits2:
yy = 37; yy = 37;
for (ii=io=0; opts[ii]; ii++) for (ii=io=0; opts[ii]; ii++)
{ {
if (getrendermode()==0 && io >= 2) if (getrendermode() == REND_CLASSIC && io >= 2)
break; break;
if (opts[ii][0] == '-' && !opts[ii][1]) if (opts[ii][0] == '-' && !opts[ii][1])
@ -2635,7 +2635,7 @@ cheat_for_port_credits2:
yy = 37; yy = 37;
for (ii=io=0; opts[ii]; ii++) for (ii=io=0; opts[ii]; ii++)
{ {
if (getrendermode()==0 && io >= 2) if (getrendermode() == REND_CLASSIC && io >= 2)
break; break;
if (opts[ii][0] == '-' && !opts[ii][1]) if (opts[ii][0] == '-' && !opts[ii][1])
@ -2648,7 +2648,7 @@ cheat_for_port_credits2:
switch (io) switch (io)
{ {
case 0: case 0:
if (getrendermode() <= 3) if (getrendermode() <= REND_POLYMOST)
{ {
#ifdef USE_OPENGL #ifdef USE_OPENGL
int32_t tmp = r_usenewaspect ? 2 : glwidescreen; int32_t tmp = r_usenewaspect ? 2 : glwidescreen;
@ -2989,13 +2989,13 @@ cheat_for_port_credits2:
int32_t i; int32_t i;
i = ud.screen_size; i = ud.screen_size;
barsm(d+8,yy+7, &ud.screen_size,-4,x==io,MENUHIGHLIGHT(io),0); barsm(d+8,yy+7, &ud.screen_size,-4,x==io,MENUHIGHLIGHT(io),0);
if (getrendermode() >= 3 && i < ud.screen_size && i == 8 && ud.statusbarmode == 1) if (getrendermode() >= REND_POLYMOST && i < ud.screen_size && i == 8 && ud.statusbarmode == 1)
{ {
ud.statusbarmode = 0; ud.statusbarmode = 0;
if (ud.statusbarscale != 100) if (ud.statusbarscale != 100)
ud.screen_size = i; ud.screen_size = i;
} }
else if (getrendermode() >= 3 && i > ud.screen_size && i == 8 && ud.statusbarmode == 0) else if (getrendermode() >= REND_POLYMOST && i > ud.screen_size && i == 8 && ud.statusbarmode == 0)
{ {
if (ud.statusbarscale != 100) if (ud.statusbarscale != 100)
{ {
@ -3303,7 +3303,7 @@ cheat_for_port_credits2:
vidsets[dax++] = 0x20000|validmode[day].bpp|((validmode[day].fs&1)<<16); vidsets[dax++] = 0x20000|validmode[day].bpp|((validmode[day].fs&1)<<16);
} }
for (dax = 0; dax < (int32_t)(sizeof(vidsets)/sizeof(vidsets[1])) && vidsets[dax] != -1; dax++) for (dax = 0; dax < (int32_t)(sizeof(vidsets)/sizeof(vidsets[1])) && vidsets[dax] != -1; dax++)
if (vidsets[dax] == (((getrendermode()>=2)<<17)|(fullscreen<<16)|bpp)) break; if (vidsets[dax] == (((getrendermode() >= REND_POLYMOST)<<17)|(fullscreen<<16)|bpp)) break;
if (dax < (int32_t)(sizeof(vidsets)/sizeof(vidsets[1]))) newvidset = dax; if (dax < (int32_t)(sizeof(vidsets)/sizeof(vidsets[1]))) newvidset = dax;
curvidset = newvidset; curvidset = newvidset;
@ -3339,11 +3339,11 @@ cheat_for_port_credits2:
margin = MENU_MARGIN_REGULAR; margin = MENU_MARGIN_REGULAR;
#ifdef USE_OPENGL #ifdef USE_OPENGL
x = (7/*+(getrendermode() >= 3)*/); x = (7/*+(getrendermode() >= REND_POLYMOST)*/);
#else #else
x = 7; x = 7;
#endif #endif
// onbar = (!getrendermode() && probey == 6); // (probey == 4); // onbar = (getrendermode() == REND_CLASSIC && probey == 6); // (probey == 4);
if (probey == 0 || probey == 1 || probey == 2) if (probey == 0 || probey == 1 || probey == 2)
x = M_Probe(margin,50,16,x); x = M_Probe(margin,50,16,x);
else if (probey == 3) else if (probey == 3)
@ -3580,7 +3580,7 @@ cheat_for_port_credits2:
break; break;
case 5: case 5:
if (!getrendermode()) if (getrendermode() == REND_CLASSIC)
{ {
ud.detail = 1-ud.detail; ud.detail = 1-ud.detail;
break; break;
@ -3593,7 +3593,7 @@ cheat_for_port_credits2:
break; break;
#endif #endif
case 6: case 6:
// if (!getrendermode()) break; // if (getrendermode() == REND_CLASSIC) break;
M_ChangeMenu(230); M_ChangeMenu(230);
break; break;
} }
@ -3627,7 +3627,7 @@ cheat_for_port_credits2:
} }
} }
*/ */
if (!getrendermode()) if (getrendermode() == REND_CLASSIC)
{ {
menutext(margin,50+62+16+16,MENUHIGHLIGHT(5),0,"Pixel Doubling"); menutext(margin,50+62+16+16,MENUHIGHLIGHT(5),0,"Pixel Doubling");
menutext(margin+168,50+62+16+16,MENUHIGHLIGHT(5),0,ud.detail?"Off":"On"); menutext(margin+168,50+62+16+16,MENUHIGHLIGHT(5),0,ud.detail?"Off":"On");
@ -3665,7 +3665,7 @@ cheat_for_port_credits2:
modval(0,5,(int32_t *)&gltexfiltermode,1,probey==5); modval(0,5,(int32_t *)&gltexfiltermode,1,probey==5);
if (gltexfiltermode != filter) if (gltexfiltermode != filter)
gltexapplyprops(); gltexapplyprops();
mgametextpal(margin+168,50+62+16+16-8,tempbuf,MENUHIGHLIGHT(5),!getrendermode()); mgametextpal(margin+168,50+62+16+16-8,tempbuf,MENUHIGHLIGHT(5),getrendermode() == REND_CLASSIC);
} }
#endif #endif
menutext(margin,50+62+16+16+16,MENUHIGHLIGHT(6),0 /*bpp==8*/,"Renderer Setup"); menutext(margin,50+62+16+16+16,MENUHIGHLIGHT(6),0 /*bpp==8*/,"Renderer Setup");

View file

@ -734,7 +734,7 @@ void onvideomodechange(int32_t newmode)
palid = BASEPAL; palid = BASEPAL;
#ifdef POLYMER #ifdef POLYMER
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
{ {
int32_t i = 0; int32_t i = 0;

View file

@ -1970,7 +1970,7 @@ static void G_DrawTileScaled(int32_t x, int32_t y, int32_t tilenum, int32_t shad
} }
#ifdef USE_OPENGL #ifdef USE_OPENGL
if (getrendermode() >= 3 && usemodels && md_tilehasmodel(tilenum,p) >= 0) if (getrendermode() >= REND_POLYMOST && usemodels && md_tilehasmodel(tilenum,p) >= 0)
y += (224-weapsc(224)); y += (224-weapsc(224));
#endif #endif
rotatesprite(weapsc(x<<16) + ((xoff-weapsc(xoff))<<16), rotatesprite(weapsc(x<<16) + ((xoff-weapsc(xoff))<<16),

View file

@ -602,13 +602,13 @@ void G_UpdateScreenArea(void)
if (j >= 12) y1 += 8; if (j >= 12) y1 += 8;
} }
if (ud.screen_size >= 8 && !(getrendermode() >= 3 && ud.screen_size == 8 && ud.statusbarmode)) if (ud.screen_size >= 8 && !(getrendermode() >= REND_POLYMOST && ud.screen_size == 8 && ud.statusbarmode))
y2 -= (ss+scale(tilesizy[BOTTOMSTATUSBAR],ud.statusbarscale,100)); y2 -= (ss+scale(tilesizy[BOTTOMSTATUSBAR],ud.statusbarscale,100));
y1 = scale(y1,ydim,200); y1 = scale(y1,ydim,200);
y2 = scale(y2,ydim,200); y2 = scale(y2,ydim,200);
setview(x1,y1,x2-1,y2-(getrendermode() < 3)); setview(x1,y1,x2-1,y2-(getrendermode() == REND_CLASSIC));
G_GetCrosshairColor(); G_GetCrosshairColor();
G_SetCrosshairColor(CrosshairColors.r, CrosshairColors.g, CrosshairColors.b); G_SetCrosshairColor(CrosshairColors.r, CrosshairColors.g, CrosshairColors.b);

View file

@ -1521,7 +1521,7 @@ static void sv_postactordata()
int32_t i; int32_t i;
#if 0 // POLYMER #if 0 // POLYMER
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
polymer_resetlights(); polymer_resetlights();
#endif #endif
@ -1731,7 +1731,7 @@ int32_t sv_updatestate(int32_t frominit)
if (frominit) if (frominit)
postloadplayer(0); postloadplayer(0);
#ifdef POLYMER #ifdef POLYMER
if (getrendermode()==4) if (getrendermode() == REND_POLYMER)
polymer_resetlights(); // must do it after polymer_loadboard() !!! polymer_resetlights(); // must do it after polymer_loadboard() !!!
#endif #endif
@ -1862,10 +1862,10 @@ static void postloadplayer(int32_t savegamep)
#ifdef POLYMER #ifdef POLYMER
//9 //9
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
polymer_loadboard(); polymer_loadboard();
#elif 0 #elif 0
if (getrendermode() == 4) if (getrendermode() == REND_POLYMER)
{ {
int32_t i = 0; int32_t i = 0;