Index: scumm/gfx.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v retrieving revision 2.223 retrieving revision 2.224 diff -u -r2.223 -r2.224 --- scumm/gfx.cpp 12 Oct 2003 12:03:17 -0000 2.223 +++ scumm/gfx.cpp 12 Oct 2003 17:33:28 -0000 2.224 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v 2.223 2003/10/12 12:03:17 kirben Exp $ + * $Header: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v 2.224 2003/10/12 17:33:28 fingolfin Exp $ * */ @@ -1770,7 +1770,7 @@ int x = 8; do { FILL_BITS; - *dst++ = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst++ = _vm->_roomPalette[color + _palette_mod]; againPos: if (!READ_BIT) { @@ -1795,7 +1795,7 @@ if (!--height) return; } - *dst++ = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst++ = _vm->_roomPalette[color + _palette_mod]; } while (--reps); bits >>= 8; bits |= (*src++) << (cl - 8); @@ -1819,7 +1819,7 @@ do { FILL_BITS; if (color != _transparentColor) - *dst = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst = _vm->_roomPalette[color + _palette_mod]; dst++; againPos: @@ -1846,7 +1846,7 @@ return; } if (color != _transparentColor) - *dst = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst = _vm->_roomPalette[color + _palette_mod]; dst++; } while (--reps); bits >>= 8; @@ -1870,7 +1870,7 @@ int x = 8; do { FILL_BITS; - *dst++ = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst++ = _vm->_roomPalette[color + _palette_mod]; if (!READ_BIT) { } else if (!READ_BIT) { FILL_BITS; @@ -1901,7 +1901,7 @@ do { FILL_BITS; if (color != _transparentColor) - *dst = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst = _vm->_roomPalette[color + _palette_mod]; dst++; if (!READ_BIT) { } else if (!READ_BIT) { @@ -1933,7 +1933,7 @@ int h = height; do { FILL_BITS; - *dst = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst = _vm->_roomPalette[color + _palette_mod]; dst += _vm->_screenWidth; if (!READ_BIT) { } else if (!READ_BIT) { @@ -1966,7 +1966,7 @@ do { FILL_BITS; if (color != _transparentColor) - *dst = (_vm->_features & GF_SMALL_HEADER) ? _vm->_roomPalette[color + _palette_mod] : color + _palette_mod; + *dst = _vm->_roomPalette[color + _palette_mod]; dst += _vm->_screenWidth; if (!READ_BIT) { } else if (!READ_BIT) { Index: scumm/resource_v2.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v2.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- scumm/resource_v2.cpp 5 Oct 2003 17:32:38 -0000 1.37 +++ scumm/resource_v2.cpp 12 Oct 2003 17:33:28 -0000 1.38 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: /cvsroot/scummvm/scummvm/scumm/resource_v2.cpp,v 1.37 2003/10/05 17:32:38 fingolfin Exp $ + * $Header: /cvsroot/scummvm/scummvm/scumm/resource_v2.cpp,v 1.38 2003/10/12 17:33:28 fingolfin Exp $ * */ @@ -196,7 +196,6 @@ _shadowPaletteSize = 256; - _roomPalette = (byte *) calloc(_shadowPaletteSize, 1); // FIXME - needs to be removed later _shadowPalette = (byte *) calloc(_shadowPaletteSize, 1); // FIXME - needs to be removed later allocateArrays(); } Index: scumm/resource_v3.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/resource_v3.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- scumm/resource_v3.cpp 3 Oct 2003 18:33:55 -0000 1.23 +++ scumm/resource_v3.cpp 12 Oct 2003 17:33:28 -0000 1.24 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: /cvsroot/scummvm/scummvm/scumm/resource_v3.cpp,v 1.23 2003/10/03 18:33:55 fingolfin Exp $ + * $Header: /cvsroot/scummvm/scummvm/scumm/resource_v3.cpp,v 1.24 2003/10/12 17:33:28 fingolfin Exp $ * */ @@ -208,7 +208,6 @@ _shadowPaletteSize = 256; - _roomPalette = (byte *) calloc(_shadowPaletteSize, 1); // FIXME - needs to be removed later _shadowPalette = (byte *) calloc(_shadowPaletteSize, 1); // FIXME - needs to be removed later allocateArrays(); } Index: scumm/saveload.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v retrieving revision 1.113 retrieving revision 1.114 diff -u -r1.113 -r1.114 --- scumm/saveload.cpp 8 Oct 2003 21:59:22 -0000 1.113 +++ scumm/saveload.cpp 12 Oct 2003 17:33:28 -0000 1.114 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v 1.113 2003/10/08 21:59:22 fingolfin Exp $ + * $Header: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v 1.114 2003/10/12 17:33:28 fingolfin Exp $ * */ @@ -615,7 +615,7 @@ s->saveLoadArrayOf(_shadowPalette, _shadowPaletteSize, 1, sleByte); // _roomPalette didn't show up until V21 save games if (savegameVersion >= VER(21) && _version < 5) - s->saveLoadArrayOf (_roomPalette, _shadowPaletteSize, 1, sleByte); + s->saveLoadArrayOf(_roomPalette, sizeof(_roomPalette), 1, sleByte); } // PalManip data was not saved before V10 save games Index: scumm/scumm.h =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v retrieving revision 1.312 retrieving revision 1.313 diff -u -r1.312 -r1.313 --- scumm/scumm.h 6 Oct 2003 19:21:18 -0000 1.312 +++ scumm/scumm.h 12 Oct 2003 17:33:29 -0000 1.313 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: /cvsroot/scummvm/scummvm/scumm/scumm.h,v 1.312 2003/10/06 19:21:18 fingolfin Exp $ + * $Header: /cvsroot/scummvm/scummvm/scumm/scumm.h,v 1.313 2003/10/12 17:33:29 fingolfin Exp $ * */ @@ -950,7 +950,7 @@ public: byte _proc_special_palette[256]; - byte *_roomPalette; + byte _roomPalette[256]; byte *_shadowPalette; protected: Index: scumm/scummvm.cpp =================================================================== RCS file: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v retrieving revision 2.434 retrieving revision 2.435 diff -u -r2.434 -r2.435 --- scumm/scummvm.cpp 12 Oct 2003 17:25:27 -0000 2.434 +++ scumm/scummvm.cpp 12 Oct 2003 17:33:29 -0000 2.435 @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - * $Header: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v 2.434 2003/10/12 17:25:27 fingolfin Exp $ + * $Header: /cvsroot/scummvm/scummvm/scumm/Attic/scummvm.cpp,v 2.435 2003/10/12 17:33:29 fingolfin Exp $ * */ @@ -276,6 +276,7 @@ // Init all vars - maybe now we can get rid of our custom new/delete operators? _imuse = NULL; _imuseDigital = NULL; + _musicEngine = NULL; _features = 0; _verbs = NULL; _objs = NULL; @@ -429,7 +430,6 @@ _palManipPalette = NULL; _palManipIntermediatePal = NULL; memset(gfxUsageBits, 0, sizeof(gfxUsageBits)); - _roomPalette = NULL; _shadowPalette = NULL; _shadowPaletteSize = 0; memset(_currentPalette, 0, sizeof(_currentPalette)); @@ -664,9 +664,6 @@ _mixer->setMusicVolume(kDefaultMusicVolume); // Init iMuse - _imuse = NULL; - _imuseDigital = NULL; - _musicEngine = NULL; if (_features & GF_DIGI_IMUSE) { _musicEngine = _imuseDigital = new IMuseDigital(this); #ifndef __PALM_OS__ @@ -754,8 +751,6 @@ fp.close(); } } - - _audioNames = NULL; } ScummEngine::~ScummEngine() { @@ -780,7 +775,6 @@ delete _costumeRenderer; - free(_roomPalette); free(_shadowPalette); freeResources(); @@ -1900,8 +1894,7 @@ if (_version < 7) { for (i = 0; i < 256; i++) { - if (_features & GF_SMALL_HEADER) - _roomPalette[i] = i; + _roomPalette[i] = i; _shadowPalette[i] = i; } if (_features & GF_SMALL_HEADER)