From 79298285f7118f49d96e2c7c740ee0d442c16120 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 22 Sep 2009 01:31:36 +0000 Subject: [PATCH] - Making any blends with full red a special colormap seems like it would be far too easy to accidentally trigger. SVN r1864 (trunk) --- src/v_palette.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/v_palette.h b/src/v_palette.h index a856de97d..186c25d5e 100644 --- a/src/v_palette.h +++ b/src/v_palette.h @@ -106,21 +106,22 @@ struct FSpecialColormap extern TArray SpecialColormaps; // some utility functions to store special colormaps in powerup blends -#define SPECIALCOLORMAP_MASK 0x00ff0000 +#define SPECIALCOLORMAP_MASK 0xBEEF0000 inline int MakeSpecialColormap(int index) { + assert(index >= 0 && index < 65536); return index | SPECIALCOLORMAP_MASK; } inline bool IsSpecialColormap(int map) { - return (map & SPECIALCOLORMAP_MASK) == SPECIALCOLORMAP_MASK; + return (map & 0xFFFF0000) == SPECIALCOLORMAP_MASK; } inline int GetSpecialColormap(int blend) { - return IsSpecialColormap(blend)? blend & ~SPECIALCOLORMAP_MASK : NOFIXEDCOLORMAP; + return IsSpecialColormap(blend) ? blend & 0xFFFF : NOFIXEDCOLORMAP; } int AddSpecialColormap(double r, double g, double b, bool inv);