Misc minor changes

git-svn-id: https://svn.eduke32.com/eduke32@1411 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2009-06-07 06:23:33 +00:00
parent 6c3ed1ec9c
commit 92372d50d6
4 changed files with 25 additions and 18 deletions

View file

@ -4438,7 +4438,7 @@ static inline void polymer_culllight(int16_t lighti)
drawingstate[light->sector] = 1;
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;
@ -4452,16 +4452,16 @@ static inline void polymer_culllight(int16_t lighti)
j = 0;
if (polymer_planeinlight(&s->floor, light)) {
// this lets us skip the polymer_planeinlight check for the ceiling when we know it will pass
// I doubt this saves us much but it might be faster on complex sectors than the loop
if (!light->radius &&
((light->z - getceilzofslope(light->sector, light->x, light->y)) >> 4) < light->range)
j++;
// 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 planeinlight loop
if (!light->radius && ((light->z - getceilzofslope(light->sector, light->x, light->y)) >> 4) < light->range)
j = 1;
else j = 2;
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);
}

View file

@ -3367,8 +3367,7 @@ static int32_t SetupOpenGL(int32_t width, int32_t height, int32_t bitspp)
glinfo.extensions = (char *)bglGetString(GL_EXTENSIONS);
// GL driver blacklist
if (!forcegl)
{
if (!Bstrcmp(glinfo.vendor,"Microsoft Corporation")) err = 1;
else if (!Bstrcmp(glinfo.vendor,"SiS")) 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;
else err = 1;
}
if (err)
#ifdef POLYMER
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");
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();
return TRUE;
}
}
glinfo.maxanisotropy = 1.0;
glinfo.bgra = 0;

View file

@ -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[2] = (color>>16)&255;
mylight.radius = radius;
ActorExtra[srcsprite].maxrange = mylight.range = range;
ActorExtra[srcsprite].lightmaxrange = mylight.range = range;
mylight.priority = priority;
@ -612,11 +612,11 @@ inline void G_AddGameLight(int32_t radius, int32_t srcsprite, int32_t zoffset, i
}
s->z -= zoffset;
if (range > ActorExtra[srcsprite].maxrange ||
if (range > ActorExtra[srcsprite].lightmaxrange ||
Bmemcmp(&sprite[srcsprite], ActorExtra[srcsprite].lightptr, sizeof(int32_t) * 3))
{
if (range > ActorExtra[srcsprite].maxrange)
ActorExtra[srcsprite].maxrange = range;
if (range > ActorExtra[srcsprite].lightmaxrange)
ActorExtra[srcsprite].lightmaxrange = range;
Bmemcpy(ActorExtra[srcsprite].lightptr, &sprite[srcsprite], sizeof(int32_t) * 3);
ActorExtra[srcsprite].lightptr->sector = s->sectnum;

View file

@ -546,11 +546,13 @@ typedef struct {
char cgg;
char filler;
projectile_t projectile;
#ifdef POLYMER
int16_t lightId;
int16_t lightcount; // how many tics until light is killed
int16_t maxrange;
int16_t lightmaxrange;
#ifdef POLYMER
_prlight *lightptr;
#else
void *lightptr;
#endif
} ActorData_t;