From 9104fba3eccc094d1f0009e0b664054e81a53008 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 6 Mar 2021 23:06:26 +0100 Subject: [PATCH] - moved colormap constants to backend. --- .../postprocessing/hw_postprocess.cpp | 1 - source/common/utility/palutil.h | 10 ++++++++++ source/core/colormaps.h | 17 ----------------- 3 files changed, 10 insertions(+), 18 deletions(-) delete mode 100644 source/core/colormaps.h diff --git a/source/common/rendering/hwrenderer/postprocessing/hw_postprocess.cpp b/source/common/rendering/hwrenderer/postprocessing/hw_postprocess.cpp index 658a431dd..7a31ac416 100644 --- a/source/common/rendering/hwrenderer/postprocessing/hw_postprocess.cpp +++ b/source/common/rendering/hwrenderer/postprocessing/hw_postprocess.cpp @@ -28,7 +28,6 @@ #include "texturemanager.h" #include "templates.h" #include "stats.h" -#include "colormaps.h" Postprocess hw_postprocess; diff --git a/source/common/utility/palutil.h b/source/common/utility/palutil.h index b1dcca40a..c6b899903 100644 --- a/source/common/utility/palutil.h +++ b/source/common/utility/palutil.h @@ -56,6 +56,16 @@ struct FSpecialColormap PalEntry GrayscaleToColor[256]; }; +enum EColorManipulation +{ + CM_PLAIN2D = -2, // regular 2D drawing. + CM_INVALID = -1, + CM_DEFAULT = 0, // untranslated + CM_FIRSTSPECIALCOLORMAP, // first special fixed colormap +}; + +#define CM_MAXCOLORMAP int(CM_FIRSTSPECIALCOLORMAP + SpecialColormaps.Size()) + extern TArray SpecialColormaps; extern uint8_t DesaturateColormap[31][256]; diff --git a/source/core/colormaps.h b/source/core/colormaps.h deleted file mode 100644 index 1043199f7..000000000 --- a/source/core/colormaps.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef __RES_CMAP_H -#define __RES_CMAP_H - -enum EColorManipulation -{ - CM_PLAIN2D = -2, // regular 2D drawing. - CM_INVALID = -1, - CM_DEFAULT = 0, // untranslated - CM_FIRSTSPECIALCOLORMAP, // first special fixed colormap - CM_FIRSTSPECIALCOLORMAPFORCED = 0x08000000, // first special fixed colormap, application forced (for 2D overlays) -}; - -#define CM_MAXCOLORMAP int(CM_FIRSTSPECIALCOLORMAP + SpecialColormaps.Size()) -#define CM_MAXCOLORMAPFORCED int(CM_FIRSTSPECIALCOLORMAPFORCED + SpecialColormaps.Size()) - - -#endif