Add uint32_t PaletteIndexFullbrights[8] so that Polymost can respect the lack of fullbrights in KenBuild and Shadow Warrior.

git-svn-id: https://svn.eduke32.com/eduke32@5210 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2015-05-19 22:04:38 +00:00
parent 8d78f25bc5
commit 91d6935c88
5 changed files with 10 additions and 2 deletions

View file

@ -87,6 +87,8 @@ enum rendmode_t {
#define MAXSPRITESONSCREEN 4096
#define MAXUNIQHUDID 256 //Extra slots so HUD models can store animation state without messing game sprites
extern uint32_t PaletteIndexFullbrights[8];
#define RESERVEDPALS 4 // don't forget to increment this when adding reserved pals
#define DETAILPAL (MAXPALOOKUPS - 1)
#define GLOWPAL (MAXPALOOKUPS - 2)

View file

@ -849,7 +849,7 @@ void gloadtile_art(int32_t dapic, int32_t dapal, int32_t tintpalnum, int32_t das
if (!fullbrightloadingpass)
{
// regular texture
if (dacol > 239 && dacol != 255 && dofullbright)
if ((PaletteIndexFullbrights[dacol>>5] & (1<<(dacol&31))) && dofullbright)
hasfullbright = 1;
wpptr->a = 255;
@ -857,7 +857,7 @@ void gloadtile_art(int32_t dapic, int32_t dapal, int32_t tintpalnum, int32_t das
else
{
// texture with only fullbright areas
if (dacol < 240) // regular colors
if (!(PaletteIndexFullbrights[dacol>>5] & (1<<(dacol&31)))) // regular colors
{
wpptr->a = 0;
hasalpha = 1;

View file

@ -1017,6 +1017,8 @@ void G_DoAutoload(const char *dirname)
//////////
uint32_t PaletteIndexFullbrights[8] = { 0, 0, 0, 0, 0, 0, 0, 2147418112 };
static uint8_t water_pal[768], slime_pal[768], title_pal[768], dre_alms[768], ending_pal[768];
uint8_t *basepaltable[BASEPALCOUNT] = {

View file

@ -29,6 +29,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
#include "pal.h"
#include "game.h"
uint32_t PaletteIndexFullbrights[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
short f_c = 3;
static unsigned char tempbuf[256];
unsigned char DefaultPalette[256 * 32];

View file

@ -30,6 +30,8 @@ uint8_t *basepaltable[1] = {
palette
};
uint32_t PaletteIndexFullbrights[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
#define NUMPSKYMULTIS 3
EDUKE32_STATIC_ASSERT(NUMPSKYMULTIS <= MAXPSKYMULTIS);
EDUKE32_STATIC_ASSERT(PSKYOFF_MAX <= MAXPSKYTILES);