mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
Misc minor changes
git-svn-id: https://svn.eduke32.com/eduke32@1411 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6c3ed1ec9c
commit
92372d50d6
4 changed files with 25 additions and 18 deletions
|
@ -4438,7 +4438,7 @@ static inline void polymer_culllight(int16_t lighti)
|
||||||
drawingstate[light->sector] = 1;
|
drawingstate[light->sector] = 1;
|
||||||
|
|
||||||
prlights[lighti].planecnt = 0;
|
prlights[lighti].planecnt = 0;
|
||||||
Bmemset(prlights[lighti].myplanes, 0, sizeof(intptr_t) * (PR_MAXLIGHTS<<1));
|
// Bmemset(prlights[lighti].myplanes, 0, sizeof(intptr_t) * (PR_MAXLIGHTS<<1));
|
||||||
|
|
||||||
sectorqueue[0] = light->sector;
|
sectorqueue[0] = light->sector;
|
||||||
|
|
||||||
|
@ -4452,16 +4452,16 @@ static inline void polymer_culllight(int16_t lighti)
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
if (polymer_planeinlight(&s->floor, light)) {
|
if (polymer_planeinlight(&s->floor, light)) {
|
||||||
// this lets us skip the polymer_planeinlight check for the ceiling when we know it will pass
|
// this lets us skip the polymer_planeinlight check for the ceiling when we know the result already
|
||||||
// I doubt this saves us much but it might be faster on complex sectors than the loop
|
// I doubt this saves us much but it might be faster on complex sectors than the planeinlight loop
|
||||||
if (!light->radius &&
|
if (!light->radius && ((light->z - getceilzofslope(light->sector, light->x, light->y)) >> 4) < light->range)
|
||||||
((light->z - getceilzofslope(light->sector, light->x, light->y)) >> 4) < light->range)
|
j = 1;
|
||||||
j++;
|
else j = 2;
|
||||||
|
|
||||||
polymer_addplanelight(&s->floor, lighti);
|
polymer_addplanelight(&s->floor, lighti);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j /*|| polymer_planeinlight(&s->ceil, light)*/) {
|
if (j == 1 || (j == 0 && polymer_planeinlight(&s->ceil, light))) {
|
||||||
polymer_addplanelight(&s->ceil, lighti);
|
polymer_addplanelight(&s->ceil, lighti);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3367,8 +3367,7 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
|
||||||
glinfo.extensions = (char *)bglGetString(GL_EXTENSIONS);
|
glinfo.extensions = (char *)bglGetString(GL_EXTENSIONS);
|
||||||
|
|
||||||
// GL driver blacklist
|
// GL driver blacklist
|
||||||
if (!forcegl)
|
|
||||||
{
|
|
||||||
if (!Bstrcmp(glinfo.vendor,"Microsoft Corporation")) err = 1;
|
if (!Bstrcmp(glinfo.vendor,"Microsoft Corporation")) err = 1;
|
||||||
else if (!Bstrcmp(glinfo.vendor,"SiS")) err = 1;
|
else if (!Bstrcmp(glinfo.vendor,"SiS")) err = 1;
|
||||||
else if (!Bstrcmp(glinfo.vendor,"3Dfx Interactive Inc.")) err = 1;
|
else if (!Bstrcmp(glinfo.vendor,"3Dfx Interactive Inc.")) err = 1;
|
||||||
|
@ -3382,8 +3381,15 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
|
||||||
err = 0;
|
err = 0;
|
||||||
else err = 1;
|
else err = 1;
|
||||||
}
|
}
|
||||||
|
#ifdef POLYMER
|
||||||
if (err)
|
else
|
||||||
|
{
|
||||||
|
if (!Bstrcmp(glinfo.vendor,"ATI Technologies Inc."))
|
||||||
|
pr_atiworkaround = 1;
|
||||||
|
else pr_atiworkaround = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (!forcegl && err)
|
||||||
{
|
{
|
||||||
OSD_Printf("Unsupported OpenGL driver detected. GL modes will be unavailable. Use -forcegl to override.\n");
|
OSD_Printf("Unsupported OpenGL driver detected. GL modes will be unavailable. Use -forcegl to override.\n");
|
||||||
wm_msgbox("Unsupported OpenGL driver", "Unsupported OpenGL driver detected. GL modes will be unavailable.");
|
wm_msgbox("Unsupported OpenGL driver", "Unsupported OpenGL driver detected. GL modes will be unavailable.");
|
||||||
|
@ -3394,7 +3400,6 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
|
||||||
getvalidmodes();
|
getvalidmodes();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
glinfo.maxanisotropy = 1.0;
|
glinfo.maxanisotropy = 1.0;
|
||||||
glinfo.bgra = 0;
|
glinfo.bgra = 0;
|
||||||
|
|
|
@ -601,7 +601,7 @@ inline void G_AddGameLight(int32_t radius, int32_t srcsprite, int32_t zoffset, i
|
||||||
mylight.color[1] = (color>>8)&255;
|
mylight.color[1] = (color>>8)&255;
|
||||||
mylight.color[2] = (color>>16)&255;
|
mylight.color[2] = (color>>16)&255;
|
||||||
mylight.radius = radius;
|
mylight.radius = radius;
|
||||||
ActorExtra[srcsprite].maxrange = mylight.range = range;
|
ActorExtra[srcsprite].lightmaxrange = mylight.range = range;
|
||||||
|
|
||||||
mylight.priority = priority;
|
mylight.priority = priority;
|
||||||
|
|
||||||
|
@ -612,11 +612,11 @@ inline void G_AddGameLight(int32_t radius, int32_t srcsprite, int32_t zoffset, i
|
||||||
}
|
}
|
||||||
|
|
||||||
s->z -= zoffset;
|
s->z -= zoffset;
|
||||||
if (range > ActorExtra[srcsprite].maxrange ||
|
if (range > ActorExtra[srcsprite].lightmaxrange ||
|
||||||
Bmemcmp(&sprite[srcsprite], ActorExtra[srcsprite].lightptr, sizeof(int32_t) * 3))
|
Bmemcmp(&sprite[srcsprite], ActorExtra[srcsprite].lightptr, sizeof(int32_t) * 3))
|
||||||
{
|
{
|
||||||
if (range > ActorExtra[srcsprite].maxrange)
|
if (range > ActorExtra[srcsprite].lightmaxrange)
|
||||||
ActorExtra[srcsprite].maxrange = range;
|
ActorExtra[srcsprite].lightmaxrange = range;
|
||||||
|
|
||||||
Bmemcpy(ActorExtra[srcsprite].lightptr, &sprite[srcsprite], sizeof(int32_t) * 3);
|
Bmemcpy(ActorExtra[srcsprite].lightptr, &sprite[srcsprite], sizeof(int32_t) * 3);
|
||||||
ActorExtra[srcsprite].lightptr->sector = s->sectnum;
|
ActorExtra[srcsprite].lightptr->sector = s->sectnum;
|
||||||
|
|
|
@ -546,11 +546,13 @@ typedef struct {
|
||||||
char cgg;
|
char cgg;
|
||||||
char filler;
|
char filler;
|
||||||
projectile_t projectile;
|
projectile_t projectile;
|
||||||
#ifdef POLYMER
|
|
||||||
int16_t lightId;
|
int16_t lightId;
|
||||||
int16_t lightcount; // how many tics until light is killed
|
int16_t lightcount; // how many tics until light is killed
|
||||||
int16_t maxrange;
|
int16_t lightmaxrange;
|
||||||
|
#ifdef POLYMER
|
||||||
_prlight *lightptr;
|
_prlight *lightptr;
|
||||||
|
#else
|
||||||
|
void *lightptr;
|
||||||
#endif
|
#endif
|
||||||
} ActorData_t;
|
} ActorData_t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue