mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@927 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b1a5b6be67
commit
95297e60e9
7 changed files with 28 additions and 17 deletions
|
@ -6289,6 +6289,7 @@ killsprite:
|
|||
{
|
||||
#if defined(USE_OPENGL) && defined(POLYMOST)
|
||||
curpolygonoffset = 0;
|
||||
cullcheckcnt = 0;
|
||||
#endif
|
||||
pos.x = globalposx;
|
||||
pos.y = globalposy;
|
||||
|
@ -6356,11 +6357,14 @@ killsprite:
|
|||
else
|
||||
{
|
||||
curpolygonoffset = 0;
|
||||
cullcheckcnt = 0;
|
||||
j = spritesortcnt;
|
||||
k = maskwallcnt;
|
||||
|
||||
while (j > 0) drawsprite(--j);
|
||||
while (k > 0) drawmaskwall(--k);
|
||||
if (totalclock < lastcullcheck - CULL_DELAY)
|
||||
lastcullcheck = totalclock;
|
||||
if (totalclock >= lastcullcheck + CULL_DELAY)
|
||||
lastcullcheck = (totalclock + CULL_DELAY);
|
||||
}
|
||||
|
|
|
@ -176,8 +176,6 @@ int r_parallaxskypanning = 0;
|
|||
|
||||
// line of sight checks before mddraw()
|
||||
int r_modelocclusionchecking = 0;
|
||||
#define CULL_OFFSET 384
|
||||
#define CULL_DELAY 2
|
||||
|
||||
// fullbright cvar
|
||||
int r_fullbrights = 1;
|
||||
|
@ -4439,8 +4437,13 @@ void polymost_drawmaskwall(int damaskwallcnt)
|
|||
drawpoly(dpx,dpy,n,method);
|
||||
}
|
||||
|
||||
#define CULL_OFFSET 384
|
||||
#define CULL_DELAY 2
|
||||
#define MAXCULLCHECKS 1024
|
||||
|
||||
int lastcullcheck = 0;
|
||||
char cullmodel[MAXSPRITES];
|
||||
int cullcheckcnt = 0;
|
||||
|
||||
int polymost_checkcoordinates(int x, int y, spritetype *tspr)
|
||||
{
|
||||
|
@ -4448,7 +4451,7 @@ int polymost_checkcoordinates(int x, int y, spritetype *tspr)
|
|||
int oldx = x, i, j = (tilesizy[tspr->picnum]*tspr->yrepeat);
|
||||
|
||||
RECHECK:
|
||||
updatesector(tspr->x+x,tspr->y+y,&datempsectnum);
|
||||
updatesectorz(tspr->x+x,tspr->y+y,tspr->z,&datempsectnum);
|
||||
|
||||
if (datempsectnum == -1)
|
||||
{
|
||||
|
@ -4460,6 +4463,7 @@ RECHECK:
|
|||
|
||||
for (i=4;i>-1;i--)
|
||||
{
|
||||
cullcheckcnt++;
|
||||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x+x, tspr->y+y, tspr->z-(j*i)-512, datempsectnum))
|
||||
return 1;
|
||||
|
@ -4533,35 +4537,38 @@ void polymost_drawsprite(int snum)
|
|||
if (mddraw(tspr)) return;
|
||||
break; // else, render as flat sprite
|
||||
}
|
||||
if (r_modelocclusionchecking /*&& modelptr->usesalpha && !(tspr->cstat & 1024)*/)
|
||||
if (r_modelocclusionchecking)
|
||||
{
|
||||
if (totalclock >= lastcullcheck + CULL_DELAY)
|
||||
if (totalclock >= lastcullcheck + CULL_DELAY && cullcheckcnt < MAXCULLCHECKS && (/*modelptr->usesalpha ||*/ tspr->yrepeat*tilesizy[sprite[tspr->owner].picnum] > 1536 || tspr->xrepeat*tilesizx[sprite[tspr->owner].picnum] > 1536))
|
||||
{
|
||||
do // this is so gay
|
||||
{
|
||||
unsigned int t = getticks()+4;
|
||||
|
||||
// don't bother with shadows because processing its owner will take care of it
|
||||
if (tspr->statnum == TSPR_TEMP)
|
||||
break;
|
||||
cullmodel[tspr->owner] = 1;
|
||||
cullcheckcnt++;
|
||||
|
||||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x, tspr->y, tspr->z,tspr->sectnum))
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, 0, tspr))
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, 0, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, -CULL_OFFSET, tspr))
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, -CULL_OFFSET, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(CULL_OFFSET, 0, tspr))
|
||||
if (polymost_checkcoordinates(CULL_OFFSET, 0, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
if (polymost_checkcoordinates(CULL_OFFSET, CULL_OFFSET, tspr))
|
||||
if (polymost_checkcoordinates(CULL_OFFSET, CULL_OFFSET, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, CULL_OFFSET, tspr))
|
||||
if (polymost_checkcoordinates(-CULL_OFFSET, CULL_OFFSET, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
if (polymost_checkcoordinates(0, 0, tspr))
|
||||
if (polymost_checkcoordinates(0, 0, tspr) || getticks() > t || cullcheckcnt >= MAXCULLCHECKS)
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
break;
|
||||
|
|
|
@ -61,7 +61,7 @@ extern int curbrightness, gammabrightness;
|
|||
// OpenGL stuff
|
||||
static char nogl=0;
|
||||
#endif
|
||||
int vsync=1;
|
||||
int vsync=0;
|
||||
|
||||
// input
|
||||
char inputdevices=0;
|
||||
|
|
|
@ -116,7 +116,7 @@ char offscreenrendering=0;
|
|||
int glcolourdepth=32;
|
||||
char videomodereset = 0;
|
||||
char silentvideomodeswitch = 0;
|
||||
int vsync=1;
|
||||
int vsync=0;
|
||||
// input and events
|
||||
char inputdevices=0;
|
||||
char quitevent=0, appactive=1, realfs=0, regrabmouse=0;
|
||||
|
|
|
@ -773,6 +773,7 @@ int32 CONFIG_ReadSetup(void)
|
|||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "SoundToggle",&ud.config.SoundToggle);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "MusicToggle",&ud.config.MusicToggle);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "VoiceToggle",&ud.config.VoiceToggle);
|
||||
if (ud.config.VoiceToggle == 2) ud.config.VoiceToggle = 5;
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "AmbienceToggle",&ud.config.AmbienceToggle);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "NumVoices",&ud.config.NumVoices);
|
||||
SCRIPT_GetNumber(ud.config.scripthandle, "Sound Setup", "NumChannels",&ud.config.NumChannels);
|
||||
|
|
|
@ -865,7 +865,7 @@ void getpackets(void)
|
|||
|
||||
if (numlumps == 0) break;
|
||||
|
||||
if (ud.config.SoundToggle == 0 || ud.lockout == 1 || ud.config.FXDevice < 0)
|
||||
if (ud.config.SoundToggle == 0 || ud.lockout == 1 || ud.config.FXDevice < 0 || !(ud.config.VoiceToggle & 4))
|
||||
break;
|
||||
rtsptr = (char *)RTS_GetSound(packbuf[1]-1);
|
||||
if (*rtsptr == 'C')
|
||||
|
@ -4087,7 +4087,6 @@ void displayrooms(int snum,int smoothratio)
|
|||
ud.camerasect = sprite[p->newowner].sectnum;
|
||||
smoothratio = 65536L;
|
||||
}
|
||||
|
||||
else if (p->over_shoulder_on == 0)
|
||||
{
|
||||
if (ud.viewbob)
|
||||
|
@ -7987,7 +7986,7 @@ static void nonsharedkeys(void)
|
|||
}
|
||||
|
||||
if (ud.lockout == 0)
|
||||
if (ud.config.SoundToggle && ALT_IS_PRESSED && (RTS_NumSounds() > 0) && rtsplaying == 0 && ud.config.VoiceToggle)
|
||||
if (ud.config.SoundToggle && ALT_IS_PRESSED && (RTS_NumSounds() > 0) && rtsplaying == 0 && (ud.config.VoiceToggle & 1))
|
||||
{
|
||||
rtsptr = (char *)RTS_GetSound(i-1);
|
||||
if (*rtsptr == 'C')
|
||||
|
|
|
@ -701,7 +701,7 @@ cvarmappings cvar[] =
|
|||
{ "r_precache", "r_precache: enable/disable the pre-level caching routine", (void*)&ud.config.useprecache, CVAR_BOOL, 0, 0, 1 },
|
||||
|
||||
{ "snd_ambience", "snd_ambience: enables/disables ambient sounds", (void*)&ud.config.AmbienceToggle, CVAR_BOOL, 0, 0, 1 },
|
||||
{ "snd_duketalk", "snd_duketalk: enables/disables Duke's speech", (void*)&ud.config.VoiceToggle, CVAR_INT, 0, 0, 2 },
|
||||
{ "snd_duketalk", "snd_duketalk: enables/disables Duke's speech", (void*)&ud.config.VoiceToggle, CVAR_INT, 0, 0, 5 },
|
||||
{ "snd_fxvolume", "snd_fxvolume: volume of sound effects", (void*)&ud.config.FXVolume, CVAR_INT, 0, 0, 255 },
|
||||
{ "snd_mixrate", "snd_mixrate: sound mixing rate", (void*)&ud.config.MixRate, CVAR_INT, 0, 0, 48000 },
|
||||
{ "snd_musvolume", "snd_musvolume: volume of midi music", (void*)&ud.config.MusicVolume, CVAR_INT, 0, 0, 255 },
|
||||
|
|
Loading…
Reference in a new issue