aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/palette.h
diff options
context:
space:
mode:
authorPaul Gilbert2014-02-22 00:24:39 -0500
committerPaul Gilbert2014-02-22 00:24:39 -0500
commit9f1416c6a358eb1dc860ff1176ae89721d82fc50 (patch)
tree4bc10911d84d88ba65be94cac41ac8c30501b0dc /engines/mads/palette.h
parent40b3ab62ca8a16c2fd06bfcc691967c4f510d52a (diff)
downloadscummvm-rg350-9f1416c6a358eb1dc860ff1176ae89721d82fc50.tar.gz
scummvm-rg350-9f1416c6a358eb1dc860ff1176ae89721d82fc50.tar.bz2
scummvm-rg350-9f1416c6a358eb1dc860ff1176ae89721d82fc50.zip
MADS: Implemented constructor for copy protection dialog, and support methods
Diffstat (limited to 'engines/mads/palette.h')
-rw-r--r--engines/mads/palette.h42
1 files changed, 12 insertions, 30 deletions
diff --git a/engines/mads/palette.h b/engines/mads/palette.h
index a97d5de20f..0ef8693a1f 100644
--- a/engines/mads/palette.h
+++ b/engines/mads/palette.h
@@ -84,13 +84,14 @@ protected:
byte _fadedPalette[PALETTE_COUNT * 4];
int _usageCount[PALETTE_COUNT];
- Palette(MADSEngine *vm);
void reset();
public:
+ byte _mainPalette[PALETTE_SIZE];
+public:
/**
- * Creates a new palette instance
+ * Constructor
*/
- static Palette *init(MADSEngine *vm);
+ Palette(MADSEngine *vm);
/**
* Destructor
@@ -153,17 +154,22 @@ public:
/**
* Decode a palette and return it, without affecting the Palette itself
*/
- virtual byte *decodePalette(Common::SeekableReadStream *palStream, int *numColors) = 0;
+ byte *decodePalette(Common::SeekableReadStream *palStream, int *numColors);
/**
* Loads a palette from a stream
*/
- virtual int loadPalette(Common::SeekableReadStream *palStream, int indexStart = 0) = 0;
+ int loadPalette(Common::SeekableReadStream *palStream, int indexStart = 0);
/**
* Sets a small set of system/core colors needed by the game
*/
- virtual void setSystemPalette() = 0;
+ void setSystemPalette();
+
+ /**
+ * Update a range of an arbitrary palette
+ */
+ static void setGradient(byte *palette, int start, int count, int rgbValue1, int rgbValue2);
// Color indexes
uint8 BLACK;
@@ -184,30 +190,6 @@ public:
uint8 WHITE;
};
-class PaletteMADS: protected Palette {
- friend class Palette;
-protected:
- PaletteMADS(MADSEngine *vm): Palette(vm) {}
-public:
- virtual byte *decodePalette(Common::SeekableReadStream *palStream, int *numColors);
- virtual int loadPalette(Common::SeekableReadStream *palStream, int indexStart = 0);
- virtual void setSystemPalette();
-};
-
-class PaletteM4: protected Palette {
- friend class Palette;
-protected:
- PaletteM4(MADSEngine *vm): Palette(vm) {}
-public:
- virtual byte *decodePalette(Common::SeekableReadStream *palStream, int *numColors) {
- return nullptr;
- }
- virtual int loadPalette(Common::SeekableReadStream *palStream, int indexStart = 0) {
- return 0;
- }
- virtual void setSystemPalette() {}
-};
-
} // End of namespace MADS
#endif /* MADS_PALETTE_H */