diff options
author | Travis Howell | 2009-10-27 09:17:09 +0000 |
---|---|---|
committer | Travis Howell | 2009-10-27 09:17:09 +0000 |
commit | e49065c8214e409226ce9ab9e72f09fa3fb6ee02 (patch) | |
tree | c329c8d099c421b3e12e76cf578cb6e4ebb12dae /engines/scumm/scumm.cpp | |
parent | b132c65ff3b6e374c94bb57187284740d75a5fb8 (diff) | |
download | scummvm-rg350-e49065c8214e409226ce9ab9e72f09fa3fb6ee02.tar.gz scummvm-rg350-e49065c8214e409226ce9ab9e72f09fa3fb6ee02.tar.bz2 scummvm-rg350-e49065c8214e409226ce9ab9e72f09fa3fb6ee02.zip |
Add support for distaff images in PCE version of Loom.
svn-id: r45433
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 7cfa813f70..3732703262 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1486,8 +1486,20 @@ void ScummEngine_v2::resetScumm() { void ScummEngine_v3::resetScumm() { ScummEngine_v4::resetScumm(); - _16BitPalette = (uint16 *)malloc(512); - memset(_16BitPalette, 0, 512); + + if (_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine) { + _16BitPalette = (uint16 *)calloc(512, sizeof(uint16)); + + // Load tile set and palette for the distaff + byte *roomptr = getResourceAddress(rtRoom, 90); + assert(roomptr); + const byte *palPtr = findResourceData(MKID_BE('CLUT'), roomptr); + assert(palPtr - 4); + setPCEPaletteFromPtr(palPtr); + _gdi->_distaff = true; + _gdi->loadTiles(roomptr); + _gdi->_distaff = false; + } delete _savePreparedSavegame; _savePreparedSavegame = NULL; |