aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/palette32.h
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/graphics/palette32.h')
-rw-r--r--engines/sci/graphics/palette32.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/engines/sci/graphics/palette32.h b/engines/sci/graphics/palette32.h
index a5450776dc..7dda53e5c1 100644
--- a/engines/sci/graphics/palette32.h
+++ b/engines/sci/graphics/palette32.h
@@ -113,12 +113,12 @@ private:
public:
virtual void saveLoadWithSerializer(Common::Serializer &s) override;
- const Palette *getNextPalette() const;
+ inline const Palette &getNextPalette() const { return _nextPalette; };
+ inline const Palette &getCurrentPalette() const { return _sysPalette; };
bool kernelSetFromResource(GuiResourceId resourceId, bool force) override;
int16 kernelFindColor(uint16 r, uint16 g, uint16 b) override;
void set(Palette *newPalette, bool force, bool forceRealMerge = false) override;
- int16 matchColor(const byte matchRed, const byte matchGreen, const byte matchBlue, const int defaultDifference, int &lastCalculatedDifference, const bool *const matchTable);
/**
* Submits a palette to display. Entries marked as “used” in the
@@ -133,7 +133,7 @@ public:
void applyAll();
#pragma mark -
-#pragma mark color look-up
+#pragma mark Color look-up
private:
/**
* An optional lookup table used to remap RGB565 colors to a palette
@@ -240,6 +240,11 @@ private:
* According to SCI engine code, when two cyclers overlap,
* a fatal error has occurred and the engine will display
* an error and then exit.
+ *
+ * The cycle map is also by the color remapping system to
+ * avoid attempting to remap to palette entries that are
+ * cycling (so won't be the expected color once the cycler
+ * runs again).
*/
bool _cycleMap[256];
inline void clearCycleMap(uint16 fromColor, uint16 numColorsToClear);
@@ -257,7 +262,7 @@ public:
void cycleAllOff();
void applyAllCycles();
void applyCycles();
- const bool *getCyclemap() { return _cycleMap; }
+ inline const bool *getCycleMap() const { return _cycleMap; }
#pragma mark -
#pragma mark Fading