aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/palette.h
diff options
context:
space:
mode:
authorStrangerke2012-10-10 08:26:41 +0200
committerStrangerke2012-10-10 08:26:41 +0200
commitb164cbb571fc4e0f2a6f002760a851d8ac592540 (patch)
tree4d25f2e1f8241f6f3352fd9fb1135f5faa36dfd4 /engines/sci/graphics/palette.h
parentb2f2f8d7b08b40e43702e8db325f8136066f10be (diff)
parent1e200620d673af4acdd2d128ed6e390df001aacf (diff)
downloadscummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.tar.gz
scummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.tar.bz2
scummvm-rg350-b164cbb571fc4e0f2a6f002760a851d8ac592540.zip
Merge branch 'master' of github.com:scummvm/scummvm into mortevielle
Conflicts: base/plugins.cpp configure
Diffstat (limited to 'engines/sci/graphics/palette.h')
-rw-r--r--engines/sci/graphics/palette.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h
index a9ea1c32de..e974781d49 100644
--- a/engines/sci/graphics/palette.h
+++ b/engines/sci/graphics/palette.h
@@ -31,6 +31,12 @@ namespace Sci {
class ResourceManager;
class GfxScreen;
+enum ColorRemappingType {
+ kRemappingNone = 0,
+ kRemappingByRange = 1,
+ kRemappingByPercent = 2
+};
+
/**
* Palette class, handles palette operations like changing intensity, setting up the palette, merging different palettes
*/
@@ -53,6 +59,15 @@ public:
void getSys(Palette *pal);
uint16 getTotalColorCount() const { return _totalScreenColors; }
+ void resetRemapping();
+ void setRemappingPercent(byte color, byte percent);
+ void setRemappingPercentGray(byte color, byte percent);
+ void setRemappingRange(byte color, byte from, byte to, byte base);
+ bool isRemapped(byte color) const {
+ return _remapOn && (_remappingType[color] != kRemappingNone);
+ }
+ byte remapColor(byte remappedColor, byte screenColor);
+
void setOnScreen();
void copySysPaletteToScreen();
@@ -123,6 +138,12 @@ private:
int _palVarySignal;
uint16 _totalScreenColors;
+ bool _remapOn;
+ ColorRemappingType _remappingType[256];
+ byte _remappingByPercent[256];
+ byte _remappingByRange[256];
+ uint16 _remappingPercentToSet;
+
void loadMacIconBarPalette();
byte *_macClut;