Merge branch 'colormap-overhaul-change-ldef' into colormap-overhaul-fade

This commit is contained in:
mazmazz 2018-09-13 12:10:14 -04:00
commit 21506873be
4 changed files with 13 additions and 14 deletions

View file

@ -481,7 +481,7 @@ static void SaveExtraColormap(UINT8 *put, extracolormap_t *exc)
WRITEUINT8(put, exc->fadestart);
WRITEUINT8(put, exc->fadeend);
WRITEUINT8(put, (UINT8)exc->fog);
WRITEUINT8(put, exc->fog);
WRITEINT32(put, exc->rgba);
WRITEINT32(put, exc->fadergba);
@ -497,9 +497,8 @@ static extracolormap_t *LoadExtraColormap(UINT8 *get)
//size_t dbg_i = 0;
UINT8 fadestart = READUINT8(get),
fadeend = READUINT8(get);
boolean fog = (boolean)READUINT8(get);
fadeend = READUINT8(get),
fog = READUINT8(get);
INT32 rgba = READINT32(get),
fadergba = READINT32(get);

View file

@ -1439,10 +1439,10 @@ void R_AddColormapToList(extracolormap_t *extra_colormap)
//
#ifdef EXTRACOLORMAPLUMPS
boolean R_CheckDefaultColormapByValues(boolean checkrgba, boolean checkfadergba, boolean checkparams,
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog, lumpnum_t lump)
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog, lumpnum_t lump)
#else
boolean R_CheckDefaultColormapByValues(boolean checkrgba, boolean checkfadergba, boolean checkparams,
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog)
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog)
#endif
{
return (
@ -1504,9 +1504,9 @@ boolean R_CheckEqualColormaps(extracolormap_t *exc_a, extracolormap_t *exc_b, bo
// NOTE: Returns NULL if no match is found
//
#ifdef EXTRACOLORMAPLUMPS
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog, lumpnum_t lump)
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog, lumpnum_t lump)
#else
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog)
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog)
#endif
{
extracolormap_t *exc;
@ -1730,7 +1730,7 @@ extracolormap_t *R_CreateColormap(char *p1, char *p2, char *p3)
// default values
UINT8 cr = 0, cg = 0, cb = 0, ca = 0, cfr = 0, cfg = 0, cfb = 0, cfa = 25;
UINT32 fadestart = 0, fadeend = 31;
boolean fog = false;
UINT8 fog = 0;
INT32 rgba = 0, fadergba = 0x19000000;
#define HEX2INT(x) (UINT32)(x >= '0' && x <= '9' ? x - '0' : x >= 'a' && x <= 'f' ? x - 'a' + 10 : x >= 'A' && x <= 'F' ? x - 'A' + 10 : 0)

View file

@ -112,12 +112,12 @@ void R_AddColormapToList(extracolormap_t *extra_colormap);
#ifdef EXTRACOLORMAPLUMPS
boolean R_CheckDefaultColormapByValues(boolean checkrgba, boolean checkfadergba, boolean checkparams,
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog, lumpnum_t lump);
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog, lumpnum_t lump);
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog, lumpnum_t lump);
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog, lumpnum_t lump);
#else
boolean R_CheckDefaultColormapByValues(boolean checkrgba, boolean checkfadergba, boolean checkparams,
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog);
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, boolean fog);
INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog);
extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8 fadestart, UINT8 fadeend, UINT8 fog);
#endif
boolean R_CheckDefaultColormap(extracolormap_t *extra_colormap, boolean checkrgba, boolean checkfadergba, boolean checkparams);
boolean R_CheckEqualColormaps(extracolormap_t *exc_a, extracolormap_t *exc_b, boolean checkrgba, boolean checkfadergba, boolean checkparams);

View file

@ -53,7 +53,7 @@ typedef UINT8 lighttable_t;
typedef struct extracolormap_s
{
UINT8 fadestart, fadeend;
boolean fog;
UINT8 fog; // 1 = disable sprite fullbright, 2 = force planes fullbright, see public gitlab !268
// store rgba values in combined bitwise
// also used in OpenGL instead lighttables