diff options
author | md5 | 2011-03-04 21:56:14 +0200 |
---|---|---|
committer | md5 | 2011-03-04 22:04:13 +0200 |
commit | d95b5331fb266de492c45d348ccb8313ca7824aa (patch) | |
tree | c820e2dbc538cfdf63b7a0dbbec03810805d340c /engines/sci/graphics | |
parent | 5b9677da72efadf566be2a666bd9ca44ca35adc8 (diff) | |
download | scummvm-rg350-d95b5331fb266de492c45d348ccb8313ca7824aa.tar.gz scummvm-rg350-d95b5331fb266de492c45d348ccb8313ca7824aa.tar.bz2 scummvm-rg350-d95b5331fb266de492c45d348ccb8313ca7824aa.zip |
SCI: Some palette related changes
- Moved palette color count inside the GfxPalette class
- Enabled all of the kPalette subops for 16 color SCI1 games, apart from
the ones for intensity palette animation, and palette resource loading
- Removed isVGA() and isAmiga32color() methods from the resource manager -
they ended up in having inconsistent code
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/palette.cpp | 17 | ||||
-rw-r--r-- | engines/sci/graphics/palette.h | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp index 683f4369f9..1b3e259ae5 100644 --- a/engines/sci/graphics/palette.cpp +++ b/engines/sci/graphics/palette.cpp @@ -76,6 +76,21 @@ GfxPalette::GfxPalette(ResourceManager *resMan, GfxScreen *screen, bool useMergi #ifdef ENABLE_SCI32 _clutTable = 0; #endif + + switch (_resMan->getViewType()) { + case kViewVga: + case kViewVga11: + _totalScreenColors = 256; + break; + case kViewAmiga: + _totalScreenColors = 32; + break; + case kViewEga: + _totalScreenColors = 16; + break; + default: + error("GfxPalette: Unknown view type"); + } } GfxPalette::~GfxPalette() { @@ -97,7 +112,7 @@ bool GfxPalette::isMerging() { void GfxPalette::setDefault() { if (_resMan->getViewType() == kViewEga) setEGA(); - else if (_resMan->isAmiga32color()) + else if (_resMan->getViewType() == kViewAmiga) setAmiga(); else kernelSetFromResource(999, true); diff --git a/engines/sci/graphics/palette.h b/engines/sci/graphics/palette.h index 317401ac1f..d2e5151d6a 100644 --- a/engines/sci/graphics/palette.h +++ b/engines/sci/graphics/palette.h @@ -54,6 +54,7 @@ public: bool merge(Palette *pFrom, bool force, bool forceRealMerge); uint16 matchColor(byte r, byte g, byte b); void getSys(Palette *pal); + uint16 getTotalColorCount() const { return _totalScreenColors; } void setOnScreen(); void copySysPaletteToScreen(); @@ -123,6 +124,7 @@ private: uint16 _palVaryTicks; int _palVaryPaused; int _palVarySignal; + uint16 _totalScreenColors; void loadMacIconBarPalette(); byte *_macClut; |