Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 5055 → Rev 5056

/polymer/eduke32/build/include/build.h
852,6 → 852,13
EXTERN int32_t h_xsize[MAXTILES], h_ysize[MAXTILES];
EXTERN int8_t h_xoffs[MAXTILES], h_yoffs[MAXTILES];
 
enum {
GLOBAL_NO_GL_TILESHADES = 1<<0,
GLOBAL_NO_GL_FULLBRIGHT = 1<<1,
};
 
extern int32_t globalflags;
 
extern const char *engineerrstr;
 
EXTERN int32_t editorzrange[2];
/polymer/eduke32/build/include/polymost.h
77,6 → 77,7
// 8-bit tiles, i.e. non-hightiles and non-models, don't get additional
// glColor() shading with r_usetileshades!
if (getrendermode() == REND_POLYMOST && r_usetileshades &&
!(globalflags & GLOBAL_NO_GL_TILESHADES) &&
eligible_for_tileshades(globalpicnum, globalpal))
return 1.f;
 
/polymer/eduke32/build/src/defs.c
92,6 → 92,7
T_NOFULLBRIGHTRANGE,
T_MAPINFO, T_MAPFILE, T_MAPTITLE, T_MAPMD4, T_MHKFILE,
T_ECHO,
T_GLOBALFLAGS,
};
 
static int32_t lastmodelid = -1, lastvoxid = -1, modelskin = -1, lastmodelskin = -1, seenframe = 0;
277,6 → 278,7
{ "tilefromtexture", T_TILEFROMTEXTURE },
{ "mapinfo", T_MAPINFO },
{ "echo", T_ECHO },
{ "globalflags", T_GLOBALFLAGS },
};
 
while (1)
2210,6 → 2212,12
}
break;
 
case T_GLOBALFLAGS:
{
if (scriptfile_getnumber(script,&globalflags)) break;
}
break;
 
default:
initprintf("Unknown token.\n"); break;
}
/polymer/eduke32/build/src/engine.c
180,6 → 180,8
int32_t r_usenewaspect = 1, newaspect_enable=0;
uint32_t r_screenxy = 0;
 
int32_t globalflags;
 
int32_t curbrightness = 0, gammabrightness = 0;
 
float vid_gamma = DEFAULT_GAMMA;
/polymer/eduke32/build/src/polymer.c
4541,7 → 4541,7
}
 
// Lazily fill in all the textures we need, move this to precaching later
if (pr_artmapping && polymer_eligible_for_artmap(tilenum, pth)) {
if (pr_artmapping && !(globalflags & GLOBAL_NO_GL_TILESHADES) && polymer_eligible_for_artmap(tilenum, pth)) {
if (!prartmaps[tilenum]) {
char *tilebuffer = (char *)waloff[tilenum];
char *tempbuffer = (char *)Xmalloc(tilesiz[tilenum].x * tilesiz[tilenum].y);
4722,6 → 4722,7
 
// PR_BIT_ART_MAP
if (pr_artmapping && material->artmap &&
!(globalflags & GLOBAL_NO_GL_TILESHADES) &&
(overridematerial & prprogrambits[PR_BIT_ART_MAP].bit)) {
programbits |= prprogrambits[PR_BIT_ART_MAP].bit;
} else
/polymer/eduke32/build/src/polymost.c
442,6 → 442,7
static inline void fogcalc(int32_t tile, int32_t shade, int32_t vis, int32_t pal)
{
if (shade > 0 && getrendermode() == REND_POLYMOST && r_usetileshades == 1 &&
!(globalflags & GLOBAL_NO_GL_TILESHADES) &&
(!usehightile || !hicfindsubst(tile, pal)) &&
(!usemodels || md_tilehasmodel(tile, pal) < 0))
shade >>= 1;
848,7 → 849,7
}
else
{
const int dofullbright = !(picanm[dapic].sf & PICANM_NOFULLBRIGHT_BIT);
const int dofullbright = !(picanm[dapic].sf & PICANM_NOFULLBRIGHT_BIT) && !(globalflags & GLOBAL_NO_GL_FULLBRIGHT);
 
for (int y = 0; y < siz.y; y++)
{
1302,7 → 1303,7
static inline pthtyp *our_texcache_fetch(int32_t dameth)
{
// r_usetileshades 1 is TX's method.
return texcache_fetch(globalpicnum, globalpal, getpalookup((r_usetileshades == 1) ? globvis>>3 : 0, globalshade), dameth);
return texcache_fetch(globalpicnum, globalpal, getpalookup((r_usetileshades == 1 && !(globalflags & GLOBAL_NO_GL_TILESHADES)) ? globvis>>3 : 0, globalshade), dameth);
}
 
static void drawpoly(vec2f_t *dpxy, int32_t n, int32_t method)
1512,7 → 1513,7
float pc[4];
 
#ifdef POLYMER
if (getrendermode() == REND_POLYMER && pr_artmapping && polymer_eligible_for_artmap(globalpicnum, pth))
if (getrendermode() == REND_POLYMER && pr_artmapping && !(globalflags & GLOBAL_NO_GL_TILESHADES) && polymer_eligible_for_artmap(globalpicnum, pth))
pc[0] = pc[1] = pc[2] = 1.0f;
else
#endif
/polymer/eduke32/build/src/texcache.c
109,7 → 109,7
if ((si = hicfindskybox(dapicnum, dapalnum)) == NULL)
return NULL;
 
if (!r_usetileshades || getrendermode() != REND_POLYMOST)
if (!r_usetileshades || (globalflags & GLOBAL_NO_GL_TILESHADES) || getrendermode() != REND_POLYMOST)
dashade = 0;
 
if (!si)