diff options
author | Eugene Sandulenko | 2016-07-10 22:11:13 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | c4e1d08d4a868801fc522d0d27aa6693ddac6114 (patch) | |
tree | 871f1a316f4482abf41c429ba4ae6ae4cd06e120 /engines/director | |
parent | dff575bea4451113a8268709d2b0c4c8004f61a6 (diff) | |
download | scummvm-rg350-c4e1d08d4a868801fc522d0d27aa6693ddac6114.tar.gz scummvm-rg350-c4e1d08d4a868801fc522d0d27aa6693ddac6114.tar.bz2 scummvm-rg350-c4e1d08d4a868801fc522d0d27aa6693ddac6114.zip |
DIRECTOR: Added default Mac palette
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/score.cpp | 83 |
1 files changed, 76 insertions, 7 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 6352e432fb..776768b167 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -44,6 +44,72 @@ namespace Director { +static byte defaultPalette[768] = { + 0, 0, 0, 17, 17, 17, 34, 34, 34, 68, 68, 68, + 85, 85, 85, 119, 119, 119, 136, 136, 136, 170, 170, 170, + 187, 187, 187, 221, 221, 221, 238, 238, 238, 0, 0, 17, + 0, 0, 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, + 0, 0, 136, 0, 0, 170, 0, 0, 187, 0, 0, 221, + 0, 0, 238, 0, 17, 0, 0, 34, 0, 0, 68, 0, + 0, 85, 0, 0, 119, 0, 0, 136, 0, 0, 170, 0, + 0, 187, 0, 0, 221, 0, 0, 238, 0, 17, 0, 0, + 34, 0, 0, 68, 0, 0, 85, 0, 0, 119, 0, 0, + 136, 0, 0, 170, 0, 0, 187, 0, 0, 221, 0, 0, + 238, 0, 0, 0, 0, 51, 0, 0, 102, 0, 0, 153, + 0, 0, 204, 0, 0, 255, 0, 51, 0, 0, 51, 51, + 0, 51, 102, 0, 51, 153, 0, 51, 204, 0, 51, 255, + 0, 102, 0, 0, 102, 51, 0, 102, 102, 0, 102, 153, + 0, 102, 204, 0, 102, 255, 0, 153, 0, 0, 153, 51, + 0, 153, 102, 0, 153, 153, 0, 153, 204, 0, 153, 255, + 0, 204, 0, 0, 204, 51, 0, 204, 102, 0, 204, 153, + 0, 204, 204, 0, 204, 255, 0, 255, 0, 0, 255, 51, + 0, 255, 102, 0, 255, 153, 0, 255, 204, 0, 255, 255, + 51, 0, 0, 51, 0, 51, 51, 0, 102, 51, 0, 153, + 51, 0, 204, 51, 0, 255, 51, 51, 0, 51, 51, 51, + 51, 51, 102, 51, 51, 153, 51, 51, 204, 51, 51, 255, + 51, 102, 0, 51, 102, 51, 51, 102, 102, 51, 102, 153, + 51, 102, 204, 51, 102, 255, 51, 153, 0, 51, 153, 51, + 51, 153, 102, 51, 153, 153, 51, 153, 204, 51, 153, 255, + 51, 204, 0, 51, 204, 51, 51, 204, 102, 51, 204, 153, + 51, 204, 204, 51, 204, 255, 51, 255, 0, 51, 255, 51, + 51, 255, 102, 51, 255, 153, 51, 255, 204, 51, 255, 255, + 102, 0, 0, 102, 0, 51, 102, 0, 102, 102, 0, 153, + 102, 0, 204, 102, 0, 255, 102, 51, 0, 102, 51, 51, + 102, 51, 102, 102, 51, 153, 102, 51, 204, 102, 51, 255, + 102, 102, 0, 102, 102, 51, 102, 102, 102, 102, 102, 153, + 102, 102, 204, 102, 102, 255, 102, 153, 0, 102, 153, 51, + 102, 153, 102, 102, 153, 153, 102, 153, 204, 102, 153, 255, + 102, 204, 0, 102, 204, 51, 102, 204, 102, 102, 204, 153, + 102, 204, 204, 102, 204, 255, 102, 255, 0, 102, 255, 51, + 102, 255, 102, 102, 255, 153, 102, 255, 204, 102, 255, 255, + 153, 0, 0, 153, 0, 51, 153, 0, 102, 153, 0, 153, + 153, 0, 204, 153, 0, 255, 153, 51, 0, 153, 51, 51, + 153, 51, 102, 153, 51, 153, 153, 51, 204, 153, 51, 255, + 153, 102, 0, 153, 102, 51, 153, 102, 102, 153, 102, 153, + 153, 102, 204, 153, 102, 255, 153, 153, 0, 153, 153, 51, + 153, 153, 102, 153, 153, 153, 153, 153, 204, 153, 153, 255, + 153, 204, 0, 153, 204, 51, 153, 204, 102, 153, 204, 153, + 153, 204, 204, 153, 204, 255, 153, 255, 0, 153, 255, 51, + 153, 255, 102, 153, 255, 153, 153, 255, 204, 153, 255, 255, + 204, 0, 0, 204, 0, 51, 204, 0, 102, 204, 0, 153, + 204, 0, 204, 204, 0, 255, 204, 51, 0, 204, 51, 51, + 204, 51, 102, 204, 51, 153, 204, 51, 204, 204, 51, 255, + 204, 102, 0, 204, 102, 51, 204, 102, 102, 204, 102, 153, + 204, 102, 204, 204, 102, 255, 204, 153, 0, 204, 153, 51, + 204, 153, 102, 204, 153, 153, 204, 153, 204, 204, 153, 255, + 204, 204, 0, 204, 204, 51, 204, 204, 102, 204, 204, 153, + 204, 204, 204, 204, 204, 255, 204, 255, 0, 204, 255, 51, + 204, 255, 102, 204, 255, 153, 204, 255, 204, 204, 255, 255, + 255, 0, 0, 255, 0, 51, 255, 0, 102, 255, 0, 153, + 255, 0, 204, 255, 0, 255, 255, 51, 0, 255, 51, 51, + 255, 51, 102, 255, 51, 153, 255, 51, 204, 255, 51, 255, + 255, 102, 0, 255, 102, 51, 255, 102, 102, 255, 102, 153, + 255, 102, 204, 255, 102, 255, 255, 153, 0, 255, 153, 51, + 255, 153, 102, 255, 153, 153, 255, 153, 204, 255, 153, 255, + 255, 204, 0, 255, 204, 51, 255, 204, 102, 255, 204, 153, + 255, 204, 204, 255, 204, 255, 255, 255, 0, 255, 255, 51, + 255, 255, 102, 255, 255, 153, 255, 255, 204, 255, 255, 255 }; + Score::Score(DirectorEngine *vm) { loadMacFonts(); _vm = vm; @@ -69,15 +135,18 @@ void Score::loadArchive() { Common::Array<uint16> clutList = _movieArchive->getResourceIDList(MKTAG('C','L','U','T')); if (clutList.size() > 1) - error("More than one palette was found"); - - if (clutList.size() == 0) - error("CLUT not found"); + warning("More than one palette was found (%d)", clutList.size()); - Common::SeekableSubReadStreamEndian *pal = _movieArchive->getResource(MKTAG('C', 'L', 'U', 'T'), clutList[0]); + if (clutList.size() == 0) { + warning("CLUT resource not found, using default Mac palette"); + g_system->getPaletteManager()->setPalette(defaultPalette, 0, 256); + _vm->setPalette(defaultPalette, 256); + } else { + Common::SeekableSubReadStreamEndian *pal = _movieArchive->getResource(MKTAG('C', 'L', 'U', 'T'), clutList[0]); - loadPalette(*pal); - g_system->getPaletteManager()->setPalette(_vm->getPalette(), 0, _vm->getPaletteColorCount()); + loadPalette(*pal); + g_system->getPaletteManager()->setPalette(_vm->getPalette(), 0, _vm->getPaletteColorCount()); + } assert(_movieArchive->hasResource(MKTAG('V','W','S','C'), 1024)); assert(_movieArchive->hasResource(MKTAG('V','W','C','F'), 1024)); |