diff options
author | Colin Snover | 2016-01-14 10:50:41 -0600 |
---|---|---|
committer | Colin Snover | 2016-01-14 16:13:22 -0600 |
commit | fb891e4c081d5f0678cdda3855daa82728dc0ac0 (patch) | |
tree | b12fc60daad3bb20d63be8c850023a8a40ec5f84 /engines/sci/graphics/helpers.h | |
parent | f1cf07eded09f5f66a0915ddb79a890a3a11a362 (diff) | |
download | scummvm-rg350-fb891e4c081d5f0678cdda3855daa82728dc0ac0.tar.gz scummvm-rg350-fb891e4c081d5f0678cdda3855daa82728dc0ac0.tar.bz2 scummvm-rg350-fb891e4c081d5f0678cdda3855daa82728dc0ac0.zip |
SCI: Implement SCI32 kPalVary and kPalette setFade
This also fixes kPalCycle signatures to be more accurate.
Diffstat (limited to 'engines/sci/graphics/helpers.h')
-rw-r--r-- | engines/sci/graphics/helpers.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/engines/sci/graphics/helpers.h b/engines/sci/graphics/helpers.h index 4889f12bd2..e5b9f2aaed 100644 --- a/engines/sci/graphics/helpers.h +++ b/engines/sci/graphics/helpers.h @@ -121,6 +121,15 @@ struct Window : public Port, public Common::Serializable { struct Color { byte used; byte r, g, b; + +#ifdef ENABLE_SCI32 + bool operator==(const Color &other) const { + return used == other.used && r == other.r && g == other.g && b == other.b; + } + inline bool operator!=(const Color &other) const { + return !(*this == other); + } +#endif }; struct Palette { @@ -128,6 +137,21 @@ struct Palette { uint32 timestamp; Color colors[256]; byte intensity[256]; + +#ifdef ENABLE_SCI32 + bool operator==(const Palette &other) const { + for (int i = 0; i < ARRAYSIZE(colors); ++i) { + if (colors[i] != other.colors[i]) { + return false; + } + } + + return false; + } + inline bool operator!=(const Palette &other) const { + return !(*this == other); + } +#endif }; struct PalSchedule { |