mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-28 18:00:40 +00:00
Add an extra noapply flag to setbrightness() so we can invalidate just the 8 bit textures.
git-svn-id: https://svn.eduke32.com/eduke32@415 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a35a73796c
commit
991d785e73
7 changed files with 36 additions and 16 deletions
|
@ -69,7 +69,7 @@ void initprintf(const char *, ...);
|
||||||
void debugprintf(const char *,...);
|
void debugprintf(const char *,...);
|
||||||
|
|
||||||
int handleevents(void);
|
int handleevents(void);
|
||||||
void idle(void);
|
inline void idle(void);
|
||||||
|
|
||||||
typedef void (*KeyPressCallback)(long,long);
|
typedef void (*KeyPressCallback)(long,long);
|
||||||
typedef void (*MousePressCallback)(long,long);
|
typedef void (*MousePressCallback)(long,long);
|
||||||
|
|
|
@ -9642,7 +9642,8 @@ void setbrightness(char dabrightness, char *dapal, char noapply)
|
||||||
// changed and we couldn't set it using hardware gamma
|
// changed and we couldn't set it using hardware gamma
|
||||||
if (!(noapply&2) && (newpalettesum != lastpalettesum))
|
if (!(noapply&2) && (newpalettesum != lastpalettesum))
|
||||||
gltexinvalidateall();
|
gltexinvalidateall();
|
||||||
|
if (!(noapply&8) && (newpalettesum != lastpalettesum))
|
||||||
|
gltexinvalidate8();
|
||||||
lastpalettesum = newpalettesum;
|
lastpalettesum = newpalettesum;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -466,6 +466,25 @@ void gltexinvalidateall ()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gltexinvalidate8 ()
|
||||||
|
{
|
||||||
|
long j;
|
||||||
|
pthtyp *pth;
|
||||||
|
|
||||||
|
for (j=GLTEXCACHEADSIZ-1;j>=0;j--)
|
||||||
|
for (pth=gltexcachead[j];pth;pth=pth->next)
|
||||||
|
{
|
||||||
|
if (pth->hicr == NULL)
|
||||||
|
{
|
||||||
|
pth->flags |= 128;
|
||||||
|
if (pth->flags & 16)
|
||||||
|
pth->ofb->flags |= 128;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#ifdef DEBUGGINGAIDS
|
||||||
|
OSD_Printf("gltexinvalidate8()\n");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void gltexapplyprops (void)
|
void gltexapplyprops (void)
|
||||||
{
|
{
|
||||||
|
@ -580,7 +599,7 @@ void polymost_glinit()
|
||||||
{
|
{
|
||||||
GLfloat col[4];
|
GLfloat col[4];
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
if (!Bstrcmp(glinfo.vendor, "ATI Technologies Inc."))
|
if (!Bstrcmp(glinfo.vendor, "ATI Technologies Inc."))
|
||||||
{
|
{
|
||||||
initprintf("polymost_glinit(): ATI detected, GL_FOG_HINT = GL_DONT_CARE\n");
|
initprintf("polymost_glinit(): ATI detected, GL_FOG_HINT = GL_DONT_CARE\n");
|
||||||
|
|
|
@ -1499,7 +1499,7 @@ int handleevents(void)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void idle(void)
|
inline void idle(void)
|
||||||
{
|
{
|
||||||
usleep(1);
|
usleep(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -528,7 +528,7 @@ int handleevents(void)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void idle(void)
|
inline void idle(void)
|
||||||
{
|
{
|
||||||
Sleep(1);
|
Sleep(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,7 +244,7 @@ void playanm(char *fn,char t)
|
||||||
|
|
||||||
//setpalette(0L,256L,tempbuf);
|
//setpalette(0L,256L,tempbuf);
|
||||||
//setbrightness(ud.brightness>>2,tempbuf,2);
|
//setbrightness(ud.brightness>>2,tempbuf,2);
|
||||||
setgamepalette(&ps[myconnectindex],animpal,2);
|
setgamepalette(&ps[myconnectindex],animpal,10);
|
||||||
|
|
||||||
ototalclock = totalclock + 10;
|
ototalclock = totalclock + 10;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ void playanm(char *fn,char t)
|
||||||
getpackets();
|
getpackets();
|
||||||
if (restorepalette == 1)
|
if (restorepalette == 1)
|
||||||
{
|
{
|
||||||
setgamepalette(&ps[myconnectindex],animpal,2);
|
setgamepalette(&ps[myconnectindex],animpal,0);
|
||||||
restorepalette = 0;
|
restorepalette = 0;
|
||||||
}
|
}
|
||||||
idle();
|
idle();
|
||||||
|
|
|
@ -3250,7 +3250,7 @@ void displayrest(long smoothratio)
|
||||||
else if (restorepalette)
|
else if (restorepalette)
|
||||||
{
|
{
|
||||||
//setbrightness(ud.brightness>>2,&pp->palette[0],0);
|
//setbrightness(ud.brightness>>2,&pp->palette[0],0);
|
||||||
setgamepalette(pp,pp->palette,0);
|
setgamepalette(pp,pp->palette,2);
|
||||||
restorepalette = 0;
|
restorepalette = 0;
|
||||||
}
|
}
|
||||||
// loogies courtesy of being snotted on
|
// loogies courtesy of being snotted on
|
||||||
|
@ -8936,7 +8936,7 @@ static void Logo(void)
|
||||||
//palto(0,0,0,63);
|
//palto(0,0,0,63);
|
||||||
if (logoflags & LOGO_FLAG_3DRSCREEN)
|
if (logoflags & LOGO_FLAG_3DRSCREEN)
|
||||||
{
|
{
|
||||||
setgamepalette(&ps[myconnectindex], drealms, 3); // JBF 20040308
|
setgamepalette(&ps[myconnectindex], drealms, 11); // JBF 20040308
|
||||||
rotatesprite(0,0,65536L,0,DREALMS,0,0,2+8+16+64, 0,0,xdim-1,ydim-1);
|
rotatesprite(0,0,65536L,0,DREALMS,0,0,2+8+16+64, 0,0,xdim-1,ydim-1);
|
||||||
nextpage();
|
nextpage();
|
||||||
fadepal(0,0,0, 63,0,-7);
|
fadepal(0,0,0, 63,0,-7);
|
||||||
|
@ -8962,7 +8962,7 @@ static void Logo(void)
|
||||||
if (logoflags & LOGO_FLAG_TITLESCREEN)
|
if (logoflags & LOGO_FLAG_TITLESCREEN)
|
||||||
{
|
{
|
||||||
//ps[myconnectindex].palette = titlepal;
|
//ps[myconnectindex].palette = titlepal;
|
||||||
setgamepalette(&ps[myconnectindex], titlepal, 3); // JBF 20040308
|
setgamepalette(&ps[myconnectindex], titlepal, 11); // JBF 20040308
|
||||||
flushperms();
|
flushperms();
|
||||||
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64,0,0,xdim-1,ydim-1);
|
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64,0,0,xdim-1,ydim-1);
|
||||||
KB_FlushKeyboardQueue();
|
KB_FlushKeyboardQueue();
|
||||||
|
@ -9042,7 +9042,7 @@ static void Logo(void)
|
||||||
|
|
||||||
if (ud.multimode > 1)
|
if (ud.multimode > 1)
|
||||||
{
|
{
|
||||||
setgamepalette(&ps[myconnectindex], titlepal, 3);
|
setgamepalette(&ps[myconnectindex], titlepal, 11);
|
||||||
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64,0,0,xdim-1,ydim-1);
|
rotatesprite(0,0,65536L,0,BETASCREEN,0,0,2+8+16+64,0,0,xdim-1,ydim-1);
|
||||||
|
|
||||||
rotatesprite(160<<16,(104)<<16,60<<10,0,DUKENUKEM,0,0,2+8,0,0,xdim-1,ydim-1);
|
rotatesprite(160<<16,(104)<<16,60<<10,0,DUKENUKEM,0,0,2+8,0,0,xdim-1,ydim-1);
|
||||||
|
@ -11462,7 +11462,7 @@ void dobonus(char bonusonly)
|
||||||
case 0:
|
case 0:
|
||||||
if (ud.lockout == 0)
|
if (ud.lockout == 0)
|
||||||
{
|
{
|
||||||
setgamepalette(&ps[myconnectindex], endingpal, 3); // JBF 20040308
|
setgamepalette(&ps[myconnectindex], endingpal, 11); // JBF 20040308
|
||||||
clearview(0L);
|
clearview(0L);
|
||||||
rotatesprite(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128,0,0,xdim-1,ydim-1);
|
rotatesprite(0,50<<16,65536L,0,VICTORY1,0,0,2+8+16+64+128,0,0,xdim-1,ydim-1);
|
||||||
nextpage();
|
nextpage();
|
||||||
|
@ -11525,7 +11525,7 @@ void dobonus(char bonusonly)
|
||||||
|
|
||||||
KB_FlushKeyboardQueue();
|
KB_FlushKeyboardQueue();
|
||||||
//ps[myconnectindex].palette = palette;
|
//ps[myconnectindex].palette = palette;
|
||||||
setgamepalette(&ps[myconnectindex], palette, 3); // JBF 20040308
|
setgamepalette(&ps[myconnectindex], palette, 11); // JBF 20040308
|
||||||
|
|
||||||
rotatesprite(0,0,65536L,0,3292,0,0,2+8+16+64, 0,0,xdim-1,ydim-1);
|
rotatesprite(0,0,65536L,0,3292,0,0,2+8+16+64, 0,0,xdim-1,ydim-1);
|
||||||
IFISSOFTMODE fadepal(0,0,0, 63,0,-1);
|
IFISSOFTMODE fadepal(0,0,0, 63,0,-1);
|
||||||
|
@ -11559,7 +11559,7 @@ void dobonus(char bonusonly)
|
||||||
setview(0,0,xdim-1,ydim-1);
|
setview(0,0,xdim-1,ydim-1);
|
||||||
KB_FlushKeyboardQueue();
|
KB_FlushKeyboardQueue();
|
||||||
//ps[myconnectindex].palette = palette;
|
//ps[myconnectindex].palette = palette;
|
||||||
setgamepalette(&ps[myconnectindex], palette, 3); // JBF 20040308
|
setgamepalette(&ps[myconnectindex], palette, 11); // JBF 20040308
|
||||||
rotatesprite(0,0,65536L,0,3293,0,0,2+8+16+64, 0,0,xdim-1,ydim-1);
|
rotatesprite(0,0,65536L,0,3293,0,0,2+8+16+64, 0,0,xdim-1,ydim-1);
|
||||||
IFISSOFTMODE fadepal(0,0,0, 63,0,-1);
|
IFISSOFTMODE fadepal(0,0,0, 63,0,-1);
|
||||||
else nextpage();
|
else nextpage();
|
||||||
|
@ -11600,7 +11600,7 @@ void dobonus(char bonusonly)
|
||||||
KB_FlushKeyBoardQueue();
|
KB_FlushKeyBoardQueue();
|
||||||
|
|
||||||
//ps[myconnectindex].palette = palette;
|
//ps[myconnectindex].palette = palette;
|
||||||
setgamepalette(&ps[myconnectindex], palette, 3); // JBF 20040308
|
setgamepalette(&ps[myconnectindex], palette, 11); // JBF 20040308
|
||||||
IFISSOFTMODE palto(0,0,0,63);
|
IFISSOFTMODE palto(0,0,0,63);
|
||||||
clearview(0L);
|
clearview(0L);
|
||||||
menutext(160,60,0,0,"THANKS TO ALL OUR");
|
menutext(160,60,0,0,"THANKS TO ALL OUR");
|
||||||
|
@ -11730,7 +11730,7 @@ ENDANM:
|
||||||
FRAGBONUS:
|
FRAGBONUS:
|
||||||
|
|
||||||
//ps[myconnectindex].palette = palette;
|
//ps[myconnectindex].palette = palette;
|
||||||
setgamepalette(&ps[myconnectindex], palette, 3); // JBF 20040308
|
setgamepalette(&ps[myconnectindex], palette, 11); // JBF 20040308
|
||||||
IFISSOFTMODE palto(0,0,0,63); // JBF 20031228
|
IFISSOFTMODE palto(0,0,0,63); // JBF 20031228
|
||||||
KB_FlushKeyboardQueue();
|
KB_FlushKeyboardQueue();
|
||||||
totalclock = 0;
|
totalclock = 0;
|
||||||
|
|
Loading…
Reference in a new issue