Introduce a per-tile bit preventing fullbrights in GL modes, use for LOADSCREEN.

git-svn-id: https://svn.eduke32.com/eduke32@3145 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-11-10 14:11:17 +00:00
parent c71b3d529c
commit d85f529b74
3 changed files with 8 additions and 1 deletions

View file

@ -148,6 +148,7 @@ void yax_drawrooms(void (*SpriteAnimFunc)(int32_t,int32_t,int32_t,int32_t),
#endif
#define PICANM_TEXHITSCAN_BIT (1<<28)
#define PICANM_NOFULLBRIGHT_BIT (1<<30)
#define CLIPMASK0 (((1L)<<16)+1L)
#define CLIPMASK1 (((256L)<<16)+64L)

View file

@ -1204,6 +1204,8 @@ static int32_t gloadtile_art(int32_t dapic, int32_t dapal, int32_t dameth, pthty
}
else
{
const int32_t dofullbright = !(picanm[dapic]&PICANM_NOFULLBRIGHT_BIT);
for (y=0; y<ysiz; y++)
{
if (y < tsizy) y2 = y; else y2 = y-tsizy;
@ -1217,7 +1219,7 @@ static int32_t gloadtile_art(int32_t dapic, int32_t dapal, int32_t dameth, pthty
if (!fullbrightloadingpass)
{
// regular texture
if ((dacol > 239) && (dacol != 255))
if (dacol > 239 && dacol != 255 && dofullbright)
hasfullbright = 1;
wpptr->a = 255;
}

View file

@ -9735,6 +9735,10 @@ static void G_Startup(void)
G_GameExit("Failed loading art.");
}
// Make the fullscreen nuke logo background non-fullbright. Has to be
// after dynamic tile remapping (from C_Compile) and loading tiles.
picanm[LOADSCREEN] |= PICANM_NOFULLBRIGHT_BIT;
// initprintf("Loading palette/lookups...\n");
G_LoadExtraPalettes();