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

This commit is contained in:
mazmazz 2018-09-15 01:51:06 -04:00
commit 79484de4ea
2 changed files with 7 additions and 8 deletions

View file

@ -494,7 +494,6 @@ static void SaveExtraColormap(UINT8 *put, extracolormap_t *exc)
static extracolormap_t *LoadExtraColormap(UINT8 *get)
{
extracolormap_t *exc, *exc_exist;
//size_t dbg_i = 0;
UINT8 fadestart = READUINT8(get),
fadeend = READUINT8(get),
@ -515,8 +514,8 @@ static extracolormap_t *LoadExtraColormap(UINT8 *get)
if (!exc)
{
// CONS_Debug(DBG_RENDER, "Creating Colormap: rgba(%d,%d,%d,%d) fadergba(%d,%d,%d,%d)\n",
// (rgba)&0xFF, (rgba>>8)&0xFF, (rgba>>16)&0xFF, (rgba>>24)&0xFF,
// (fadergba)&0xFF, (fadergba>>8)&0xFF, (fadergba>>16)&0xFF, (fadergba>>24)&0xFF);
// R_GetRgbaR(rgba), R_GetRgbaG(rgba), R_GetRgbaB(rgba), R_GetRgbaA(rgba),
// R_GetRgbaR(fadergba), R_GetRgbaG(fadergba), R_GetRgbaB(fadergba), R_GetRgbaA(fadergba));
exc = Z_Calloc(sizeof (*exc), PU_LEVEL, NULL);

View file

@ -1510,7 +1510,7 @@ extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8
#endif
{
extracolormap_t *exc;
size_t dbg_i = 0;
UINT32 dbg_i = 0;
for (exc = extra_colormaps; exc; exc = exc->next)
{
@ -1525,8 +1525,8 @@ extracolormap_t *R_GetColormapFromListByValues(INT32 rgba, INT32 fadergba, UINT8
)
{
CONS_Debug(DBG_RENDER, "Found Colormap %d: rgba(%d,%d,%d,%d) fadergba(%d,%d,%d,%d)\n",
dbg_i, (rgba)&0xFF, (rgba>>8)&0xFF, (rgba>>16)&0xFF, (rgba>>24)&0xFF,
(fadergba)&0xFF, (fadergba>>8)&0xFF, (fadergba>>16)&0xFF, (fadergba>>24)&0xFF);
dbg_i, R_GetRgbaR(rgba), R_GetRgbaG(rgba), R_GetRgbaB(rgba), R_GetRgbaA(rgba),
R_GetRgbaR(fadergba), R_GetRgbaG(fadergba), R_GetRgbaB(fadergba), R_GetRgbaA(fadergba));
return exc;
}
dbg_i++;
@ -1905,6 +1905,8 @@ extracolormap_t *R_AddColormaps(extracolormap_t *exc_augend, extracolormap_t *ex
boolean useAltAlpha, INT16 altAlpha, INT16 altFadeAlpha,
boolean lighttable)
{
INT16 red, green, blue, alpha;
// exc_augend is added (or subtracted) onto by exc_addend
// In Rennaisance times, the first number was considered the augend, the second number the addend
// But since the commutative property was discovered, today they're both called addends!
@ -1914,8 +1916,6 @@ extracolormap_t *R_AddColormaps(extracolormap_t *exc_augend, extracolormap_t *ex
if(!exc_addend)
exc_addend = R_GetDefaultColormap();
INT16 red, green, blue, alpha;
///////////////////
// base rgba
///////////////////