Subversion Repositories eduke32

Rev

Rev 5055 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5055 Rev 5056
Line 440... Line 440...
440
#define FULLVIS_END 3.0e30
440
#define FULLVIS_END 3.0e30
441
441
442
static inline void fogcalc(int32_t tile, int32_t shade, int32_t vis, int32_t pal)
442
static inline void fogcalc(int32_t tile, int32_t shade, int32_t vis, int32_t pal)
443
{
443
{
444
    if (shade > 0 && getrendermode() == REND_POLYMOST && r_usetileshades == 1 &&
444
    if (shade > 0 && getrendermode() == REND_POLYMOST && r_usetileshades == 1 &&
-
 
445
        !(globalflags & GLOBAL_NO_GL_TILESHADES) &&
445
        (!usehightile || !hicfindsubst(tile, pal)) &&
446
        (!usehightile || !hicfindsubst(tile, pal)) &&
446
        (!usemodels || md_tilehasmodel(tile, pal) < 0))
447
        (!usemodels || md_tilehasmodel(tile, pal) < 0))
447
        shade >>= 1;
448
        shade >>= 1;
448
449
449
    Bmemcpy(fogcol, &fogtable[pal<<2], sizeof(fogcol));
450
    Bmemcpy(fogcol, &fogtable[pal<<2], sizeof(fogcol));
Line 846... Line 847...
846
        pic[0].r = pic[0].g = pic[0].b = 0; pic[0].a = 1;
847
        pic[0].r = pic[0].g = pic[0].b = 0; pic[0].a = 1;
847
        tsiz.x = tsiz.y = 1; hasalpha = 1;
848
        tsiz.x = tsiz.y = 1; hasalpha = 1;
848
    }
849
    }
849
    else
850
    else
850
    {
851
    {
851
        const int dofullbright = !(picanm[dapic].sf & PICANM_NOFULLBRIGHT_BIT);
852
        const int dofullbright = !(picanm[dapic].sf & PICANM_NOFULLBRIGHT_BIT) && !(globalflags & GLOBAL_NO_GL_FULLBRIGHT);
852
853
853
        for (int y = 0; y < siz.y; y++)
854
        for (int y = 0; y < siz.y; y++)
854
        {
855
        {
855
            coltype *wpptr = &pic[y * siz.x];
856
            coltype *wpptr = &pic[y * siz.x];
856
            int32_t y2 = (y < tsiz.y) ? y : y - tsiz.y;
857
            int32_t y2 = (y < tsiz.y) ? y : y - tsiz.y;
Line 1300... Line 1301...
1300
static float alpha = 0.f;
1301
static float alpha = 0.f;
1301
1302
1302
static inline pthtyp *our_texcache_fetch(int32_t dameth)
1303
static inline pthtyp *our_texcache_fetch(int32_t dameth)
1303
{
1304
{
1304
    // r_usetileshades 1 is TX's method.
1305
    // r_usetileshades 1 is TX's method.
1305
    return texcache_fetch(globalpicnum, globalpal, getpalookup((r_usetileshades == 1) ? globvis>>3 : 0, globalshade), dameth);
1306
    return texcache_fetch(globalpicnum, globalpal, getpalookup((r_usetileshades == 1 && !(globalflags & GLOBAL_NO_GL_TILESHADES)) ? globvis>>3 : 0, globalshade), dameth);
1306
}
1307
}
1307
1308
1308
static void drawpoly(vec2f_t *dpxy, int32_t n, int32_t method)
1309
static void drawpoly(vec2f_t *dpxy, int32_t n, int32_t method)
1309
{
1310
{
1310
    const int32_t method_ = method;
1311
    const int32_t method_ = method;
Line 1510... Line 1511...
1510
1511
1511
        {
1512
        {
1512
            float pc[4];
1513
            float pc[4];
1513
1514
1514
#ifdef POLYMER
1515
#ifdef POLYMER
1515
            if (getrendermode() == REND_POLYMER && pr_artmapping && polymer_eligible_for_artmap(globalpicnum, pth))
1516
            if (getrendermode() == REND_POLYMER && pr_artmapping && !(globalflags & GLOBAL_NO_GL_TILESHADES) && polymer_eligible_for_artmap(globalpicnum, pth))
1516
                pc[0] = pc[1] = pc[2] = 1.0f;
1517
                pc[0] = pc[1] = pc[2] = 1.0f;
1517
            else
1518
            else
1518
#endif
1519
#endif
1519
                pc[0] = pc[1] = pc[2] = getshadefactor(globalshade);
1520
                pc[0] = pc[1] = pc[2] = getshadefactor(globalshade);
1520
1521