mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Pull setting g_noFloorPal[] further down, into makepalookup().
Now passed as last arg 'noFloorPal' to makepalookup(). Used as follows: - from loadlookups(): *false*, i.e. do take over floor pal. - from generatefogpals() [default fog pals] and fillemptylookups(): *true*, i.e. don't take over floor pal - from DEF 'fogpal': true - from DEF 'makepalookup': take over flag from pal from which we are remapping, or set to true if remapping from pal 0 - (CROSSHAIR_PAL: true) This should make the issue reported in http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__197583 resolve in a natural manner. git-svn-id: https://svn.eduke32.com/eduke32@4812 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
70cbde87eb
commit
50a5e38cb6
3 changed files with 9 additions and 13 deletions
|
@ -1098,7 +1098,7 @@ void loadtile(int16_t tilenume);
|
|||
int32_t qloadkvx(int32_t voxindex, const char *filename);
|
||||
intptr_t allocatepermanenttile(int16_t tilenume, int32_t xsiz, int32_t ysiz);
|
||||
void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, int32_t ysiz, int32_t tilenume2, int32_t sx2, int32_t sy2);
|
||||
void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat);
|
||||
void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8_t b, char noFloorPal);
|
||||
//void setvgapalette(void);
|
||||
void setbasepaltable(uint8_t **basepaltable, uint8_t basepalcount);
|
||||
void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags);
|
||||
|
|
|
@ -1757,7 +1757,8 @@ static int32_t defsparser(scriptfile *script)
|
|||
|
||||
// NOTE: all palookups are initialized, i.e. non-NULL!
|
||||
// NOTE2: aliasing (pal==remappal) is OK
|
||||
makepalookup(pal, palookup[remappal], red, green, blue, 1);
|
||||
makepalookup(pal, palookup[remappal], red, green, blue,
|
||||
remappal==0 ? 1 : g_noFloorPal[remappal]);
|
||||
}
|
||||
break;
|
||||
case T_TEXTURE:
|
||||
|
|
|
@ -8334,7 +8334,7 @@ int32_t loadlookups(int32_t fp)
|
|||
if (kread(fp, remapbuf, 256) != 256)
|
||||
return -1;
|
||||
|
||||
makepalookup(palnum, remapbuf, 0,0,0, 1);
|
||||
makepalookup(palnum, remapbuf, 0,0,0, 0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -8352,11 +8352,6 @@ void generatefogpals(void)
|
|||
makepalookup(j+2, NULL, 0, 15, 0, 1);
|
||||
makepalookup(j+3, NULL, 0, 0, 15, 1);
|
||||
|
||||
g_noFloorPal[j] = 1;
|
||||
g_noFloorPal[j+1] = 1;
|
||||
g_noFloorPal[j+2] = 1;
|
||||
g_noFloorPal[j+3] = 1;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -8371,8 +8366,6 @@ void fillemptylookups(void)
|
|||
|
||||
#define COLRESULTSIZ 4096
|
||||
|
||||
#define COLRESULT(x) do { } while (0)
|
||||
|
||||
static uint32_t getclosestcol_results[COLRESULTSIZ];
|
||||
static int32_t numclosestcolresults;
|
||||
|
||||
|
@ -15059,7 +15052,7 @@ int32_t setpalookup(int32_t palnum, const uint8_t *shtab)
|
|||
//
|
||||
// makepalookup
|
||||
//
|
||||
void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat)
|
||||
void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8_t b, char noFloorPal)
|
||||
{
|
||||
int32_t i, j;
|
||||
|
||||
|
@ -15072,6 +15065,8 @@ void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8
|
|||
if ((unsigned)palnum >= MAXPALOOKUPS)
|
||||
return;
|
||||
|
||||
g_noFloorPal[palnum] = noFloorPal;
|
||||
|
||||
if (remapbuf==NULL)
|
||||
{
|
||||
if ((r|g|b) == 0)
|
||||
|
@ -15089,8 +15084,8 @@ void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8
|
|||
|
||||
maybe_alloc_palookup(palnum);
|
||||
|
||||
if (dastat == 0) return;
|
||||
if ((r|g|b|63) != 63) return;
|
||||
if ((r|g|b|63) != 63)
|
||||
return;
|
||||
|
||||
if ((r|g|b) == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue