From 3a64d35dfd9126d7912c4d4496030f7ed120d660 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 4 Jun 2009 01:05:47 +0000 Subject: Add 16bit color support for later HE games. svn-id: r41153 --- engines/scumm/actor.cpp | 2 +- engines/scumm/akos.cpp | 81 ++++++--- engines/scumm/akos.h | 2 +- engines/scumm/base-costume.cpp | 2 +- engines/scumm/charset.cpp | 4 +- engines/scumm/gfx.cpp | 245 +++++++++++++++---------- engines/scumm/gfx.h | 4 +- engines/scumm/he/animation_he.cpp | 31 +++- engines/scumm/he/animation_he.h | 1 + engines/scumm/he/intern_he.h | 3 +- engines/scumm/he/palette_he.cpp | 217 ++++++++++++++++------ engines/scumm/he/script_v100he.cpp | 43 +++-- engines/scumm/he/script_v60he.cpp | 2 + engines/scumm/he/script_v80he.cpp | 8 +- engines/scumm/he/script_v90he.cpp | 44 +++-- engines/scumm/he/wiz_he.cpp | 364 ++++++++++++++++++++++--------------- engines/scumm/he/wiz_he.h | 33 ++-- engines/scumm/palette.cpp | 13 -- engines/scumm/saveload.cpp | 2 +- engines/scumm/scumm.cpp | 20 +- engines/scumm/scumm.h | 6 +- 21 files changed, 726 insertions(+), 401 deletions(-) (limited to 'engines') diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index cf90094112..eea1ec070b 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -2384,7 +2384,7 @@ void ScummEngine_v71he::postProcessAuxQueue() { uint8 *dst2 = pvs->getBackPixels(0, pvs->topline); switch (comp) { case 1: - Wiz::copyAuxImage(dst1, dst2, axfd + 10, pvs->w, pvs->h, x, y, w, h); + Wiz::copyAuxImage(dst1, dst2, axfd + 10, pvs->pitch, pvs->h, x, y, w, h, _bitDepth); break; default: error("unimplemented compression type %d", comp); diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index ab7db2c4a7..edfbe5730d 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -299,22 +299,23 @@ void AkosRenderer::setPalette(byte *new_palette) { if (size > 256) error("akos_setPalette: %d is too many colors", size); - if (_vm->_game.heversion >= 99 && _paletteNum) { - for (i = 0; i < size; i++) - _palette[i] = (byte)_vm->_hePalettes[_paletteNum * 1024 + 768 + akpl[i]]; - } else if ((_vm->_game.features & GF_16BIT_COLOR) && rgbs) { - for (i = 0; i < size; i++) { - if (new_palette[i] == 0xFF) { - uint8 col = akpl[i]; - uint8 r = rgbs[col * 3 + 0]; - uint8 g = rgbs[col * 3 + 1]; - uint8 b = rgbs[col * 3 + 2]; - - _palette[i] = _vm->remapPaletteColor(r, g, b, -1); - } else { - _palette[i] = new_palette[i]; + if (_vm->_game.features & GF_16BIT_COLOR) { + if (_paletteNum) { + for (i = 0; i < size; i++) + _palette[i] = READ_LE_UINT16(_vm->_hePalettes + _paletteNum * _vm->_hePaletteSlot + 768 + akpl[i] * 2); + } else if (rgbs) { + for (i = 0; i < size; i++) { + if (new_palette[i] == 0xFF) { + uint8 col = akpl[i]; + _palette[i] = _vm->get16BitColor(rgbs[col * 3 + 0], rgbs[col * 3 + 1], rgbs[col * 3 + 2]); + } else { + _palette[i] = new_palette[i]; + } } } + } else if (_vm->_game.heversion >= 99 && _paletteNum) { + for (i = 0; i < size; i++) + _palette[i] = (byte)_vm->_hePalettes[_paletteNum * _vm->_hePaletteSlot + 768 + akpl[i]]; } else { for (i = 0; i < size; i++) { _palette[i] = new_palette[i] != 0xFF ? new_palette[i] : akpl[i]; @@ -545,7 +546,7 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) { byte *dst; byte len, maskbit; int y; - uint color, height, pcolor; + uint16 color, height, pcolor; const byte *scaleytab; bool masked; bool skip_column = false; @@ -589,7 +590,11 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) { } else if (_shadow_mode == 2) { error("codec1_spec2"); // TODO } else if (_shadow_mode == 3) { - if (_vm->_game.heversion >= 90) { + if (_vm->_game.features & GF_16BIT_COLOR) { + uint16 srcColor = (pcolor >> 1) & 0x7DEF; + uint16 dstColor = (READ_UINT16(dst) >> 1) & 0x7DEF; + pcolor = srcColor + dstColor; + } else if (_vm->_game.heversion >= 90) { pcolor = (pcolor << 8) + *dst; pcolor = xmap[pcolor]; } else if (pcolor < 8) { @@ -597,7 +602,11 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) { pcolor = _shadow_table[pcolor]; } } - *dst = pcolor; + if (_vm->_bitDepth == 2) { + WRITE_UINT16(dst, pcolor); + } else { + *dst = pcolor; + } } } dst += _out.pitch; @@ -617,7 +626,7 @@ void AkosRenderer::codec1_genericDecode(Codec1 &v1) { if (v1.x < 0 || v1.x >= v1.boundsRect.right) return; maskbit = revBitMask(v1.x & 7); - v1.destptr += v1.scaleXstep; + v1.destptr += v1.scaleXstep * _vm->_bitDepth; skip_column = false; } else skip_column = true; @@ -987,7 +996,7 @@ byte AkosRenderer::codec1(int xmoveCur, int ymoveCur) { if (_draw_bottom < rect.bottom) _draw_bottom = rect.bottom; - v1.destptr = (byte *)_out.pixels + v1.y * _out.pitch + v1.x; + v1.destptr = (byte *)_out.pixels + v1.y * _out.pitch + v1.x * _vm->_bitDepth; codec1_genericDecode(v1); @@ -1056,7 +1065,12 @@ byte AkosRenderer::codec5(int xmoveCur, int ymoveCur) { bdd.shadowMode = _shadow_mode; bdd.shadowPalette = _vm->_shadowPalette; - bdd.actorPalette = _useBompPalette ? _palette : 0; + bdd.actorPalette = 0; + if (_useBompPalette) { + for (uint i = 0; i < 256; i++) + bdd.actorPalette[i] = _palette[i]; + } + bdd.mirror = !_mirror; drawBomp(bdd); @@ -1176,6 +1190,8 @@ void AkosRenderer::akos16Decompress(byte *dest, int32 pitch, const byte *src, in } byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) { + assert(_vm->_bitDepth == 1); + Common::Rect clip; int32 minx, miny, maxw, maxh; int32 skip_x, skip_y, cur_x, cur_y; @@ -1278,13 +1294,15 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) { int32 numskip_before = skip_x + (skip_y * _width); int32 numskip_after = _width - cur_x; - byte *dst = (byte *)_out.pixels + width_unk + height_unk * _out.pitch; + byte *dst = (byte *)_out.pixels + height_unk * _out.pitch + width_unk * _vm->_bitDepth; akos16Decompress(dst, _out.pitch, _srcptr, cur_x, out_height, dir, numskip_before, numskip_after, transparency, clip.left, clip.top, _zbuf); return 0; } byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { + return 0; + #ifdef ENABLE_HE Common::Rect src, dst; @@ -1335,18 +1353,27 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { _draw_bottom = dst.bottom; const uint8 *palPtr = NULL; - if (_vm->_game.heversion >= 99) { - palPtr = _vm->_hePalettes + 1792; + if (_vm->_game.features & GF_16BIT_COLOR) { + palPtr = _vm->_hePalettes + _vm->_hePaletteSlot + 768; + if (_paletteNum) { + palPtr = _vm->_hePalettes + _paletteNum * _vm->_hePaletteSlot + 768; + } else if (rgbs) { + for (uint i = 0; i < 256; i++) + _palette[i] = _vm->get16BitColor(rgbs[i * 3 + 0], rgbs[i * 3 + 1], rgbs[i * 3 + 2]); + palPtr = (uint8 *)_palette; + } + } else if (_vm->_game.heversion >= 99) { + palPtr = _vm->_hePalettes + _vm->_hePaletteSlot + 768; } - byte *dstPtr = (byte *)_out.pixels + dst.left + dst.top * _out.pitch; + byte *dstPtr = (byte *)_out.pixels + dst.top * _out.pitch + dst.left * _vm->_bitDepth; if (_shadow_mode == 3) { - Wiz::decompressWizImage(dstPtr, _out.pitch, _srcptr, src, 0, palPtr, xmap); + Wiz::decompressWizImage(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, palPtr, xmap, _vm->_bitDepth); } else { if (palPtr != NULL) { - Wiz::decompressWizImage(dstPtr, _out.pitch, _srcptr, src, 0, palPtr); + Wiz::decompressWizImage(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, palPtr, NULL, _vm->_bitDepth); } else { - Wiz::decompressWizImage(dstPtr, _out.pitch, _srcptr, src, 0); + Wiz::decompressWizImage(dstPtr, _out.pitch, kDstScreen, _srcptr, src, 0, NULL, NULL, _vm->_bitDepth); } } #endif diff --git a/engines/scumm/akos.h b/engines/scumm/akos.h index be532b804d..17576e5869 100644 --- a/engines/scumm/akos.h +++ b/engines/scumm/akos.h @@ -60,7 +60,7 @@ protected: uint16 _codec; // actor _palette - byte _palette[256]; + uint16 _palette[256]; bool _useBompPalette; // pointer to various parts of the costume resource diff --git a/engines/scumm/base-costume.cpp b/engines/scumm/base-costume.cpp index 795abb8685..ef706afaac 100644 --- a/engines/scumm/base-costume.cpp +++ b/engines/scumm/base-costume.cpp @@ -40,7 +40,7 @@ byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, int numStrips, const _out.pixels = vs.getPixels(0, 0); _actorX += _vm->_virtscr[kMainVirtScreen].xstart & 7; - _out.w = _out.pitch; + _out.w = _out.pitch / _vm->_bitDepth; _out.pixels = (byte *)_out.pixels - (_vm->_virtscr[kMainVirtScreen].xstart & 7); _numStrips = numStrips; diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 193fc434e4..d6dfa4c5bb 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -819,9 +819,9 @@ void CharsetRendererClassic::printCharIntern(bool is2byte, const byte *charPtr, byte imagePalette[256]; memset(imagePalette, 0, sizeof(imagePalette)); memcpy(imagePalette, _vm->_charsetColorMap, 4); - Wiz::copyWizImage(dstPtr, charPtr, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, imagePalette); + Wiz::copyWizImage(dstPtr, charPtr, vs->pitch, kDstScreen, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, imagePalette, NULL, _vm->_bitDepth); } else { - Wiz::copyWizImage(dstPtr, charPtr, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen); + Wiz::copyWizImage(dstPtr, charPtr, vs->pitch, kDstScreen, vs->w, vs->h, _left, _top, origWidth, origHeight, &rScreen, 0, NULL, NULL, _vm->_bitDepth); } if (_blitAlso && vs->hasTwoBuffers) { diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 62e18561d3..a141d51735 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -43,12 +43,12 @@ extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height namespace Scumm { -static void blit(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h); -static void fill(byte *dst, int dstPitch, byte color, int w, int h); +static void blit(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h, uint8 bitDepth); +static void fill(byte *dst, int dstPitch, uint16 color, int w, int h, uint8 bitDepth); #ifndef USE_ARM_GFX_ASM -static void copy8Col(byte *dst, int dstPitch, const byte *src, int height); +static void copy8Col(byte *dst, int dstPitch, const byte *src, int height, uint8 bitDepth); #endif -static void clear8Col(byte *dst, int dstPitch, int height); +static void clear8Col(byte *dst, int dstPitch, int height, uint8 bitDepth); static void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *width, int *height); static void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h); @@ -341,8 +341,8 @@ void ScummEngine::initVirtScreen(VirtScreenNumber slot, int top, int width, int vs->hasTwoBuffers = twobufs; vs->xstart = 0; vs->backBuf = NULL; - vs->bytesPerPixel = 1; - vs->pitch = width; + vs->bytesPerPixel = (_game.features & GF_16BIT_COLOR) ? 2 : 1; + vs->pitch = width * vs->bytesPerPixel; if (_game.version >= 7) { // Increase the pitch by one; needed to accomodate the extra screen @@ -586,7 +586,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i vsPitch = _screenWidth * m - width * m; } else { - vsPitch = vs->pitch - width; + vsPitch = vs->pitch - width * vs->bytesPerPixel; } @@ -612,36 +612,49 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i #else // We blit four pixels at a time, for improved performance. const uint32 *src32 = (const uint32 *)src; - const uint32 *text32 = (const uint32 *)text; uint32 *dst32 = (uint32 *)_compositeBuf; vsPitch >>= 2; - const int textPitch = (_textSurface.pitch - width * m) >> 2; - for (int h = height * m; h > 0; --h) { - for (int w = width*m; w > 0; w-=4) { - uint32 temp = *text32++; - - // Generate a byte mask for those text pixels (bytes) with - // value CHARSET_MASK_TRANSPARENCY. In the end, each byte - // in mask will be either equal to 0x00 or 0xFF. - // Doing it this way avoids branches and bytewise operations, - // at the cost of readability ;). - uint32 mask = temp ^ CHARSET_MASK_TRANSPARENCY_32; - mask = (((mask & 0x7f7f7f7f) + 0x7f7f7f7f) | mask) & 0x80808080; - mask = ((mask >> 7) + 0x7f7f7f7f) ^ 0x80808080; - - // The following line is equivalent to this code: - // *dst32++ = (*src32++ & mask) | (temp & ~mask); - // However, some compilers can generate somewhat better - // machine code for this equivalent statement: - *dst32++ = ((temp ^ *src32++) & mask) ^ temp; + + if (_bitDepth == 2) { + // Sprites always seem to be used for subtitles in 16Bit color HE games, and not + // the charset renderer, so charset masking isn't required. + for (int h = height * m; h > 0; --h) { + for (int w = width * m; w > 0; w -= 4) { + *dst32++ = *src32++; + *dst32++ = *src32++; + } + src32 += vsPitch; + } + } else { + const uint32 *text32 = (const uint32 *)text; + const int textPitch = (_textSurface.pitch - width * m) >> 2; + for (int h = height * m; h > 0; --h) { + for (int w = width * m; w > 0; w -= 4) { + uint32 temp = *text32++; + + // Generate a byte mask for those text pixels (bytes) with + // value CHARSET_MASK_TRANSPARENCY. In the end, each byte + // in mask will be either equal to 0x00 or 0xFF. + // Doing it this way avoids branches and bytewise operations, + // at the cost of readability ;). + uint32 mask = temp ^ CHARSET_MASK_TRANSPARENCY_32; + mask = (((mask & 0x7f7f7f7f) + 0x7f7f7f7f) | mask) & 0x80808080; + mask = ((mask >> 7) + 0x7f7f7f7f) ^ 0x80808080; + + // The following line is equivalent to this code: + // *dst32++ = (*src32++ & mask) | (temp & ~mask); + // However, some compilers can generate somewhat better + // machine code for this equivalent statement: + *dst32++ = ((temp ^ *src32++) & mask) ^ temp; + } + src32 += vsPitch; + text32 += textPitch; } - src32 += vsPitch; - text32 += textPitch; } #endif src = _compositeBuf; - pitch = width; + pitch = width * vs->bytesPerPixel; if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { ditherHerc(_compositeBuf, _herculesBuf, width, &x, &y, &width, &height); @@ -976,13 +989,13 @@ void ScummEngine::restoreBackground(Common::Rect rect, byte backColor) { return; if (vs->hasTwoBuffers && _currentRoom != 0 && isLightOn()) { - blit(screenBuf, vs->pitch, vs->getBackPixels(rect.left, rect.top), vs->pitch, width, height); + blit(screenBuf, vs->pitch, vs->getBackPixels(rect.left, rect.top), vs->pitch, width, height, vs->bytesPerPixel); if (vs->number == kMainVirtScreen && _charset->_hasMask) { byte *mask = (byte *)_textSurface.getBasePtr(rect.left, rect.top - _screenTop); - fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height); + fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width, height, _textSurface.bytesPerPixel); } } else { - fill(screenBuf, vs->pitch, backColor, width, height); + fill(screenBuf, vs->pitch, backColor, width, height, vs->bytesPerPixel); } } @@ -1011,7 +1024,7 @@ void ScummEngine::restoreCharsetBg() { if (vs->number != kMainVirtScreen) { // Restore from back buffer const byte *backBuf = vs->getBackPixels(0, 0); - blit(screenBuf, vs->pitch, backBuf, vs->pitch, vs->w, vs->h); + blit(screenBuf, vs->pitch, backBuf, vs->pitch, vs->w, vs->h, vs->bytesPerPixel); } } else { // Clear area @@ -1047,34 +1060,42 @@ byte *Gdi::getMaskBuffer(int x, int y, int z) { #pragma mark --- Misc --- #pragma mark - -static void blit(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h) { +static void blit(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h, uint8 bitDepth) { assert(w > 0); assert(h > 0); assert(src != NULL); assert(dst != NULL); - if (w == srcPitch && w == dstPitch) { - memcpy(dst, src, w*h); + if ((w * bitDepth == srcPitch) && (w * bitDepth == dstPitch)) { + memcpy(dst, src, w * h * bitDepth); } else { do { - memcpy(dst, src, w); + memcpy(dst, src, w * bitDepth); dst += dstPitch; src += srcPitch; } while (--h); } } -static void fill(byte *dst, int dstPitch, byte color, int w, int h) { +static void fill(byte *dst, int dstPitch, uint16 color, int w, int h, uint8 bitDepth) { assert(h > 0); assert(dst != NULL); - if (w == dstPitch) { - memset(dst, color, w*h); - } else { + if (bitDepth == 2) { do { - memset(dst, color, w); + for (int i = 0; i < w; i++) + WRITE_UINT16(dst + i * 2, color); dst += dstPitch; } while (--h); + } else { + if (w == dstPitch) { + memset(dst, color, w * h); + } else { + do { + memset(dst, color, w); + dst += dstPitch; + } while (--h); + } } } @@ -1084,14 +1105,18 @@ static void fill(byte *dst, int dstPitch, byte color, int w, int h) { #else -static void copy8Col(byte *dst, int dstPitch, const byte *src, int height) { +static void copy8Col(byte *dst, int dstPitch, const byte *src, int height, uint8 bitDepth) { do { #if defined(SCUMM_NEED_ALIGNMENT) - memcpy(dst, src, 8); + memcpy(dst, src, 8 * bitDepth); #else ((uint32 *)dst)[0] = ((const uint32 *)src)[0]; ((uint32 *)dst)[1] = ((const uint32 *)src)[1]; + if (bitDepth == 2) { + ((uint32 *)dst)[2] = ((const uint32 *)src)[2]; + ((uint32 *)dst)[3] = ((const uint32 *)src)[3]; + } #endif dst += dstPitch; src += dstPitch; @@ -1100,13 +1125,17 @@ static void copy8Col(byte *dst, int dstPitch, const byte *src, int height) { #endif /* USE_ARM_GFX_ASM */ -static void clear8Col(byte *dst, int dstPitch, int height) { +static void clear8Col(byte *dst, int dstPitch, int height, uint8 bitDepth) { do { #if defined(SCUMM_NEED_ALIGNMENT) - memset(dst, 0, 8); + memset(dst, 0, 8 * bitDepth); #else ((uint32 *)dst)[0] = 0; ((uint32 *)dst)[1] = 0; + if (bitDepth == 2) { + ((uint32 *)dst)[2] = 0; + ((uint32 *)dst)[3] = 0; + } #endif dst += dstPitch; } while (--height); @@ -1171,41 +1200,41 @@ void ScummEngine::drawBox(int x, int y, int x2, int y2, int color) { if (color == -1) { if (vs->number != kMainVirtScreen) error("can only copy bg to main window"); - blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height); + blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->bytesPerPixel); if (_charset->_hasMask) { byte *mask = (byte *)_textSurface.getBasePtr(x * _textSurfaceMultiplier, (y - _screenTop) * _textSurfaceMultiplier); - fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier); + fill(mask, _textSurface.pitch, CHARSET_MASK_TRANSPARENCY, width * _textSurfaceMultiplier, height * _textSurfaceMultiplier, _textSurface.bytesPerPixel); } } else if (_game.heversion >= 72) { // Flags are used for different methods in HE games uint32 flags = color; if ((flags & 0x2000) || (flags & 0x4000000)) { - blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height); + blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->bytesPerPixel); } else if ((flags & 0x4000) || (flags & 0x2000000)) { - blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height); + blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height, vs->bytesPerPixel); } else if ((flags & 0x8000) || (flags & 0x1000000)) { flags &= (flags & 0x1000000) ? 0xFFFFFF : 0x7FFF; - fill(backbuff, vs->pitch, flags, width, height); - fill(bgbuff, vs->pitch, flags, width, height); + fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel); + fill(bgbuff, vs->pitch, flags, width, height, vs->bytesPerPixel); } else { - fill(backbuff, vs->pitch, flags, width, height); + fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel); } } else if (_game.heversion >= 60) { // Flags are used for different methods in HE games uint16 flags = color; if (flags & 0x2000) { - blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height); + blit(backbuff, vs->pitch, bgbuff, vs->pitch, width, height, vs->bytesPerPixel); } else if (flags & 0x4000) { - blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height); + blit(bgbuff, vs->pitch, backbuff, vs->pitch, width, height, vs->bytesPerPixel); } else if (flags & 0x8000) { flags &= 0x7FFF; - fill(backbuff, vs->pitch, flags, width, height); - fill(bgbuff, vs->pitch, flags, width, height); + fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel); + fill(bgbuff, vs->pitch, flags, width, height, vs->bytesPerPixel); } else { - fill(backbuff, vs->pitch, flags, width, height); + fill(backbuff, vs->pitch, flags, width, height, vs->bytesPerPixel); } } else { - fill(backbuff, vs->pitch, color, width, height); + fill(backbuff, vs->pitch, color, width, height, vs->bytesPerPixel); } } @@ -1243,7 +1272,7 @@ void ScummEngine_v5::drawFlashlight() { _flashlight.y, _flashlight.y + _flashlight.h, USAGE_BIT_DIRTY); if (_flashlight.buffer) { - fill(_flashlight.buffer, vs->pitch, 0, _flashlight.w, _flashlight.h); + fill(_flashlight.buffer, vs->pitch, 0, _flashlight.w, _flashlight.h, vs->bytesPerPixel); } _flashlight.isDrawn = false; } @@ -1290,7 +1319,7 @@ void ScummEngine_v5::drawFlashlight() { _flashlight.buffer = vs->getPixels(_flashlight.x, _flashlight.y); bgbak = vs->getBackPixels(_flashlight.x, _flashlight.y); - blit(_flashlight.buffer, vs->pitch, bgbak, vs->pitch, _flashlight.w, _flashlight.h); + blit(_flashlight.buffer, vs->pitch, bgbak, vs->pitch, _flashlight.w, _flashlight.h, vs->bytesPerPixel); // Round the corners. To do so, we simply hard-code a set of nicely // rounded corners. @@ -1599,7 +1628,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const warning("Gdi::drawBitmap, strip drawn to %d below window bottom %d", y + height, vs->h); } - _vertStripNextInc = height * vs->pitch - 1; + _vertStripNextInc = height * vs->pitch - 1 * vs->bytesPerPixel; _objectMode = (flag & dbObjectMode) == dbObjectMode; prepareDrawBitmap(ptr, vs, x, y, width, height, stripnr, numstrip); @@ -1632,9 +1661,9 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const // In the case of a double buffered virtual screen, we draw to // the backbuffer, otherwise to the primary surface memory. if (vs->hasTwoBuffers) - dstPtr = vs->backBuf + y * vs->pitch + x * 8; + dstPtr = vs->backBuf + y * vs->pitch + (x * 8 * vs->bytesPerPixel); else - dstPtr = (byte *)vs->pixels + y * vs->pitch + x * 8; + dstPtr = (byte *)vs->pixels + y * vs->pitch + (x * 8 * vs->bytesPerPixel); transpStrip = drawStrip(dstPtr, vs, x, y, width, height, stripnr, smap_ptr); @@ -1643,11 +1672,11 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, const int y, const transpStrip = true; if (vs->hasTwoBuffers) { - byte *frontBuf = (byte *)vs->pixels + y * vs->pitch + x * 8; + byte *frontBuf = (byte *)vs->pixels + y * vs->pitch + (x * 8 * vs->bytesPerPixel); if (lightsOn) - copy8Col(frontBuf, vs->pitch, dstPtr, height); + copy8Col(frontBuf, vs->pitch, dstPtr, height, vs->bytesPerPixel); else - clear8Col(frontBuf, vs->pitch, height); + clear8Col(frontBuf, vs->pitch, height, vs->bytesPerPixel); } decodeMask(x, y, width, height, stripnr, numzbuf, zplane_list, transpStrip, flag, tmsk_ptr); @@ -1875,7 +1904,7 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) { drawStripHE(dst, vs->pitch, bmap_ptr, vs->w, vs->h, true); break; case 150: - fill(dst, vs->pitch, *bmap_ptr, vs->w, vs->h); + fill(dst, vs->pitch, *bmap_ptr, vs->w, vs->h, vs->bytesPerPixel); break; default: // Alternative russian freddi3 uses badly formatted bitmaps @@ -1927,6 +1956,8 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) { } void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h) { + assert(_vm->_bitDepth == 1); + const byte *bmap_ptr = _vm->findResourceData(MKID_BE('BMAP'), ptr); assert(bmap_ptr); @@ -1936,7 +1967,7 @@ void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, if (code == 8 || code == 9) { Common::Rect rScreen(0, 0, vs->w, vs->h); byte *dst = (byte *)_vm->_virtscr[kMainVirtScreen].backBuf + scrX; - Wiz::copyWizImage(dst, bmap_ptr, vs->w, vs->h, x - scrX, y, w, h, &rScreen); + Wiz::copyWizImage(dst, bmap_ptr, vs->pitch, kDstScreen, vs->w, vs->h, x - scrX, y, w, h, &rScreen, 0, 0, 0, _vm->_bitDepth); } Common::Rect rect1(x, y, x + w, y + h); @@ -1986,7 +2017,7 @@ void ScummEngine_v70he::restoreBackgroundHE(Common::Rect rect, int dirtybit) { assert(rw <= _screenWidth && rw > 0); assert(rh <= _screenHeight && rh > 0); - blit(dst, _virtscr[kMainVirtScreen].pitch, src, _virtscr[kMainVirtScreen].pitch, rw, rh); + blit(dst, _virtscr[kMainVirtScreen].pitch, src, _virtscr[kMainVirtScreen].pitch, rw, rh, vs->bytesPerPixel); markRectAsDirty(kMainVirtScreen, rect, dirtybit); } #endif @@ -2016,15 +2047,15 @@ void Gdi::resetBackground(int top, int bottom, int strip) { if (bottom > vs->bdirty[strip]) vs->bdirty[strip] = bottom; - bgbak_ptr = (byte *)vs->backBuf + top * vs->pitch + (strip + vs->xstart/8) * 8; - backbuff_ptr = (byte *)vs->pixels + top * vs->pitch + (strip + vs->xstart/8) * 8; + bgbak_ptr = (byte *)vs->backBuf + top * vs->pitch + (strip + vs->xstart/8) * 8 * vs->bytesPerPixel; + backbuff_ptr = (byte *)vs->pixels + top * vs->pitch + (strip + vs->xstart/8) * 8 * vs->bytesPerPixel; numLinesToProcess = bottom - top; if (numLinesToProcess) { if (_vm->isLightOn()) { - copy8Col(backbuff_ptr, vs->pitch, bgbak_ptr, numLinesToProcess); + copy8Col(backbuff_ptr, vs->pitch, bgbak_ptr, numLinesToProcess, vs->bytesPerPixel); } else { - clear8Col(backbuff_ptr, vs->pitch, numLinesToProcess); + clear8Col(backbuff_ptr, vs->pitch, numLinesToProcess, vs->bytesPerPixel); } } } @@ -2774,13 +2805,17 @@ void Gdi::drawStripHE(byte *dst, int dstPitch, const byte *src, int width, int h int x = width; while (1) { - if (!transpCheck || color != _transparentColor) - *dst = _roomPalette[color]; - dst++; + if (!transpCheck || color != _transparentColor) { + if (_vm->_game.features & GF_16BIT_COLOR) + WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); + else + *dst = _roomPalette[color]; + } + dst += _vm->_bitDepth; --x; if (x == 0) { x = width; - dst += dstPitch - width; + dst += dstPitch - width * _vm->_bitDepth; --height; if (height == 0) return; @@ -2863,9 +2898,13 @@ void Gdi::drawStripComplex(byte *dst, int dstPitch, const byte *src, int height, int x = 8; do { FILL_BITS; - if (!transpCheck || color != _transparentColor) - *dst = _roomPalette[color] + _paletteMod; - dst++; + if (!transpCheck || color != _transparentColor) { + if (_vm->_game.features & GF_16BIT_COLOR) + WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); + else + *dst = _roomPalette[color] + _paletteMod; + } + dst += _vm->_bitDepth; againPos: if (!READ_BIT) { @@ -2886,13 +2925,17 @@ void Gdi::drawStripComplex(byte *dst, int dstPitch, const byte *src, int height, do { if (!--x) { x = 8; - dst += dstPitch - 8; + dst += dstPitch - 8 * _vm->_bitDepth; if (!--height) return; } - if (!transpCheck || color != _transparentColor) - *dst = _roomPalette[color] + _paletteMod; - dst++; + if (!transpCheck || color != _transparentColor) { + if (_vm->_game.features & GF_16BIT_COLOR) + WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); + else + *dst = _roomPalette[color] + _paletteMod; + } + dst += _vm->_bitDepth; } while (--reps); bits >>= 8; bits |= (*src++) << (cl - 8); @@ -2900,7 +2943,7 @@ void Gdi::drawStripComplex(byte *dst, int dstPitch, const byte *src, int height, } } } while (--x); - dst += dstPitch - 8; + dst += dstPitch - 8 * _vm->_bitDepth; } while (--height); } @@ -2915,9 +2958,13 @@ void Gdi::drawStripBasicH(byte *dst, int dstPitch, const byte *src, int height, int x = 8; do { FILL_BITS; - if (!transpCheck || color != _transparentColor) - *dst = _roomPalette[color] + _paletteMod; - dst++; + if (!transpCheck || color != _transparentColor) { + if (_vm->_game.features & GF_16BIT_COLOR) + WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); + else + *dst = _roomPalette[color] + _paletteMod; + } + dst += _vm->_bitDepth; if (!READ_BIT) { } else if (!READ_BIT) { FILL_BITS; @@ -2932,7 +2979,7 @@ void Gdi::drawStripBasicH(byte *dst, int dstPitch, const byte *src, int height, color += inc; } } while (--x); - dst += dstPitch - 8; + dst += dstPitch - 8 * _vm->_bitDepth; } while (--height); } @@ -2948,8 +2995,12 @@ void Gdi::drawStripBasicV(byte *dst, int dstPitch, const byte *src, int height, int h = height; do { FILL_BITS; - if (!transpCheck || color != _transparentColor) - *dst = _roomPalette[color] + _paletteMod; + if (!transpCheck || color != _transparentColor) { + if (_vm->_game.features & GF_16BIT_COLOR) + WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); + else + *dst = _roomPalette[color] + _paletteMod; + } dst += dstPitch; if (!READ_BIT) { } else if (!READ_BIT) { @@ -3016,8 +3067,12 @@ void Gdi::drawStripRaw(byte *dst, int dstPitch, const byte *src, int height, con do { for (x = 0; x < 8; x ++) { byte color = *src++; - if (!transpCheck || color != _transparentColor) - dst[x] = _roomPalette[color] + _paletteMod; + if (!transpCheck || color != _transparentColor) { + if (_vm->_game.features & GF_16BIT_COLOR) + WRITE_UINT16(dst + x * 2, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); + else + dst[x] = _roomPalette[color] + _paletteMod; + } } dst += dstPitch; } while (--height); diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index e4c1054450..88852c8388 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -155,11 +155,11 @@ struct VirtScreen : Graphics::Surface { } byte *getPixels(int x, int y) const { - return (byte *)pixels + xstart + y * pitch + x; + return (byte *)pixels + y * pitch + (xstart * 2 + x) * bytesPerPixel; } byte *getBackPixels(int x, int y) const { - return (byte *)backBuf + xstart + y * pitch + x; + return (byte *)backBuf + y * pitch + (xstart * 2 + x) * bytesPerPixel; } }; diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 0cc4419778..5983df2308 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -66,6 +66,31 @@ int MoviePlayer::load(const char *filename, int flags, int image) { return 0; } +void MoviePlayer::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { + uint h = getHeight(); + uint w = getWidth(); + + byte *src = _videoFrameBuffer; + + if (_vm->_game.features & GF_16BIT_COLOR) { + dst += y * pitch + x * 2; + do { + for (uint i = 0; i < w; i++) + WRITE_UINT16(dst + i * 2, src[i]); + + dst += pitch; + src += w; + } while (--h); + } else { + dst += y * pitch + x; + do { + memcpy(dst, src, w); + dst += pitch; + src += w; + } while (--h); + } +} + void MoviePlayer::handleNextFrame() { if (!isVideoLoaded()) { return; @@ -80,14 +105,14 @@ void MoviePlayer::handleNextFrame() { assert(dstPtr); uint8 *dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0); assert(dst); - copyFrameToBuffer(dst, 0, 0, _vm->_screenWidth); + copyFrameToBuffer(dst, 0, 0, _vm->_screenWidth * _vm->_bitDepth); } else if (_flags & 1) { - copyFrameToBuffer(pvs->getBackPixels(0, 0), 0, 0, _vm->_screenWidth); + copyFrameToBuffer(pvs->getBackPixels(0, 0), 0, 0, pvs->pitch); Common::Rect imageRect(getWidth(), getHeight()); _vm->restoreBackgroundHE(imageRect); } else { - copyFrameToBuffer(pvs->getPixels(0, 0), 0, 0, _vm->_screenWidth); + copyFrameToBuffer(pvs->getPixels(0, 0), 0, 0, pvs->pitch); Common::Rect imageRect(getWidth(), getHeight()); _vm->markRectAsDirty(kMainVirtScreen, imageRect); diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h index 39f03960c4..e2fc1d04b7 100644 --- a/engines/scumm/he/animation_he.h +++ b/engines/scumm/he/animation_he.h @@ -54,6 +54,7 @@ public: int getImageNum(); int load(const char *filename, int flags, int image = 0); + void copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch); void handleNextFrame(); protected: diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h index c2079fa5fe..949113aeeb 100644 --- a/engines/scumm/he/intern_he.h +++ b/engines/scumm/he/intern_he.h @@ -455,6 +455,7 @@ protected: uint8 *getHEPaletteIndex(int palSlot); int getHEPaletteColor(int palSlot, int color); int getHEPaletteSimilarColor(int palSlot, int red, int green, int start, int end); + int getHEPalette16BitColorComponent(int component, int type); int getHEPaletteColorComponent(int palSlot, int color, int component); void setHEPaletteColor(int palSlot, uint8 color, uint8 r, uint8 g, uint8 b); void setHEPaletteFromPtr(int palSlot, const uint8 *palData); @@ -463,7 +464,7 @@ protected: void setHEPaletteFromRoom(int palSlot, int resId, int state); void restoreHEPalette(int palSlot); void copyHEPalette(int dstPalSlot, int srcPalSlot); - void copyHEPaletteColor(int palSlot, uint8 dstColor, uint8 srcColor); + void copyHEPaletteColor(int palSlot, uint8 dstColor, uint16 srcColor); protected: /* HE version 90 script opcodes */ diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp index d055b77ee2..812c39d173 100644 --- a/engines/scumm/he/palette_he.cpp +++ b/engines/scumm/he/palette_he.cpp @@ -31,6 +31,27 @@ namespace Scumm { +uint8 *ScummEngine::getHEPaletteSlot(uint16 palSlot) { + assertRange(0, palSlot, _numPalettes, "palette"); + + if (_game.heversion >= 99) { + if (palSlot) + return _hePalettes + palSlot * _hePaletteSlot + 768; + else + return _hePalettes + _hePaletteSlot + 768; + } + + return NULL; +} + +uint16 ScummEngine::get16BitColor(uint8 r, uint8 g, uint8 b) { + uint16 ar = (r >> 3) << 10; + uint16 ag = (g >> 3) << 5; + uint16 ab = (b >> 3) << 0; + uint16 col = ar | ag | ab; + return col; +} + void ScummEngine_v71he::remapHEPalette(const uint8 *src, uint8 *dst) { int r, g, b, sum, bestitem, bestsum; int ar, ag, ab; @@ -38,7 +59,7 @@ void ScummEngine_v71he::remapHEPalette(const uint8 *src, uint8 *dst) { src += 30; if (_game.heversion >= 99) { - palPtr = _hePalettes + 1024 + 30; + palPtr = _hePalettes + _hePaletteSlot + 30; } else { palPtr = _currentPalette + 30; } @@ -73,9 +94,9 @@ void ScummEngine_v71he::remapHEPalette(const uint8 *src, uint8 *dst) { uint8 *ScummEngine_v90he::getHEPaletteIndex(int palSlot) { if (palSlot) { assert(palSlot >= 1 && palSlot <= _numPalettes); - return _hePalettes + palSlot * 1024; + return _hePalettes + palSlot * _hePaletteSlot; } else { - return _hePalettes + 1024; + return _hePalettes + _hePaletteSlot; } } @@ -84,7 +105,7 @@ int ScummEngine_v90he::getHEPaletteSimilarColor(int palSlot, int red, int green, assertRange(0, start, 255, "start palette slot"); assertRange(0, end, 255, "pend alette slot"); - uint8 *pal = _hePalettes + palSlot * 1024 + start * 3; + uint8 *pal = _hePalettes + palSlot * _hePaletteSlot + start * 3; int bestsum = 0x7FFFFFFF; int bestitem = start; @@ -105,39 +126,83 @@ int ScummEngine_v90he::getHEPaletteSimilarColor(int palSlot, int red, int green, return bestitem; } +int ScummEngine_v90he::getHEPalette16BitColorComponent(int component, int type) { + uint16 col; + if (type == 2) { + col = (((component & 0xFFFF) >> 0) & 0x1F) << 3;; + } else if (type == 1) { + col = (((component & 0xFFFF) >> 5) & 0x1F) << 3; + } else { + col = (((component & 0xFFFF) >> 10) & 0x1F) << 3; + } + return col; +} + int ScummEngine_v90he::getHEPaletteColorComponent(int palSlot, int color, int component) { assertRange(1, palSlot, _numPalettes, "palette"); assertRange(0, color, 255, "palette slot"); - return _hePalettes[palSlot * 1024 + color * 3 + component % 3]; + return _hePalettes[palSlot * _hePaletteSlot + color * 3 + component % 3]; } int ScummEngine_v90he::getHEPaletteColor(int palSlot, int color) { assertRange(1, palSlot, _numPalettes, "palette"); assertRange(0, color, 255, "palette slot"); - return _hePalettes[palSlot * 1024 + 768 + color]; + if (_game.features & GF_16BIT_COLOR) + return READ_LE_UINT16(_hePalettes + palSlot * _hePaletteSlot + 768 + color * 2); + else + return _hePalettes[palSlot * _hePaletteSlot + 768 + color]; } void ScummEngine_v90he::setHEPaletteColor(int palSlot, uint8 color, uint8 r, uint8 g, uint8 b) { debug(7, "setHEPaletteColor(%d, %d, %d, %d, %d)", palSlot, color, r, g, b); assertRange(1, palSlot, _numPalettes, "palette"); - uint8 *p = _hePalettes + palSlot * 1024 + color * 3; + + uint8 *p = _hePalettes + palSlot * _hePaletteSlot + color * 3; *(p + 0) = r; *(p + 1) = g; *(p + 2) = b; - _hePalettes[palSlot * 1024 + 768 + color] = color; + if (_game.features & GF_16BIT_COLOR) { + WRITE_LE_UINT16(_hePalettes + palSlot * _hePaletteSlot + 768 + color * 2, get16BitColor(r, g, b)); + } else { + _hePalettes[palSlot * _hePaletteSlot + 768 + color] = color; + } } void ScummEngine_v90he::setHEPaletteFromPtr(int palSlot, const uint8 *palData) { assertRange(1, palSlot, _numPalettes, "palette"); - uint8 *pc = _hePalettes + palSlot * 1024; + + uint8 *pc = _hePalettes + palSlot * _hePaletteSlot; uint8 *pi = pc + 768; - for (int i = 0; i < 256; ++i) { - *pc++ = *palData++; - *pc++ = *palData++; - *pc++ = *palData++; - *pi++ = i; + if (_game.features & GF_16BIT_COLOR) { + for (int i = 0; i < 256; ++i) { + uint8 r = *pc++ = *palData++; + uint8 g = *pc++ = *palData++; + uint8 b = *pc++ = *palData++; + WRITE_LE_UINT16(pi, get16BitColor(r, g, b)); pi += 2; + } + } else { + for (int i = 0; i < 256; ++i) { + *pc++ = *palData++; + *pc++ = *palData++; + *pc++ = *palData++; + *pi++ = i; + } + } + + int i; + uint8 *palPtr = _hePalettes + palSlot * _hePaletteSlot + 768; + if (_game.features & GF_16BIT_COLOR) { + for (i = 0; i < 10; ++i) + WRITE_LE_UINT16(palPtr + i * 2, i); + for (i = 246; i < 256; ++i) + WRITE_LE_UINT16(palPtr + i * 2, i); + } else { + for (i = 0; i < 10; ++i) + *(palPtr + i) = i; + for (i = 246; i < 256; ++i) + *(palPtr + i) = i; } } @@ -176,8 +241,9 @@ void ScummEngine_v90he::setHEPaletteFromRoom(int palSlot, int resId, int state) void ScummEngine_v90he::restoreHEPalette(int palSlot) { debug(7, "restoreHEPalette(%d)", palSlot); assertRange(1, palSlot, _numPalettes, "palette"); + if (palSlot != 1) { - memcpy(_hePalettes + palSlot * 1024, _hePalettes + 1024, 1024); + memcpy(_hePalettes + palSlot * _hePaletteSlot, _hePalettes + _hePaletteSlot, _hePaletteSlot); } } @@ -185,18 +251,27 @@ void ScummEngine_v90he::copyHEPalette(int dstPalSlot, int srcPalSlot) { debug(7, "copyHEPalette(%d, %d)", dstPalSlot, srcPalSlot); assert(dstPalSlot >= 1 && dstPalSlot <= _numPalettes); assert(srcPalSlot >= 1 && srcPalSlot <= _numPalettes); + if (dstPalSlot != srcPalSlot) { - memcpy(_hePalettes + dstPalSlot * 1024, _hePalettes + srcPalSlot * 1024, 1024); + memcpy(_hePalettes + dstPalSlot * _hePaletteSlot, _hePalettes + srcPalSlot * _hePaletteSlot, _hePaletteSlot); } } -void ScummEngine_v90he::copyHEPaletteColor(int palSlot, uint8 dstColor, uint8 srcColor) { +void ScummEngine_v90he::copyHEPaletteColor(int palSlot, uint8 dstColor, uint16 srcColor) { debug(7, "copyHEPaletteColor(%d, %d, %d)", palSlot, dstColor, srcColor); assertRange(1, palSlot, _numPalettes, "palette"); - uint8 *dstPal = _hePalettes + palSlot * 1024 + dstColor * 3; - uint8 *srcPal = _hePalettes + 1024 + srcColor * 3; - memcpy(dstPal, srcPal, 3); - _hePalettes[palSlot * 1024 + 768 + dstColor] = srcColor; + + uint8 *dstPal = _hePalettes + palSlot * _hePaletteSlot + dstColor * 3; + uint8 *srcPal = _hePalettes + _hePaletteSlot + srcColor * 3; + if (_game.features & GF_16BIT_COLOR) { + dstPal[0] = (srcColor >> 10) << 3; + dstPal[1] = (srcColor >> 5) << 3; + dstPal[2] = (srcColor >> 0) << 3; + WRITE_LE_UINT16(_hePalettes + palSlot * _hePaletteSlot + 768 + dstColor * 2, srcColor); + } else { + memcpy(dstPal, srcPal, 3); + _hePalettes[palSlot * _hePaletteSlot + 768 + dstColor] = srcColor; + } } void ScummEngine_v99he::setPaletteFromPtr(const byte *ptr, int numcolor) { @@ -209,7 +284,7 @@ void ScummEngine_v99he::setPaletteFromPtr(const byte *ptr, int numcolor) { assertRange(0, numcolor, 256, "setPaletteFromPtr: numcolor"); - dest = _hePalettes + 1024; + dest = _hePalettes + _hePaletteSlot; for (i = 0; i < numcolor; i++) { r = *ptr++; @@ -220,48 +295,63 @@ void ScummEngine_v99he::setPaletteFromPtr(const byte *ptr, int numcolor) { *dest++ = r; *dest++ = g; *dest++ = b; - _hePalettes[1792 + i] = i; + + if (_game.features & GF_16BIT_COLOR) { + WRITE_LE_UINT16(_hePalettes + 2048 + i * 2, get16BitColor(r, g, b)); + } else { + _hePalettes[1792 + i] = i; + } } else { dest += 3; } } - memcpy(_hePalettes, _hePalettes + 1024, 768); - - for (i = 0; i < 10; ++i) - _hePalettes[1792 + i] = i; - for (i = 246; i < 256; ++i) - _hePalettes[1792 + i] = i; + memcpy(_hePalettes, _hePalettes + _hePaletteSlot, 768); + if (_game.features & GF_16BIT_COLOR) { + for (i = 0; i < 10; ++i) + WRITE_LE_UINT16(_hePalettes + 2048 + i * 2, i); + for (i = 246; i < 256; ++i) + WRITE_LE_UINT16(_hePalettes + 2048 + i * 2, i); + } else { + for (i = 0; i < 10; ++i) + _hePalettes[1792 + i] = i; + for (i = 246; i < 256; ++i) + _hePalettes[1792 + i] = i; + } setDirtyColors(0, numcolor - 1); } void ScummEngine_v99he::darkenPalette(int redScale, int greenScale, int blueScale, int startColor, int endColor) { uint8 *src, *dst; - int color, j; + int j, r, g, b; src = _hePalettes + startColor * 3; - dst = _hePalettes + 1024 + startColor * 3; + dst = _hePalettes + _hePaletteSlot + startColor * 3; for (j = startColor; j <= endColor; j++) { - color = *src++; - color = color * redScale / 0xFF; - if (color > 255) - color = 255; - *dst++ = color; - - color = *src++; - color = color * greenScale / 0xFF; - if (color > 255) - color = 255; - *dst++ = color; - - color = *src++; - color = color * blueScale / 0xFF; - if (color > 255) - color = 255; - *dst++ = color; - - _hePalettes[1792 + j] = j; + r = *src++; + r = r * redScale / 0xFF; + if (r > 255) + r = 255; + *dst++ = r; + + g = *src++; + g = g * greenScale / 0xFF; + if (g > 255) + g = 255; + *dst++ = g; + + b = *src++; + b = b * blueScale / 0xFF; + if (b > 255) + b = 255; + *dst++ = b; + + if (_game.features & GF_16BIT_COLOR) { + WRITE_LE_UINT16(_hePalettes + 2048 + j * 2, get16BitColor(r, g, b)); + } else { + _hePalettes[1792 + j] = j; + } setDirtyColors(j, endColor); } } @@ -272,26 +362,39 @@ void ScummEngine_v99he::copyPalColor(int dst, int src) { if ((uint) dst >= 256 || (uint) src >= 256) error("copyPalColor: invalid values, %d, %d", dst, src); - dp = &_hePalettes[1024 + dst * 3]; - sp = &_hePalettes[1024 + src * 3]; + dp = &_hePalettes[_hePaletteSlot + dst * 3]; + sp = &_hePalettes[_hePaletteSlot + src * 3]; dp[0] = sp[0]; dp[1] = sp[1]; dp[2] = sp[2]; - _hePalettes[1792 + dst] = dst; + + if (_game.features & GF_16BIT_COLOR) { + WRITE_LE_UINT16(_hePalettes + 2048 + dst * 2, get16BitColor(sp[0], sp[1], sp[2])); + } else { + _hePalettes[1792 + dst] = dst; + } setDirtyColors(dst, dst); } void ScummEngine_v99he::setPalColor(int idx, int r, int g, int b) { - _hePalettes[1024 + idx * 3 + 0] = r; - _hePalettes[1024 + idx * 3 + 1] = g; - _hePalettes[1024 + idx * 3 + 2] = b; - _hePalettes[1792 + idx] = idx; + _hePalettes[_hePaletteSlot + idx * 3 + 0] = r; + _hePalettes[_hePaletteSlot + idx * 3 + 1] = g; + _hePalettes[_hePaletteSlot + idx * 3 + 2] = b; + + if (_game.features & GF_16BIT_COLOR) { + WRITE_LE_UINT16(_hePalettes + 2048 + idx * 2, get16BitColor(r, g, b)); + } else { + _hePalettes[1792 + idx] = idx; + } setDirtyColors(idx, idx); } void ScummEngine_v99he::updatePalette() { + if (_game.features & GF_16BIT_COLOR) + return; + if (_palDirtyMax == -1) return; diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 5912e3d528..d588c26a77 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -2152,8 +2152,9 @@ void ScummEngine_v100he::o100_systemOps() { } void ScummEngine_v100he::o100_cursorCommand() { - int a, i; + int a, b, i; int args[16]; + byte subOp = fetchScriptByte(); switch (subOp) { @@ -2168,12 +2169,12 @@ void ScummEngine_v100he::o100_cursorCommand() { case 0x80: case 0x81: a = pop(); - _wiz->loadWizCursor(a); + _wiz->loadWizCursor(a, 0); break; case 0x82: - pop(); + b = pop(); a = pop(); - _wiz->loadWizCursor(a); + _wiz->loadWizCursor(a, b); break; case 0x86: // SO_CURSOR_ON Turn cursor on _cursor.state = 1; @@ -2576,7 +2577,8 @@ void ScummEngine_v100he::o100_getWizData() { } void ScummEngine_v100he::o100_getPaletteData() { - int b, c, d, e; + int c, d, e; + int r, g, b; int palSlot, color; byte subOp = fetchScriptByte(); @@ -2585,7 +2587,10 @@ void ScummEngine_v100he::o100_getPaletteData() { case 13: c = pop(); b = pop(); - push(getHEPaletteColorComponent(1, b, c)); + if (_game.features & GF_16BIT_COLOR) + push(getHEPalette16BitColorComponent(b, c)); + else + push(getHEPaletteColorComponent(1, b, c)); break; case 20: color = pop(); @@ -2596,20 +2601,30 @@ void ScummEngine_v100he::o100_getPaletteData() { e = pop(); d = pop(); palSlot = pop(); - pop(); - c = pop(); b = pop(); - push(getHEPaletteSimilarColor(palSlot, b, c, d, e)); + g = pop(); + r = pop(); + push(getHEPaletteSimilarColor(palSlot, r, g, d, e)); break; case 53: - pop(); - c = pop(); - c = MAX(0, c); - c = MIN(c, 255); b = pop(); b = MAX(0, b); b = MIN(b, 255); - push(getHEPaletteSimilarColor(1, b, c, 10, 245)); + g = pop(); + g = MAX(0, g); + g = MIN(g, 255); + r = pop(); + r = MAX(0, r); + r = MIN(r, 255); + if (_game.features & GF_16BIT_COLOR) { + uint32 ar = ((r >> 3) << 10) & 0xFFFF; + uint32 ag = ((g >> 3) << 5) & 0xFFFF; + uint32 ab = ((b >> 3) << 0) & 0xFFFF; + uint32 col = ar | ag | ab; + push(col); + } else { + push(getHEPaletteSimilarColor(1, r, g, 10, 245)); + } break; case 73: c = pop(); diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index 5ad447b1c7..b416a0e75d 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -115,6 +115,8 @@ int ScummEngine_v60he::convertFilePath(byte *dst) { int r = 0; if (dst[0] == '.' && dst[1] == '/') { // Game Data Path r = 2; + } else if (dst[2] == 'b' && dst[5] == 'k') { // Backyard Basketball INI + r = 13; } else if (dst[0] == '*' && dst[1] == '/') { // Save Game Path (HE72 - HE100) r = 2; } else if (dst[0] == 'c' && dst[1] == ':') { // Save Game Path (HE60 - HE71) diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp index b71a0f9e10..4b759dec53 100644 --- a/engines/scumm/he/script_v80he.cpp +++ b/engines/scumm/he/script_v80he.cpp @@ -241,7 +241,7 @@ void ScummEngine_v80he::o80_writeConfigFile() { } void ScummEngine_v80he::o80_cursorCommand() { - int a, i; + int a, b, i; int args[16]; byte subOp = fetchScriptByte(); @@ -250,12 +250,12 @@ void ScummEngine_v80he::o80_cursorCommand() { case 0x13: case 0x14: a = pop(); - _wiz->loadWizCursor(a); + _wiz->loadWizCursor(a, 0); break; case 0x3C: - pop(); + b = pop(); a = pop(); - _wiz->loadWizCursor(a); + _wiz->loadWizCursor(a, b); break; case 0x90: // SO_CURSOR_ON Turn cursor on _cursor.state = 1; diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp index cdfef1a5e5..212ba69bdc 100644 --- a/engines/scumm/he/script_v90he.cpp +++ b/engines/scumm/he/script_v90he.cpp @@ -1253,7 +1253,7 @@ void ScummEngine_v90he::o90_setSpriteGroupInfo() { void ScummEngine_v90he::o90_getWizData() { byte filename[4096]; - int state, resId; + int resId, state, type; int32 w, h; int32 x, y; @@ -1317,9 +1317,10 @@ void ScummEngine_v90he::o90_getWizData() { push(computeWizHistogram(resId, state, x, y, w, h)); break; case 139: - pop(); - pop(); - push(0); + type = pop(); + state = pop(); + resId = pop(); + push(_wiz->getWizImageData(resId, state, type)); break; case 141: pop(); @@ -2099,7 +2100,8 @@ void ScummEngine_v90he::o90_getObjectData() { } void ScummEngine_v90he::o90_getPaletteData() { - int b, c, d, e; + int c, d, e; + int r, g, b; int palSlot, color; byte subOp = fetchScriptByte(); @@ -2109,10 +2111,10 @@ void ScummEngine_v90he::o90_getPaletteData() { e = pop(); d = pop(); palSlot = pop(); - pop(); - c = pop(); b = pop(); - push(getHEPaletteSimilarColor(palSlot, b, c, d, e)); + g = pop(); + r = pop(); + push(getHEPaletteSimilarColor(palSlot, r, g, d, e)); break; case 52: c = pop(); @@ -2128,17 +2130,31 @@ void ScummEngine_v90he::o90_getPaletteData() { case 132: c = pop(); b = pop(); - push(getHEPaletteColorComponent(1, b, c)); + if (_game.features & GF_16BIT_COLOR) + push(getHEPalette16BitColorComponent(b, c)); + else + push(getHEPaletteColorComponent(1, b, c)); break; case 217: - pop(); - c = pop(); - c = MAX(0, c); - c = MIN(c, 255); b = pop(); b = MAX(0, b); b = MIN(b, 255); - push(getHEPaletteSimilarColor(1, b, c, 10, 245)); + g = pop(); + g = MAX(0, g); + g = MIN(g, 255); + r = pop(); + r = MAX(0, r); + r = MIN(r, 255); + + if (_game.features & GF_16BIT_COLOR) { + uint32 ar = ((r >> 3) << 10) & 0xFFFF; + uint32 ag = ((g >> 3) << 5) & 0xFFFF; + uint32 ab = ((b >> 3) << 0) & 0xFFFF; + uint32 col = ar | ag | ab; + push(col); + } else { + push(getHEPaletteSimilarColor(1, r, g, 10, 245)); + } break; default: error("o90_getPaletteData: Unknown case %d", subOp); diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 6038433847..1c3867b980 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -254,7 +254,9 @@ bool Wiz::polygonContains(const WizPolygon &pol, int x, int y) { return r; } -void Wiz::copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch) { +void Wiz::copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, uint8 bitDepth) { + assert(bitDepth == 1); + Common::Rect dstRect(srcx, srcy, srcx + srcw, srcy + srch); dstRect.clip(dstw, dsth); @@ -263,8 +265,8 @@ void Wiz::copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int if (rh <= 0 || rw <= 0) return; - uint8 *dst1Ptr = dst1 + dstRect.left + dstRect.top * dstw; - uint8 *dst2Ptr = dst2 + dstRect.left + dstRect.top * dstw; + uint8 *dst1Ptr = dst1 + dstRect.top * dstw + dstRect.left; + uint8 *dst2Ptr = dst2 + dstRect.top * dstw + dstRect.left; const uint8 *dataPtr = src; while (rh--) { @@ -353,12 +355,24 @@ static bool calcClipRects(int dst_w, int dst_h, int src_x, int src_y, int src_w, return srcRect.isValidRect() && dstRect.isValidRect(); } -void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { - // TODO: Compressed 16 bits in 555 format +void Wiz::writeColor(uint8 *dstPtr, int dstType, uint16 color) { + switch (dstType) { + case kDstScreen: + WRITE_UINT16(dstPtr, color); + break; + case kDstMemory: + case kDstResource: + WRITE_LE_UINT16(dstPtr, color); + break; + default: + error("writeColor: Unknown dstType %d", dstType); + } +} +void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { - dst += r2.top * dstw + r2.left; + dst += r2.top * dstPitch + r2.left * 2; if (flags & kWIFFlipY) { const int dy = (srcy < 0) ? srcy : (srch - r1.height()); r1.translate(0, dy); @@ -368,17 +382,17 @@ void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, in r1.translate(dx, 0); } if (xmapPtr) { - decompress16BitWizImage(dst, dstw, src, r1, flags, palPtr, xmapPtr); + decompress16BitWizImage(dst, dstPitch, dstType, src, r1, flags, palPtr, xmapPtr); } else { - decompress16BitWizImage(dst, dstw, src, r1, flags); + decompress16BitWizImage(dst, dstPitch, dstType, src, r1, flags); } } } -void Wiz::copyWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { +void Wiz::copyWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { - dst += r2.left + r2.top * dstw; + dst += r2.top * dstPitch + r2.left * bitDepth; if (flags & kWIFFlipY) { const int dy = (srcy < 0) ? srcy : (srch - r1.height()); r1.translate(0, dy); @@ -388,11 +402,11 @@ void Wiz::copyWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int src r1.translate(dx, 0); } if (xmapPtr) { - decompressWizImage(dst, dstw, src, r1, flags, palPtr, xmapPtr); + decompressWizImage(dst, dstPitch, dstType, src, r1, flags, palPtr, xmapPtr, bitDepth); } else if (palPtr) { - decompressWizImage(dst, dstw, src, r1, flags, palPtr); + decompressWizImage(dst, dstPitch, dstType, src, r1, flags, palPtr, NULL, bitDepth); } else { - decompressWizImage(dst, dstw, src, r1, flags); + decompressWizImage(dst, dstPitch, dstType, src, r1, flags, NULL, NULL, bitDepth); } } } @@ -431,13 +445,13 @@ static void decodeWizMask(uint8 *&dst, uint8 &mask, int w, int maskType) { } } -void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP) { +void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP) { Common::Rect srcRect, dstRect; if (!calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, srcRect, dstRect)) { return; } dstw = dstw / 8; - dst += dstRect.top * dstw + dstRect.left / 8; + dst += dstRect.top * dstPitch + dstRect.left / 8; const uint8 *dataPtr, *dataPtrNext; uint8 code, mask, *dstPtr, *dstPtrNext; @@ -462,7 +476,7 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth, w = srcRect.width(); mask = revBitMask(dstRect.left & 7); off = READ_LE_UINT16(dataPtr); dataPtr += 2; - dstPtrNext = dstPtr + dstw; + dstPtrNext = dstPtr + dstPitch; dataPtrNext = dataPtr + off; if (off != 0) { while (w > 0) { @@ -520,7 +534,7 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth, } } -void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor) { +void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitDepth) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { if (flags & kWIFFlipX) { @@ -537,19 +551,17 @@ void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int } int h = r1.height(); int w = r1.width(); - src += r1.left + r1.top * srcw; - dst += r2.left + r2.top * dstw; + src += r1.top * srcw + r1.left; + dst += r2.top * dstPitch + r2.left * bitDepth; if (palPtr) { - decompressRawWizImage(dst, dstw, src, srcw, w, h, transColor, palPtr); + decompressRawWizImage(dst, dstPitch, dstType, src, srcw, w, h, transColor, palPtr, bitDepth); } else { - decompressRawWizImage(dst, dstw, src, srcw, w, h, transColor); + decompressRawWizImage(dst, dstPitch, dstType, src, srcw, w, h, transColor, NULL, bitDepth); } } } -void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor) { - // TODO: RAW 16 bits in 555 format - +void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, int transColor) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { if (flags & kWIFFlipX) { @@ -567,29 +579,39 @@ void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int h = r1.height(); int w = r1.width(); src += (r1.top * srcw + r1.left) * 2; - dst += r2.top * dstw + r2.left; + dst += r2.top * dstPitch + r2.left * 2; while (h--) { - for (int i = 0; i < w; ++i) { + for (int i = 0; i < w; ++ i) { uint16 col = READ_LE_UINT16(src + 2 * i); - uint8 r = ((col >> 10) & 0x1F) << 3; - uint8 g = ((col >> 5) & 0x1F) << 3; - uint8 b = ((col >> 0) & 0x1F) << 3; - uint8 color = _vm->convert16BitColor(col, r, g, b); - if (transColor == -1 || transColor != col) { - dst[i] = color; + writeColor(dst + i * 2, dstType, col); } } src += srcw * 2; - dst += dstw; + dst += dstPitch; } } } template -void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { +void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *xmapPtr) { + uint16 col = READ_LE_UINT16(dataPtr); + if (type == kWizXMap) { + uint16 srcColor = (col >> 1) & 0x7DEF; + uint16 dstColor = (READ_UINT16(dstPtr) >> 1) & 0x7DEF; + uint16 newColor = srcColor + dstColor; + writeColor(dstPtr, dstType, newColor); + } + if (type == kWizCopy) { + writeColor(dstPtr, dstType, col); + } +} + +template +void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { const uint8 *dataPtr, *dataPtrNext; - uint8 code, *dstPtr, *dstPtrNext; + uint8 code; + uint8 *dstPtr, *dstPtrNext; int h, w, xoff, dstInc; if (type == kWizXMap) { @@ -616,10 +638,10 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, const uint8 *src, co dstPtr += (h - 1) * dstPitch; dstPitch = -dstPitch; } - dstInc = 1; + dstInc = 2; if (flags & kWIFFlipX) { - dstPtr += w - 1; - dstInc = -1; + dstPtr += (w - 1) * 2; + dstInc = -2; } while (h--) { @@ -640,7 +662,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, const uint8 *src, co code = -xoff; } - dstPtr += dstInc * code; + dstPtr += dstInc; w -= code; } else if (code & 2) { code = (code >> 2) + 1; @@ -658,18 +680,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, const uint8 *src, co code += w; } while (code--) { - uint16 col = READ_LE_UINT16(dataPtr); - uint8 r = ((col >> 10) & 0x1F) << 3; - uint8 g = ((col >> 5) & 0x1F) << 3; - uint8 b = ((col >> 0) & 0x1F) << 3; - col = _vm->convert16BitColor(col, r, g, b); - - if (type == kWizXMap) { - *dstPtr = xmapPtr[col * 256 + *dstPtr]; - } - if (type == kWizCopy) { - *dstPtr = col; - } + write16BitColor(dstPtr, dataPtr, dstType, xmapPtr); dstPtr += dstInc; } dataPtr+= 2; @@ -689,18 +700,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, const uint8 *src, co code += w; } while (code--) { - uint16 col = READ_LE_UINT16(dataPtr); - uint8 r = ((col >> 10) & 0x1F) << 3; - uint8 g = ((col >> 5) & 0x1F) << 3; - uint8 b = ((col >> 0) & 0x1F) << 3; - col = _vm->convert16BitColor(col, r, g, b); - - if (type == kWizXMap) { - *dstPtr = xmapPtr[col * 256 + *dstPtr]; - } - if (type == kWizCopy) { - *dstPtr = col; - } + write16BitColor(dstPtr, dataPtr, dstType, xmapPtr); dataPtr += 2; dstPtr += dstInc; } @@ -713,7 +713,36 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, const uint8 *src, co } template -void Wiz::decompressWizImage(uint8 *dst, int dstPitch, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { +void Wiz::write8BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) { + if (bitDepth == 2) { + if (type == kWizXMap) { + uint16 color = READ_LE_UINT16(palPtr + *dataPtr * 2); + uint16 srcColor = (color >> 1) & 0x7DEF; + uint16 dstColor = (READ_UINT16(dstPtr) >> 1) & 0x7DEF; + uint16 newColor = srcColor + dstColor; + writeColor(dstPtr, dstType, newColor); + } + if (type == kWizRMap) { + writeColor(dstPtr, dstType, READ_LE_UINT16(palPtr + *dataPtr * 2)); + } + if (type == kWizCopy) { + writeColor(dstPtr, dstType, *dataPtr); + } + } else { + if (type == kWizXMap) { + *dstPtr = xmapPtr[*dataPtr * 256 + *dstPtr]; + } + if (type == kWizRMap) { + *dstPtr = palPtr[*dataPtr]; + } + if (type == kWizCopy) { + *dstPtr = *dataPtr; + } + } +} + +template +void Wiz::decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) { const uint8 *dataPtr, *dataPtrNext; uint8 code, *dstPtr, *dstPtrNext; int h, w, xoff, dstInc; @@ -742,9 +771,9 @@ void Wiz::decompressWizImage(uint8 *dst, int dstPitch, const uint8 *src, const C dstPtr += (h - 1) * dstPitch; dstPitch = -dstPitch; } - dstInc = 1; + dstInc = bitDepth; if (flags & kWIFFlipX) { - dstPtr += w - 1; + dstPtr += (w - 1) * bitDepth; dstInc = -1; } @@ -784,15 +813,7 @@ void Wiz::decompressWizImage(uint8 *dst, int dstPitch, const uint8 *src, const C code += w; } while (code--) { - if (type == kWizXMap) { - *dstPtr = xmapPtr[*dataPtr * 256 + *dstPtr]; - } - if (type == kWizRMap) { - *dstPtr = palPtr[*dataPtr]; - } - if (type == kWizCopy) { - *dstPtr = *dataPtr; - } + write8BitColor(dstPtr, dataPtr, dstType, palPtr, xmapPtr, bitDepth); dstPtr += dstInc; } dataPtr++; @@ -812,15 +833,8 @@ void Wiz::decompressWizImage(uint8 *dst, int dstPitch, const uint8 *src, const C code += w; } while (code--) { - if (type == kWizXMap) { - *dstPtr = xmapPtr[*dataPtr++ * 256 + *dstPtr]; - } - if (type == kWizRMap) { - *dstPtr = palPtr[*dataPtr++]; - } - if (type == kWizCopy) { - *dstPtr = *dataPtr++; - } + write8BitColor(dstPtr, dataPtr, dstType, palPtr, xmapPtr, bitDepth); + dataPtr++; dstPtr += dstInc; } } @@ -832,7 +846,7 @@ void Wiz::decompressWizImage(uint8 *dst, int dstPitch, const uint8 *src, const C } template -void Wiz::decompressRawWizImage(uint8 *dst, int dstPitch, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr) { +void Wiz::decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitDepth) { if (type == kWizRMap) { assert(palPtr != 0); } @@ -845,10 +859,18 @@ void Wiz::decompressRawWizImage(uint8 *dst, int dstPitch, const uint8 *src, int uint8 col = src[i]; if (transColor == -1 || transColor != col) { if (type == kWizRMap) { - dst[i] = palPtr[col]; + if (bitDepth == 2) { + writeColor(dst + i * 2, dstType, READ_LE_UINT16(palPtr + col * 2)); + } else { + dst[i] = palPtr[col]; + } } if (type == kWizCopy) { - dst[i] = col; + if (bitDepth == 2) { + writeColor(dst + i * 2, dstType, col); + } else { + dst[i] = col; + } } } } @@ -938,7 +960,7 @@ uint16 Wiz::getWizPixelColor(const uint8 *data, int x, int y, int w, int h, uint } if (bitDepth == 2) - return (READ_LE_UINT16(data) & 1) ? color : READ_LE_UINT16(data + 1); + return (READ_LE_UINT16(data) & 1) ? color : READ_LE_UINT16(data + 2); else return (data[0] & 1) ? color : data[1]; @@ -949,7 +971,7 @@ uint16 Wiz::getRawWizPixelColor(const uint8 *data, int x, int y, int w, int h, u return color; } if (bitDepth == 2) - return READ_LE_UINT16(data + y * w + x * 2); + return READ_LE_UINT16(data + (y * w + x) * 2); else return data[y * w + x]; } @@ -1038,6 +1060,22 @@ void Wiz::computeRawWizHistogram(uint32 *histogram, const uint8 *data, int srcPi } } +static int wizPackType2(uint8 *dst, const uint8 *src, int srcPitch, const Common::Rect& rCapt) { + debug(9, "wizPackType2([%d,%d,%d,%d])", rCapt.left, rCapt.top, rCapt.right, rCapt.bottom); + int w = rCapt.width(); + int h = rCapt.height(); + int size = w * h * 2; + if (dst) { + src += rCapt.top * srcPitch + rCapt.left * 2; + while (h--) { + memcpy(dst, src, w * 2); + dst += w * 2; + src += srcPitch; + } + } + return size; +} + static int wizPackType1(uint8 *dst, const uint8 *src, int srcPitch, const Common::Rect& rCapt, uint8 transColor) { debug(9, "wizPackType1(%d, [%d,%d,%d,%d])", transColor, rCapt.left, rCapt.top, rCapt.right, rCapt.bottom); src += rCapt.top * srcPitch + rCapt.left; @@ -1174,7 +1212,7 @@ static int wizPackType0(uint8 *dst, const uint8 *src, int srcPitch, const Common } void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, int compType) { - debug(5, "ScummEngine_v72he::captureWizImage(%d, %d, [%d,%d,%d,%d])", resNum, compType, r.left, r.top, r.right, r.bottom); + debug(0, "captureWizImage(%d, %d, [%d,%d,%d,%d])", resNum, compType, r.left, r.top, r.right, r.bottom); uint8 *src = NULL; VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; if (backBuffer) { @@ -1187,7 +1225,7 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in rCapt.clip(r); const uint8 *palPtr; if (_vm->_game.heversion >= 99) { - palPtr = _vm->_hePalettes + 1024; + palPtr = _vm->_hePalettes + _vm->_hePaletteSlot; } else { palPtr = _vm->_currentPalette; } @@ -1196,6 +1234,9 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in int h = rCapt.height(); int transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; + if (_vm->_game.features & GF_16BIT_COLOR) + compType = 2; + // compute compressed size int dataSize = 0; int headerSize = palPtr ? 1080 : 36; @@ -1206,6 +1247,9 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in case 1: dataSize = wizPackType1(0, src, pvs->pitch, rCapt, transColor); break; + case 2: + dataSize = wizPackType2(0, src, pvs->pitch, rCapt); + break; default: error("unhandled compression type %d", compType); break; @@ -1249,6 +1293,9 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in case 1: wizPackType1(wizImg + headerSize, src, pvs->pitch, rCapt, transColor); break; + case 2: + wizPackType2(wizImg + headerSize, src, pvs->pitch, rCapt); + break; default: break; } @@ -1274,24 +1321,15 @@ void Wiz::displayWizImage(WizImage *pwi) { drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, 0, 0, 0); } else { const Common::Rect *r = NULL; - drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, 0, 0, 0, r, pwi->flags, 0, 0); + drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, 0, 0, 0, r, pwi->flags, 0, _vm->getHEPaletteSlot(0)); } } -uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, int palette) { - debug(3, "drawWizImage(resNum %d, x1 %d y1 %d flags 0x%X zorder %d shadow %d field_390 %d dstResNum %d palette %d)", resNum, x1, y1, flags, zorder, shadow, field_390, dstResNum, palette); +uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr) { + debug(3, "drawWizImage(resNum %d, x1 %d y1 %d flags 0x%X zorder %d shadow %d field_390 %d dstResNum %d)", resNum, x1, y1, flags, zorder, shadow, field_390, dstResNum); uint8 *dataPtr; uint8 *dst = NULL; - const uint8 *palPtr = NULL; - if (_vm->_game.heversion >= 99) { - if (palette) { - palPtr = _vm->_hePalettes + palette * 1024 + 768; - } else { - palPtr = _vm->_hePalettes + 1792; - } - } - const uint8 *xmapPtr = NULL; if (shadow) { dataPtr = _vm->getResourceAddress(rtImage, shadow); @@ -1334,13 +1372,25 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int error("WizImage printing is unimplemented"); } - int32 cw, ch; + int32 dstPitch, dstType, cw, ch; if (flags & kWIFBlitToMemBuffer) { - dst = (uint8 *)malloc(width * height); + dst = (uint8 *)malloc(width * height * _vm->_bitDepth); int transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? (_vm->VAR(_vm->VAR_WIZ_TCOLOR)) : 5; - memset(dst, transColor, width * height); + + if (_vm->_bitDepth == 2) { + uint8 *tmpPtr = dst; + for (uint i = 0; i < height; i++) { + for (uint j = 0; j < width; j++) + WRITE_LE_UINT16(tmpPtr + j * 2, transColor); + tmpPtr += width * 2; + } + } else { + memset(dst, transColor, width * height); + } cw = width; ch = height; + dstPitch = cw * _vm->_bitDepth; + dstType = kDstMemory; } else { if (dstResNum) { uint8 *dstPtr = _vm->getResourceAddress(rtImage, dstResNum); @@ -1348,6 +1398,8 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0); assert(dst); getWizImageDim(dstResNum, 0, cw, ch); + dstPitch = cw * _vm->_bitDepth; + dstType = kDstResource; } else { VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; if (flags & kWIFMarkBufferDirty) { @@ -1357,6 +1409,8 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int } cw = pvs->w; ch = pvs->h; + dstPitch = pvs->pitch; + dstType = kDstScreen; } } @@ -1376,7 +1430,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int } } - if (flags & kWIFRemapPalette) { + if (flags & kWIFRemapPalette && _vm->_bitDepth == 1) { palPtr = rmap + 4; } @@ -1388,28 +1442,27 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int switch (comp) { case 0: - copyRawWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor); + copyRawWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor, _vm->_bitDepth); break; case 1: if (flags & 0x80) { dst = _vm->getMaskBuffer(0, 0, 1); - copyWizImageWithMask(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, 0, 2); + copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 2); } else if (flags & 0x100) { dst = _vm->getMaskBuffer(0, 0, 1); - copyWizImageWithMask(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, 0, 1); + copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 1); } else { - copyWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr); + copyWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr, _vm->_bitDepth); } break; case 2: - copyRaw16BitWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor); + copyRaw16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, transColor); break; case 4: // TODO: Unknown image type break; case 5: - // TODO: 16bit color compressed image - copy16BitWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr); + copy16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr); break; default: error("drawWizImage: Unhandled wiz compression type %d", comp); @@ -1539,7 +1592,7 @@ void Wiz::drawWizPolygon(int resNum, int state, int id, int flags, int shadow, i } void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int flags, int shadow, int dstResNum, int palette) { - debug(3, "drawWizPolygonTransform(resNum %d, flags 0x%X, shadow %d dstResNum %d palette %d)", resNum, flags, shadow, dstResNum, palette); + debug(0, "drawWizPolygonTransform(resNum %d, flags 0x%X, shadow %d dstResNum %d palette %d)", resNum, flags, shadow, dstResNum, palette); const Common::Rect *r = NULL; uint8 *srcWizBuf = NULL; bool freeBuffer = true; @@ -1552,8 +1605,10 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int if (flags & 0x800000) { debug(0, "drawWizPolygonTransform() unhandled flag 0x800000"); } - srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, shadow, 0, r, flags, 0, palette); + + srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, shadow, 0, r, flags, 0, _vm->getHEPaletteSlot(palette)); } else { + assert(_vm->_bitDepth == 1); uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); assert(dataPtr); srcWizBuf = _vm->findWrappedBlock(MKID_BE('WIZD'), dataPtr, state, 0); @@ -1562,7 +1617,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int } } else { if (getWizImageData(resNum, state, 0) != 0) { - srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, shadow, 0, r, kWIFBlitToMemBuffer, 0, palette); + srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, shadow, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); } else { uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); assert(dataPtr); @@ -1584,7 +1639,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0); assert(dst); getWizImageDim(dstResNum, 0, dstw, dsth); - dstpitch = dstw; + dstpitch = dstw * _vm->_bitDepth; } else { if (flags & kWIFMarkBufferDirty) { dst = pvs->getPixels(0, 0); @@ -1666,7 +1721,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int int16 width = ppa->xmax - ppa->xmin + 1; pra->x_step = ((ppa->x2 - ppa->x1) << 16) / width; pra->y_step = ((ppa->y2 - ppa->y1) << 16) / width; - pra->dst_offs = yoff + x1; + pra->dst_offs = yoff + x1 * _vm->_bitDepth; pra->w = w; pra->x_s = ppa->x1 << 16; pra->y_s = ppa->y1 << 16; @@ -1695,10 +1750,14 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int assert(src_offs < wizW * wizH); x_acc += pra->x_step; y_acc += pra->y_step; - if (transColor == -1 || transColor != srcWizBuf[src_offs]) { - *dstPtr = srcWizBuf[src_offs]; + if (_vm->_bitDepth == 2) { + if (transColor == -1 || transColor != READ_LE_UINT16(srcWizBuf + src_offs * 2)) + WRITE_LE_UINT16(dstPtr, READ_LE_UINT16(srcWizBuf + src_offs * 2)); + } else { + if (transColor == -1 || transColor != srcWizBuf[src_offs]) + *dstPtr = srcWizBuf[src_offs]; } - dstPtr++; + dstPtr += _vm->_bitDepth; } } @@ -1721,13 +1780,13 @@ void Wiz::flushWizBuffer() { drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, pwi->shadow, 0, pwi->palette); } else { const Common::Rect *r = NULL; - drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, pwi->zorder, pwi->shadow, pwi->field_390, r, pwi->flags, 0, pwi->palette); + drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, pwi->zorder, pwi->shadow, pwi->field_390, r, pwi->flags, 0, _vm->getHEPaletteSlot(pwi->palette)); } } _imagesNum = 0; } -void Wiz::loadWizCursor(int resId) { +void Wiz::loadWizCursor(int resId, int palette) { int32 x, y; getWizImageSpot(resId, 0, x, y); if (x < 0) { @@ -1742,7 +1801,10 @@ void Wiz::loadWizCursor(int resId) { } const Common::Rect *r = NULL; - uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, 0); + _vm->_bitDepth = 1; + uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); + _vm->_bitDepth = (_vm->_game.features & GF_16BIT_COLOR) ? 2 : 1; + int32 cw, ch; getWizImageDim(resId, 0, cw, ch); _vm->setCursorHotspot(x, y); @@ -1758,7 +1820,8 @@ void Wiz::displayWizComplexImage(const WizParameters *params) { int sourceImage = 0; if (params->processFlags & kWPFMaskImg) { sourceImage = params->sourceImage; - debug(0, "displayWizComplexImage() unhandled flag kWPFMaskImg"); + debug(3, "displayWizComplexImage() unhandled flag kWPFMaskImg"); + return; } int palette = 0; if (params->processFlags & kWPFPaletteNum) { @@ -1827,14 +1890,14 @@ void Wiz::displayWizComplexImage(const WizParameters *params) { } else { if (sourceImage != 0) { // TODO: Add support for kWPFMaskImg - drawWizImage(params->sourceImage, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, palette); + drawWizImage(params->sourceImage, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); } else if (params->processFlags & (kWPFScaled | kWPFRotate)) { drawWizComplexPolygon(params->img.resNum, state, po_x, po_y, shadow, rotationAngle, scale, r, flags, dstResNum, palette); } else { if (flags & kWIFIsPolygon) { drawWizPolygon(params->img.resNum, state, po_x, flags, shadow, dstResNum, palette); } else { - drawWizImage(params->img.resNum, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, palette); + drawWizImage(params->img.resNum, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); } } } @@ -1842,6 +1905,8 @@ void Wiz::displayWizComplexImage(const WizParameters *params) { void Wiz::createWizEmptyImage(int resNum, int img_x, int img_y, int img_w, int img_h) { const uint16 flags = 0xB; + const uint8 compType = (_vm->_game.features & GF_16BIT_COLOR) ? 2 : 0; + const uint8 bitDepth = (_vm->_game.features & GF_16BIT_COLOR) ? 2 : 1; int res_size = 0x1C; if (flags & 1) { res_size += 0x308; @@ -1852,11 +1917,11 @@ void Wiz::createWizEmptyImage(int resNum, int img_x, int img_y, int img_w, int i if (flags & 8) { res_size += 0x10C; } - res_size += 8 + img_w * img_h; + res_size += 8 + img_w * img_h * bitDepth; const uint8 *palPtr; if (_vm->_game.heversion >= 99) { - palPtr = _vm->_hePalettes + 1024; + palPtr = _vm->_hePalettes + _vm->_hePaletteSlot; } else { palPtr = _vm->_currentPalette; } @@ -1869,7 +1934,7 @@ void Wiz::createWizEmptyImage(int resNum, int img_x, int img_y, int img_w, int i WRITE_BE_UINT32(res_data, res_size); res_data += 4; WRITE_BE_UINT32(res_data, 'WIZH'); res_data += 4; WRITE_BE_UINT32(res_data, 0x14); res_data += 4; - WRITE_LE_UINT32(res_data, 0); res_data += 4; + WRITE_LE_UINT32(res_data, compType); res_data += 4; WRITE_LE_UINT32(res_data, img_w); res_data += 4; WRITE_LE_UINT32(res_data, img_h); res_data += 4; if (flags & 1) { @@ -1892,7 +1957,7 @@ void Wiz::createWizEmptyImage(int resNum, int img_x, int img_y, int img_w, int i } } WRITE_BE_UINT32(res_data, 'WIZD'); res_data += 4; - WRITE_BE_UINT32(res_data, 8 + img_w * img_h); res_data += 4; + WRITE_BE_UINT32(res_data, 8 + img_w * img_h * bitDepth); res_data += 4; } _vm->_res->setModified(rtImage, resNum); } @@ -1909,7 +1974,8 @@ void Wiz::fillWizRect(const WizParameters *params) { int c = READ_LE_UINT32(wizh + 0x0); int w = READ_LE_UINT32(wizh + 0x4); int h = READ_LE_UINT32(wizh + 0x8); - assert(c == 0); + assert(c == 0 || c == 2); + uint8 bitDepth = (c == 2) ? 2 : 1; Common::Rect areaRect, imageRect(w, h); if (params->processFlags & kWPFClipBox) { if (!imageRect.intersects(params->box)) { @@ -1932,10 +1998,15 @@ void Wiz::fillWizRect(const WizParameters *params) { assert(wizd); int dx = areaRect.width(); int dy = areaRect.height(); - wizd += areaRect.top * w + areaRect.left; + wizd += (areaRect.top * w + areaRect.left) * bitDepth; while (dy--) { - memset(wizd, color, dx); - wizd += w; + if (bitDepth == 2) { + for (int i = 0; i < dx; i++) + WRITE_LE_UINT16(wizd + i * 2, color); + } else { + memset(wizd, color, dx); + } + wizd += w * bitDepth; } } } @@ -1945,14 +2016,19 @@ void Wiz::fillWizRect(const WizParameters *params) { struct drawProcP { Common::Rect *imageRect; uint8 *wizd; - int width; + int pitch; + int depth; }; static void drawProc(int x, int y, int c, void *data) { drawProcP *param = (drawProcP *)data; if (param->imageRect->contains(x, y)) { - *(param->wizd + y * param->width + x) = c; + uint32 offs = y * param->pitch + x * param->depth; + if (param->depth == 2) + WRITE_LE_UINT16(param->wizd + offs, c); + else + *(param->wizd + offs) = c; } } @@ -1969,7 +2045,8 @@ void Wiz::fillWizLine(const WizParameters *params) { int c = READ_LE_UINT32(wizh + 0x0); int w = READ_LE_UINT32(wizh + 0x4); int h = READ_LE_UINT32(wizh + 0x8); - assert(c == 0); + assert(c == 0 || c == 2); + uint8 bitDepth = (c == 2) ? 2 : 1; Common::Rect imageRect(w, h); if (params->processFlags & kWPFClipBox) { if (!imageRect.intersects(params->box)) { @@ -1992,13 +2069,13 @@ void Wiz::fillWizLine(const WizParameters *params) { lineP.imageRect = &imageRect; lineP.wizd = wizd; - lineP.width = w; + lineP.pitch = w * bitDepth; + lineP.depth = bitDepth; if (params->processFlags & kWPFParams) { assert (params->params2 == 1); // Catch untested usage Graphics::drawThickLine(x1, y1, x2, y2, params->params1, color, drawProc, &lineP); } else { - Graphics::drawLine(x1, y1, x2, y2, color, drawProc, &lineP); } } @@ -2167,6 +2244,9 @@ void Wiz::processWizImage(const WizParameters *params) { img_x = params->img.x1; img_y = params->img.y1; } + if (params->processFlags & kWPFParams) { + debug(0, "Compression %d Color Depth %d", params->params1, params->params2); + } createWizEmptyImage(params->img.resNum, img_x, img_y, img_w, img_h); } break; @@ -2304,7 +2384,7 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags ret = isWizPixelNonTransparent(wizd, x, y, w, h, 1); break; case 2: - ret = getRawWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)) != _vm->VAR(_vm->VAR_WIZ_TCOLOR) ? 1 : 0; + ret = getRawWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)) != _vm->VAR(_vm->VAR_WIZ_TCOLOR) ? 1 : 0; break; case 4: // TODO: Unknown image type diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index e6ea0fe57e..edc42e8788 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -142,6 +142,12 @@ enum { kWizCopy }; +enum DstSurface { + kDstScreen = 0, + kDstMemory = 1, + kDstResource = 2 +}; + class ScummEngine_v71he; class Wiz { @@ -188,27 +194,32 @@ public: void flushWizBuffer(); void getWizImageSpot(int resId, int state, int32 &x, int32 &y); - void loadWizCursor(int resId); + void loadWizCursor(int resId, int palette); void captureWizImage(int resNum, const Common::Rect& r, bool frontBuffer, int compType); void displayWizComplexImage(const WizParameters *params); void displayWizImage(WizImage *pwi); void processWizImage(const WizParameters *params); - uint8 *drawWizImage(int resNum, int state, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, int palette); + uint8 *drawWizImage(int resNum, int state, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr); void drawWizPolygon(int resNum, int state, int id, int flags, int shadow, int dstResNum, int palette); void drawWizComplexPolygon(int resNum, int state, int po_x, int po_y, int shadow, int angle, int zoom, const Common::Rect *r, int flags, int dstResNum, int palette); void drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int flags, int shadow, int dstResNum, int palette); - static void copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch); - static void copyWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags = 0, const uint8 *palPtr = NULL, const uint8 *xmapPtr = NULL); - static void copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP); - void copy16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags = 0, const uint8 *palPtr = NULL, const uint8 *xmapPtr = NULL); - static void copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor); - void copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor); - template static void decompressWizImage(uint8 *dst, int dstPitch, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr = NULL, const uint8 *xmapPtr = NULL); - template void decompress16BitWizImage(uint8 *dst, int dstPitch, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr = NULL, const uint8 *xmapPtr = NULL); - template static void decompressRawWizImage(uint8 *dst, int dstPitch, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr = NULL); + static void copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, uint8 bitdepth); + static void copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP); + static void copyWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth); + static void copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitdepth); + static void copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr); + static void copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, int transColor); + template static void decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr = NULL, const uint8 *xmapPtr = NULL); + template static void decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth); + template static void decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitdepth); + + template static void write16BitColor(uint8 *dst, const uint8 *src, int dstType, const uint8 *xmapPtr); + template static void write8BitColor(uint8 *dst, const uint8 *src, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth); + static void writeColor(uint8 *dstPtr, int dstType, uint16 color); + int isWizPixelNonTransparent(const uint8 *data, int x, int y, int w, int h, uint8 bitdepth); uint16 getWizPixelColor(const uint8 *data, int x, int y, int w, int h, uint8 bitDepth, uint16 color); uint16 getRawWizPixelColor(const uint8 *data, int x, int y, int w, int h, uint8 bitDepth, uint16 color); diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index a2cd4a0d4d..c6ec85cd88 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -310,9 +310,6 @@ void ScummEngine::setDirtyColors(int min, int max) { _palDirtyMin = min; if (_palDirtyMax < max) _palDirtyMax = max; - - if (_hePaletteCache) - memset(_hePaletteCache, -1, 65536); } void ScummEngine::initCycl(const byte *ptr) { @@ -813,16 +810,6 @@ void ScummEngine_v8::desaturatePalette(int hueScale, int satScale, int lightScal #endif -int ScummEngine::convert16BitColor(uint16 color, uint8 r, uint8 g, uint8 b) { - // HACK: Find the closest matching color, and store in - // cache for faster access. - if (_hePaletteCache[color] == -1) { - _hePaletteCache[color] = remapPaletteColor(r, g, b, -1); - } - - return _hePaletteCache[color]; -} - int ScummEngine::remapPaletteColor(int r, int g, int b, int threshold) { byte *pal; int ar, ag, ab, i; diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index cef13341b5..051873e147 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -1505,7 +1505,7 @@ void ScummEngine_v90he::saveOrLoad(Serializer *s) { void ScummEngine_v99he::saveOrLoad(Serializer *s) { ScummEngine_v90he::saveOrLoad(s); - s->saveLoadArrayOf(_hePalettes, (_numPalettes + 1) * 1024, sizeof(_hePalettes[0]), sleUint8); + s->saveLoadArrayOf(_hePalettes, (_numPalettes + 1) * _hePaletteSlot, sizeof(_hePalettes[0]), sleUint8); } void ScummEngine_v100he::saveOrLoad(Serializer *s) { diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index cbfa720e79..17ffc6e5b0 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -248,6 +248,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _switchRoomEffect2 = 0; _switchRoomEffect = 0; + _bitDepth = 0; _doEffect = false; _snapScroll = false; _currentLights = 0; @@ -264,8 +265,8 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _palManipPalette = NULL; _palManipIntermediatePal = NULL; memset(gfxUsageBits, 0, sizeof(gfxUsageBits)); - _hePaletteCache = NULL; _hePalettes = NULL; + _hePaletteSlot = 0; _shadowPalette = NULL; _shadowPaletteSize = 0; memset(_currentPalette, 0, sizeof(_currentPalette)); @@ -521,9 +522,11 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _screenHeight = 200; } + _bitDepth = (_game.features & GF_16BIT_COLOR) ? 2 : 1; + // Allocate gfx compositing buffer (not needed for V7/V8 games). if (_game.version < 7) - _compositeBuf = (byte *)malloc(_screenWidth * _screenHeight); + _compositeBuf = (byte *)malloc(_screenWidth * _screenHeight * _bitDepth); else _compositeBuf = 0; @@ -814,7 +817,6 @@ ScummEngine_v90he::~ScummEngine_v90he() { delete _logicHE; } if (_game.heversion >= 99) { - free(_hePaletteCache); free(_hePalettes); } } @@ -1182,7 +1184,7 @@ void ScummEngine::setupScumm() { int maxHeapThreshold = -1; if (_game.features & GF_16BIT_COLOR) { - // 16Bit color games require double the memory, due to increased resource sizes. + // 16bit color games require double the memory, due to increased resource sizes. maxHeapThreshold = 12 * 1024 * 1024; } else if (_game.features & GF_NEW_COSTUMES) { // Since the new costumes are very big, we increase the heap limit, to avoid having @@ -1204,7 +1206,7 @@ void ScummEngine::setupScumm() { } free(_compositeBuf); - _compositeBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier); + _compositeBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier * _bitDepth); } #ifdef ENABLE_SCUMM_7_8 @@ -1542,11 +1544,9 @@ void ScummEngine_v99he::resetScumm() { ScummEngine_v90he::resetScumm(); - _hePaletteCache = (int16 *)malloc(65536); - memset(_hePaletteCache, -1, 65536); - - _hePalettes = (uint8 *)malloc((_numPalettes + 1) * 1024); - memset(_hePalettes, 0, (_numPalettes + 1) * 1024); + _hePaletteSlot = (_game.features & GF_16BIT_COLOR) ? 1280 : 1024; + _hePalettes = (uint8 *)malloc((_numPalettes + 1) * _hePaletteSlot); + memset(_hePalettes, 0, (_numPalettes + 1) * _hePaletteSlot); // Array 129 is set to base name len = strlen(_filenamePattern.pattern); diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index ff3852ee83..c4b2ab9e56 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -954,6 +954,7 @@ public: int _screenTop; Common::RenderMode _renderMode; + uint8 _bitDepth; protected: ColorCycle _colorCycle[16]; // Palette cycles @@ -1039,7 +1040,8 @@ protected: virtual void palManipulateInit(int resID, int start, int end, int time); void palManipulate(); public: - int convert16BitColor(uint16 color, uint8 r, uint8 g, uint8 b); + uint8 *getHEPaletteSlot(uint16 palSlot); + uint16 get16BitColor(uint8 r, uint8 g, uint8 b); int remapPaletteColor(int r, int g, int b, int threshold); // Used by Actor::remapActorPalette protected: void moveMemInPalRes(int start, int end, byte direction); @@ -1115,7 +1117,7 @@ public: // HE specific byte _HEV7ActorPalette[256]; uint8 *_hePalettes; - int16 *_hePaletteCache; + uint16 _hePaletteSlot; protected: int _shadowPaletteSize; -- cgit v1.2.3 From bf212d7b2f4f3b8851a6cd44c4c922cf0f46f94b Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 4 Jun 2009 09:30:12 +0000 Subject: Fix regression in copyWizImageWithMask, which caused corruption in readtime. svn-id: r41157 --- engines/scumm/he/wiz_he.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 1c3867b980..ff58623479 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -450,7 +450,7 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int d if (!calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, srcRect, dstRect)) { return; } - dstw = dstw / 8; + dstPitch /= 8; dst += dstRect.top * dstPitch + dstRect.left / 8; const uint8 *dataPtr, *dataPtrNext; @@ -1447,9 +1447,11 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int case 1: if (flags & 0x80) { dst = _vm->getMaskBuffer(0, 0, 1); + dstPitch = _vm->_bitDepth; copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 2); } else if (flags & 0x100) { dst = _vm->getMaskBuffer(0, 0, 1); + dstPitch /= _vm->_bitDepth; copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 1); } else { copyWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr, _vm->_bitDepth); -- cgit v1.2.3 From d1210392ef1c755fc0c513d81e4981141e6963ee Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 4 Jun 2009 09:32:36 +0000 Subject: Ooops, correct typo in last commit. svn-id: r41158 --- engines/scumm/he/wiz_he.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index ff58623479..f9e76e682e 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1447,7 +1447,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int case 1: if (flags & 0x80) { dst = _vm->getMaskBuffer(0, 0, 1); - dstPitch = _vm->_bitDepth; + dstPitch /= _vm->_bitDepth; copyWizImageWithMask(dst, wizd, dstPitch, cw, ch, x1, y1, width, height, &rScreen, 0, 2); } else if (flags & 0x100) { dst = _vm->getMaskBuffer(0, 0, 1); -- cgit v1.2.3 From d08c592bfd4c1b74e91227847c04afe2b7ca7ff4 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 4 Jun 2009 09:36:13 +0000 Subject: Update drawBMAPObject for 16bit color. svn-id: r41159 --- engines/scumm/gfx.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index a141d51735..0427e32326 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -1956,13 +1956,11 @@ void Gdi::drawBMAPBg(const byte *ptr, VirtScreen *vs) { } void Gdi::drawBMAPObject(const byte *ptr, VirtScreen *vs, int obj, int x, int y, int w, int h) { - assert(_vm->_bitDepth == 1); - const byte *bmap_ptr = _vm->findResourceData(MKID_BE('BMAP'), ptr); assert(bmap_ptr); byte code = *bmap_ptr++; - int scrX = _vm->_screenStartStrip * 8; + int scrX = _vm->_screenStartStrip * 8 * _vm->_bitDepth; if (code == 8 || code == 9) { Common::Rect rScreen(0, 0, vs->w, vs->h); -- cgit v1.2.3 From a45b902716aa3a86e56efaefeee1d6ae3113fbd1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 4 Jun 2009 09:49:06 +0000 Subject: Ooops, re-enable codec32 code. svn-id: r41161 --- engines/scumm/akos.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index edfbe5730d..347b5a03fc 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -1301,8 +1301,6 @@ byte AkosRenderer::codec16(int xmoveCur, int ymoveCur) { } byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { - return 0; - #ifdef ENABLE_HE Common::Rect src, dst; -- cgit v1.2.3 From fdbc49ab5f4b9320e4cdac8edd427304910d8235 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 4 Jun 2009 11:03:45 +0000 Subject: Fix the color of Poodles Galore's finger nails in Spy Fox 3. svn-id: r41162 --- engines/scumm/actor.cpp | 5 +++-- engines/scumm/actor.h | 2 +- engines/scumm/akos.cpp | 2 +- engines/scumm/akos.h | 2 +- engines/scumm/base-costume.h | 2 +- engines/scumm/costume.cpp | 13 ++++++++----- engines/scumm/costume.h | 6 +++--- engines/scumm/he/script_v100he.cpp | 6 +----- engines/scumm/he/script_v90he.cpp | 6 +----- engines/scumm/saveload.h | 2 +- 10 files changed, 21 insertions(+), 25 deletions(-) (limited to 'engines') diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index eea1ec070b..f3c8e2ff6b 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -2484,9 +2484,10 @@ void Actor::saveLoadWithSerializer(Serializer *ser) { MKLINE(Actor, _flip, sleByte, VER(32)), MKLINE(Actor, _heSkipLimbs, sleByte, VER(32)), - // Actor palette grew from 64 to 256 bytes + // Actor palette grew from 64 to 256 bytes and switched to uint16 in HE games MKARRAY_OLD(Actor, _palette[0], sleByte, 64, VER(8), VER(9)), - MKARRAY(Actor, _palette[0], sleByte, 256, VER(10)), + MKARRAY_OLD(Actor, _palette[0], sleByte, 256, VER(10), VER(77)), + MKARRAY(Actor, _palette[0], sleUint16, 256, VER(78)), MK_OBSOLETE(Actor, _mask, sleByte, VER(8), VER(9)), MKLINE(Actor, _shadowMode, sleByte, VER(8)), diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h index 3e8fe6626b..d32f268b11 100644 --- a/engines/scumm/actor.h +++ b/engines/scumm/actor.h @@ -157,7 +157,7 @@ protected: }; - byte _palette[256]; + uint16 _palette[256]; int _elevation; uint16 _facing; uint16 _targetFacing; diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index 347b5a03fc..b7e36b7cea 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -289,7 +289,7 @@ void AkosCostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) { } while ((uint16)mask); } -void AkosRenderer::setPalette(byte *new_palette) { +void AkosRenderer::setPalette(uint16 *new_palette) { uint size, i; size = _vm->getResourceDataSize(akpl); diff --git a/engines/scumm/akos.h b/engines/scumm/akos.h index 17576e5869..9f4f09d4dc 100644 --- a/engines/scumm/akos.h +++ b/engines/scumm/akos.h @@ -107,7 +107,7 @@ public: int16 _actorHitX, _actorHitY; bool _actorHitResult; - void setPalette(byte *_palette); + void setPalette(uint16 *_palette); void setFacing(const Actor *a); void setCostume(int costume, int shadow); diff --git a/engines/scumm/base-costume.h b/engines/scumm/base-costume.h index 59ca3ded1f..d41d795e34 100644 --- a/engines/scumm/base-costume.h +++ b/engines/scumm/base-costume.h @@ -145,7 +145,7 @@ public: } virtual ~BaseCostumeRenderer() {} - virtual void setPalette(byte *palette) = 0; + virtual void setPalette(uint16 *palette) = 0; virtual void setFacing(const Actor *a) = 0; virtual void setCostume(int costume, int shadow) = 0; diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index 82497de87a..4358e03a2a 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -791,7 +791,7 @@ byte ClassicCostumeRenderer::drawLimb(const Actor *a, int limb) { } -void NESCostumeRenderer::setPalette(byte *palette) { +void NESCostumeRenderer::setPalette(uint16 *palette) { // TODO } @@ -874,17 +874,20 @@ void ClassicCostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) } while (mask&0xFFFF); } -void ClassicCostumeRenderer::setPalette(byte *palette) { +void ClassicCostumeRenderer::setPalette(uint16 *palette) { int i; byte color; if (_loaded._format == 0x57) { - memcpy(_palette, palette, 13); + for (i = 0; i < 13; i++) + _palette[i] = color; } else if (_vm->_game.features & GF_OLD_BUNDLE) { if (_vm->getCurrentLights() & LIGHTMODE_actor_use_colors) { - memcpy(_palette, palette, 16); + for (i = 0; i < 16; i++) + _palette[i] = color; } else { - memset(_palette, 8, 16); + for (i = 0; i < 16; i++) + _palette[i] = 8; _palette[12] = 0; } _palette[_loaded._palette[0]] = _palette[0]; diff --git a/engines/scumm/costume.h b/engines/scumm/costume.h index 003bd6ce2b..ecb12986cf 100644 --- a/engines/scumm/costume.h +++ b/engines/scumm/costume.h @@ -94,7 +94,7 @@ protected: public: ClassicCostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {} - void setPalette(byte *palette); + void setPalette(uint16 *palette); void setFacing(const Actor *a); void setCostume(int costume, int shadow); @@ -116,7 +116,7 @@ protected: public: NESCostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {} - void setPalette(byte *palette); + void setPalette(uint16 *palette); void setFacing(const Actor *a); void setCostume(int costume, int shadow); @@ -131,7 +131,7 @@ protected: public: C64CostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {} - void setPalette(byte *palette) {} + void setPalette(uint16 *palette) {} void setFacing(const Actor *a) {} void setCostume(int costume, int shadow); diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index d588c26a77..90f2764b3d 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -2617,11 +2617,7 @@ void ScummEngine_v100he::o100_getPaletteData() { r = MAX(0, r); r = MIN(r, 255); if (_game.features & GF_16BIT_COLOR) { - uint32 ar = ((r >> 3) << 10) & 0xFFFF; - uint32 ag = ((g >> 3) << 5) & 0xFFFF; - uint32 ab = ((b >> 3) << 0) & 0xFFFF; - uint32 col = ar | ag | ab; - push(col); + push(get16BitColor(r, g, b)); } else { push(getHEPaletteSimilarColor(1, r, g, 10, 245)); } diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp index 212ba69bdc..c6b919f554 100644 --- a/engines/scumm/he/script_v90he.cpp +++ b/engines/scumm/he/script_v90he.cpp @@ -2147,11 +2147,7 @@ void ScummEngine_v90he::o90_getPaletteData() { r = MIN(r, 255); if (_game.features & GF_16BIT_COLOR) { - uint32 ar = ((r >> 3) << 10) & 0xFFFF; - uint32 ag = ((g >> 3) << 5) & 0xFFFF; - uint32 ab = ((b >> 3) << 0) & 0xFFFF; - uint32 col = ar | ag | ab; - push(col); + push(get16BitColor(r, g, b)); } else { push(getHEPaletteSimilarColor(1, r, g, 10, 245)); } diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h index 29184ad023..49bfe39b21 100644 --- a/engines/scumm/saveload.h +++ b/engines/scumm/saveload.h @@ -50,7 +50,7 @@ namespace Scumm { * only saves/loads those which are valid for the version of the savegame * which is being loaded/saved currently. */ -#define CURRENT_VER 77 +#define CURRENT_VER 78 /** * An auxillary macro, used to specify savegame versions. We use this instead -- cgit v1.2.3 From be36b352fca2c3e6ec0ae3b0c33d0028927d5343 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 00:21:10 +0000 Subject: Sound resource 1 is used for queued speech in HE60+ games, and should never be nuked, when expiring resources. svn-id: r41182 --- engines/scumm/resource.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/resource.cpp b/engines/scumm/resource.cpp index 874b787615..a3b1a5be77 100644 --- a/engines/scumm/resource.cpp +++ b/engines/scumm/resource.cpp @@ -922,7 +922,11 @@ bool ScummEngine::isResourceInUse(int type, int i) const { case rtCostume: return isCostumeInUse(i); case rtSound: - return _sound->isSoundInUse(i); + // Sound resource 1 is used for queued speech + if (_game.heversion >= 60 && i == 1) + return true; + else + return _sound->isSoundInUse(i); case rtCharset: return _charset->getCurID() == i; case rtImage: -- cgit v1.2.3 From 9911c1bf59048d9661b720f3de6f33176b5ef1e2 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 00:33:25 +0000 Subject: Fix endian issue, the palette must be in little endian. svn-id: r41184 --- engines/scumm/akos.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index b7e36b7cea..f4bb8a2c8b 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -1357,7 +1357,7 @@ byte AkosRenderer::codec32(int xmoveCur, int ymoveCur) { palPtr = _vm->_hePalettes + _paletteNum * _vm->_hePaletteSlot + 768; } else if (rgbs) { for (uint i = 0; i < 256; i++) - _palette[i] = _vm->get16BitColor(rgbs[i * 3 + 0], rgbs[i * 3 + 1], rgbs[i * 3 + 2]); + WRITE_LE_UINT16(_palette + i, _vm->get16BitColor(rgbs[i * 3 + 0], rgbs[i * 3 + 1], rgbs[i * 3 + 2])); palPtr = (uint8 *)_palette; } } else if (_vm->_game.heversion >= 99) { -- cgit v1.2.3 From e90364c890dcea2ca824941495365ed915146d41 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 01:20:39 +0000 Subject: Update o72_getPixel() for 16bit color, and cleanup. svn-id: r41187 --- engines/scumm/he/script_v72he.cpp | 12 +++++++++--- engines/scumm/he/wiz_he.cpp | 13 +++++-------- engines/scumm/he/wiz_he.h | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index bb209e78d1..049fb13cd2 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1572,7 +1572,7 @@ void ScummEngine_v72he::o72_rename() { } void ScummEngine_v72he::o72_getPixel() { - byte area; + uint16 area; int y = pop(); int x = pop(); @@ -1587,11 +1587,17 @@ void ScummEngine_v72he::o72_getPixel() { switch (subOp) { case 9: // HE 100 case 218: - area = *vs->getBackPixels(x, y - vs->topline); + if (_game.features & GF_16BIT_COLOR) + area = READ_UINT16(vs->getBackPixels(x, y - vs->topline)); + else + area = *vs->getBackPixels(x, y - vs->topline); break; case 8: // HE 100 case 219: - area = *vs->getPixels(x, y - vs->topline); + if (_game.features & GF_16BIT_COLOR) + area = READ_UINT16(vs->getPixels(x, y - vs->topline)); + else + area = *vs->getPixels(x, y - vs->topline); break; default: error("o72_getPixel: default case %d", subOp); diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index f9e76e682e..20ff7fa309 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -369,7 +369,7 @@ void Wiz::writeColor(uint8 *dstPtr, int dstType, uint16 color) { } } -void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { +void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *xmapPtr) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { dst += r2.top * dstPitch + r2.left * 2; @@ -382,7 +382,7 @@ void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstT r1.translate(dx, 0); } if (xmapPtr) { - decompress16BitWizImage(dst, dstPitch, dstType, src, r1, flags, palPtr, xmapPtr); + decompress16BitWizImage(dst, dstPitch, dstType, src, r1, flags, xmapPtr); } else { decompress16BitWizImage(dst, dstPitch, dstType, src, r1, flags); } @@ -608,7 +608,7 @@ void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, cons } template -void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr) { +void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr) { const uint8 *dataPtr, *dataPtrNext; uint8 code; uint8 *dstPtr, *dstPtrNext; @@ -617,9 +617,6 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const u if (type == kWizXMap) { assert(xmapPtr != 0); } - if (type == kWizRMap) { - assert(palPtr != 0); - } dstPtr = dst; dataPtr = src; @@ -683,7 +680,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const u write16BitColor(dstPtr, dataPtr, dstType, xmapPtr); dstPtr += dstInc; } - dataPtr+= 2; + dataPtr += 2; } else { code = (code >> 2) + 1; if (xoff > 0) { @@ -1464,7 +1461,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int // TODO: Unknown image type break; case 5: - copy16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr); + copy16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, xmapPtr); break; default: error("drawWizImage: Unhandled wiz compression type %d", comp); diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index edc42e8788..0a320e2426 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -210,9 +210,9 @@ public: static void copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP); static void copyWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth); static void copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitdepth); - static void copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr); + static void copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *xmapPtr); static void copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, int transColor); - template static void decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr = NULL, const uint8 *xmapPtr = NULL); + template static void decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr = NULL); template static void decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth); template static void decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitdepth); -- cgit v1.2.3 From 1f43d9b860b9c1a6d5e62cc261ff5da94b42d50e Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 04:28:07 +0000 Subject: Correct error in decompress16BitWizImage(). svn-id: r41190 --- engines/scumm/he/wiz_he.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 20ff7fa309..8fe2639fbb 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -659,7 +659,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const u code = -xoff; } - dstPtr += dstInc; + dstPtr += dstInc * code; w -= code; } else if (code & 2) { code = (code >> 2) + 1; -- cgit v1.2.3 From f8361b5c53b96faddb56024bb932ce46b7005dbf Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 5 Jun 2009 06:41:04 +0000 Subject: Converted cursor code to use 16-bit. svn-id: r41191 --- engines/scumm/costume.cpp | 2 +- engines/scumm/cursor.cpp | 14 ++++++++++---- engines/scumm/he/wiz_he.cpp | 4 +--- engines/scumm/scumm.h | 5 ++++- 4 files changed, 16 insertions(+), 9 deletions(-) (limited to 'engines') diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index 4358e03a2a..089e7a2fbe 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -876,7 +876,7 @@ void ClassicCostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) void ClassicCostumeRenderer::setPalette(uint16 *palette) { int i; - byte color; + byte color = 0; if (_loaded._format == 0x57) { for (i = 0; i < 13; i++) diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 64829114ca..66dd3807db 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -111,7 +111,13 @@ void ScummEngine_v6::setCursorTransparency(int a) { } void ScummEngine::updateCursor() { - const int transColor = (_game.heversion >= 80) ? 5 : 255; + //HACK Put the 16-bit mapped color, and + //hope no other palette entry shares it + int transColor = (_game.heversion >= 80) ? 5 : 255; + if (_game.features & GF_16BIT_COLOR && _hePalettes) + transColor = READ_LE_UINT16(_hePalettes + 2048 + transColor * 2); + else + transColor = 0; CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), @@ -138,7 +144,7 @@ void ScummEngine::setCursorFromBuffer(const byte *ptr, int width, int height, in uint size; byte *dst; - size = width * height; + size = width * height * _bitDepth; if (size > sizeof(_grabbedCursor)) error("grabCursor: grabbed cursor too big"); @@ -148,8 +154,8 @@ void ScummEngine::setCursorFromBuffer(const byte *ptr, int width, int height, in dst = _grabbedCursor; for (; height; height--) { - memcpy(dst, ptr, width); - dst += width; + memcpy(dst, ptr, width * _bitDepth); + dst += width * _bitDepth; ptr += pitch; } diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 8fe2639fbb..e91eb48cd4 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1800,14 +1800,12 @@ void Wiz::loadWizCursor(int resId, int palette) { } const Common::Rect *r = NULL; - _vm->_bitDepth = 1; uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); - _vm->_bitDepth = (_vm->_game.features & GF_16BIT_COLOR) ? 2 : 1; int32 cw, ch; getWizImageDim(resId, 0, cw, ch); _vm->setCursorHotspot(x, y); - _vm->setCursorFromBuffer(cursor, cw, ch, cw); + _vm->setCursorFromBuffer(cursor, cw, ch, cw * _vm->_bitDepth); // Since we set up cursor palette for default cursor, disable it now CursorMan.disableCursorPalette(true); diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index c4b2ab9e56..5580c4c73d 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -974,7 +974,10 @@ protected: byte animate, animateIndex; int8 state; } _cursor; - byte _grabbedCursor[8192]; + + // HACK Double the array size to handle 16-bit images. + // this should be dynamically allocated based on game depth instead. + byte _grabbedCursor[16384]; byte _currentCursor; byte _newEffect, _switchRoomEffect2, _switchRoomEffect; -- cgit v1.2.3 From 7edfab28d82f4c15bf95ad63d0ce480676f85c62 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 06:47:49 +0000 Subject: Ooops, correct mistakes in commit 41162. svn-id: r41192 --- engines/scumm/costume.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index 089e7a2fbe..39c2f73e88 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -876,15 +876,15 @@ void ClassicCostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) void ClassicCostumeRenderer::setPalette(uint16 *palette) { int i; - byte color = 0; + byte color; if (_loaded._format == 0x57) { for (i = 0; i < 13; i++) - _palette[i] = color; + _palette[i] = palette[i]; } else if (_vm->_game.features & GF_OLD_BUNDLE) { if (_vm->getCurrentLights() & LIGHTMODE_actor_use_colors) { for (i = 0; i < 16; i++) - _palette[i] = color; + _palette[i] = palette[i]; } else { for (i = 0; i < 16; i++) _palette[i] = 8; -- cgit v1.2.3 From 662a305752214564a9db0ac2d61594367067efa1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 07:07:56 +0000 Subject: HACK not required at this point, since transparency color of 5 is still used for 16bit color HE games. svn-id: r41193 --- engines/scumm/cursor.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'engines') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 66dd3807db..957370b8fe 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -111,13 +111,7 @@ void ScummEngine_v6::setCursorTransparency(int a) { } void ScummEngine::updateCursor() { - //HACK Put the 16-bit mapped color, and - //hope no other palette entry shares it int transColor = (_game.heversion >= 80) ? 5 : 255; - if (_game.features & GF_16BIT_COLOR && _hePalettes) - transColor = READ_LE_UINT16(_hePalettes + 2048 + transColor * 2); - else - transColor = 0; CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), -- cgit v1.2.3 From 9789ba7f28d2c0a093adda01435306f28e91fede Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 5 Jun 2009 08:09:37 +0000 Subject: Corrected backend to be able to accept a 16-bit mouseKeyColor without overflow svn-id: r41194 --- engines/scumm/cursor.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 957370b8fe..3710956b74 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -112,10 +112,20 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; - CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, - _cursor.hotspotX, _cursor.hotspotY, - (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), - (_game.heversion == 70 ? 2 : 1)); + if (_game.features & GF_16BIT_COLOR && _hePalettes) { + //HACK Had to make a second method to avoid many, many linker errors from other engines + //this requires ENABLE_16BIT to be defined in the Scumm project, again, because I #ifdef'ed + //the method's definition and declaration in cursorman.h + CursorMan.replaceCursor16(_grabbedCursor, _cursor.width, _cursor.height, + _cursor.hotspotX, _cursor.hotspotY, + (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), + (_game.heversion == 70 ? 2 : 1)); + } else { + CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, + _cursor.hotspotX, _cursor.hotspotY, + (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), + (_game.heversion == 70 ? 2 : 1)); + } } void ScummEngine_v6::grabCursor(int x, int y, int w, int h) { -- cgit v1.2.3 From ccee18a489ece14c499c4e0c43aeb7fc216451fb Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 5 Jun 2009 10:13:19 +0000 Subject: Cleanup. svn-id: r41195 --- engines/scumm/gfx.cpp | 59 +++++++++++++++++++------------------------------ engines/scumm/gfx.h | 8 +++++++ engines/scumm/scumm.cpp | 4 +++- 3 files changed, 34 insertions(+), 37 deletions(-) (limited to 'engines') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 0427e32326..d47301c974 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -231,6 +231,9 @@ GdiV2::~GdiV2() { free(_roomStrips); } +Gdi16Bit::Gdi16Bit(ScummEngine *vm) : Gdi(vm) { +} + void Gdi::init() { _numStrips = _vm->_screenWidth / 8; @@ -2803,12 +2806,8 @@ void Gdi::drawStripHE(byte *dst, int dstPitch, const byte *src, int width, int h int x = width; while (1) { - if (!transpCheck || color != _transparentColor) { - if (_vm->_game.features & GF_16BIT_COLOR) - WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); - else - *dst = _roomPalette[color]; - } + if (!transpCheck || color != _transparentColor) + writeRoomColor(dst, color); dst += _vm->_bitDepth; --x; if (x == 0) { @@ -2896,12 +2895,8 @@ void Gdi::drawStripComplex(byte *dst, int dstPitch, const byte *src, int height, int x = 8; do { FILL_BITS; - if (!transpCheck || color != _transparentColor) { - if (_vm->_game.features & GF_16BIT_COLOR) - WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); - else - *dst = _roomPalette[color] + _paletteMod; - } + if (!transpCheck || color != _transparentColor) + writeRoomColor(dst, color); dst += _vm->_bitDepth; againPos: @@ -2927,12 +2922,8 @@ void Gdi::drawStripComplex(byte *dst, int dstPitch, const byte *src, int height, if (!--height) return; } - if (!transpCheck || color != _transparentColor) { - if (_vm->_game.features & GF_16BIT_COLOR) - WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); - else - *dst = _roomPalette[color] + _paletteMod; - } + if (!transpCheck || color != _transparentColor) + writeRoomColor(dst, color); dst += _vm->_bitDepth; } while (--reps); bits >>= 8; @@ -2956,12 +2947,8 @@ void Gdi::drawStripBasicH(byte *dst, int dstPitch, const byte *src, int height, int x = 8; do { FILL_BITS; - if (!transpCheck || color != _transparentColor) { - if (_vm->_game.features & GF_16BIT_COLOR) - WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); - else - *dst = _roomPalette[color] + _paletteMod; - } + if (!transpCheck || color != _transparentColor) + writeRoomColor(dst, color); dst += _vm->_bitDepth; if (!READ_BIT) { } else if (!READ_BIT) { @@ -2993,12 +2980,8 @@ void Gdi::drawStripBasicV(byte *dst, int dstPitch, const byte *src, int height, int h = height; do { FILL_BITS; - if (!transpCheck || color != _transparentColor) { - if (_vm->_game.features & GF_16BIT_COLOR) - WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); - else - *dst = _roomPalette[color] + _paletteMod; - } + if (!transpCheck || color != _transparentColor) + writeRoomColor(dst, color); dst += dstPitch; if (!READ_BIT) { } else if (!READ_BIT) { @@ -3065,12 +3048,8 @@ void Gdi::drawStripRaw(byte *dst, int dstPitch, const byte *src, int height, con do { for (x = 0; x < 8; x ++) { byte color = *src++; - if (!transpCheck || color != _transparentColor) { - if (_vm->_game.features & GF_16BIT_COLOR) - WRITE_UINT16(dst + x * 2, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); - else - dst[x] = _roomPalette[color] + _paletteMod; - } + if (!transpCheck || color != _transparentColor) + writeRoomColor(dst + x * _vm->_bitDepth, color); } dst += dstPitch; } while (--height); @@ -3193,6 +3172,14 @@ void Gdi::unkDecode11(byte *dst, int dstPitch, const byte *src, int height) cons #undef NEXT_ROW #undef READ_BIT_256 +void Gdi16Bit::writeRoomColor(byte *dst, byte color) const { + WRITE_UINT16(dst, READ_LE_UINT16(_vm->_hePalettes + 2048 + color * 2)); +} + +void Gdi::writeRoomColor(byte *dst, byte color) const { + *dst = _roomPalette[color] + _paletteMod; +} + #pragma mark - #pragma mark --- Transition effects --- diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index 88852c8388..c0f2c2c083 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -215,6 +215,7 @@ protected: void drawStrip3DO(byte *dst, int dstPitch, const byte *src, int height, const bool transpCheck) const; void drawStripHE(byte *dst, int dstPitch, const byte *src, int width, int height, const bool transpCheck) const; + virtual void writeRoomColor(byte *dst, byte color) const; /* Mask decompressors */ void decompressTMSK(byte *dst, const byte *tmsk, const byte *src, int height) const; @@ -361,6 +362,13 @@ public: virtual void roomChanged(byte *roomptr); }; +class Gdi16Bit : public Gdi { +protected: + virtual void writeRoomColor(byte *dst, byte color) const; +public: + Gdi16Bit(ScummEngine *vm); +}; + } // End of namespace Scumm #endif diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 17ffc6e5b0..022eba1e5b 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -109,7 +109,9 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _currentScript(0xFF), // Let debug() work on init stage _messageDialog(0), _pauseDialog(0), _scummMenuDialog(0), _versionDialog(0) { - if (_game.platform == Common::kPlatformNES) { + if (_game.features & GF_16BIT_COLOR) { + _gdi = new Gdi16Bit(this); + } else if (_game.platform == Common::kPlatformNES) { _gdi = new GdiNES(this); } else if (_game.version <= 1) { _gdi = new GdiV1(this); -- cgit v1.2.3 From d65bbe1d7a5efbcf04831dbb68a45ca833db1ae1 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 5 Jun 2009 23:59:40 +0000 Subject: Fixes ScummEngine_v70he::setDefaultCursor to work in 16-bit, using a temporary hack. svn-id: r41204 --- engines/scumm/cursor.cpp | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 3710956b74..5ec9e63e32 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -112,7 +112,7 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; - if (_game.features & GF_16BIT_COLOR && _hePalettes) { + if (_game.features & GF_16BIT_COLOR) { //HACK Had to make a second method to avoid many, many linker errors from other engines //this requires ENABLE_16BIT to be defined in the Scumm project, again, because I #ifdef'ed //the method's definition and declaration in cursorman.h @@ -176,8 +176,13 @@ void ScummEngine_v70he::setDefaultCursor() { static const byte palette[] = {0, 0, 0, 0, 0xff, 0xff, 0xff, 0, 0, 0, 0, 0}; - - memset(_grabbedCursor, 5, sizeof(_grabbedCursor)); + + if (_bitDepth == 2) { + for (i = 0; i < 1024; i++) + WRITE_UINT16(_grabbedCursor + i * 2, 5); + } else { + memset(_grabbedCursor, 5, sizeof(_grabbedCursor)); + } _cursor.hotspotX = _cursor.hotspotY = 2; src = default_he_cursor; @@ -190,10 +195,16 @@ void ScummEngine_v70he::setDefaultCursor() { for (j = 0; j < 32; j++) { switch ((p & (0x3 << 14)) >> 14) { case 1: - _grabbedCursor[32 * i + j] = 0xfe; + if (_bitDepth == 2) + WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[4], palette[5], palette[6])); + else + _grabbedCursor[32 * i + j] = 0xfe; break; case 2: - _grabbedCursor[32 * i + j] = 0xfd; + if (_bitDepth == 2) + WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[0], palette[1], palette[2])); + else + _grabbedCursor[32 * i + j] = 0xfd; break; default: break; @@ -205,9 +216,11 @@ void ScummEngine_v70he::setDefaultCursor() { } } - // Since white color position is not guaranteed - // we setup our own palette if supported by backend - CursorMan.replaceCursorPalette(palette, 0xfd, 3); + if (_bitDepth == 1) { + // Since white color position is not guaranteed + // we setup our own palette if supported by backend + CursorMan.replaceCursorPalette(palette, 0xfd, 3); + } updateCursor(); } -- cgit v1.2.3 From 56e5920bba753820c457c078237a8c06241302ed Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 6 Jun 2009 01:16:04 +0000 Subject: Corrected cursor display errors introduced by revision 41204, reimplemented 16-bit cursor support in a less hacky, but still temporary way. svn-id: r41209 --- engines/scumm/cursor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 5ec9e63e32..bc4a2e0d33 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -116,10 +116,11 @@ void ScummEngine::updateCursor() { //HACK Had to make a second method to avoid many, many linker errors from other engines //this requires ENABLE_16BIT to be defined in the Scumm project, again, because I #ifdef'ed //the method's definition and declaration in cursorman.h - CursorMan.replaceCursor16(_grabbedCursor, _cursor.width, _cursor.height, + CursorMan.replaceCursorReal(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), - (_game.heversion == 70 ? 2 : 1)); + (_game.heversion == 70 ? 2 : 1), + 16); } else { CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, -- cgit v1.2.3 From f379d7fe1a2b261dbdfbd4c152fb2ff8d7f18277 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 6 Jun 2009 07:22:19 +0000 Subject: Add initial support for copyMaskWizImage, to fix videos in later Blue's Clues games. svn-id: r41211 --- engines/scumm/he/animation_he.cpp | 7 +- engines/scumm/he/wiz_he.cpp | 130 ++++++++++++++++++++++++++++++++++---- engines/scumm/he/wiz_he.h | 4 +- 3 files changed, 124 insertions(+), 17 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 5983df2308..92b72bd9be 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -75,9 +75,10 @@ void MoviePlayer::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { if (_vm->_game.features & GF_16BIT_COLOR) { dst += y * pitch + x * 2; do { - for (uint i = 0; i < w; i++) - WRITE_UINT16(dst + i * 2, src[i]); - + for (uint i = 0; i < w; i++) { + uint16 col = READ_LE_UINT16(_vm->_hePalettes + _vm->_hePaletteSlot + 768 + src[i] * 2); + WRITE_UINT16(dst + i * 2, col); + } dst += pitch; src += w; } while (--h); diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 8bc196ee08..9aa2bf741a 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -445,6 +445,93 @@ static void decodeWizMask(uint8 *&dst, uint8 &mask, int w, int maskType) { } } +void Wiz::copyMaskWizImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr) { + Common::Rect srcRect, dstRect; + if (!calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, srcRect, dstRect)) { + return; + } + dst += dstRect.top * dstPitch + dstRect.left * 2; + if (flags & kWIFFlipY) { + const int dy = (srcy < 0) ? srcy : (srch - srcRect.height()); + srcRect.translate(0, dy); + } + if (flags & kWIFFlipX) { + const int dx = (srcx < 0) ? srcx : (srcw - srcRect.width()); + srcRect.translate(dx, 0); + } + + const uint8 *dataPtr, *dataPtrNext; + const uint8 *maskPtr, *maskPtrNext; + uint8 code, *dstPtr, *dstPtrNext; + int h, w, dstInc; + + dataPtr = src; + dstPtr = dst; + maskPtr = mask; + + // Skip over the first 'srcRect->top' lines in the data + dataPtr += dstRect.top * dstPitch + dstRect.left * 2; + + h = dstRect.height(); + w = dstRect.width(); + if (h <= 0 || w <= 0) + return; + + dstInc = 2; + if (flags & kWIFFlipX) { + dstPtr += (w - 1) * 2; + dstInc = -2; + } + + while (h--) { + w = dstRect.width(); + uint16 lineSize = READ_LE_UINT16(maskPtr); maskPtr += 2; + dataPtrNext = dataPtr + dstPitch; + dstPtrNext = dstPtr + dstPitch; + maskPtrNext = maskPtr + lineSize; + if (lineSize != 0) { + while (w > 0) { + code = *maskPtr++; + if (code & 1) { + code >>= 1; + dataPtr += dstInc * code; + dstPtr += dstInc * code; + w -= code; + } else if (code & 2) { + code = (code >> 2) + 1; + w -= code; + if (w < 0) { + code += w; + } + while (code--) { + if (*maskPtr != 5) + write16BitColor(dstPtr, dataPtr, dstType, palPtr); + dataPtr += 2; + dstPtr += dstInc; + } + maskPtr++; + } else { + code = (code >> 2) + 1; + w -= code; + if (w < 0) { + code += w; + } + while (code--) { + if (*maskPtr != 5) + write16BitColor(dstPtr, dataPtr, dstType, palPtr); + dataPtr += 2; + dstPtr += dstInc; + maskPtr++; + } + } + } + } + dataPtr = dataPtrNext; + dstPtr = dstPtrNext; + maskPtr = maskPtrNext; + } +} + void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP) { Common::Rect srcRect, dstRect; if (!calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, srcRect, dstRect)) { @@ -1318,12 +1405,12 @@ void Wiz::displayWizImage(WizImage *pwi) { drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, 0, 0, 0); } else { const Common::Rect *r = NULL; - drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, 0, 0, 0, r, pwi->flags, 0, _vm->getHEPaletteSlot(0)); + drawWizImage(pwi->resNum, pwi->state, 0, 0, pwi->x1, pwi->y1, 0, 0, 0, r, pwi->flags, 0, _vm->getHEPaletteSlot(0)); } } -uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr) { - debug(3, "drawWizImage(resNum %d, x1 %d y1 %d flags 0x%X zorder %d shadow %d field_390 %d dstResNum %d)", resNum, x1, y1, flags, zorder, shadow, field_390, dstResNum); +uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr) { + debug(3, "drawWizImage(resNum %d, state %d maskNum %d maskState %d x1 %d y1 %d flags 0x%X zorder %d shadow %d field_390 %d dstResNum %d)", resNum, state, maskNum, maskState, x1, y1, flags, zorder, shadow, field_390, dstResNum); uint8 *dataPtr; uint8 *dst = NULL; @@ -1348,6 +1435,21 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int uint8 *wizd = _vm->findWrappedBlock(MKID_BE('WIZD'), dataPtr, state, 0); assert(wizd); + uint8 *mask = NULL; + if (maskNum) { + uint8 *maskPtr = _vm->getResourceAddress(rtImage, maskNum); + assert(maskPtr); + + wizh = _vm->findWrappedBlock(MKID_BE('WIZH'), maskPtr, maskState, 0); + assert(wizh); + assert(comp == 2 && READ_LE_UINT32(wizh + 0x0) == 1); + width = READ_LE_UINT32(wizh + 0x4); + height = READ_LE_UINT32(wizh + 0x8); + + mask = _vm->findWrappedBlock(MKID_BE('WIZD'), maskPtr, maskState, 0); + assert(mask); + } + if (flags & kWIFHasPalette) { uint8 *pal = _vm->findWrappedBlock(MKID_BE('RGBS'), dataPtr, state, 0); assert(pal); @@ -1455,7 +1557,11 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int } break; case 2: - copyRaw16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, transColor); + if (maskNum) { + copyMaskWizImage(dst, wizd, mask, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr); + } else { + copyRaw16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, transColor); + } break; case 4: // TODO: Unknown image type @@ -1605,7 +1711,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int debug(0, "drawWizPolygonTransform() unhandled flag 0x800000"); } - srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, shadow, 0, r, flags, 0, _vm->getHEPaletteSlot(palette)); + srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, 0, 0, shadow, 0, r, flags, 0, _vm->getHEPaletteSlot(palette)); } else { assert(_vm->_bitDepth == 1); uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); @@ -1616,7 +1722,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int } } else { if (getWizImageData(resNum, state, 0) != 0) { - srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, shadow, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); + srcWizBuf = drawWizImage(resNum, state, 0, 0, 0, 0, 0, shadow, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); } else { uint8 *dataPtr = _vm->getResourceAddress(rtImage, resNum); assert(dataPtr); @@ -1779,7 +1885,7 @@ void Wiz::flushWizBuffer() { drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, pwi->shadow, 0, pwi->palette); } else { const Common::Rect *r = NULL; - drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, pwi->zorder, pwi->shadow, pwi->field_390, r, pwi->flags, 0, _vm->getHEPaletteSlot(pwi->palette)); + drawWizImage(pwi->resNum, pwi->state, 0, 0, pwi->x1, pwi->y1, pwi->zorder, pwi->shadow, pwi->field_390, r, pwi->flags, 0, _vm->getHEPaletteSlot(pwi->palette)); } } _imagesNum = 0; @@ -1800,7 +1906,7 @@ void Wiz::loadWizCursor(int resId, int palette) { } const Common::Rect *r = NULL; - uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); + uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); int32 cw, ch; getWizImageDim(resId, 0, cw, ch); @@ -1817,8 +1923,7 @@ void Wiz::displayWizComplexImage(const WizParameters *params) { int sourceImage = 0; if (params->processFlags & kWPFMaskImg) { sourceImage = params->sourceImage; - debug(3, "displayWizComplexImage() unhandled flag kWPFMaskImg"); - return; + debug(0, "displayWizComplexImage() flag kWPFMaskImg"); } int palette = 0; if (params->processFlags & kWPFPaletteNum) { @@ -1886,15 +1991,14 @@ void Wiz::displayWizComplexImage(const WizParameters *params) { ++_imagesNum; } else { if (sourceImage != 0) { - // TODO: Add support for kWPFMaskImg - drawWizImage(params->sourceImage, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); + drawWizImage(params->sourceImage, 0, params->img.resNum, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); } else if (params->processFlags & (kWPFScaled | kWPFRotate)) { drawWizComplexPolygon(params->img.resNum, state, po_x, po_y, shadow, rotationAngle, scale, r, flags, dstResNum, palette); } else { if (flags & kWIFIsPolygon) { drawWizPolygon(params->img.resNum, state, po_x, flags, shadow, dstResNum, palette); } else { - drawWizImage(params->img.resNum, state, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); + drawWizImage(params->img.resNum, state, 0, 0, po_x, po_y, params->img.zorder, shadow, field_390, r, flags, dstResNum, _vm->getHEPaletteSlot(palette)); } } } diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index 4a5dd74e38..5c5daa5974 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -201,11 +201,13 @@ public: void displayWizImage(WizImage *pwi); void processWizImage(const WizParameters *params); - uint8 *drawWizImage(int resNum, int state, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr); + uint8 *drawWizImage(int resNum, int state, int maskNum, int maskState, int x1, int y1, int zorder, int shadow, int field_390, const Common::Rect *clipBox, int flags, int dstResNum, const uint8 *palPtr); void drawWizPolygon(int resNum, int state, int id, int flags, int shadow, int dstResNum, int palette); void drawWizComplexPolygon(int resNum, int state, int po_x, int po_y, int shadow, int angle, int zoom, const Common::Rect *r, int flags, int dstResNum, int palette); void drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int flags, int shadow, int dstResNum, int palette); + static void copyMaskWizImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr); + static void copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, uint8 bitdepth); static void copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP); static void copyWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth); -- cgit v1.2.3 From 58a348fd18727aab57c0f4f8ab4cc5ad893ee795 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Wed, 10 Jun 2009 05:35:54 +0000 Subject: Scumm engine now dynamically requests 16-bit color based on game features, (using ad-hoc request format) svn-id: r41417 --- engines/engine.cpp | 14 +++++++++++++- engines/engine.h | 6 ++++++ engines/scumm/scumm.cpp | 6 ++++++ 3 files changed, 25 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 269bb0bc28..4be4fe90be 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -124,11 +124,23 @@ void initCommonGFX(bool defaultTo1XScaler) { if (gameDomain && gameDomain->contains("fullscreen")) g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); } - void initGraphics(int width, int height, bool defaultTo1xScaler) { +#ifdef ENABLE_16BIT + Common::List formatList; + formatList.push_back(Graphics::kFormat8Bit); + initGraphics(width,height,defaultTo1xScaler, formatList); +} +void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList) { +#endif + g_system->beginGFXTransaction(); initCommonGFX(defaultTo1xScaler); +#ifdef ENABLE_16BIT + Graphics::ColorFormat format = g_system->findCompatibleFormat(formatList); + debug("%X",format); //TODO: set up the pixelFormat here + g_system->initFormat(format); +#endif g_system->initSize(width, height); OSystem::TransactionError gfxError = g_system->endGFXTransaction(); diff --git a/engines/engine.h b/engines/engine.h index 45477f408d..8538cc779f 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -29,6 +29,9 @@ #include "common/error.h" #include "common/fs.h" #include "common/str.h" +#ifdef ENABLE_16BIT +#include "graphics/pixelformat.h" +#endif class OSystem; @@ -59,6 +62,9 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ +#ifdef ENABLE_16BIT +void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); +#endif void initGraphics(int width, int height, bool defaultTo1xScaler); /** diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 0599139778..3d0a2d0bc2 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1083,6 +1083,12 @@ Common::Error ScummEngine::init() { // CJK FT and DIG use usual NUT fonts, not FM-TOWNS ROM, so // there is no text surface for them. This takes that into account (_screenWidth * _textSurfaceMultiplier > 320)); + } else if (_game.features & GF_16BIT_COLOR) { + int format = Graphics::kFormatRGB555 | Graphics::kFormatRGB; + Common::List formatList; + formatList.push_back((Graphics::ColorFormat) format); + formatList.push_back(Graphics::kFormat8Bit); + initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, formatList); } else { initGraphics(_screenWidth, _screenHeight, _screenWidth > 320); } -- cgit v1.2.3 From 8a8366aab5ee33857a0574aac6675f27912388c3 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 10 Jun 2009 06:05:11 +0000 Subject: Correct horizontal flipping in decompressWizImage(), when using 16bit color. svn-id: r41418 --- engines/scumm/he/wiz_he.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 9aa2bf741a..4661bb649c 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -858,7 +858,7 @@ void Wiz::decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 dstInc = bitDepth; if (flags & kWIFFlipX) { dstPtr += (w - 1) * bitDepth; - dstInc = -1; + dstInc = -bitDepth; } while (h--) { -- cgit v1.2.3 From 6adbd0c41e79b5a21f0430e060347d4978e9ce78 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Thu, 11 Jun 2009 05:56:00 +0000 Subject: Renamed Graphics::ColorFormat to Graphics::ColorMode, streamlined enum by removing order section and temporarily removing kFormatARGB1555 Converted cursor code to make use of _screenFormat, instead of a parameter passed directly to it by the engine. Adjusted scumm engine to account for these changes. This should probably have been two separate commits, but the changes concern the same files... svn-id: r41443 --- engines/engine.cpp | 17 +++++++++++++---- engines/engine.h | 2 +- engines/scumm/cursor.cpp | 19 ++++--------------- engines/scumm/scumm.cpp | 10 ++++++---- 4 files changed, 24 insertions(+), 24 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 4be4fe90be..31ead2df1a 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -126,18 +126,18 @@ void initCommonGFX(bool defaultTo1XScaler) { } void initGraphics(int width, int height, bool defaultTo1xScaler) { #ifdef ENABLE_16BIT - Common::List formatList; - formatList.push_back(Graphics::kFormat8Bit); + Common::List formatList; + formatList.push_back(Graphics::kFormatCLUT8); initGraphics(width,height,defaultTo1xScaler, formatList); } -void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList) { +void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList) { #endif g_system->beginGFXTransaction(); initCommonGFX(defaultTo1xScaler); #ifdef ENABLE_16BIT - Graphics::ColorFormat format = g_system->findCompatibleFormat(formatList); + Graphics::ColorMode format = g_system->findCompatibleFormat(formatList); debug("%X",format); //TODO: set up the pixelFormat here g_system->initFormat(format); #endif @@ -161,6 +161,15 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); +void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); #endif void initGraphics(int width, int height, bool defaultTo1xScaler); diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index bc4a2e0d33..fcde07cbdf 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -112,21 +112,10 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; - if (_game.features & GF_16BIT_COLOR) { - //HACK Had to make a second method to avoid many, many linker errors from other engines - //this requires ENABLE_16BIT to be defined in the Scumm project, again, because I #ifdef'ed - //the method's definition and declaration in cursorman.h - CursorMan.replaceCursorReal(_grabbedCursor, _cursor.width, _cursor.height, - _cursor.hotspotX, _cursor.hotspotY, - (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), - (_game.heversion == 70 ? 2 : 1), - 16); - } else { - CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, - _cursor.hotspotX, _cursor.hotspotY, - (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), - (_game.heversion == 70 ? 2 : 1)); - } + CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, + _cursor.hotspotX, _cursor.hotspotY, + (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), + (_game.heversion == 70 ? 2 : 1)); } void ScummEngine_v6::grabCursor(int x, int y, int w, int h) { diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 3d0a2d0bc2..0ebf832a37 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1083,12 +1083,14 @@ Common::Error ScummEngine::init() { // CJK FT and DIG use usual NUT fonts, not FM-TOWNS ROM, so // there is no text surface for them. This takes that into account (_screenWidth * _textSurfaceMultiplier > 320)); +#ifdef ENABLE_16BIT } else if (_game.features & GF_16BIT_COLOR) { - int format = Graphics::kFormatRGB555 | Graphics::kFormatRGB; - Common::List formatList; - formatList.push_back((Graphics::ColorFormat) format); - formatList.push_back(Graphics::kFormat8Bit); + int format = Graphics::kFormatRGB555; + Common::List formatList; + formatList.push_back((Graphics::ColorMode) format); + formatList.push_back(Graphics::kFormatCLUT8); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, formatList); +#endif } else { initGraphics(_screenWidth, _screenHeight, _screenWidth > 320); } -- cgit v1.2.3 From 2ee51a8fa189fc7817fd6d78533664ec870fca48 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 12 Jun 2009 08:49:45 +0000 Subject: Unfinished proof of concept regarding my compromise with LordHoto in IRC. svn-id: r41464 --- engines/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 31ead2df1a..7ddc286b0f 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -139,7 +139,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Common::ListfindCompatibleFormat(formatList); debug("%X",format); //TODO: set up the pixelFormat here - g_system->initFormat(format); + g_system->initFormat(g_system->getPixelFormat(format)); #endif g_system->initSize(width, height); -- cgit v1.2.3 From 350dc4290fd5dd8f28af9e63713b48ef2c131f09 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 13 Jun 2009 10:24:52 +0000 Subject: Fixed cursor code to keep track of cursor formats so that ThemeEngine and/or GuiManager cursors will render properly over the game (on spacebar hit, for instance) svn-id: r41491 --- engines/scumm/cursor.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index fcde07cbdf..30483a638c 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -112,6 +112,9 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; +#ifdef ENABLE_16BIT + CursorMan.replaceCursorFormat(_system->getScreenFormat()); +#endif CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), -- cgit v1.2.3 From e6f874ee9508a6631635504808680e50a4f55c7f Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 13 Jun 2009 13:59:41 +0000 Subject: Fix possible endian issues. svn-id: r41494 --- engines/scumm/he/wiz_he.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 4661bb649c..deaf7aaf72 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1152,7 +1152,10 @@ static int wizPackType2(uint8 *dst, const uint8 *src, int srcPitch, const Common if (dst) { src += rCapt.top * srcPitch + rCapt.left * 2; while (h--) { - memcpy(dst, src, w * 2); + for (int i = 0; i < w; i++) { + uint16 col = READ_UINT16(src + w * 2); + WRITE_LE_UINT16(dst + w * 2, col); + } dst += w * 2; src += srcPitch; } @@ -1734,7 +1737,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int if (srcWizBuf) { uint8 *dst; - int32 dstw, dsth, dstpitch, wizW, wizH; + int32 dstw, dsth, dstpitch, dstType, wizW, wizH; VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; int transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; @@ -1745,6 +1748,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int assert(dst); getWizImageDim(dstResNum, 0, dstw, dsth); dstpitch = dstw * _vm->_bitDepth; + dstType = kDstResource; } else { if (flags & kWIFMarkBufferDirty) { dst = pvs->getPixels(0, 0); @@ -1754,6 +1758,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int dstw = pvs->w; dsth = pvs->h; dstpitch = pvs->pitch; + dstType = kDstScreen; } getWizImageDim(resNum, state, wizW, wizH); @@ -1857,7 +1862,7 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int y_acc += pra->y_step; if (_vm->_bitDepth == 2) { if (transColor == -1 || transColor != READ_LE_UINT16(srcWizBuf + src_offs * 2)) - WRITE_LE_UINT16(dstPtr, READ_LE_UINT16(srcWizBuf + src_offs * 2)); + writeColor(dstPtr, dstType, READ_LE_UINT16(srcWizBuf + src_offs * 2)); } else { if (transColor == -1 || transColor != srcWizBuf[src_offs]) *dstPtr = srcWizBuf[src_offs]; -- cgit v1.2.3 From 8d306ebccfa7e88b2e4f4635bff3987e550f98d3 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 15 Jun 2009 09:45:19 +0000 Subject: Added kUnsupportedColorMode error code brought Scumm engine and SDL backend into compliance with API outlined in http://scummvmupthorn09.wordpress.com/2009/06/14/how-this-is-going-to-work/ Provided convenient Graphics::PixelFormat constructors for ColorMode enums, and bitformat integers. Removed last vestiges (I think) of initial cursor hack. svn-id: r41539 --- engines/engine.cpp | 17 +++++++---------- engines/engine.h | 2 +- engines/scumm/scumm.cpp | 9 ++++----- 3 files changed, 12 insertions(+), 16 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 7ddc286b0f..213f69e7b1 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -126,20 +126,17 @@ void initCommonGFX(bool defaultTo1XScaler) { } void initGraphics(int width, int height, bool defaultTo1xScaler) { #ifdef ENABLE_16BIT - Common::List formatList; - formatList.push_back(Graphics::kFormatCLUT8); - initGraphics(width,height,defaultTo1xScaler, formatList); + Graphics::PixelFormat format = Graphics::kFormatCLUT8; + initGraphics(width,height,defaultTo1xScaler, format); } -void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList) { +void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format) { #endif g_system->beginGFXTransaction(); initCommonGFX(defaultTo1xScaler); #ifdef ENABLE_16BIT - Graphics::ColorMode format = g_system->findCompatibleFormat(formatList); - debug("%X",format); //TODO: set up the pixelFormat here - g_system->initFormat(g_system->getPixelFormat(format)); + g_system->initFormat(format); #endif g_system->initSize(width, height); @@ -161,16 +158,16 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Common::List formatList); +void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format); #endif void initGraphics(int width, int height, bool defaultTo1xScaler); diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 0ebf832a37..5fec6ec835 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1085,11 +1085,10 @@ Common::Error ScummEngine::init() { (_screenWidth * _textSurfaceMultiplier > 320)); #ifdef ENABLE_16BIT } else if (_game.features & GF_16BIT_COLOR) { - int format = Graphics::kFormatRGB555; - Common::List formatList; - formatList.push_back((Graphics::ColorMode) format); - formatList.push_back(Graphics::kFormatCLUT8); - initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, formatList); + Graphics::PixelFormat format = Graphics::kFormatRGB555; + initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, format); + if (format != _system->getScreenFormat()) + return Common::kUnsupportedColorMode; #endif } else { initGraphics(_screenWidth, _screenHeight, _screenWidth > 320); -- cgit v1.2.3 From c97bfd16f94873a437cb92a30ebd11879f114e0c Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 15 Jun 2009 10:10:22 +0000 Subject: made Graphics::PixelFormat(ColorMode) constructor explicit, removed Graphics::PixelFormat(int bitFormat) constructor that was never really implemented anyway svn-id: r41540 --- engines/engine.cpp | 2 +- engines/scumm/scumm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 213f69e7b1..77ce7c44ad 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -126,7 +126,7 @@ void initCommonGFX(bool defaultTo1XScaler) { } void initGraphics(int width, int height, bool defaultTo1xScaler) { #ifdef ENABLE_16BIT - Graphics::PixelFormat format = Graphics::kFormatCLUT8; + Graphics::PixelFormat format(Graphics::kFormatCLUT8); initGraphics(width,height,defaultTo1xScaler, format); } void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format) { diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 5fec6ec835..9469a15e54 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1085,7 +1085,7 @@ Common::Error ScummEngine::init() { (_screenWidth * _textSurfaceMultiplier > 320)); #ifdef ENABLE_16BIT } else if (_game.features & GF_16BIT_COLOR) { - Graphics::PixelFormat format = Graphics::kFormatRGB555; + Graphics::PixelFormat format(Graphics::kFormatRGB555); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, format); if (format != _system->getScreenFormat()) return Common::kUnsupportedColorMode; -- cgit v1.2.3 From dcc5e26cab7ea7f24cfe3ac972355e2789aa67d9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 15 Jun 2009 11:37:07 +0000 Subject: Fix compilation svn-id: r41542 --- engines/cine/pal.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/cine/pal.h b/engines/cine/pal.h index f59dee53df..fd0ea8587b 100644 --- a/engines/cine/pal.h +++ b/engines/cine/pal.h @@ -36,7 +36,8 @@ namespace Cine { #define kLowPalNumBytes ((kLowPalNumColors) * (kLowPalBytesPerColor)) /*! \brief Low resolution (9-bit) color format used in Cine's 16-color modes. */ -static const Graphics::PixelFormat kLowPalFormat = {kLowPalBytesPerColor, 5, 5, 5, 8, 8, 4, 0, 0}; + static const Graphics::PixelFormat kLowPalFormat(kLowPalBytesPerColor, 5, 5, 5, 8, 8, 4, 0, 0); + // Constants related to kHighPalFormat #define kHighPalBytesPerColor 3 @@ -44,10 +45,10 @@ static const Graphics::PixelFormat kLowPalFormat = {kLowPalBytesPerColor, 5, 5, #define kHighPalNumBytes ((kHighPalNumColors) * (kHighPalBytesPerColor)) /*! \brief High resolution (24-bit) color format used in Cine's 256-color modes. */ -static const Graphics::PixelFormat kHighPalFormat = {kHighPalBytesPerColor, 0, 0, 0, 8, 0, 8, 16, 0}; +static const Graphics::PixelFormat kHighPalFormat(kHighPalBytesPerColor, 0, 0, 0, 8, 0, 8, 16, 0); /*! \brief The color format used by OSystem's setPalette-function. */ -static const Graphics::PixelFormat kSystemPalFormat = {4, 0, 0, 0, 8, 0, 8, 16, 0}; +static const Graphics::PixelFormat kSystemPalFormat(4, 0, 0, 0, 8, 0, 8, 16, 0); /*! \brief Endian types. Used at least by Palette class's load and save functions. * TODO: Move somewhere more general as this is definitely not Cine-engine specific -- cgit v1.2.3 From e74ba9af6b95c70cdcdbcf700e0964bf0be0fca1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 15 Jun 2009 13:23:26 +0000 Subject: Add error if user attempt to play HE games using 16bit color, when 16bit support is disabled. svn-id: r41544 --- engines/scumm/scumm.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 9469a15e54..98da55d428 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1083,12 +1083,14 @@ Common::Error ScummEngine::init() { // CJK FT and DIG use usual NUT fonts, not FM-TOWNS ROM, so // there is no text surface for them. This takes that into account (_screenWidth * _textSurfaceMultiplier > 320)); -#ifdef ENABLE_16BIT } else if (_game.features & GF_16BIT_COLOR) { +#ifdef ENABLE_16BIT Graphics::PixelFormat format(Graphics::kFormatRGB555); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, format); if (format != _system->getScreenFormat()) return Common::kUnsupportedColorMode; +#else + error("16bit color support is required for this game"); #endif } else { initGraphics(_screenWidth, _screenHeight, _screenWidth > 320); -- cgit v1.2.3 From 3d9d542908323c3d0ce545589e5532175eda9063 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 15 Jun 2009 13:50:41 +0000 Subject: Fix compilation of SCI engine svn-id: r41546 --- engines/sci/gfx/gfx_driver.cpp | 2 +- engines/sci/gfx/res_pic.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index 961eecc6fd..42be711499 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -36,7 +36,7 @@ namespace Sci { GfxDriver::GfxDriver(int xfact, int yfact, int bytespp) { int i; - Graphics::PixelFormat format = { bytespp, 0, 0, 0, 0, 0, 0, 0, 0 }; + Graphics::PixelFormat format(bytespp, 0, 0, 0, 0, 0, 0, 0, 0); _mode = gfx_new_mode(xfact, yfact, format, new Palette(256), 0); _mode->xsize = xfact * 320; _mode->ysize = yfact * 200; diff --git a/engines/sci/gfx/res_pic.cpp b/engines/sci/gfx/res_pic.cpp index 9279de20f4..bb9e8a75a7 100644 --- a/engines/sci/gfx/res_pic.cpp +++ b/engines/sci/gfx/res_pic.cpp @@ -1548,7 +1548,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, view->index_height = CLIP(view->index_height, 0, portBounds.height()); // Set up mode structure for resizing the view - Graphics::PixelFormat format = { 1, 0, 0, 0, 0, 0, 0, 0, 0 }; // 1byte/p, which handles masks and the rest for us + Graphics::PixelFormat format(1, 0, 0, 0, 0, 0, 0, 0, 0); // 1byte/p, which handles masks and the rest for us gfx_mode_t *mode = gfx_new_mode(pic->visual_map->index_width / 320, pic->visual_map->index_height / 200, format, view->palette, 0); @@ -1654,7 +1654,7 @@ void gfxr_draw_pic11(gfxr_pic_t *pic, int flags, int default_palette, int size, view->palette = pic->visual_map->palette->getref(); // Set up mode structure for resizing the view - Graphics::PixelFormat format = { 1, 0, 0, 0, 0, 0, 0, 0, 0 }; // 1 byte/p, which handles masks and the rest for us + Graphics::PixelFormat format(1, 0, 0, 0, 0, 0, 0, 0, 0); // 1 byte/p, which handles masks and the rest for us gfx_mode_t *mode = gfx_new_mode(pic->visual_map->index_width / 320, pic->visual_map->index_height / 200, format, view->palette, 0); gfx_xlate_pixmap(view, mode, GFX_XLATE_FILTER_NONE); -- cgit v1.2.3 From e1c93e7342770f052bc0aecf4aab760e7008bb65 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 17 Jun 2009 22:34:44 +0000 Subject: Groovie: Initial support for 16bit screen surfaces svn-id: r41615 --- engines/groovie/groovie.cpp | 12 +++++++++- engines/groovie/groovie.h | 3 +++ engines/groovie/roq.cpp | 53 ++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 62 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 6e18b86062..5d89799648 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -70,7 +70,17 @@ GroovieEngine::~GroovieEngine() { Common::Error GroovieEngine::run() { // Initialize the graphics - initGraphics(640, 480, true); + switch (_gameDescription->version) { + case kGroovieV2: +#ifdef ENABLE_16BIT + _pixelFormat = _system->getBestFormat(); + initGraphics(640, 480, true, _pixelFormat); + break; +#endif + case kGroovieT7G: + initGraphics(640, 480, true); + break; + } // Create debugger. It requires GFX to be initialized _debugger = new Debugger(this); diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h index a137193adf..adc6986a87 100644 --- a/engines/groovie/groovie.h +++ b/engines/groovie/groovie.h @@ -85,6 +85,9 @@ protected: public: void waitForInput(); +#ifdef ENABLE_16BIT + Graphics::PixelFormat _pixelFormat; +#endif Script _script; ResMan *_resMan; GrvCursorMan *_grvCursorMan; diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 28d0d23fc1..95acb64f6a 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -29,6 +29,10 @@ #include "groovie/groovie.h" #include "groovie/roq.h" +#ifdef ENABLE_16BIT +// Required for the YUV to RGB conversion +#include "graphics/dither.h" +#endif #include "sound/mixer.h" namespace Groovie { @@ -43,6 +47,7 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) : _currBuf = new Graphics::Surface(); _prevBuf = new Graphics::Surface(); +#ifndef ENABLE_16BIT byte pal[256 * 4]; #ifdef DITHER byte pal3[256 * 3]; @@ -77,16 +82,17 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) : pal[(i * 4) + 1] = pal3[(i * 3) + 1]; pal[(i * 4) + 2] = pal3[(i * 3) + 2]; } -#else +#else // !DITHER // Set a grayscale palette for (int i = 0; i < 256; i++) { pal[(i * 4) + 0] = i; pal[(i * 4) + 1] = i; pal[(i * 4) + 2] = i; } -#endif +#endif // DITHER _syst->setPalette(pal, 0, 256); +#endif // !ENABLE_16BIT } ROQPlayer::~ROQPlayer() { @@ -154,13 +160,26 @@ void ROQPlayer::buildShowBuf() { byte *out = (byte *)_showBuf.getBasePtr(0, line); byte *in = (byte *)_prevBuf->getBasePtr(0, line / _scaleY); for (int x = 0; x < _showBuf.w; x++) { +#ifdef ENABLE_16BIT + // Do the format conversion (YUV -> RGB -> Screen format) + byte r, g, b; + Graphics::PaletteLUT::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); + // FIXME: this is fixed to 16bit + *(uint16 *)out = (uint16)_vm->_pixelFormat.RGBToColor(r, g, b); + + // Skip to the next pixel + out += _vm->_pixelFormat.bytesPerPixel; +#else // !ENABLE_16BIT #ifdef DITHER *out = _dither->dither(*in, *(in + 1), *(in + 2), x); #else // Just use the luminancy component *out = *in; -#endif +#endif // DITHER + // Skip to the next pixel out++; +#endif // ENABLE_16BIT + if (!(x % _scaleX)) in += _prevBuf->bytesPerPixel; } @@ -189,7 +208,7 @@ bool ROQPlayer::playFrameInternal() { if (_dirty) { // Update the screen - _syst->copyRectToScreen((byte *)_showBuf.getBasePtr(0, 0), _showBuf.w, 0, (_syst->getHeight() - _showBuf.h) / 2, _showBuf.pitch, _showBuf.h); + _syst->copyRectToScreen((byte *)_showBuf.getBasePtr(0, 0), _showBuf.pitch, 0, (_syst->getHeight() - _showBuf.h) / 2, _showBuf.w, _showBuf.h); _syst->updateScreen(); // Clear the dirty flag @@ -316,7 +335,23 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) { // Allocate new buffers _currBuf->create(width, height, 3); _prevBuf->create(width, height, 3); +#ifdef ENABLE_16BIT + _showBuf.create(width * _scaleX, height * _scaleY, _vm->_pixelFormat.bytesPerPixel); +#else _showBuf.create(width * _scaleX, height * _scaleY, 1); +#endif + + // Clear the buffers with black YUV values + byte *ptr1 = (byte *)_currBuf->getBasePtr(0, 0); + byte *ptr2 = (byte *)_prevBuf->getBasePtr(0, 0); + for (int i = 0; i < width * height; i++) { + *ptr1++ = 0; + *ptr1++ = 128; + *ptr1++ = 128; + *ptr2++ = 0; + *ptr2++ = 128; + *ptr2++ = 128; + } #ifdef DITHER // Reset the dithering algorithm with the new width @@ -456,7 +491,15 @@ bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) { debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::ROQ: Processing still (JPEG) block"); warning("Groovie::ROQ: JPEG frame (unimplemented)"); - memset(_prevBuf->getBasePtr(0, 0), 0, _prevBuf->w * _prevBuf->h * _prevBuf->bytesPerPixel); + + // HACK: Initialize to a black frame + //memset(_prevBuf->getBasePtr(0, 0), 0, _prevBuf->w * _prevBuf->h * _prevBuf->bytesPerPixel); + byte *ptr = (byte *)_prevBuf->getBasePtr(0, 0); + for (int i = 0; i < _prevBuf->w * _prevBuf->h; i++) { + *ptr++ = 0; + *ptr++ = 128; + *ptr++ = 128; + } _file->skip(blockHeader.size); return true; -- cgit v1.2.3 From 68cb22d4a95060bcba9b5a44508bc4ab57cb47ed Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 18 Jun 2009 01:13:42 +0000 Subject: Fix regression, caused by typo in my last commit. svn-id: r41621 --- engines/scumm/he/wiz_he.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index deaf7aaf72..b2e367719e 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1152,10 +1152,8 @@ static int wizPackType2(uint8 *dst, const uint8 *src, int srcPitch, const Common if (dst) { src += rCapt.top * srcPitch + rCapt.left * 2; while (h--) { - for (int i = 0; i < w; i++) { - uint16 col = READ_UINT16(src + w * 2); - WRITE_LE_UINT16(dst + w * 2, col); - } + for (int i = 0; i < w; i++) + WRITE_LE_UINT16(dst + i * 2, READ_UINT16(src + i * 2)); dst += w * 2; src += srcPitch; } -- cgit v1.2.3 From b8a9823f4e868a98ae85862eb457b6d4e7cffe1c Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 18 Jun 2009 06:10:13 +0000 Subject: Fix regression in scrolling rooms. svn-id: r41624 --- engines/scumm/gfx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h index c0f2c2c083..0910d9bc59 100644 --- a/engines/scumm/gfx.h +++ b/engines/scumm/gfx.h @@ -155,11 +155,11 @@ struct VirtScreen : Graphics::Surface { } byte *getPixels(int x, int y) const { - return (byte *)pixels + y * pitch + (xstart * 2 + x) * bytesPerPixel; + return (byte *)pixels + y * pitch + (xstart + x) * bytesPerPixel; } byte *getBackPixels(int x, int y) const { - return (byte *)backBuf + y * pitch + (xstart * 2 + x) * bytesPerPixel; + return (byte *)backBuf + y * pitch + (xstart + x) * bytesPerPixel; } }; -- cgit v1.2.3 From 7123fbdd7095257c9c23102f7d86d2c8cf21cfd0 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 18 Jun 2009 07:12:53 +0000 Subject: Merged revisions 41625 via svnmerge from https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk ........ r41625 | Kirben | 2009-06-18 16:18:31 +1000 (Thu, 18 Jun 2009) | 1 line Correct actor layering method in HE90+ games. ........ svn-id: r41626 --- engines/scumm/actor.cpp | 16 ++++++++++++++++ engines/scumm/he/script_v100he.cpp | 3 +-- engines/scumm/he/script_v72he.cpp | 3 +-- 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index f3c8e2ff6b..52866279b8 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -1348,6 +1348,22 @@ void ScummEngine::processActors() { } } } + } else if (_game.heversion >= 90) { + for (int j = 0; j < numactors; ++j) { + for (int i = 0; i < numactors; ++i) { + int sc_actor1 = _sortedActors[j]->_layer; + int sc_actor2 = _sortedActors[i]->_layer; + if (sc_actor1 < sc_actor2) { + SWAP(_sortedActors[i], _sortedActors[j]); + } else if (sc_actor1 == sc_actor2) { + sc_actor1 = _sortedActors[j]->getPos().y; + sc_actor2 = _sortedActors[i]->getPos().y; + if (sc_actor1 < sc_actor2) { + SWAP(_sortedActors[i], _sortedActors[j]); + } + } + } + } } else { for (int j = 0; j < numactors; ++j) { for (int i = 0; i < numactors; ++i) { diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index fc27c338b2..60db9adefb 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -420,8 +420,7 @@ void ScummEngine_v100he::o100_actorOps() { a->_needRedraw = true; break; case 59: - // HE games use reverse order of layering, so we adjust - a->_layer = -pop(); + a->_layer = pop(); a->_needRedraw = true; break; case 63: diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 049fb13cd2..3c55818ece 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -770,8 +770,7 @@ void ScummEngine_v72he::o72_actorOps() { a->setTalkCondition(k); break; case 43: // HE 90+ - // HE games use reverse order of layering, so we adjust - a->_layer = -pop(); + a->_layer = pop(); a->_needRedraw = true; break; case 64: -- cgit v1.2.3 From 704386d3b09b68f96b6d4160a1a261e3e754f461 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 19 Jun 2009 09:28:55 +0000 Subject: Removed replaced Graphics::ColorMode enum type with factory methods for Graphics::PixelFormat. svn-id: r41662 --- engines/engine.cpp | 3 +-- engines/scumm/scumm.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 77ce7c44ad..fdf0186a89 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -126,8 +126,7 @@ void initCommonGFX(bool defaultTo1XScaler) { } void initGraphics(int width, int height, bool defaultTo1xScaler) { #ifdef ENABLE_16BIT - Graphics::PixelFormat format(Graphics::kFormatCLUT8); - initGraphics(width,height,defaultTo1xScaler, format); + initGraphics(width,height,defaultTo1xScaler, Graphics::PixelFormat::createFormatCLUT8()); } void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format) { #endif diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 98da55d428..75a03aae0f 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1085,7 +1085,7 @@ Common::Error ScummEngine::init() { (_screenWidth * _textSurfaceMultiplier > 320)); } else if (_game.features & GF_16BIT_COLOR) { #ifdef ENABLE_16BIT - Graphics::PixelFormat format(Graphics::kFormatRGB555); + Graphics::PixelFormat format = Graphics::PixelFormat::createFormatRGB555(); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, format); if (format != _system->getScreenFormat()) return Common::kUnsupportedColorMode; -- cgit v1.2.3 From f7dd1c15ed38418a0371032966144eb6c2e004cb Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 20 Jun 2009 05:23:09 +0000 Subject: renamed ENABLE_16BIT define to more accurate ENABLE_RGB_COLOR svn-id: r41696 --- engines/engine.cpp | 6 +++--- engines/engine.h | 4 ++-- engines/scumm/cursor.cpp | 2 +- engines/scumm/scumm.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index fdf0186a89..15c6820f22 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -125,7 +125,7 @@ void initCommonGFX(bool defaultTo1XScaler) { g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); } void initGraphics(int width, int height, bool defaultTo1xScaler) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR initGraphics(width,height,defaultTo1xScaler, Graphics::PixelFormat::createFormatCLUT8()); } void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format) { @@ -134,7 +134,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::Pixel g_system->beginGFXTransaction(); initCommonGFX(defaultTo1xScaler); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR g_system->initFormat(format); #endif g_system->initSize(width, height); @@ -158,7 +158,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::Pixel } // Just show warnings then these occur: -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR if (gfxError & OSystem::kTransactionPixelFormatNotSupported) { Common::String message = "Could not initialize color format."; diff --git a/engines/engine.h b/engines/engine.h index 1ea1b70b5d..864450d6e1 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -29,7 +29,7 @@ #include "common/error.h" #include "common/fs.h" #include "common/str.h" -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR #include "graphics/pixelformat.h" #endif @@ -62,7 +62,7 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format); #endif void initGraphics(int width, int height, bool defaultTo1xScaler); diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 30483a638c..5c695e58a5 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -112,7 +112,7 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR CursorMan.replaceCursorFormat(_system->getScreenFormat()); #endif CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 75a03aae0f..cab8db2d45 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1084,7 +1084,7 @@ Common::Error ScummEngine::init() { // there is no text surface for them. This takes that into account (_screenWidth * _textSurfaceMultiplier > 320)); } else if (_game.features & GF_16BIT_COLOR) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat format = Graphics::PixelFormat::createFormatRGB555(); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, format); if (format != _system->getScreenFormat()) -- cgit v1.2.3 From f1b05956310621c43c386fc1097f0651b985cfc8 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 21 Jun 2009 14:43:06 +0000 Subject: Add initial support for captureWizPolygon. svn-id: r41728 --- engines/scumm/he/wiz_he.cpp | 380 +++++++++++++++++++++++++++----------------- engines/scumm/he/wiz_he.h | 3 + 2 files changed, 236 insertions(+), 147 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index b2e367719e..5fbc12626e 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1305,7 +1305,11 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in } else { src = pvs->getPixels(0, 0); } - Common::Rect rCapt(pvs->w, pvs->h); + captureImage(src, pvs->pitch, pvs->w, pvs->h, resNum, r, compType); +} + +void Wiz::captureImage(uint8 *src, int srcPitch, int srcw, int srch, int resNum, const Common::Rect& r, int compType) { + Common::Rect rCapt(srcw, srch); if (rCapt.intersects(r)) { rCapt.clip(r); const uint8 *palPtr; @@ -1327,13 +1331,13 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in int headerSize = palPtr ? 1080 : 36; switch (compType) { case 0: - dataSize = wizPackType0(0, src, pvs->pitch, rCapt); + dataSize = wizPackType0(0, src, srcPitch, rCapt); break; case 1: - dataSize = wizPackType1(0, src, pvs->pitch, rCapt, transColor); + dataSize = wizPackType1(0, src, srcPitch, rCapt, transColor); break; case 2: - dataSize = wizPackType2(0, src, pvs->pitch, rCapt); + dataSize = wizPackType2(0, src, srcPitch, rCapt); break; default: error("unhandled compression type %d", compType); @@ -1373,13 +1377,13 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in // write compressed data switch (compType) { case 0: - wizPackType0(wizImg + headerSize, src, pvs->pitch, rCapt); + wizPackType0(wizImg + headerSize, src, srcPitch, rCapt); break; case 1: - wizPackType1(wizImg + headerSize, src, pvs->pitch, rCapt, transColor); + wizPackType1(wizImg + headerSize, src, srcPitch, rCapt, transColor); break; case 2: - wizPackType2(wizImg + headerSize, src, pvs->pitch, rCapt); + wizPackType2(wizImg + headerSize, src, srcPitch, rCapt); break; default: break; @@ -1671,6 +1675,80 @@ struct PolygonDrawData { } }; +void Wiz::captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int id2) { + debug(0, "captureWizPolygon: resNum %d, maskNum %d maskState %d, id1 %d id2 %d\n", resNum, maskNum, maskState, id1, id2); + + int i, j; + VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; + WizPolygon *wp1, *wp2; + const uint16 transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; + + wp1 = NULL; + for (i = 0; i < ARRAYSIZE(_polygons); ++i) { + if (_polygons[i].id == id1) { + wp1 = &_polygons[i]; + break; + } + } + if (!wp1) { + error("Polygon %d is not defined", id1); + } + if (wp1->numVerts != 5) { + error("Invalid point count %d for Polygon %d", wp1->numVerts, id1); + } + + wp2 = NULL; + for (i = 0; i < ARRAYSIZE(_polygons); ++i) { + if (_polygons[i].id == id2) { + wp2 = &_polygons[i]; + break; + } + } + if (!wp2) { + error("Polygon %d is not defined", id2); + } + if (wp2->numVerts != 5) { + error("Invalid point count %d for Polygon %d", wp2->numVerts, id2); + } + + int32 dstw, dsth, dstpitch; + int32 srcw, srch; + uint8 *imageBuffer; + const uint8 *src = pvs->getPixels(0, 0); + + if (maskNum) { + const Common::Rect *r = NULL; + src = drawWizImage(maskNum, maskState, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, 0); + getWizImageDim(maskNum, maskState, srcw, srch); + } else { + srcw = pvs->w; + srch = pvs->h; + } + + dstw = wp2->bound.width(); + dsth = wp2->bound.height(); + dstpitch = wp2->bound.width() * _vm->_bitDepth; + imageBuffer = (uint8 *)malloc(wp2->bound.width() * wp2->bound.height() * _vm->_bitDepth); + assert(imageBuffer); + + if (_vm->_bitDepth == 2) { + uint8 *tmpPtr = imageBuffer; + for (i = 0; i < dsth; i++) { + for (j = 0; j < dstw; j++) + WRITE_LE_UINT16(tmpPtr + j * 2, transColor); + tmpPtr += dstpitch; + } + } else { + memset(imageBuffer, transColor, dstw * dsth); + } + + Common::Rect bound; + drawWizPolygonImage(imageBuffer, src, NULL, dstpitch, kDstMemory, dstw, dsth, srcw, srch, bound, wp2->vert, _vm->_bitDepth); + + captureImage(imageBuffer, dstpitch, dstw, dsth, resNum, wp2->bound, (_vm->_bitDepth == 2) ? 2 : 0); + free(imageBuffer); +} + void Wiz::drawWizComplexPolygon(int resNum, int state, int po_x, int po_y, int shadow, int angle, int scale, const Common::Rect *r, int flags, int dstResNum, int palette) { Common::Point pts[4]; @@ -1702,7 +1780,6 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int const Common::Rect *r = NULL; uint8 *srcWizBuf = NULL; bool freeBuffer = true; - int i; if (_vm->_game.heversion >= 99) { if (getWizImageData(resNum, state, 0) != 0 || (flags & (kWIFRemapPalette | kWIFFlipX | kWIFFlipY)) || palette != 0) { @@ -1733,152 +1810,163 @@ void Wiz::drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int } } - if (srcWizBuf) { - uint8 *dst; - int32 dstw, dsth, dstpitch, dstType, wizW, wizH; - VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; - int transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; + assert(srcWizBuf); - if (dstResNum) { - uint8 *dstPtr = _vm->getResourceAddress(rtImage, dstResNum); - assert(dstPtr); - dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0); - assert(dst); - getWizImageDim(dstResNum, 0, dstw, dsth); - dstpitch = dstw * _vm->_bitDepth; - dstType = kDstResource; + uint8 *dst; + int32 dstw, dsth, dstpitch, dstType, wizW, wizH; + VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; + + if (dstResNum) { + uint8 *dstPtr = _vm->getResourceAddress(rtImage, dstResNum); + assert(dstPtr); + dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0); + assert(dst); + getWizImageDim(dstResNum, 0, dstw, dsth); + dstpitch = dstw * _vm->_bitDepth; + dstType = kDstResource; + } else { + if (flags & kWIFMarkBufferDirty) { + dst = pvs->getPixels(0, 0); } else { - if (flags & kWIFMarkBufferDirty) { - dst = pvs->getPixels(0, 0); - } else { - dst = pvs->getBackPixels(0, 0); - } - dstw = pvs->w; - dsth = pvs->h; - dstpitch = pvs->pitch; - dstType = kDstScreen; + dst = pvs->getBackPixels(0, 0); } + dstw = pvs->w; + dsth = pvs->h; + dstpitch = pvs->pitch; + dstType = kDstScreen; + } - getWizImageDim(resNum, state, wizW, wizH); - - Common::Point bbox[4]; - bbox[0].x = 0; - bbox[0].y = 0; - bbox[1].x = wizW - 1; - bbox[1].y = 0; - bbox[2].x = wizW - 1; - bbox[2].y = wizH - 1; - bbox[3].x = 0; - bbox[3].y = wizH - 1; - - int16 xmin_p, xmax_p, ymin_p, ymax_p; - xmin_p = ymin_p = (int16)0x7FFF; - xmax_p = ymax_p = (int16)0x8000; - - for (i = 0; i < 4; ++i) { - xmin_p = MIN(wp[i].x, xmin_p); - xmax_p = MAX(wp[i].x, xmax_p); - ymin_p = MIN(wp[i].y, ymin_p); - ymax_p = MAX(wp[i].y, ymax_p); - } - - int16 xmin_b, xmax_b, ymin_b, ymax_b; - xmin_b = ymin_b = (int16)0x7FFF; - xmax_b = ymax_b = (int16)0x8000; - - for (i = 0; i < 4; ++i) { - xmin_b = MIN(bbox[i].x, xmin_b); - xmax_b = MAX(bbox[i].x, xmax_b); - ymin_b = MIN(bbox[i].y, ymin_b); - ymax_b = MAX(bbox[i].y, ymax_b); - } - - PolygonDrawData pdd(ymax_p - ymin_p + 1); - pdd.mat[0].x = xmin_p; - pdd.mat[0].y = ymin_p; - pdd.mat[1].x = xmax_p; - pdd.mat[1].y = ymax_p; - pdd.mat[2].x = xmin_b; - pdd.mat[2].y = ymin_b; - pdd.mat[3].x = xmax_b; - pdd.mat[3].y = ymax_b; - - // precompute the transformation which remaps 'bbox' pixels to 'wp' - for (i = 0; i < 3; ++i) { - pdd.transform(&wp[i], &wp[i + 1], &bbox[i], &bbox[i + 1]); - } - pdd.transform(&wp[3], &wp[0], &bbox[3], &bbox[0]); - - pdd.rAreasNum = 0; - PolygonDrawData::ResultArea *pra = &pdd.ra[0]; - int32 yoff = pdd.mat[0].y * dstpitch; - int16 y_start = pdd.mat[0].y; - for (i = 0; i < pdd.pAreasNum; ++i) { - PolygonDrawData::PolygonArea *ppa = &pdd.pa[i]; - if (y_start >= 0 && y_start < dsth) { - int16 x1 = ppa->xmin; - if (x1 < 0) { - x1 = 0; - } - int16 x2 = ppa->xmax; - if (x2 >= dstw) { - x2 = dstw - 1; - } - int16 w = x2 - x1 + 1; - if (w > 0) { - int16 width = ppa->xmax - ppa->xmin + 1; - pra->x_step = ((ppa->x2 - ppa->x1) << 16) / width; - pra->y_step = ((ppa->y2 - ppa->y1) << 16) / width; - pra->dst_offs = yoff + x1 * _vm->_bitDepth; - pra->w = w; - pra->x_s = ppa->x1 << 16; - pra->y_s = ppa->y1 << 16; - int16 tmp = x1 - ppa->xmin; - if (tmp != 0) { - pra->x_s += pra->x_step * tmp; - pra->y_s += pra->y_step * tmp; - } - ++pra; - ++pdd.rAreasNum; - } + Common::Rect bound; + getWizImageDim(resNum, state, wizW, wizH); + drawWizPolygonImage(dst, srcWizBuf, 0, dstpitch, dstType, dstw, dsth, wizW, wizH, bound, wp, _vm->_bitDepth); + + if (flags & kWIFMarkBufferDirty) { + _vm->markRectAsDirty(kMainVirtScreen, bound); + } else { + _vm->restoreBackgroundHE(bound); + } + + if (freeBuffer) + free(srcWizBuf); +} + +void Wiz::drawWizPolygonImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstpitch, int dstType, int dstw, int dsth, int wizW, int wizH, Common::Rect &bound, Common::Point *wp, uint8 bitDepth) { + int i, transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; + + Common::Point bbox[4]; + bbox[0].x = 0; + bbox[0].y = 0; + bbox[1].x = wizW - 1; + bbox[1].y = 0; + bbox[2].x = wizW - 1; + bbox[2].y = wizH - 1; + bbox[3].x = 0; + bbox[3].y = wizH - 1; + + int16 xmin_p, xmax_p, ymin_p, ymax_p; + xmin_p = ymin_p = (int16)0x7FFF; + xmax_p = ymax_p = (int16)0x8000; + + for (i = 0; i < 4; ++i) { + xmin_p = MIN(wp[i].x, xmin_p); + xmax_p = MAX(wp[i].x, xmax_p); + ymin_p = MIN(wp[i].y, ymin_p); + ymax_p = MAX(wp[i].y, ymax_p); + } + + int16 xmin_b, xmax_b, ymin_b, ymax_b; + xmin_b = ymin_b = (int16)0x7FFF; + xmax_b = ymax_b = (int16)0x8000; + + for (i = 0; i < 4; ++i) { + xmin_b = MIN(bbox[i].x, xmin_b); + xmax_b = MAX(bbox[i].x, xmax_b); + ymin_b = MIN(bbox[i].y, ymin_b); + ymax_b = MAX(bbox[i].y, ymax_b); + } + + PolygonDrawData pdd(ymax_p - ymin_p + 1); + pdd.mat[0].x = xmin_p; + pdd.mat[0].y = ymin_p; + pdd.mat[1].x = xmax_p; + pdd.mat[1].y = ymax_p; + pdd.mat[2].x = xmin_b; + pdd.mat[2].y = ymin_b; + pdd.mat[3].x = xmax_b; + pdd.mat[3].y = ymax_b; + + // precompute the transformation which remaps 'bbox' pixels to 'wp' + for (i = 0; i < 3; ++i) { + pdd.transform(&wp[i], &wp[i + 1], &bbox[i], &bbox[i + 1]); + } + pdd.transform(&wp[3], &wp[0], &bbox[3], &bbox[0]); + + pdd.rAreasNum = 0; + PolygonDrawData::ResultArea *pra = &pdd.ra[0]; + int32 yoff = pdd.mat[0].y * dstpitch; + int16 y_start = pdd.mat[0].y; + for (i = 0; i < pdd.pAreasNum; ++i) { + PolygonDrawData::PolygonArea *ppa = &pdd.pa[i]; + if (y_start >= 0 && y_start < dsth) { + int16 x1 = ppa->xmin; + if (x1 < 0) { + x1 = 0; } - ++ppa; - yoff += dstpitch; - ++y_start; - } - - pra = &pdd.ra[0]; - for (i = 0; i < pdd.rAreasNum; ++i, ++pra) { - uint8 *dstPtr = dst + pra->dst_offs; - int32 w = pra->w; - int32 x_acc = pra->x_s; - int32 y_acc = pra->y_s; - while (--w) { - int32 src_offs = (y_acc >> 16) * wizW + (x_acc >> 16); - assert(src_offs < wizW * wizH); - x_acc += pra->x_step; - y_acc += pra->y_step; - if (_vm->_bitDepth == 2) { - if (transColor == -1 || transColor != READ_LE_UINT16(srcWizBuf + src_offs * 2)) - writeColor(dstPtr, dstType, READ_LE_UINT16(srcWizBuf + src_offs * 2)); - } else { - if (transColor == -1 || transColor != srcWizBuf[src_offs]) - *dstPtr = srcWizBuf[src_offs]; + int16 x2 = ppa->xmax; + if (x2 >= dstw) { + x2 = dstw - 1; + } + int16 w = x2 - x1 + 1; + if (w > 0) { + int16 width = ppa->xmax - ppa->xmin + 1; + pra->x_step = ((ppa->x2 - ppa->x1) << 16) / width; + pra->y_step = ((ppa->y2 - ppa->y1) << 16) / width; + pra->dst_offs = yoff + x1 * _vm->_bitDepth; + pra->w = w; + pra->x_s = ppa->x1 << 16; + pra->y_s = ppa->y1 << 16; + int16 tmp = x1 - ppa->xmin; + if (tmp != 0) { + pra->x_s += pra->x_step * tmp; + pra->y_s += pra->y_step * tmp; } - dstPtr += _vm->_bitDepth; + ++pra; + ++pdd.rAreasNum; } } - - Common::Rect bound(xmin_p, ymin_p, xmax_p + 1, ymax_p + 1); - if (flags & kWIFMarkBufferDirty) { - _vm->markRectAsDirty(kMainVirtScreen, bound); - } else { - _vm->restoreBackgroundHE(bound); + ++ppa; + yoff += dstpitch; + ++y_start; + } + + pra = &pdd.ra[0]; + for (i = 0; i < pdd.rAreasNum; ++i, ++pra) { + uint8 *dstPtr = dst + pra->dst_offs; + int32 w = pra->w; + int32 x_acc = pra->x_s; + int32 y_acc = pra->y_s; + while (--w) { + int32 src_offs = (y_acc >> 16) * wizW + (x_acc >> 16); + assert(src_offs < wizW * wizH); + x_acc += pra->x_step; + y_acc += pra->y_step; + if (bitDepth == 2) { + if (transColor == -1 || transColor != READ_LE_UINT16(src + src_offs * 2)) { + //if (transColor == -1 || READ_LE_UINT16(dstPtr) != transColor) + writeColor(dstPtr, dstType, READ_LE_UINT16(src + src_offs * 2)); + } + } else { + if (transColor == -1 || transColor != src[src_offs]) + *dstPtr = src[src_offs]; + } + dstPtr += bitDepth; } - - if (freeBuffer) - free(srcWizBuf); } + + bound.left = xmin_p; + bound.top = ymin_p; + bound.right = xmax_p + 1; + bound.bottom = ymax_p + 1; } void Wiz::flushWizBuffer() { @@ -2329,9 +2417,7 @@ void Wiz::processWizImage(const WizParameters *params) { break; // HE 99+ case 7: - // Used in PuttsFunShop/SamsFunShop/soccer2004 - // TODO: Capture polygon - _vm->_res->setModified(rtImage, params->img.resNum); + captureWizPolygon(params->img.resNum, params->sourceImage, params->img.state, params->polygonId1, params->polygonId2); break; case 8: { int img_w = 640; diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index 5c5daa5974..6955355ed4 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -197,6 +197,8 @@ public: void loadWizCursor(int resId, int palette); void captureWizImage(int resNum, const Common::Rect& r, bool frontBuffer, int compType); + void captureImage(uint8 *src, int srcPitch, int srcw, int srch, int resNum, const Common::Rect& r, int compType); + void captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int id2); void displayWizComplexImage(const WizParameters *params); void displayWizImage(WizImage *pwi); void processWizImage(const WizParameters *params); @@ -205,6 +207,7 @@ public: void drawWizPolygon(int resNum, int state, int id, int flags, int shadow, int dstResNum, int palette); void drawWizComplexPolygon(int resNum, int state, int po_x, int po_y, int shadow, int angle, int zoom, const Common::Rect *r, int flags, int dstResNum, int palette); void drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int flags, int shadow, int dstResNum, int palette); + void drawWizPolygonImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstpitch, int dstType, int dstw, int dsth, int wizW, int wizH, Common::Rect &bound, Common::Point *wp, uint8 bitDepth); static void copyMaskWizImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr); -- cgit v1.2.3 From 2a1a1576f225e5d20d3b9049160d209ffb1828be Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 22 Jun 2009 00:35:08 +0000 Subject: Cleanup. svn-id: r41737 --- engines/scumm/he/wiz_he.cpp | 62 ++++++++++++++++++++------------------------- engines/scumm/he/wiz_he.h | 2 +- 2 files changed, 29 insertions(+), 35 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 5fbc12626e..b6bce15496 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1297,7 +1297,6 @@ static int wizPackType0(uint8 *dst, const uint8 *src, int srcPitch, const Common } void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, int compType) { - debug(0, "captureWizImage(%d, %d, [%d,%d,%d,%d])", resNum, compType, r.left, r.top, r.right, r.bottom); uint8 *src = NULL; VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; if (backBuffer) { @@ -1309,6 +1308,7 @@ void Wiz::captureWizImage(int resNum, const Common::Rect& r, bool backBuffer, in } void Wiz::captureImage(uint8 *src, int srcPitch, int srcw, int srch, int resNum, const Common::Rect& r, int compType) { + debug(0, "captureImage(%d, %d, [%d,%d,%d,%d])", resNum, compType, r.left, r.top, r.right, r.bottom); Common::Rect rCapt(srcw, srch); if (rCapt.intersects(r)) { rCapt.clip(r); @@ -1675,62 +1675,56 @@ struct PolygonDrawData { } }; -void Wiz::captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int id2) { - debug(0, "captureWizPolygon: resNum %d, maskNum %d maskState %d, id1 %d id2 %d\n", resNum, maskNum, maskState, id1, id2); +void Wiz::captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int id2, int compType) { + debug(0, "captureWizPolygon: resNum %d, maskNum %d maskState %d, id1 %d id2 %d compType %d", resNum, maskNum, maskState, id1, id2, compType); int i, j; - VirtScreen *pvs = &_vm->_virtscr[kMainVirtScreen]; - WizPolygon *wp1, *wp2; - const uint16 transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; + WizPolygon *wp; - wp1 = NULL; + wp = NULL; for (i = 0; i < ARRAYSIZE(_polygons); ++i) { if (_polygons[i].id == id1) { - wp1 = &_polygons[i]; + wp = &_polygons[i]; break; } } - if (!wp1) { - error("Polygon %d is not defined", id1); + if (!wp) { + error("Polygon1 %d is not defined", id1); } - if (wp1->numVerts != 5) { - error("Invalid point count %d for Polygon %d", wp1->numVerts, id1); + if (wp->numVerts != 5) { + error("Invalid point count %d for Polygon1 %d", wp->numVerts, id1); } - wp2 = NULL; + wp = NULL; for (i = 0; i < ARRAYSIZE(_polygons); ++i) { if (_polygons[i].id == id2) { - wp2 = &_polygons[i]; + wp = &_polygons[i]; break; } } - if (!wp2) { - error("Polygon %d is not defined", id2); + if (!wp) { + error("Polygon2 %d is not defined", id2); } - if (wp2->numVerts != 5) { - error("Invalid point count %d for Polygon %d", wp2->numVerts, id2); + if (wp->numVerts != 5) { + error("Invalid point count %d for Polygon2 %d", wp->numVerts, id2); } int32 dstw, dsth, dstpitch; int32 srcw, srch; uint8 *imageBuffer; - const uint8 *src = pvs->getPixels(0, 0); - if (maskNum) { - const Common::Rect *r = NULL; - src = drawWizImage(maskNum, maskState, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, 0); - getWizImageDim(maskNum, maskState, srcw, srch); - } else { - srcw = pvs->w; - srch = pvs->h; - } + assert(maskNum); + const Common::Rect *r = NULL; + const uint8 *src = drawWizImage(maskNum, maskState, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, 0); + getWizImageDim(maskNum, maskState, srcw, srch); - dstw = wp2->bound.width(); - dsth = wp2->bound.height(); - dstpitch = wp2->bound.width() * _vm->_bitDepth; - imageBuffer = (uint8 *)malloc(wp2->bound.width() * wp2->bound.height() * _vm->_bitDepth); + dstw = wp->bound.width(); + dsth = wp->bound.height(); + dstpitch = dstw * _vm->_bitDepth; + imageBuffer = (uint8 *)malloc(dstw * dsth * _vm->_bitDepth); assert(imageBuffer); + const uint16 transColor = (_vm->VAR_WIZ_TCOLOR != 0xFF) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : 5; if (_vm->_bitDepth == 2) { uint8 *tmpPtr = imageBuffer; for (i = 0; i < dsth; i++) { @@ -1743,9 +1737,9 @@ void Wiz::captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int } Common::Rect bound; - drawWizPolygonImage(imageBuffer, src, NULL, dstpitch, kDstMemory, dstw, dsth, srcw, srch, bound, wp2->vert, _vm->_bitDepth); + drawWizPolygonImage(imageBuffer, src, NULL, dstpitch, kDstMemory, dstw, dsth, srcw, srch, bound, wp->vert, _vm->_bitDepth); - captureImage(imageBuffer, dstpitch, dstw, dsth, resNum, wp2->bound, (_vm->_bitDepth == 2) ? 2 : 0); + captureImage(imageBuffer, dstpitch, dstw, dsth, resNum, wp->bound, compType); free(imageBuffer); } @@ -2417,7 +2411,7 @@ void Wiz::processWizImage(const WizParameters *params) { break; // HE 99+ case 7: - captureWizPolygon(params->img.resNum, params->sourceImage, params->img.state, params->polygonId1, params->polygonId2); + captureWizPolygon(params->img.resNum, params->sourceImage, params->img.state, params->polygonId1, params->polygonId2, params->compType); break; case 8: { int img_w = 640; diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index 6955355ed4..d8f984f710 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -198,7 +198,7 @@ public: void captureWizImage(int resNum, const Common::Rect& r, bool frontBuffer, int compType); void captureImage(uint8 *src, int srcPitch, int srcw, int srch, int resNum, const Common::Rect& r, int compType); - void captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int id2); + void captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int id2, int compType); void displayWizComplexImage(const WizParameters *params); void displayWizImage(WizImage *pwi); void processWizImage(const WizParameters *params); -- cgit v1.2.3 From a937dfde96b35738b916e4299cc4e917fc6d2d9e Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 22 Jun 2009 11:00:53 +0000 Subject: Fix loading/saving in funshop titles. svn-id: r41764 --- engines/scumm/he/script_v72he.cpp | 5 ++-- engines/scumm/he/wiz_he.cpp | 48 +++++++++++++++++++++++---------------- 2 files changed, 31 insertions(+), 22 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 3c55818ece..9d5bd0b23d 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1482,6 +1482,7 @@ void ScummEngine_v72he::o72_readFile() { fetchScriptByte(); size = pop(); slot = pop(); + assert(_hInFileTable[slot]); val = readFileToArray(slot, size); push(val); break; @@ -1809,9 +1810,7 @@ void ScummEngine_v72he::o72_readINI() { switch (subOp) { case 43: // HE 100 case 6: // number - if (!strcmp((char *)option, "NoFontsInstalled")) { - push(1); - } else if (!strcmp((char *)option, "NoPrinting")) { + if (!strcmp((char *)option, "NoPrinting")) { push(1); } else if (!strcmp((char *)option, "TextOn")) { push(ConfMan.getBool("subtitles")); diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index b6bce15496..2e414f2a1e 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -2323,7 +2323,7 @@ void Wiz::remapWizImagePal(const WizParameters *params) { } void Wiz::processWizImage(const WizParameters *params) { - byte filename[260]; + byte buffer[260]; debug(3, "processWizImage: processMode %d", params->processMode); switch (params->processMode) { @@ -2338,18 +2338,28 @@ void Wiz::processWizImage(const WizParameters *params) { break; case 3: if (params->processFlags & kWPFUseFile) { - Common::File f; + Common::SeekableReadStream *f = NULL; + memcpy(buffer, params->filename, 260); + const char *filename = (char *)buffer + _vm->convertFilePath(buffer); - memcpy(filename, params->filename, 260); - _vm->convertFilePath(filename); + if (!_vm->_saveFileMan->listSavefiles(filename).empty()) { + f = _vm->_saveFileMan->openForLoading(filename); + } else { + Common::File *nf = new Common::File(); + nf->open(filename); + if (!nf->isOpen()) + delete nf; + else + f = nf; + } - if (f.open((const char *)filename)) { - uint32 id = f.readUint32BE(); + if (f) { + uint32 id = f->readUint32BE(); if (id == MKID_BE('AWIZ') || id == MKID_BE('MULT')) { - uint32 size = f.readUint32BE(); - f.seek(0, SEEK_SET); + uint32 size = f->readUint32BE(); + f->seek(0, SEEK_SET); byte *p = _vm->_res->createResource(rtImage, params->img.resNum, size); - if (f.read(p, size) != size) { + if (f->read(p, size) != size) { _vm->_res->nukeResource(rtImage, params->img.resNum); error("i/o error when reading '%s'", filename); _vm->VAR(_vm->VAR_GAME_LOADED) = -2; @@ -2363,7 +2373,7 @@ void Wiz::processWizImage(const WizParameters *params) { _vm->VAR(_vm->VAR_GAME_LOADED) = -1; _vm->VAR(119) = -1; } - f.close(); + delete f; } else { _vm->VAR(_vm->VAR_GAME_LOADED) = -3; _vm->VAR(119) = -3; @@ -2373,7 +2383,9 @@ void Wiz::processWizImage(const WizParameters *params) { break; case 4: if (params->processFlags & kWPFUseFile) { - Common::DumpFile f; + Common::OutSaveFile *f; + memcpy(buffer, params->filename, 260); + const char *filename = (char *)buffer + _vm->convertFilePath(buffer); switch (params->fileWriteMode) { case 2: @@ -2383,22 +2395,20 @@ void Wiz::processWizImage(const WizParameters *params) { // TODO Write image to file break; case 0: - memcpy(filename, params->filename, 260); - _vm->convertFilePath(filename); - - if (!f.open((const char *)filename)) { + if (!(f = _vm->_saveFileMan->openForSaving(filename))) { debug(0, "Unable to open for write '%s'", filename); _vm->VAR(119) = -3; } else { byte *p = _vm->getResourceAddress(rtImage, params->img.resNum); uint32 size = READ_BE_UINT32(p + 4); - if (f.write(p, size) != size) { - error("i/o error when writing '%s'", params->filename); + if (f->write(p, size) != size) { + error("i/o error when writing '%s'", filename); _vm->VAR(119) = -2; } else { _vm->VAR(119) = 0; } - f.close(); + f->finalize(); + delete f; } break; default: @@ -2411,7 +2421,7 @@ void Wiz::processWizImage(const WizParameters *params) { break; // HE 99+ case 7: - captureWizPolygon(params->img.resNum, params->sourceImage, params->img.state, params->polygonId1, params->polygonId2, params->compType); + captureWizPolygon(params->img.resNum, params->sourceImage, (params->processFlags & kWPFNewState) ? params->img.state : 0, params->polygonId1, params->polygonId2, params->compType); break; case 8: { int img_w = 640; -- cgit v1.2.3 From 7c622423157e29b7206ba0c39a7756443ed1e70d Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Tue, 23 Jun 2009 02:02:51 +0000 Subject: Merged format initialization into InitSize to allow for backends not supporting gfx transactions. svn-id: r41801 --- engines/engine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 15c6820f22..7a76de36dc 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -135,9 +135,10 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::Pixel initCommonGFX(defaultTo1xScaler); #ifdef ENABLE_RGB_COLOR - g_system->initFormat(format); -#endif + g_system->initSize(width, height, format); +#else g_system->initSize(width, height); +#endif OSystem::TransactionError gfxError = g_system->endGFXTransaction(); -- cgit v1.2.3 From a44859e01bead5a30d8446a5bc75857d000199d9 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Tue, 23 Jun 2009 14:06:57 +0000 Subject: Fix error in Backyard Soccer 2004, when using Season Play. svn-id: r41808 --- engines/scumm/he/script_v100he.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 60db9adefb..58a858ede4 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -1574,7 +1574,10 @@ void ScummEngine_v100he::o100_roomOps() { case 130: a = pop(); b = pop(); - copyPalColor(a, b); + if (_game.features & GF_16BIT_COLOR) + copyHEPaletteColor(1, a, b); + else + copyPalColor(a, b); break; case 131: // SO_ROOM_FADE -- cgit v1.2.3 From 4a380dc0d8b1a75fa31e0b4511e03b0782b43f89 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 23 Jun 2009 20:46:38 +0000 Subject: ENABLE_16BIT has been renamed to ENABLE_RGB_COLOR as of r41696, so make sure the Groovie engine uses that too svn-id: r41817 --- engines/groovie/groovie.cpp | 2 +- engines/groovie/groovie.h | 2 +- engines/groovie/roq.cpp | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 5d89799648..c1826e12ce 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -72,7 +72,7 @@ Common::Error GroovieEngine::run() { // Initialize the graphics switch (_gameDescription->version) { case kGroovieV2: -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _pixelFormat = _system->getBestFormat(); initGraphics(640, 480, true, _pixelFormat); break; diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h index adc6986a87..3f7f7cb0ed 100644 --- a/engines/groovie/groovie.h +++ b/engines/groovie/groovie.h @@ -85,7 +85,7 @@ protected: public: void waitForInput(); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat _pixelFormat; #endif Script _script; diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 95acb64f6a..56237655e9 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -29,7 +29,7 @@ #include "groovie/groovie.h" #include "groovie/roq.h" -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR // Required for the YUV to RGB conversion #include "graphics/dither.h" #endif @@ -47,7 +47,7 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) : _currBuf = new Graphics::Surface(); _prevBuf = new Graphics::Surface(); -#ifndef ENABLE_16BIT +#ifndef ENABLE_RGB_COLOR byte pal[256 * 4]; #ifdef DITHER byte pal3[256 * 3]; @@ -92,7 +92,7 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) : #endif // DITHER _syst->setPalette(pal, 0, 256); -#endif // !ENABLE_16BIT +#endif // !ENABLE_RGB_COLOR } ROQPlayer::~ROQPlayer() { @@ -160,7 +160,7 @@ void ROQPlayer::buildShowBuf() { byte *out = (byte *)_showBuf.getBasePtr(0, line); byte *in = (byte *)_prevBuf->getBasePtr(0, line / _scaleY); for (int x = 0; x < _showBuf.w; x++) { -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR // Do the format conversion (YUV -> RGB -> Screen format) byte r, g, b; Graphics::PaletteLUT::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); @@ -169,7 +169,7 @@ void ROQPlayer::buildShowBuf() { // Skip to the next pixel out += _vm->_pixelFormat.bytesPerPixel; -#else // !ENABLE_16BIT +#else // !ENABLE_RGB_COLOR #ifdef DITHER *out = _dither->dither(*in, *(in + 1), *(in + 2), x); #else @@ -178,7 +178,7 @@ void ROQPlayer::buildShowBuf() { #endif // DITHER // Skip to the next pixel out++; -#endif // ENABLE_16BIT +#endif // ENABLE_RGB_COLOR if (!(x % _scaleX)) in += _prevBuf->bytesPerPixel; @@ -335,7 +335,7 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) { // Allocate new buffers _currBuf->create(width, height, 3); _prevBuf->create(width, height, 3); -#ifdef ENABLE_16BIT +#ifdef ENABLE_RGB_COLOR _showBuf.create(width * _scaleX, height * _scaleY, _vm->_pixelFormat.bytesPerPixel); #else _showBuf.create(width * _scaleX, height * _scaleY, 1); -- cgit v1.2.3 From 865129a5630017f05d08e778ba1ef430c23cd55a Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Wed, 24 Jun 2009 06:44:30 +0000 Subject: made the cursor's pixel format a member of the cursor object, merged ____CursorFormat functions into equivalent ____Cursor functions. svn-id: r41825 --- engines/scumm/cursor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 5c695e58a5..190c337c63 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -113,12 +113,17 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; #ifdef ENABLE_RGB_COLOR - CursorMan.replaceCursorFormat(_system->getScreenFormat()); -#endif + CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, + _cursor.hotspotX, _cursor.hotspotY, + (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), + (_game.heversion == 70 ? 2 : 1), + _system->getScreenFormat()); +#else CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), (_game.heversion == 70 ? 2 : 1)); +#endif } void ScummEngine_v6::grabCursor(int x, int y, int w, int h) { -- cgit v1.2.3 From 53eb83dc95b825b2bf4f5f3943e8f10d9add3aa6 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Thu, 25 Jun 2009 08:55:16 +0000 Subject: API modification -- replaced "Graphics::PixelFormat getBestFormat()" with "Common::List getSupportedFormats()" svn-id: r41854 --- engines/groovie/groovie.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index c1826e12ce..5b1a139dbe 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -73,7 +73,7 @@ Common::Error GroovieEngine::run() { switch (_gameDescription->version) { case kGroovieV2: #ifdef ENABLE_RGB_COLOR - _pixelFormat = _system->getBestFormat(); + _pixelFormat = _system->getSupportedFormats().front(); initGraphics(640, 480, true, _pixelFormat); break; #endif -- cgit v1.2.3 From 2859c9130462e66df705d534f9a70d1430628be7 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 26 Jun 2009 08:50:11 +0000 Subject: Changed cursor manager functions to take *Graphics::PixelFormat with default parameter of NULL (and initialize NULL pointers with CLUT8), rather than taking a Graphics::PixelFormat with default parameter of Graphics::PixelFormat::createFormatCLUT8() svn-id: r41900 --- engines/scumm/cursor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 190c337c63..66ac68bd95 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -113,11 +113,12 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; #ifdef ENABLE_RGB_COLOR + Graphics::PixelFormat format = _system->getScreenFormat(); CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor), (_game.heversion == 70 ? 2 : 1), - _system->getScreenFormat()); + &format); #else CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, -- cgit v1.2.3 From 70c9731810b28e910270429b2e5d16e2fe92f604 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 26 Jun 2009 22:30:52 +0000 Subject: SCI: starting to restore RGB color functionality svn-id: r41904 --- engines/sci/gfx/gfx_driver.cpp | 66 ++++++++++++++++++++++++++---------- engines/sci/gfx/gfx_driver.h | 7 ++-- engines/sci/gfx/gfx_pixmap_scale.cpp | 5 +-- engines/sci/gfx/gfx_resmgr.cpp | 3 +- engines/sci/gfx/gfx_system.h | 3 ++ engines/sci/gfx/gfx_tools.cpp | 9 ++--- engines/sci/gfx/operations.cpp | 15 ++++---- engines/sci/gfx/operations.h | 8 ++--- engines/sci/sci.cpp | 10 +++++- 9 files changed, 86 insertions(+), 40 deletions(-) (limited to 'engines') diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index 42be711499..f905244011 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -26,18 +26,19 @@ #include "common/scummsys.h" #include "common/system.h" #include "graphics/primitives.h" +#include "graphics/surface.h" #include "sci/sci.h" #include "sci/gfx/gfx_driver.h" #include "sci/gfx/gfx_tools.h" + namespace Sci { -GfxDriver::GfxDriver(int xfact, int yfact, int bytespp) { +GfxDriver::GfxDriver(int xfact, int yfact, Graphics::PixelFormat format) { int i; - Graphics::PixelFormat format(bytespp, 0, 0, 0, 0, 0, 0, 0, 0); - _mode = gfx_new_mode(xfact, yfact, format, new Palette(256), 0); + _mode = gfx_new_mode(xfact, yfact, format, format.bytesPerPixel == 1 ? new Palette(256) : 0, 0); _mode->xsize = xfact * 320; _mode->ysize = yfact * 200; @@ -50,14 +51,15 @@ GfxDriver::GfxDriver(int xfact, int yfact, int bytespp) { // create the visual buffers for (i = 0; i < 2; i++) { _visual[i] = NULL; - _visual[i] = new byte[_mode->xsize * _mode->ysize]; + _visual[i] = new byte[_mode->xsize * _mode->ysize * _mode->bytespp]; if (!_visual[i]) { error("Out of memory: Could not allocate visual buffers! (%dx%d)\n", _mode->xsize, _mode->ysize); } - memset(_visual[i], 0, _mode->xsize * _mode->ysize); + memset(_visual[i], 0, _mode->xsize * _mode->ysize * _mode->bytespp); } - _mode->palette->name = "global"; + if (_mode->palette) + _mode->palette->name = "global"; } GfxDriver::~GfxDriver() { @@ -76,10 +78,12 @@ GfxDriver::~GfxDriver() { // Drawing operations +template static void drawProc(int x, int y, int c, void *data) { GfxDriver *drv = (GfxDriver *)data; byte *p = drv->getVisual0(); - p[y * 320* drv->getMode()->xfact + x] = c; + SIZETYPE col = c << (EXTRA_BYTE_OFFSET * 8); + memcpy(p + (y * 320* drv->getMode()->xfact + x) * COPY_BYTES, &col, COPY_BYTES); } int GfxDriver::drawLine(Common::Point start, Common::Point end, gfx_color_t color, @@ -90,6 +94,28 @@ int GfxDriver::drawLine(Common::Point start, Common::Point end, gfx_color_t colo int xsize = _mode->xsize; int ysize = _mode->ysize; + void (*modeDrawProc)(int,int,int,void*); + switch (_mode->bytespp) { + case 1: + modeDrawProc = drawProc<1, uint8, 0>; + break; + case 2: + modeDrawProc = drawProc<2, uint16, 0>; + break; + case 3: +#ifdef SCUMM_BIG_ENDIAN + modeDrawProc = drawProc<3, uint32, 1>; +#else + modeDrawProc = drawProc<3, uint32, 0>; +#endif + break; + case 4: + modeDrawProc = drawProc<4, uint32, 0>; + break; + default: + GFXERROR("Invalid mode->bytespp=%d\n", _mode->bytespp); + } + if (color.mask & GFX_MASK_VISUAL) { Common::Point nstart, nend; @@ -101,7 +127,7 @@ int GfxDriver::drawLine(Common::Point start, Common::Point end, gfx_color_t colo nend.x = CLIP(end.x + xc, 0, xsize - 1); nend.y = CLIP(end.y + yc, 0, ysize - 1); - Graphics::drawLine(nstart.x, nstart.y, nend.x, nend.y, scolor, drawProc, this); + Graphics::drawLine(nstart.x, nstart.y, nend.x, nend.y, scolor, modeDrawProc, this); if (color.mask & GFX_MASK_PRIORITY) { gfx_draw_line_pixmap_i(_priority[0], nstart, nend, color.priority); @@ -117,7 +143,8 @@ int GfxDriver::drawFilledRect(rect_t rect, gfx_color_t color1, gfx_color_t color gfx_rectangle_fill_t shade_mode) { if (color1.mask & GFX_MASK_VISUAL) { for (int i = rect.y; i < rect.y + rect.height; i++) { - memset(_visual[0] + i * _mode->xsize + rect.x, color1.visual.parent_index, rect.width); + memset(_visual[0] + (i * _mode->xsize + rect.x) * _mode->bytespp, + color1.visual.parent_index, rect.width * _mode->bytespp); } } @@ -137,8 +164,10 @@ int GfxDriver::drawPixmap(gfx_pixmap_t *pxm, int priority, rect_t src, rect_t de return GFX_ERROR; } - gfx_crossblit_pixmap(_mode, pxm, priority, src, dest, _visual[bufnr], _mode->xsize, - _priority[bufnr]->index_data, _priority[bufnr]->index_width, 1, 0); + gfx_crossblit_pixmap(_mode, pxm, priority, src, dest, _visual[bufnr], + _mode->xsize * _mode->bytespp, + _priority[bufnr]->index_data, + _priority[bufnr]->index_width, 1, 0); return GFX_OK; } @@ -160,7 +189,9 @@ int GfxDriver::grabPixmap(rect_t src, gfx_pixmap_t *pxm, gfx_map_mask_t map) { pxm->width = src.width; pxm->height = src.height; for (int i = 0; i < src.height; i++) { - memcpy(pxm->data + i * src.width, _visual[0] + (i + src.y) * _mode->xsize + src.x, src.width); + memcpy(pxm->data + i * src.width * _mode->bytespp, + _visual[0] + _mode->bytespp * ((i + src.y) * _mode->xsize + src.x), + src.width * _mode->bytespp); } break; @@ -192,17 +223,18 @@ int GfxDriver::update(rect_t src, Common::Point dest, gfx_buffer_t buffer) { switch (buffer) { case GFX_BUFFER_BACK: for (int i = 0; i < src.height; i++) { - memcpy(_visual[0] + (dest.y + i) * _mode->xsize + dest.x, - _visual[1] + (src.y + i) * _mode->xsize + src.x, src.width); + memcpy(_visual[0] + _mode->bytespp * ( (dest.y + i) * _mode->xsize + dest.x), + _visual[1] + _mode->bytespp * ( (src.y + i) * _mode->xsize + src.x), src.width * _mode->bytespp ); } if ((src.x == dest.x) && (src.y == dest.y)) gfx_copy_pixmap_box_i(_priority[0], _priority[1], src); break; - case GFX_BUFFER_FRONT: - g_system->copyRectToScreen(_visual[0] + src.x + src.y * _mode->xsize, _mode->xsize, dest.x, dest.y, src.width, src.height); + case GFX_BUFFER_FRONT: { + g_system->copyRectToScreen(_visual[0] + _mode->bytespp * (src.x + src.y * _mode->xsize), _mode->xsize * _mode->bytespp, dest.x, dest.y, src.width, src.height); g_system->updateScreen(); break; + } default: GFXERROR("Invalid buffer %d in update!\n", buffer); return GFX_ERROR; @@ -212,7 +244,7 @@ int GfxDriver::update(rect_t src, Common::Point dest, gfx_buffer_t buffer) { } int GfxDriver::setStaticBuffer(gfx_pixmap_t *pic, gfx_pixmap_t *priority) { - memcpy(_visual[1], pic->data, _mode->xsize * _mode->ysize); + memcpy(_visual[1], pic->data, _mode->xsize * _mode->ysize * _mode->bytespp); gfx_copy_pixmap_box_i(_priority[1], priority, gfx_rect(0, 0, _mode->xsize, _mode->ysize)); return GFX_OK; diff --git a/engines/sci/gfx/gfx_driver.h b/engines/sci/gfx/gfx_driver.h index b74511de77..4017dc3918 100644 --- a/engines/sci/gfx/gfx_driver.h +++ b/engines/sci/gfx/gfx_driver.h @@ -29,6 +29,8 @@ #include "sci/gfx/gfx_system.h" #include "sci/uinput.h" +#include "graphics/pixelformat.h" + namespace Sci { enum gfx_buffer_t { @@ -66,12 +68,11 @@ class GfxDriver { public: /*** Initialization ***/ - GfxDriver(int xfact, int yfact, int bytespp); + GfxDriver(int xfact, int yfact, Graphics::PixelFormat mode); /* Attempts to initialize a specific graphics mode ** Parameters: (int x int) xres, yres: Horizontal and vertical scaling ** factors - ** (int) bytespp: Any of GFX_COLOR_MODE_*. GFX_COLOR_MODE_INDEX - ** implies color index mode. + ** (PixelFormat) mode: The mode to use ** Returns : (int) GFX_OK on success, GFX_ERROR if the mode could not be ** set, or GFX_FATAL if the graphics target is unuseable. ** The scaling factors apply to the standard SCI resolution of 320x200 pixels diff --git a/engines/sci/gfx/gfx_pixmap_scale.cpp b/engines/sci/gfx/gfx_pixmap_scale.cpp index 52c7b12396..37843743b9 100644 --- a/engines/sci/gfx/gfx_pixmap_scale.cpp +++ b/engines/sci/gfx/gfx_pixmap_scale.cpp @@ -70,14 +70,11 @@ void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale // Calculate all colors for (i = 0; i < pxm->colors_nr(); i++) { int col; - const PaletteEntry& color = pxm->palette->getColor(i); if (mode->palette) col = color.parent_index; else { - col = mode->red_mask & ((EXTEND_COLOR(color.r)) >> mode->red_shift); - col |= mode->green_mask & ((EXTEND_COLOR(color.g)) >> mode->green_shift); - col |= mode->blue_mask & ((EXTEND_COLOR(color.b)) >> mode->blue_shift); + col = mode->format.ARGBToColor(0, color.r, color.g, color.b); col |= alpha_ormask; } result_colors[i] = col; diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index c5269bc544..229470a658 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -268,7 +268,8 @@ void GfxResManager::setStaticPalette(Palette *newPalette) _staticPalette = newPalette; _staticPalette->name = "static palette"; - _staticPalette->mergeInto(_driver->getMode()->palette); + if (_driver->getMode()->palette) + _staticPalette->mergeInto(_driver->getMode()->palette); } #if 0 diff --git a/engines/sci/gfx/gfx_system.h b/engines/sci/gfx/gfx_system.h index bc25364b92..e1d56ee26d 100644 --- a/engines/sci/gfx/gfx_system.h +++ b/engines/sci/gfx/gfx_system.h @@ -30,6 +30,7 @@ #include "common/rect.h" #include "sci/tools.h" #include "sci/gfx/palette.h" +#include "graphics/pixelformat.h" namespace Sci { @@ -70,8 +71,10 @@ struct gfx_mode_t { // Palette mode is only supported for bytespp = 1 /* Color masks */ + // TODO: remove those uint32 red_mask, green_mask, blue_mask, alpha_mask; short red_shift, green_shift, blue_shift, alpha_shift; + Graphics::PixelFormat format; /* Each of the mask/shift pairs describe where the corresponding color ** values are stored for the described mode. Internally, color diff --git a/engines/sci/gfx/gfx_tools.cpp b/engines/sci/gfx/gfx_tools.cpp index e1378e14d0..4e570f5931 100644 --- a/engines/sci/gfx/gfx_tools.cpp +++ b/engines/sci/gfx/gfx_tools.cpp @@ -49,6 +49,7 @@ gfx_mode_t *gfx_new_mode(int xfact, int yfact, const Graphics::PixelFormat &form mode->xfact = xfact; mode->yfact = yfact; mode->bytespp = format.bytesPerPixel; + mode->format = format; // FIXME: I am not sure whether the following assignments are quite right. // The only code using these are the built-in scalers of the SCI engine. @@ -60,10 +61,10 @@ gfx_mode_t *gfx_new_mode(int xfact, int yfact, const Graphics::PixelFormat &form mode->green_mask = format.ARGBToColor(0, 0, 0xFF, 0); mode->blue_mask = format.ARGBToColor(0, 0, 0, 0xFF); mode->alpha_mask = format.ARGBToColor(0xFF, 0, 0, 0); - mode->red_shift = format.rLoss; - mode->green_shift = format.gLoss; - mode->blue_shift = format.bLoss; - mode->alpha_shift = format.aLoss; + mode->red_shift = format.rShift; + mode->green_shift = format.gShift; + mode->blue_shift = format.bShift; + mode->alpha_shift = format.aShift; } else { mode->red_mask = mode->green_mask = mode->blue_mask = 0; mode->alpha_mask = 0; diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp index cb73771528..56a8b8336b 100644 --- a/engines/sci/gfx/operations.cpp +++ b/engines/sci/gfx/operations.cpp @@ -411,9 +411,9 @@ static void init_aux_pixmap(gfx_pixmap_t **pixmap) { (*pixmap)->palette = new Palette(default_colors, DEFAULT_COLORS_NR); } -int gfxop_init(int version, bool isVGA, GfxState *state, gfx_options_t *options, ResourceManager *resManager, - int xfact, int yfact, gfx_color_mode_t bpp) { - int color_depth = bpp ? bpp : 1; +int gfxop_init(int version, bool isVGA, GfxState *state, + gfx_options_t *options, ResourceManager *resManager, + Graphics::PixelFormat mode, int xfact, int yfact) { int initialized = 0; BASIC_CHECKS(GFX_FATAL); @@ -430,7 +430,7 @@ int gfxop_init(int version, bool isVGA, GfxState *state, gfx_options_t *options, state->pic_port_bounds = gfx_rect(0, 10, 320, 190); state->_dirtyRects.clear(); - state->driver = new GfxDriver(xfact, yfact, bpp); + state->driver = new GfxDriver(xfact, yfact, mode); state->gfxResMan = new GfxResManager(version, isVGA, state->options, state->driver, resManager); @@ -1165,8 +1165,10 @@ static int _gfxop_set_pointer(GfxState *state, gfx_pixmap_t *pxm, Common::Point // may change when a new PIC is loaded. The cursor has to be regenerated // from this pxm at that point. (An alternative might be to ensure the // cursor only uses colours in the static part of the palette?) - if (pxm && pxm->palette) + if (pxm && state->driver->getMode()->palette) { + assert(pxm->palette); pxm->palette->mergeInto(state->driver->getMode()->palette); + } state->driver->setPointer(pxm, hotspot); return GFX_OK; @@ -1761,7 +1763,8 @@ static int _gfxop_set_pic(GfxState *state) { // FIXME: The _gfxop_install_pixmap call below updates the OSystem palette. // This is too soon, since it causes brief palette corruption until the // screen is updated too. (Possibly related: EngineState::pic_not_valid .) - state->pic->visual_map->palette->forceInto(state->driver->getMode()->palette); + if (state->driver->getMode()->palette) + state->pic->visual_map->palette->forceInto(state->driver->getMode()->palette); _gfxop_install_pixmap(state->driver, state->pic->visual_map); #ifdef CUSTOM_GRAPHICS_OPTIONS diff --git a/engines/sci/gfx/operations.h b/engines/sci/gfx/operations.h index d559d3b6d2..ed71c32b65 100644 --- a/engines/sci/gfx/operations.h +++ b/engines/sci/gfx/operations.h @@ -136,14 +136,14 @@ struct GfxState { /* Fundamental operations */ /**************************/ -int gfxop_init(int version, bool isVGA, GfxState *state, gfx_options_t *options, ResourceManager *resManager, - int xfact = 1, int yfact = 1, gfx_color_mode_t bpp = GFX_COLOR_MODE_INDEX); +int gfxop_init(int version, bool isVGA, GfxState *state, + gfx_options_t *options, ResourceManager *resManager, + Graphics::PixelFormat mode, int xfact = 1, int yfact = 1); /* Initializes a graphics mode ** Parameters: (int) version: The interpreter version ** (GfxState *) state: The state to initialize ** (int x int) xfact, yfact: Horizontal and vertical scale factors -** (gfx_color_mode_t) bpp: Bytes per pixel to initialize with, or -** 0 (GFX_COLOR_MODE_AUTO) to auto-detect +** (PixelFormat) mode: Graphics mode to use ** (gfx_options_t *) options: Rendering options ** (void *) misc_info: Additional information for the interpreter ** part of the resource loader diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index f58d729bf6..44ad13b93e 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -102,7 +102,15 @@ SciEngine::~SciEngine() { } Common::Error SciEngine::run() { + Graphics::PixelFormat gfxmode; +#ifdef ENABLE_RGB_COLOR + gfxmode = _system->getSupportedFormats().front(); + initGraphics(320, 200, false, gfxmode); + // TODO: check if this succeeded? (How?) +#else + gfxmode = Graphics::PixelFormat::createFormatCLUT8(); initGraphics(320, 200, false); +#endif // Create debugger console. It requires GFX to be initialized _console = new Console(this); @@ -222,7 +230,7 @@ Common::Error SciEngine::run() { #endif bool isVGA = _resmgr->_sciVersion >= SCI_VERSION_01_VGA && !(getFlags() & GF_SCI1_EGA); - if (gfxop_init(_resmgr->_sciVersion, isVGA, &gfx_state, &gfx_options, _resmgr)) { + if (gfxop_init(_resmgr->_sciVersion, isVGA, &gfx_state, &gfx_options, _resmgr, gfxmode, 1, 1)) { warning("Graphics initialization failed. Aborting..."); return Common::kUnknownError; } -- cgit v1.2.3 From fe65f6163c88b77a5997d47eff842b78812085be Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 26 Jun 2009 23:04:46 +0000 Subject: SCI: Fix typo breaking in-engine scaling svn-id: r41905 --- engines/sci/gfx/operations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp index 56a8b8336b..a730717ef8 100644 --- a/engines/sci/gfx/operations.cpp +++ b/engines/sci/gfx/operations.cpp @@ -1789,7 +1789,7 @@ int gfxop_new_pic(GfxState *state, int nr, int flags, int default_palette) { if (state->driver->getMode()->xfact == 1 && state->driver->getMode()->yfact == 1) { state->pic_unscaled = state->pic; } else { - state->pic = state->gfxResMan->getPic(nr, GFX_MASK_VISUAL, flags, default_palette, false); + state->pic_unscaled = state->gfxResMan->getPic(nr, GFX_MASK_VISUAL, flags, default_palette, false); } if (!state->pic || !state->pic_unscaled) { -- cgit v1.2.3 From 853aec05ba4485f0bfc90e7515322dfd56a8d4af Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 27 Jun 2009 05:58:44 +0000 Subject: changed initGraphics, and OSystem::initSize to take Graphics::PixelFormat * parameters instead of Graphics::PixelFormat parameters, to save unnecessary pixelformat initialization if ENABLE_RGB_COLOR is not set. svn-id: r41909 --- engines/engine.cpp | 7 +------ engines/engine.h | 7 +------ engines/groovie/groovie.cpp | 2 +- engines/scumm/scumm.cpp | 2 +- 4 files changed, 4 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 7a76de36dc..198bfceaed 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -124,12 +124,7 @@ void initCommonGFX(bool defaultTo1XScaler) { if (gameDomain && gameDomain->contains("fullscreen")) g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); } -void initGraphics(int width, int height, bool defaultTo1xScaler) { -#ifdef ENABLE_RGB_COLOR - initGraphics(width,height,defaultTo1xScaler, Graphics::PixelFormat::createFormatCLUT8()); -} -void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format) { -#endif +void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat *format) { g_system->beginGFXTransaction(); diff --git a/engines/engine.h b/engines/engine.h index 864450d6e1..67454629e7 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -29,9 +29,7 @@ #include "common/error.h" #include "common/fs.h" #include "common/str.h" -#ifdef ENABLE_RGB_COLOR #include "graphics/pixelformat.h" -#endif class OSystem; @@ -62,10 +60,7 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ -#ifdef ENABLE_RGB_COLOR -void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat format); -#endif -void initGraphics(int width, int height, bool defaultTo1xScaler); +void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat *format = NULL); /** * Initializes graphics and shows error message. diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 5b1a139dbe..9a22a18a21 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -74,7 +74,7 @@ Common::Error GroovieEngine::run() { case kGroovieV2: #ifdef ENABLE_RGB_COLOR _pixelFormat = _system->getSupportedFormats().front(); - initGraphics(640, 480, true, _pixelFormat); + initGraphics(640, 480, true, &_pixelFormat); break; #endif case kGroovieT7G: diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index cab8db2d45..fe38bbf82f 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1086,7 +1086,7 @@ Common::Error ScummEngine::init() { } else if (_game.features & GF_16BIT_COLOR) { #ifdef ENABLE_RGB_COLOR Graphics::PixelFormat format = Graphics::PixelFormat::createFormatRGB555(); - initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, format); + initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, &format); if (format != _system->getScreenFormat()) return Common::kUnsupportedColorMode; #else -- cgit v1.2.3 From 39e957d31320b2bc69a2a2ffcdb06e88c0302065 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Sat, 27 Jun 2009 08:16:21 +0000 Subject: Enabled RGB color support in SCI engine, corrected SCI engine's initGraphics call for modified API svn-id: r41911 --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 44ad13b93e..6a14c3032c 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -105,7 +105,7 @@ Common::Error SciEngine::run() { Graphics::PixelFormat gfxmode; #ifdef ENABLE_RGB_COLOR gfxmode = _system->getSupportedFormats().front(); - initGraphics(320, 200, false, gfxmode); + initGraphics(320, 200, false, &gfxmode); // TODO: check if this succeeded? (How?) #else gfxmode = Graphics::PixelFormat::createFormatCLUT8(); -- cgit v1.2.3 From 6f644324863437dedecb254bf088b33c914c7241 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sat, 27 Jun 2009 10:53:21 +0000 Subject: SCI: Use obtained instead of requested PixelFormat svn-id: r41912 --- engines/sci/sci.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 6a14c3032c..adcf302f51 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -106,11 +106,10 @@ Common::Error SciEngine::run() { #ifdef ENABLE_RGB_COLOR gfxmode = _system->getSupportedFormats().front(); initGraphics(320, 200, false, &gfxmode); - // TODO: check if this succeeded? (How?) #else - gfxmode = Graphics::PixelFormat::createFormatCLUT8(); initGraphics(320, 200, false); #endif + gfxmode = _system->getScreenFormat(); // Create debugger console. It requires GFX to be initialized _console = new Console(this); -- cgit v1.2.3 From 9e1916bcad3cc33a870bdbff5bd01b39e523492d Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Tue, 30 Jun 2009 07:30:57 +0000 Subject: renamed kTransactionPixelFormatNotSupported to kTransactionFormatNotSupported, retyped all Graphics::PixelFormat * parameters to const Graphics::PixelFormat *, (hopefully) repaired all memory leaks on screen and cursor format changes, provided OSystem::getScreenFormat and OSystem::getSupportedFormats methods for when ENABLE_RGB_COLOR is not set, completely forgot the "commit early, commit often" mantra. svn-id: r41972 --- engines/engine.cpp | 4 ++-- engines/engine.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 198bfceaed..8769219c2b 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -124,7 +124,7 @@ void initCommonGFX(bool defaultTo1XScaler) { if (gameDomain && gameDomain->contains("fullscreen")) g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); } -void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat *format) { +void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format) { g_system->beginGFXTransaction(); @@ -155,7 +155,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::Pixel // Just show warnings then these occur: #ifdef ENABLE_RGB_COLOR - if (gfxError & OSystem::kTransactionPixelFormatNotSupported) { + if (gfxError & OSystem::kTransactionFormatNotSupported) { Common::String message = "Could not initialize color format."; GUI::MessageDialog dialog(message); diff --git a/engines/engine.h b/engines/engine.h index 67454629e7..d59e8ed9bd 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -60,7 +60,7 @@ void initCommonGFX(bool defaultTo1XScaler); * Errors out when backend is not able to switch to the specified * mode. */ -void initGraphics(int width, int height, bool defaultTo1xScaler, Graphics::PixelFormat *format = NULL); +void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format = NULL); /** * Initializes graphics and shows error message. -- cgit v1.2.3 From 5e9285e8fa8eb2f0b01abc6caf93dc926f41d795 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 30 Jun 2009 08:25:08 +0000 Subject: Fixed a few formatting bits svn-id: r41973 --- engines/engine.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 8769219c2b..33eb424b76 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -124,6 +124,7 @@ void initCommonGFX(bool defaultTo1XScaler) { if (gameDomain && gameDomain->contains("fullscreen")) g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen")); } + void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format) { g_system->beginGFXTransaction(); -- cgit v1.2.3 From 03b501ee2442c8118deacb396af479e32a910dd4 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 30 Jun 2009 10:25:44 +0000 Subject: Groovie: Converted compile time checks for RGB modes support to runtime checks in order to fallback if the requested PixelFormat isn't available. svn-id: r41974 --- engines/groovie/groovie.cpp | 7 ++- engines/groovie/groovie.h | 3 +- engines/groovie/roq.cpp | 109 +++++++++++++++++++++----------------------- 3 files changed, 58 insertions(+), 61 deletions(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 9a22a18a21..4315644ab7 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -72,11 +72,14 @@ Common::Error GroovieEngine::run() { // Initialize the graphics switch (_gameDescription->version) { case kGroovieV2: -#ifdef ENABLE_RGB_COLOR + // Request the mode with the highest precision available _pixelFormat = _system->getSupportedFormats().front(); initGraphics(640, 480, true, &_pixelFormat); + + // Save the enabled mode as it can be both an RGB mode or CLUT8 + _pixelFormat = _system->getScreenFormat(); + _mode8bit = (_pixelFormat == Graphics::PixelFormat::createFormatCLUT8()); break; -#endif case kGroovieT7G: initGraphics(640, 480, true); break; diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h index 3f7f7cb0ed..bf57ae77de 100644 --- a/engines/groovie/groovie.h +++ b/engines/groovie/groovie.h @@ -85,9 +85,8 @@ protected: public: void waitForInput(); -#ifdef ENABLE_RGB_COLOR Graphics::PixelFormat _pixelFormat; -#endif + bool _mode8bit; Script _script; ResMan *_resMan; GrvCursorMan *_grvCursorMan; diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 56237655e9..cacc243c2c 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -47,52 +47,52 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) : _currBuf = new Graphics::Surface(); _prevBuf = new Graphics::Surface(); -#ifndef ENABLE_RGB_COLOR - byte pal[256 * 4]; + if (_vm->_mode8bit) { + byte pal[256 * 4]; #ifdef DITHER - byte pal3[256 * 3]; - // Initialize to a black palette - for (int i = 0; i < 256 * 3; i++) { - pal3[i] = 0; - } - - // Build a basic color palette - for (int r = 0; r < 4; r++) { - for (int g = 0; g < 4; g++) { - for (int b = 0; b < 4; b++) { - byte col = (r << 4) | (g << 2) | (b << 0); - pal3[3 * col + 0] = r << 6; - pal3[3 * col + 1] = g << 6; - pal3[3 * col + 2] = b << 6; + byte pal3[256 * 3]; + // Initialize to a black palette + for (int i = 0; i < 256 * 3; i++) { + pal3[i] = 0; + } + + // Build a basic color palette + for (int r = 0; r < 4; r++) { + for (int g = 0; g < 4; g++) { + for (int b = 0; b < 4; b++) { + byte col = (r << 4) | (g << 2) | (b << 0); + pal3[3 * col + 0] = r << 6; + pal3[3 * col + 1] = g << 6; + pal3[3 * col + 2] = b << 6; + } } } - } - // Initialize the dithering algorithm - _paletteLookup = new Graphics::PaletteLUT(8, Graphics::PaletteLUT::kPaletteYUV); - _paletteLookup->setPalette(pal3, Graphics::PaletteLUT::kPaletteRGB, 8); - for (int i = 0; (i < 64) && !_vm->shouldQuit(); i++) { - debug("Groovie::ROQ: Building palette table: %02d/63", i); - _paletteLookup->buildNext(); - } + // Initialize the dithering algorithm + _paletteLookup = new Graphics::PaletteLUT(8, Graphics::PaletteLUT::kPaletteYUV); + _paletteLookup->setPalette(pal3, Graphics::PaletteLUT::kPaletteRGB, 8); + for (int i = 0; (i < 64) && !_vm->shouldQuit(); i++) { + debug("Groovie::ROQ: Building palette table: %02d/63", i); + _paletteLookup->buildNext(); + } - // Prepare the palette to show - for (int i = 0; i < 256; i++) { - pal[(i * 4) + 0] = pal3[(i * 3) + 0]; - pal[(i * 4) + 1] = pal3[(i * 3) + 1]; - pal[(i * 4) + 2] = pal3[(i * 3) + 2]; - } + // Prepare the palette to show + for (int i = 0; i < 256; i++) { + pal[(i * 4) + 0] = pal3[(i * 3) + 0]; + pal[(i * 4) + 1] = pal3[(i * 3) + 1]; + pal[(i * 4) + 2] = pal3[(i * 3) + 2]; + } #else // !DITHER - // Set a grayscale palette - for (int i = 0; i < 256; i++) { - pal[(i * 4) + 0] = i; - pal[(i * 4) + 1] = i; - pal[(i * 4) + 2] = i; - } + // Set a grayscale palette + for (int i = 0; i < 256; i++) { + pal[(i * 4) + 0] = i; + pal[(i * 4) + 1] = i; + pal[(i * 4) + 2] = i; + } #endif // DITHER - _syst->setPalette(pal, 0, 256); -#endif // !ENABLE_RGB_COLOR + _syst->setPalette(pal, 0, 256); + } } ROQPlayer::~ROQPlayer() { @@ -160,26 +160,25 @@ void ROQPlayer::buildShowBuf() { byte *out = (byte *)_showBuf.getBasePtr(0, line); byte *in = (byte *)_prevBuf->getBasePtr(0, line / _scaleY); for (int x = 0; x < _showBuf.w; x++) { -#ifdef ENABLE_RGB_COLOR - // Do the format conversion (YUV -> RGB -> Screen format) - byte r, g, b; - Graphics::PaletteLUT::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); - // FIXME: this is fixed to 16bit - *(uint16 *)out = (uint16)_vm->_pixelFormat.RGBToColor(r, g, b); - - // Skip to the next pixel - out += _vm->_pixelFormat.bytesPerPixel; -#else // !ENABLE_RGB_COLOR + if (_vm->_mode8bit) { #ifdef DITHER - *out = _dither->dither(*in, *(in + 1), *(in + 2), x); + *out = _dither->dither(*in, *(in + 1), *(in + 2), x); #else - // Just use the luminancy component - *out = *in; + // Just use the luminancy component + *out = *in; #endif // DITHER - // Skip to the next pixel - out++; +#ifdef ENABLE_RGB_COLOR + } else { + // Do the format conversion (YUV -> RGB -> Screen format) + byte r, g, b; + Graphics::PaletteLUT::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); + // FIXME: this is fixed to 16bit + *(uint16 *)out = (uint16)_vm->_pixelFormat.RGBToColor(r, g, b); #endif // ENABLE_RGB_COLOR + } + // Skip to the next pixel + out += _vm->_pixelFormat.bytesPerPixel; if (!(x % _scaleX)) in += _prevBuf->bytesPerPixel; } @@ -335,11 +334,7 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) { // Allocate new buffers _currBuf->create(width, height, 3); _prevBuf->create(width, height, 3); -#ifdef ENABLE_RGB_COLOR _showBuf.create(width * _scaleX, height * _scaleY, _vm->_pixelFormat.bytesPerPixel); -#else - _showBuf.create(width * _scaleX, height * _scaleY, 1); -#endif // Clear the buffers with black YUV values byte *ptr1 = (byte *)_currBuf->getBasePtr(0, 0); -- cgit v1.2.3 From bf18c79ba602172fb5b01293b9dc2e98b75e2e09 Mon Sep 17 00:00:00 2001 From: Scott Thomas Date: Wed, 1 Jul 2009 15:08:11 +0000 Subject: Add JPEG support to 11H for ROQ playback svn-id: r41991 --- engines/groovie/roq.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index cacc243c2c..3868443e96 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -29,6 +29,8 @@ #include "groovie/groovie.h" #include "groovie/roq.h" +#include "graphics/jpeg.h" + #ifdef ENABLE_RGB_COLOR // Required for the YUV to RGB conversion #include "graphics/dither.h" @@ -485,18 +487,21 @@ void ROQPlayer::processBlockQuadVectorBlockSub(int baseX, int baseY, int8 Mx, in bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) { debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::ROQ: Processing still (JPEG) block"); - warning("Groovie::ROQ: JPEG frame (unimplemented)"); + warning("Groovie::ROQ: JPEG frame (unfinshed)"); + + Graphics::JPEG *jpg = new Graphics::JPEG(); + jpg->read(_file); + byte *y = (byte *)jpg->getComponent(1)->getBasePtr(0, 0); + byte *u = (byte *)jpg->getComponent(2)->getBasePtr(0, 0); + byte *v = (byte *)jpg->getComponent(3)->getBasePtr(0, 0); - // HACK: Initialize to a black frame - //memset(_prevBuf->getBasePtr(0, 0), 0, _prevBuf->w * _prevBuf->h * _prevBuf->bytesPerPixel); byte *ptr = (byte *)_prevBuf->getBasePtr(0, 0); for (int i = 0; i < _prevBuf->w * _prevBuf->h; i++) { - *ptr++ = 0; - *ptr++ = 128; - *ptr++ = 128; + *ptr++ = *y++; + *ptr++ = *u++; + *ptr++ = *v++; } - _file->skip(blockHeader.size); return true; } -- cgit v1.2.3 From d42f054f0b9c20764ac7eed31cd1ad11e69dc426 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Fri, 3 Jul 2009 23:02:37 +0000 Subject: Moved the YUV<->RGB routines to graphics/conversion.h svn-id: r42080 --- engines/gob/video_v6.cpp | 5 +++-- engines/groovie/roq.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp index c4efadde90..f0d554bd01 100644 --- a/engines/gob/video_v6.cpp +++ b/engines/gob/video_v6.cpp @@ -25,6 +25,7 @@ #include "common/endian.h" #include "common/savefile.h" +#include "graphics/conversion.h" #include "graphics/dither.h" #include "gob/gob.h" @@ -45,8 +46,8 @@ void Video_v6::setPrePalette() { for (int i = 0; i < 256; i++) { byte r, g, b; - Graphics::PaletteLUT::YUV2RGB(fpal[i * 3 + 0], fpal[i * 3 + 1], fpal[i * 3 + 2], - r, g, b); + Graphics::YUV2RGB(fpal[i * 3 + 0], fpal[i * 3 + 1], fpal[i * 3 + 2], + r, g, b); tpal[i * 3 + 0] = r >> 2; tpal[i * 3 + 1] = g >> 2; diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 3868443e96..4c8bbe55ac 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -33,7 +33,7 @@ #ifdef ENABLE_RGB_COLOR // Required for the YUV to RGB conversion -#include "graphics/dither.h" +#include "graphics/conversion.h" #endif #include "sound/mixer.h" @@ -173,7 +173,7 @@ void ROQPlayer::buildShowBuf() { } else { // Do the format conversion (YUV -> RGB -> Screen format) byte r, g, b; - Graphics::PaletteLUT::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); + Graphics::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); // FIXME: this is fixed to 16bit *(uint16 *)out = (uint16)_vm->_pixelFormat.RGBToColor(r, g, b); #endif // ENABLE_RGB_COLOR -- cgit v1.2.3 From 4b1c6b526dbfa8d084fbd2475b4d4caa173e442c Mon Sep 17 00:00:00 2001 From: Henry Bush Date: Sun, 5 Jul 2009 22:57:58 +0000 Subject: Groovie: get hotspots working correctly in 11H RGB svn-id: r42158 --- engines/groovie/graphics.cpp | 4 ++-- engines/groovie/groovie.cpp | 1 + engines/groovie/script.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp index 647eaa913b..1e54f0e79b 100644 --- a/engines/groovie/graphics.cpp +++ b/engines/groovie/graphics.cpp @@ -31,8 +31,8 @@ namespace Groovie { GraphicsMan::GraphicsMan(GroovieEngine *vm) : _vm(vm), _changed(false), _fading(0) { // Create the game surfaces - _foreground.create(640, 320, 1); - _background.create(640, 320, 1); + _foreground.create(640, 320, _vm->_pixelFormat.bytesPerPixel); + _background.create(640, 320, _vm->_pixelFormat.bytesPerPixel); } GraphicsMan::~GraphicsMan() { diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index f5db99dd4a..24f47351a3 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -82,6 +82,7 @@ Common::Error GroovieEngine::run() { break; case kGroovieT7G: initGraphics(640, 480, true); + _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); break; } diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index eb53842b91..934400fb15 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -354,7 +354,7 @@ bool Script::hotspot(Common::Rect rect, uint16 address, uint8 cursor) { Common::isDebugChannelEnabled(kGroovieDebugAll)) { rect.translate(0, -80); _vm->_graphicsMan->_foreground.frameRect(rect, 250); - _vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), 640, 0, 80, 640, 320); + _vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320); _vm->_system->updateScreen(); } -- cgit v1.2.3 From 22e09bedaaf125365c6905187db80e939a86df53 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 6 Jul 2009 07:40:28 +0000 Subject: Updated doxygen comments on API functions svn-id: r42166 --- engines/engine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines') diff --git a/engines/engine.h b/engines/engine.h index c643d5895f..d570f18073 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -59,6 +59,8 @@ void initCommonGFX(bool defaultTo1XScaler); * * Errors out when backend is not able to switch to the specified * mode. + * + * Defaults to 256 color paletted mode if no graphics format is provided. */ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format = NULL); -- cgit v1.2.3 From c233459359ba43aeb6421469b32086036901a394 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 6 Jul 2009 17:19:50 +0000 Subject: Groovie: Fix most ROQ glitches svn-id: r42182 --- engines/groovie/roq.cpp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'engines') diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 4c8bbe55ac..7389bda112 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -160,7 +160,7 @@ void ROQPlayer::buildShowBuf() { for (int line = 0; line < _showBuf.h; line++) { byte *out = (byte *)_showBuf.getBasePtr(0, line); - byte *in = (byte *)_prevBuf->getBasePtr(0, line / _scaleY); + byte *in = (byte *)_currBuf->getBasePtr(0, line / _scaleY); for (int x = 0; x < _showBuf.w; x++) { if (_vm->_mode8bit) { #ifdef DITHER @@ -182,12 +182,17 @@ void ROQPlayer::buildShowBuf() { // Skip to the next pixel out += _vm->_pixelFormat.bytesPerPixel; if (!(x % _scaleX)) - in += _prevBuf->bytesPerPixel; + in += _currBuf->bytesPerPixel; } #ifdef DITHER _dither->nextLine(); #endif } + + // Swap buffers + Graphics::Surface *tmp = _prevBuf; + _prevBuf = _currBuf; + _currBuf = tmp; } bool ROQPlayer::playFrameInternal() { @@ -200,7 +205,7 @@ bool ROQPlayer::playFrameInternal() { } if (_dirty) { - // Build the show buffer from the previous (back) buffer + // Build the show buffer from the current buffer buildShowBuf(); } @@ -260,19 +265,15 @@ bool ROQPlayer::processBlock() { case 0x1002: // Quad codebook definition ok = processBlockQuadCodebook(blockHeader); break; - case 0x1011: { // Quad vector quantised video frame + case 0x1011: // Quad vector quantised video frame ok = processBlockQuadVector(blockHeader); _dirty = true; endframe = true; - - // Swap buffers - Graphics::Surface *tmp = _prevBuf; - _prevBuf = _currBuf; - _currBuf = tmp; break; - } case 0x1012: // Still image (JPEG) ok = processBlockStill(blockHeader); + _dirty = true; + endframe = true; break; case 0x1013: // Hang assert(blockHeader.size == 0 && blockHeader.param == 0); @@ -495,12 +496,13 @@ bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) { byte *u = (byte *)jpg->getComponent(2)->getBasePtr(0, 0); byte *v = (byte *)jpg->getComponent(3)->getBasePtr(0, 0); - byte *ptr = (byte *)_prevBuf->getBasePtr(0, 0); - for (int i = 0; i < _prevBuf->w * _prevBuf->h; i++) { + byte *ptr = (byte *)_currBuf->getBasePtr(0, 0); + for (int i = 0; i < _currBuf->w * _currBuf->h; i++) { *ptr++ = *y++; *ptr++ = *u++; *ptr++ = *v++; } + memcpy(_prevBuf->getBasePtr(0, 0), _currBuf->getBasePtr(0, 0), _prevBuf->w * _prevBuf->h * 3); return true; } -- cgit v1.2.3 From 2c5d11b67b35f93b2292c1ca56d0c9fc89608921 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Tue, 7 Jul 2009 07:50:40 +0000 Subject: Removed PixelFormat convenience constructors at behest of Max and Eugene. svn-id: r42207 --- engines/groovie/groovie.cpp | 4 ++-- engines/scumm/scumm.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index cdf05e803b..c2f13e4f74 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -78,11 +78,11 @@ Common::Error GroovieEngine::run() { // Save the enabled mode as it can be both an RGB mode or CLUT8 _pixelFormat = _system->getScreenFormat(); - _mode8bit = (_pixelFormat == Graphics::PixelFormat::createFormatCLUT8()); + _mode8bit = (_pixelFormat == Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0)); break; case kGroovieT7G: initGraphics(640, 480, true); - _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); + _pixelFormat = Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0); break; } diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index c6ed7b71cc..347abee190 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1085,7 +1085,8 @@ Common::Error ScummEngine::init() { (_screenWidth * _textSurfaceMultiplier > 320)); } else if (_game.features & GF_16BIT_COLOR) { #ifdef ENABLE_RGB_COLOR - Graphics::PixelFormat format = Graphics::PixelFormat::createFormatRGB555(); + Graphics::PixelFormat format = Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0) +; initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, &format); if (format != _system->getScreenFormat()) return Common::kUnsupportedColorMode; -- cgit v1.2.3 From 566c3bb781b8d4fbd86f8a3b24cea3438cd63a75 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 7 Jul 2009 09:38:08 +0000 Subject: Groovie: Fix a memory leak in still frames svn-id: r42210 --- engines/groovie/roq.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 856befe63f..538b1b7111 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -505,6 +505,7 @@ bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) { } memcpy(_prevBuf->getBasePtr(0, 0), _currBuf->getBasePtr(0, 0), _prevBuf->w * _prevBuf->h * 3); + delete jpg; return true; } -- cgit v1.2.3 From 1f9c1e4c441ffa0c18f6087fd4240a44e05a2fbf Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 7 Jul 2009 11:18:40 +0000 Subject: Groovie: Added video skipping functionality in 11h, verified some opcode usage in v2 and some bits of formatting svn-id: r42213 --- engines/groovie/groovie.cpp | 7 +++- engines/groovie/script.cpp | 98 ++++++++++++++++++++++++++++----------------- engines/groovie/script.h | 7 +++- 3 files changed, 72 insertions(+), 40 deletions(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index c2f13e4f74..039efd2c49 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -218,13 +218,18 @@ Common::Error GroovieEngine::run() { case Common::EVENT_LBUTTONDOWN: // Send the event to the scripts - _script.setMouseClick(); + _script.setMouseClick(1); // Continue the script execution to handle // the click _waitingForInput = false; break; + case Common::EVENT_RBUTTONDOWN: + // Send the event to the scripts (to skip the video) + _script.setMouseClick(2); + break; + case Common::EVENT_QUIT: quitGame(); break; diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 934400fb15..6dd1124fce 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -101,6 +101,7 @@ Script::Script(GroovieEngine *vm, EngineVersion version) : _hotspotSlot = (uint16)-1; _oldInstruction = (uint16)-1; + _videoSkipAddress = 0; } Script::~Script() { @@ -230,8 +231,8 @@ void Script::step() { (this->*op)(); } -void Script::setMouseClick() { - _eventMouseClicked = true; +void Script::setMouseClick(uint8 button) { + _eventMouseClicked = button; } void Script::setKbdChar(uint8 c) { @@ -525,7 +526,6 @@ void Script::o_videofromref() { // 0x09 bool Script::playvideofromref(uint32 fileref) { // It isn't the current video, open it if (fileref != _videoRef) { - // Debug bitflags debugScript(1, false, "Play video 0x%04X (bitflags:", fileref); for (int i = 15; i >= 0; i--) { @@ -554,6 +554,21 @@ bool Script::playvideofromref(uint32 fileref) { } _bitflags = 0; + + // Reset the clicked mouse events + _eventMouseClicked = 0; + } + + // Check if the user wants to skip the video + if ((_eventMouseClicked == 2) && (_videoSkipAddress != 0)) { + // Jump to the given address + _currentInstruction = _videoSkipAddress; + + // Reset the skip address + _videoSkipAddress = 0; + + // End the playback + return true; } // Video available, play one frame @@ -567,7 +582,7 @@ bool Script::playvideofromref(uint32 fileref) { _videoRef = 0; // Clear the input events while playing the video - _eventMouseClicked = false; + _eventMouseClicked = 0; _eventKbdChar = 0; // Newline @@ -598,8 +613,8 @@ void Script::o_inputloopstart() { //0x0B _inputLoopAddress = _currentInstruction - 1; // Save the current mouse state for the whole loop - _mouseClicked = _eventMouseClicked; - _eventMouseClicked = false; + _mouseClicked = (_eventMouseClicked == 1); + _eventMouseClicked = 0; // Save the current pressed character for the whole loop _kbdChar = _eventKbdChar; @@ -1378,7 +1393,7 @@ void Script::o_sub() { void Script::o_cellmove() { uint16 arg = readScript8bits(); byte *scriptBoard = &_variables[0x19]; - byte *board = (byte*) malloc (BOARDSIZE * BOARDSIZE * sizeof(byte)); + byte *board = (byte *) malloc (BOARDSIZE * BOARDSIZE * sizeof(byte)); byte startX, startY, endX, endY; debugScript(1, true, "CELL MOVE var[0x%02X]", arg); @@ -1396,14 +1411,13 @@ void Script::o_cellmove() { debugScript(1, false, "\n"); } - CellGame staufsMove((byte*) board); - staufsMove.calcMove((byte*) board, CELL_GREEN, 2); + CellGame staufsMove((byte *) board); + staufsMove.calcMove((byte *) board, CELL_GREEN, 2); startX = staufsMove.getStartX(); startY = staufsMove.getStartY(); endX = staufsMove.getEndX(); endY = staufsMove.getEndY(); - // Set the movement origin setVariable(0, startY); // y setVariable(1, startX); // x @@ -1411,7 +1425,7 @@ void Script::o_cellmove() { setVariable(2, endY); setVariable(3, endX); - free (board); + free(board); } void Script::o_returnscript() { @@ -1535,20 +1549,19 @@ void Script::o_stub59() { debugScript(1, true, "STUB59: 0x%04X 0x%02X", val1, val2); } -void Script::o2_playsong(){ +void Script::o2_playsong() { uint32 fileref = readScript32bits(); debugScript(1, true, "PlaySong(0x%08X): Play xmidi file", fileref); _vm->_musicPlayer->playSong(fileref); - } -void Script::o2_setbackgroundsong(){ +void Script::o2_setbackgroundsong() { uint32 fileref = readScript32bits(); debugScript(1, true, "SetBackgroundSong(0x%08X)", fileref); _vm->_musicPlayer->setBackgroundSong(fileref); } -void Script::o2_videofromref(){ +void Script::o2_videofromref() { uint32 fileref = readScript32bits(); // Show the debug information just when starting the playback @@ -1556,6 +1569,7 @@ void Script::o2_videofromref(){ debugScript(1, true, "VIDEOFROMREF(0x%08X) (Not fully imp): Play video file from ref", fileref); debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Playing video 0x%08X via 0x09", fileref); } + // Play the video if (!playvideofromref(fileref)) { // Move _currentInstruction back @@ -1563,7 +1577,7 @@ void Script::o2_videofromref(){ } } -void Script::o2_vdxtransition(){ +void Script::o2_vdxtransition() { uint32 fileref = readScript32bits(); // Show the debug information just when starting the playback @@ -1587,11 +1601,21 @@ void Script::o2_vdxtransition(){ } } -void Script::o2_stub52(){ +void Script::o2_setvideoskip() { + _videoSkipAddress = readScript16bits(); + debugScript(1, true, "SetVideoSkip (0x%04X)", _videoSkipAddress); +} + +void Script::o2_stub52() { uint8 arg = readScript8bits(); debugScript(1, true, "STUB52 (0x%02X)", arg); } +void Script::o2_setscriptend() { + uint16 arg = readScript16bits(); + debugScript(1, true, "SetScriptEnd (0x%04X)", arg); +} + Script::OpcodeFunc Script::_opcodesT7G[NUM_OPCODES] = { &Script::o_nop, // 0x00 &Script::o_nop, @@ -1692,11 +1716,11 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_invalid, // 0x00 &Script::o_nop, &Script::o2_playsong, - &Script::o_bf9on, - &Script::o_palfadeout, // 0x04 - &Script::o_bf8on, - &Script::o_bf6on, - &Script::o_bf7on, + &Script::o_nop, + &Script::o_nop, // 0x04 + &Script::o_nop, + &Script::o_nop, + &Script::o_nop, &Script::o2_setbackgroundsong, // 0x08 &Script::o2_videofromref, &Script::o_bf5on, @@ -1719,7 +1743,7 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_xor_obfuscate, &Script::o2_vdxtransition, // 0x1C &Script::o_swap, - &Script::o_nop8, + &Script::o_invalid, &Script::o_inc, &Script::o_dec, // 0x20 &Script::o_strcmpnejmp_var, @@ -1729,10 +1753,10 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_add, &Script::o_videofromstring1, &Script::o_videofromstring2, - &Script::o_nop16, // 0x28 - &Script::o_stopmidi, - &Script::o_endscript, + &Script::o_invalid, // 0x28 &Script::o_nop, + &Script::o_endscript, + &Script::o_invalid, &Script::o_sethotspottop, // 0x2C &Script::o_sethotspotbottom, &Script::o_loadgame, @@ -1759,22 +1783,22 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_returnscript, &Script::o_sethotspotright, // 0x44 &Script::o_sethotspotleft, - &Script::o_nop, - &Script::o_nop, - &Script::o_nop8, // 0x48 - &Script::o_nop, - &Script::o_nop16, - &Script::o_nop8, - &Script::o_getcd, // 0x4C - &Script::o_playcd, + &Script::o_invalid, + &Script::o_invalid, + &Script::o_invalid, // 0x48 + &Script::o_invalid, &Script::o_nop16, + &Script::o_invalid, + &Script::o_invalid, // 0x4C + &Script::o_invalid, + &Script::o_invalid, &Script::o_nop16, &Script::o_nop16, // 0x50 - &Script::o_nop16, + &Script::o2_setvideoskip, &Script::o2_stub52, &Script::o_hotspot_outrect, - &Script::o_nop, // 0x54 - &Script::o_nop16, + &Script::o_invalid, // 0x54 + &Script::o2_setscriptend, &Script::o_stub56, &Script::o_invalid, &Script::o_invalid, // 0x58 diff --git a/engines/groovie/script.h b/engines/groovie/script.h index 664cac82d8..8a95f093ce 100644 --- a/engines/groovie/script.h +++ b/engines/groovie/script.h @@ -57,7 +57,7 @@ public: void directGameLoad(int slot); void step(); - void setMouseClick(); + void setMouseClick(uint8 button); void setKbdChar(uint8 c); Common::String &getContext(); @@ -95,7 +95,7 @@ private: // Input bool _mouseClicked; - bool _eventMouseClicked; + uint8 _eventMouseClicked; uint8 _kbdChar; uint8 _eventKbdChar; uint16 _inputLoopAddress; @@ -114,6 +114,7 @@ private: Common::SeekableReadStream *_videoFile; uint32 _videoRef; uint16 _bitflags; + uint16 _videoSkipAddress; // Debugging Debugger *_debugger; @@ -224,7 +225,9 @@ private: void o2_setbackgroundsong(); void o2_videofromref(); void o2_vdxtransition(); + void o2_setvideoskip(); void o2_stub52(); + void o2_setscriptend(); }; } // End of Groovie namespace -- cgit v1.2.3 From 828ed66555b99363fed62b4cbb83c36de68c3024 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Wed, 8 Jul 2009 16:07:58 +0000 Subject: Reinstated static inline Graphics::PixelFormat::createFormatCLUT8(), which I am told was not supposed to be removed with the others. svn-id: r42268 --- engines/groovie/groovie.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 039efd2c49..6f985ddad5 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -78,11 +78,11 @@ Common::Error GroovieEngine::run() { // Save the enabled mode as it can be both an RGB mode or CLUT8 _pixelFormat = _system->getScreenFormat(); - _mode8bit = (_pixelFormat == Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0)); + _mode8bit = (_pixelFormat == Graphics::PixelFormat::createFormatCLUT8()); break; case kGroovieT7G: initGraphics(640, 480, true); - _pixelFormat = Graphics::PixelFormat(1, 8, 8, 8, 8, 0, 0, 0, 0); + _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); break; } -- cgit v1.2.3 From cdad3763dfbacf45599034358a32fc68032e1a30 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Thu, 9 Jul 2009 09:09:05 +0000 Subject: Corrected lingering formatting errors that were introduced by the find-and-replace assisted removal of Graphics::PixelFormat::createFormat functions. svn-id: r42281 --- engines/scumm/scumm.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 347abee190..57283c1fbe 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1085,8 +1085,7 @@ Common::Error ScummEngine::init() { (_screenWidth * _textSurfaceMultiplier > 320)); } else if (_game.features & GF_16BIT_COLOR) { #ifdef ENABLE_RGB_COLOR - Graphics::PixelFormat format = Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0) -; + Graphics::PixelFormat format = Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, &format); if (format != _system->getScreenFormat()) return Common::kUnsupportedColorMode; -- cgit v1.2.3 From 2f370ef8ab65db8443c496c47de98740b31c4220 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 10 Jul 2009 10:43:48 +0000 Subject: Overloaded initGraphics to provide for simpler procedures for engines supporting more than one format. svn-id: r42330 --- engines/engine.cpp | 16 +++++++++++++++- engines/engine.h | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 1fd77eb310..399f188962 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -131,7 +131,13 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: initCommonGFX(defaultTo1xScaler); #ifdef ENABLE_RGB_COLOR - g_system->initSize(width, height, format); + if (format) + g_system->initSize(width, height, format); + else { + Graphics::PixelFormat Format = g_system->getSupportedFormats().front(); + debug("%d,%X,%X,%X",Format.bytesPerPixel << 3, Format.rBits(), Format.gBits(), Format.bBits()); + g_system->initSize(width, height, &Format); + } #else g_system->initSize(width, height); #endif @@ -183,6 +189,14 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: dialog.runModal(); } } +void initGraphics(int width, int height, bool defaultTo1xScaler, const Common::List &formatList) { + Graphics::PixelFormat format = Graphics::findCompatibleFormat(g_system->getSupportedFormats(),formatList); + initGraphics(width,height,defaultTo1xScaler,&format); +} +void initGraphics(int width, int height, bool defaultTo1xScaler) { + Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8(); + initGraphics(width,height,defaultTo1xScaler,&format); +} void GUIErrorMessage(const Common::String msg) { g_system->setWindowCaption("Error"); diff --git a/engines/engine.h b/engines/engine.h index d570f18073..0f5585378b 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -62,7 +62,9 @@ void initCommonGFX(bool defaultTo1XScaler); * * Defaults to 256 color paletted mode if no graphics format is provided. */ -void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format = NULL); +void initGraphics(int width, int height, bool defaultTo1xScaler); +void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format); +void initGraphics(int width, int height, bool defaultTo1xScaler, const Common::List &formatList); /** * Initializes graphics and shows error message. -- cgit v1.2.3 From bb1da36710b8ddc5dd3d4bbf7414dd20b7a646b3 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 10 Jul 2009 10:45:15 +0000 Subject: Simplified SCI and groovie's initial graphics setup making use of the overloaded functions. svn-id: r42331 --- engines/groovie/groovie.cpp | 3 +-- engines/sci/sci.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 6f985ddad5..bb4e142196 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -73,8 +73,7 @@ Common::Error GroovieEngine::run() { switch (_gameDescription->version) { case kGroovieV2: // Request the mode with the highest precision available - _pixelFormat = _system->getSupportedFormats().front(); - initGraphics(640, 480, true, &_pixelFormat); + initGraphics(640, 480, true, NULL); // Save the enabled mode as it can be both an RGB mode or CLUT8 _pixelFormat = _system->getScreenFormat(); diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index dbb8d4784a..cf08c69738 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -106,8 +106,7 @@ SciEngine::~SciEngine() { Common::Error SciEngine::run() { Graphics::PixelFormat gfxmode; #ifdef ENABLE_RGB_COLOR - gfxmode = _system->getSupportedFormats().front(); - initGraphics(320, 200, false, &gfxmode); + initGraphics(320, 200, false, NULL); #else initGraphics(320, 200, false); #endif -- cgit v1.2.3 From ddcab8169f45055c8272648279c3dd96432ba956 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Fri, 10 Jul 2009 10:47:25 +0000 Subject: updated comment on initGraphics as I should have done before commiting r42330. svn-id: r42332 --- engines/engine.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines') diff --git a/engines/engine.h b/engines/engine.h index 0f5585378b..cd39c0065d 100644 --- a/engines/engine.h +++ b/engines/engine.h @@ -61,6 +61,8 @@ void initCommonGFX(bool defaultTo1XScaler); * mode. * * Defaults to 256 color paletted mode if no graphics format is provided. + * Uses the backend's preferred format if graphics format pointer is NULL. + * Finds the best compatible format if a list of graphics formats is provided. */ void initGraphics(int width, int height, bool defaultTo1xScaler); void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics::PixelFormat *format); -- cgit v1.2.3 From 79e03a92a5782797dd5beacef3a63ed3dbdee68d Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 13 Jul 2009 19:24:41 +0000 Subject: Removed an unneeded debug console output from initGraphics svn-id: r42450 --- engines/engine.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 399f188962..eb46add82f 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -135,7 +135,6 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: g_system->initSize(width, height, format); else { Graphics::PixelFormat Format = g_system->getSupportedFormats().front(); - debug("%d,%X,%X,%X",Format.bytesPerPixel << 3, Format.rBits(), Format.gBits(), Format.bBits()); g_system->initSize(width, height, &Format); } #else -- cgit v1.2.3 From cdf751accda346f5d96e3fdfa2fd4a1b92ed4d19 Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Tue, 14 Jul 2009 08:27:36 +0000 Subject: changed generic Graphics::PixelFormat constructor to take xBits instead of xLoss. Modified OSystem_SDL::getSupportedFormats and ScummEngine::init to account for this change. svn-id: r42467 --- engines/scumm/scumm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 8d078f12d4..a00ace1f49 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1085,7 +1085,7 @@ Common::Error ScummEngine::init() { (_screenWidth * _textSurfaceMultiplier > 320)); } else if (_game.features & GF_16BIT_COLOR) { #ifdef ENABLE_RGB_COLOR - Graphics::PixelFormat format = Graphics::PixelFormat(2, 3, 3, 3, 8, 10, 5, 0, 0); + Graphics::PixelFormat format = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, &format); if (format != _system->getScreenFormat()) return Common::kUnsupportedColorMode; -- cgit v1.2.3 From a565441f0cce65b6a3bee713c1e88f2ad7c67c76 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 28 Jul 2009 22:33:20 +0000 Subject: Added missing initializer for member ‘Sci::gfx_mode_t::format' svn-id: r42867 --- engines/sci/gfx/gfx_resmgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index cd5b1be431..ca61b534ed 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -326,7 +326,8 @@ gfx_mode_t mode_1x1_color_index = { /* Fake 1x1 mode */ /* palette */ NULL, /* color masks */ 0, 0, 0, 0, - /* color shifts */ 0, 0, 0, 0 + /* color shifts */ 0, 0, 0, 0, + Graphics::PixelFormat() }; gfxr_pic_t *GfxResManager::getPic(int num, int maps, int flags, int default_palette, bool scaled) { -- cgit v1.2.3 From 8e417b0884e676ff5fe297d1642c9d8499ad9b90 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sat, 15 Aug 2009 14:50:21 +0000 Subject: Fix compile when compiling with --disable-he svn-id: r43410 --- engines/scumm/akos.cpp | 4 ++++ engines/scumm/cursor.cpp | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'engines') diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index f4bb8a2c8b..c7f53b9763 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -299,6 +299,7 @@ void AkosRenderer::setPalette(uint16 *new_palette) { if (size > 256) error("akos_setPalette: %d is too many colors", size); +#ifdef ENABLE_HE if (_vm->_game.features & GF_16BIT_COLOR) { if (_paletteNum) { for (i = 0; i < size; i++) @@ -317,10 +318,13 @@ void AkosRenderer::setPalette(uint16 *new_palette) { for (i = 0; i < size; i++) _palette[i] = (byte)_vm->_hePalettes[_paletteNum * _vm->_hePaletteSlot + 768 + akpl[i]]; } else { +#endif for (i = 0; i < size; i++) { _palette[i] = new_palette[i] != 0xFF ? new_palette[i] : akpl[i]; } +#ifdef ENABLE_HE } +#endif if (_vm->_game.heversion == 70) { for (i = 0; i < size; i++) diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 66ac68bd95..5af25e95ef 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -194,15 +194,19 @@ void ScummEngine_v70he::setDefaultCursor() { for (j = 0; j < 32; j++) { switch ((p & (0x3 << 14)) >> 14) { case 1: +#ifdef ENABLE_HE if (_bitDepth == 2) WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[4], palette[5], palette[6])); else +#endif _grabbedCursor[32 * i + j] = 0xfe; break; case 2: +#ifdef ENABLE_HE if (_bitDepth == 2) WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[0], palette[1], palette[2])); else +#endif _grabbedCursor[32 * i + j] = 0xfd; break; default: -- cgit v1.2.3 From 09845556e0383fb187f548c7cfc1a68b22329f7e Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 16 Aug 2009 00:20:23 +0000 Subject: Revert revision 43410, and add alternative fix. svn-id: r43416 --- engines/scumm/akos.cpp | 4 ---- engines/scumm/cursor.cpp | 4 ---- engines/scumm/he/palette_he.cpp | 21 --------------------- engines/scumm/palette.cpp | 21 +++++++++++++++++++++ 4 files changed, 21 insertions(+), 29 deletions(-) (limited to 'engines') diff --git a/engines/scumm/akos.cpp b/engines/scumm/akos.cpp index c7f53b9763..f4bb8a2c8b 100644 --- a/engines/scumm/akos.cpp +++ b/engines/scumm/akos.cpp @@ -299,7 +299,6 @@ void AkosRenderer::setPalette(uint16 *new_palette) { if (size > 256) error("akos_setPalette: %d is too many colors", size); -#ifdef ENABLE_HE if (_vm->_game.features & GF_16BIT_COLOR) { if (_paletteNum) { for (i = 0; i < size; i++) @@ -318,13 +317,10 @@ void AkosRenderer::setPalette(uint16 *new_palette) { for (i = 0; i < size; i++) _palette[i] = (byte)_vm->_hePalettes[_paletteNum * _vm->_hePaletteSlot + 768 + akpl[i]]; } else { -#endif for (i = 0; i < size; i++) { _palette[i] = new_palette[i] != 0xFF ? new_palette[i] : akpl[i]; } -#ifdef ENABLE_HE } -#endif if (_vm->_game.heversion == 70) { for (i = 0; i < size; i++) diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 5af25e95ef..66ac68bd95 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -194,19 +194,15 @@ void ScummEngine_v70he::setDefaultCursor() { for (j = 0; j < 32; j++) { switch ((p & (0x3 << 14)) >> 14) { case 1: -#ifdef ENABLE_HE if (_bitDepth == 2) WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[4], palette[5], palette[6])); else -#endif _grabbedCursor[32 * i + j] = 0xfe; break; case 2: -#ifdef ENABLE_HE if (_bitDepth == 2) WRITE_UINT16(_grabbedCursor + 64 * i + j * 2, get16BitColor(palette[0], palette[1], palette[2])); else -#endif _grabbedCursor[32 * i + j] = 0xfd; break; default: diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp index 02f3f3fc5c..ff29f9ecd0 100644 --- a/engines/scumm/he/palette_he.cpp +++ b/engines/scumm/he/palette_he.cpp @@ -33,27 +33,6 @@ namespace Scumm { -uint8 *ScummEngine::getHEPaletteSlot(uint16 palSlot) { - assertRange(0, palSlot, _numPalettes, "palette"); - - if (_game.heversion >= 99) { - if (palSlot) - return _hePalettes + palSlot * _hePaletteSlot + 768; - else - return _hePalettes + _hePaletteSlot + 768; - } - - return NULL; -} - -uint16 ScummEngine::get16BitColor(uint8 r, uint8 g, uint8 b) { - uint16 ar = (r >> 3) << 10; - uint16 ag = (g >> 3) << 5; - uint16 ab = (b >> 3) << 0; - uint16 col = ar | ag | ab; - return col; -} - void ScummEngine_v71he::remapHEPalette(const uint8 *src, uint8 *dst) { int r, g, b, sum, bestitem, bestsum; int ar, ag, ab; diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index f59b59b40f..a596cc5b1a 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -33,6 +33,27 @@ namespace Scumm { +uint8 *ScummEngine::getHEPaletteSlot(uint16 palSlot) { + assertRange(0, palSlot, _numPalettes, "palette"); + + if (_game.heversion >= 99) { + if (palSlot) + return _hePalettes + palSlot * _hePaletteSlot + 768; + else + return _hePalettes + _hePaletteSlot + 768; + } + + return NULL; +} + +uint16 ScummEngine::get16BitColor(uint8 r, uint8 g, uint8 b) { + uint16 ar = (r >> 3) << 10; + uint16 ag = (g >> 3) << 5; + uint16 ab = (b >> 3) << 0; + uint16 col = ar | ag | ab; + return col; +} + void ScummEngine::resetPalette() { if (_game.version <= 1) { if (_game.platform == Common::kPlatformApple2GS) { -- cgit v1.2.3 From 43d57fd333afa54f4e85f30e2ef8231444988066 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 16 Aug 2009 01:46:47 +0000 Subject: Update branch specific save game changes, to prevent conflicts. svn-id: r43421 --- engines/scumm/actor.cpp | 4 ++-- engines/scumm/saveload.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp index 227ae1d316..9dab776b67 100644 --- a/engines/scumm/actor.cpp +++ b/engines/scumm/actor.cpp @@ -2553,8 +2553,8 @@ void Actor::saveLoadWithSerializer(Serializer *ser) { // Actor palette grew from 64 to 256 bytes and switched to uint16 in HE games MKARRAY_OLD(Actor, _palette[0], sleByte, 64, VER(8), VER(9)), - MKARRAY_OLD(Actor, _palette[0], sleByte, 256, VER(10), VER(77)), - MKARRAY(Actor, _palette[0], sleUint16, 256, VER(78)), + MKARRAY_OLD(Actor, _palette[0], sleByte, 256, VER(10), VER(79)), + MKARRAY(Actor, _palette[0], sleUint16, 256, VER(80)), MK_OBSOLETE(Actor, _mask, sleByte, VER(8), VER(9)), MKLINE(Actor, _shadowMode, sleByte, VER(8)), diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h index 4f6adc5570..fafb6b383f 100644 --- a/engines/scumm/saveload.h +++ b/engines/scumm/saveload.h @@ -50,7 +50,7 @@ namespace Scumm { * only saves/loads those which are valid for the version of the savegame * which is being loaded/saved currently. */ -#define CURRENT_VER 79 +#define CURRENT_VER 80 /** * An auxillary macro, used to specify savegame versions. We use this instead -- cgit v1.2.3 From 77689a05a2e13c5bfaeb286db195cf36b2ce2333 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 17 Aug 2009 13:25:44 +0000 Subject: - Removed the custom DigitalMusicInputStream used in SAGA for the digital music in ITE CD and replaced it with the common LinearDiskStream class - Removed leftover code which plays standalone tracks (it's not used anywhere) svn-id: r43480 --- engines/saga/music.cpp | 243 ++++++++----------------------------------------- 1 file changed, 38 insertions(+), 205 deletions(-) (limited to 'engines') diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 27566de2c3..9325b1adec 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -41,190 +41,6 @@ namespace Saga { #define BUFFER_SIZE 4096 #define MUSIC_SUNSPOT 26 -class DigitalMusicInputStream : public Audio::AudioStream { -private: - Audio::AudioStream *_compressedStream; - ResourceContext *_context; - ResourceData * resourceData; - GameSoundTypes soundType; - Common::File *_file; - uint32 _filePos; - uint32 _startPos; - uint32 _endPos; - bool _finished; - bool _looping; - int16 _buf[BUFFER_SIZE]; - const int16 *_bufferEnd; - const int16 *_pos; - MemoryReadStream *_memoryStream; - SagaEngine *_vm; - - void refill(); - bool eosIntern() const { - return _pos >= _bufferEnd; - } - -public: - DigitalMusicInputStream(SagaEngine *vm, ResourceContext *context, uint32 resourceId, bool looping, uint32 loopStart); - ~DigitalMusicInputStream(); - - void createCompressedStream(); - - int readBuffer(int16 *buffer, const int numSamples); - - bool endOfData() const { return eosIntern(); } - bool isStereo() const { - // The digital music in the ITE Mac demo version is not stereo - return _vm->getFeatures() & GF_MONO_MUSIC ? false : true; - } - int getRate() const { return 11025; } -}; - -DigitalMusicInputStream::DigitalMusicInputStream(SagaEngine *vm, ResourceContext *context, uint32 resourceId, bool looping, uint32 loopStart) - : _vm(vm), _context(context), _finished(false), _looping(looping), _bufferEnd(_buf + BUFFER_SIZE) { - - byte compressedHeader[10]; - - resourceData = context->getResourceData(resourceId); - _file = context->getFile(resourceData); - - _compressedStream = NULL; - - if (context->isCompressed) { - // Read compressed header to determine compression type - _file->seek((long)resourceData->offset, SEEK_SET); - _file->read(compressedHeader, 9); - - if (compressedHeader[0] == char(0)) { - soundType = kSoundMP3; - } else if (compressedHeader[0] == char(1)) { - soundType = kSoundOGG; - } else if (compressedHeader[0] == char(2)) { - soundType = kSoundFLAC; - } - - createCompressedStream(); - } - - // Determine the end position - _filePos = resourceData->offset; - _endPos = _filePos + resourceData->size; - - if (_compressedStream != NULL) { - _filePos += 9; // skip compressed header - _endPos -= 9; // decrease size by the size of the compressed header - } - - _startPos = _filePos + loopStart; - if (_startPos >= _endPos) - _startPos = _filePos; - - // Read in initial data - refill(); -} - -DigitalMusicInputStream::~DigitalMusicInputStream() { - delete _compressedStream; -} - -void DigitalMusicInputStream::createCompressedStream() { -#if defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_FLAC) - uint numLoops = _looping ? 0 : 1; -#endif - _memoryStream = _file->readStream(resourceData->size - 9); - - switch (soundType) { -#ifdef USE_MAD - case kSoundMP3: - debug(1, "Playing MP3 compressed digital music"); - _compressedStream = Audio::makeMP3Stream(_memoryStream, true, 0, 0, numLoops); - break; -#endif -#ifdef USE_VORBIS - case kSoundOGG: - debug(1, "Playing OGG compressed digital music"); - _compressedStream = Audio::makeVorbisStream(_memoryStream, true, 0, 0, numLoops); - break; -#endif -#ifdef USE_FLAC - case kSoundFLAC: - debug(1, "Playing FLAC compressed digital music"); - _compressedStream = Audio::makeFlacStream(_memoryStream, true, 0, 0, numLoops); - break; -#endif - default: - // Unknown compression - error("Trying to play compressed digital music, but the compression is not known"); - break; - } -} - -int DigitalMusicInputStream::readBuffer(int16 *buffer, const int numSamples) { - if (_compressedStream != NULL) - return _compressedStream->readBuffer(buffer, numSamples); - - int samples = 0; - int len = 0; - - while (samples < numSamples && !eosIntern()) { - len = MIN(numSamples - samples, (int) (_bufferEnd - _pos)); - memcpy(buffer, _pos, len * 2); - buffer += len; - _pos += len; - samples += len; - if (_pos >= _bufferEnd) - refill(); - } - return samples; -} - -void DigitalMusicInputStream::refill() { - if (_finished) - return; - - uint32 lengthLeft; - byte *ptr = (byte *) _buf; - - _file->seek(_filePos, SEEK_SET); - - if (_looping) - lengthLeft = 2 * BUFFER_SIZE; - else - lengthLeft = MIN((uint32) (2 * BUFFER_SIZE), _endPos - _filePos); - - while (lengthLeft > 0) { - uint32 len = _file->read(ptr, MIN(lengthLeft, _endPos - _file->pos())); - - if (len & 1) - len--; - -#ifdef SCUMM_BIG_ENDIAN - if (!_context->isBigEndian) { -#else - if (_context->isBigEndian) { -#endif - uint16 *ptr16 = (uint16 *)ptr; - for (uint32 i = 0; i < (len / 2); i++) - ptr16[i] = SWAP_BYTES_16(ptr16[i]); - } - - lengthLeft -= len; - ptr += len; - - if (lengthLeft > 0) - _file->seek(_startPos); - } - - _filePos = _file->pos(); - _pos = _buf; - _bufferEnd = (int16 *)ptr; - - if (!_looping && _filePos >= _endPos) { - _finished = true; - } -} - - MusicPlayer::MusicPlayer(MidiDriver *driver) : _parser(0), _driver(driver), _looping(false), _isPlaying(false), _passThrough(false), _isGM(false) { memset(_channel, 0, sizeof(_channel)); _masterVolume = 0; @@ -455,34 +271,51 @@ void Music::play(uint32 resourceId, MusicFlags flags) { realTrackNumber = resourceId + 1; } - // Try to open standalone digital track - char trackName[2][16]; - sprintf(trackName[0], "track%d", realTrackNumber); - sprintf(trackName[1], "track%02d", realTrackNumber); - Audio::AudioStream *stream = 0; - for (int i = 0; i < 2; ++i) { - // We multiply by 40 / 3 = 1000 / 75 to convert frames to milliseconds - // FIXME: Do we really want a duration of 10000 frames = 133 seconds, or is that just a random value? - stream = Audio::AudioStream::openStreamFile(trackName[i], 0, 10000 * 40 / 3, (flags == MUSIC_LOOP) ? 0 : 1); - if (stream) { - _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, stream); - _digitalMusic = true; - return; - } - } - if (_vm->getGameId() == GID_ITE) { if (resourceId >= 9 && resourceId <= 34) { if (_digitalMusicContext != NULL) { - //TODO: check resource size loopStart = 0; // fix ITE sunstatm/sunspot score - if ((_vm->getGameId() == GID_ITE) && (resourceId == MUSIC_SUNSPOT)) { + if (resourceId == MUSIC_SUNSPOT) loopStart = 4 * 18727; - } - // digital music - audioStream = new DigitalMusicInputStream(_vm, _digitalMusicContext, resourceId - 9, flags == MUSIC_LOOP, loopStart); + // Digital music + ResourceData *resData = _digitalMusicContext->getResourceData(resourceId - 9); + Common::File *musicFile = _digitalMusicContext->getFile(resData); + int offs = (_digitalMusicContext->isCompressed) ? 9 : 0; + + Common::SeekableSubReadStream *musicStream = new Common::SeekableSubReadStream(musicFile, + (uint32)resData->offset + offs, (uint32)resData->offset + resData->size - offs); + + if (!_digitalMusicContext->isCompressed) { + byte musicFlags = Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_STEREO | + Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN; + if (flags == MUSIC_LOOP) + musicFlags |= Audio::Mixer::FLAG_LOOP; + + Audio::LinearDiskStreamAudioBlock audioBlocks[1]; + audioBlocks[0].pos = 0; + audioBlocks[0].len = resData->size / 2; // 16-bit sound + audioStream = Audio::makeLinearDiskStream(*musicStream, audioBlocks, 1, 11025, musicFlags, false, loopStart, 0); + } else { + // Read compressed header to determine compression type + musicFile->seek((uint32)resData->offset, SEEK_SET); + byte identifier = musicFile->readByte(); + + if (identifier == 0) { // MP3 +#ifdef USE_MAD + audioStream = Audio::makeMP3Stream(musicStream, false, 0, 0, (flags == MUSIC_LOOP ? 0 : 1)); +#endif + } else if (identifier == 1) { // OGG +#ifdef USE_VORBIS + audioStream = Audio::makeVorbisStream(musicStream, false, 0, 0, (flags == MUSIC_LOOP ? 0 : 1)); +#endif + } else if (identifier == 2) { // FLAC +#ifdef USE_FLAC + audioStream = Audio::makeFlacStream(musicStream, false, 0, 0, (flags == MUSIC_LOOP ? 0 : 1)); +#endif + } + } } } } -- cgit v1.2.3 From 516dd5c9a4157ab63b20c6e04b698a63dcf8cd65 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 17 Aug 2009 13:49:56 +0000 Subject: Slight cleanup to makeLinearDiskStream interface. svn-id: r43481 --- engines/saga/music.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 9325b1adec..1e2a404a62 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -296,7 +296,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { Audio::LinearDiskStreamAudioBlock audioBlocks[1]; audioBlocks[0].pos = 0; audioBlocks[0].len = resData->size / 2; // 16-bit sound - audioStream = Audio::makeLinearDiskStream(*musicStream, audioBlocks, 1, 11025, musicFlags, false, loopStart, 0); + audioStream = Audio::makeLinearDiskStream(musicStream, audioBlocks, 1, 11025, musicFlags, false, loopStart, 0); } else { // Read compressed header to determine compression type musicFile->seek((uint32)resData->offset, SEEK_SET); -- cgit v1.2.3 From 260a2019b6c57646ef32274c2fb197658f542803 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Mon, 17 Aug 2009 15:49:22 +0000 Subject: SCI: Add autodetection for DoSound. Cleanup. svn-id: r43482 --- engines/sci/engine/kernel.cpp | 87 ++++++++++++----------------------------- engines/sci/engine/kernel.h | 14 +------ engines/sci/engine/ksound.cpp | 23 ++++++----- engines/sci/engine/savegame.cpp | 3 +- engines/sci/engine/state.cpp | 75 +++++++++++++++++++++++++++++++++++ engines/sci/engine/state.h | 15 +++++++ engines/sci/resource.cpp | 2 +- engines/sci/resource.h | 3 +- engines/sci/sci.cpp | 3 +- 9 files changed, 136 insertions(+), 89 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 6d027d5788..e5a4377d2d 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -370,8 +370,8 @@ static const char *argtype_description[] = { Kernel::Kernel(ResourceManager *resmgr) : _resmgr(resmgr) { memset(&_selectorMap, 0, sizeof(_selectorMap)); // FIXME: Remove this once/if we C++ify selector_map_t - detectSciFeatures(); // must be called before loadSelectorNames() loadSelectorNames(); + detectSciFeatures(); mapSelectors(); // Map a few special selectors for later use loadOpcodes(); loadKernelNames(); @@ -382,61 +382,30 @@ Kernel::~Kernel() { } void Kernel::detectSciFeatures() { - // FIXME Much of this is unreliable + SciVersion version = _resmgr->sciVersion(); - Resource *r = _resmgr->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SNAMES), 0); - - Common::StringList staticSelectorTable; - - if (!r) { // No such resource? - staticSelectorTable = checkStaticSelectorNames(); - if (staticSelectorTable.empty()) - error("Kernel: Could not retrieve selector names"); - } - - int count = staticSelectorTable.empty() ? READ_LE_UINT16(r->data) + 1 : staticSelectorTable.size(); // Counter is slightly off features = 0; // Initialize features based on SCI version - switch (_resmgr->sciVersion()) { - case SCI_VERSION_0_EARLY: - features |= kFeatureOldScriptHeader; - /* Fallthrough */ - case SCI_VERSION_0_LATE: - features |= kFeatureOldGfxFunctions; - break; - default: - break; - } - for (int i = 0; i < count; i++) { - Common::String tmp; - - if (staticSelectorTable.empty()) { - int offset = READ_LE_UINT16(r->data + 2 + i * 2); - int len = READ_LE_UINT16(r->data + offset); - - tmp = Common::String((const char *)r->data + offset + 2, len); - } else { - tmp = staticSelectorTable[i]; - } - - if (tmp == "motionCue") - features &= ~kFeatureOldGfxFunctions; + // Script header and graphics functions + if (version == SCI_VERSION_0_EARLY) { + features |= kFeatureOldScriptHeader | kFeatureOldGfxFunctions; + } else if (version == SCI_VERSION_0_LATE) { + if (findSelector("motionCue") == -1) + features |= kFeatureOldGfxFunctions; + } - if (tmp == "egoMoveSpeed" && _resmgr->sciVersion() < SCI_VERSION_1_1) + // Lofs absolute/relative + if (version >= SCI_VERSION_1_MIDDLE && version < SCI_VERSION_1_1) { + // Assume all games use absolute lofs + features |= kFeatureLofsAbsolute; + } else if (version == SCI_VERSION_1_EARLY) { + // Use heuristic + if (findSelector("egoMoveSpeed") != -1) features |= kFeatureLofsAbsolute; - - if (tmp == "setVol") - features |= kFeatureSci1Sound; - - if (tmp == "nodePtr") - features |= kFeatureSci01Sound; } - if (features & kFeatureSci1Sound) - features &= ~kFeatureSci01Sound; - printf("Kernel auto-detected features:\n"); printf("Graphics functions: "); @@ -445,19 +414,13 @@ void Kernel::detectSciFeatures() { else printf("new\n"); - printf("lofs parameters: "); - if (features & kFeatureLofsAbsolute) - printf("absolute\n"); - else - printf("relative\n"); - - printf("Sound functions: "); - if (features & kFeatureSci1Sound) - printf("SCI1\n"); - else if (features & kFeatureSci01Sound) - printf("SCI01\n"); - else - printf("SCI0\n"); + if (version < SCI_VERSION_1_1) { + printf("lofs parameters: "); + if (features & kFeatureLofsAbsolute) + printf("absolute\n"); + else + printf("relative\n"); + } } void Kernel::loadSelectorNames() { @@ -473,7 +436,7 @@ void Kernel::loadSelectorNames() { for (uint32 i = 0; i < staticSelectorTable.size(); i++) { _selectorNames.push_back(staticSelectorTable[i]); - if (features & kFeatureOldScriptHeader) + if (_resmgr->sciVersion() == SCI_VERSION_0_EARLY) _selectorNames.push_back(staticSelectorTable[i]); } @@ -492,7 +455,7 @@ void Kernel::loadSelectorNames() { // Early SCI versions used the LSB in the selector ID as a read/write // toggle. To compensate for that, we add every selector name twice. - if (features & kFeatureOldScriptHeader) + if (_resmgr->sciVersion() == SCI_VERSION_0_EARLY) _selectorNames.push_back(tmp); } } diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index bb5563a876..8be51549f6 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -60,9 +60,7 @@ struct KernelFuncWithSignature { enum AutoDetectedFeatures { kFeatureOldScriptHeader = 1 << 0, kFeatureOldGfxFunctions = 1 << 1, - kFeatureLofsAbsolute = 1 << 2, - kFeatureSci01Sound = 1 << 3, - kFeatureSci1Sound = 1 << 4 + kFeatureLofsAbsolute = 1 << 2 }; class Kernel { @@ -119,16 +117,6 @@ public: */ bool hasLofsAbsolute() const { return (features & kFeatureLofsAbsolute); } - /** - * Determines if the game is using SCI01 sound functions - */ - bool usesSci01SoundFunctions() const { return (features & kFeatureSci01Sound); } - - /** - * Determines if the game is using SCI1 sound functions - */ - bool usesSci1SoundFunctions() const { return (features & kFeatureSci1Sound); } - // Script dissection/dumping functions void dissectScript(int scriptNumber, Vocabulary *vocab); void dumpScriptObject(char *data, int seeker, int objsize); diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index 38baeafad8..44b2404e41 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -204,7 +204,7 @@ void process_sound_events(EngineState *s) { /* Get all sound events, apply their } -reg_t kDoSound_SCI0(EngineState *s, int funct_nr, int argc, reg_t *argv) { +reg_t kDoSoundSci0(EngineState *s, int funct_nr, int argc, reg_t *argv) { reg_t obj = (argc > 1) ? argv[1] : NULL_REG; uint16 command = argv[0].toUint16(); SongHandle handle = FROBNICATE_HANDLE(obj); @@ -383,7 +383,7 @@ reg_t kDoSound_SCI0(EngineState *s, int funct_nr, int argc, reg_t *argv) { } -reg_t kDoSound_SCI01(EngineState *s, int funct_nr, int argc, reg_t *argv) { +reg_t kDoSoundSci1Early(EngineState *s, int funct_nr, int argc, reg_t *argv) { uint16 command = argv[0].toUint16(); reg_t obj = (argc > 1) ? argv[1] : NULL_REG; SongHandle handle = FROBNICATE_HANDLE(obj); @@ -673,7 +673,7 @@ reg_t kDoSound_SCI01(EngineState *s, int funct_nr, int argc, reg_t *argv) { return s->r_acc; } -reg_t kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) { +reg_t kDoSoundSci1Late(EngineState *s, int funct_nr, int argc, reg_t *argv) { uint16 command = argv[0].toUint16(); reg_t obj = (argc > 1) ? argv[1] : NULL_REG; SongHandle handle = FROBNICATE_HANDLE(obj); @@ -988,12 +988,17 @@ reg_t kDoSound_SCI1(EngineState *s, int funct_nr, int argc, reg_t *argv) { * Used for synthesized music playback */ reg_t kDoSound(EngineState *s, int funct_nr, int argc, reg_t *argv) { - if (((SciEngine*)g_engine)->getKernel()->usesSci1SoundFunctions()) - return kDoSound_SCI1(s, funct_nr, argc, argv); - else if (((SciEngine*)g_engine)->getKernel()->usesSci01SoundFunctions()) - return kDoSound_SCI01(s, funct_nr, argc, argv); - else - return kDoSound_SCI0(s, funct_nr, argc, argv); + switch(s->detectDoSoundType()) { + case EngineState::kDoSoundTypeSci0: + return kDoSoundSci0(s, funct_nr, argc, argv); + case EngineState::kDoSoundTypeSci1Early: + return kDoSoundSci1Early(s, funct_nr, argc, argv); + case EngineState::kDoSoundTypeSci1Late: + return kDoSoundSci1Late(s, funct_nr, argc, argv); + default: + warning("Unknown DoSound type"); + return NULL_REG; + } } /** diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 1768695244..b53e9d522c 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -701,8 +701,7 @@ static void reconstruct_sounds(EngineState *s) { Song *seeker; SongIteratorType it_type; - if (((SciEngine *)g_engine)->getKernel()->usesSci01SoundFunctions() - || ((SciEngine *)g_engine)->getKernel()->usesSci1SoundFunctions()) + if (s->_version > SCI_VERSION_01) it_type = SCI_SONG_ITERATOR_TYPE_SCI1; else it_type = SCI_SONG_ITERATOR_TYPE_SCI0; diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index fd45ef5834..c45868ca56 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -24,6 +24,8 @@ */ #include "sci/engine/state.h" +#include "sci/engine/vm.h" +#include "sci/console.h" // For parse_reg_t namespace Sci { @@ -116,6 +118,8 @@ EngineState::EngineState(ResourceManager *res, SciVersion version, uint32 flags) successor = 0; speedThrottler = new SpeedThrottler(version); + + _doSoundType = kDoSoundTypeUnknown; } EngineState::~EngineState() { @@ -242,4 +246,75 @@ Common::String EngineState::strSplit(const char *str, const char *sep) { return retval; } +EngineState::DoSoundType EngineState::detectDoSoundType() { + if (_doSoundType == kDoSoundTypeUnknown) { + reg_t soundClass; + const uint checkBytes = 6; // Number of bytes to check + + if (!parse_reg_t(this, "?Sound", &soundClass)) { + reg_t fptr; + + Object *obj = obj_get(this, soundClass); + SelectorType sel = lookup_selector(this, soundClass, ((SciEngine*)g_engine)->getKernel()->_selectorMap.play, NULL, &fptr); + + if (obj && (sel == kSelectorMethod)) { + Script *script = seg_manager->getScript(fptr.segment); + + if (fptr.offset > checkBytes) { + // Go to the last portion of Sound::init, should be right before the play function + fptr.offset -= checkBytes; + byte *buf = script->buf + fptr.offset; + + // Check the call to DoSound's INIT_HANDLE function. + // It's either subfunction 0, 5 or 6, depending on the version of DoSound. + uint sum = 0; + for (uint i = 0; i < checkBytes; i++) + sum += buf[i]; + + switch(sum) { + case 0x1B2: // SCI0 + case 0x1AE: // SCI01 + _doSoundType = kDoSoundTypeSci0; + break; + case 0x13D: + _doSoundType = kDoSoundTypeSci1Early; + break; + case 0x13E: + _doSoundType = kDoSoundTypeSci1Late; + } + } + } + } + + if (_doSoundType == kDoSoundTypeUnknown) { + warning("DoSound detection failed, taking an educated guess"); + + if (_version >= SCI_VERSION_1_MIDDLE) + _doSoundType = kDoSoundTypeSci1Late; + else if (_version > SCI_VERSION_01) + _doSoundType = kDoSoundTypeSci1Early; + else + _doSoundType = kDoSoundTypeSci0; + } + + debugCN(1, kDebugLevelSound, "Detected DoSound type: "); + + switch(_doSoundType) { + case kDoSoundTypeSci0: + debugC(1, kDebugLevelSound, "SCI0"); + break; + case kDoSoundTypeSci1Early: + debugC(1, kDebugLevelSound, "SCI1 Early"); + break; + case kDoSoundTypeSci1Late: + debugC(1, kDebugLevelSound, "SCI1 Late"); + break; + default: + break; + } + } + + return _doSoundType; +} + } // End of namespace Sci diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h index c8e9139f27..a3983f6ae4 100644 --- a/engines/sci/engine/state.h +++ b/engines/sci/engine/state.h @@ -163,6 +163,14 @@ struct EngineState : public Common::Serializable { public: EngineState(ResourceManager *res, SciVersion version, uint32 flags); virtual ~EngineState(); + + enum DoSoundType { + kDoSoundTypeUnknown, + kDoSoundTypeSci0, + kDoSoundTypeSci1Early, + kDoSoundTypeSci1Late + }; + virtual void saveLoadWithSerializer(Common::Serializer &ser); kLanguage getLanguage(); @@ -272,6 +280,12 @@ public: */ Common::String strSplit(const char *str, const char *sep = "\r----------\r"); + /** + * Autodetects the DoSound type + * @return DoSound type + */ + DoSoundType detectDoSoundType(); + /* Debugger data: */ Breakpoint *bp_list; /**< List of breakpoints */ int have_bp; /**< Bit mask specifying which types of breakpoints are used in bp_list */ @@ -301,6 +315,7 @@ public: EngineState *successor; /**< Successor of this state: Used for restoring */ private: + DoSoundType _doSoundType; kLanguage charToLanguage(const char c) const; Common::String getLanguageString(const char *str, kLanguage lang) const; }; diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index ef31fcdd7d..7b201d0506 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -1480,7 +1480,7 @@ SciVersion ResourceManager::detectSciVersion() { // If this turns out to be unreliable, we could do some pic resource checks instead. return SCI_VERSION_1_EARLY; case kResVersionSci1Middle: - return SCI_VERSION_1_LATE; + return SCI_VERSION_1_MIDDLE; case kResVersionSci1Late: if (_viewType == kViewVga11) { // SCI1.1 resources, assume SCI1.1 diff --git a/engines/sci/resource.h b/engines/sci/resource.h index d38cff87df..0a5336fd3f 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -52,7 +52,8 @@ enum SciVersion { SCI_VERSION_01, // KQ1 and multilingual games (S.old.*) SCI_VERSION_1_EGA, // EGA with parser, QFG2 SCI_VERSION_1_EARLY, // KQ5. (EGA/VGA) - SCI_VERSION_1_LATE, // ECO1, LSL1, LSL5. (EGA/VGA) + SCI_VERSION_1_MIDDLE, // LSL1, JONESCD. (EGA?/VGA) + SCI_VERSION_1_LATE, // ECO1, LSL5. (EGA/VGA) SCI_VERSION_1_1, // KQ6, ECO2 SCI_VERSION_32 // GK }; diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index b799af9e83..64e89a638e 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -44,13 +44,14 @@ namespace Sci { class GfxDriver; // FIXME: error-prone -const char *versionNames[9] = { +const char *versionNames[10] = { "Autodetect", "SCI0 Early", "SCI0 Late", "SCI01", "SCI1 EGA", "SCI1 Early", + "SCI1 Middle", "SCI1 Late", "SCI1.1", "SCI32" -- cgit v1.2.3 From 4b9bfe2013b3b6da5e34326e3bbdb3795539f94b Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Mon, 17 Aug 2009 16:07:47 +0000 Subject: SCI: Build fix. svn-id: r43483 --- engines/sci/engine/state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/engine/state.cpp b/engines/sci/engine/state.cpp index c45868ca56..baa51bcb58 100644 --- a/engines/sci/engine/state.cpp +++ b/engines/sci/engine/state.cpp @@ -254,7 +254,7 @@ EngineState::DoSoundType EngineState::detectDoSoundType() { if (!parse_reg_t(this, "?Sound", &soundClass)) { reg_t fptr; - Object *obj = obj_get(this, soundClass); + Object *obj = obj_get(seg_manager, _version, soundClass); SelectorType sel = lookup_selector(this, soundClass, ((SciEngine*)g_engine)->getKernel()->_selectorMap.play, NULL, &fptr); if (obj && (sel == kSelectorMethod)) { -- cgit v1.2.3 From 4a4ae3382501da9fbd9dc25f502336d55308ca5f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 17 Aug 2009 18:25:51 +0000 Subject: Put back the code for playing external digital music, used by the MIDI enhancement project, which was removed in rev. #43480 svn-id: r43485 --- engines/saga/music.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 1e2a404a62..8ca946a127 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -271,11 +271,25 @@ void Music::play(uint32 resourceId, MusicFlags flags) { realTrackNumber = resourceId + 1; } + // Try to open standalone digital track + char trackName[2][16]; + sprintf(trackName[0], "track%d", realTrackNumber); + sprintf(trackName[1], "track%02d", realTrackNumber); + Audio::AudioStream *stream = 0; + for (int i = 0; i < 2; ++i) { + stream = Audio::AudioStream::openStreamFile(trackName[i], 0, 0, (flags == MUSIC_LOOP) ? 0 : 1); + if (stream) { + _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_musicHandle, stream); + _digitalMusic = true; + return; + } + } + if (_vm->getGameId() == GID_ITE) { if (resourceId >= 9 && resourceId <= 34) { if (_digitalMusicContext != NULL) { loopStart = 0; - // fix ITE sunstatm/sunspot score + // Fix ITE sunstatm/sunspot score if (resourceId == MUSIC_SUNSPOT) loopStart = 4 * 18727; -- cgit v1.2.3 From 2fc7660e43f581b811fdc979c25e8c87a17d1456 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Mon, 17 Aug 2009 23:11:25 +0000 Subject: SCI: Fix kernel table for multilingual SCI01 games. Cleanup. svn-id: r43497 --- engines/sci/engine/kernel.cpp | 56 +++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 26 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index e5a4377d2d..09d342b7fe 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -33,11 +33,7 @@ namespace Sci { -/** The string used to identify the "unknown" SCI0 function for each game */ -#define SCRIPT_UNKNOWN_FUNCTION_STRING "[Unknown]" - // Default kernel name table -#define SCI0_KNAMES_WELL_DEFINED 0x6e #define SCI_KNAMES_DEFAULT_ENTRIES_NR 0x89 static const char *sci_default_knames[SCI_KNAMES_DEFAULT_ENTRIES_NR] = { @@ -782,32 +778,40 @@ reg_t *kernel_dereference_reg_pointer(EngineState *s, reg_t pointer, int entries } void Kernel::setDefaultKernelNames() { - bool isSci0 = (_resmgr->sciVersion() <= SCI_VERSION_0_LATE); - int offset = 0; - - _kernelNames.resize(SCI_KNAMES_DEFAULT_ENTRIES_NR + (isSci0 ? 4 : 0)); - for (int i = 0; i < SCI_KNAMES_DEFAULT_ENTRIES_NR; i++) { - // In SCI0, Platform was DoAvoider - if (!strcmp(sci_default_knames[i], "Platform") && isSci0) { - _kernelNames[i + offset] = "DoAvoider"; - continue; - } + _kernelNames = Common::StringList(sci_default_knames, SCI_KNAMES_DEFAULT_ENTRIES_NR); + + switch (_resmgr->sciVersion()) { + case SCI_VERSION_0_EARLY: + case SCI_VERSION_0_LATE: + // Insert SCI0 file functions after SetCursor (0x28) + _kernelNames.insert_at(0x29, "FOpen"); + _kernelNames.insert_at(0x2A, "FPuts"); + _kernelNames.insert_at(0x2B, "FGets"); + _kernelNames.insert_at(0x2C, "FClose"); + + // Function 0x55 is DoAvoider + _kernelNames[0x55] = "DoAvoider"; + + // Cut off unused functions + _kernelNames.resize(0x72); + break; - _kernelNames[i + offset] = sci_default_knames[i]; + case SCI_VERSION_01: + // Multilingual SCI01 games have StrSplit as function 0x78 + _kernelNames[0x78] = "StrSplit"; - // SCI0 has 4 extra functions between SetCursor (0x28) and Savegame - if (!strcmp(sci_default_knames[i], "SetCursor") && isSci0) { - _kernelNames[i + 1] = "FOpen"; - _kernelNames[i + 2] = "FPuts"; - _kernelNames[i + 3] = "FGets"; - _kernelNames[i + 4] = "FClose"; - offset = 4; - } - } + // Cut off unused functions + _kernelNames.resize(0x79); + break; - if (_resmgr->sciVersion() == SCI_VERSION_1_1) { - // HACK: KQ6CD calls unimplemented function 0x26 + case SCI_VERSION_1_1: + // KQ6CD calls unimplemented function 0x26 _kernelNames[0x26] = "Dummy"; + break; + + default: + // Use default table for the other versions + break; } } -- cgit v1.2.3 From c9402c5559dee28ccc99fb7abca5dc83ec46a330 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 18 Aug 2009 06:43:06 +0000 Subject: Applied agent-q's patch to the SAGA pathfinding code for all platforms - x and y should not ever be greater than 640 and 480 respectively, so it looks safe enough to be applied svn-id: r43500 --- engines/saga/actor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/saga/actor.h b/engines/saga/actor.h index d998c65240..57d06e9e3a 100644 --- a/engines/saga/actor.h +++ b/engines/saga/actor.h @@ -183,8 +183,8 @@ enum DragonMoveTypes { struct PathDirectionData { int8 direction; - int x; - int y; + int16 x; + int16 y; }; struct ActorFrameRange { -- cgit v1.2.3 From 65ac355efa2cb792278e34de5c397ab11c8a46e3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 18 Aug 2009 09:12:41 +0000 Subject: Removed the maxMemory parameter of the resource manager and replaced it with a define svn-id: r43503 --- engines/sci/detection.cpp | 2 +- engines/sci/resource.cpp | 6 +++--- engines/sci/resource.h | 16 +++++++--------- engines/sci/sci.cpp | 2 +- 4 files changed, 12 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 88bd0d63c3..d46dd2cbd8 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -3090,7 +3090,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl #if 0 // Determine the game id // TODO - ResourceManager *resMgr = new ResourceManager(256 * 1024); + ResourceManager *resMgr = new ResourceManager(); SciVersion version = resMgr->sciVersion(); SegManager *segManager = new SegManager(resMgr, version); reg_t game_obj = script_lookup_export(segManager, 0, 0); diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 7b201d0506..2ca198954a 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -396,8 +396,7 @@ void ResourceManager::freeResourceSources() { _sources.clear(); } -ResourceManager::ResourceManager(int maxMemory) { - _maxMemory = maxMemory; +ResourceManager::ResourceManager() { _memoryLocked = 0; _memoryLRU = 0; _LRU.clear(); @@ -506,7 +505,7 @@ void ResourceManager::printLRU() { } void ResourceManager::freeOldResources() { - while (_maxMemory < _memoryLRU) { + while (MAX_MEMORY < _memoryLRU) { assert(!_LRU.empty()); Resource *goner = *_LRU.reverse_begin(); removeFromLRU(goner); @@ -614,6 +613,7 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { break; } } + if (file.isOpen() == false) { error("Failed to open resource map file"); return kResVersionUnknown; diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 0a5336fd3f..8ab740f463 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -245,15 +245,8 @@ public: /** * Creates a new SCI resource manager. - * @param version The SCI version to look for; use SCI_VERSION_AUTODETECT - * in the default case. - * @param maxMemory Maximum number of bytes to allow allocated for resources - * - * @note maxMemory will not be interpreted as a hard limit, only as a restriction - * for resources which are not explicitly locked. However, a warning will be - * issued whenever this limit is exceeded. */ - ResourceManager(int maxMemory); + ResourceManager(); ~ResourceManager(); /** @@ -294,8 +287,13 @@ public: void setAudioLanguage(int language); protected: + // Maximum number of bytes to allow being allocated for resources + // Note: maxMemory will not be interpreted as a hard limit, only as a restriction + // for resources which are not explicitly locked. However, a warning will be + // issued whenever this limit is exceeded. + #define MAX_MEMORY 256 * 1024 // 256KB + ViewType _viewType; // Used to determine if the game has EGA or VGA graphics - int _maxMemory; //!< Config option: Maximum total byte number allocated Common::List _sources; int _memoryLocked; //!< Amount of resource bytes in locked memory int _memoryLRU; //!< Amount of resource bytes under LRU control diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 64e89a638e..53e3e7ab9c 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -135,7 +135,7 @@ Common::Error SciEngine::run() { const uint32 flags = getFlags(); - _resmgr = new ResourceManager(256 * 1024); + _resmgr = new ResourceManager(); _version = _resmgr->sciVersion(); if (!_resmgr) { -- cgit v1.2.3 From ca9bbce9b3e8771f346eca037bd0c39a7e0360de Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 18 Aug 2009 10:01:18 +0000 Subject: - Added game ID detection to the fallback detector. We still need to map some of Sierra's internal IDs to our own ones - The class table is now created in the segment manager constructor svn-id: r43504 --- engines/sci/detection.cpp | 23 ++++-- engines/sci/engine/game.cpp | 151 +------------------------------------ engines/sci/engine/savegame.cpp | 2 +- engines/sci/engine/seg_manager.cpp | 150 +++++++++++++++++++++++++++++++++++- engines/sci/engine/seg_manager.h | 5 +- engines/sci/engine/vm.cpp | 10 +-- engines/sci/engine/vm.h | 2 +- 7 files changed, 177 insertions(+), 166 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index d46dd2cbd8..c025523ca0 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -27,6 +27,7 @@ #include "base/plugins.h" #include "sci/sci.h" +#include "sci/engine/kernel.h" #include "sci/exereader.h" #include "sci/engine/seg_manager.h" @@ -3047,8 +3048,12 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl Common::String filename = file->getName(); filename.toLowercase(); - if (filename.contains("resource.map") || filename.contains("resmap.000")) + if (filename.contains("resource.map") || filename.contains("resmap.000")) { + // resource.map is located in the same directory as the other resource files, + // therefore add the directory here, so that the game files can be opened later on + Common::File::addDefaultDirectory(file->getParent().getPath()); foundResMap = true; + } if (filename.contains("resource.000") || filename.contains("resource.001") || filename.contains("ressci.000") || filename.contains("ressci.001")) @@ -3081,24 +3086,30 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl return 0; // Set some defaults - s_fallbackDesc.desc.gameid = "sci"; s_fallbackDesc.desc.extra = ""; s_fallbackDesc.desc.language = Common::UNK_LANG; s_fallbackDesc.desc.platform = exePlatform; s_fallbackDesc.desc.flags = ADGF_NO_FLAGS; -#if 0 // Determine the game id - // TODO ResourceManager *resMgr = new ResourceManager(); SciVersion version = resMgr->sciVersion(); - SegManager *segManager = new SegManager(resMgr, version); + Kernel *kernel = new Kernel(resMgr); + SegManager *segManager = new SegManager(resMgr, version, kernel->hasOldScriptHeader()); + if (!script_instantiate(resMgr, segManager, version, kernel->hasOldScriptHeader(), 0)) { + warning("fallbackDetect(): Could not instantiate script 0"); + return 0; + } reg_t game_obj = script_lookup_export(segManager, 0, 0); Common::String gameName = obj_get_name(segManager,version, game_obj); debug(2, " \"%s\" at %04x:%04x", gameName.c_str(), PRINT_REG(game_obj)); + gameName.toLowercase(); + // TODO: Sierra's game IDs are not always the same as our own ones, we need to map them + // accordingly here + s_fallbackDesc.desc.gameid = strdup(gameName.c_str()); + delete kernel; delete segManager; delete resMgr; -#endif printf("If this is *NOT* a fan-modified version (in particular, not a fan-made\n"); printf("translation), please, report the data above, including the following\n"); diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index 6872039c89..c34ac1cf00 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -188,157 +188,10 @@ int game_init_sound(EngineState *s, int sound_flags) { return 0; } -int create_class_table_sci11(EngineState *s) { - int scriptnr; - unsigned int seeker_offset; - char *seeker_ptr; - int classnr; - - Resource *vocab996 = s->resmgr->findResource(ResourceId(kResourceTypeVocab, 996), 1); - - if (!vocab996) - s->seg_manager->_classtable.resize(20); - else - s->seg_manager->_classtable.resize(vocab996->size >> 2); - - for (scriptnr = 0; scriptnr < 1000; scriptnr++) { - Resource *heap = s->resmgr->findResource(ResourceId(kResourceTypeHeap, scriptnr), 0); - - if (heap) { - int global_vars = READ_LE_UINT16(heap->data + 2); - - seeker_ptr = (char*)heap->data + 4 + global_vars * 2; - seeker_offset = 4 + global_vars * 2; - - while (READ_LE_UINT16((byte*)seeker_ptr) == SCRIPT_OBJECT_MAGIC_NUMBER) { - if (READ_LE_UINT16((byte*)seeker_ptr + 14) & SCRIPT_INFO_CLASS) { - classnr = READ_LE_UINT16((byte*)seeker_ptr + 10); - if (classnr >= (int)s->seg_manager->_classtable.size()) { - if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) { - warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x", - classnr, scriptnr, scriptnr, seeker_offset); - return 1; - } - - s->seg_manager->_classtable.resize(classnr + 1); // Adjust maximum number of entries - } - - s->seg_manager->_classtable[classnr].reg.offset = seeker_offset; - s->seg_manager->_classtable[classnr].reg.segment = 0; - s->seg_manager->_classtable[classnr].script = scriptnr; - } - - seeker_ptr += READ_LE_UINT16((byte*)seeker_ptr + 2) * 2; - seeker_offset += READ_LE_UINT16((byte*)seeker_ptr + 2) * 2; - } - } - } - - s->resmgr->unlockResource(vocab996); - vocab996 = NULL; - return 0; -} - -static int create_class_table_sci0(EngineState *s) { - int scriptnr; - unsigned int seeker; - int classnr; - int magic_offset; // For strange scripts in older SCI versions - - Resource *vocab996 = s->resmgr->findResource(ResourceId(kResourceTypeVocab, 996), 1); - SciVersion version = s->_version; // for the offset defines - - if (!vocab996) - s->seg_manager->_classtable.resize(20); - else - s->seg_manager->_classtable.resize(vocab996->size >> 2); - - for (scriptnr = 0; scriptnr < 1000; scriptnr++) { - int objtype = 0; - Resource *script = s->resmgr->findResource(ResourceId(kResourceTypeScript, scriptnr), 0); - - if (script) { - if (((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()) - magic_offset = seeker = 2; - else - magic_offset = seeker = 0; - - do { - while (seeker < script->size) { - unsigned int lastseeker = seeker; - objtype = (int16)READ_LE_UINT16(script->data + seeker); - if (objtype == SCI_OBJ_CLASS || objtype == SCI_OBJ_TERMINATOR) - break; - seeker += (int16)READ_LE_UINT16(script->data + seeker + 2); - if (seeker <= lastseeker) { - s->seg_manager->_classtable.clear(); - error("Script version is invalid"); - } - } - - if (objtype == SCI_OBJ_CLASS) { - int sugg_script; - - seeker -= SCRIPT_OBJECT_MAGIC_OFFSET; // Adjust position; script home is base +8 bytes - - classnr = (int16)READ_LE_UINT16(script->data + seeker + 4 + SCRIPT_SPECIES_OFFSET); - if (classnr >= (int)s->seg_manager->_classtable.size()) { - - if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) { - warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x", - classnr, scriptnr, scriptnr, seeker); - return 1; - } - - s->seg_manager->_classtable.resize(classnr + 1); // Adjust maximum number of entries - } - - // Map the class ID to the script the corresponding class is contained in - // The script number is found in vocab.996, if it exists - if (!vocab996 || (uint32)classnr >= vocab996->size >> 2) - sugg_script = -1; - else - sugg_script = (int16)READ_LE_UINT16(vocab996->data + 2 + (classnr << 2)); - - // First, test whether the script hasn't been claimed, or if it's been claimed by the wrong script - - if (sugg_script == -1 || scriptnr == sugg_script /*|| !s->_classtable[classnr].reg.segment*/) { - // Now set the home script of the class - s->seg_manager->_classtable[classnr].reg.offset = seeker + 4 - magic_offset; - s->seg_manager->_classtable[classnr].reg.segment = 0; - s->seg_manager->_classtable[classnr].script = scriptnr; - } - - seeker += SCRIPT_OBJECT_MAGIC_OFFSET; // Re-adjust position - seeker += (int16)READ_LE_UINT16(script->data + seeker + 2); // Move to next - } - - } while (objtype != SCI_OBJ_TERMINATOR && seeker <= script->size); - - } - } - s->resmgr->unlockResource(vocab996); - vocab996 = NULL; - return 0; -} - // Architectural stuff: Init/Unintialize engine int script_init_engine(EngineState *s) { - int result; - s->kernel_opt_flags = 0; - s->seg_manager = new SegManager(s->resmgr, s->_version); - - if (s->_version >= SCI_VERSION_1_1) - result = create_class_table_sci11(s); - else - result = create_class_table_sci0(s); - - if (result) { - debug(2, "Failed to initialize class table"); - return 1; - } - + s->seg_manager = new SegManager(s->resmgr, s->_version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()); s->gc_countdown = GC_INTERVAL - 1; SegmentId script_000_segment = s->seg_manager->getSegment(0, SCRIPT_GET_LOCK); @@ -441,7 +294,7 @@ int game_init(EngineState *s) { s->stack_base = stack->entries; s->stack_top = s->stack_base + VM_STACK_SIZE; - if (!script_instantiate(s->resmgr, s->seg_manager, s->_version, 0)) { + if (!script_instantiate(s->resmgr, s->seg_manager, s->_version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader(), 0)) { warning("game_init(): Could not instantiate script 0"); return 1; } diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index b53e9d522c..0ddb5187ac 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -219,7 +219,7 @@ static void sync_SegManagerPtr(Common::Serializer &s, SegManager *&obj) { if (s.isLoading()) { // FIXME: Do in-place loading at some point, instead of creating a new EngineState instance from scratch. delete obj; - obj = new SegManager(resMgr, version); + obj = new SegManager(resMgr, version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()); } obj->saveLoadWithSerializer(s); diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index f47a874528..a6f54c5bf7 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -52,7 +52,7 @@ namespace Sci { #define INVALID_SCRIPT_ID -1 -SegManager::SegManager(ResourceManager *resMgr, SciVersion version) { +SegManager::SegManager(ResourceManager *resMgr, SciVersion version, bool oldScriptHeader) { id_seg_map = new IntMapper(); reserved_id = INVALID_SCRIPT_ID; id_seg_map->checkKey(reserved_id, true); // reserve entry 0 for INVALID_SCRIPT_ID @@ -68,6 +68,17 @@ SegManager::SegManager(ResourceManager *resMgr, SciVersion version) { exports_wide = 0; _version = version; _resMgr = resMgr; + _oldScriptHeader = oldScriptHeader; + + int result = 0; + + if (version >= SCI_VERSION_1_1) + result = createSci11ClassTable(); + else + result = createSci0ClassTable(); + + if (result) + error("SegManager: Failed to initialize class table"); } // Destroy the object, free the memorys if allocated before @@ -139,7 +150,7 @@ void SegManager::setScriptSize(Script &scr, int script_nr) { if (!script || (_version >= SCI_VERSION_1_1 && !heap)) { error("SegManager::setScriptSize: failed to load %s", !script ? "script" : "heap"); } - if (((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()) { + if (_oldScriptHeader) { scr.buf_size = script->size + READ_LE_UINT16(script->data) * 2; //locals_size = READ_LE_UINT16(script->data) * 2; } else if (_version < SCI_VERSION_1_1) { @@ -434,7 +445,7 @@ SegmentId SegManager::getSegment(int script_nr, SCRIPT_GET load) { SegmentId segment; if ((load & SCRIPT_GET_LOAD) == SCRIPT_GET_LOAD) - script_instantiate(_resMgr, this, _version, script_nr); + script_instantiate(_resMgr, this, _version, _oldScriptHeader, script_nr); segment = segGet(script_nr); @@ -906,5 +917,138 @@ int SegManager::freeDynmem(reg_t addr) { return 0; // OK } +int SegManager::createSci11ClassTable() { + int scriptnr; + unsigned int seeker_offset; + char *seeker_ptr; + int classnr; + + Resource *vocab996 = _resMgr->findResource(ResourceId(kResourceTypeVocab, 996), 1); + + if (!vocab996) + _classtable.resize(20); + else + _classtable.resize(vocab996->size >> 2); + + for (scriptnr = 0; scriptnr < 1000; scriptnr++) { + Resource *heap = _resMgr->findResource(ResourceId(kResourceTypeHeap, scriptnr), 0); + + if (heap) { + int global_vars = READ_LE_UINT16(heap->data + 2); + + seeker_ptr = (char*)heap->data + 4 + global_vars * 2; + seeker_offset = 4 + global_vars * 2; + + while (READ_LE_UINT16((byte*)seeker_ptr) == SCRIPT_OBJECT_MAGIC_NUMBER) { + if (READ_LE_UINT16((byte*)seeker_ptr + 14) & SCRIPT_INFO_CLASS) { + classnr = READ_LE_UINT16((byte*)seeker_ptr + 10); + if (classnr >= (int)_classtable.size()) { + if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) { + warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x", + classnr, scriptnr, scriptnr, seeker_offset); + return 1; + } + + _classtable.resize(classnr + 1); // Adjust maximum number of entries + } + + _classtable[classnr].reg.offset = seeker_offset; + _classtable[classnr].reg.segment = 0; + _classtable[classnr].script = scriptnr; + } + + seeker_ptr += READ_LE_UINT16((byte*)seeker_ptr + 2) * 2; + seeker_offset += READ_LE_UINT16((byte*)seeker_ptr + 2) * 2; + } + } + } + + _resMgr->unlockResource(vocab996); + vocab996 = NULL; + return 0; +} + +int SegManager::createSci0ClassTable() { + int scriptnr; + unsigned int seeker; + int classnr; + int magic_offset; // For strange scripts in older SCI versions + + Resource *vocab996 = _resMgr->findResource(ResourceId(kResourceTypeVocab, 996), 1); + SciVersion version = _version; // for the offset defines + + if (!vocab996) + _classtable.resize(20); + else + _classtable.resize(vocab996->size >> 2); + + for (scriptnr = 0; scriptnr < 1000; scriptnr++) { + int objtype = 0; + Resource *script = _resMgr->findResource(ResourceId(kResourceTypeScript, scriptnr), 0); + + if (script) { + if (_oldScriptHeader) + magic_offset = seeker = 2; + else + magic_offset = seeker = 0; + + do { + while (seeker < script->size) { + unsigned int lastseeker = seeker; + objtype = (int16)READ_LE_UINT16(script->data + seeker); + if (objtype == SCI_OBJ_CLASS || objtype == SCI_OBJ_TERMINATOR) + break; + seeker += (int16)READ_LE_UINT16(script->data + seeker + 2); + if (seeker <= lastseeker) { + _classtable.clear(); + error("Script version is invalid"); + } + } + + if (objtype == SCI_OBJ_CLASS) { + int sugg_script; + + seeker -= SCRIPT_OBJECT_MAGIC_OFFSET; // Adjust position; script home is base +8 bytes + + classnr = (int16)READ_LE_UINT16(script->data + seeker + 4 + SCRIPT_SPECIES_OFFSET); + if (classnr >= (int)_classtable.size()) { + + if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) { + warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x", + classnr, scriptnr, scriptnr, seeker); + return 1; + } + + _classtable.resize(classnr + 1); // Adjust maximum number of entries + } + + // Map the class ID to the script the corresponding class is contained in + // The script number is found in vocab.996, if it exists + if (!vocab996 || (uint32)classnr >= vocab996->size >> 2) + sugg_script = -1; + else + sugg_script = (int16)READ_LE_UINT16(vocab996->data + 2 + (classnr << 2)); + + // First, test whether the script hasn't been claimed, or if it's been claimed by the wrong script + + if (sugg_script == -1 || scriptnr == sugg_script /*|| !s->_classtable[classnr].reg.segment*/) { + // Now set the home script of the class + _classtable[classnr].reg.offset = seeker + 4 - magic_offset; + _classtable[classnr].reg.segment = 0; + _classtable[classnr].script = scriptnr; + } + + seeker += SCRIPT_OBJECT_MAGIC_OFFSET; // Re-adjust position + seeker += (int16)READ_LE_UINT16(script->data + seeker + 2); // Move to next + } + + } while (objtype != SCI_OBJ_TERMINATOR && seeker <= script->size); + + } + } + _resMgr->unlockResource(vocab996); + vocab996 = NULL; + return 0; +} } // End of namespace Sci diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index f73c788b37..fcf2659df3 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -58,7 +58,7 @@ public: /** * Initialize the segment manager */ - SegManager(ResourceManager *resMgr, SciVersion version); + SegManager(ResourceManager *resMgr, SciVersion version, bool oldScriptHeader); /** * Deallocate all memory associated with the segment manager @@ -342,6 +342,7 @@ public: private: IntMapper *id_seg_map; ///< id - script id; seg - index of heap + bool _oldScriptHeader; public: // TODO: make private Common::Array _heap; int reserved_id; @@ -360,6 +361,8 @@ private: LocalVariables *allocLocalsSegment(Script *scr, int count); MemObject *memObjAllocate(SegmentId segid, int hash_id, MemObjectType type); int deallocate(SegmentId seg, bool recursive); + int createSci0ClassTable(); + int createSci11ClassTable(); Hunk *alloc_Hunk(reg_t *); diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index fbd3bc3baf..64ee7243fb 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -208,7 +208,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP Script *scr = s->seg_manager->getScriptIfLoaded(seg); if (!scr) // Script not present yet? - seg = script_instantiate(s->resmgr, s->seg_manager, s->_version, script); + seg = script_instantiate(s->resmgr, s->seg_manager, s->_version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader(), script); else scr->unmarkDeleted(); @@ -1573,7 +1573,7 @@ int script_instantiate_common(ResourceManager *resMgr, SegManager *segManager, S return seg_id; } -int script_instantiate_sci0(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr) { +int script_instantiate_sci0(ResourceManager *resMgr, SegManager *segManager, SciVersion version, bool oldScriptHeader, int script_nr) { int objtype; unsigned int objlength; reg_t reg; @@ -1593,7 +1593,7 @@ int script_instantiate_sci0(ResourceManager *resMgr, SegManager *segManager, Sci Script *scr = segManager->getScript(seg_id); - if (((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()) { + if (oldScriptHeader) { // int locals_nr = READ_LE_UINT16(script->data); @@ -1761,11 +1761,11 @@ int script_instantiate_sci11(ResourceManager *resMgr, SegManager *segManager, Sc return seg_id; } -int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr) { +int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, bool oldScriptHeader, int script_nr) { if (version >= SCI_VERSION_1_1) return script_instantiate_sci11(resMgr, segManager, version, script_nr); else - return script_instantiate_sci0(resMgr, segManager, version, script_nr); + return script_instantiate_sci0(resMgr, segManager, version, oldScriptHeader, script_nr); } void script_uninstantiate_sci0(SegManager *segManager, SciVersion version, int script_nr, SegmentId seg) { diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index c8f94d5446..867f732e2a 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -489,7 +489,7 @@ reg_t script_lookup_export(SegManager *segManager, int script_nr, int export_ind * @param[in] script_nr The script number to load * @return The script's segment ID or 0 if out of heap */ -int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr); +int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, bool oldScriptHeader, int script_nr); /** * Decreases the numer of lockers of a script and unloads it if that number -- cgit v1.2.3 From 2b945eabf1acc24d289cc8489216fc007899275c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Tue, 18 Aug 2009 12:25:04 +0000 Subject: Bugfix for Castle Skorl problem reported on the list svn-id: r43507 --- engines/lure/res.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index 7eb76cad32..e921b93384 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -550,6 +550,7 @@ void Resources::setTalkingCharacter(uint16 id) { uint16 englishLoadOffsets[] = {0x3afe, 0x41BD, 0x7167, 0x7172, 0x8617, 0x88ac, 0}; Hotspot *Resources::activateHotspot(uint16 hotspotId) { + Resources &resources = Resources::getReference(); HotspotData *res = getHotspot(hotspotId); if (!res) return NULL; res->roomNumber &= 0x7fff; // clear any suppression bit in room # @@ -561,7 +562,6 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) { // If it's NPC with a schedule, then activate the schedule if ((res->npcScheduleId != 0) && (res->npcSchedule.isEmpty())) { - Resources &resources = Resources::getReference(); CharacterScheduleEntry *entry = resources.charSchedules().getEntry(res->npcScheduleId); res->npcSchedule.addFront(DISPATCH_ACTION, entry, res->roomNumber); } @@ -621,9 +621,12 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) { // Special post-load handling if (res->loadOffset == 3) hotspot->setPersistant(true); if (res->loadOffset == 5) hotspot->handleTalkDialog(); - if (hotspotId == CASTLE_SKORL_ID) + if (hotspotId == CASTLE_SKORL_ID) { // The Castle skorl has a default room #99, so it needs to be adjusted dynamically - res->npcSchedule.top().setRoomNumber(res->roomNumber); + res->npcSchedule.clear(); + CharacterScheduleEntry *entry = resources.charSchedules().getEntry(res->npcScheduleId); + res->npcSchedule.addFront(DISPATCH_ACTION, entry, res->roomNumber); + } // TODO: Figure out why there's a room set in the animation decode for a range of characters, // particularly since it doesn't seem to match what happens in-game -- cgit v1.2.3 From 766cdac9f392ceed879a4fe073e93b66e6764092 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 18 Aug 2009 12:49:34 +0000 Subject: Mapped some Sierra internal IDs to our own ones, and added a note about a hack currently used in the fallback detector svn-id: r43509 --- engines/sci/detection.cpp | 81 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 77 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index c025523ca0..959f18739b 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -3033,6 +3033,76 @@ public: const ADGameDescription *fallbackDetect(const Common::FSList &fslist) const; }; +Common::String convertSierraGameId(Common::String sierraId) { + // TODO: SCI32 IDs + + // TODO: astrochicken + // TODO: The internal id of christmas1998 is "demo" + if (sierraId == "card") + return "christmas1990"; + // TODO: christmas1992 + if (sierraId == "arthur") + return "camelot"; + if (sierraId == "brain") + return "castlebrain"; + // iceman is the same + // longbow is the same + if (sierraId == "eco") + return "ecoquest"; + if (sierraId == "rain") + return "ecoquest2"; + if (sierraId == "fp") + return "freddypharkas"; + if (sierraId == "emc") + return "funseeker"; + if (sierraId == "cardgames") + return "hoyle1"; + if (sierraId == "solitare") + return "hoyle2"; + // TODO: hoyle3 + // TODO: hoyle4 + if (sierraId == "kq1") + return "kq1sci"; + if (sierraId == "kq4") + return "kq4sci"; + if (sierraId == "lsl1") + return "lsl1sci"; + // lsl2 is the same + // lsl3 is the same + // lsl5 is the same + // lsl6 is the same + // TODO: lslcasino + // TODO: fairytales + // TODO: mothergoose + // TODO: msastrochicken + if (sierraId == "cb1") + return "laurabow"; + if (sierraId == "lb2") + return "laurabow2"; + // TODO: lb2 floppy (its resources can't be read) + if (sierraId == "twisty") + return "pepper"; + // TODO: pq1sci (its resources can't be read) + if (sierraId == "pq") + return "pq2"; + // pq3 is the same + if (sierraId == "glory") + return "qfg1"; + // TODO: qfg1 VGA (its resources can't be read) + if (sierraId == "trial") + return "qfg2"; + if (sierraId == "qfg1") + return "qfg3"; + // TODO: slater + if (sierraId == "sq1") + return "sq1sci"; + // sq3 is the same + // sq4 is the same + // sq5 is the same + // TODO: islandbrain + + return sierraId; +} const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fslist) const { bool foundResMap = false; @@ -3049,8 +3119,13 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl filename.toLowercase(); if (filename.contains("resource.map") || filename.contains("resmap.000")) { - // resource.map is located in the same directory as the other resource files, + // HACK: resource.map is located in the same directory as the other resource files, // therefore add the directory here, so that the game files can be opened later on + // TODO/FIXME: This should be removed, as it will cause problems with game detection: + // if we got a game A, and then try to detect another game B, adding a default + // directory here means that game A's files will be opened first. We either need to + // remove the directory added here, or rewrite all the functions which access game + // files Common::File::addDefaultDirectory(file->getParent().getPath()); foundResMap = true; } @@ -3104,9 +3179,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl Common::String gameName = obj_get_name(segManager,version, game_obj); debug(2, " \"%s\" at %04x:%04x", gameName.c_str(), PRINT_REG(game_obj)); gameName.toLowercase(); - // TODO: Sierra's game IDs are not always the same as our own ones, we need to map them - // accordingly here - s_fallbackDesc.desc.gameid = strdup(gameName.c_str()); + s_fallbackDesc.desc.gameid = strdup(convertSierraGameId(gameName).c_str()); delete kernel; delete segManager; delete resMgr; -- cgit v1.2.3 From db0cd620f6f5766b6287bb0f0aa1ac9c866c4cba Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 18 Aug 2009 14:10:31 +0000 Subject: Started rewriting the SCI engine to use FSNode instead of file names. This is the proper solution for removing the hack in the fallback detector, but it still needs work. Also, reduced the things needed to be initialized a bit, so that the detection is a bit faster svn-id: r43510 --- engines/sci/detection.cpp | 21 ++--- engines/sci/engine/kernel.cpp | 6 +- engines/sci/engine/kernel.h | 7 +- engines/sci/resource.cpp | 173 ++++++++++++++++++++++++++++++++++-------- engines/sci/resource.h | 16 ++++ 5 files changed, 178 insertions(+), 45 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 959f18739b..ee9fd5fb18 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -3123,9 +3123,8 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl // therefore add the directory here, so that the game files can be opened later on // TODO/FIXME: This should be removed, as it will cause problems with game detection: // if we got a game A, and then try to detect another game B, adding a default - // directory here means that game A's files will be opened first. We either need to - // remove the directory added here, or rewrite all the functions which access game - // files + // directory here means that game A's files will be opened first. We need to rewrite + // all the functions that access game files to use FSNodes instead Common::File::addDefaultDirectory(file->getParent().getPath()); foundResMap = true; } @@ -3167,20 +3166,22 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl s_fallbackDesc.desc.flags = ADGF_NO_FLAGS; // Determine the game id - ResourceManager *resMgr = new ResourceManager(); + ResourceManager *resMgr = new ResourceManager(fslist); SciVersion version = resMgr->sciVersion(); - Kernel *kernel = new Kernel(resMgr); - SegManager *segManager = new SegManager(resMgr, version, kernel->hasOldScriptHeader()); - if (!script_instantiate(resMgr, segManager, version, kernel->hasOldScriptHeader(), 0)) { + Kernel *kernel = new Kernel(resMgr, true); + bool hasOldScriptHeader = kernel->hasOldScriptHeader(); + delete kernel; + + SegManager *segManager = new SegManager(resMgr, version, hasOldScriptHeader); + if (!script_instantiate(resMgr, segManager, version, hasOldScriptHeader, 0)) { warning("fallbackDetect(): Could not instantiate script 0"); return 0; } reg_t game_obj = script_lookup_export(segManager, 0, 0); - Common::String gameName = obj_get_name(segManager,version, game_obj); - debug(2, " \"%s\" at %04x:%04x", gameName.c_str(), PRINT_REG(game_obj)); + Common::String gameName = obj_get_name(segManager, version, game_obj); + debug(2, "Detected ID: \"%s\" at %04x:%04x", gameName.c_str(), PRINT_REG(game_obj)); gameName.toLowercase(); s_fallbackDesc.desc.gameid = strdup(convertSierraGameId(gameName).c_str()); - delete kernel; delete segManager; delete resMgr; diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 09d342b7fe..223e7fc1e9 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -363,11 +363,15 @@ static const char *argtype_description[] = { "Arithmetic" }; -Kernel::Kernel(ResourceManager *resmgr) : _resmgr(resmgr) { +Kernel::Kernel(ResourceManager *resmgr, bool minimalLoad) : _resmgr(resmgr) { memset(&_selectorMap, 0, sizeof(_selectorMap)); // FIXME: Remove this once/if we C++ify selector_map_t loadSelectorNames(); detectSciFeatures(); + + if (minimalLoad) // If we're only asked to detect game features, stop here + return; + mapSelectors(); // Map a few special selectors for later use loadOpcodes(); loadKernelNames(); diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 8be51549f6..997cdaea77 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -65,7 +65,12 @@ enum AutoDetectedFeatures { class Kernel { public: - Kernel(ResourceManager *resmgr); + /** + * Initializes the SCI kernel + * @param minimalLoad If true, only the selector names are loaded, to detect game features. + * It's set to true by the advanced game detector to speed it up + */ + Kernel(ResourceManager *resmgr, bool minimalLoad = false); ~Kernel(); uint getOpcodesSize() const { return _opcodes.size(); } diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 2ca198954a..9b9c9ee26c 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -112,6 +112,20 @@ ResourceSource *ResourceManager::addExternalMap(const char *file_name) { newsrc->source_type = kSourceExtMap; newsrc->location_name = file_name; + newsrc->resourceFile = 0; + newsrc->scanned = false; + newsrc->associated_map = NULL; + + _sources.push_back(newsrc); + return newsrc; +} + +ResourceSource *ResourceManager::addExternalMap(const Common::FSNode *mapFile) { + ResourceSource *newsrc = new ResourceSource(); + + newsrc->source_type = kSourceExtMap; + newsrc->location_name = mapFile->getName(); + newsrc->resourceFile = mapFile; newsrc->scanned = false; newsrc->associated_map = NULL; @@ -125,6 +139,21 @@ ResourceSource *ResourceManager::addSource(ResourceSource *map, ResSourceType ty newsrc->source_type = type; newsrc->scanned = false; newsrc->location_name = filename; + newsrc->resourceFile = 0; + newsrc->volume_number = number; + newsrc->associated_map = map; + + _sources.push_back(newsrc); + return newsrc; +} + +ResourceSource *ResourceManager::addSource(ResourceSource *map, ResSourceType type, const Common::FSNode *resFile, int number) { + ResourceSource *newsrc = new ResourceSource(); + + newsrc->source_type = type; + newsrc->scanned = false; + newsrc->location_name = resFile->getName(); + newsrc->resourceFile = resFile; newsrc->volume_number = number; newsrc->associated_map = map; @@ -342,6 +371,48 @@ int ResourceManager::addAppropriateSources() { return 1; } +int ResourceManager::addAppropriateSources(const Common::FSList &fslist) { + ResourceSource *map = 0; + + // First, find resource.map + for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { + if (file->isDirectory()) + continue; + + Common::String filename = file->getName(); + filename.toLowercase(); + + if (filename.contains("resource.map") || filename.contains("resmap.000")) { + map = addExternalMap(file); + break; + } + } + + if (!map) + return 0; + + // Now find all the resource.0?? files + for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { + if (file->isDirectory()) + continue; + + Common::String filename = file->getName(); + filename.toLowercase(); + + if (filename.contains("resource.0") || filename.contains("ressci.0")) { + const char *dot = strrchr(filename.c_str(), '.'); + int number = atoi(dot + 1); + + addSource(map, kSourceVolume, file, number); + } + } + + // This function is only called by the advanced detector, and we don't really need + // to add a patch directory or message.map here + + return 1; +} + int ResourceManager::addInternalSources() { Common::List *resources = listResources(kResourceTypeMap); Common::List::iterator itr = resources->begin(); @@ -397,14 +468,22 @@ void ResourceManager::freeResourceSources() { } ResourceManager::ResourceManager() { + addAppropriateSources(); + init(); +} + +ResourceManager::ResourceManager(const Common::FSList &fslist) { + addAppropriateSources(fslist); + init(); +} + +void ResourceManager::init() { _memoryLocked = 0; _memoryLRU = 0; _LRU.clear(); _resMap.clear(); _audioMapSCI1 = NULL; - addAppropriateSources(); - // FIXME: put this in an Init() function, so that we can error out if detection fails completely _mapVersion = detectMapVersion(); @@ -601,7 +680,8 @@ const char *ResourceManager::versionDescription(ResVersion version) const { } ResourceManager::ResVersion ResourceManager::detectMapVersion() { - Common::File file; + Common::SeekableReadStream *fileStream = 0; + Common::File *file = 0; byte buff[6]; ResourceSource *rsrc= 0; @@ -609,23 +689,30 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { rsrc = *it; if (rsrc->source_type == kSourceExtMap) { - file.open(rsrc->location_name); + if (rsrc->resourceFile) { + fileStream = rsrc->resourceFile->createReadStream(); + } else { + file = new Common::File(); + file->open(rsrc->location_name); + if (file->isOpen()) + fileStream = file; + } break; } } - if (file.isOpen() == false) { + if (!fileStream) { error("Failed to open resource map file"); return kResVersionUnknown; } // detection // SCI0 and SCI01 maps have last 6 bytes set to FF - file.seek(-4, SEEK_END); - uint32 uEnd = file.readUint32LE(); + fileStream->seek(-4, SEEK_END); + uint32 uEnd = fileStream->readUint32LE(); if (uEnd == 0xFFFFFFFF) { // check if 0 or 01 - try to read resources in SCI0 format and see if exists - file.seek(0, SEEK_SET); - while (file.read(buff, 6) == 6 && !(buff[0] == 0xFF && buff[1] == 0xFF && buff[2] == 0xFF)) { + fileStream->seek(0, SEEK_SET); + while (fileStream->read(buff, 6) == 6 && !(buff[0] == 0xFF && buff[1] == 0xFF && buff[2] == 0xFF)) { if (getVolume(rsrc, (buff[5] & 0xFC) >> 2) == NULL) return kResVersionSci1Middle; } @@ -639,14 +726,15 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { uint16 lastDirectoryOffset = 0; uint16 directorySize = 0; ResVersion mapDetected = kResVersionUnknown; - file.seek(0, SEEK_SET); - while (!file.eos()) { - directoryType = file.readByte(); - directoryOffset = file.readUint16LE(); + fileStream->seek(0, SEEK_SET); + + while (!fileStream->eos()) { + directoryType = fileStream->readByte(); + directoryOffset = fileStream->readUint16LE(); if ((directoryType < 0x80) || ((directoryType > 0xA0) && (directoryType != 0xFF))) break; // Offset is above file size? -> definitely not SCI1/SCI1.1 - if (directoryOffset > file.size()) + if (directoryOffset > fileStream->size()) break; if (lastDirectoryOffset) { directorySize = directoryOffset - lastDirectoryOffset; @@ -655,11 +743,14 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { if ((directorySize % 5 == 0) && (directorySize % 6)) mapDetected = kResVersionSci11; } - if (directoryType==0xFF) { + if (directoryType == 0xFF) { // FFh entry needs to point to EOF - if (directoryOffset != file.size()) + if (directoryOffset != fileStream->size()) break; - if (mapDetected) + + delete fileStream; + + if (mapDetected) return mapDetected; return kResVersionSci1Late; } @@ -675,29 +766,41 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { // "lastDirectoryOffset". This is probably not the correct fix, since before r43000 // the loop above could not prematurely terminate and thus this would always check the // last directory entry instead of the last checked directory entry. - file.seek(lastDirectoryOffset - 7, SEEK_SET); - if (file.readByte() == 0xFF && file.readUint16LE() == file.size()) + fileStream->seek(lastDirectoryOffset - 7, SEEK_SET); + if (fileStream->readByte() == 0xFF && fileStream->readUint16LE() == fileStream->size()) return kResVersionSci32; // TODO : check if there is a difference between these maps #endif + delete fileStream; + return kResVersionUnknown; } ResourceManager::ResVersion ResourceManager::detectVolVersion() { - Common::File file; + Common::SeekableReadStream *fileStream = 0; + Common::File *file = 0; ResourceSource *rsrc; + for (Common::List::iterator it = _sources.begin(); it != _sources.end(); ++it) { rsrc = *it; if (rsrc->source_type == kSourceVolume) { - file.open(rsrc->location_name); + if (rsrc->resourceFile) { + fileStream = rsrc->resourceFile->createReadStream(); + } else { + file = new Common::File(); + file->open(rsrc->location_name); + if (file->isOpen()) + fileStream = file; + } break; } } - if (file.isOpen() == false) { + if (!fileStream) { error("Failed to open volume file"); return kResVersionUnknown; } + // SCI0 volume format: {wResId wPacked+4 wUnpacked wCompression} = 8 bytes // SCI1 volume format: {bResType wResNumber wPacked+4 wUnpacked wCompression} = 9 bytes // SCI1.1 volume format: {bResType wResNumber wPacked wUnpacked wCompression} = 9 bytes @@ -710,15 +813,17 @@ ResourceManager::ResVersion ResourceManager::detectVolVersion() { bool failed = false; // Check for SCI0, SCI1, SCI1.1 and SCI32 v2 (Gabriel Knight 1 CD) formats - while (!file.eos() && file.pos() < 0x100000) { + while (!fileStream->eos() && fileStream->pos() < 0x100000) { if (curVersion > kResVersionSci0Sci1Early) - file.readByte(); - resId = file.readUint16LE(); - dwPacked = (curVersion < kResVersionSci32) ? file.readUint16LE() : file.readUint32LE(); - dwUnpacked = (curVersion < kResVersionSci32) ? file.readUint16LE() : file.readUint32LE(); - wCompression = (curVersion < kResVersionSci32) ? file.readUint16LE() : file.readUint32LE(); - if (file.eos()) + fileStream->readByte(); + resId = fileStream->readUint16LE(); + dwPacked = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE(); + dwUnpacked = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE(); + wCompression = (curVersion < kResVersionSci32) ? fileStream->readUint16LE() : fileStream->readUint32LE(); + if (fileStream->eos()) { + delete fileStream; return curVersion; + } int chk = (curVersion == kResVersionSci0Sci1Early) ? 4 : 20; int offs = curVersion < kResVersionSci11 ? 4 : 0; @@ -740,18 +845,20 @@ ResourceManager::ResVersion ResourceManager::detectVolVersion() { break; } - file.seek(0, SEEK_SET); + fileStream->seek(0, SEEK_SET); continue; } if (curVersion < kResVersionSci11) - file.seek(dwPacked - 4, SEEK_CUR); + fileStream->seek(dwPacked - 4, SEEK_CUR); else if (curVersion == kResVersionSci11) - file.seek((9 + dwPacked) % 2 ? dwPacked + 1 : dwPacked, SEEK_CUR); + fileStream->seek((9 + dwPacked) % 2 ? dwPacked + 1 : dwPacked, SEEK_CUR); else if (curVersion == kResVersionSci32) - file.seek(dwPacked, SEEK_CUR);//(9 + wPacked) % 2 ? wPacked + 1 : wPacked, SEEK_CUR); + fileStream->seek(dwPacked, SEEK_CUR);//(9 + wPacked) % 2 ? wPacked + 1 : wPacked, SEEK_CUR); } + delete fileStream; + if (!failed) return curVersion; diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 8ab740f463..4250225ffe 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -28,6 +28,7 @@ #include "common/str.h" #include "common/file.h" +#include "common/fs.h" #include "common/archive.h" #include "sound/audiostream.h" @@ -136,6 +137,7 @@ struct ResourceSource { ResSourceType source_type; bool scanned; Common::String location_name; // FIXME: Replace by FSNode ? + const Common::FSNode *resourceFile; int volume_number; ResourceSource *associated_map; }; @@ -247,6 +249,7 @@ public: * Creates a new SCI resource manager. */ ResourceManager(); + ResourceManager(const Common::FSList &fslist); ~ResourceManager(); /** @@ -305,6 +308,11 @@ protected: ResVersion _mapVersion; //!< RESOURCE.MAP version SciVersion _sciVersion; //!< Detected SCI version */ + /** + * Initializes the resource manager + */ + void init(); + /** * Add a path to the resource manager's list of sources. * @return a pointer to the added source structure, or NULL if an error occurred. @@ -322,12 +330,19 @@ protected: */ ResourceSource *addSource(ResourceSource *map, ResSourceType type, const char *filename, int number); + + ResourceSource *addSource(ResourceSource *map, ResSourceType type, + const Common::FSNode *resFile, int number); + /** * Add an external (i.e., separate file) map resource to the resource manager's list of sources. * @param file_name The name of the volume to add * @return A pointer to the added source structure, or NULL if an error occurred. */ ResourceSource *addExternalMap(const char *file_name); + + ResourceSource *addExternalMap(const Common::FSNode *mapFile); + /** * Add an internal (i.e., resource) map to the resource manager's list of sources. * @param name The name of the resource to add @@ -344,6 +359,7 @@ protected: */ void scanNewSources(); int addAppropriateSources(); + int addAppropriateSources(const Common::FSList &fslist); int addInternalSources(); void freeResourceSources(); -- cgit v1.2.3 From b33b90ecd0468c58b93e13ff80bf6939e97ed7a6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Aug 2009 15:31:26 +0000 Subject: Made AGOS, DRASCULA, GOB, GROOVIE, MADE, SCUMM and TINSEL properly stop CD audio playback on engine quit. (This only problem affected playback from CD, not from ripped audio files) svn-id: r43512 --- engines/agos/agos.cpp | 2 +- engines/drascula/drascula.cpp | 1 + engines/gob/sound/cdrom.cpp | 1 + engines/groovie/music.cpp | 4 ++++ engines/groovie/music.h | 2 +- engines/made/made.cpp | 2 ++ engines/scumm/sound.cpp | 2 +- engines/tinsel/tinsel.cpp | 1 + 8 files changed, 12 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 07b5c12247..ee2ef98c42 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -899,7 +899,7 @@ AGOSEngine::~AGOSEngine() { if (_driver) delete _driver; - AudioCD.destroy(); + AudioCD.stop(); for (uint i = 0; i < _itemHeap.size(); i++) { delete[] _itemHeap[i]; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 2e3db3478e..3920f8a56c 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -106,6 +106,7 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam DrasculaEngine::~DrasculaEngine() { delete _rnd; + stopSound(); free(_charMap); free(_itemLocations); diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp index 4d6a7ec966..68cbb1b9e2 100644 --- a/engines/gob/sound/cdrom.cpp +++ b/engines/gob/sound/cdrom.cpp @@ -46,6 +46,7 @@ CDROM::CDROM() { } CDROM::~CDROM() { + stop(); } void CDROM::readLIC(DataStream &stream) { diff --git a/engines/groovie/music.cpp b/engines/groovie/music.cpp index 797290a6f3..a92beee17e 100644 --- a/engines/groovie/music.cpp +++ b/engines/groovie/music.cpp @@ -38,6 +38,10 @@ MusicPlayer::MusicPlayer(GroovieEngine *vm) : _prevCDtrack(0), _backgroundDelay(0) { } +MusicPlayer::~MusicPlayer() { + AudioCD.stop(); +} + void MusicPlayer::playSong(uint32 fileref) { Common::StackLock lock(_mutex); diff --git a/engines/groovie/music.h b/engines/groovie/music.h index 9909c8a185..fb1ddfe9c3 100644 --- a/engines/groovie/music.h +++ b/engines/groovie/music.h @@ -37,7 +37,7 @@ namespace Groovie { class MusicPlayer { public: MusicPlayer(GroovieEngine *vm); - virtual ~MusicPlayer() {} + virtual ~MusicPlayer(); void playSong(uint32 fileref); void setBackgroundSong(uint32 fileref); diff --git a/engines/made/made.cpp b/engines/made/made.cpp index c83f7aaf02..e826e3788a 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -127,6 +127,8 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng } MadeEngine::~MadeEngine() { + AudioCD.stop(); + delete _rnd; delete _pmvPlayer; delete _res; diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 528cceb0cc..524dbf70ea 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -86,7 +86,7 @@ Sound::Sound(ScummEngine *parent, Audio::Mixer *mixer) Sound::~Sound() { stopCDTimer(); - AudioCD.destroy(); + AudioCD.stop(); delete _sfxFile; } diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 5f056351b6..7586c5e749 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -888,6 +888,7 @@ TinselEngine::~TinselEngine() { if (MoviePlaying()) FinishBMV(); + AudioCD.stop(); delete _sound; delete _midiMusic; delete _pcmMusic; -- cgit v1.2.3 From 0762bb7cf6d81632a0fd9621104546fa9ae3da18 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 18 Aug 2009 19:42:13 +0000 Subject: - PMV player: Use frame count from PVM file and fix incorrect "invalid chunk type" warning - Fix sprite drawing glitch with vertically flipped sprites (bug #2825925) svn-id: r43521 --- engines/made/pmvplayer.cpp | 19 ++++++------------- engines/made/screen.cpp | 3 ++- 2 files changed, 8 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 9796b01dfc..a6ee649eda 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -62,12 +62,8 @@ bool PmvPlayer::play(const char *filename) { } uint frameDelay = _fd->readUint16LE(); - int unk; _fd->skip(4); // always 0? - unk = _fd->readByte(); - debug(2, "%i", unk); - unk = _fd->readByte(); - debug(2, "%i", unk); + uint frameCount = _fd->readUint16LE(); _fd->skip(4); // always 0? uint soundFreq = _fd->readUint16LE(); @@ -80,7 +76,7 @@ bool PmvPlayer::play(const char *filename) { if (soundFreq == 22254) soundFreq = 22050; for (int i = 0; i < 22; i++) { - unk = _fd->readUint16LE(); + int unk = _fd->readUint16LE(); debug(2, "%i ", unk); } @@ -90,7 +86,7 @@ bool PmvPlayer::play(const char *filename) { _fd->read(_paletteRGB, 768); _vm->_screen->setRGBPalette(_paletteRGB); - uint32 frameCount = 0; + uint32 frameNumber = 0; uint16 chunkCount = 0; uint32 soundSize = 0; uint32 soundChunkOfs = 0, palChunkOfs = 0; @@ -108,7 +104,7 @@ bool PmvPlayer::play(const char *filename) { // get it to work well? _audioStream = Audio::makeAppendableAudioStream(soundFreq, Audio::Mixer::FLAG_UNSIGNED); - while (!_vm->shouldQuit() && !_aborted && !_fd->eos()) { + while (!_vm->shouldQuit() && !_aborted && !_fd->eos() && frameNumber < frameCount) { int32 frameTime = _vm->_system->getMillis(); @@ -117,9 +113,6 @@ bool PmvPlayer::play(const char *filename) { warning("Unknown chunk type"); } - if (_fd->eos()) - break; - // Only reallocate the frame data buffer if its size has changed if (prevChunkSize != chunkSize || !frameData) { if (frameData) @@ -192,7 +185,7 @@ bool PmvPlayer::play(const char *filename) { updateScreen(); if (skipFrames == 0) { - int32 waitTime = (frameCount * frameDelay) - + int32 waitTime = (frameNumber * frameDelay) - (g_system->getMillis() - soundStartTime) - (_vm->_system->getMillis() - frameTime); if (waitTime < 0) { @@ -204,7 +197,7 @@ bool PmvPlayer::play(const char *filename) { } else skipFrames--; - frameCount++; + frameNumber++; } diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index d55b663296..7471743ba4 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -188,7 +188,7 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f if (flipX) { linePtrAdd = -1; - sourceAdd = sourceSurface->w; + sourceAdd = sourceSurface->w - 1; } else { linePtrAdd = 1; sourceAdd = 0; @@ -210,6 +210,7 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f } linePtr += linePtrAdd; } + source += sourcePitch; dest += clipInfo.destSurface->pitch; if (_vm->getGameID() != GID_RTZ) -- cgit v1.2.3 From 2bd1f51d92492fa88ba61dc65f783fc9bbfd852c Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 18 Aug 2009 21:37:31 +0000 Subject: Possible fix for #2828330 (AGI: KQ1: Fast text box). If doesn't break anything else then should go to the branch-1-0-0 too, but haven't had the time to do much testing yet - thus committing to the trunk first. svn-id: r43523 --- engines/agi/cycle.cpp | 4 ++-- engines/agi/menu.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/agi/cycle.cpp b/engines/agi/cycle.cpp index d212f8c2e0..2b4ef7f60a 100644 --- a/engines/agi/cycle.cpp +++ b/engines/agi/cycle.cpp @@ -266,8 +266,8 @@ process_key: } // commented out to close Sarien bug #438872 - if (key) - _game.keypress = key; + //if (key) + // _game.keypress = key; } break; case INPUT_GETSTRING: diff --git a/engines/agi/menu.cpp b/engines/agi/menu.cpp index 5d30eda81d..e1db04ff49 100644 --- a/engines/agi/menu.cpp +++ b/engines/agi/menu.cpp @@ -408,6 +408,7 @@ bool Menu::keyhandler(int key) { if (d->enabled) { debugC(6, kDebugLevelMenu | kDebugLevelInput, "event %d registered", d->event); _vm->_game.controllerOccured[d->event] = true; + _vm->_menuSelected = true; goto exit_menu; } break; -- cgit v1.2.3 From 5e92db60010d2545daf9673d2aeb97e11782fe01 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 07:12:33 +0000 Subject: Skip the whole Lore of the Lands special when the user does any input, like the original did. svn-id: r43527 --- engines/kyra/sequences_lol.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp index c1ceba34e9..54a882d9e2 100644 --- a/engines/kyra/sequences_lol.cpp +++ b/engines/kyra/sequences_lol.cpp @@ -875,20 +875,15 @@ void HistoryPlayer::play() { while (sound->voiceIsPlaying() && !_vm->shouldQuit() && !_vm->skipFlag()) _vm->delay(10); - if (_vm->skipFlag()) { + if (_vm->skipFlag()) sound->voiceStop(); - _vm->resetSkipFlag(); - } ++voiceFilename[4]; } - - if (_vm->skipFlag()) - _vm->resetSkipFlag(); } if (_vm->skipFlag()) - _vm->resetSkipFlag(); + _vm->_eventList.clear(); pal.fill(0, 256, 63); if (_fireWsa->opened()) @@ -899,6 +894,9 @@ void HistoryPlayer::play() { _screen->clearPage(0); pal.fill(0, 256, 0); _screen->fadePalette(pal, 0x3C); + + if (_vm->skipFlag()) + _vm->_eventList.clear(); } void HistoryPlayer::loadWsa(const char *filename) { -- cgit v1.2.3 From 2f162c72c9309037eb0c71ae520319cceb7756e1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 07:13:29 +0000 Subject: Comment out unused function (which was also currently only enabled when SCI32 is enabled). svn-id: r43528 --- engines/sci/engine/kernel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index 223e7fc1e9..a871df936f 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -820,7 +820,7 @@ void Kernel::setDefaultKernelNames() { } #ifdef ENABLE_SCI32 -static void vocab_get_knames11(ResourceManager *resmgr, Common::StringList &names) { +//static void vocab_get_knames11(ResourceManager *resmgr, Common::StringList &names) { /* 999.voc format for SCI1.1 games: [b] # of kernel functions @@ -830,7 +830,7 @@ static void vocab_get_knames11(ResourceManager *resmgr, Common::StringList &name {[w name-len][function name]} ... */ - //unsigned int size = 64, pos = 3; +/* //unsigned int size = 64, pos = 3; int len; Resource *r = resmgr->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_KNAMES), 0); if(r == NULL) // failed to open vocab.999 (happens with SCI1 demos) @@ -843,7 +843,7 @@ static void vocab_get_knames11(ResourceManager *resmgr, Common::StringList &name len = READ_LE_UINT16(r->data + off); names[i] = Common::String((char *)r->data + off + 2, len); } -} +}*/ #endif bool Kernel::loadKernelNames() { -- cgit v1.2.3 From 416fb4f309df5bd3657ec131743cd6605d52036b Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 19 Aug 2009 08:24:40 +0000 Subject: Corrected comments in the bug workaround list svn-id: r43529 --- engines/tinsel/pcode.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp index 8646ad3267..a2661237b7 100644 --- a/engines/tinsel/pcode.cpp +++ b/engines/tinsel/pcode.cpp @@ -145,8 +145,8 @@ const WorkaroundEntry workaroundList[] = { // Present Outside Inn {TINSEL_V1, false, 352600876, 0, fragment2_size, fragment2}, - // DW1-GRA: Talking to palace guards in Act 2 gives !!!HIGH STRING||| - this happens if you initiate dialog - // with one of the guards, but not the other. So this fix routes the talk parameters of the broken one + // DW1-GRA: Talking to palace guards in Act 2 gives !!!HIGH STRING||| - this happens if you initiate dialog with + // one of the guards, but not the other. So these fragments provide the correct talk parameters where needed {TINSEL_V1, false, 310506872, 463, fragment4_size, fragment4}, {TINSEL_V1, false, 310506872, 485, fragment5_size, fragment5}, {TINSEL_V1, false, 310506872, 513, fragment6_size, fragment6}, @@ -164,7 +164,7 @@ const WorkaroundEntry workaroundList[] = { {TINSEL_V0, false, 0, 0, 0, NULL} }; -//310505453, x + //----------------- LOCAL GLOBAL DATA -------------------- /** -- cgit v1.2.3 From 0c2ab20663c12464e923608a73d851c019006238 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 08:30:15 +0000 Subject: Implemented proper character selection of Lands of Lore PC98. svn-id: r43531 --- engines/kyra/lol.h | 4 ++ engines/kyra/screen.cpp | 19 +++++++ engines/kyra/sequences_lol.cpp | 109 ++++++++++++++++++++++++++++++----------- engines/kyra/staticres.cpp | 11 +++++ 4 files changed, 115 insertions(+), 28 deletions(-) (limited to 'engines') diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h index 1c89a7a1eb..7a112cfd8f 100644 --- a/engines/kyra/lol.h +++ b/engines/kyra/lol.h @@ -366,6 +366,10 @@ private: static const CharacterPrev _charPreviews[]; + // PC98 specific data + static const uint16 _charPosXPC98[]; + static const uint8 _charNamesPC98[][11]; + WSAMovie_v2 *_chargenWSA; static const uint8 _chargenFrameTableTalkie[]; static const uint8 _chargenFrameTableFloppy[]; diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index f5570acd72..b50bc7a1e6 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -562,6 +562,12 @@ void Screen::setPagePixel(int pageNum, int x, int y, uint8 color) { assert(x >= 0 && x < SCREEN_W && y >= 0 && y < SCREEN_H); if (pageNum == 0 || pageNum == 1) addDirtyRect(x, y, 1, 1); + + if (_use16ColorMode) { + color &= 0x0F; + color |= (color << 4); + } + _pagePtrs[pageNum][y * SCREEN_W + x] = color; } @@ -954,6 +960,11 @@ void Screen::fillRect(int x1, int y1, int x2, int y2, uint8 color, int pageNum, clearOverlayRect(pageNum, x1, y1, x2-x1+1, y2-y1+1); + if (_use16ColorMode) { + color &= 0x0F; + color |= (color << 4); + } + if (xored) { for (; y1 <= y2; ++y1) { for (int x = x1; x <= x2; ++x) @@ -1035,6 +1046,11 @@ void Screen::drawClippedLine(int x1, int y1, int x2, int y2, int color) { void Screen::drawLine(bool vertical, int x, int y, int length, int color) { uint8 *ptr = getPagePtr(_curPage) + y * SCREEN_W + x; + if (_use16ColorMode) { + color &= 0x0F; + color |= (color << 4); + } + if (vertical) { assert((y + length) <= SCREEN_H); int currLine = 0; @@ -2974,6 +2990,9 @@ byte *Screen::getOverlayPtr(int page) { if (_vm->gameFlags().gameID == GI_KYRA2) { if (page == 12 || page == 13) return _sjisOverlayPtrs[3]; + } else if (_vm->gameFlags().gameID == GI_LOL) { + if (page == 4 || page == 5) + return _sjisOverlayPtrs[3]; } return 0; diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp index 54a882d9e2..3b061e5062 100644 --- a/engines/kyra/sequences_lol.cpp +++ b/engines/kyra/sequences_lol.cpp @@ -289,18 +289,56 @@ int LoLEngine::chooseCharacter() { _screen->setFont(Screen::FID_9_FNT); _screen->_curPage = 2; - for (int i = 0; i < 4; ++i) - _screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, _charPreviews[i].name); + if (_flags.platform == Common::kPlatformPC98) { + _screen->fillRect(17, 29, 94, 97, 17); + _screen->fillRect(68, 167, 310, 199, 17); + _screen->drawClippedLine(68, 166, 311, 166, 238); + _screen->drawClippedLine(68, 166, 68, 199, 238); + _screen->drawClippedLine(311, 166, 311, 199, 238); - for (int i = 0; i < 4; ++i) { - _screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 48, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[0]); - _screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 56, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[1]); - _screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 64, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[2]); - } + _screen->_curPage = 4; + _screen->fillRect(17, 29, 94, 97, 17); + _screen->_curPage = 2; + + for (int i = 0; i < 4; ++i) { + _screen->printText((const char *)_charNamesPC98[i], _charPosXPC98[i], 168, 0xC1, 0x00); + + // Since our SJIS font does not support ASCII digits currently, we have to use the + // digits from the SJIS range, which looks different to the original. + for (int j = 0; j < 3; ++j) { + uint8 buffer[5]; + snprintf((char *)buffer, 5, "%2d", _charPreviews[i].attrib[j]); + + buffer[3] = buffer[1] - '0' + 0x4F; + buffer[2] = 0x82; + if (buffer[0] != ' ') { + buffer[1] = buffer[0] - '0' + 0x4F; + buffer[0] = 0x82; + } else { + buffer[1] = 0x40; + buffer[0] = 0x81; + } + buffer[4] = 0x00; + + _screen->printText((const char *)buffer, _charPosXPC98[i] + 16, 176 + j * 8, 0x81, 0x00); + } + } + + _screen->printText(_tim->getCTableEntry(51), 72, 176, 0x81, 0x00); + _screen->printText(_tim->getCTableEntry(53), 72, 184, 0x81, 0x00); + _screen->printText(_tim->getCTableEntry(55), 72, 192, 0x81, 0x00); + } else { + for (int i = 0; i < 4; ++i) { + _screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, _charPreviews[i].name); + _screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 48, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[0]); + _screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 56, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[1]); + _screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 64, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[2]); + } - _screen->fprintStringIntro("%s", 36, 173, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(51)); - _screen->fprintStringIntro("%s", 36, 181, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(53)); - _screen->fprintStringIntro("%s", 36, 189, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(55)); + _screen->fprintStringIntro("%s", 36, 173, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(51)); + _screen->fprintStringIntro("%s", 36, 181, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(53)); + _screen->fprintStringIntro("%s", 36, 189, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(55)); + } _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK); _screen->_curPage = 0; @@ -337,6 +375,8 @@ int LoLEngine::chooseCharacter() { } else { break; } + + delay(10); } if (shouldQuit()) @@ -363,11 +403,13 @@ void LoLEngine::kingSelectionIntro() { _screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK); int y = 38; - _screen->fprintStringIntro("%s", 8, y, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(57)); - _screen->fprintStringIntro("%s", 8, y + 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(58)); - _screen->fprintStringIntro("%s", 8, y + 20, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(59)); - _screen->fprintStringIntro("%s", 8, y + 30, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(60)); - _screen->fprintStringIntro("%s", 8, y + 40, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(61)); + if (_flags.platform == Common::kPlatformPC98) { + for (int i = 0; i < 5; ++i) + _screen->printText(_tim->getCTableEntry(57 + i), 16, 32 + i * 8, 0xC1, 0x00); + } else { + for (int i = 0; i < 5; ++i) + _screen->fprintStringIntro("%s", 8, y + i * 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(57 + i)); + } _sound->voicePlay("KING01", &_speechHandle); @@ -405,8 +447,13 @@ void LoLEngine::kingSelectionReminder() { _screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK); int y = 48; - _screen->fprintStringIntro("%s", 8, y, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(62)); - _screen->fprintStringIntro("%s", 8, y + 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(63)); + if (_flags.platform == Common::kPlatformPC98) { + _screen->printText(_tim->getCTableEntry(62), 16, 32, 0xC1, 0x00); + _screen->printText(_tim->getCTableEntry(63), 16, 40, 0xC1, 0x00); + } else { + _screen->fprintStringIntro("%s", 8, y, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(62)); + _screen->fprintStringIntro("%s", 8, y + 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(63)); + } _sound->voicePlay("KING02", &_speechHandle); @@ -540,13 +587,17 @@ int LoLEngine::selectionCharInfo(int character) { static const uint8 charSelectInfoIdx[] = { 0x1D, 0x22, 0x27, 0x2C }; const int idx = charSelectInfoIdx[character]; - _screen->fprintStringIntro("%s", 50, 127, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+0)); - _screen->fprintStringIntro("%s", 50, 137, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+1)); - _screen->fprintStringIntro("%s", 50, 147, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+2)); - _screen->fprintStringIntro("%s", 50, 157, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+3)); - _screen->fprintStringIntro("%s", 50, 167, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+4)); + if (_flags.platform == Common::kPlatformPC98) { + for (int i = 0; i < 5; ++i) + _screen->printText(_tim->getCTableEntry(idx+i), 60, 128 + i * 8, 0x41, 0x00); + + _screen->printText(_tim->getCTableEntry(69), 112, 168, 0x01, 0x00); + } else { + for (int i = 0; i < 5; ++i) + _screen->fprintStringIntro("%s", 50, 127 + i * 10, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+i)); - _screen->fprintStringIntro("%s", 100, 168, 0x32, 0x00, 0xCF, 0x20, _tim->getCTableEntry(69)); + _screen->fprintStringIntro("%s", 100, 168, 0x32, 0x00, 0xCF, 0x20, _tim->getCTableEntry(69)); + } selectionCharInfoIntro(vocFilename); if (_charSelectionInfoResult == -1) { @@ -568,11 +619,13 @@ int LoLEngine::selectionCharInfo(int character) { _screen->copyRegion(48, 127, 48, 160, 272, 35, 4, 0, Screen::CR_NO_P_CHECK); _screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK); - _screen->fprintStringIntro("%s", 3, 28, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(64)); - _screen->fprintStringIntro("%s", 3, 38, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(65)); - _screen->fprintStringIntro("%s", 3, 48, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(66)); - _screen->fprintStringIntro("%s", 3, 58, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(67)); - _screen->fprintStringIntro("%s", 3, 68, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(68)); + if (_flags.platform == Common::kPlatformPC98) { + for (int i = 0; i < 5; ++i) + _screen->printText(_tim->getCTableEntry(64+i), 16, 32 + i * 8, 0xC1, 0x00); + } else { + for (int i = 0; i < 5; ++i) + _screen->fprintStringIntro("%s", 3, 28 + i * 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(64+i)); + } resetSkipFlag(); kingSelectionOutro(); diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 51288f31df..4f3824479d 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -3196,6 +3196,17 @@ const LoLEngine::CharacterPrev LoLEngine::_charPreviews[] = { { "Conrad", 0x10F, 0x7F, { 0x0A, 0x0C, 0x0A } } }; +const uint16 LoLEngine::_charPosXPC98[] = { + 92, 152, 212, 268 +}; + +const uint8 LoLEngine::_charNamesPC98[][11] = { + { 0x83, 0x41, 0x83, 0x4E, 0x83, 0x56, 0x83, 0x46, 0x83, 0x8B, 0x00 }, + { 0x83, 0x7D, 0x83, 0x43, 0x83, 0x50, 0x83, 0x8B, 0x00, 0x00, 0x00 }, + { 0x83, 0x4C, 0x81, 0x5B, 0x83, 0x89, 0x83, 0x93, 0x00, 0x00, 0x00 }, + { 0x83, 0x52, 0x83, 0x93, 0x83, 0x89, 0x83, 0x62, 0x83, 0x68, 0x00 } +}; + const uint8 LoLEngine::_chargenFrameTableTalkie[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x04, 0x03, 0x02, 0x01, -- cgit v1.2.3 From a37c9164ee09cb7b29b312bd7810790b08dc2355 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 08:46:59 +0000 Subject: Cleanup. svn-id: r43533 --- engines/kyra/script_lok.cpp | 92 ++++++++------------------------------------- 1 file changed, 16 insertions(+), 76 deletions(-) (limited to 'engines') diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index a778a2066b..5d323b7c17 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -429,22 +429,14 @@ int KyraEngine_LoK::o1_runWSAFromBeginningToEnd(EMCState *script) { int wsaFrame = 0; while (running) { + const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + _movieObjects[wsaIndex]->displayFrame(wsaFrame++, 0, xpos, ypos, 0, 0, 0); _animator->_updateScreen = true; if (wsaFrame >= _movieObjects[wsaIndex]->frames()) running = false; - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); - while (_system->getMillis() < continueTime) { - if (worldUpdate) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - } else { - _screen->updateScreen(); - } - if (continueTime - _system->getMillis() >= 10) - delay(10); - } + delayUntil(continueTime, false, worldUpdate != 0); } _screen->showMouse(); @@ -460,18 +452,10 @@ int KyraEngine_LoK::o1_displayWSAFrame(EMCState *script) { int waitTime = stackPos(3); int wsaIndex = stackPos(4); _screen->hideMouse(); + const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 0, xpos, ypos, 0, 0, 0); _animator->_updateScreen = true; - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (skipFlag()) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } + delayUntil(continueTime, false, true); _screen->showMouse(); return 0; } @@ -501,15 +485,10 @@ int KyraEngine_LoK::o1_runWSAFrames(EMCState *script) { int wsaIndex = stackPos(5); _screen->hideMouse(); for (; startFrame <= endFrame; ++startFrame) { - uint32 nextRun = _system->getMillis() + delayTime * _tickLength; + const uint32 nextRun = _system->getMillis() + delayTime * _tickLength; _movieObjects[wsaIndex]->displayFrame(startFrame, 0, xpos, ypos, 0, 0, 0); _animator->_updateScreen = true; - while (_system->getMillis() < nextRun) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (nextRun - _system->getMillis() >= 10) - delay(10); - } + delayUntil(nextRun, false, true); } _screen->showMouse(); return 0; @@ -693,18 +672,10 @@ int KyraEngine_LoK::o1_displayWSAFrameOnHidPage(EMCState *script) { int wsaIndex = stackPos(4); _screen->hideMouse(); - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 2, xpos, ypos, 0, 0, 0); _animator->_updateScreen = true; - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (skipFlag()) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } + delayUntil(continueTime, false, true); _screen->showMouse(); return 0; @@ -776,37 +747,21 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { if (endFrame >= startFrame) { int frame = startFrame; while (endFrame >= frame) { - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 0, xpos, ypos, 0, 0, 0); if (waitTime) _animator->_updateScreen = true; - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (skipFlag()) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } + delayUntil(continueTime, false, true); ++frame; } } else { int frame = startFrame; while (endFrame <= frame) { - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 0, xpos, ypos, 0, 0, 0); if (waitTime) _animator->_updateScreen = true; - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (skipFlag()) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } + delayUntil(continueTime, false, true); --frame; } } @@ -1060,16 +1015,7 @@ int KyraEngine_LoK::o1_walkCharacterToPoint(EMCState *script) { setCharacterPosition(character, 0); ++curPos; - nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); - while (_system->getMillis() < nextFrame) { - _sprites->updateSceneAnims(); - updateMousePointer(); - _timer->update(); - _animator->updateAllObjectShapes(); - updateTextFade(); - if ((nextFrame - _system->getMillis()) >= 10) - delay(10); - } + delayUntil(nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(), true, true); } return 0; } @@ -1318,9 +1264,8 @@ int KyraEngine_LoK::o1_makeAmuletAppear(EMCState *script) { assert(_amuleteAnim); _screen->hideMouse(); snd_playSoundEffect(0x70); - uint32 nextTime = 0; for (int i = 0; _amuleteAnim[i] != 0xFF; ++i) { - nextTime = _system->getMillis() + 5 * _tickLength; + const uint32 nextTime = _system->getMillis() + 5 * _tickLength; uint8 code = _amuleteAnim[i]; if (code == 3 || code == 7) @@ -1335,12 +1280,7 @@ int KyraEngine_LoK::o1_makeAmuletAppear(EMCState *script) { amulet->displayFrame(code, 0, 224, 152, 0, 0, 0); _animator->_updateScreen = true; - while (_system->getMillis() < nextTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (nextTime - _system->getMillis() >= 10) - delay(10); - } + delayUntil(nextTime, false, true); } _screen->showMouse(); } -- cgit v1.2.3 From 6145ed384b3cb8b143efaafd7402b0bcdc572706 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 08:54:41 +0000 Subject: Cleanup. svn-id: r43534 --- engines/kyra/script_hof.cpp | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) (limited to 'engines') diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 1b8c1d32b3..a811952801 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -186,20 +186,14 @@ int KyraEngine_HoF::o2_displayWsaFrame(EMCState *script) { int backUp = stackPos(8); _screen->hideMouse(); - uint32 endTime = _system->getMillis() + waitTime * _tickLength; + const uint32 endTime = _system->getMillis() + waitTime * _tickLength; _wsaSlots[slot]->displayFrame(frame, dstPage, x, y, copyParam | 0xC000, 0, 0); _screen->updateScreen(); if (backUp) memcpy(_gamePlayBuffer, _screen->getCPagePtr(3), 46080); - while (_system->getMillis() < endTime) { - if (doUpdate) - update(); - - if (endTime - _system->getMillis() >= 10) - delay(10); - } + delayUntil(endTime, false, doUpdate != 0); _screen->showMouse(); return 0; } @@ -224,34 +218,22 @@ int KyraEngine_HoF::o2_displayWsaSequentialFramesLooping(EMCState *script) { while (curTime < maxTimes) { if (startFrame < endFrame) { for (int i = startFrame; i <= endFrame; ++i) { - uint32 endTime = _system->getMillis() + waitTime * _tickLength; + const uint32 endTime = _system->getMillis() + waitTime * _tickLength; _wsaSlots[slot]->displayFrame(i, 0, x, y, 0xC000 | copyFlags, 0, 0); if (!skipFlag()) { _screen->updateScreen(); - - do { - update(); - - if (endTime - _system->getMillis() >= 10) - delay(10); - } while (_system->getMillis() < endTime); + delayUntil(endTime, false, true); } } } else { for (int i = startFrame; i >= endFrame; --i) { - uint32 endTime = _system->getMillis() + waitTime * _tickLength; + const uint32 endTime = _system->getMillis() + waitTime * _tickLength; _wsaSlots[slot]->displayFrame(i, 0, x, y, 0xC000 | copyFlags, 0, 0); if (!skipFlag()) { _screen->updateScreen(); - - do { - update(); - - if (endTime - _system->getMillis() >= 10 && !skipFlag()) - delay(10); - } while (_system->getMillis() < endTime && !skipFlag()); + delayUntil(endTime, false, true); } } } @@ -282,7 +264,7 @@ int KyraEngine_HoF::o2_displayWsaSequentialFrames(EMCState *script) { _screen->hideMouse(); while (currentFrame <= lastFrame) { - uint32 endTime = _system->getMillis() + frameDelay; + const uint32 endTime = _system->getMillis() + frameDelay; _wsaSlots[index]->displayFrame(currentFrame++, 0, stackPos(0), stackPos(1), copyParam, 0, 0); if (!skipFlag()) { _screen->updateScreen(); @@ -310,7 +292,7 @@ int KyraEngine_HoF::o2_displayWsaSequence(EMCState *script) { const int lastFrame = _wsaSlots[index]->frames(); while (currentFrame <= lastFrame) { - uint32 endTime = _system->getMillis() + frameDelay; + const uint32 endTime = _system->getMillis() + frameDelay; _wsaSlots[index]->displayFrame(currentFrame++, 0, stackPos(0), stackPos(1), copyParam, 0, 0); if (!skipFlag()) { if (doUpdate) -- cgit v1.2.3 From ca6fa52b1a62e7635e7f3cdb022ac0a25b22abd2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 08:55:04 +0000 Subject: Cleanup. svn-id: r43535 --- engines/kyra/script_mr.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'engines') diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 819bf838ca..9943fe419d 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -266,7 +266,7 @@ int KyraEngine_MR::o3_wipeDownMouseItem(EMCState *script) { for (int curY = y, height = 20; height > 0; height -= 2, curY += 2) { restoreGfxRect32x32(x, y); _screen->setNewShapeHeight(shape, height); - uint32 waitTime = _system->getMillis() + _tickLength; + const uint32 waitTime = _system->getMillis() + _tickLength; _screen->drawShape(0, shape, x, curY, 0, 0); _screen->updateScreen(); delayUntil(waitTime); @@ -1131,15 +1131,7 @@ int KyraEngine_MR::o3d_updateAnim(EMCState *script) { int KyraEngine_MR::o3d_delay(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3d_delay(%p) (%d)", (const void *)script, stackPos(0)); - const uint32 endTime = _system->getMillis() + stackPos(0) * _tickLength; - while (_system->getMillis() < endTime) { - if (_chatText) - updateWithText(); - else - update(); - - _system->delayMillis(10); - } + delayUntil(_system->getMillis() + stackPos(0) * _tickLength, false, true); return 0; } -- cgit v1.2.3 From dd67cb7c9442071448432f107432249eb7ef1d95 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 09:01:04 +0000 Subject: Add missing "break" in switch statement. svn-id: r43536 --- engines/kyra/lol.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp index 816e244531..eb313821af 100644 --- a/engines/kyra/lol.cpp +++ b/engines/kyra/lol.cpp @@ -65,6 +65,7 @@ LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraEngine_v1(sy case Common::JA_JPN: _lang = 0; + break; default: warning("unsupported language, switching back to English"); -- cgit v1.2.3 From 34e30a29b5d4902514e696369f8714b171a778bb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 16:19:55 +0000 Subject: Make KYRA only call OSystem::updateScreen from inside Screen::updateScreen, when the screen really changed OR the palette changed. svn-id: r43537 --- engines/kyra/animator_lok.cpp | 7 +------ engines/kyra/animator_lok.h | 1 - engines/kyra/gui_lok.cpp | 1 - engines/kyra/kyra_v1.cpp | 5 +---- engines/kyra/screen.cpp | 11 ++++++++++- engines/kyra/screen.h | 2 +- engines/kyra/script_lok.cpp | 12 ------------ engines/kyra/sequences_lok.cpp | 1 - engines/kyra/text_lok.cpp | 1 - 9 files changed, 13 insertions(+), 28 deletions(-) (limited to 'engines') diff --git a/engines/kyra/animator_lok.cpp b/engines/kyra/animator_lok.cpp index a05eabe3e1..04c31a1422 100644 --- a/engines/kyra/animator_lok.cpp +++ b/engines/kyra/animator_lok.cpp @@ -37,7 +37,6 @@ Animator_LoK::Animator_LoK(KyraEngine_LoK *vm, OSystem *system) { _vm = vm; _screen = vm->screen(); _initOk = false; - _updateScreen = false; _system = system; _screenObjects = _actors = _items = _sprites = _objectQueue = 0; _noDrawShapesFlag = 0; @@ -382,15 +381,11 @@ void Animator_LoK::copyChangedObjectsForward(int refreshFlag) { _screen->copyRegion(xpos << 3, ypos, xpos << 3, ypos, width << 3, height, 2, 0); curObject->refreshFlag = 0; - _updateScreen = true; } } } - if (_updateScreen) { - _screen->updateScreen(); - _updateScreen = false; - } + _screen->updateScreen(); } void Animator_LoK::updateAllObjectShapes() { diff --git a/engines/kyra/animator_lok.h b/engines/kyra/animator_lok.h index ba5882c710..618a210082 100644 --- a/engines/kyra/animator_lok.h +++ b/engines/kyra/animator_lok.h @@ -95,7 +95,6 @@ public: int16 fetchAnimHeight(const uint8 *shape, int16 mult); int _noDrawShapesFlag; - bool _updateScreen; uint16 _brandonDrawFrame; int _brandonScaleX; int _brandonScaleY; diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp index e9c71f511d..3c5fbe4f1c 100644 --- a/engines/kyra/gui_lok.cpp +++ b/engines/kyra/gui_lok.cpp @@ -522,7 +522,6 @@ int GUI_LoK::buttonMenuCallback(Button *caller) { if (_menuRestoreScreen) { restorePalette(); _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _vm->_animator->_updateScreen = true; } else { _screen->deletePageFromDisk(0); } diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index d79d9a8f32..d8e91b138d 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -434,11 +434,8 @@ void KyraEngine_v1::updateInput() { } } - // TODO: Check whether we should really call Screen::updateScreen here. - // We might simply want to call OSystem::updateScreen instead, since Screen::updateScreen - // copies changed screen parts to the screen buffer, which might not be desired. if (updateScreen) - screen()->updateScreen(); + _system->updateScreen(); } void KyraEngine_v1::removeInputTop() { diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index b50bc7a1e6..bf9a9f4246 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -51,6 +51,7 @@ Screen::Screen(KyraEngine_v1 *vm, OSystem *system) memset(_fonts, 0, sizeof(_fonts)); _currentFont = FID_8_FNT; + _paletteChanged = true; } Screen::~Screen() { @@ -206,6 +207,9 @@ void Screen::setResolution() { } void Screen::updateScreen() { + bool needRealUpdate = _forceFullUpdate || _dirtyRects.size() || _paletteChanged; + _paletteChanged = false; + if (_useOverlays) updateDirtyRectsOvl(); else if (_isAmiga && _interfacePaletteEnabled) @@ -214,13 +218,16 @@ void Screen::updateScreen() { updateDirtyRects(); if (_debugEnabled) { + needRealUpdate = true; + if (!_useOverlays) _system->copyRectToScreen(getPagePtr(2), SCREEN_W, 320, 0, SCREEN_W, SCREEN_H); else _system->copyRectToScreen(getPagePtr(2), SCREEN_W, 640, 0, SCREEN_W, SCREEN_H); } - _system->updateScreen(); + if (needRealUpdate) + _system->updateScreen(); } void Screen::updateDirtyRects() { @@ -709,6 +716,7 @@ void Screen::setScreenPalette(const Palette &pal) { screenPal[4 * i + 3] = 0; } + _paletteChanged = true; _system->setPalette(screenPal, 0, pal.getNumColors()); } @@ -744,6 +752,7 @@ void Screen::setInterfacePalette(const Palette &pal, uint8 r, uint8 g, uint8 b) screenPal[4 * i + 3] = 0; } + _paletteChanged = true; _system->setPalette(screenPal, 32, pal.getNumColors()); } diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index 73a29ee2c7..7553a0132b 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -308,7 +308,6 @@ public: virtual bool init(); virtual void setResolution(); - void updateScreen(); // debug functions @@ -508,6 +507,7 @@ protected: }; bool _forceFullUpdate; + bool _paletteChanged; Common::List _dirtyRects; void addDirtyRect(int x, int y, int w, int h); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 5d323b7c17..0a96db8277 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -432,7 +432,6 @@ int KyraEngine_LoK::o1_runWSAFromBeginningToEnd(EMCState *script) { const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(wsaFrame++, 0, xpos, ypos, 0, 0, 0); - _animator->_updateScreen = true; if (wsaFrame >= _movieObjects[wsaIndex]->frames()) running = false; @@ -454,7 +453,6 @@ int KyraEngine_LoK::o1_displayWSAFrame(EMCState *script) { _screen->hideMouse(); const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 0, xpos, ypos, 0, 0, 0); - _animator->_updateScreen = true; delayUntil(continueTime, false, true); _screen->showMouse(); return 0; @@ -487,7 +485,6 @@ int KyraEngine_LoK::o1_runWSAFrames(EMCState *script) { for (; startFrame <= endFrame; ++startFrame) { const uint32 nextRun = _system->getMillis() + delayTime * _tickLength; _movieObjects[wsaIndex]->displayFrame(startFrame, 0, xpos, ypos, 0, 0, 0); - _animator->_updateScreen = true; delayUntil(nextRun, false, true); } _screen->showMouse(); @@ -576,7 +573,6 @@ int KyraEngine_LoK::o1_setCustomPaletteRange(EMCState *script) { int KyraEngine_LoK::o1_loadPageFromDisk(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_loadPageFromDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); _screen->loadPageFromDisk(stackPosString(0), stackPos(1)); - _animator->_updateScreen = true; return 0; } @@ -644,7 +640,6 @@ int KyraEngine_LoK::o1_copyWSARegion(EMCState *script) { int srcPage = stackPos(4); int dstPage = stackPos(5); _screen->copyRegion(xpos, ypos, xpos, ypos, width, height, srcPage, dstPage); - _animator->_updateScreen = true; return 0; } @@ -674,7 +669,6 @@ int KyraEngine_LoK::o1_displayWSAFrameOnHidPage(EMCState *script) { _screen->hideMouse(); const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 2, xpos, ypos, 0, 0, 0); - _animator->_updateScreen = true; delayUntil(continueTime, false, true); _screen->showMouse(); @@ -749,8 +743,6 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { while (endFrame >= frame) { const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 0, xpos, ypos, 0, 0, 0); - if (waitTime) - _animator->_updateScreen = true; delayUntil(continueTime, false, true); ++frame; } @@ -759,8 +751,6 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { while (endFrame <= frame) { const uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame, 0, xpos, ypos, 0, 0, 0); - if (waitTime) - _animator->_updateScreen = true; delayUntil(continueTime, false, true); --frame; } @@ -1278,8 +1268,6 @@ int KyraEngine_LoK::o1_makeAmuletAppear(EMCState *script) { snd_playSoundEffect(0x73); amulet->displayFrame(code, 0, 224, 152, 0, 0, 0); - _animator->_updateScreen = true; - delayUntil(nextTime, false, true); } _screen->showMouse(); diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp index d2ef351767..d13dc2d291 100644 --- a/engines/kyra/sequences_lok.cpp +++ b/engines/kyra/sequences_lok.cpp @@ -1944,7 +1944,6 @@ void KyraEngine_LoK::updateKyragemFading() { } _screen->setScreenPalette(_screen->getPalette(0)); - _animator->_updateScreen = true; switch (_kyragemFadingState.nextOperation) { case 0: diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp index d2128b7037..178966196c 100644 --- a/engines/kyra/text_lok.cpp +++ b/engines/kyra/text_lok.cpp @@ -97,7 +97,6 @@ void KyraEngine_LoK::waitForChatToFinish(int vocFile, int16 chatDuration, const currPage = _screen->_curPage; _screen->_curPage = 2; _text->printCharacterText(chatStr, charNum, _characterList[charNum].x1); - _animator->_updateScreen = true; _screen->_curPage = currPage; } -- cgit v1.2.3 From 88ac4190529f220c2d8ac0879815fba3e0d72d1f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 16:23:26 +0000 Subject: Use Common::List::empty instead of Common::List::size, which is faster for checking whether the list is empty and easier to read. svn-id: r43538 --- engines/kyra/screen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index bf9a9f4246..6542b15183 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -207,7 +207,7 @@ void Screen::setResolution() { } void Screen::updateScreen() { - bool needRealUpdate = _forceFullUpdate || _dirtyRects.size() || _paletteChanged; + bool needRealUpdate = _forceFullUpdate || !_dirtyRects.empty() || _paletteChanged; _paletteChanged = false; if (_useOverlays) @@ -337,6 +337,7 @@ void Screen::updateDirtyRectsOvl() { _system->copyRectToScreen(dst, 640, it->left<<1, it->top<<1, it->width()<<1, it->height()<<1); } } + _forceFullUpdate = false; _dirtyRects.clear(); } -- cgit v1.2.3 From 4673e94c6fb93441ab5ebe9c3cb7d567cc9f7738 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 16:48:55 +0000 Subject: - Fix sluggish mouse movement in Kyra2/Kyra3/LoL main menu. - Fix sluggish mouse movement in the text input dialog of the GUI. svn-id: r43541 --- engines/kyra/gui.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index cc1add9ce7..e49085103a 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -232,10 +232,11 @@ void GUI::processHighlights(Menu &menu) { menu.highlightedItem = i; redrawHighlight(menu); - _screen->updateScreen(); } } } + + _screen->updateScreen(); } void GUI::redrawText(const Menu &menu) { @@ -424,7 +425,8 @@ void GUI::checkTextfieldInput() { Common::Point pos = _vm->getMousePos(); _vm->_mouseX = pos.x; _vm->_mouseY = pos.y; - _screen->updateScreen(); + + _vm->_system->updateScreen(); _lastScreenUpdate = now; } break; @@ -490,14 +492,24 @@ bool MainMenu::getInput() { Common::Event event; Common::EventManager *eventMan = _vm->getEventManager(); + bool updateScreen = false; + while (eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_LBUTTONUP: return true; + + case Common::EVENT_MOUSEMOVE: + updateScreen = true; + break; + default: break; } } + + if (updateScreen) + _system->updateScreen(); return false; } -- cgit v1.2.3 From 8bd4cee2d296f8cf6df3b4a936d3d1d94ec72d46 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Wed, 19 Aug 2009 21:08:17 +0000 Subject: SCI: Add autodetection of Amiga views. svn-id: r43547 --- engines/sci/gfx/gfx_resource.h | 9 ++++++ engines/sci/resource.cpp | 62 +++++++++++++++++++++++++++++++++++++----- engines/sci/resource.h | 11 +++----- 3 files changed, 68 insertions(+), 14 deletions(-) (limited to 'engines') diff --git a/engines/sci/gfx/gfx_resource.h b/engines/sci/gfx/gfx_resource.h index 9c83cf07cd..1e188118ad 100644 --- a/engines/sci/gfx/gfx_resource.h +++ b/engines/sci/gfx/gfx_resource.h @@ -77,6 +77,15 @@ extern gfx_pixmap_color_t gfx_sci0_image_colors[][16]; */ extern Palette* gfx_sci0_pic_colors; + +enum ViewType { + kViewUnknown, + kViewEga, + kViewVga, + kViewVga11, + kViewAmiga +}; + struct gfxr_pic0_params_t { gfx_line_mode_t line_mode; /* one of GFX_LINE_MODE_* */ gfx_brush_mode_t brush_mode; diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 9b9c9ee26c..2479504820 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -510,7 +510,7 @@ void ResourceManager::init() { if (_sciVersion != SCI_VERSION_AUTODETECT) debug("Resmgr: Detected %s", versionNames[_sciVersion]); else - debug("Resmgr: Couldn't determine SCI version"); + warning("Resmgr: Couldn't determine SCI version"); switch (_viewType) { case kViewEga: @@ -521,6 +521,12 @@ void ResourceManager::init() { break; case kViewVga11: debug("Resmgr: Detected SCI1.1 VGA graphic resources"); + break; + case kViewAmiga: + debug("Resmgr: Detected Amiga graphic resources"); + break; + default: + warning("Resmgr: Couldn't determine view type"); } } @@ -1500,22 +1506,64 @@ ResourceCompression ResourceManager::getViewCompression() { return kCompNone; } -ResourceManager::ViewType ResourceManager::detectViewType() { +ViewType ResourceManager::detectViewType() { for (int i = 0; i < 1000; i++) { Resource *res = findResource(ResourceId(kResourceTypeView, i), 0); + if (res) { - //FIXME: Amiga switch(res->data[1]) { - case 0: - return kViewEga; - default: + case 128: + // If the 2nd byte is 128, it's a VGA game return kViewVga; + case 0: + // EGA or Amiga, try to read as Amiga view + + if (res->size < 10) + return kViewUnknown; + + // Read offset of first loop + uint16 offset = READ_LE_UINT16(res->data + 8); + + if (offset + 6U >= res->size) + return kViewUnknown; + + // Read offset of first cel + offset = READ_LE_UINT16(res->data + offset + 4); + + if (offset + 4U >= res->size) + return kViewUnknown; + + // Check palette offset, amiga views have no palette + if (READ_LE_UINT16(res->data + 6) != 0) + return kViewEga; + + uint16 width = READ_LE_UINT16(res->data + offset); + offset += 2; + uint16 height = READ_LE_UINT16(res->data + offset); + offset += 6; + + // Check that the RLE data stays within bounds + int y; + for (y = 0; y < height; y++) { + int x = 0; + + while ((x < width) && (offset < res->size)) { + byte op = res->data[offset++]; + x += (op & 0x07) ? op & 0x07 : op >> 3; + } + + // Make sure we got exactly the right number of pixels for this row + if (x != width) + return kViewEga; + } + + return kViewAmiga; } } } warning("Resmgr: Couldn't find any views"); - return kViewVga; + return kViewUnknown; } SciVersion ResourceManager::detectSciVersion() { diff --git a/engines/sci/resource.h b/engines/sci/resource.h index 4250225ffe..5ba2d03beb 100644 --- a/engines/sci/resource.h +++ b/engines/sci/resource.h @@ -34,6 +34,8 @@ #include "sound/audiostream.h" #include "sound/mixer.h" // for SoundHandle +#include "gfx/gfx_resource.h" // for ViewType + #include "sci/decompressor.h" namespace Common { @@ -230,15 +232,10 @@ public: kResVersionSci32 }; - // TODO: Amiga - enum ViewType { - kViewEga, - kViewVga, - kViewVga11 - }; - bool isVGA() const { return (_viewType == kViewVga) || (_viewType == kViewVga11); } + ViewType getViewType() const { return _viewType; } + /** * Returns the SCI version as detected by the resource manager * @return SCI version -- cgit v1.2.3 From 9dbc76c459f188bb29b6045bf940f5efe9143511 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Wed, 19 Aug 2009 21:09:10 +0000 Subject: SCI: Cleanup. svn-id: r43548 --- engines/sci/gfx/gfx_resmgr.cpp | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'engines') diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index 5619a896cf..14c094a409 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -530,28 +530,25 @@ gfxr_view_t *GfxResManager::getView(int nr, int *loop, int *cel, int palette) { return NULL; int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr); - - if (!_resManager->isVGA()) { + ViewType viewType = _resManager->getViewType(); + + if (viewType == kViewEga) { int pal = (_version <= SCI_VERSION_01) ? -1 : palette; view = getEGAView(resid, viewRes->data, viewRes->size, pal); } else { - if (_version < SCI_VERSION_1_1) - view = getVGAView(resid, viewRes->data, viewRes->size, _staticPalette, false); - else - view = getVGAView(resid, viewRes->data, viewRes->size, 0, true); - - if (!view->palette) { - view->palette = new Palette(_staticPalette->size()); - view->palette->name = "interpreter_get_view"; - } - - // Palettize view - for (unsigned i = 0; i < MIN(view->palette->size(), _staticPalette->size()); i++) { - const PaletteEntry& vc = view->palette->getColor(i); - if (vc.r == 0 && vc.g == 0 && vc.b == 0) { - const PaletteEntry& sc = _staticPalette->getColor(i); - view->palette->setColor(i, sc.r, sc.g, sc.b); + view = getVGAView(resid, viewRes->data, viewRes->size, _staticPalette, viewType == kViewVga11); + + if (view->palette) { + // Palettize view + for (unsigned i = 0; i < MIN(view->palette->size(), _staticPalette->size()); i++) { + const PaletteEntry& vc = view->palette->getColor(i); + if (vc.r == 0 && vc.g == 0 && vc.b == 0) { + const PaletteEntry& sc = _staticPalette->getColor(i); + view->palette->setColor(i, sc.r, sc.g, sc.b); + } } + } else { + view->palette = _staticPalette->getref(); } } -- cgit v1.2.3 From c3462a8c76bdae8f6cd5c994441f658fe413d2d6 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Wed, 19 Aug 2009 21:10:24 +0000 Subject: SCI: Add partial support for Amiga SCI1 games. svn-id: r43549 --- engines/sci/engine/game.cpp | 2 +- engines/sci/gfx/gfx_resmgr.cpp | 6 +++--- engines/sci/gfx/gfx_resource.h | 8 ++++---- engines/sci/gfx/res_pic.cpp | 38 +++++++++++++++++++---------------- engines/sci/gfx/res_view.cpp | 45 +++++++++++++++++++----------------------- 5 files changed, 49 insertions(+), 50 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index c34ac1cf00..f649d97412 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -43,7 +43,7 @@ int _reset_graphics_input(EngineState *s) { gfx_color_t transparent = { PaletteEntry(), 0, -1, -1, 0 }; debug(2, "Initializing graphics"); - if (!s->resmgr->isVGA()) { + if (s->resmgr->getViewType() == kViewEga) { for (int i = 0; i < 16; i++) { if (gfxop_set_color(s->gfx_state, &(s->ega_colors[i]), gfx_sci0_image_colors[sci0_palette][i].r, gfx_sci0_image_colors[sci0_palette][i].g, gfx_sci0_image_colors[sci0_palette][i].b, 0, -1, -1)) { diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index 14c094a409..2fc50dcabc 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -100,7 +100,7 @@ int GfxResManager::calculatePic(gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic if (_version == SCI_VERSION_1_1) gfxr_draw_pic11(unscaled_pic, flags, default_palette, res->size, res->data, &basic_style, res->id.number, _staticPalette, _portBounds); else - gfxr_draw_pic01(unscaled_pic, flags, default_palette, res->size, res->data, &basic_style, res->id.number, _resManager->isVGA(), _staticPalette, _portBounds); + gfxr_draw_pic01(unscaled_pic, flags, default_palette, res->size, res->data, &basic_style, res->id.number, _resManager->getViewType(), _staticPalette, _portBounds); } if (scaled_pic && scaled_pic->undithered_buffer) @@ -109,7 +109,7 @@ int GfxResManager::calculatePic(gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic if (_version == SCI_VERSION_1_1) gfxr_draw_pic11(scaled_pic, flags, default_palette, res->size, res->data, &style, res->id.number, _staticPalette, _portBounds); else - gfxr_draw_pic01(scaled_pic, flags, default_palette, res->size, res->data, &style, res->id.number, _resManager->isVGA(), _staticPalette, _portBounds); + gfxr_draw_pic01(scaled_pic, flags, default_palette, res->size, res->data, &style, res->id.number, _resManager->getViewType(), _staticPalette, _portBounds); if (!_resManager->isVGA()) { if (need_unscaled) @@ -536,7 +536,7 @@ gfxr_view_t *GfxResManager::getView(int nr, int *loop, int *cel, int palette) { int pal = (_version <= SCI_VERSION_01) ? -1 : palette; view = getEGAView(resid, viewRes->data, viewRes->size, pal); } else { - view = getVGAView(resid, viewRes->data, viewRes->size, _staticPalette, viewType == kViewVga11); + view = getVGAView(resid, viewRes->data, viewRes->size, viewType); if (view->palette) { // Palettize view diff --git a/engines/sci/gfx/gfx_resource.h b/engines/sci/gfx/gfx_resource.h index 1e188118ad..35d7ef58d6 100644 --- a/engines/sci/gfx/gfx_resource.h +++ b/engines/sci/gfx/gfx_resource.h @@ -199,13 +199,13 @@ void gfxr_clear_pic0(gfxr_pic_t *pic, int titlebar_size); * @param[in] resource Pointer to the resource data * @param[in] style The drawing style * @param[in] resid The resource ID - * @param[in] sci1 true if SCI1, false otherwise + * @param[in] viewType The view type for embedded views * @param[in] static_pal The static palette * @param[in] portBounds The bounds of the port being drawn to */ void gfxr_draw_pic01(gfxr_pic_t *pic, int fill_normally, int default_palette, int size, byte *resource, - gfxr_pic0_params_t *style, int resid, int sci1, + gfxr_pic0_params_t *style, int resid, ViewType viewType, Palette *static_pal, Common::Rect portBounds); /** @@ -321,9 +321,9 @@ Palette *gfxr_read_pal11(int id, byte *resource, int size); * @param[in] isSci11 true if SCI1.1, false otherwise * @return The resulting view */ -gfxr_view_t *getVGAView(int id, byte *resource, int size, Palette *static_pal, bool isSci11); +gfxr_view_t *getVGAView(int id, byte *resource, int size, ViewType viewType); -gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *resource, byte *cel_base, int size, gfxr_view_t *view, bool isAmiga, bool isSci11); +gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *resource, byte *cel_base, int size, gfxr_view_t *view, ViewType viewType); /** @} */ } // End of namespace Sci diff --git a/engines/sci/gfx/res_pic.cpp b/engines/sci/gfx/res_pic.cpp index e7b34976b0..2534c7faf9 100644 --- a/engines/sci/gfx/res_pic.cpp +++ b/engines/sci/gfx/res_pic.cpp @@ -1135,7 +1135,7 @@ extern gfx_pixmap_t *gfxr_draw_cel0(int id, int loop, int cel, byte *resource, i extern void _gfx_crossblit_simple(byte *dest, byte *src, int dest_line_width, int src_line_width, int xl, int yl, int bpp); void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, byte *resource, - gfxr_pic0_params_t *style, int resid, int sci1, Palette *static_pal, Common::Rect portBounds) { + gfxr_pic0_params_t *style, int resid, ViewType viewType, Palette *static_pal, Common::Rect portBounds) { const int default_palette_table[GFXR_PIC0_PALETTE_SIZE] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0x88, @@ -1189,7 +1189,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, case PIC_OP_SET_COLOR: p0printf("Set color @%d\n", pos); - if (!sci1) { + if (viewType == kViewEga) { pal = *(resource + pos++); index = pal % GFXR_PIC0_PALETTE_SIZE; pal /= GFXR_PIC0_PALETTE_SIZE; @@ -1216,7 +1216,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, case PIC_OP_SET_PRIORITY: p0printf("Set priority @%d\n", pos); - if (!sci1) { + if (viewType == kViewEga) { pal = *(resource + pos++); index = pal % GFXR_PIC0_PALETTE_SIZE; pal /= GFXR_PIC0_PALETTE_SIZE; // Ignore pal @@ -1425,7 +1425,7 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, opx = *(resource + pos++); p0printf("OPX: "); - if (sci1) + if (viewType != kViewEga) opx += SCI1_OP_OFFSET; // See comment at the definition of SCI1_OP_OFFSET. switch (opx) { @@ -1509,11 +1509,13 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, bytesize = (*(resource + pos)) + (*(resource + pos + 1) << 8); p0printf("(%d, %d)\n", posx, posy); pos += 2; - if (!sci1 && !nodraw) - view = gfxr_draw_cel0(-1, -1, -1, resource + pos, bytesize, NULL, flags & DRAWPIC1_FLAG_MIRRORED); - else - view = gfxr_draw_cel1(-1, -1, -1, flags & DRAWPIC1_FLAG_MIRRORED, resource + pos, resource + pos, - bytesize, NULL, (static_pal && static_pal->size() == GFX_SCI1_AMIGA_COLORS_NR), false); + if (!nodraw) { + if (viewType == kViewEga) + view = gfxr_draw_cel0(-1, -1, -1, resource + pos, bytesize, NULL, flags & DRAWPIC1_FLAG_MIRRORED); + else + view = gfxr_draw_cel1(-1, -1, -1, flags & DRAWPIC1_FLAG_MIRRORED, resource + pos, resource + pos, + bytesize, NULL, viewType); + } pos += bytesize; if (nodraw) continue; @@ -1526,20 +1528,22 @@ void gfxr_draw_pic01(gfxr_pic_t *pic, int flags, int default_palette, int size, // we can only safely replace the palette if it's static // *if it's not for some reason, we should die - if (view->palette && view->palette->isShared() && !sci1) { + if (view->palette && view->palette->isShared() && (viewType == kViewEga)) { warning("gfx_draw_pic0(): can't set a non-static palette for an embedded view"); } // For SCI0, use special color mapping to copy the low // nibble of the color index to the high nibble. - if (sci1) { - if (static_pal && static_pal->size() == GFX_SCI1_AMIGA_COLORS_NR) { - // Assume Amiga game + if (viewType != kViewEga) { + if (view->palette) + view->palette->free(); + + if (viewType == kViewAmiga) { pic->visual_map->palette = static_pal->getref(); + } else { + view->palette = pic->visual_map->palette->copy(); } - if (view->palette) view->palette->free(); - view->palette = pic->visual_map->palette->copy(); } else view->palette = embedded_view_pal->getref(); @@ -1648,7 +1652,7 @@ void gfxr_draw_pic11(gfxr_pic_t *pic, int flags, int default_palette, int size, pic->visual_map->palette = gfxr_read_pal11(-1, resource + palette_data_ptr, 1284); if (has_bitmap) - view = gfxr_draw_cel1(-1, 0, 0, flags & DRAWPIC1_FLAG_MIRRORED, resource, resource + bitmap_data_ptr, size - bitmap_data_ptr, NULL, 0, true); + view = gfxr_draw_cel1(-1, 0, 0, flags & DRAWPIC1_FLAG_MIRRORED, resource, resource + bitmap_data_ptr, size - bitmap_data_ptr, NULL, kViewVga11); if (view) { view->palette = pic->visual_map->palette->getref(); @@ -1677,7 +1681,7 @@ void gfxr_draw_pic11(gfxr_pic_t *pic, int flags, int default_palette, int size, warning("[GFX] No view was contained in SCI1.1 pic resource"); } - gfxr_draw_pic01(pic, flags, default_palette, size - vector_data_ptr, resource + vector_data_ptr, style, resid, 1, static_pal, portBounds); + gfxr_draw_pic01(pic, flags, default_palette, size - vector_data_ptr, resource + vector_data_ptr, style, resid, kViewVga11, static_pal, portBounds); } void gfxr_dither_pic0(gfxr_pic_t *pic, int dmode, int pattern) { diff --git a/engines/sci/gfx/res_view.cpp b/engines/sci/gfx/res_view.cpp index d484136f8e..95f6919b0c 100644 --- a/engines/sci/gfx/res_view.cpp +++ b/engines/sci/gfx/res_view.cpp @@ -326,19 +326,19 @@ static int decompress_sci_view_amiga(int id, int loop, int cel, byte *resource, return 0; } -gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *resource, byte *cel_base, int size, gfxr_view_t *view, bool isAmiga, bool isSci11) { +gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *resource, byte *cel_base, int size, gfxr_view_t *view, ViewType viewType) { int xl = READ_LE_UINT16(cel_base); int yl = READ_LE_UINT16(cel_base + 2); int pixmap_size = xl * yl; - int xdisplace = isSci11 ? READ_LE_UINT16(cel_base + 4) : (int8) cel_base[4]; - int ydisplace = isSci11 ? READ_LE_UINT16(cel_base + 6) : cel_base[5]; - int runlength_offset = isSci11 ? READ_LE_UINT16(cel_base + 24) : 8; - int literal_offset = isSci11 ? READ_LE_UINT16(cel_base + 28) : 8; + int xdisplace = (viewType == kViewVga11) ? READ_LE_UINT16(cel_base + 4) : (int8) cel_base[4]; + int ydisplace = (viewType == kViewVga11) ? READ_LE_UINT16(cel_base + 6) : cel_base[5]; + int runlength_offset = (viewType == kViewVga11) ? READ_LE_UINT16(cel_base + 24) : 8; + int literal_offset = (viewType == kViewVga11) ? READ_LE_UINT16(cel_base + 28) : 8; gfx_pixmap_t *retval = gfx_pixmap_alloc_index_data(gfx_new_pixmap(xl, yl, id, loop, cel)); byte *dest = retval->index_data; int decompress_failed; - retval->color_key = cel_base[isSci11 ? 8 : 6]; + retval->color_key = cel_base[(viewType == kViewVga11) ? 8 : 6]; retval->xoffset = mirrored ? xdisplace : -xdisplace; retval->yoffset = -ydisplace; // FIXME: In LSL5, it seems that the inventory has views without palettes (or we don't load palettes properly) @@ -350,12 +350,12 @@ gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *reso return NULL; } - if (!isAmiga) - decompress_failed = decompress_sci_view(id, loop, cel, resource, dest, mirrored, pixmap_size, size, runlength_offset, - literal_offset, xl, yl, retval->color_key); - else + if (viewType == kViewAmiga) decompress_failed = decompress_sci_view_amiga(id, loop, cel, resource, dest, mirrored, pixmap_size, size, runlength_offset, xl, yl, retval->color_key); + else + decompress_failed = decompress_sci_view(id, loop, cel, resource, dest, mirrored, pixmap_size, size, runlength_offset, + literal_offset, xl, yl, retval->color_key); if (decompress_failed) { gfx_free_pixmap(retval); @@ -365,27 +365,22 @@ gfx_pixmap_t *gfxr_draw_cel1(int id, int loop, int cel, int mirrored, byte *reso return retval; } -gfxr_view_t *getVGAView(int id, byte *resource, int size, Palette *static_pal, bool isSci11) { - uint16 palOffset = READ_LE_UINT16(resource + V1_PALETTE_OFFSET + (isSci11 ? 2 : 0)); - uint16 headerSize = isSci11 ? READ_LE_UINT16(resource + V2_HEADER_SIZE) : 0; +gfxr_view_t *getVGAView(int id, byte *resource, int size, ViewType viewType) { + uint16 palOffset = READ_LE_UINT16(resource + V1_PALETTE_OFFSET + ((viewType == kViewVga11) ? 2 : 0)); + uint16 headerSize = (viewType == kViewVga11) ? READ_LE_UINT16(resource + V2_HEADER_SIZE) : 0; byte* seeker = resource + headerSize; uint16 loopOffset = 0; - int amiga_game = 0; gfxr_view_t *view = (gfxr_view_t *)malloc(sizeof(gfxr_view_t)); view->ID = id; view->flags = 0; - view->loops_nr = READ_LE_UINT16(resource + V1_LOOPS_NR_OFFSET + (isSci11 ? 2 : 0)) & 0xFF; + view->loops_nr = READ_LE_UINT16(resource + V1_LOOPS_NR_OFFSET + ((viewType == kViewVga11) ? 2 : 0)) & 0xFF; if (palOffset > 0) { - if (!isSci11) - view->palette = gfxr_read_pal1(id, resource + palOffset, size - palOffset); - else + if (viewType == kViewVga11) view->palette = gfxr_read_pal11(id, resource + palOffset, size - palOffset); - } else if (static_pal && static_pal->size() == GFX_SCI1_AMIGA_COLORS_NR) { - // Assume we're running an amiga game. - amiga_game = 1; - view->palette = static_pal->getref(); + else + view->palette = gfxr_read_pal1(id, resource + palOffset, size - palOffset); } else { view->palette = NULL; } @@ -393,7 +388,7 @@ gfxr_view_t *getVGAView(int id, byte *resource, int size, Palette *static_pal, b view->loops = (gfxr_loop_t *)calloc(view->loops_nr, sizeof(gfxr_loop_t)); for (int i = 0; i < view->loops_nr; i++) { - if (!isSci11) { + if (viewType != kViewVga11) { bool mirrored = READ_LE_UINT16(resource + V1_MIRROR_MASK) & (1 << i); loopOffset = READ_LE_UINT16(resource + V1_FIRST_LOOP_OFFSET + (i << 1)); view->loops[i].cels_nr = READ_LE_UINT16(resource + loopOffset); @@ -405,7 +400,7 @@ gfxr_view_t *getVGAView(int id, byte *resource, int size, Palette *static_pal, b resource + cel_offset, resource + cel_offset, size - cel_offset, - view, amiga_game, false); + view, viewType); } } else { byte copy_entry = seeker[V2_COPY_OF_LOOP]; @@ -417,7 +412,7 @@ gfxr_view_t *getVGAView(int id, byte *resource, int size, Palette *static_pal, b byte* cellSeeker = resource + loopOffset; for (int j = 0; j < view->loops[i].cels_nr; j++) { - view->loops[i].cels[j] = gfxr_draw_cel1(id, i, j, mirrored, resource, cellSeeker, size, view, 0, true); + view->loops[i].cels[j] = gfxr_draw_cel1(id, i, j, mirrored, resource, cellSeeker, size, view, viewType); cellSeeker += resource[V2_BYTES_PER_CEL]; } -- cgit v1.2.3 From a2a6967a638dab875dc1596cfc92ec75f8d73e5e Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Wed, 19 Aug 2009 21:11:15 +0000 Subject: SCI: Don't dither in SCI. svn-id: r43550 --- engines/sci/gfx/gfx_resmgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp index 2fc50dcabc..326cd2dfcf 100644 --- a/engines/sci/gfx/gfx_resmgr.cpp +++ b/engines/sci/gfx/gfx_resmgr.cpp @@ -111,7 +111,7 @@ int GfxResManager::calculatePic(gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic else gfxr_draw_pic01(scaled_pic, flags, default_palette, res->size, res->data, &style, res->id.number, _resManager->getViewType(), _staticPalette, _portBounds); - if (!_resManager->isVGA()) { + if (_version <= SCI_VERSION_1_EGA) { if (need_unscaled) gfxr_remove_artifacts_pic0(scaled_pic, unscaled_pic); -- cgit v1.2.3 From b5ce08b2c680b6b9411a40efbeda95d7f8af6143 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 20 Aug 2009 09:21:09 +0000 Subject: Switch SCUMM engine to use the SaveLoadChooser from gui/ instead of implementing its own, which resulted in code duplication. svn-id: r43552 --- engines/scumm/dialogs.cpp | 237 ++++------------------------------------------ engines/scumm/dialogs.h | 34 +------ 2 files changed, 21 insertions(+), 250 deletions(-) (limited to 'engines') diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 63ac952265..53097b6815 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -213,8 +213,6 @@ ScummDialog::ScummDialog(String name) : GUI::Dialog(name) { #pragma mark - -Common::StringList generateSavegameList(ScummEngine *scumm, bool saveMode); - enum { kSaveCmd = 'SAVE', kLoadCmd = 'LOAD', @@ -226,213 +224,6 @@ enum { kChooseCmd = 'CHOS' }; -SaveLoadChooser::SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode, ScummEngine *engine) - : Dialog("ScummSaveLoad"), _saveMode(saveMode), _list(0), _chooseButton(0), _gfxWidget(0), _vm(engine) { - - _backgroundType = GUI::ThemeEngine::kDialogBackgroundSpecial; - - new StaticTextWidget(this, "ScummSaveLoad.Title", title); - - // Add choice list - _list = new GUI::ListWidget(this, "ScummSaveLoad.List"); - _list->setEditable(saveMode); - _list->setNumberingMode(saveMode ? GUI::kListNumberingOne : GUI::kListNumberingZero); - -// Tanoku: SVNMerge removed this. Unconvinient. /////////////// -// _container = new GUI::ContainerWidget(this, 0, 0, 10, 10); -/////////////////////////////////////////////////////////////// - - _gfxWidget = new GUI::GraphicsWidget(this, 0, 0, 10, 10); - - _date = new StaticTextWidget(this, 0, 0, 10, 10, "No date saved", kTextAlignCenter); - _time = new StaticTextWidget(this, 0, 0, 10, 10, "No time saved", kTextAlignCenter); - _playtime = new StaticTextWidget(this, 0, 0, 10, 10, "No playtime saved", kTextAlignCenter); - - // Buttons - new GUI::ButtonWidget(this, "ScummSaveLoad.Cancel", "Cancel", kCloseCmd, 0); - _chooseButton = new GUI::ButtonWidget(this, "ScummSaveLoad.Choose", buttonLabel, kChooseCmd, 0); - _chooseButton->setEnabled(false); - - _container = new GUI::ContainerWidget(this, 0, 0, 10, 10); -// _container->setHints(GUI::THEME_HINT_USE_SHADOW); -} - -SaveLoadChooser::~SaveLoadChooser() { -} - -const Common::String &SaveLoadChooser::getResultString() const { - return _list->getSelectedString(); -} - -void SaveLoadChooser::setList(const StringList& list) { - _list->setList(list); -} - -int SaveLoadChooser::runModal() { - if (_gfxWidget) - _gfxWidget->setGfx(0); - int ret = Dialog::runModal(); - return ret; -} - -void SaveLoadChooser::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { - int selItem = _list->getSelected(); - switch (cmd) { - case GUI::kListItemActivatedCmd: - case GUI::kListItemDoubleClickedCmd: - if (selItem >= 0) { - if (_saveMode || !getResultString().empty()) { - _list->endEditMode(); - setResult(selItem); - close(); - } - } - break; - case kChooseCmd: - _list->endEditMode(); - setResult(selItem); - close(); - break; - case GUI::kListSelectionChangedCmd: { - if (_gfxWidget) { - updateInfos(true); - } - - if (_saveMode) { - _list->startEditMode(); - } - // Disable button if nothing is selected, or (in load mode) if an empty - // list item is selected. We allow choosing an empty item in save mode - // because we then just assign a default name. - _chooseButton->setEnabled(selItem >= 0 && (_saveMode || !getResultString().empty())); - _chooseButton->draw(); - } break; - case kCloseCmd: - setResult(-1); - default: - Dialog::handleCommand(sender, cmd, data); - } -} - -void SaveLoadChooser::reflowLayout() { - if (g_gui.xmlEval()->getVar("Globals.ScummSaveLoad.ExtInfo.Visible") == 1) { - int16 x, y; - uint16 w, h; - - if (!g_gui.xmlEval()->getWidgetData("ScummSaveLoad.Thumbnail", x, y, w, h)) - error("Error when loading position data for Save/Load Thumbnails."); - - int thumbW = kThumbnailWidth; - int thumbH = ((g_system->getHeight() % 200 && g_system->getHeight() != 350) ? kThumbnailHeight2 : kThumbnailHeight1); - int thumbX = x + (w >> 1) - (thumbW >> 1); - int thumbY = y + kLineHeight; - - _container->resize(x, y, w, h); - _gfxWidget->resize(thumbX, thumbY, thumbW, thumbH); - - int height = thumbY + thumbH + kLineHeight; - - _date->resize(thumbX, height, kThumbnailWidth, kLineHeight); - - height += kLineHeight; - - _time->resize(thumbX, height, kThumbnailWidth, kLineHeight); - - height += kLineHeight; - - _playtime->resize(thumbX, height, kThumbnailWidth, kLineHeight); - - _container->setVisible(true); - _gfxWidget->setVisible(true); - _date->setVisible(true); - _time->setVisible(true); - _playtime->setVisible(true); - - _fillR = 0; //g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillR"); - _fillG = 0; //g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillG"); - _fillB = 0; //g_gui.evaluator()->getVar("scummsaveload_thumbnail.fillB"); - } else { - _container->setVisible(false); - _gfxWidget->setVisible(false); - _date->setVisible(false); - _time->setVisible(false); - _playtime->setVisible(false); - } - - Dialog::reflowLayout(); - - if (_container->isVisible()) - updateInfos(false); -} - -void SaveLoadChooser::updateInfos(bool redraw) { - int selItem = _list->getSelected(); - Graphics::Surface *thumb = 0; - if (selItem >= 0 && !_list->getSelectedString().empty()) - thumb = _vm->loadThumbnailFromSlot(_saveMode ? selItem + 1 : selItem); - - if (thumb) { - _gfxWidget->setGfx(thumb); - _gfxWidget->useAlpha(256); - thumb->free(); - delete thumb; - } else { - _gfxWidget->setGfx(-1, -1, _fillR, _fillG, _fillB); - } - - InfoStuff infos; - memset(&infos, 0, sizeof(InfoStuff)); - if (selItem >= 0 && !_list->getSelectedString().empty() - && _vm->loadInfosFromSlot(_saveMode ? selItem + 1 : selItem, &infos)) { - char buffer[32]; - snprintf(buffer, 32, "Date: %.2d.%.2d.%.4d", - (infos.date >> 24) & 0xFF, (infos.date >> 16) & 0xFF, - infos.date & 0xFFFF); - _date->setLabel(buffer); - - snprintf(buffer, 32, "Time: %.2d:%.2d", - (infos.time >> 8) & 0xFF, infos.time & 0xFF); - _time->setLabel(buffer); - - int minutes = infos.playtime / 60; - int hours = minutes / 60; - minutes %= 60; - - snprintf(buffer, 32, "Playtime: %.2d:%.2d", hours, minutes); - _playtime->setLabel(buffer); - } else { - _date->setLabel("No date saved"); - _time->setLabel("No time saved"); - _playtime->setLabel("No playtime saved"); - } - - if (redraw) { - _gfxWidget->draw(); - _date->draw(); - _time->draw(); - _playtime->draw(); - } -} - -#pragma mark - - -Common::StringList generateSavegameList(ScummEngine *scumm, bool saveMode) { - // Get savegame descriptions - Common::StringList descriptions; - uint i = saveMode ? 1 : 0; //the autosave is on slot #0 - bool avail_saves[81]; - - scumm->listSavegames(avail_saves, ARRAYSIZE(avail_saves)); - for (; i < ARRAYSIZE(avail_saves); i++) { - Common::String name; - if (avail_saves[i]) - scumm->getSavegameName(i, name); - descriptions.push_back(name); - } - - return descriptions; -} - ScummMenuDialog::ScummMenuDialog(ScummEngine *scumm) : ScummDialog("ScummMain"), _vm(scumm) { @@ -457,8 +248,10 @@ ScummMenuDialog::ScummMenuDialog(ScummEngine *scumm) #ifndef DISABLE_HELP _helpDialog = new HelpDialog(scumm->_game); #endif - _saveDialog = new SaveLoadChooser("Save game:", "Save", true, scumm); - _loadDialog = new SaveLoadChooser("Load game:", "Load", false, scumm); + _saveDialog = new GUI::SaveLoadChooser("Save game:", "Save"); + _saveDialog->setSaveMode(true); + _loadDialog = new GUI::SaveLoadChooser("Load game:", "Load"); + _loadDialog->setSaveMode(false); } ScummMenuDialog::~ScummMenuDialog() { @@ -513,28 +306,34 @@ void ScummMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 da } void ScummMenuDialog::save() { - int idx; - _saveDialog->setList(generateSavegameList(_vm, true)); - idx = _saveDialog->runModal(); + Common::String gameId = ConfMan.get("gameid"); + + const EnginePlugin *plugin = 0; + EngineMan.findGame(gameId, &plugin); + + int idx = _saveDialog->runModal(plugin, ConfMan.getActiveDomainName()); if (idx >= 0) { String result(_saveDialog->getResultString()); char buffer[20]; const char *str; if (result.empty()) { // If the user was lazy and entered no save name, come up with a default name. - sprintf(buffer, "Save %d", idx + 1); + sprintf(buffer, "Save %d", idx); str = buffer; } else str = result.c_str(); - _vm->requestSave(idx + 1, str); + _vm->requestSave(idx, str); close(); } } void ScummMenuDialog::load() { - int idx; - _loadDialog->setList(generateSavegameList(_vm, false)); - idx = _loadDialog->runModal(); + Common::String gameId = ConfMan.get("gameid"); + + const EnginePlugin *plugin = 0; + EngineMan.findGame(gameId, &plugin); + + int idx = _loadDialog->runModal(plugin, ConfMan.getActiveDomainName()); if (idx >= 0) { _vm->requestLoad(idx); close(); diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h index 85b562ed67..644c028c5e 100644 --- a/engines/scumm/dialogs.h +++ b/engines/scumm/dialogs.h @@ -29,6 +29,7 @@ #include "gui/dialog.h" #include "gui/options.h" #include "gui/widget.h" +#include "gui/saveload.h" #include "scumm/detection.h" #ifndef DISABLE_HELP @@ -53,35 +54,6 @@ protected: typedef Common::String String; }; -class SaveLoadChooser : public GUI::Dialog { - typedef Common::String String; - typedef Common::StringList StringList; -protected: - bool _saveMode; - GUI::ListWidget *_list; - GUI::ButtonWidget *_chooseButton; - GUI::GraphicsWidget *_gfxWidget; - GUI::StaticTextWidget *_date; - GUI::StaticTextWidget *_time; - GUI::StaticTextWidget *_playtime; - GUI::ContainerWidget *_container; - ScummEngine *_vm; - - uint8 _fillR, _fillG, _fillB; - - void updateInfos(bool redraw); -public: - SaveLoadChooser(const String &title, const String &buttonLabel, bool saveMode, ScummEngine *engine); - ~SaveLoadChooser(); - - virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); - const String &getResultString() const; - void setList(const StringList& list); - int runModal(); - - virtual void reflowLayout(); -}; - class ScummMenuDialog : public ScummDialog { public: ScummMenuDialog(ScummEngine *scumm); @@ -99,8 +71,8 @@ protected: #ifndef DISABLE_HELP GUI::Dialog *_helpDialog; #endif - SaveLoadChooser *_saveDialog; - SaveLoadChooser *_loadDialog; + GUI::SaveLoadChooser *_saveDialog; + GUI::SaveLoadChooser *_loadDialog; GUI::ButtonWidget *_saveButton; -- cgit v1.2.3 From 8b0a10ad75e585ca7b5cae79467c6faf0bcc1917 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 20 Aug 2009 09:24:22 +0000 Subject: Cleanup. svn-id: r43554 --- engines/scumm/scumm.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index bfb188f1c7..f2eb331a14 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -667,9 +667,6 @@ public: } static Graphics::Surface *loadThumbnailFromSlot(const char *target, int slot); - bool loadInfosFromSlot(int slot, InfoStuff *stuff) { - return loadInfosFromSlot(_targetName.c_str(), slot, stuff); - } static bool loadInfosFromSlot(const char *target, int slot, InfoStuff *stuff); protected: -- cgit v1.2.3 From 644ba1ceab478d27df933e65a38fab82fed7abbb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 20 Aug 2009 12:04:31 +0000 Subject: Bugfix for assert in the DW2 Cartwheel scene svn-id: r43558 --- engines/tinsel/polygons.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/tinsel/polygons.cpp b/engines/tinsel/polygons.cpp index bb2daea206..825abc9a6b 100644 --- a/engines/tinsel/polygons.cpp +++ b/engines/tinsel/polygons.cpp @@ -1996,8 +1996,14 @@ void GetPolyNode(HPOLYGON hp, int *pNodeX, int *pNodeY) { Poly pp(LockMem(pHandle), Polys[hp]->pIndex); - *pNodeX = FROM_LE_32(pp.nodex); - *pNodeY = FROM_LE_32(pp.nodey); + // WORKAROUND: Invalid node adjustment for DW2 Cartwheel scene refer polygon + if (TinselV2 && (pHandle == 0x74191900) && (hp == 8)) { + *pNodeX = 480; + *pNodeY = 408; + } else { + *pNodeX = FROM_LE_32(pp.nodex); + *pNodeY = FROM_LE_32(pp.nodey); + } if (TinselV2) { *pNodeX += volatileStuff[hp].xoff; -- cgit v1.2.3 From 50d515c3dfc7bd9615737795357022e5509dd890 Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Thu, 20 Aug 2009 12:30:37 +0000 Subject: modify props size to avoid later error (Size is still temporary) and prepare the magic number => constant modification svn-id: r43560 --- engines/gob/save/saveload_playtoons.cpp | 42 ++++++++++----------------------- 1 file changed, 12 insertions(+), 30 deletions(-) (limited to 'engines') diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp index 392c9a94ac..6b1f291c78 100644 --- a/engines/gob/save/saveload_playtoons.cpp +++ b/engines/gob/save/saveload_playtoons.cpp @@ -31,26 +31,8 @@ namespace Gob { SaveLoad_Playtoons::SaveFile SaveLoad_Playtoons::_saveFiles[] = { { "did.inf", kSaveModeSave, 0, 0}, // - { "dan.itk", kSaveModeNone, 0, 0}, // Playtoons CK initial detection file - { "disk.001", kSaveModeExists, 0, 0}, // Playtoons 1 identification file - { "disk.002", kSaveModeExists, 0, 0}, // Playtoons 2 identification file - { "disk.003", kSaveModeExists, 0, 0}, // Playtoons 3 identification file - { "disk.004", kSaveModeExists, 0, 0}, // Playtoons 4 identification file - { "disk.005", kSaveModeExists, 0, 0}, // Playtoons 5 identification file - { "disk.006", kSaveModeExists, 0, 0}, // Playtoons CK 1 identification file - { "disk.007", kSaveModeExists, 0, 0}, // Playtoons CK 2 identification file - { "disk.008", kSaveModeExists, 0, 0}, // Playtoons CK 3 identification file -/* - { "titre.001", kSaveModeExists, 0, 0}, // Playtoons 1 titles - { "titre.002", kSaveModeExists, 0, 0}, // Playtoons 2 titles - { "titre.003", kSaveModeExists, 0, 0}, // Playtoons 3 titles - { "titre.004", kSaveModeExists, 0, 0}, // Playtoons 4 titles - { "titre.005", kSaveModeExists, 0, 0}, // Playtoons 5 titles - { "titre.006", kSaveModeExists, 0, 0}, // Playtoons CK 1 empty title (???) - { "titre.007", kSaveModeExists, 0, 0}, // Playtoons CK 2 empty title (???) - { "titre.008", kSaveModeExists, 0, 0}, // Playtoons CK 3 empty title (???) - { "mdo.def", kSaveModeExists, 0, 0}, // -*/ + { "dan.itk", kSaveModeNone, 0, 0}, // Playtoons CK detection file + }; SaveLoad_Playtoons::GameHandler::File::File(GobEngine *vm, const char *base) : @@ -66,7 +48,7 @@ int SaveLoad_Playtoons::GameHandler::File::getSlot(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 2900) / varSize); + return ((offset - (1642 + 2400)) / varSize); } int SaveLoad_Playtoons::GameHandler::File::getSlotRemainder(int32 offset) const { @@ -75,12 +57,12 @@ int SaveLoad_Playtoons::GameHandler::File::getSlotRemainder(int32 offset) const if (varSize == 0) return -1; - return ((offset - 2900) % varSize); + return ((offset - (1642 + 2400)) % varSize); } SaveLoad_Playtoons::GameHandler::GameHandler(GobEngine *vm, const char *target) : SaveHandler(vm) { - memset(_props, 0, 500); + memset(_props, 0, 1642); memset(_index, 0, 2400); _slotFile = new File(vm, target); @@ -96,7 +78,7 @@ int32 SaveLoad_Playtoons::GameHandler::getSize() { if (varSize == 0) return -1; - return _slotFile->tallyUpFiles(varSize, 2900); + return _slotFile->tallyUpFiles(varSize, 1642 + 2400); } bool SaveLoad_Playtoons::GameHandler::load(int16 dataVar, int32 size, int32 offset) { @@ -111,17 +93,17 @@ bool SaveLoad_Playtoons::GameHandler::load(int16 dataVar, int32 size, int32 offs size = varSize; } - if (offset < 500) { + if (offset < 1642) { // Properties - if ((offset + size) > 500) { + if ((offset + size) > 1642) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset < 2900) { + } else if (offset < 1642 + 2400) { // Save index if (size != 2400) { @@ -198,17 +180,17 @@ bool SaveLoad_Playtoons::GameHandler::save(int16 dataVar, int32 size, int32 offs size = varSize; } - if (offset < 500) { + if (offset < 1642) { // Properties - if ((offset + size) > 500) { + if ((offset + size) > 1642) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyTo(dataVar, _props + offset, size); - } else if (offset < 2900) { + } else if (offset < 1642 + 2400) { // Save index if (size != 2400) { -- cgit v1.2.3 From afabd2706b98253732f21227a99fdf42576ec289 Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Thu, 20 Aug 2009 12:32:59 +0000 Subject: Add oPlaytoons_F_1B skeletton, and oPlaytoons_readData to avoid adding a playtoons workaround in inter_v2. svn-id: r43561 --- engines/gob/inter.h | 2 + engines/gob/inter_playtoons.cpp | 118 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 117 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/gob/inter.h b/engines/gob/inter.h index 057f52b360..43a4941402 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -557,7 +557,9 @@ protected: virtual void setupOpcodesFunc(); virtual void setupOpcodesGob(); + bool oPlaytoons_F_1B(OpFuncParams ¶ms); bool oPlaytoons_checkData(OpFuncParams ¶ms); + bool oPlaytoons_readData(OpFuncParams ¶ms); void oPlaytoons_CD_20_23(); void oPlaytoons_CD_25(); void oPlaytoons_openItk(); diff --git a/engines/gob/inter_playtoons.cpp b/engines/gob/inter_playtoons.cpp index e224f29734..d7cb6b79c2 100644 --- a/engines/gob/inter_playtoons.cpp +++ b/engines/gob/inter_playtoons.cpp @@ -25,6 +25,8 @@ #include "common/endian.h" +#include "gui/message.h" + #include "gob/gob.h" #include "gob/inter.h" #include "gob/helper.h" @@ -77,12 +79,33 @@ void Inter_Playtoons::setupOpcodesDraw() { void Inter_Playtoons::setupOpcodesFunc() { Inter_v6::setupOpcodesFunc(); + OPCODEFUNC(0x1B, oPlaytoons_F_1B); OPCODEFUNC(0x3F, oPlaytoons_checkData); + OPCODEFUNC(0x4D, oPlaytoons_readData); } void Inter_Playtoons::setupOpcodesGob() { } +bool Inter_Playtoons::oPlaytoons_F_1B(OpFuncParams ¶ms) { + int16 var1; + int16 var2; + int16 var3; + int16 var4; + + var1 = _vm->_game->_script->readValExpr(); + var2 = _vm->_game->_script->readValExpr(); + + _vm->_game->_script->evalExpr(0); + + var3 = _vm->_game->_script->readValExpr(); + var4 = _vm->_game->_script->readValExpr(); + + warning("oPlaytoons_F_1B not handled"); + + return false; +} + bool Inter_Playtoons::oPlaytoons_checkData(OpFuncParams ¶ms) { int16 handle; int16 varOff; @@ -101,18 +124,16 @@ bool Inter_Playtoons::oPlaytoons_checkData(OpFuncParams ¶ms) { // In this case, "@:\" is replaced by the CD drive letter. // As the files are copied on the HDD, those characters are skipped. if (strncmp(file, "@:\\", 3) == 0) { - debugC(2, kDebugFileIO, "File check: \"%s\" instead of \"%s\"", file + 3, file); + debugC(2, kDebugFileIO, "oPlaytoons_checkData: \"%s\" instead of \"%s\"", file + 3, file); file += 3; } mode = _vm->_saveLoad->getSaveMode(file); if (mode == SaveLoad::kSaveModeNone) { - if (_vm->_dataIO->existData(file)) size = _vm->_dataIO->getDataSize(file); else warning("File \"%s\" not found", file); - } else if (mode == SaveLoad::kSaveModeSave) size = _vm->_saveLoad->getSize(file); else if (mode == SaveLoad::kSaveModeExists) @@ -130,6 +151,97 @@ bool Inter_Playtoons::oPlaytoons_checkData(OpFuncParams ¶ms) { return false; } +bool Inter_Playtoons::oPlaytoons_readData(OpFuncParams ¶ms) { + int32 retSize; + int32 size; + int32 offset; + int16 dataVar; + int16 handle; + byte *buf; + SaveLoad::SaveMode mode; + + _vm->_game->_script->evalExpr(0); + dataVar = _vm->_game->_script->readVarIndex(); + size = _vm->_game->_script->readValExpr(); + _vm->_game->_script->evalExpr(0); + offset = _vm->_game->_script->getResultInt(); + retSize = 0; + + char *file = _vm->_game->_script->getResultStr(); + + // WORKAROUND: In Playtoons games, some files are read on CD (and only on CD). + // In this case, "@:\" is replaced by the CD drive letter. + // As the files are copied on the HDD, those characters are skipped. + if (strncmp(file, "@:\\", 3) == 0) { + debugC(2, kDebugFileIO, "oPlaytoons_readData: \"%s\" instead of \"%s\"", file + 3, file); + file += 3; + } + + debugC(2, kDebugFileIO, "Read from file \"%s\" (%d, %d bytes at %d)", + file, dataVar, size, offset); + + mode = _vm->_saveLoad->getSaveMode(file); + if (mode == SaveLoad::kSaveModeSave) { + + WRITE_VAR(1, 1); + + if (!_vm->_saveLoad->load(file, dataVar, size, offset)) { + GUI::MessageDialog dialog("Failed to load game state from file."); + dialog.runModal(); + } else + WRITE_VAR(1, 0); + + return false; + + } else if (mode == SaveLoad::kSaveModeIgnore) + return false; + + if (size < 0) { + warning("Attempted to read a raw sprite from file \"%s\"", + file); + return false ; + } else if (size == 0) { + dataVar = 0; + size = _vm->_game->_script->getVariablesCount() * 4; + } + + buf = _variables->getAddressOff8(dataVar); + + if (file[0] == 0) { + WRITE_VAR(1, size); + return false; + } + + WRITE_VAR(1, 1); + handle = _vm->_dataIO->openData(file); + + if (handle < 0) + return false; + + DataStream *stream = _vm->_dataIO->openAsStream(handle, true); + + _vm->_draw->animateCursor(4); + if (offset < 0) + stream->seek(offset + 1, SEEK_END); + else + stream->seek(offset); + + if (((dataVar >> 2) == 59) && (size == 4)) { + WRITE_VAR(59, stream->readUint32LE()); + // The scripts in some versions divide through 256^3 then, + // effectively doing a LE->BE conversion + if ((_vm->getPlatform() != Common::kPlatformPC) && (VAR(59) < 256)) + WRITE_VAR(59, SWAP_BYTES_32(VAR(59))); + } else + retSize = stream->read(buf, size); + + if (retSize == size) + WRITE_VAR(1, 0); + + delete stream; + return false; +} + void Inter_Playtoons::oPlaytoons_CD_20_23() { _vm->_game->_script->evalExpr(0); } -- cgit v1.2.3 From e350e0b0204860db31f5c5586f443eff3e52b160 Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Thu, 20 Aug 2009 13:36:18 +0000 Subject: Replace magic numbers by constants : kPropsSize and kIndexSize svn-id: r43562 --- engines/gob/save/saveload.h | 42 ++++++++++++++++++++++----------- engines/gob/save/saveload_playtoons.cpp | 28 +++++++++++----------- engines/gob/save/saveload_v2.cpp | 14 +++++------ engines/gob/save/saveload_v3.cpp | 28 +++++++++++----------- engines/gob/save/saveload_v4.cpp | 28 +++++++++++----------- engines/gob/save/saveload_v6.cpp | 28 +++++++++++----------- 6 files changed, 91 insertions(+), 77 deletions(-) (limited to 'engines') diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h index 4779de703c..8a7d493aed 100644 --- a/engines/gob/save/saveload.h +++ b/engines/gob/save/saveload.h @@ -77,6 +77,9 @@ public: static const uint32 kSlotCount = 15; static const uint32 kSlotNameLength = 40; + /** The index. kSlotCount * kSlotNameLength bytes. */ + static const uint32 kIndexSize = kSlotCount * kSlotNameLength; + SaveLoad_v2(GobEngine *vm, const char *targetName); virtual ~SaveLoad_v2(); @@ -111,8 +114,7 @@ protected: int getSlotRemainder(int32 offset) const; }; - /** The index. kSlotCount * kSlotNameLength bytes. */ - byte _index[600]; + byte _index[kIndexSize]; bool _hasIndex; File *_slotFile; @@ -139,6 +141,10 @@ public: static const uint32 kSlotCount = 30; static const uint32 kSlotNameLength = 40; + static const uint32 kPropsSize = 500; + /** Index. kSlotCount * kSlotNameLength bytes. */ + static const uint32 kIndexSize = kSlotCount * kSlotNameLength; + enum ScreenshotType { kScreenshotTypeGob3, //!< Goblins 3 type screenshot kScreenshotTypeLost //!< Lost in Time type screenshot @@ -193,9 +199,8 @@ protected: bool _firstSize; /** Global properties. */ - byte _props[500]; - /** Index. kSlotCount * kSlotNameLength bytes. */ - byte _index[1200]; + byte _props[kPropsSize]; + byte _index[kIndexSize]; bool _hasIndex; SaveReader *_reader; @@ -266,6 +271,10 @@ public: static const uint32 kSlotCount = 10; static const uint32 kSlotNameLength = 40; + static const uint32 kPropsSize = 500; + /** Index. kSlotCount * kSlotNameLength bytes + 800 bytes 0. */ + static const uint32 kIndexSize = (kSlotCount * kSlotNameLength) + 800; + SaveLoad_v4(GobEngine *vm, const char *targetName); virtual ~SaveLoad_v4(); @@ -311,9 +320,8 @@ protected: private: bool _firstSize; - byte _props[500]; - /** The index. kSlotCount * kSlotNameLength bytes + 800 bytes 0. */ - byte _index[1200]; + byte _props[kPropsSize]; + byte _index[kIndexSize]; bool _hasIndex; File *_slotFile; @@ -392,6 +400,10 @@ public: static const uint32 kSlotCount = 60; static const uint32 kSlotNameLength = 40; + static const uint32 kPropsSize = 500; + /** Index. kSlotCount * kSlotNameLength bytes. */ + static const uint32 kIndexSize = kSlotCount * kSlotNameLength; + SaveLoad_v6(GobEngine *vm, const char *targetName); virtual ~SaveLoad_v6(); @@ -426,9 +438,8 @@ protected: int getSlotRemainder(int32 offset) const; }; - byte _props[500]; - /** The index. 500 bytes properties + kSlotCount * kSlotNameLength bytes. */ - byte _index[2400]; + byte _props[kPropsSize]; + byte _index[kIndexSize]; File *_slotFile; @@ -454,6 +465,10 @@ public: static const uint32 kSlotCount = 60; static const uint32 kSlotNameLength = 40; + static const uint32 kPropsSize = 1642; + /** Index. kSlotCount * kSlotNameLength bytes. */ + static const uint32 kIndexSize = kSlotCount * kSlotNameLength; + SaveLoad_Playtoons(GobEngine *vm, const char *targetName); virtual ~SaveLoad_Playtoons(); @@ -488,9 +503,8 @@ protected: int getSlotRemainder(int32 offset) const; }; - byte _props[500]; - /** The index. 500 bytes properties + kSlotCount * kSlotNameLength bytes. */ - byte _index[2400]; + byte _props[kPropsSize]; + byte _index[kIndexSize]; File *_slotFile; diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp index 6b1f291c78..f1140887de 100644 --- a/engines/gob/save/saveload_playtoons.cpp +++ b/engines/gob/save/saveload_playtoons.cpp @@ -48,7 +48,7 @@ int SaveLoad_Playtoons::GameHandler::File::getSlot(int32 offset) const { if (varSize == 0) return -1; - return ((offset - (1642 + 2400)) / varSize); + return ((offset - (kPropsSize + kIndexSize)) / varSize); } int SaveLoad_Playtoons::GameHandler::File::getSlotRemainder(int32 offset) const { @@ -57,13 +57,13 @@ int SaveLoad_Playtoons::GameHandler::File::getSlotRemainder(int32 offset) const if (varSize == 0) return -1; - return ((offset - (1642 + 2400)) % varSize); + return ((offset - (kPropsSize + kIndexSize)) % varSize); } SaveLoad_Playtoons::GameHandler::GameHandler(GobEngine *vm, const char *target) : SaveHandler(vm) { - memset(_props, 0, 1642); - memset(_index, 0, 2400); + memset(_props, 0, kPropsSize); + memset(_index, 0, kIndexSize); _slotFile = new File(vm, target); } @@ -78,7 +78,7 @@ int32 SaveLoad_Playtoons::GameHandler::getSize() { if (varSize == 0) return -1; - return _slotFile->tallyUpFiles(varSize, 1642 + 2400); + return _slotFile->tallyUpFiles(varSize, kPropsSize + kIndexSize); } bool SaveLoad_Playtoons::GameHandler::load(int16 dataVar, int32 size, int32 offset) { @@ -93,20 +93,20 @@ bool SaveLoad_Playtoons::GameHandler::load(int16 dataVar, int32 size, int32 offs size = varSize; } - if (offset < 1642) { + if (offset < kPropsSize) { // Properties - if ((offset + size) > 1642) { + if ((offset + size) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset < 1642 + 2400) { + } else if (offset < kPropsSize + kIndexSize) { // Save index - if (size != 2400) { + if (size != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } @@ -180,26 +180,26 @@ bool SaveLoad_Playtoons::GameHandler::save(int16 dataVar, int32 size, int32 offs size = varSize; } - if (offset < 1642) { + if (offset < kPropsSize) { // Properties - if ((offset + size) > 1642) { + if ((offset + size) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyTo(dataVar, _props + offset, size); - } else if (offset < 1642 + 2400) { + } else if (offset < kPropsSize + kIndexSize) { // Save index - if (size != 2400) { + if (size != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } // Just copy the index into our buffer - _vm->_inter->_variables->copyTo(dataVar, _index, 2400); + _vm->_inter->_variables->copyTo(dataVar, _index, kIndexSize); } else { // Save slot, whole variable block diff --git a/engines/gob/save/saveload_v2.cpp b/engines/gob/save/saveload_v2.cpp index da1135df21..8449345336 100644 --- a/engines/gob/save/saveload_v2.cpp +++ b/engines/gob/save/saveload_v2.cpp @@ -51,7 +51,7 @@ int SaveLoad_v2::GameHandler::File::getSlot(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 600) / varSize); + return ((offset - kIndexSize) / varSize); } int SaveLoad_v2::GameHandler::File::getSlotRemainder(int32 offset) const { @@ -60,12 +60,12 @@ int SaveLoad_v2::GameHandler::File::getSlotRemainder(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 600) % varSize); + return ((offset - kIndexSize) % varSize); } SaveLoad_v2::GameHandler::GameHandler(GobEngine *vm, const char *target) : SaveHandler(vm) { - memset(_index, 0, 600); + memset(_index, 0, kIndexSize); _hasIndex = false; _slotFile = new File(vm, target); @@ -81,7 +81,7 @@ int32 SaveLoad_v2::GameHandler::getSize() { if (varSize == 0) return -1; - return _slotFile->tallyUpFiles(varSize, 600); + return _slotFile->tallyUpFiles(varSize, kIndexSize); } bool SaveLoad_v2::GameHandler::load(int16 dataVar, int32 size, int32 offset) { @@ -99,7 +99,7 @@ bool SaveLoad_v2::GameHandler::load(int16 dataVar, int32 size, int32 offset) { if (offset == 0) { // Save index - if (size != 600) { + if (size != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } @@ -184,13 +184,13 @@ bool SaveLoad_v2::GameHandler::save(int16 dataVar, int32 size, int32 offset) { if (offset == 0) { // Save index - if (size != 600) { + if (size != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } // Just copy the index into our buffer - _vm->_inter->_variables->copyTo(dataVar, _index, 600); + _vm->_inter->_variables->copyTo(dataVar, _index, kIndexSize); _hasIndex = true; } else { diff --git a/engines/gob/save/saveload_v3.cpp b/engines/gob/save/saveload_v3.cpp index c24b13d27b..510ca622b8 100644 --- a/engines/gob/save/saveload_v3.cpp +++ b/engines/gob/save/saveload_v3.cpp @@ -57,7 +57,7 @@ int SaveLoad_v3::GameHandler::File::getSlot(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 1700) / varSize); + return ((offset - (kPropsSize + kIndexSize)) / varSize); } int SaveLoad_v3::GameHandler::File::getSlotRemainder(int32 offset) const { @@ -66,7 +66,7 @@ int SaveLoad_v3::GameHandler::File::getSlotRemainder(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 1700) % varSize); + return ((offset - (kPropsSize + kIndexSize)) % varSize); } @@ -78,8 +78,8 @@ SaveLoad_v3::GameHandler::GameHandler(GobEngine *vm, const char *target, _usesScreenshots = usesScreenshots; _firstSize = true; - memset(_props, 0, 500); - memset(_index, 0, 1200); + memset(_props, 0, kPropsSize); + memset(_index, 0, kIndexSize); _hasIndex = false; _writer = 0; @@ -104,7 +104,7 @@ int32 SaveLoad_v3::GameHandler::getSize() { if (varSize == 0) return -1; - return _slotFile->tallyUpFiles(varSize, 1700); + return _slotFile->tallyUpFiles(varSize, kPropsSize + kIndexSize); } bool SaveLoad_v3::GameHandler::load(int16 dataVar, int32 size, int32 offset) { @@ -119,22 +119,22 @@ bool SaveLoad_v3::GameHandler::load(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < 500) { + if (offset < kPropsSize) { // Global properties, like joker usage debugC(3, kDebugSaveLoad, "Loading global properties"); - if ((size + offset) > 500) { + if ((size + offset) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset == 500) { + } else if (offset == kPropsSize) { // Save index - if (size != 1200) { + if (size != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } @@ -193,28 +193,28 @@ bool SaveLoad_v3::GameHandler::save(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < 500) { + if (offset < kPropsSize) { // Global properties, like joker usage debugC(3, kDebugSaveLoad, "Saving global properties"); - if ((size + offset) > 500) { + if ((size + offset) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyTo(dataVar, _props + offset, size); - } else if (offset == 500) { + } else if (offset == kPropsSize) { // Save index - if (size != 1200) { + if (size != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } // Just copy the index into our buffer - _vm->_inter->_variables->copyTo(dataVar, _index, 1200); + _vm->_inter->_variables->copyTo(dataVar, _index, kIndexSize); _hasIndex = true; } else { diff --git a/engines/gob/save/saveload_v4.cpp b/engines/gob/save/saveload_v4.cpp index 16c87b9a64..66270161d3 100644 --- a/engines/gob/save/saveload_v4.cpp +++ b/engines/gob/save/saveload_v4.cpp @@ -63,7 +63,7 @@ int SaveLoad_v4::GameHandler::File::getSlot(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 1700) / varSize); + return ((offset - (kPropsSize + kIndexSize)) / varSize); } int SaveLoad_v4::GameHandler::File::getSlotRemainder(int32 offset) const { @@ -72,14 +72,14 @@ int SaveLoad_v4::GameHandler::File::getSlotRemainder(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 1700) % varSize); + return ((offset - (kPropsSize + kIndexSize)) % varSize); } SaveLoad_v4::GameHandler::GameHandler(GobEngine *vm, const char *target) : SaveHandler(vm) { _firstSize = true; - memset(_props, 0, 500); - memset(_index, 0, 1200); + memset(_props, 0, kPropsSize); + memset(_index, 0, kIndexSize); _hasIndex = false; _slotFile = new File(vm, target); @@ -112,7 +112,7 @@ int32 SaveLoad_v4::GameHandler::getSize() { if (varSize == 0) return -1; - return _slotFile->tallyUpFiles(varSize, 1700); + return _slotFile->tallyUpFiles(varSize, kPropsSize + kIndexSize); } bool SaveLoad_v4::GameHandler::load(int16 dataVar, int32 size, int32 offset) { @@ -127,22 +127,22 @@ bool SaveLoad_v4::GameHandler::load(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < 500) { + if (offset < kPropsSize) { // Global properties debugC(3, kDebugSaveLoad, "Loading global properties"); - if ((size + offset) > 500) { + if ((size + offset) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset == 500) { + } else if (offset == kPropsSize) { // Save index - if (size != 1200) { + if (size != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } @@ -202,28 +202,28 @@ bool SaveLoad_v4::GameHandler::save(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < 500) { + if (offset < kPropsSize) { // Global properties debugC(3, kDebugSaveLoad, "Saving global properties"); - if ((size + offset) > 500) { + if ((size + offset) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyTo(dataVar, _props + offset, size); - } else if (offset == 500) { + } else if (offset == kPropsSize) { // Save index - if (size != 1200) { + if (size != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } // Just copy the index into our buffer - _vm->_inter->_variables->copyTo(dataVar, _index, 1200); + _vm->_inter->_variables->copyTo(dataVar, _index, kIndexSize); _hasIndex = true; } else { diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp index 45622bee73..297f23122c 100644 --- a/engines/gob/save/saveload_v6.cpp +++ b/engines/gob/save/saveload_v6.cpp @@ -50,7 +50,7 @@ int SaveLoad_v6::GameHandler::File::getSlot(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 2900) / varSize); + return ((offset - (kPropsSize + kIndexSize)) / varSize); } int SaveLoad_v6::GameHandler::File::getSlotRemainder(int32 offset) const { @@ -59,13 +59,13 @@ int SaveLoad_v6::GameHandler::File::getSlotRemainder(int32 offset) const { if (varSize == 0) return -1; - return ((offset - 2900) % varSize); + return ((offset - (kPropsSize + kIndexSize)) % varSize); } SaveLoad_v6::GameHandler::GameHandler(GobEngine *vm, const char *target) : SaveHandler(vm) { - memset(_props, 0, 500); - memset(_index, 0, 2400); + memset(_props, 0, kPropsSize); + memset(_index, 0, kIndexSize); _slotFile = new File(vm, target); } @@ -80,7 +80,7 @@ int32 SaveLoad_v6::GameHandler::getSize() { if (varSize == 0) return -1; - return _slotFile->tallyUpFiles(varSize, 2900); + return _slotFile->tallyUpFiles(varSize, kPropsSize + kIndexSize); } bool SaveLoad_v6::GameHandler::load(int16 dataVar, int32 size, int32 offset) { @@ -95,22 +95,22 @@ bool SaveLoad_v6::GameHandler::load(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < 500) { + if (offset < kPropsSize) { // Properties refreshProps(); - if ((offset + size) > 500) { + if ((offset + size) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset < 2900) { + } else if (offset < kPropsSize + kIndexSize) { // Save index - if (size != 2400) { + if (size != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } @@ -191,10 +191,10 @@ bool SaveLoad_v6::GameHandler::save(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < 500) { + if (offset < kPropsSize) { // Properties - if ((offset + size) > 500) { + if ((offset + size) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } @@ -203,16 +203,16 @@ bool SaveLoad_v6::GameHandler::save(int16 dataVar, int32 size, int32 offset) { refreshProps(); - } else if (offset < 2900) { + } else if (offset < kPropsSize + kIndexSize) { // Save index - if (size != 2400) { + if (size != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } // Just copy the index into our buffer - _vm->_inter->_variables->copyTo(dataVar, _index, 2400); + _vm->_inter->_variables->copyTo(dataVar, _index, kIndexSize); } else { // Save slot, whole variable block -- cgit v1.2.3 From 0a6161233b15fb6cf30d87ebc20d5d3c78fbbc60 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 20 Aug 2009 17:12:46 +0000 Subject: Remove useless include guard svn-id: r43564 --- engines/sci/engine/static_selectors.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp index c1d0ad9bac..db72ce370d 100644 --- a/engines/sci/engine/static_selectors.cpp +++ b/engines/sci/engine/static_selectors.cpp @@ -26,9 +26,6 @@ // We place selector vocab name tables here for any game that doesn't have // them. This includes the King's Quest IV Demo and LSL3 Demo. -#ifndef SCI_STATIC_SELECTORS_H -#define SCI_STATIC_SELECTORS_H - #include "sci/engine/kernel.h" namespace Sci { @@ -425,5 +422,3 @@ Common::StringList Kernel::checkStaticSelectorNames() { } } // End of namespace Sci - -#endif // SCI_STATIC_SELECTORS_H -- cgit v1.2.3 From c32f11c1064c99da38664bdb7bdbadd6a4ae3d15 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 20 Aug 2009 18:10:02 +0000 Subject: Add detection for the QFG2 demo. svn-id: r43565 --- engines/sci/detection.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index ee9fd5fb18..4b373a76f6 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -2308,6 +2308,15 @@ static const struct SciGameDescription SciGameDescriptions[] = { 0 }, + // Quest for Glory 2 - English DOS Non-Interactive Demo + // Executable scanning reports "1.000.046" + {{"qfg2", "Demo", { + {"resource.map", 0, "e75eb86bdd517b3ef709058249986a87", 906}, + {"resource.001", 0, "9b098f9e1008abe30e56c93b896494e6", 362123}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + // Quest for Glory 3 - English DOS Non-Interactive Demo (from FRG) // Executable scanning reports "1.001.021", VERSION file reports "1.000, 0.001.059, 6.12.92" {{"qfg3", "Demo", { -- cgit v1.2.3 From 83835ce93ce5168dedd72ecbb69a3733ea55dd7c Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 20 Aug 2009 18:25:55 +0000 Subject: Add a static selector table for use with the lsl5 demo. svn-id: r43566 --- engines/sci/engine/static_selectors.cpp | 96 +++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) (limited to 'engines') diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp index db72ce370d..9c2abbfbc9 100644 --- a/engines/sci/engine/static_selectors.cpp +++ b/engines/sci/engine/static_selectors.cpp @@ -394,6 +394,100 @@ static const SelectorRemap iceman_demo_selectors[] = { { "setTarget", 171 } }; +// Taken from Space Quest 1 VGA (Demo) +static const SelectorRemap lsl5_demo_selectors[] = { + { "init", 103 }, + { "play", 42 }, + { "replay", 65 }, + { "x", 4 }, + { "y", 3 }, + { "z", 85 }, + { "priority", 63 }, + { "view", 5 }, + { "loop", 6 }, + { "cel", 7 }, + { "brLeft", 20 }, + { "brRight", 22 }, + { "brTop", 19 }, + { "brBottom", 21 }, + { "xStep", 54 }, + { "yStep", 55 }, + { "nsBottom", 11 }, + { "nsTop", 9 }, + { "nsLeft", 10 }, + { "nsRight", 12 }, + { "font", 33 }, + { "text", 26 }, + { "type", 34 }, + { "state", 32 }, + { "doit", 60 }, + { "delete", 84 }, + { "signal", 17 }, + { "underBits", 8 }, + { "canBeHere", 57 }, + { "client", 45 }, + { "dx", 46 }, + { "dy", 47 }, + { "xStep", 54 }, + { "yStep", 55 }, + { "b-moveCnt", 48 }, + { "b-i1", 49 }, + { "b-i2", 50 }, + { "b-di", 51 }, + { "b-xAxis", 52 }, + { "b-incr", 53 }, + { "completed", 207 }, + { "illegalBits", 18 }, + { "dispose", 104 }, + { "prevSignal", 148 }, + { "message", 40 }, + { "modifiers", 64 }, + { "cue", 135 }, + { "owner", 149 }, + { "handle", 93 }, + { "number", 43 }, + { "max", 37 }, + { "cursor", 36 }, + { "claimed", 76 }, + { "edgeHit", 308 }, + { "wordFail", 71 }, + { "syntaxFail", 72 }, + { "semanticFail", 73 }, + { "cycler", 212 }, + { "elements", 27 }, + { "lsTop", 13 }, + { "lsBottom", 15 }, + { "lsLeft", 14 }, + { "lsRight", 16 }, + { "baseSetter", 277 }, + { "who", 39 }, + { "distance", 221 }, + { "mover", 59 }, + { "looper", 62 }, + { "isBlocked", 61 }, + { "heading", 58 }, + { "mode", 30 }, + { "caller", 133 }, + { "moveDone", 100 }, + { "vol", 97 }, + { "pri", 98 }, + { "min", 94 }, + { "sec", 95 }, + { "frame", 96 }, + { "dataInc", 92 }, + { "size", 89 }, + { "palette", 91 }, + { "moveSpeed", 56 }, + { "nodePtr", 44 }, + { "flags", 150 }, + { "points", 90 }, + { "printLang", 87 }, + { "subtitleLang", 88 }, + { "parseLang", 86 }, + { "motionCue", 210 }, + { "egoMoveSpeed", 357 } +}; + // A macro for loading one of the above tables in the function below #define USE_SELECTOR_TABLE(x) \ do { \ @@ -417,6 +511,8 @@ Common::StringList Kernel::checkStaticSelectorNames() { USE_SELECTOR_TABLE(christmas1992_selectors); else if (gameID == "lsl1sci") USE_SELECTOR_TABLE(lsl1_demo_selectors); + else if (gameID == "lsl5") + USE_SELECTOR_TABLE(lsl5_demo_selectors); return names; } -- cgit v1.2.3 From 8f587ed5e43d31d4cf2139b4d170ed9d726f2acc Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Thu, 20 Aug 2009 19:49:52 +0000 Subject: remove \n's from warning() calls svn-id: r43567 --- engines/sci/resource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 2479504820..9e3bcb067e 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -910,7 +910,7 @@ void ResourceManager::processPatch(ResourceSource *source, ResourceType restype, patch_data_offset = 2; break; default: - warning("Resource patch unsupported special case %X\n", patch_data_offset); + warning("Resource patch unsupported special case %X", patch_data_offset); } } @@ -1022,7 +1022,7 @@ int ResourceManager::readResourceMapSCI0(ResourceSource *map) { res->id = resId; res->source = getVolume(map, offset >> bShift); if (!res->source) { - warning("Could not get volume for resource %d, VolumeID %d\n", id, offset >> bShift); + warning("Could not get volume for resource %d, VolumeID %d", id, offset >> bShift); } _resMap.setVal(resId, res); } -- cgit v1.2.3 From b4c7cd0484be154b2e47ece3bd5b0e0e6911d041 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 20 Aug 2009 20:41:12 +0000 Subject: Fix 16-bit SOL audio on little endian systems. Fixes the white noise in the Gabriel Knight demo. svn-id: r43569 --- engines/sci/sfx/core.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp index 95d79b3666..a1e2a0b0f8 100644 --- a/engines/sci/sfx/core.cpp +++ b/engines/sci/sfx/core.cpp @@ -1060,7 +1060,7 @@ static void deDPCM16(byte *soundBuf, Common::SeekableReadStream &audioStream, ui s += tableDPCM16[b]; s = CLIP(s, -32768, 32767); - *out++ = TO_BE_16(s); + *out++ = s; } } @@ -1105,8 +1105,13 @@ static byte* readSOLAudio(Common::SeekableReadStream *audioStream, uint32 &size, // Convert the SOL stream flags to our own format flags = 0; - if (audioFlags & kSolFlag16Bit) + if (audioFlags & kSolFlag16Bit) { flags |= Audio::Mixer::FLAG_16BITS; +#ifdef SCUMM_LITTLE_ENDIAN + flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN; +#endif + } + if (!(audioFlags & kSolFlagIsSigned)) flags |= Audio::Mixer::FLAG_UNSIGNED; -- cgit v1.2.3 From 79c2dc798082c7fb9de3a90eff90cda0101acfe7 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 20 Aug 2009 20:59:22 +0000 Subject: Fixing some signed/unsigned comparison warnings svn-id: r43570 --- engines/gob/save/saveload_playtoons.cpp | 16 ++++++++-------- engines/gob/save/saveload_v2.cpp | 4 ++-- engines/gob/save/saveload_v3.cpp | 16 ++++++++-------- engines/gob/save/saveload_v4.cpp | 16 ++++++++-------- engines/gob/save/saveload_v6.cpp | 16 ++++++++-------- 5 files changed, 34 insertions(+), 34 deletions(-) (limited to 'engines') diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp index f1140887de..a8fef3cb11 100644 --- a/engines/gob/save/saveload_playtoons.cpp +++ b/engines/gob/save/saveload_playtoons.cpp @@ -93,20 +93,20 @@ bool SaveLoad_Playtoons::GameHandler::load(int16 dataVar, int32 size, int32 offs size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Properties - if ((offset + size) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset < kPropsSize + kIndexSize) { + } else if (((uint32) offset) < kPropsSize + kIndexSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } @@ -180,20 +180,20 @@ bool SaveLoad_Playtoons::GameHandler::save(int16 dataVar, int32 size, int32 offs size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Properties - if ((offset + size) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyTo(dataVar, _props + offset, size); - } else if (offset < kPropsSize + kIndexSize) { + } else if (((uint32) offset) < kPropsSize + kIndexSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } diff --git a/engines/gob/save/saveload_v2.cpp b/engines/gob/save/saveload_v2.cpp index 8449345336..ea639b861a 100644 --- a/engines/gob/save/saveload_v2.cpp +++ b/engines/gob/save/saveload_v2.cpp @@ -99,7 +99,7 @@ bool SaveLoad_v2::GameHandler::load(int16 dataVar, int32 size, int32 offset) { if (offset == 0) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } @@ -184,7 +184,7 @@ bool SaveLoad_v2::GameHandler::save(int16 dataVar, int32 size, int32 offset) { if (offset == 0) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } diff --git a/engines/gob/save/saveload_v3.cpp b/engines/gob/save/saveload_v3.cpp index 510ca622b8..064d472323 100644 --- a/engines/gob/save/saveload_v3.cpp +++ b/engines/gob/save/saveload_v3.cpp @@ -119,22 +119,22 @@ bool SaveLoad_v3::GameHandler::load(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Global properties, like joker usage debugC(3, kDebugSaveLoad, "Loading global properties"); - if ((size + offset) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset == kPropsSize) { + } else if (((uint32) offset) == kPropsSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } @@ -193,22 +193,22 @@ bool SaveLoad_v3::GameHandler::save(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Global properties, like joker usage debugC(3, kDebugSaveLoad, "Saving global properties"); - if ((size + offset) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyTo(dataVar, _props + offset, size); - } else if (offset == kPropsSize) { + } else if (((uint32) offset) == kPropsSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } diff --git a/engines/gob/save/saveload_v4.cpp b/engines/gob/save/saveload_v4.cpp index 66270161d3..e6973efd64 100644 --- a/engines/gob/save/saveload_v4.cpp +++ b/engines/gob/save/saveload_v4.cpp @@ -127,22 +127,22 @@ bool SaveLoad_v4::GameHandler::load(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Global properties debugC(3, kDebugSaveLoad, "Loading global properties"); - if ((size + offset) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset == kPropsSize) { + } else if (((uint32) offset) == kPropsSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } @@ -202,22 +202,22 @@ bool SaveLoad_v4::GameHandler::save(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Global properties debugC(3, kDebugSaveLoad, "Saving global properties"); - if ((size + offset) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong global properties list size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyTo(dataVar, _props + offset, size); - } else if (offset == kPropsSize) { + } else if (((uint32) offset) == kPropsSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Requested index has wrong size (%d)", size); return false; } diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp index 297f23122c..e31c8b4809 100644 --- a/engines/gob/save/saveload_v6.cpp +++ b/engines/gob/save/saveload_v6.cpp @@ -95,22 +95,22 @@ bool SaveLoad_v6::GameHandler::load(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Properties refreshProps(); - if ((offset + size) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } _vm->_inter->_variables->copyFrom(dataVar, _props + offset, size); - } else if (offset < kPropsSize + kIndexSize) { + } else if (((uint32) offset) < kPropsSize + kIndexSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } @@ -191,10 +191,10 @@ bool SaveLoad_v6::GameHandler::save(int16 dataVar, int32 size, int32 offset) { size = varSize; } - if (offset < kPropsSize) { + if (((uint32) offset) < kPropsSize) { // Properties - if ((offset + size) > kPropsSize) { + if (((uint32) (offset + size)) > kPropsSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } @@ -203,10 +203,10 @@ bool SaveLoad_v6::GameHandler::save(int16 dataVar, int32 size, int32 offset) { refreshProps(); - } else if (offset < kPropsSize + kIndexSize) { + } else if (((uint32) offset) < kPropsSize + kIndexSize) { // Save index - if (size != kIndexSize) { + if (((uint32) size) != kIndexSize) { warning("Wrong index size (%d, %d)", size, offset); return false; } -- cgit v1.2.3 From 6a3c595b01cbfbf0858e7461f696ec971a46de7d Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Thu, 20 Aug 2009 21:03:03 +0000 Subject: remove \n's from error() calls svn-id: r43571 --- engines/sci/engine/klists.cpp | 8 ++++---- engines/sci/engine/kpathing.cpp | 2 +- engines/sci/engine/kscripts.cpp | 2 +- engines/sci/engine/seg_manager.cpp | 4 ++-- engines/sci/engine/vm.cpp | 22 +++++++++++----------- 5 files changed, 19 insertions(+), 19 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/klists.cpp b/engines/sci/engine/klists.cpp index 43d1f25e01..a9ae77972f 100644 --- a/engines/sci/engine/klists.cpp +++ b/engines/sci/engine/klists.cpp @@ -36,7 +36,7 @@ Node *lookup_node(EngineState *s, reg_t addr) { if (!mobj) { // FIXME: This occurs right at the beginning of SQ4, when walking north from the first screen. It doesn't // seem to have any apparent ill-effects, though, so it's been changed to non-fatal, for now - //error("%s, L%d: Attempt to use non-node %04x:%04x as list node\n", __FILE__, __LINE__, PRINT_REG(addr)); + //error("%s, L%d: Attempt to use non-node %04x:%04x as list node", __FILE__, __LINE__, PRINT_REG(addr)); warning("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr)); return NULL; } @@ -44,7 +44,7 @@ Node *lookup_node(EngineState *s, reg_t addr) { NodeTable *nt = (NodeTable *)mobj; if (!nt->isValidEntry(addr.offset)) { - error("Attempt to use non-node %04x:%04x as list node\n", PRINT_REG(addr)); + error("Attempt to use non-node %04x:%04x as list node", PRINT_REG(addr)); return NULL; } @@ -55,14 +55,14 @@ List *lookup_list(EngineState *s, reg_t addr) { MemObject *mobj = GET_SEGMENT(*s->seg_manager, addr.segment, MEM_OBJ_LISTS); if (!mobj) { - error("Attempt to use non-list %04x:%04x as list\n", PRINT_REG(addr)); + error("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); return NULL; } ListTable *lt = (ListTable *)mobj; if (!lt->isValidEntry(addr.offset)) { - error("Attempt to use non-list %04x:%04x as list\n", PRINT_REG(addr)); + error("Attempt to use non-list %04x:%04x as list", PRINT_REG(addr)); return NULL; } diff --git a/engines/sci/engine/kpathing.cpp b/engines/sci/engine/kpathing.cpp index da24a388fa..ad14202257 100644 --- a/engines/sci/engine/kpathing.cpp +++ b/engines/sci/engine/kpathing.cpp @@ -1406,7 +1406,7 @@ static PathfindingState *convert_polygon_set(EngineState *s, reg_t poly_list, Co err = nearest_intersection(pf_s, start, end, &intersection); if (err == PF_FATAL) { - warning("AvoidPath: fatal error finding nearest intersecton"); + warning("AvoidPath: fatal error finding nearest intersection"); delete pf_s; return NULL; } diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp index 4d90dd68ac..41eb9f624d 100644 --- a/engines/sci/engine/kscripts.cpp +++ b/engines/sci/engine/kscripts.cpp @@ -74,7 +74,7 @@ int invoke_selector(EngineState *s, reg_t object, int selector_id, SelectorInvoc warning("Selector '%s' of object at %04x:%04x could not be invoked (%s L%d)", ((SciEngine*)g_engine)->getKernel()->getSelectorName(selector_id).c_str(), PRINT_REG(object), fname, line); if (noinvalid == kStopOnInvalidSelector) - error("[Kernel] Not recoverable: VM was halted\n"); + error("[Kernel] Not recoverable: VM was halted"); return 1; } if (slc_type == kSelectorVariable) // Swallow silently diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index a6f54c5bf7..ddcd639f3c 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -166,7 +166,7 @@ void SegManager::setScriptSize(Script &scr, int script_nr) { } if (scr.buf_size > 65535) { - error("Script and heap sizes combined exceed 64K.\n" + error("Script and heap sizes combined exceed 64K." "This means a fundamental design bug was made in SCI\n" "regarding SCI1.1 games.\nPlease report this so it can be" "fixed in the next major version"); @@ -688,7 +688,7 @@ void SegManager::scriptInitialiseObjectsSci11(SegmentId seg) { int species = READ_LE_UINT16(seeker + 10); if (species < 0 || species >= (int)_classtable.size()) { - error("Invalid species %d(0x%x) not in interval [0,%d) while instantiating script %d\n", + error("Invalid species %d(0x%x) not in interval [0,%d) while instantiating script %d", species, species, _classtable.size(), scr->nr); return; } diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 64ee7243fb..943a8e0354 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -79,7 +79,7 @@ static StackPtr validate_stack_addr(EngineState *s, StackPtr sp) { if (sp >= s->stack_base && sp < s->stack_top) return sp; - error("[VM] Stack index %d out of valid range [%d..%d]\n", + error("[VM] Stack index %d out of valid range [%d..%d]", (int)(sp - s->stack_base), 0, (int)(s->stack_top - s->stack_base - 1)); return 0; } @@ -87,9 +87,9 @@ static StackPtr validate_stack_addr(EngineState *s, StackPtr sp) { static int validate_arithmetic(reg_t reg) { if (reg.segment) { if (g_debug_weak_validations) - warning("[VM] Attempt to read arithmetic value from non-zero segment [%04x]\n", reg.segment); + warning("[VM] Attempt to read arithmetic value from non-zero segment [%04x]", reg.segment); else - error("[VM] Attempt to read arithmetic value from non-zero segment [%04x]\n", reg.segment); + error("[VM] Attempt to read arithmetic value from non-zero segment [%04x]", reg.segment); return 0; } @@ -99,9 +99,9 @@ static int validate_arithmetic(reg_t reg) { static int signed_validate_arithmetic(reg_t reg) { if (reg.segment) { if (g_debug_weak_validations) - warning("[VM] Attempt to read arithmetic value from non-zero segment [%04x]\n", reg.segment); + warning("[VM] Attempt to read arithmetic value from non-zero segment [%04x]", reg.segment); else - error("[VM] Attempt to read arithmetic value from non-zero segment [%04x]\n", reg.segment); + error("[VM] Attempt to read arithmetic value from non-zero segment [%04x]", reg.segment); return 0; } @@ -214,7 +214,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP int temp = s->seg_manager->validateExportFunc(pubfunct, seg); if (!temp) { - error("Request for invalid exported function 0x%x of script 0x%x\n", pubfunct, script); + error("Request for invalid exported function 0x%x of script 0x%x", pubfunct, script); return NULL; } @@ -319,7 +319,7 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt break; } - error("Send to invalid selector 0x%x of object at %04x:%04x\n", 0xffff & selector, PRINT_REG(send_obj)); + error("Send to invalid selector 0x%x of object at %04x:%04x", 0xffff & selector, PRINT_REG(send_obj)); break; @@ -930,7 +930,7 @@ void run_vm(EngineState *s, int restoring) { } if (opparams[0] >= (int)((SciEngine*)g_engine)->getKernel()->_kernelFuncs.size()) { - error("Invalid kernel function 0x%x requested\n", opparams[0]); + error("Invalid kernel function 0x%x requested", opparams[0]); } else { int argc = ASSERT_ARITHMETIC(scriptState.xs->sp[0]); @@ -941,7 +941,7 @@ void run_vm(EngineState *s, int restoring) { && !kernel_matches_signature(s, ((SciEngine*)g_engine)->getKernel()->_kernelFuncs[opparams[0]].signature, argc, scriptState.xs->sp + 1)) { - error("[VM] Invalid arguments to kernel call %x\n", opparams[0]); + error("[VM] Invalid arguments to kernel call %x", opparams[0]); } else { s->r_acc = ((SciEngine*)g_engine)->getKernel()->_kernelFuncs[opparams[0]].fun(s, opparams[0], argc, scriptState.xs->sp + 1); @@ -1195,7 +1195,7 @@ void run_vm(EngineState *s, int restoring) { #ifndef DISABLE_VALIDATIONS if (r_temp.offset >= code_buf_size) { error("VM: lofss operation overflowed: %04x:%04x beyond end" - " of script (at %04x)\n", PRINT_REG(r_temp), code_buf_size); + " of script (at %04x)", PRINT_REG(r_temp), code_buf_size); } #endif PUSH32(r_temp); @@ -1492,7 +1492,7 @@ SelectorType lookup_selector(EngineState *s, reg_t obj_location, Selector select if (!obj) { - error("lookup_selector(): Error while looking up Species class.\nOriginal address was %04x:%04x. Species address was %04x:%04x\n", + error("lookup_selector(): Error while looking up Species class.\nOriginal address was %04x:%04x. Species address was %04x:%04x", PRINT_REG(obj_location), PRINT_REG(obj->_variables[SCRIPT_SPECIES_SELECTOR])); return kSelectorNone; } -- cgit v1.2.3 From a7ab084ecfec7897775cba06feb477bcf689cb42 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Thu, 20 Aug 2009 21:18:52 +0000 Subject: SCI: Fix for the "Memory fragmented" dialogs popping up in some games. svn-id: r43572 --- engines/sci/engine/kmisc.cpp | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 2f0072ec67..90ae88b73f 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -63,14 +63,27 @@ reg_t kHaveMouse(EngineState *s, int funct_nr, int argc, reg_t *argv) { return make_reg(0, -1); } +enum kMemoryInfoFunc { + K_MEMORYINFO_LARGEST_HEAP_BLOCK = 0, // Largest heap block available + K_MEMORYINFO_FREE_HEAP = 1, // Total free heap memory + K_MEMORYINFO_LARGEST_HUNK_BLOCK = 2, // Largest available hunk memory block + K_MEMORYINFO_FREE_HUNK = 3, // Amount of free DOS paragraphs + K_MEMORYINFO_TOTAL_HUNK = 4 // Total amount of hunk memory (SCI01) +}; + reg_t kMemoryInfo(EngineState *s, int funct_nr, int argc, reg_t *argv) { + uint16 size = 0x7fff; // Must not be 0xffff, or some memory calculations will overflow + switch (argv[0].offset) { - case 0: // Total free heap memory - case 1: // Largest heap block available - case 2: // Largest available hunk memory block - case 3: // Total amount of hunk memory - case 4: // Amount of free DOS paragraphs- SCI01 - return make_reg(0, 0x7fff); // Must not be 0xffff, or some memory calculations will overflow + case K_MEMORYINFO_LARGEST_HEAP_BLOCK: + // In order to prevent "Memory fragmented" dialogs from + // popping up in some games, we must return FREE_HEAP - 2 here. + return make_reg(0, size - 2); + case K_MEMORYINFO_FREE_HEAP: + case K_MEMORYINFO_LARGEST_HUNK_BLOCK: + case K_MEMORYINFO_FREE_HUNK: + case K_MEMORYINFO_TOTAL_HUNK: + return make_reg(0, size); default: warning("Unknown MemoryInfo operation: %04x", argv[0].offset); -- cgit v1.2.3 From cba2897cc8f7b70d27fc75ca8b8d55cde4738e4a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 21 Aug 2009 03:31:34 +0000 Subject: Truly fix endianness in the SOL decoder. Raw sounds are always in little endian order and now compressed are outputted to little endian too (and therefore the little endian mixer flag is always set). svn-id: r43576 --- engines/sci/sfx/core.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp index a1e2a0b0f8..c8cf773eae 100644 --- a/engines/sci/sfx/core.cpp +++ b/engines/sci/sfx/core.cpp @@ -1070,7 +1070,7 @@ static void deDPCM8Nibble(byte *soundBuf, int32 &s, byte b) { else s += tableDPCM8[b & 7]; s = CLIP(s, 0, 255); - *soundBuf = s; + *soundBuf = TO_LE_16(s); } static void deDPCM8(byte *soundBuf, Common::SeekableReadStream &audioStream, uint32 n) { @@ -1105,13 +1105,9 @@ static byte* readSOLAudio(Common::SeekableReadStream *audioStream, uint32 &size, // Convert the SOL stream flags to our own format flags = 0; - if (audioFlags & kSolFlag16Bit) { - flags |= Audio::Mixer::FLAG_16BITS; -#ifdef SCUMM_LITTLE_ENDIAN - flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN; -#endif - } - + if (audioFlags & kSolFlag16Bit) + flags |= Audio::Mixer::FLAG_16BITS | Audio::Mixer::FLAG_LITTLE_ENDIAN; + if (!(audioFlags & kSolFlagIsSigned)) flags |= Audio::Mixer::FLAG_UNSIGNED; -- cgit v1.2.3 From ba7a574ca1026f65721463199e7afb41bb998197 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 21 Aug 2009 10:34:13 +0000 Subject: Only enable 16bit color HE games, if 16bit color support is enabled. svn-id: r43584 --- engines/scumm/detection_tables.h | 126 ++++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 61 deletions(-) (limited to 'engines') diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 99a28153c4..01bd0446ff 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -80,13 +80,21 @@ static const PlainGameDescriptor gameDescriptions[] = { { "puttputt", "Putt-Putt Joins the Parade" }, #ifdef ENABLE_HE - { "airport", "Let's Explore the Airport with Buzzy" }, +#ifdef ENABLE_RGB_COLOR { "arttime", "Blue's Art Time Activities" }, - { "balloon", "Putt-Putt and Pep's Balloon-O-Rama" }, - { "baseball", "Backyard Baseball" }, { "baseball2001", "Backyard Baseball 2001" }, { "Baseball2003", "Backyard Baseball 2003" }, { "basketball", "Backyard Basketball" }, + { "football2002", "Backyard Football 2002" }, + { "freddicove", "Freddi Fish 5: The Case of the Creature of Coral Cave" }, + { "moonbase", "Moonbase Commander" }, + { "pjgames", "Pajama Sam: Games to Play On Any Day" }, + { "readtime", "Blue's Reading Time Activities" }, + { "Soccer2004", "Backyard Soccer 2004" }, +#endif + { "airport", "Let's Explore the Airport with Buzzy" }, + { "balloon", "Putt-Putt and Pep's Balloon-O-Rama" }, + { "baseball", "Backyard Baseball" }, { "Blues123Time", "Blue's 123 Time Activities" }, { "BluesABCTime", "Blue's ABC Time Activities" }, { "BluesBirthday", "Blue's Birthday Adventure" }, @@ -96,31 +104,25 @@ static const PlainGameDescriptor gameDescriptions[] = { { "dog", "Putt-Putt and Pep's Dog on a Stick" }, { "farm", "Let's Explore the Farm with Buzzy" }, { "football", "Backyard Football" }, - { "football2002", "Backyard Football 2002" }, { "freddi", "Freddi Fish 1: The Case of the Missing Kelp Seeds" }, { "freddi2", "Freddi Fish 2: The Case of the Haunted Schoolhouse" }, { "freddi3", "Freddi Fish 3: The Case of the Stolen Conch Shell" }, { "freddi4", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch" }, - { "freddicove", "Freddi Fish 5: The Case of the Creature of Coral Cave" }, { "FreddisFunShop", "Freddi Fish's One-Stop Fun Shop" }, { "jungle", "Let's Explore the Jungle with Buzzy" }, { "lost", "Pajama Sam's Lost & Found" }, { "maze", "Freddi Fish and Luther's Maze Madness" }, - { "moonbase", "Moonbase Commander" }, { "mustard", "SPY Fox in Hold the Mustard" }, { "pajama", "Pajama Sam 1: No Need to Hide When It's Dark Outside" }, { "pajama2", "Pajama Sam 2: Thunder and Lightning Aren't so Frightening" }, { "pajama3", "Pajama Sam 3: You Are What You Eat From Your Head to Your Feet" }, - { "pjgames", "Pajama Sam: Games to Play On Any Day" }, { "puttcircus", "Putt-Putt Joins the Circus" }, { "puttrace", "Putt-Putt Enters the Race" }, { "PuttsFunShop", "Putt-Putt's One-Stop Fun Shop" }, { "putttime", "Putt-Putt Travels Through Time" }, { "puttzoo", "Putt-Putt Saves the Zoo" }, - { "readtime", "Blue's Reading Time Activities" }, { "SamsFunShop", "Pajama Sam's One-Stop Fun Shop" }, { "soccer", "Backyard Soccer" }, - { "Soccer2004", "Backyard Soccer 2004" }, { "SoccerMLS", "Backyard Soccer MLS Edition" }, { "socks", "Pajama Sam's Sock Works" }, { "spyfox", "SPY Fox 1: Dry Cereal" }, @@ -500,23 +502,12 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "puttputt", "Putt-Putt", kGenHEMacNoParens, UNK_LANG, Common::kPlatformMacintosh, 0 }, #ifdef ENABLE_HE - { "airport", "airport", kGenHEPC, UNK_LANG, UNK, 0 }, - { "airport", "airdemo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "airport", "Airport Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "airport", "The AirPort", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - +#ifdef ENABLE_RGB_COLOR { "arttime", "arttime", kGenHEPC, UNK_LANG, UNK, 0 }, { "arttime", "Blues-ArtTime", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "arttime", "artdemo", kGenHEPC, UNK_LANG, UNK, 0 }, { "arttime", "Blues-ArtTime Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "balloon", "balloon", kGenHEPC, UNK_LANG, UNK, 0 }, - { "balloon", "Balloon-O-Rama", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - - { "baseball", "baseball", kGenHEPC, UNK_LANG, UNK, 0 }, - { "baseball", "BaseBall", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "baseball", "basedemo.cup", kGenUnchanged, UNK_LANG, UNK, 0 }, - { "baseball2001", "baseball2001", kGenHEPC, UNK_LANG, UNK, 0 }, { "baseball2001", "bb2demo", kGenHEPC, UNK_LANG, UNK, 0 }, { "baseball2001", "Baseball 2001 Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, @@ -529,6 +520,59 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "basketball", "basketball", kGenHEPC, UNK_LANG, UNK, 0 }, { "basketball", "Basketball", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "football2002", "FootBall2002", kGenHEPC, UNK_LANG, UNK, 0 }, + { "football2002", "Football 2002", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + + { "freddicove", "freddicove", kGenHEPC, UNK_LANG, UNK, 0 }, + { "freddicove", "FreddiCCC", kGenHEPC, UNK_LANG, UNK, 0 }, + { "freddicove", "FreddiCove", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "freddicove", "FreddiDZZ", kGenHEPC, Common::NL_NLD, UNK, 0 }, + { "freddicove", "FreddiDZZ", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, + { "freddicove", "FreddiMML", kGenHEPC, Common::FR_FRA, UNK, 0 }, + { "freddicove", "FreddiMML", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, + { "freddicove", "FFCoveDemo", kGenHEPC, UNK_LANG, UNK, 0 }, + { "freddicove", "FreddiCoveDemo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "freddicove", "ff5demo", kGenHEPC, UNK_LANG, UNK, 0 }, + { "freddicove", "FF5Demo", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, + + { "moonbase", "moonbase", kGenHEPC, UNK_LANG, UNK, 0 }, + { "moonbase", "moondemo", kGenHEPC, UNK_LANG, UNK, 0 }, + + { "pjgames", "pjgames", kGenHEPC, UNK_LANG, UNK, 0 }, + { "pjgames", "PJGames", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + + { "readtime", "Blue's Reading Time", kGenHEPC, UNK_LANG, UNK, 0 }, + { "readtime", "Blues-ReadingTime", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "readtime", "readDemo", kGenHEPC, UNK_LANG, UNK, 0 }, + { "readtime", "Blues-ReadingTime Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + + { "Soccer2004", "Soccer2004", kGenHEPC, UNK_LANG, UNK, 0 }, + { "Soccer2004", "Soccer 2004", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + + { "spyozon", "spyozon", kGenHEPC, UNK_LANG, UNK, 0 }, + { "spyozon", "sf3-demo", kGenHEPC, UNK_LANG, UNK, 0 }, + { "spyozon", "SF3Demo", kGenHEPC, Common::FR_FRA, UNK, 0 }, + { "spyozon", "Spy Ozone Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "spyozon", "SPYFoxAIW", kGenHEPC, Common::DE_DEU, UNK, 0 }, + { "spyozon", "SPYFoxOZU", kGenHEPC, UNK_LANG, UNK, 0 }, + { "spyozon", "SPYFoxSOS", kGenHEPC, Common::FR_FRA, UNK, 0 }, + { "spyozon", "SPYFoxSOS", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, + { "spyozon", "SpyOzon", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "spyozon", "ozonepre.cup", kGenUnchanged, UNK_LANG, UNK, "HE CUP" }, +#endif + + { "airport", "airport", kGenHEPC, UNK_LANG, UNK, 0 }, + { "airport", "airdemo", kGenHEPC, UNK_LANG, UNK, 0 }, + { "airport", "Airport Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "airport", "The AirPort", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + + { "balloon", "balloon", kGenHEPC, UNK_LANG, UNK, 0 }, + { "balloon", "Balloon-O-Rama", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + + { "baseball", "baseball", kGenHEPC, UNK_LANG, UNK, 0 }, + { "baseball", "BaseBall", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "baseball", "basedemo.cup", kGenUnchanged, UNK_LANG, UNK, 0 }, + { "blues123time", "Blues123time", kGenHEPC, UNK_LANG, UNK, 0 }, { "blues123time", "Blue's 123 Time", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, @@ -571,9 +615,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "football", "FootBall Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "football", "footdemo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "football2002", "FootBall2002", kGenHEPC, UNK_LANG, UNK, 0 }, - { "football2002", "Football 2002", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "freddi", "freddi", kGenHEPC, UNK_LANG, UNK, 0 }, { "freddi", "Freddi", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "freddi", "Freddi1", kGenHEPC, UNK_LANG, UNK, 0 }, @@ -632,18 +673,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "freddi4", "MaliceMRC", kGenHEPC, Common::FR_FRA, UNK, 0 }, { "freddi4", "Mm4demo", kGenHEPC, Common::FR_FRA, UNK, 0 }, - { "freddicove", "freddicove", kGenHEPC, UNK_LANG, UNK, 0 }, - { "freddicove", "FreddiCCC", kGenHEPC, UNK_LANG, UNK, 0 }, - { "freddicove", "FreddiCove", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "freddicove", "FreddiDZZ", kGenHEPC, Common::NL_NLD, UNK, 0 }, - { "freddicove", "FreddiDZZ", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, - { "freddicove", "FreddiMML", kGenHEPC, Common::FR_FRA, UNK, 0 }, - { "freddicove", "FreddiMML", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, - { "freddicove", "FFCoveDemo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "freddicove", "FreddiCoveDemo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "freddicove", "ff5demo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "freddicove", "FF5Demo", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, - { "FreddisFunShop", "FreddisFunShop", kGenHEPC, UNK_LANG, UNK, 0 }, { "FreddisFunShop", "Freddi's FunShop", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, @@ -661,9 +690,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "maze", "Doolhof", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 }, { "maze", "Maze Madness", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "moonbase", "moonbase", kGenHEPC, UNK_LANG, UNK, 0 }, - { "moonbase", "moondemo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "mustard", "mustard", kGenHEPC, UNK_LANG, UNK, 0 }, { "mustard", "Mustard", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, @@ -716,9 +742,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "pajama3", "PyjamaSKS", kGenHEMac, Common::DE_DEU, Common::kPlatformMacintosh, 0 }, { "pajama3", "UKPajamaEAT", kGenHEPC, Common::RU_RUS, UNK, 0 }, - { "pjgames", "pjgames", kGenHEPC, UNK_LANG, UNK, 0 }, - { "pjgames", "PJGames", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "puttcircus", "puttcircus", kGenHEPC, UNK_LANG, UNK, 0 }, { "puttcircus", "circdemo", kGenHEPC, UNK_LANG, UNK, 0 }, { "puttcircus", "CircusDemo", kGenHEPC, Common::FR_FRA, UNK, 0 }, @@ -788,11 +811,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "puttzoo", "Zoo Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "puttzoo", "Putt-Putt Saves the Zoo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "readtime", "Blue's Reading Time", kGenHEPC, UNK_LANG, UNK, 0 }, - { "readtime", "Blues-ReadingTime", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "readtime", "readDemo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "readtime", "Blues-ReadingTime Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "SamsFunShop", "SamsFunShop", kGenHEPC, UNK_LANG, UNK, 0 }, { "SamsFunShop", "Sam's FunShop", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, @@ -802,9 +820,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "SoccerMLS", "SoccerMLS", kGenHEPC, UNK_LANG, UNK, 0 }, { "SoccerMLS", "Backyard Soccer MLS", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "Soccer2004", "Soccer2004", kGenHEPC, UNK_LANG, UNK, 0 }, - { "Soccer2004", "Soccer 2004", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "socks", "socks", kGenHEPC, UNK_LANG, UNK, 0 }, { "socks", "SockWorks", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "socks", "SokkenSoep", kGenHEPC, Common::NL_NLD, UNK, 0 }, @@ -846,17 +861,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "spyfox2", "SPYMini", kGenHEPC, UNK_LANG, UNK, 0 }, { "spyfox2", "spy2preview.cup", kGenUnchanged, UNK_LANG, UNK, 0 }, - { "spyozon", "spyozon", kGenHEPC, UNK_LANG, UNK, 0 }, - { "spyozon", "sf3-demo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "spyozon", "SF3Demo", kGenHEPC, Common::FR_FRA, UNK, 0 }, - { "spyozon", "Spy Ozone Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "spyozon", "SPYFoxAIW", kGenHEPC, Common::DE_DEU, UNK, 0 }, - { "spyozon", "SPYFoxOZU", kGenHEPC, UNK_LANG, UNK, 0 }, - { "spyozon", "SPYFoxSOS", kGenHEPC, Common::FR_FRA, UNK, 0 }, - { "spyozon", "SPYFoxSOS", kGenHEMac, Common::FR_FRA, Common::kPlatformMacintosh, 0 }, - { "spyozon", "SpyOzon", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "spyozon", "ozonepre.cup", kGenUnchanged, UNK_LANG, UNK, "HE CUP" }, - { "thinker1", "1grademo", kGenHEPC, UNK_LANG, UNK, 0 }, { "thinker1", "thinker1", kGenHEPC, UNK_LANG, UNK, 0 }, { "thinker1", "Thinker1", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, -- cgit v1.2.3 From 58f8ec5d5789375b6f7f1b2b84748fc6256e8e54 Mon Sep 17 00:00:00 2001 From: Scott Thomas Date: Fri, 21 Aug 2009 13:57:03 +0000 Subject: Groovie: Sync changes from 16bpp branch. Hopefully no regressions sneak in here svn-id: r43598 --- engines/groovie/graphics.cpp | 4 +- engines/groovie/groovie.cpp | 22 +++++- engines/groovie/groovie.h | 2 + engines/groovie/roq.cpp | 162 +++++++++++++++++++++++++++---------------- engines/groovie/script.cpp | 90 +++++++++++++++--------- engines/groovie/script.h | 7 +- 6 files changed, 191 insertions(+), 96 deletions(-) (limited to 'engines') diff --git a/engines/groovie/graphics.cpp b/engines/groovie/graphics.cpp index 647eaa913b..1e54f0e79b 100644 --- a/engines/groovie/graphics.cpp +++ b/engines/groovie/graphics.cpp @@ -31,8 +31,8 @@ namespace Groovie { GraphicsMan::GraphicsMan(GroovieEngine *vm) : _vm(vm), _changed(false), _fading(0) { // Create the game surfaces - _foreground.create(640, 320, 1); - _background.create(640, 320, 1); + _foreground.create(640, 320, _vm->_pixelFormat.bytesPerPixel); + _background.create(640, 320, _vm->_pixelFormat.bytesPerPixel); } GraphicsMan::~GraphicsMan() { diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp index 9381b5b47c..bb4e142196 100644 --- a/engines/groovie/groovie.cpp +++ b/engines/groovie/groovie.cpp @@ -70,7 +70,20 @@ GroovieEngine::~GroovieEngine() { Common::Error GroovieEngine::run() { // Initialize the graphics - initGraphics(640, 480, true); + switch (_gameDescription->version) { + case kGroovieV2: + // Request the mode with the highest precision available + initGraphics(640, 480, true, NULL); + + // Save the enabled mode as it can be both an RGB mode or CLUT8 + _pixelFormat = _system->getScreenFormat(); + _mode8bit = (_pixelFormat == Graphics::PixelFormat::createFormatCLUT8()); + break; + case kGroovieT7G: + initGraphics(640, 480, true); + _pixelFormat = Graphics::PixelFormat::createFormatCLUT8(); + break; + } // Create debugger. It requires GFX to be initialized _debugger = new Debugger(this); @@ -204,13 +217,18 @@ Common::Error GroovieEngine::run() { case Common::EVENT_LBUTTONDOWN: // Send the event to the scripts - _script.setMouseClick(); + _script.setMouseClick(1); // Continue the script execution to handle // the click _waitingForInput = false; break; + case Common::EVENT_RBUTTONDOWN: + // Send the event to the scripts (to skip the video) + _script.setMouseClick(2); + break; + case Common::EVENT_QUIT: quitGame(); break; diff --git a/engines/groovie/groovie.h b/engines/groovie/groovie.h index a137193adf..bf57ae77de 100644 --- a/engines/groovie/groovie.h +++ b/engines/groovie/groovie.h @@ -85,6 +85,8 @@ protected: public: void waitForInput(); + Graphics::PixelFormat _pixelFormat; + bool _mode8bit; Script _script; ResMan *_resMan; GrvCursorMan *_grvCursorMan; diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index dcb8eafcb8..538b1b7111 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -29,6 +29,12 @@ #include "groovie/groovie.h" #include "groovie/roq.h" +#include "graphics/jpeg.h" + +#ifdef ENABLE_RGB_COLOR +// Required for the YUV to RGB conversion +#include "graphics/conversion.h" +#endif #include "sound/mixer.h" namespace Groovie { @@ -43,50 +49,52 @@ ROQPlayer::ROQPlayer(GroovieEngine *vm) : _currBuf = new Graphics::Surface(); _prevBuf = new Graphics::Surface(); - byte pal[256 * 4]; + if (_vm->_mode8bit) { + byte pal[256 * 4]; #ifdef DITHER - byte pal3[256 * 3]; - // Initialize to a black palette - for (int i = 0; i < 256 * 3; i++) { - pal3[i] = 0; - } - - // Build a basic color palette - for (int r = 0; r < 4; r++) { - for (int g = 0; g < 4; g++) { - for (int b = 0; b < 4; b++) { - byte col = (r << 4) | (g << 2) | (b << 0); - pal3[3 * col + 0] = r << 6; - pal3[3 * col + 1] = g << 6; - pal3[3 * col + 2] = b << 6; + byte pal3[256 * 3]; + // Initialize to a black palette + for (int i = 0; i < 256 * 3; i++) { + pal3[i] = 0; + } + + // Build a basic color palette + for (int r = 0; r < 4; r++) { + for (int g = 0; g < 4; g++) { + for (int b = 0; b < 4; b++) { + byte col = (r << 4) | (g << 2) | (b << 0); + pal3[3 * col + 0] = r << 6; + pal3[3 * col + 1] = g << 6; + pal3[3 * col + 2] = b << 6; + } } } - } - // Initialize the dithering algorithm - _paletteLookup = new Graphics::PaletteLUT(8, Graphics::PaletteLUT::kPaletteYUV); - _paletteLookup->setPalette(pal3, Graphics::PaletteLUT::kPaletteRGB, 8); - for (int i = 0; (i < 64) && !_vm->shouldQuit(); i++) { - debug("Groovie::ROQ: Building palette table: %02d/63", i); - _paletteLookup->buildNext(); - } + // Initialize the dithering algorithm + _paletteLookup = new Graphics::PaletteLUT(8, Graphics::PaletteLUT::kPaletteYUV); + _paletteLookup->setPalette(pal3, Graphics::PaletteLUT::kPaletteRGB, 8); + for (int i = 0; (i < 64) && !_vm->shouldQuit(); i++) { + debug("Groovie::ROQ: Building palette table: %02d/63", i); + _paletteLookup->buildNext(); + } - // Prepare the palette to show - for (int i = 0; i < 256; i++) { - pal[(i * 4) + 0] = pal3[(i * 3) + 0]; - pal[(i * 4) + 1] = pal3[(i * 3) + 1]; - pal[(i * 4) + 2] = pal3[(i * 3) + 2]; - } -#else - // Set a grayscale palette - for (int i = 0; i < 256; i++) { - pal[(i * 4) + 0] = i; - pal[(i * 4) + 1] = i; - pal[(i * 4) + 2] = i; - } -#endif + // Prepare the palette to show + for (int i = 0; i < 256; i++) { + pal[(i * 4) + 0] = pal3[(i * 3) + 0]; + pal[(i * 4) + 1] = pal3[(i * 3) + 1]; + pal[(i * 4) + 2] = pal3[(i * 3) + 2]; + } +#else // !DITHER + // Set a grayscale palette + for (int i = 0; i < 256; i++) { + pal[(i * 4) + 0] = i; + pal[(i * 4) + 1] = i; + pal[(i * 4) + 2] = i; + } +#endif // DITHER - _syst->setPalette(pal, 0, 256); + _syst->setPalette(pal, 0, 256); + } } ROQPlayer::~ROQPlayer() { @@ -152,22 +160,39 @@ void ROQPlayer::buildShowBuf() { for (int line = 0; line < _showBuf.h; line++) { byte *out = (byte *)_showBuf.getBasePtr(0, line); - byte *in = (byte *)_prevBuf->getBasePtr(0, line / _scaleY); + byte *in = (byte *)_currBuf->getBasePtr(0, line / _scaleY); for (int x = 0; x < _showBuf.w; x++) { + if (_vm->_mode8bit) { #ifdef DITHER - *out = _dither->dither(*in, *(in + 1), *(in + 2), x); + *out = _dither->dither(*in, *(in + 1), *(in + 2), x); #else - // Just use the luminancy component - *out = *in; -#endif - out++; + // Just use the luminancy component + *out = *in; +#endif // DITHER +#ifdef ENABLE_RGB_COLOR + } else { + // Do the format conversion (YUV -> RGB -> Screen format) + byte r, g, b; + Graphics::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); + // FIXME: this is fixed to 16bit + *(uint16 *)out = (uint16)_vm->_pixelFormat.RGBToColor(r, g, b); +#endif // ENABLE_RGB_COLOR + } + + // Skip to the next pixel + out += _vm->_pixelFormat.bytesPerPixel; if (!(x % _scaleX)) - in += _prevBuf->bytesPerPixel; + in += _currBuf->bytesPerPixel; } #ifdef DITHER _dither->nextLine(); #endif } + + // Swap buffers + Graphics::Surface *tmp = _prevBuf; + _prevBuf = _currBuf; + _currBuf = tmp; } bool ROQPlayer::playFrameInternal() { @@ -180,7 +205,7 @@ bool ROQPlayer::playFrameInternal() { } if (_dirty) { - // Build the show buffer from the previous (back) buffer + // Build the show buffer from the current buffer buildShowBuf(); } @@ -189,7 +214,7 @@ bool ROQPlayer::playFrameInternal() { if (_dirty) { // Update the screen - _syst->copyRectToScreen((byte *)_showBuf.getBasePtr(0, 0), _showBuf.w, 0, (_syst->getHeight() - _showBuf.h) / 2, _showBuf.pitch, _showBuf.h); + _syst->copyRectToScreen((byte *)_showBuf.getBasePtr(0, 0), _showBuf.pitch, 0, (_syst->getHeight() - _showBuf.h) / 2, _showBuf.w, _showBuf.h); _syst->updateScreen(); // Clear the dirty flag @@ -240,19 +265,15 @@ bool ROQPlayer::processBlock() { case 0x1002: // Quad codebook definition ok = processBlockQuadCodebook(blockHeader); break; - case 0x1011: { // Quad vector quantised video frame + case 0x1011: // Quad vector quantised video frame ok = processBlockQuadVector(blockHeader); _dirty = true; endframe = true; - - // Swap buffers - Graphics::Surface *tmp = _prevBuf; - _prevBuf = _currBuf; - _currBuf = tmp; break; - } case 0x1012: // Still image (JPEG) ok = processBlockStill(blockHeader); + _dirty = true; + endframe = true; break; case 0x1013: // Hang assert(blockHeader.size == 0 && blockHeader.param == 0); @@ -317,7 +338,19 @@ bool ROQPlayer::processBlockInfo(ROQBlockHeader &blockHeader) { // Allocate new buffers _currBuf->create(width, height, 3); _prevBuf->create(width, height, 3); - _showBuf.create(width * _scaleX, height * _scaleY, 1); + _showBuf.create(width * _scaleX, height * _scaleY, _vm->_pixelFormat.bytesPerPixel); + + // Clear the buffers with black YUV values + byte *ptr1 = (byte *)_currBuf->getBasePtr(0, 0); + byte *ptr2 = (byte *)_prevBuf->getBasePtr(0, 0); + for (int i = 0; i < width * height; i++) { + *ptr1++ = 0; + *ptr1++ = 128; + *ptr1++ = 128; + *ptr2++ = 0; + *ptr2++ = 128; + *ptr2++ = 128; + } #ifdef DITHER // Reset the dithering algorithm with the new width @@ -456,10 +489,23 @@ void ROQPlayer::processBlockQuadVectorBlockSub(int baseX, int baseY, int8 Mx, in bool ROQPlayer::processBlockStill(ROQBlockHeader &blockHeader) { debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Groovie::ROQ: Processing still (JPEG) block"); - warning("Groovie::ROQ: JPEG frame (unimplemented)"); - memset(_prevBuf->getBasePtr(0, 0), 0, _prevBuf->w * _prevBuf->h * _prevBuf->bytesPerPixel); + warning("Groovie::ROQ: JPEG frame (unfinshed)"); + + Graphics::JPEG *jpg = new Graphics::JPEG(); + jpg->read(_file); + byte *y = (byte *)jpg->getComponent(1)->getBasePtr(0, 0); + byte *u = (byte *)jpg->getComponent(2)->getBasePtr(0, 0); + byte *v = (byte *)jpg->getComponent(3)->getBasePtr(0, 0); + + byte *ptr = (byte *)_currBuf->getBasePtr(0, 0); + for (int i = 0; i < _currBuf->w * _currBuf->h; i++) { + *ptr++ = *y++; + *ptr++ = *u++; + *ptr++ = *v++; + } + memcpy(_prevBuf->getBasePtr(0, 0), _currBuf->getBasePtr(0, 0), _prevBuf->w * _prevBuf->h * 3); - _file->skip(blockHeader.size); + delete jpg; return true; } diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp index 5ee58184f2..2ef3df56a1 100644 --- a/engines/groovie/script.cpp +++ b/engines/groovie/script.cpp @@ -102,6 +102,7 @@ Script::Script(GroovieEngine *vm, EngineVersion version) : _hotspotSlot = (uint16)-1; _oldInstruction = (uint16)-1; + _videoSkipAddress = 0; } Script::~Script() { @@ -235,8 +236,8 @@ void Script::step() { (this->*op)(); } -void Script::setMouseClick() { - _eventMouseClicked = true; +void Script::setMouseClick(uint8 button) { + _eventMouseClicked = button; } void Script::setKbdChar(uint8 c) { @@ -359,7 +360,7 @@ bool Script::hotspot(Common::Rect rect, uint16 address, uint8 cursor) { Common::isDebugChannelEnabled(kGroovieDebugAll)) { rect.translate(0, -80); _vm->_graphicsMan->_foreground.frameRect(rect, 250); - _vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), 640, 0, 80, 640, 320); + _vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320); _vm->_system->updateScreen(); } @@ -559,6 +560,21 @@ bool Script::playvideofromref(uint32 fileref) { } _bitflags = 0; + + // Reset the clicked mouse events + _eventMouseClicked = 0; + } + + // Check if the user wants to skip the video + if ((_eventMouseClicked == 2) && (_videoSkipAddress != 0)) { + // Jump to the given address + _currentInstruction = _videoSkipAddress; + + // Reset the skip address + _videoSkipAddress = 0; + + // End the playback + return true; } // Video available, play one frame @@ -573,7 +589,7 @@ bool Script::playvideofromref(uint32 fileref) { _videoRef = 0; // Clear the input events while playing the video - _eventMouseClicked = false; + _eventMouseClicked = 0; _eventKbdChar = 0; // Newline @@ -604,8 +620,8 @@ void Script::o_inputloopstart() { //0x0B _inputLoopAddress = _currentInstruction - 1; // Save the current mouse state for the whole loop - _mouseClicked = _eventMouseClicked; - _eventMouseClicked = false; + _mouseClicked = (_eventMouseClicked == 1); + _eventMouseClicked = 0; // Save the current pressed character for the whole loop _kbdChar = _eventKbdChar; @@ -1535,20 +1551,19 @@ void Script::o_stub59() { debugScript(1, true, "STUB59: 0x%04X 0x%02X", val1, val2); } -void Script::o2_playsong(){ +void Script::o2_playsong() { uint32 fileref = readScript32bits(); debugScript(1, true, "PlaySong(0x%08X): Play xmidi file", fileref); _vm->_musicPlayer->playSong(fileref); - } -void Script::o2_setbackgroundsong(){ +void Script::o2_setbackgroundsong() { uint32 fileref = readScript32bits(); debugScript(1, true, "SetBackgroundSong(0x%08X)", fileref); _vm->_musicPlayer->setBackgroundSong(fileref); } -void Script::o2_videofromref(){ +void Script::o2_videofromref() { uint32 fileref = readScript32bits(); // Show the debug information just when starting the playback @@ -1556,6 +1571,7 @@ void Script::o2_videofromref(){ debugScript(1, true, "VIDEOFROMREF(0x%08X) (Not fully imp): Play video file from ref", fileref); debugC(5, kGroovieDebugVideo | kGroovieDebugAll, "Playing video 0x%08X via 0x09", fileref); } + // Play the video if (!playvideofromref(fileref)) { // Move _currentInstruction back @@ -1563,7 +1579,7 @@ void Script::o2_videofromref(){ } } -void Script::o2_vdxtransition(){ +void Script::o2_vdxtransition() { uint32 fileref = readScript32bits(); // Show the debug information just when starting the playback @@ -1587,11 +1603,21 @@ void Script::o2_vdxtransition(){ } } -void Script::o2_stub52(){ +void Script::o2_setvideoskip() { + _videoSkipAddress = readScript16bits(); + debugScript(1, true, "SetVideoSkip (0x%04X)", _videoSkipAddress); +} + +void Script::o2_stub52() { uint8 arg = readScript8bits(); debugScript(1, true, "STUB52 (0x%02X)", arg); } +void Script::o2_setscriptend() { + uint16 arg = readScript16bits(); + debugScript(1, true, "SetScriptEnd (0x%04X)", arg); +} + Script::OpcodeFunc Script::_opcodesT7G[NUM_OPCODES] = { &Script::o_nop, // 0x00 &Script::o_nop, @@ -1692,11 +1718,11 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_invalid, // 0x00 &Script::o_nop, &Script::o2_playsong, - &Script::o_bf9on, - &Script::o_palfadeout, // 0x04 - &Script::o_bf8on, - &Script::o_bf6on, - &Script::o_bf7on, + &Script::o_nop, + &Script::o_nop, // 0x04 + &Script::o_nop, + &Script::o_nop, + &Script::o_nop, &Script::o2_setbackgroundsong, // 0x08 &Script::o2_videofromref, &Script::o_bf5on, @@ -1719,7 +1745,7 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_xor_obfuscate, &Script::o2_vdxtransition, // 0x1C &Script::o_swap, - &Script::o_nop8, + &Script::o_invalid, &Script::o_inc, &Script::o_dec, // 0x20 &Script::o_strcmpnejmp_var, @@ -1729,10 +1755,10 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_add, &Script::o_videofromstring1, &Script::o_videofromstring2, - &Script::o_nop16, // 0x28 - &Script::o_stopmidi, - &Script::o_endscript, + &Script::o_invalid, // 0x28 &Script::o_nop, + &Script::o_endscript, + &Script::o_invalid, &Script::o_sethotspottop, // 0x2C &Script::o_sethotspotbottom, &Script::o_loadgame, @@ -1759,22 +1785,22 @@ Script::OpcodeFunc Script::_opcodesV2[NUM_OPCODES] = { &Script::o_returnscript, &Script::o_sethotspotright, // 0x44 &Script::o_sethotspotleft, - &Script::o_nop, - &Script::o_nop, - &Script::o_nop8, // 0x48 - &Script::o_nop, - &Script::o_nop16, - &Script::o_nop8, - &Script::o_getcd, // 0x4C - &Script::o_playcd, + &Script::o_invalid, + &Script::o_invalid, + &Script::o_invalid, // 0x48 + &Script::o_invalid, &Script::o_nop16, + &Script::o_invalid, + &Script::o_invalid, // 0x4C + &Script::o_invalid, + &Script::o_invalid, &Script::o_nop16, &Script::o_nop16, // 0x50 - &Script::o_nop16, + &Script::o2_setvideoskip, &Script::o2_stub52, &Script::o_hotspot_outrect, - &Script::o_nop, // 0x54 - &Script::o_nop16, + &Script::o_invalid, // 0x54 + &Script::o2_setscriptend, &Script::o_stub56, &Script::o_invalid, &Script::o_invalid, // 0x58 diff --git a/engines/groovie/script.h b/engines/groovie/script.h index e9e0be69ec..9e35d6fcde 100644 --- a/engines/groovie/script.h +++ b/engines/groovie/script.h @@ -58,7 +58,7 @@ public: void directGameLoad(int slot); void step(); - void setMouseClick(); + void setMouseClick(uint8 button); void setKbdChar(uint8 c); Common::String &getContext(); @@ -96,7 +96,7 @@ private: // Input bool _mouseClicked; - bool _eventMouseClicked; + uint8 _eventMouseClicked; uint8 _kbdChar; uint8 _eventKbdChar; uint16 _inputLoopAddress; @@ -115,6 +115,7 @@ private: Common::SeekableReadStream *_videoFile; uint32 _videoRef; uint16 _bitflags; + uint16 _videoSkipAddress; // Debugging Debugger *_debugger; @@ -228,7 +229,9 @@ private: void o2_setbackgroundsong(); void o2_videofromref(); void o2_vdxtransition(); + void o2_setvideoskip(); void o2_stub52(); + void o2_setscriptend(); }; } // End of Groovie namespace -- cgit v1.2.3 From 180b56dba4d6b1db9ca72e2cf37cabbf3b3aaeb4 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 21 Aug 2009 16:03:45 +0000 Subject: SCI: disable RGB mode, as it's not ready to be used yet svn-id: r43600 --- engines/sci/sci.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 596895d1cb..0db80726be 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -112,7 +112,7 @@ SciEngine::~SciEngine() { Common::Error SciEngine::run() { Graphics::PixelFormat gfxmode; -#ifdef ENABLE_RGB_COLOR +#if 0 && defined(ENABLE_RGB_COLOR) initGraphics(320, 200, false, NULL); #else initGraphics(320, 200, false); -- cgit v1.2.3 From f9a3ca7db1de02c93be3a7548eb32138c49c7b6b Mon Sep 17 00:00:00 2001 From: Arnaud Boutonné Date: Fri, 21 Aug 2009 16:50:30 +0000 Subject: Add 31 title files to ignore (they are never present !) svn-id: r43601 --- engines/gob/save/saveload_playtoons.cpp | 36 ++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp index a8fef3cb11..48adcdc59e 100644 --- a/engines/gob/save/saveload_playtoons.cpp +++ b/engines/gob/save/saveload_playtoons.cpp @@ -30,9 +30,39 @@ namespace Gob { SaveLoad_Playtoons::SaveFile SaveLoad_Playtoons::_saveFiles[] = { - { "did.inf", kSaveModeSave, 0, 0}, // - { "dan.itk", kSaveModeNone, 0, 0}, // Playtoons CK detection file - + { "did.inf", kSaveModeSave, 0, 0}, // Purpose ignored at the moment, intensively used to save things. + { "dan.itk", kSaveModeNone, 0, 0}, // Playtoons CK detection file + { "titre.009", kSaveModeIgnore, 0, 0}, // Playtoons theoritical title files that are checked for nothing + { "titre.010", kSaveModeIgnore, 0, 0}, + { "titre.011", kSaveModeIgnore, 0, 0}, + { "titre.012", kSaveModeIgnore, 0, 0}, + { "titre.013", kSaveModeIgnore, 0, 0}, + { "titre.014", kSaveModeIgnore, 0, 0}, + { "titre.015", kSaveModeIgnore, 0, 0}, + { "titre.016", kSaveModeIgnore, 0, 0}, + { "titre.017", kSaveModeIgnore, 0, 0}, + { "titre.018", kSaveModeIgnore, 0, 0}, + { "titre.019", kSaveModeIgnore, 0, 0}, + { "titre.020", kSaveModeIgnore, 0, 0}, + { "titre.021", kSaveModeIgnore, 0, 0}, + { "titre.022", kSaveModeIgnore, 0, 0}, + { "titre.023", kSaveModeIgnore, 0, 0}, + { "titre.024", kSaveModeIgnore, 0, 0}, + { "titre.025", kSaveModeIgnore, 0, 0}, + { "titre.026", kSaveModeIgnore, 0, 0}, + { "titre.027", kSaveModeIgnore, 0, 0}, + { "titre.028", kSaveModeIgnore, 0, 0}, + { "titre.029", kSaveModeIgnore, 0, 0}, + { "titre.030", kSaveModeIgnore, 0, 0}, + { "titre.031", kSaveModeIgnore, 0, 0}, + { "titre.032", kSaveModeIgnore, 0, 0}, + { "titre.033", kSaveModeIgnore, 0, 0}, + { "titre.034", kSaveModeIgnore, 0, 0}, + { "titre.035", kSaveModeIgnore, 0, 0}, + { "titre.036", kSaveModeIgnore, 0, 0}, + { "titre.037", kSaveModeIgnore, 0, 0}, + { "titre.038", kSaveModeIgnore, 0, 0}, + { "titre.039", kSaveModeIgnore, 0, 0}, }; SaveLoad_Playtoons::GameHandler::File::File(GobEngine *vm, const char *base) : -- cgit v1.2.3 From c0d954334547c166b52b37199ad877bc7e5ac2b0 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 21 Aug 2009 18:12:13 +0000 Subject: Fix detection of SCI32 resource maps and volumes svn-id: r43603 --- engines/sci/resource.cpp | 50 +++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 22 deletions(-) (limited to 'engines') diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 9e3bcb067e..049abe8202 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -351,12 +351,22 @@ int sci0_get_compression_method(Common::ReadStream &stream) { int ResourceManager::addAppropriateSources() { ResourceSource *map; - if (!Common::File::exists("RESOURCE.MAP")) + if (Common::File::exists("RESOURCE.MAP")) + map = addExternalMap("RESOURCE.MAP"); +#ifdef ENABLE_SCI32 + else if (Common::File::exists("RESMAP.000")) + map = addExternalMap("RESMAP.000"); +#endif + else return 0; - map = addExternalMap("RESOURCE.MAP"); + Common::ArchiveMemberList files; SearchMan.listMatchingMembers(files, "RESOURCE.0??"); + +#ifdef ENABLE_SCI32 + SearchMan.listMatchingMembers(files, "RESSCI.0??"); +#endif for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) { const Common::String name = (*x)->getName(); @@ -707,10 +717,9 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { } } - if (!fileStream) { + if (!fileStream) error("Failed to open resource map file"); - return kResVersionUnknown; - } + // detection // SCI0 and SCI01 maps have last 6 bytes set to FF fileStream->seek(-4, SEEK_END); @@ -737,11 +746,20 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { while (!fileStream->eos()) { directoryType = fileStream->readByte(); directoryOffset = fileStream->readUint16LE(); - if ((directoryType < 0x80) || ((directoryType > 0xA0) && (directoryType != 0xFF))) + + // Only SCI32 has directory type < 0x80 + if (directoryType < 0x80 && mapDetected != kResVersionUnknown && mapDetected != kResVersionSci32) + mapDetected = kResVersionSci32; + else break; + + if (directoryType > 0xA0 && directoryType != 0xFF) + break; + // Offset is above file size? -> definitely not SCI1/SCI1.1 if (directoryOffset > fileStream->size()) break; + if (lastDirectoryOffset) { directorySize = directoryOffset - lastDirectoryOffset; if ((directorySize % 5) && (directorySize % 6 == 0)) @@ -749,6 +767,7 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { if ((directorySize % 5 == 0) && (directorySize % 6)) mapDetected = kResVersionSci11; } + if (directoryType == 0xFF) { // FFh entry needs to point to EOF if (directoryOffset != fileStream->size()) @@ -760,23 +779,10 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { return mapDetected; return kResVersionSci1Late; } + lastDirectoryOffset = directoryOffset; } -#ifdef ENABLE_SCI32 - // late SCI1.1 and SCI32 maps have last directory entry set to 0xFF - // offset set to filesize and 4 more bytes - - // TODO/FIXME: This code was not updated in r42300, which changed the behavior of this - // function a lot. To make it compile again "off" was changed to the newly introduced - // "lastDirectoryOffset". This is probably not the correct fix, since before r43000 - // the loop above could not prematurely terminate and thus this would always check the - // last directory entry instead of the last checked directory entry. - fileStream->seek(lastDirectoryOffset - 7, SEEK_SET); - if (fileStream->readByte() == 0xFF && fileStream->readUint16LE() == fileStream->size()) - return kResVersionSci32; // TODO : check if there is a difference between these maps -#endif - delete fileStream; return kResVersionUnknown; @@ -851,7 +857,7 @@ ResourceManager::ResVersion ResourceManager::detectVolVersion() { break; } - fileStream->seek(0, SEEK_SET); + fileStream->seek(0); continue; } @@ -860,7 +866,7 @@ ResourceManager::ResVersion ResourceManager::detectVolVersion() { else if (curVersion == kResVersionSci11) fileStream->seek((9 + dwPacked) % 2 ? dwPacked + 1 : dwPacked, SEEK_CUR); else if (curVersion == kResVersionSci32) - fileStream->seek(dwPacked, SEEK_CUR);//(9 + wPacked) % 2 ? wPacked + 1 : wPacked, SEEK_CUR); + fileStream->seek(dwPacked - 2, SEEK_CUR); } delete fileStream; -- cgit v1.2.3 From 007f68366fd55a519753bf533c7c3a80db3754f0 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 21 Aug 2009 18:16:37 +0000 Subject: Renamed ENABLE_RGB_COLOR to USE_RGB_COLOR, and added it to config.h to guarantee a consistent build. svn-id: r43604 --- engines/engine.cpp | 4 ++-- engines/groovie/roq.cpp | 6 +++--- engines/sci/sci.cpp | 2 +- engines/scumm/cursor.cpp | 2 +- engines/scumm/detection_tables.h | 4 ++-- engines/scumm/scumm.cpp | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index eb46add82f..a64a2fd1f3 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -130,7 +130,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: g_system->beginGFXTransaction(); initCommonGFX(defaultTo1xScaler); -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (format) g_system->initSize(width, height, format); else { @@ -160,7 +160,7 @@ void initGraphics(int width, int height, bool defaultTo1xScaler, const Graphics: } // Just show warnings then these occur: -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR if (gfxError & OSystem::kTransactionFormatNotSupported) { Common::String message = "Could not initialize color format."; diff --git a/engines/groovie/roq.cpp b/engines/groovie/roq.cpp index 538b1b7111..3ff852934d 100644 --- a/engines/groovie/roq.cpp +++ b/engines/groovie/roq.cpp @@ -31,7 +31,7 @@ #include "graphics/jpeg.h" -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR // Required for the YUV to RGB conversion #include "graphics/conversion.h" #endif @@ -169,14 +169,14 @@ void ROQPlayer::buildShowBuf() { // Just use the luminancy component *out = *in; #endif // DITHER -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR } else { // Do the format conversion (YUV -> RGB -> Screen format) byte r, g, b; Graphics::YUV2RGB(*in, *(in + 1), *(in + 2), r, g, b); // FIXME: this is fixed to 16bit *(uint16 *)out = (uint16)_vm->_pixelFormat.RGBToColor(r, g, b); -#endif // ENABLE_RGB_COLOR +#endif // USE_RGB_COLOR } // Skip to the next pixel diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 0db80726be..3f148f54e7 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -112,7 +112,7 @@ SciEngine::~SciEngine() { Common::Error SciEngine::run() { Graphics::PixelFormat gfxmode; -#if 0 && defined(ENABLE_RGB_COLOR) +#if 0 && defined(USE_RGB_COLOR) initGraphics(320, 200, false, NULL); #else initGraphics(320, 200, false); diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 66ac68bd95..7818d6a98e 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -112,7 +112,7 @@ void ScummEngine_v6::setCursorTransparency(int a) { void ScummEngine::updateCursor() { int transColor = (_game.heversion >= 80) ? 5 : 255; -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR Graphics::PixelFormat format = _system->getScreenFormat(); CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height, _cursor.hotspotX, _cursor.hotspotY, diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 01bd0446ff..c9af022af5 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -80,7 +80,7 @@ static const PlainGameDescriptor gameDescriptions[] = { { "puttputt", "Putt-Putt Joins the Parade" }, #ifdef ENABLE_HE -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR { "arttime", "Blue's Art Time Activities" }, { "baseball2001", "Backyard Baseball 2001" }, { "Baseball2003", "Backyard Baseball 2003" }, @@ -502,7 +502,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "puttputt", "Putt-Putt", kGenHEMacNoParens, UNK_LANG, Common::kPlatformMacintosh, 0 }, #ifdef ENABLE_HE -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR { "arttime", "arttime", kGenHEPC, UNK_LANG, UNK, 0 }, { "arttime", "Blues-ArtTime", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "arttime", "artdemo", kGenHEPC, UNK_LANG, UNK, 0 }, diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 1beda85456..9f3ebb8053 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1100,7 +1100,7 @@ Common::Error ScummEngine::init() { // there is no text surface for them. This takes that into account (_screenWidth * _textSurfaceMultiplier > 320)); } else if (_game.features & GF_16BIT_COLOR) { -#ifdef ENABLE_RGB_COLOR +#ifdef USE_RGB_COLOR Graphics::PixelFormat format = Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); initGraphics(_screenWidth, _screenHeight, _screenWidth > 320, &format); if (format != _system->getScreenFormat()) -- cgit v1.2.3 From 6b21f1c9327170c86d839ee5160a9eaeec7d82ef Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 21 Aug 2009 19:48:48 +0000 Subject: Fix detection of some later SCI32 games (RESMAP.001) and some cleanup. svn-id: r43608 --- engines/sci/resource.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 049abe8202..e07b904324 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -356,6 +356,8 @@ int ResourceManager::addAppropriateSources() { #ifdef ENABLE_SCI32 else if (Common::File::exists("RESMAP.000")) map = addExternalMap("RESMAP.000"); + else if (Common::File::exists("RESMAP.001")) + map = addExternalMap("RESMAP.001"); #endif else return 0; @@ -746,14 +748,11 @@ ResourceManager::ResVersion ResourceManager::detectMapVersion() { while (!fileStream->eos()) { directoryType = fileStream->readByte(); directoryOffset = fileStream->readUint16LE(); - + // Only SCI32 has directory type < 0x80 - if (directoryType < 0x80 && mapDetected != kResVersionUnknown && mapDetected != kResVersionSci32) + if (directoryType < 0x80 && (mapDetected == kResVersionUnknown || mapDetected == kResVersionSci32)) mapDetected = kResVersionSci32; - else - break; - - if (directoryType > 0xA0 && directoryType != 0xFF) + else if ((directoryType < 0x80) || (directoryType > 0xA0 && directoryType != 0xFF)) break; // Offset is above file size? -> definitely not SCI1/SCI1.1 -- cgit v1.2.3 From edc8ffdaba5756c37aa84be5b933bc238c759ec2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 21 Aug 2009 22:25:55 +0000 Subject: Fix use of default directories in SCI detection code. So far all our detection code was based on FSNode, but since SCI seems to call engine internal code for detection which operates via File, there was the need to use File::addDefaultDirectory to have it working. The problem here is that the default directories are not reset after game detection, since the caller code assumes it's all done via FSNode. A simple change to use SearchMan, which is used internally by File, to add the default directory and removing it later on in the SCI detection code fixed the issue. Of course that is still slightly of a HACK, but it is much nicer than to rewrite engine internal code to use FSNode, just to be usable for game detection. I added a possible solution to remove the HACK as sourcecode comment. svn-id: r43613 --- engines/sci/detection.cpp | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 4b373a76f6..d41e1fa0b3 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -3130,11 +3130,17 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl if (filename.contains("resource.map") || filename.contains("resmap.000")) { // HACK: resource.map is located in the same directory as the other resource files, // therefore add the directory here, so that the game files can be opened later on - // TODO/FIXME: This should be removed, as it will cause problems with game detection: - // if we got a game A, and then try to detect another game B, adding a default - // directory here means that game A's files will be opened first. We need to rewrite - // all the functions that access game files to use FSNodes instead - Common::File::addDefaultDirectory(file->getParent().getPath()); + // We now add the parent directory temporary to our SearchMan so the engine code + // used in the detection can access all files via Common::File without any problems. + // In all branches returning from this function, we need to have a call to + // SearchMan.remove to remove it from the default directory pool again. + // + // A proper solution to remove this hack would be to have the code, which is needed + // for detection, to operate on Stream objects, so they can be easily called from + // the detection code. This might be easily to achieve through refactoring the + // code needed for detection. + assert(!SearchMan.hasArchive("SCI_detection")); + SearchMan.addDirectory("SCI_detection", file->getParent()); foundResMap = true; } @@ -3165,8 +3171,10 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl } // If these files aren't found, it can't be SCI - if (!foundResMap && !foundRes000) + if (!foundResMap && !foundRes000) { + SearchMan.remove("SCI_detection"); return 0; + } // Set some defaults s_fallbackDesc.desc.extra = ""; @@ -3184,6 +3192,7 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl SegManager *segManager = new SegManager(resMgr, version, hasOldScriptHeader); if (!script_instantiate(resMgr, segManager, version, hasOldScriptHeader, 0)) { warning("fallbackDetect(): Could not instantiate script 0"); + SearchMan.remove("SCI_detection"); return 0; } reg_t game_obj = script_lookup_export(segManager, 0, 0); @@ -3199,6 +3208,8 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl printf("version number, from the game's executable:\n"); printf("Version: %s\n\n", exeVersionString.empty() ? "not found" : exeVersionString.c_str()); + SearchMan.remove("SCI_detection"); + return (const ADGameDescription *)&s_fallbackDesc; } -- cgit v1.2.3 From 894635e91d7bdaa4517618a957441db016b2798b Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 21 Aug 2009 22:29:28 +0000 Subject: Attempt to fix builds that use the ARM screen column clear code; add new bitdepth argument that was missing in ARM builds previously. Also fix a few warnings. Also fix the WinCE build which fails in the SDL init call with a missing bitdepth field. Untested at this point (build certainly gets further than before). Committing this seems reasonable, as it can't make it any worse :) svn-id: r43614 --- engines/scumm/gfx.cpp | 8 ++++---- engines/scumm/gfxARM.s | 39 ++++++++++++++++++++++++++++++++++++--- engines/scumm/he/sound_he.cpp | 2 +- 3 files changed, 41 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index 1802d0d39c..c6e2cd3312 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -38,7 +38,7 @@ #ifdef USE_ARM_GFX_ASM extern "C" void asmDrawStripToScreen(int height, int width, void const* text, void const* src, byte* dst, int vsPitch, int vmScreenWidth, int textSurfacePitch); -extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height); +extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height, uint8_t bitDepth); #endif /* USE_ARM_GFX_ASM */ namespace Scumm { @@ -784,8 +784,8 @@ void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid } void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h) { - uint16 *dstL1 = (uint16 *)dst; - uint16 *dstL2 = (uint16 *)(dst + dstPitch); + uint16 *dstL1 = (uint16 *)(void *)dst; + uint16 *dstL2 = (uint16 *)(void *)(dst + dstPitch); const int dstAdd = dstPitch - w; const int srcAdd = srcPitch - w; @@ -1114,7 +1114,7 @@ static void fill(byte *dst, int dstPitch, uint16 color, int w, int h, uint8 bitD #ifdef USE_ARM_GFX_ASM -#define copy8Col(A,B,C,D) asmCopy8Col(A,B,C,D) +#define copy8Col(A,B,C,D,E) asmCopy8Col(A,B,C,D,E) #else diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s index f3a1f20303..adcd4bfac5 100644 --- a/engines/scumm/gfxARM.s +++ b/engines/scumm/gfxARM.s @@ -126,9 +126,13 @@ asmCopy8Col: @ r1 = dstPitch @ r2 = src @ r3 = height - STMFD r13!,{r14} - SUB r1,r1,#4 + @ <> = bitdepth + LDR r12,[r13] + STR r14,[r13,#-4]! + CMP r12,#8 + BNE copy8Col16 + SUB r1,r1,#4 TST r3,#1 ADDNE r3,r3,#1 BNE roll2 @@ -145,4 +149,33 @@ roll2: STR r14,[r0],r1 BNE yLoop2 - LDMFD r13!,{PC} + LDR PC,[r13],#4 + +copy8Col16: + STMFD r13!,{r4-r5} + SUB r1,r1,#12 + TST r3,#1 + ADDNE r3,r3,#1 + BNE roll3 +yLoop3: + LDR r4, [r2],#4 + LDR r5, [r2],#4 + LDR r12,[r2],#4 + LDR r14,[r2],r1 + STR r4, [r0],#4 + STR r5, [r0],#4 + STR r12,[r0],#4 + STR r14,[r0],r1 +roll3: + LDR r4, [r2],#4 + LDR r5, [r2],#4 + LDR r12,[r2],#4 + LDR r14,[r2],r1 + SUBS r3,r3,#2 + STR r4, [r0],#4 + STR r5, [r0],#4 + STR r12,[r0],#4 + STR r14,[r0],r1 + BNE yLoop3 + + LDMFD r13!,{r4,r5,PC} diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index 01f29d5db9..feaf273b4e 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -645,7 +645,7 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) Audio::AudioStream *voxStream = Audio::makeADPCMStream(&stream, false, size, Audio::kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign); sound = (char *)malloc(size * 4); - size = voxStream->readBuffer((int16*)sound, size * 2); + size = voxStream->readBuffer((int16*)(void *)sound, size * 2); size *= 2; // 16bits. delete voxStream; -- cgit v1.2.3 From 71b9b5f497342000b5094f32905a8bb9b5c52bfd Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 21 Aug 2009 22:31:50 +0000 Subject: Oops. Bitdepth is 1 or 2, not 8 or 16. Could be better named perhaps? (bytedepth maybe?) svn-id: r43616 --- engines/scumm/gfxARM.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s index adcd4bfac5..caefa7175a 100644 --- a/engines/scumm/gfxARM.s +++ b/engines/scumm/gfxARM.s @@ -129,7 +129,7 @@ asmCopy8Col: @ <> = bitdepth LDR r12,[r13] STR r14,[r13,#-4]! - CMP r12,#8 + CMP r12,#1 BNE copy8Col16 SUB r1,r1,#4 -- cgit v1.2.3 From 6166c85b062f5eb365b35780c38fe6bcc91020ff Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 21 Aug 2009 22:42:51 +0000 Subject: Improved comments. svn-id: r43617 --- engines/scumm/gfxARM.s | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s index caefa7175a..24f627647a 100644 --- a/engines/scumm/gfxARM.s +++ b/engines/scumm/gfxARM.s @@ -116,7 +116,8 @@ end: @ extern "C" void asmCopy8Col(byte *dst, @ int dstPitch, @ const byte *src, - @ int height); + @ int height, + @ int bitdepth); @ @ In addition, we assume that src and dst are both word (4 byte) @ aligned. This is the same assumption that the old 'inline' version @@ -126,7 +127,7 @@ asmCopy8Col: @ r1 = dstPitch @ r2 = src @ r3 = height - @ <> = bitdepth + @ <> = bitdepth (badly named, should be bytedepth, 1 or 2) LDR r12,[r13] STR r14,[r13,#-4]! CMP r12,#1 -- cgit v1.2.3 From f9fe1cbbcc58b74ce34bf487648acb71b8fd34ab Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 21 Aug 2009 22:48:54 +0000 Subject: Improved comments. svn-id: r43619 --- engines/scumm/he/sound_he.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines') diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp index feaf273b4e..477f3cf0ad 100644 --- a/engines/scumm/he/sound_he.cpp +++ b/engines/scumm/he/sound_he.cpp @@ -645,6 +645,10 @@ void SoundHE::playHESound(int soundID, int heOffset, int heChannel, int heFlags) Audio::AudioStream *voxStream = Audio::makeADPCMStream(&stream, false, size, Audio::kADPCMMSIma, rate, (flags & Audio::Mixer::FLAG_STEREO) ? 2 : 1, blockAlign); sound = (char *)malloc(size * 4); + /* On systems where it matters, malloc will return + * even addresses, so the use of (void *) in the + * following cast shuts the compiler from warning + * unnecessarily. */ size = voxStream->readBuffer((int16*)(void *)sound, size * 2); size *= 2; // 16bits. delete voxStream; -- cgit v1.2.3 From a790e4953cb4f6e2a4ec95311eb292e7aaec62b4 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 21 Aug 2009 22:55:19 +0000 Subject: Updated comments. svn-id: r43620 --- engines/scumm/gfx.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index c6e2cd3312..ba49131ac5 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -784,6 +784,8 @@ void ditherHerc(byte *src, byte *hercbuf, int srcPitch, int *x, int *y, int *wid } void scale2x(byte *dst, int dstPitch, const byte *src, int srcPitch, int w, int h) { + /* dst and dstPitch should both be even. So the use of (void *) in + * the following casts to avoid the unnecessary warning is valid. */ uint16 *dstL1 = (uint16 *)(void *)dst; uint16 *dstL2 = (uint16 *)(void *)(dst + dstPitch); -- cgit v1.2.3 From 68fed4c62aae3becba7e723a28850004d8704094 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Fri, 21 Aug 2009 22:56:09 +0000 Subject: type fix svn-id: r43621 --- engines/scumm/gfx.cpp | 2 +- engines/scumm/gfxARM.s | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index ba49131ac5..fd298c2980 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -38,7 +38,7 @@ #ifdef USE_ARM_GFX_ASM extern "C" void asmDrawStripToScreen(int height, int width, void const* text, void const* src, byte* dst, int vsPitch, int vmScreenWidth, int textSurfacePitch); -extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height, uint8_t bitDepth); +extern "C" void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height, uint8 bitDepth); #endif /* USE_ARM_GFX_ASM */ namespace Scumm { diff --git a/engines/scumm/gfxARM.s b/engines/scumm/gfxARM.s index 24f627647a..e78487d777 100644 --- a/engines/scumm/gfxARM.s +++ b/engines/scumm/gfxARM.s @@ -117,7 +117,7 @@ end: @ int dstPitch, @ const byte *src, @ int height, - @ int bitdepth); + @ uint8 bitdepth); @ @ In addition, we assume that src and dst are both word (4 byte) @ aligned. This is the same assumption that the old 'inline' version -- cgit v1.2.3 From fd88dbacd7d5456a242accd2a31e46d9d8af0dc3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 22 Aug 2009 00:18:22 +0000 Subject: Properly uninitialize timer used in AgiEngine. svn-id: r43623 --- engines/agi/agi.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines') diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index 69b27e10f9..746636d031 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -652,6 +652,8 @@ void AgiEngine::initialize() { } AgiEngine::~AgiEngine() { + _timer->removeTimerProc(agiTimerFunctionLow); + // If the engine hasn't been initialized yet via AgiEngine::initialize(), don't attempt to free any resources, // as they haven't been allocated. Fixes bug #1742432 - AGI: Engine crashes if no game is detected if (_game.state == STATE_INIT) { -- cgit v1.2.3 From 7cb03ffa3e8cbf47631afe42e01a1a577afc22ef Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 22 Aug 2009 00:27:01 +0000 Subject: Exclude 16bit specific code, when 16bit support is disabled. svn-id: r43625 --- engines/scumm/he/wiz_he.cpp | 58 ++++++++++++++++++++++++++++++--------------- engines/scumm/he/wiz_he.h | 6 +++++ 2 files changed, 45 insertions(+), 19 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index b00294cb96..91ce9182cd 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -369,6 +369,7 @@ void Wiz::writeColor(uint8 *dstPtr, int dstType, uint16 color) { } } +#ifdef USE_RGB_COLOR void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *xmapPtr) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { @@ -388,6 +389,7 @@ void Wiz::copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstT } } } +#endif void Wiz::copyWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) { Common::Rect r1, r2; @@ -445,6 +447,7 @@ static void decodeWizMask(uint8 *&dst, uint8 &mask, int w, int maskType) { } } +#ifdef USE_RGB_COLOR void Wiz::copyMaskWizImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr) { Common::Rect srcRect, dstRect; if (!calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, srcRect, dstRect)) { @@ -531,6 +534,7 @@ void Wiz::copyMaskWizImage(uint8 *dst, const uint8 *src, const uint8 *mask, int maskPtr = maskPtrNext; } } +#endif void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP) { Common::Rect srcRect, dstRect; @@ -621,7 +625,8 @@ void Wiz::copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int d } } -void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitDepth) { +#ifdef USE_RGB_COLOR +void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, int transColor) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { if (flags & kWIFFlipX) { @@ -638,17 +643,23 @@ void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstTyp } int h = r1.height(); int w = r1.width(); - src += r1.top * srcw + r1.left; - dst += r2.top * dstPitch + r2.left * bitDepth; - if (palPtr) { - decompressRawWizImage(dst, dstPitch, dstType, src, srcw, w, h, transColor, palPtr, bitDepth); - } else { - decompressRawWizImage(dst, dstPitch, dstType, src, srcw, w, h, transColor, NULL, bitDepth); + src += (r1.top * srcw + r1.left) * 2; + dst += r2.top * dstPitch + r2.left * 2; + while (h--) { + for (int i = 0; i < w; ++ i) { + uint16 col = READ_LE_UINT16(src + 2 * i); + if (transColor == -1 || transColor != col) { + writeColor(dst + i * 2, dstType, col); + } + } + src += srcw * 2; + dst += dstPitch; } } } +#endif -void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, int transColor) { +void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitDepth) { Common::Rect r1, r2; if (calcClipRects(dstw, dsth, srcx, srcy, srcw, srch, rect, r1, r2)) { if (flags & kWIFFlipX) { @@ -665,21 +676,17 @@ void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int d } int h = r1.height(); int w = r1.width(); - src += (r1.top * srcw + r1.left) * 2; - dst += r2.top * dstPitch + r2.left * 2; - while (h--) { - for (int i = 0; i < w; ++ i) { - uint16 col = READ_LE_UINT16(src + 2 * i); - if (transColor == -1 || transColor != col) { - writeColor(dst + i * 2, dstType, col); - } - } - src += srcw * 2; - dst += dstPitch; + src += r1.top * srcw + r1.left; + dst += r2.top * dstPitch + r2.left * bitDepth; + if (palPtr) { + decompressRawWizImage(dst, dstPitch, dstType, src, srcw, w, h, transColor, palPtr, bitDepth); + } else { + decompressRawWizImage(dst, dstPitch, dstType, src, srcw, w, h, transColor, NULL, bitDepth); } } } +#ifdef USE_RGB_COLOR template void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *xmapPtr) { uint16 col = READ_LE_UINT16(dataPtr); @@ -795,6 +802,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const u dstPtr = dstPtrNext; } } +#endif template void Wiz::write8BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) { @@ -1149,6 +1157,7 @@ void Wiz::computeRawWizHistogram(uint32 *histogram, const uint8 *data, int srcPi } } +#ifdef USE_RGB_COLOR static int wizPackType2(uint8 *dst, const uint8 *src, int srcPitch, const Common::Rect& rCapt) { debug(9, "wizPackType2([%d,%d,%d,%d])", rCapt.left, rCapt.top, rCapt.right, rCapt.bottom); int w = rCapt.width(); @@ -1165,6 +1174,7 @@ static int wizPackType2(uint8 *dst, const uint8 *src, int srcPitch, const Common } return size; } +#endif static int wizPackType1(uint8 *dst, const uint8 *src, int srcPitch, const Common::Rect& rCapt, uint8 transColor) { debug(9, "wizPackType1(%d, [%d,%d,%d,%d])", transColor, rCapt.left, rCapt.top, rCapt.right, rCapt.bottom); @@ -1341,9 +1351,11 @@ void Wiz::captureImage(uint8 *src, int srcPitch, int srcw, int srch, int resNum, case 1: dataSize = wizPackType1(0, src, srcPitch, rCapt, transColor); break; +#ifdef USE_RGB_COLOR case 2: dataSize = wizPackType2(0, src, srcPitch, rCapt); break; +#endif default: error("unhandled compression type %d", compType); break; @@ -1387,9 +1399,11 @@ void Wiz::captureImage(uint8 *src, int srcPitch, int srcw, int srch, int resNum, case 1: wizPackType1(wizImg + headerSize, src, srcPitch, rCapt, transColor); break; +#ifdef USE_RGB_COLOR case 2: wizPackType2(wizImg + headerSize, src, srcPitch, rCapt); break; +#endif default: break; } @@ -1566,6 +1580,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int copyWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, xmapPtr, _vm->_bitDepth); } break; +#ifdef USE_RGB_COLOR case 2: if (maskNum) { copyMaskWizImage(dst, wizd, mask, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr); @@ -1579,6 +1594,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int case 5: copy16BitWizImage(dst, wizd, dstPitch, dstType, cw, ch, x1, y1, width, height, &rScreen, flags, xmapPtr); break; +#endif default: error("drawWizImage: Unhandled wiz compression type %d", comp); } @@ -2582,6 +2598,7 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags case 1: ret = isWizPixelNonTransparent(wizd, x, y, w, h, 1); break; +#ifdef USE_RGB_COLOR case 2: ret = getRawWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)) != _vm->VAR(_vm->VAR_WIZ_TCOLOR) ? 1 : 0; break; @@ -2593,6 +2610,7 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags case 5: ret = isWizPixelNonTransparent(wizd, x, y, w, h, 2); break; +#endif default: error("isWizPixelNonTransparent: Unhandled wiz compression type %d", c); break; @@ -2623,6 +2641,7 @@ uint16 Wiz::getWizPixelColor(int resNum, int state, int x, int y) { case 1: color = getWizPixelColor(wizd, x, y, w, h, 1, _vm->VAR(_vm->VAR_WIZ_TCOLOR)); break; +#ifdef USE_RGB_COLOR case 2: color = getRawWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)); break; @@ -2633,6 +2652,7 @@ uint16 Wiz::getWizPixelColor(int resNum, int state, int x, int y) { case 5: color = getWizPixelColor(wizd, x, y, w, h, 2, _vm->VAR(_vm->VAR_WIZ_TCOLOR)); break; +#endif default: error("getWizPixelColor: Unhandled wiz compression type %d", c); break; diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index d8f984f710..a212ac4d29 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -209,19 +209,25 @@ public: void drawWizPolygonTransform(int resNum, int state, Common::Point *wp, int flags, int shadow, int dstResNum, int palette); void drawWizPolygonImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstpitch, int dstType, int dstw, int dsth, int wizW, int wizH, Common::Rect &bound, Common::Point *wp, uint8 bitDepth); +#ifdef USE_RGB_COLOR static void copyMaskWizImage(uint8 *dst, const uint8 *src, const uint8 *mask, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr); +#endif static void copyAuxImage(uint8 *dst1, uint8 *dst2, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, uint8 bitdepth); static void copyWizImageWithMask(uint8 *dst, const uint8 *src, int dstPitch, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int maskT, int maskP); static void copyWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth); static void copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor, uint8 bitdepth); +#ifdef USE_RGB_COLOR static void copy16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *xmapPtr); static void copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstType, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, int transColor); template static void decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr = NULL); +#endif template static void decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitdepth); template static void decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitdepth); +#ifdef USE_RGB_COLOR template static void write16BitColor(uint8 *dst, const uint8 *src, int dstType, const uint8 *xmapPtr); +#endif template static void write8BitColor(uint8 *dst, const uint8 *src, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth); static void writeColor(uint8 *dstPtr, int dstType, uint16 color); -- cgit v1.2.3 From 3c9d22aa95d71ac88bb2a71dc87887d422f55277 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 22 Aug 2009 01:53:25 +0000 Subject: Correct errors in load/save code for PC version of Waxworks. svn-id: r43628 --- engines/agos/saveload.cpp | 46 ++++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) (limited to 'engines') diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index 8a54151f91..8470203640 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -1252,23 +1252,38 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) { if (_roomsListPtr) { byte *p = _roomsListPtr; - for (;;) { - uint16 minNum = READ_BE_UINT16(p); p += 2; - if (minNum == 0) - break; - - uint16 maxNum = READ_BE_UINT16(p); p += 2; + if (room == _currentRoom) { + for (;;) { + uint16 minNum = READ_BE_UINT16(p); p += 2; + if (minNum == 0) + break; + + uint16 maxNum = READ_BE_UINT16(p); p += 2; + + for (uint16 z = minNum; z <= maxNum; z++) { + uint16 itemNum = z + 2; + Item *item = derefItem(itemNum); + + num = (itemNum - _itemArrayInited); + _roomStates[num].state = item->state; + _roomStates[num].classFlags = item->classFlags; + SubRoom *subRoom = (SubRoom *)findChildOfType(item, kRoomType); + _roomStates[num].roomExitStates = subRoom->roomExitStates; + } + } + } else { + for (;;) { + uint16 minNum = READ_BE_UINT16(p); p += 2; + if (minNum == 0) + break; - for (uint16 z = minNum; z <= maxNum; z++) { - uint16 itemNum = z + 2; - Item *item = derefItem(itemNum); - item->parent = 0; + uint16 maxNum = READ_BE_UINT16(p); p += 2; - num = (itemNum - _itemArrayInited); - item->state = _roomStates[num].state; - item->classFlags = _roomStates[num].classFlags; - SubRoom *subRoom = (SubRoom *)findChildOfType(item, kRoomType); - subRoom->roomExitStates = _roomStates[num].roomExitStates; + for (uint16 z = minNum; z <= maxNum; z++) { + uint16 itemNum = z + 2; + Item *item = derefItem(itemNum); + item->parent = 0; + } } } } @@ -1439,7 +1454,6 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) { for (uint16 z = minNum; z <= maxNum; z++) { uint16 itemNum = z + 2; Item *item = derefItem(itemNum); - item->parent = 0; uint16 num = (itemNum - _itemArrayInited); _roomStates[num].state = item->state; -- cgit v1.2.3 From 66d8adef9f875be8fc82e2fd305cbadc22ed02a6 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 22 Aug 2009 07:18:15 +0000 Subject: Backyard Soccer MLS requires 16bit color support too. svn-id: r43630 --- engines/scumm/detection_tables.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'engines') diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index c9af022af5..e81779bdd3 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -91,6 +91,7 @@ static const PlainGameDescriptor gameDescriptions[] = { { "pjgames", "Pajama Sam: Games to Play On Any Day" }, { "readtime", "Blue's Reading Time Activities" }, { "Soccer2004", "Backyard Soccer 2004" }, + { "SoccerMLS", "Backyard Soccer MLS Edition" }, #endif { "airport", "Let's Explore the Airport with Buzzy" }, { "balloon", "Putt-Putt and Pep's Balloon-O-Rama" }, @@ -123,7 +124,6 @@ static const PlainGameDescriptor gameDescriptions[] = { { "puttzoo", "Putt-Putt Saves the Zoo" }, { "SamsFunShop", "Pajama Sam's One-Stop Fun Shop" }, { "soccer", "Backyard Soccer" }, - { "SoccerMLS", "Backyard Soccer MLS Edition" }, { "socks", "Pajama Sam's Sock Works" }, { "spyfox", "SPY Fox 1: Dry Cereal" }, { "spyfox2", "SPY Fox 2: Some Assembly Required" }, @@ -345,8 +345,14 @@ static const GameSettings gameVariantsTable[] = { {"SamsFunShop", 0, 0, GID_FUNSHOP, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED, UNK, GUIO_NOMIDI}, {"PuttsFunShop", 0, 0, GID_FUNSHOP, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED, UNK, GUIO_NOMIDI}, + // Added the use of smacker videos + {"BluesTreasureHunt", 0, 0, GID_TREASUREHUNT, 6, 99, MDT_NONE, GF_HE_LOCALIZED | GF_USE_KEY, UNK, GUIO_NOMIDI}, + +#ifdef USE_RGB_COLOR // Added 16bit color + {"arttime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, {"baseball2001", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, + {"readtime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, {"SoccerMLS", 0, 0, GID_SOCCER, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, {"spyozon", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, @@ -357,12 +363,7 @@ static const GameSettings gameVariantsTable[] = { // Restructured the Scumm engine {"pjgames", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, - // Uses smacker in external files, for testing only - {"arttime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, - {"readtime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, - {"BluesTreasureHunt", 0, 0, GID_TREASUREHUNT, 6, 99, MDT_NONE, GF_HE_LOCALIZED | GF_USE_KEY, UNK, GUIO_NOMIDI}, - - // Uses bink in external files for logos + // Added the use of bink videos {"Baseball2003", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, {"basketball", 0, 0, GID_BASKETBALL, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, {"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, @@ -371,6 +372,7 @@ static const GameSettings gameVariantsTable[] = { // U32 code required, for testing only {"moonbase", 0, 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK, GUIO_NOMIDI}, {"moonbase", "Demo", 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR | GF_DEMO, UNK, GUIO_NOMIDI}, +#endif // The following are meant to be generic HE game variants and as such do // not specify a game ID. Make sure that these are last in the table, else @@ -549,6 +551,9 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "Soccer2004", "Soccer2004", kGenHEPC, UNK_LANG, UNK, 0 }, { "Soccer2004", "Soccer 2004", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "SoccerMLS", "SoccerMLS", kGenHEPC, UNK_LANG, UNK, 0 }, + { "SoccerMLS", "Backyard Soccer MLS", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "spyozon", "spyozon", kGenHEPC, UNK_LANG, UNK, 0 }, { "spyozon", "sf3-demo", kGenHEPC, UNK_LANG, UNK, 0 }, { "spyozon", "SF3Demo", kGenHEPC, Common::FR_FRA, UNK, 0 }, @@ -817,9 +822,6 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "soccer", "soccer", kGenHEPC, UNK_LANG, UNK, 0 }, { "soccer", "Soccer", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "SoccerMLS", "SoccerMLS", kGenHEPC, UNK_LANG, UNK, 0 }, - { "SoccerMLS", "Backyard Soccer MLS", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "socks", "socks", kGenHEPC, UNK_LANG, UNK, 0 }, { "socks", "SockWorks", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "socks", "SokkenSoep", kGenHEPC, Common::NL_NLD, UNK, 0 }, -- cgit v1.2.3 From 6c6ae69f3dab59fc8be948463367c615f9acd7e2 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 22 Aug 2009 09:22:23 +0000 Subject: Fixed cursor transparency for 16bit HE games on big endian architectures svn-id: r43632 --- engines/scumm/he/wiz_he.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 91ce9182cd..5280dc097f 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -1504,7 +1504,7 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int uint8 *tmpPtr = dst; for (uint i = 0; i < height; i++) { for (uint j = 0; j < width; j++) - WRITE_LE_UINT16(tmpPtr + j * 2, transColor); + WRITE_UINT16(tmpPtr + j * 2, transColor); tmpPtr += width * 2; } } else { @@ -1750,7 +1750,7 @@ void Wiz::captureWizPolygon(int resNum, int maskNum, int maskState, int id1, int uint8 *tmpPtr = imageBuffer; for (i = 0; i < dsth; i++) { for (j = 0; j < dstw; j++) - WRITE_LE_UINT16(tmpPtr + j * 2, transColor); + WRITE_UINT16(tmpPtr + j * 2, transColor); tmpPtr += dstpitch; } } else { @@ -1967,7 +1967,7 @@ void Wiz::drawWizPolygonImage(uint8 *dst, const uint8 *src, const uint8 *mask, i y_acc += pra->y_step; if (bitDepth == 2) { if (transColor == -1 || transColor != READ_LE_UINT16(src + src_offs * 2)) { - //if (transColor == -1 || READ_LE_UINT16(dstPtr) != transColor) + //if (transColor == -1 || READ_UINT16(dstPtr) != transColor) writeColor(dstPtr, dstType, READ_LE_UINT16(src + src_offs * 2)); } } else { -- cgit v1.2.3 From bed502a7c70c122a097d8f9ad7ca2330e69bdccb Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 22 Aug 2009 09:39:55 +0000 Subject: Fix endian issue in copyFrameToBuffer(). svn-id: r43633 --- engines/scumm/he/animation_he.cpp | 21 +++++++++++++++------ engines/scumm/he/animation_he.h | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/animation_he.cpp b/engines/scumm/he/animation_he.cpp index 47b25c57d1..cf071fc4aa 100644 --- a/engines/scumm/he/animation_he.cpp +++ b/engines/scumm/he/animation_he.cpp @@ -66,7 +66,7 @@ int MoviePlayer::load(const char *filename, int flags, int image) { return 0; } -void MoviePlayer::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { +void MoviePlayer::copyFrameToBuffer(byte *dst, int dstType, uint x, uint y, uint pitch) { uint h = getHeight(); uint w = getWidth(); @@ -76,8 +76,17 @@ void MoviePlayer::copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch) { dst += y * pitch + x * 2; do { for (uint i = 0; i < w; i++) { - uint16 col = READ_LE_UINT16(_vm->_hePalettes + _vm->_hePaletteSlot + 768 + src[i] * 2); - WRITE_UINT16(dst + i * 2, col); + uint16 color = READ_LE_UINT16(_vm->_hePalettes + _vm->_hePaletteSlot + 768 + src[i] * 2); + switch (dstType) { + case kDstScreen: + WRITE_UINT16(dst + i * 2, color); + break; + case kDstResource: + WRITE_LE_UINT16(dst + i * 2, color); + break; + default: + error("copyFrameToBuffer: Unknown dstType %d", dstType); + } } dst += pitch; src += w; @@ -106,14 +115,14 @@ void MoviePlayer::handleNextFrame() { assert(dstPtr); uint8 *dst = _vm->findWrappedBlock(MKID_BE('WIZD'), dstPtr, 0, 0); assert(dst); - copyFrameToBuffer(dst, 0, 0, _vm->_screenWidth * _vm->_bitDepth); + copyFrameToBuffer(dst, kDstResource, 0, 0, _vm->_screenWidth * _vm->_bitDepth); } else if (_flags & 1) { - copyFrameToBuffer(pvs->getBackPixels(0, 0), 0, 0, pvs->pitch); + copyFrameToBuffer(pvs->getBackPixels(0, 0), kDstScreen, 0, 0, pvs->pitch); Common::Rect imageRect(getWidth(), getHeight()); _vm->restoreBackgroundHE(imageRect); } else { - copyFrameToBuffer(pvs->getPixels(0, 0), 0, 0, pvs->pitch); + copyFrameToBuffer(pvs->getPixels(0, 0), kDstScreen, 0, 0, pvs->pitch); Common::Rect imageRect(getWidth(), getHeight()); _vm->markRectAsDirty(kMainVirtScreen, imageRect); diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h index 0adba35d53..86ded31940 100644 --- a/engines/scumm/he/animation_he.h +++ b/engines/scumm/he/animation_he.h @@ -54,7 +54,7 @@ public: int getImageNum(); int load(const char *filename, int flags, int image = 0); - void copyFrameToBuffer(byte *dst, uint x, uint y, uint pitch); + void copyFrameToBuffer(byte *dst, int dstType, uint x, uint y, uint pitch); void handleNextFrame(); protected: -- cgit v1.2.3 From 401e54825f986b8287acd3f9b2d8002327ccef27 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 22 Aug 2009 13:11:30 +0000 Subject: Hooking up the v2 spriteUncompressor into the v6 one svn-id: r43642 --- engines/gob/video_v2.cpp | 49 +++++++++++++++++++++++++++++------------------- engines/gob/video_v6.cpp | 19 +++++++++++++++++-- 2 files changed, 47 insertions(+), 21 deletions(-) (limited to 'engines') diff --git a/engines/gob/video_v2.cpp b/engines/gob/video_v2.cpp index b526b63a37..98cf4a5d4f 100644 --- a/engines/gob/video_v2.cpp +++ b/engines/gob/video_v2.cpp @@ -64,12 +64,15 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, memBuffer = new byte[4370]; assert(memBuffer); + memset(memBuffer, 0, 4370); + srcPtr = sprBuf + 3; + sourceLeft = READ_LE_UINT32(srcPtr); destPtr = destDesc.getVidMem() + destDesc.getWidth() * y + x; - curWidth = 0; + curWidth = 0; curHeight = 0; linePtr = destPtr; @@ -89,58 +92,64 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, cmdVar = 0; while (1) { cmdVar >>= 1; - if ((cmdVar & 0x100) == 0) { - cmdVar = *srcPtr | 0xFF00; - srcPtr++; - } + if ((cmdVar & 0x100) == 0) + cmdVar = *srcPtr++ | 0xFF00; + if ((cmdVar & 1) != 0) { temp = *srcPtr++; + if ((temp != 0) || (transp == 0)) *destPtr = temp; + destPtr++; curWidth++; + if (curWidth >= srcWidth) { curWidth = 0; linePtr += destDesc.getWidth(); destPtr = linePtr; - curHeight++; - if (curHeight >= srcHeight) + if (++curHeight >= srcHeight) break; } - sourceLeft--; + memBuffer[bufPos] = temp; - bufPos++; - bufPos %= 4096; - if (sourceLeft == 0) + + bufPos = (bufPos + 1) % 4096; + + if (--sourceLeft == 0) break; + } else { offset = *srcPtr++; - offset |= (*srcPtr & 0xF0) << 4; - strLen = (*srcPtr & 0x0F) + 3; - *srcPtr++; + temp = *srcPtr++; + + offset |= (temp & 0xF0) << 4; + strLen = (temp & 0x0F) + 3; + if (strLen == lenCmd) strLen = *srcPtr++ + 18; for (counter2 = 0; counter2 < strLen; counter2++) { temp = memBuffer[(offset + counter2) % 4096]; + if ((temp != 0) || (transp == 0)) *destPtr = temp; - destPtr++; + destPtr++; curWidth++; + if (curWidth >= srcWidth) { curWidth = 0; linePtr += destDesc.getWidth(); destPtr = linePtr; - curHeight++; - if (curHeight >= srcHeight) { + if (++curHeight >= srcHeight) { delete[] memBuffer; return 1; } } + memBuffer[bufPos] = temp; - bufPos++; - bufPos %= 4096; + bufPos = (bufPos + 1) % 4096; } if (strLen >= ((int32) sourceLeft)) { @@ -148,7 +157,9 @@ char Video_v2::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, return 1; } else sourceLeft--; + } + } } else return 0; diff --git a/engines/gob/video_v6.cpp b/engines/gob/video_v6.cpp index c51b027bad..6f39edb588 100644 --- a/engines/gob/video_v6.cpp +++ b/engines/gob/video_v6.cpp @@ -84,8 +84,23 @@ char Video_v6::spriteUncompressor(byte *sprBuf, int16 srcWidth, int16 srcHeight, return 1; } - warning("Urban Stub: spriteUncompressor(), sprBuf[0,1] = %d,%d", - sprBuf[0], sprBuf[1]); + if (srcWidth & 0xC000) { + warning("Playtoons Stub: srcWidth & 0xC000 == %04X", srcWidth & 0xC000); + srcWidth &= 0x3FFF; + } + + if ((sprBuf[0] == 1) && (sprBuf[1] == 2)) { + if (Video_v2::spriteUncompressor(sprBuf, srcWidth, srcHeight, x, y, transp, destDesc)) + return 1; + + _vm->validateVideoMode(destDesc._vidMode); + + _videoDriver->drawPackedSprite(sprBuf, srcWidth, srcHeight, x, y, transp, destDesc); + return 1; + } + + warning("Urban Stub: spriteUncompressor(), sprBuf[0,1,2] = %d,%d,%d", + sprBuf[0], sprBuf[1], sprBuf[2]); return 1; } -- cgit v1.2.3 From 811cea60e76f39434e00c07d5b02ed920c16c191 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 22 Aug 2009 13:14:46 +0000 Subject: Correct game title. svn-id: r43645 --- engines/scumm/detection_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index e81779bdd3..57fe251e05 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -88,7 +88,7 @@ static const PlainGameDescriptor gameDescriptions[] = { { "football2002", "Backyard Football 2002" }, { "freddicove", "Freddi Fish 5: The Case of the Creature of Coral Cave" }, { "moonbase", "Moonbase Commander" }, - { "pjgames", "Pajama Sam: Games to Play On Any Day" }, + { "pjgames", "Pajama Sam: Games to Play on Any Day" }, { "readtime", "Blue's Reading Time Activities" }, { "Soccer2004", "Backyard Soccer 2004" }, { "SoccerMLS", "Backyard Soccer MLS Edition" }, -- cgit v1.2.3 From ee0e1bfceac7eb626737f321e851ef0cdcea08d3 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 22 Aug 2009 13:32:56 +0000 Subject: Fix endian regression, when clearing the buffer of non-cursor images. svn-id: r43649 --- engines/scumm/he/wiz_he.cpp | 15 +++++++++++---- engines/scumm/he/wiz_he.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index 5280dc097f..9ddc1ea22f 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -40,6 +40,7 @@ Wiz::Wiz(ScummEngine_v71he *vm) : _vm(vm) { _imagesNum = 0; memset(&_images, 0, sizeof(_images)); memset(&_polygons, 0, sizeof(_polygons)); + _cursorImage = false; _rectOverrideEnabled = false; } @@ -1503,8 +1504,13 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int maskNum, int maskState, int if (_vm->_bitDepth == 2) { uint8 *tmpPtr = dst; for (uint i = 0; i < height; i++) { - for (uint j = 0; j < width; j++) - WRITE_UINT16(tmpPtr + j * 2, transColor); + for (uint j = 0; j < width; j++) { + if (_cursorImage) { + WRITE_UINT16(tmpPtr + j * 2, transColor); + } else { + WRITE_LE_UINT16(tmpPtr + j * 2, transColor); + } + } tmpPtr += width * 2; } } else { @@ -1967,8 +1973,7 @@ void Wiz::drawWizPolygonImage(uint8 *dst, const uint8 *src, const uint8 *mask, i y_acc += pra->y_step; if (bitDepth == 2) { if (transColor == -1 || transColor != READ_LE_UINT16(src + src_offs * 2)) { - //if (transColor == -1 || READ_UINT16(dstPtr) != transColor) - writeColor(dstPtr, dstType, READ_LE_UINT16(src + src_offs * 2)); + writeColor(dstPtr, dstType, READ_LE_UINT16(src + src_offs * 2)); } } else { if (transColor == -1 || transColor != src[src_offs]) @@ -2012,7 +2017,9 @@ void Wiz::loadWizCursor(int resId, int palette) { } const Common::Rect *r = NULL; + _cursorImage = true; uint8 *cursor = drawWizImage(resId, 0, 0, 0, 0, 0, 0, 0, 0, r, kWIFBlitToMemBuffer, 0, _vm->getHEPaletteSlot(palette)); + _cursorImage = false; int32 cw, ch; getWizImageDim(resId, 0, cw, ch); diff --git a/engines/scumm/he/wiz_he.h b/engines/scumm/he/wiz_he.h index a212ac4d29..1fa9564486 100644 --- a/engines/scumm/he/wiz_he.h +++ b/engines/scumm/he/wiz_he.h @@ -165,6 +165,7 @@ public: void clearWizBuffer(); Common::Rect _rectOverride; + bool _cursorImage; bool _rectOverrideEnabled; void polygonClear(); -- cgit v1.2.3 From c70a8745068095227cac1db6054d55db0a0405ad Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 22 Aug 2009 15:46:43 +0000 Subject: Properly fixing the Lost in Time temp sprite issue svn-id: r43654 --- engines/gob/save/savehandler.cpp | 12 ++++++++++++ engines/gob/save/savehandler.h | 2 ++ engines/gob/save/saveload.h | 1 + engines/gob/save/saveload_v3.cpp | 7 +++++-- 4 files changed, 20 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/gob/save/savehandler.cpp b/engines/gob/save/savehandler.cpp index 4e2c09bdca..5f24115a6c 100644 --- a/engines/gob/save/savehandler.cpp +++ b/engines/gob/save/savehandler.cpp @@ -229,6 +229,9 @@ int32 TempSpriteHandler::getSize() { } bool TempSpriteHandler::load(int16 dataVar, int32 size, int32 offset) { + if (isDummy(size)) + return true; + // Sprite available? if (!_sprite) return false; @@ -274,6 +277,9 @@ bool TempSpriteHandler::load(int16 dataVar, int32 size, int32 offset) { bool TempSpriteHandler::save(int16 dataVar, int32 size, int32 offset) { SurfaceDescPtr sprite; + if (isDummy(size)) + return true; + if (!createSprite(dataVar, size, offset, &sprite)) return false; @@ -320,6 +326,12 @@ bool TempSpriteHandler::createSprite(int16 dataVar, int32 size, return true; } +// A size of 0 means no proper sprite should be saved/loaded, +// but no error should be thrown either. +bool TempSpriteHandler::isDummy(int32 size) { + return (size == 0); +} + // A negative size is the flag for using a sprite bool TempSpriteHandler::isSprite(int32 size) { return (size < 0); diff --git a/engines/gob/save/savehandler.h b/engines/gob/save/savehandler.h index 55505d1b9a..6a7e563a8f 100644 --- a/engines/gob/save/savehandler.h +++ b/engines/gob/save/savehandler.h @@ -144,6 +144,8 @@ public: protected: SavePartSprite *_sprite; + /** Determine whether it's a dummy sprite save/load. */ + static bool isDummy(int32 size); /** Determine whether using a sprite was requested. */ static bool isSprite(int32 size); /** Determine which sprite is meant. */ diff --git a/engines/gob/save/saveload.h b/engines/gob/save/saveload.h index 8a7d493aed..8e1240daf1 100644 --- a/engines/gob/save/saveload.h +++ b/engines/gob/save/saveload.h @@ -256,6 +256,7 @@ protected: GameHandler *_gameHandler; NotesHandler *_notesHandler; + TempSpriteHandler *_tempSpriteHandler; ScreenshotHandler *_screenshotHandler; SaveHandler *getHandler(const char *fileName) const; diff --git a/engines/gob/save/saveload_v3.cpp b/engines/gob/save/saveload_v3.cpp index 064d472323..bb60f94725 100644 --- a/engines/gob/save/saveload_v3.cpp +++ b/engines/gob/save/saveload_v3.cpp @@ -33,8 +33,8 @@ namespace Gob { SaveLoad_v3::SaveFile SaveLoad_v3::_saveFiles[] = { { "cat.inf", kSaveModeSave , 0, "savegame"}, { "ima.inf", kSaveModeSave , 0, "screenshot"}, + { "intro.$$$", kSaveModeSave , 0, "temporary sprite"}, { "bloc.inf", kSaveModeSave , 0, "notes"}, - { "intro.$$$", kSaveModeIgnore, 0, "temporary sprite"}, { "prot", kSaveModeIgnore, 0, 0}, { "config", kSaveModeIgnore, 0, 0} }; @@ -496,17 +496,20 @@ SaveLoad_v3::SaveLoad_v3(GobEngine *vm, const char *targetName, ScreenshotType s _screenshotHandler = new ScreenshotHandler(vm, _gameHandler, sShotType); } + _tempSpriteHandler = new TempSpriteHandler(vm); _notesHandler = new NotesHandler(2560, vm, targetName); _saveFiles[0].handler = _gameHandler; _saveFiles[1].handler = _screenshotHandler; - _saveFiles[2].handler = _notesHandler; + _saveFiles[2].handler = _tempSpriteHandler; + _saveFiles[3].handler = _notesHandler; } SaveLoad_v3::~SaveLoad_v3() { delete _screenshotHandler; delete _gameHandler; delete _notesHandler; + delete _tempSpriteHandler; } const SaveLoad_v3::SaveFile *SaveLoad_v3::getSaveFile(const char *fileName) const { -- cgit v1.2.3 From 40f1deae3ae607dcb8c0bdc63dbec180e60a2b05 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 23 Aug 2009 09:57:47 +0000 Subject: Properly initialize _autoDouble, fixing demos that don't set a video mode on their own (like the Inca II (bat)demo) svn-id: r43665 --- engines/gob/demos/demoplayer.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/gob/demos/demoplayer.cpp b/engines/gob/demos/demoplayer.cpp index 13b7aa5327..bb56633525 100644 --- a/engines/gob/demos/demoplayer.cpp +++ b/engines/gob/demos/demoplayer.cpp @@ -56,6 +56,7 @@ DemoPlayer::Script DemoPlayer::_scripts[] = { }; DemoPlayer::DemoPlayer(GobEngine *vm) : _vm(vm) { + _autoDouble = false; _doubleMode = false; _rebase0 = false; } -- cgit v1.2.3 From 4ff0c2619b87658c762eac19afe85ac01530c5c1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 23 Aug 2009 14:51:04 +0000 Subject: Fix Moonbase Commander startup. svn-id: r43670 --- engines/scumm/he/script_v100he.cpp | 1 + engines/scumm/he/script_v72he.cpp | 12 ++++++------ engines/scumm/vars.cpp | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'engines') diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 49e490a8ec..29f611a58f 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -629,6 +629,7 @@ void ScummEngine_v100he::o100_arrayOps() { } break; case 132: + debug(0, "o100_arrayOps: case 132"); // TODO: Used by Moonbase Commander fetchScriptWord(); fetchScriptWord(); diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 0c2c01d419..3dd70a09c9 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1398,11 +1398,6 @@ void ScummEngine_v72he::o72_openFile() { copyScriptString(buffer, sizeof(buffer)); debug(1, "Original filename %s", buffer); - // HACK: INI filename seems to get reset, corruption elsewhere? - if (_game.id == GID_MOONBASE && buffer[0] == 0) { - strcpy((char *)buffer, "moonbase.ini"); - } - const char *filename = (char *)buffer + convertFilePath(buffer, sizeof(buffer)); debug(1, "Final filename to %s", filename); @@ -1823,7 +1818,12 @@ void ScummEngine_v72he::o72_readINI() { case 77: // HE 100 case 7: // string writeVar(0, 0); - if (!strcmp((char *)option, "SaveGamePath")) { + if (!strcmp((char *)option, "HE3File")) { + Common::String fileName = generateFilename(-3); + int len = resStrLen((const byte *)fileName.c_str()); + data = defineArray(0, kStringArray, 0, 0, 0, len); + memcpy(data, fileName.c_str(), len); + } else if (!strcmp((char *)option, "SaveGamePath")) { // We set SaveGamePath in order to detect where it used // in convertFilePath and to avoid warning about invalid // path in Macintosh verisons. diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index 98e088365e..69da7f3e09 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -312,6 +312,7 @@ void ScummEngine_v80he::setupScummVars() { void ScummEngine_v90he::setupScummVars() { ScummEngine_v80he::setupScummVars(); + VAR_TIMER = 97; VAR_SCRIPT_CYCLE = 103; VAR_NUM_SCRIPT_CYCLES = 104; -- cgit v1.2.3 From 24a9dc848098dae2124456de239e9ec63a31471e Mon Sep 17 00:00:00 2001 From: Scott Thomas Date: Sun, 23 Aug 2009 14:54:56 +0000 Subject: T7G: Load VDX frame chunks into a MemoryStream rather than streaming straight from disk (Fix #2839528) svn-id: r43671 --- engines/groovie/vdx.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp index bee84b4adb..0bc6acb1c0 100644 --- a/engines/groovie/vdx.cpp +++ b/engines/groovie/vdx.cpp @@ -118,6 +118,7 @@ uint16 VDXPlayer::loadInternal() { bool VDXPlayer::playFrameInternal() { byte currRes = 0x80; + Common::ReadStream *vdxData = 0; while (!_file->eos() && currRes == 0x80) { currRes = _file->readByte(); @@ -130,7 +131,9 @@ bool VDXPlayer::playFrameInternal() { uint8 lengthbits = _file->readByte(); // Read the chunk data and decompress if needed - Common::ReadStream *vdxData = new Common::SubReadStream(_file, compSize); + if (compSize) + vdxData = _file->readStream(compSize); + if (lengthmask && lengthbits) { Common::ReadStream *decompData = new LzssReadStream(vdxData, lengthmask, lengthbits); delete vdxData; @@ -157,7 +160,9 @@ bool VDXPlayer::playFrameInternal() { default: error("Groovie::VDX: Invalid resource type: %d", currRes); } - delete vdxData; + if (vdxData) + delete vdxData; + vdxData = 0; } // Wait until the current frame can be shown -- cgit v1.2.3 From e858994060118b0d21bbb18d3cfe59fb10f4399d Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 23 Aug 2009 21:15:47 +0000 Subject: Fix bug #2843050 (RTZ: Crash to desktop with demo). Don't assert out when a resource slot can't be found. svn-id: r43676 --- engines/made/resource.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index c7d15dae73..72aa006c68 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -525,7 +525,10 @@ bool ResourceReader::loadResource(ResourceSlot *slot, byte *&buffer, uint32 &siz ResourceSlot *ResourceReader::getResourceSlot(uint32 resType, uint index) { ResourceSlots *slots = _resSlots[resType]; - assert(slots); + + if (!slots) + return NULL; + if (index >= 1 && index < slots->size()) { return &(*slots)[index]; } else { -- cgit v1.2.3 From 60af2db2fdd8c0ca0d597033798bdf4b4efa4938 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 23 Aug 2009 21:57:30 +0000 Subject: - Added more mappings from Sierra's internal IDs to our own ones. Hopefully, all SCI0-SCI11 games can now be detected correctly from the fallback detector - Simplified some checks for old script types svn-id: r43678 --- engines/sci/detection.cpp | 69 +++++++++++++++++++++++---------- engines/sci/engine/game.cpp | 4 +- engines/sci/engine/kernel.cpp | 5 +-- engines/sci/engine/kernel.h | 4 +- engines/sci/engine/savegame.cpp | 2 +- engines/sci/engine/seg_manager.cpp | 9 ++--- engines/sci/engine/seg_manager.h | 3 +- engines/sci/engine/static_selectors.cpp | 8 ++-- engines/sci/engine/vm.cpp | 6 +-- engines/sci/engine/vm.h | 2 +- 10 files changed, 67 insertions(+), 45 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index d41e1fa0b3..f60e42ddde 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -2412,7 +2412,18 @@ static const struct SciGameDescription SciGameDescriptions[] = { {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, 0 }, +#endif + + // Slater & Charlie go camping + {{"slater", "", { + {"resource.000", 0, "1846b57fe84774be72f7c50ab3c90df0", 2256126}, + {"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044}, + {"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, +#ifdef ENABLE_SCI32 // RAMA - English DOS/Windows Demo // Executable scanning reports "2.100.002", VERSION file reports "000.000.008" {{"rama", "Demo", { @@ -3045,15 +3056,20 @@ public: Common::String convertSierraGameId(Common::String sierraId) { // TODO: SCI32 IDs - // TODO: astrochicken - // TODO: The internal id of christmas1998 is "demo" - if (sierraId == "card") - return "christmas1990"; - // TODO: christmas1992 + // TODO: The internal id of christmas1988 is "demo" + if (sierraId == "card") { + // This could either be christmas1990 or christmas1992 + // christmas1990 has a "resource.001" file, whereas + // christmas1992 has a "resource.000" file + return (Common::File::exists("resource.001")) ? "christmas1990" : "christmas1992"; + } if (sierraId == "arthur") return "camelot"; - if (sierraId == "brain") - return "castlebrain"; + if (sierraId == "brain") { + // This could either be The Castle of Dr. Brain, or The Island of Dr. Brain + // castlebrain has resource.001, whereas islandbrain doesn't + return (Common::File::exists("resource.001")) ? "castlebrain" : "islandbrain"; + } // iceman is the same // longbow is the same if (sierraId == "eco") @@ -3068,8 +3084,8 @@ Common::String convertSierraGameId(Common::String sierraId) { return "hoyle1"; if (sierraId == "solitare") return "hoyle2"; - // TODO: hoyle3 - // TODO: hoyle4 + // hoyle3 is the same + // hoyle4 is the same if (sierraId == "kq1") return "kq1sci"; if (sierraId == "kq4") @@ -3081,9 +3097,10 @@ Common::String convertSierraGameId(Common::String sierraId) { // lsl5 is the same // lsl6 is the same // TODO: lslcasino - // TODO: fairytales - // TODO: mothergoose - // TODO: msastrochicken + if (sierraId == "tales") + return "fairytales"; + if (sierraId == "mg") + return "mothergoose"; if (sierraId == "cb1") return "laurabow"; if (sierraId == "lb2") @@ -3102,13 +3119,27 @@ Common::String convertSierraGameId(Common::String sierraId) { return "qfg2"; if (sierraId == "qfg1") return "qfg3"; - // TODO: slater + if (sierraId == "thegame") + return "slater"; if (sierraId == "sq1") return "sq1sci"; - // sq3 is the same + if (sierraId == "sq3") { + // Both SQ3 and the separately released subgame, Astro Chicken, + // have internal ID "sq3", but Astro Chicken only has "resource.map" + // and "resource.001". Detect if it's SQ3 by the existence of + // "resource.002" + return (Common::File::exists("resource.002")) ? "sq3" : "astrochicken"; + } + if (sierraId == "sq4") { + // Both SQ4 and the separately released subgame, Ms. Astro Chicken, + // have internal ID "sq4", but Astro Chicken only has "resource.map" + // and "resource.001". Detect if it's SQ4 by the existence of + // "resource.000" (which exists in both SQ4 floppy and CD, but not in + // the subgame) + return (Common::File::exists("resource.000")) ? "sq4" : "msastrochicken"; + } // sq4 is the same // sq5 is the same - // TODO: islandbrain return sierraId; } @@ -3185,12 +3216,8 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl // Determine the game id ResourceManager *resMgr = new ResourceManager(fslist); SciVersion version = resMgr->sciVersion(); - Kernel *kernel = new Kernel(resMgr, true); - bool hasOldScriptHeader = kernel->hasOldScriptHeader(); - delete kernel; - - SegManager *segManager = new SegManager(resMgr, version, hasOldScriptHeader); - if (!script_instantiate(resMgr, segManager, version, hasOldScriptHeader, 0)) { + SegManager *segManager = new SegManager(resMgr, version); + if (!script_instantiate(resMgr, segManager, version, 0)) { warning("fallbackDetect(): Could not instantiate script 0"); SearchMan.remove("SCI_detection"); return 0; diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp index f649d97412..994054f6a7 100644 --- a/engines/sci/engine/game.cpp +++ b/engines/sci/engine/game.cpp @@ -191,7 +191,7 @@ int game_init_sound(EngineState *s, int sound_flags) { // Architectural stuff: Init/Unintialize engine int script_init_engine(EngineState *s) { s->kernel_opt_flags = 0; - s->seg_manager = new SegManager(s->resmgr, s->_version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()); + s->seg_manager = new SegManager(s->resmgr, s->_version); s->gc_countdown = GC_INTERVAL - 1; SegmentId script_000_segment = s->seg_manager->getSegment(0, SCRIPT_GET_LOCK); @@ -294,7 +294,7 @@ int game_init(EngineState *s) { s->stack_base = stack->entries; s->stack_top = s->stack_base + VM_STACK_SIZE; - if (!script_instantiate(s->resmgr, s->seg_manager, s->_version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader(), 0)) { + if (!script_instantiate(s->resmgr, s->seg_manager, s->_version, 0)) { warning("game_init(): Could not instantiate script 0"); return 1; } diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp index a871df936f..687e621405 100644 --- a/engines/sci/engine/kernel.cpp +++ b/engines/sci/engine/kernel.cpp @@ -363,15 +363,12 @@ static const char *argtype_description[] = { "Arithmetic" }; -Kernel::Kernel(ResourceManager *resmgr, bool minimalLoad) : _resmgr(resmgr) { +Kernel::Kernel(ResourceManager *resmgr) : _resmgr(resmgr) { memset(&_selectorMap, 0, sizeof(_selectorMap)); // FIXME: Remove this once/if we C++ify selector_map_t loadSelectorNames(); detectSciFeatures(); - if (minimalLoad) // If we're only asked to detect game features, stop here - return; - mapSelectors(); // Map a few special selectors for later use loadOpcodes(); loadKernelNames(); diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index 997cdaea77..a85025f514 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -67,10 +67,8 @@ class Kernel { public: /** * Initializes the SCI kernel - * @param minimalLoad If true, only the selector names are loaded, to detect game features. - * It's set to true by the advanced game detector to speed it up */ - Kernel(ResourceManager *resmgr, bool minimalLoad = false); + Kernel(ResourceManager *resmgr); ~Kernel(); uint getOpcodesSize() const { return _opcodes.size(); } diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 0ddb5187ac..b53e9d522c 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -219,7 +219,7 @@ static void sync_SegManagerPtr(Common::Serializer &s, SegManager *&obj) { if (s.isLoading()) { // FIXME: Do in-place loading at some point, instead of creating a new EngineState instance from scratch. delete obj; - obj = new SegManager(resMgr, version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()); + obj = new SegManager(resMgr, version); } obj->saveLoadWithSerializer(s); diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index ddcd639f3c..0c731d449c 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -52,7 +52,7 @@ namespace Sci { #define INVALID_SCRIPT_ID -1 -SegManager::SegManager(ResourceManager *resMgr, SciVersion version, bool oldScriptHeader) { +SegManager::SegManager(ResourceManager *resMgr, SciVersion version) { id_seg_map = new IntMapper(); reserved_id = INVALID_SCRIPT_ID; id_seg_map->checkKey(reserved_id, true); // reserve entry 0 for INVALID_SCRIPT_ID @@ -68,7 +68,6 @@ SegManager::SegManager(ResourceManager *resMgr, SciVersion version, bool oldScri exports_wide = 0; _version = version; _resMgr = resMgr; - _oldScriptHeader = oldScriptHeader; int result = 0; @@ -150,7 +149,7 @@ void SegManager::setScriptSize(Script &scr, int script_nr) { if (!script || (_version >= SCI_VERSION_1_1 && !heap)) { error("SegManager::setScriptSize: failed to load %s", !script ? "script" : "heap"); } - if (_oldScriptHeader) { + if (_version == SCI_VERSION_0_EARLY) { // check if we got an old script header scr.buf_size = script->size + READ_LE_UINT16(script->data) * 2; //locals_size = READ_LE_UINT16(script->data) * 2; } else if (_version < SCI_VERSION_1_1) { @@ -445,7 +444,7 @@ SegmentId SegManager::getSegment(int script_nr, SCRIPT_GET load) { SegmentId segment; if ((load & SCRIPT_GET_LOAD) == SCRIPT_GET_LOAD) - script_instantiate(_resMgr, this, _version, _oldScriptHeader, script_nr); + script_instantiate(_resMgr, this, _version, script_nr); segment = segGet(script_nr); @@ -987,7 +986,7 @@ int SegManager::createSci0ClassTable() { Resource *script = _resMgr->findResource(ResourceId(kResourceTypeScript, scriptnr), 0); if (script) { - if (_oldScriptHeader) + if (version == SCI_VERSION_0_EARLY) // check if we got an old script header magic_offset = seeker = 2; else magic_offset = seeker = 0; diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index fcf2659df3..5676990343 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -58,7 +58,7 @@ public: /** * Initialize the segment manager */ - SegManager(ResourceManager *resMgr, SciVersion version, bool oldScriptHeader); + SegManager(ResourceManager *resMgr, SciVersion version); /** * Deallocate all memory associated with the segment manager @@ -342,7 +342,6 @@ public: private: IntMapper *id_seg_map; ///< id - script id; seg - index of heap - bool _oldScriptHeader; public: // TODO: make private Common::Array _heap; int reserved_id; diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp index 9c2abbfbc9..1897748c6d 100644 --- a/engines/sci/engine/static_selectors.cpp +++ b/engines/sci/engine/static_selectors.cpp @@ -499,10 +499,12 @@ static const SelectorRemap lsl5_demo_selectors[] = { } while (0) Common::StringList Kernel::checkStaticSelectorNames() { - Common::String gameID = ((SciEngine*)g_engine)->getGameID(); - Common::StringList names; - + if (!g_engine) + return names; + + Common::String gameID = ((SciEngine*)g_engine)->getGameID(); + if (gameID == "kq4sci") USE_SELECTOR_TABLE(kq4_demo_selectors); else if (gameID == "lsl3" || gameID == "iceman") // identical, except iceman has "flags" diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 943a8e0354..613de69f05 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -208,7 +208,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP Script *scr = s->seg_manager->getScriptIfLoaded(seg); if (!scr) // Script not present yet? - seg = script_instantiate(s->resmgr, s->seg_manager, s->_version, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader(), script); + seg = script_instantiate(s->resmgr, s->seg_manager, s->_version, script); else scr->unmarkDeleted(); @@ -1761,11 +1761,11 @@ int script_instantiate_sci11(ResourceManager *resMgr, SegManager *segManager, Sc return seg_id; } -int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, bool oldScriptHeader, int script_nr) { +int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr) { if (version >= SCI_VERSION_1_1) return script_instantiate_sci11(resMgr, segManager, version, script_nr); else - return script_instantiate_sci0(resMgr, segManager, version, oldScriptHeader, script_nr); + return script_instantiate_sci0(resMgr, segManager, version, (version == SCI_VERSION_0_EARLY), script_nr); } void script_uninstantiate_sci0(SegManager *segManager, SciVersion version, int script_nr, SegmentId seg) { diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h index 867f732e2a..c8f94d5446 100644 --- a/engines/sci/engine/vm.h +++ b/engines/sci/engine/vm.h @@ -489,7 +489,7 @@ reg_t script_lookup_export(SegManager *segManager, int script_nr, int export_ind * @param[in] script_nr The script number to load * @return The script's segment ID or 0 if out of heap */ -int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, bool oldScriptHeader, int script_nr); +int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr); /** * Decreases the numer of lockers of a script and unloads it if that number -- cgit v1.2.3 From 7359c8f9682fe42f430b00d729257e78b6e76b1d Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Mon, 24 Aug 2009 01:59:58 +0000 Subject: SCI: Read class table from vocab resource instead of scanning. This fixes several "invalid selector" VM crashes caused by duplicate classes. svn-id: r43680 --- engines/sci/engine/seg_manager.cpp | 135 +++---------------------------------- engines/sci/engine/seg_manager.h | 3 +- engines/sci/engine/vm.cpp | 8 --- 3 files changed, 10 insertions(+), 136 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index 0c731d449c..0c88481125 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -71,10 +71,7 @@ SegManager::SegManager(ResourceManager *resMgr, SciVersion version) { int result = 0; - if (version >= SCI_VERSION_1_1) - result = createSci11ClassTable(); - else - result = createSci0ClassTable(); + result = createClassTable(); if (result) error("SegManager: Failed to initialize class table"); @@ -692,7 +689,6 @@ void SegManager::scriptInitialiseObjectsSci11(SegmentId seg) { return; } - _classtable[species].script = scr->nr; _classtable[species].reg.segment = seg; _classtable[species].reg.offset = classpos; } @@ -916,137 +912,24 @@ int SegManager::freeDynmem(reg_t addr) { return 0; // OK } -int SegManager::createSci11ClassTable() { - int scriptnr; - unsigned int seeker_offset; - char *seeker_ptr; - int classnr; - +int SegManager::createClassTable() { Resource *vocab996 = _resMgr->findResource(ResourceId(kResourceTypeVocab, 996), 1); if (!vocab996) - _classtable.resize(20); - else - _classtable.resize(vocab996->size >> 2); - - for (scriptnr = 0; scriptnr < 1000; scriptnr++) { - Resource *heap = _resMgr->findResource(ResourceId(kResourceTypeHeap, scriptnr), 0); - - if (heap) { - int global_vars = READ_LE_UINT16(heap->data + 2); - - seeker_ptr = (char*)heap->data + 4 + global_vars * 2; - seeker_offset = 4 + global_vars * 2; + error("SegManager: failed to open vocab 996"); - while (READ_LE_UINT16((byte*)seeker_ptr) == SCRIPT_OBJECT_MAGIC_NUMBER) { - if (READ_LE_UINT16((byte*)seeker_ptr + 14) & SCRIPT_INFO_CLASS) { - classnr = READ_LE_UINT16((byte*)seeker_ptr + 10); - if (classnr >= (int)_classtable.size()) { - if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) { - warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x", - classnr, scriptnr, scriptnr, seeker_offset); - return 1; - } + int totalClasses = vocab996->size >> 2; + _classtable.resize(totalClasses); - _classtable.resize(classnr + 1); // Adjust maximum number of entries - } + for (uint16 classNr = 0; classNr < totalClasses; classNr++) { + uint16 scriptNr = READ_LE_UINT16(vocab996->data + classNr * 4 + 2); - _classtable[classnr].reg.offset = seeker_offset; - _classtable[classnr].reg.segment = 0; - _classtable[classnr].script = scriptnr; - } - - seeker_ptr += READ_LE_UINT16((byte*)seeker_ptr + 2) * 2; - seeker_offset += READ_LE_UINT16((byte*)seeker_ptr + 2) * 2; - } - } + _classtable[classNr].reg = NULL_REG; + _classtable[classNr].script = scriptNr; } _resMgr->unlockResource(vocab996); - vocab996 = NULL; - return 0; -} -int SegManager::createSci0ClassTable() { - int scriptnr; - unsigned int seeker; - int classnr; - int magic_offset; // For strange scripts in older SCI versions - - Resource *vocab996 = _resMgr->findResource(ResourceId(kResourceTypeVocab, 996), 1); - SciVersion version = _version; // for the offset defines - - if (!vocab996) - _classtable.resize(20); - else - _classtable.resize(vocab996->size >> 2); - - for (scriptnr = 0; scriptnr < 1000; scriptnr++) { - int objtype = 0; - Resource *script = _resMgr->findResource(ResourceId(kResourceTypeScript, scriptnr), 0); - - if (script) { - if (version == SCI_VERSION_0_EARLY) // check if we got an old script header - magic_offset = seeker = 2; - else - magic_offset = seeker = 0; - - do { - while (seeker < script->size) { - unsigned int lastseeker = seeker; - objtype = (int16)READ_LE_UINT16(script->data + seeker); - if (objtype == SCI_OBJ_CLASS || objtype == SCI_OBJ_TERMINATOR) - break; - seeker += (int16)READ_LE_UINT16(script->data + seeker + 2); - if (seeker <= lastseeker) { - _classtable.clear(); - error("Script version is invalid"); - } - } - - if (objtype == SCI_OBJ_CLASS) { - int sugg_script; - - seeker -= SCRIPT_OBJECT_MAGIC_OFFSET; // Adjust position; script home is base +8 bytes - - classnr = (int16)READ_LE_UINT16(script->data + seeker + 4 + SCRIPT_SPECIES_OFFSET); - if (classnr >= (int)_classtable.size()) { - - if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) { - warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x", - classnr, scriptnr, scriptnr, seeker); - return 1; - } - - _classtable.resize(classnr + 1); // Adjust maximum number of entries - } - - // Map the class ID to the script the corresponding class is contained in - // The script number is found in vocab.996, if it exists - if (!vocab996 || (uint32)classnr >= vocab996->size >> 2) - sugg_script = -1; - else - sugg_script = (int16)READ_LE_UINT16(vocab996->data + 2 + (classnr << 2)); - - // First, test whether the script hasn't been claimed, or if it's been claimed by the wrong script - - if (sugg_script == -1 || scriptnr == sugg_script /*|| !s->_classtable[classnr].reg.segment*/) { - // Now set the home script of the class - _classtable[classnr].reg.offset = seeker + 4 - magic_offset; - _classtable[classnr].reg.segment = 0; - _classtable[classnr].script = scriptnr; - } - - seeker += SCRIPT_OBJECT_MAGIC_OFFSET; // Re-adjust position - seeker += (int16)READ_LE_UINT16(script->data + seeker + 2); // Move to next - } - - } while (objtype != SCI_OBJ_TERMINATOR && seeker <= script->size); - - } - } - _resMgr->unlockResource(vocab996); - vocab996 = NULL; return 0; } diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h index 5676990343..27c8ad446a 100644 --- a/engines/sci/engine/seg_manager.h +++ b/engines/sci/engine/seg_manager.h @@ -360,8 +360,7 @@ private: LocalVariables *allocLocalsSegment(Script *scr, int count); MemObject *memObjAllocate(SegmentId segid, int hash_id, MemObjectType type); int deallocate(SegmentId seg, bool recursive); - int createSci0ClassTable(); - int createSci11ClassTable(); + int createClassTable(); Hunk *alloc_Hunk(reg_t *); diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp index 613de69f05..fbdb3d1c85 100644 --- a/engines/sci/engine/vm.cpp +++ b/engines/sci/engine/vm.cpp @@ -312,13 +312,6 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt ObjVarRef varp; switch (lookup_selector(s, send_obj, selector, &varp, &funcp)) { case kSelectorNone: - // WORKAROUND: LSL6 tries to access the invalid 'keep' selector of the game object. - // FIXME: Find out if this is a game bug. - if ((s->_gameName == "LSL6") && (selector == 0x18c)) { - debug("LSL6 detected, continuing..."); - break; - } - error("Send to invalid selector 0x%x of object at %04x:%04x", 0xffff & selector, PRINT_REG(send_obj)); break; @@ -1660,7 +1653,6 @@ int script_instantiate_sci0(ResourceManager *resMgr, SegManager *segManager, Sci return 1; } - segManager->_classtable[species].script = script_nr; segManager->_classtable[species].reg = addr; segManager->_classtable[species].reg.offset = classpos; // Set technical class position-- into the block allocated for it -- cgit v1.2.3 From 030665f90b5f172b7bafe730abcbc6f2a818ad6d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 24 Aug 2009 07:57:04 +0000 Subject: Move detection tables to separate file. svn-id: r43682 --- engines/sci/detection.cpp | 2894 +-------------------------------------- engines/sci/detection_tables.h | 2918 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 2921 insertions(+), 2891 deletions(-) create mode 100644 engines/sci/detection_tables.h (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index f60e42ddde..177fc2fbd1 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -104,2895 +104,7 @@ static const PlainGameDescriptor SciGameTitles[] = { {0, 0} }; -#define FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, lang) \ - {{"sci-fanmade", name, { \ - {"resource.map", 0, resMapMd5, resMapSize}, \ - {"resource.001", 0, resMd5, resSize}, \ - {NULL, 0, NULL, 0}}, lang, Common::kPlatformPC, 0, GUIO_NOSPEECH}, \ - 0 \ - } - -#define FANMADE(name, resMapMd5, resMapSize, resMd5, resSize) FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, Common::EN_ANY) - -using Common::GUIO_NONE; -using Common::GUIO_NOSPEECH; - -// Game descriptions -static const struct SciGameDescription SciGameDescriptions[] = { - // Astro Chicken - English DOS - // SCI interpreter version 0.000.453 - {{"astrochicken", "", { - {"resource.map", 0, "f3d1be7752d30ba60614533d531e2e98", 474}, - {"resource.001", 0, "6fd05926c2199af0af6f72f90d0d7260", 126895}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Castle of Dr. Brain - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.005.000" - // SCI interpreter version 1.000.510 - {{"castlebrain", "", { - {"resource.map", 0, "9f9fb826aa7e944b95eadbf568244a68", 2766}, - {"resource.000", 0, "0efa8409c43d42b32642f96652d3230d", 314773}, - {"resource.001", 0, "3fb02ce493f6eacdcc3713851024f80e", 559540}, - {"resource.002", 0, "d226d7d3b4f77c4a566913fc310487fc", 792380}, - {"resource.003", 0, "d226d7d3b4f77c4a566913fc310487fc", 464348}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Castle of Dr. Brain - German Amiga (from www.back2roots.org) - // Executable scanning reports "1.005.001" - // SCI interpreter version 1.000.510 - {{"castlebrain", "", { - {"resource.map", 0, "8e60424682db52a982bcc3535a7e86f3", 2796}, - {"resource.000", 0, "0efa8409c43d42b32642f96652d3230d", 332468}, - {"resource.001", 0, "4e0836fadc324316c1a418125709ba45", 569057}, - {"resource.002", 0, "85e51acb5f9c539d66e3c8fe40e17da5", 826309}, - {"resource.003", 0, "85e51acb5f9c539d66e3c8fe40e17da5", 493638}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Castle of Dr. Brain - English DOS Non-Interactive Demo - // SCI interpreter version 1.000.005 - {{"castlebrain", "Demo", { - {"resource.map", 0, "467bb5e3224bb54640c3280032aebff5", 633}, - {"resource.000", 0, "9780f040d58182994e22d2e34fab85b0", 67367}, - {"resource.001", 0, "2af49dbd8f2e1db4ab09f9310dc91259", 570553}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Castle of Dr. Brain - English DOS Floppy (from jvprat) - // Executable scanning reports "1.000.044", Floppy label reports "1.0, 10.30.91", VERSION file reports "1.000" - // SCI interpreter version 1.000.510 - {{"castlebrain", "", { - {"resource.map", 0, "1302ceb141d44b05a42723791b2d84c6", 2739}, - {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 346731}, - {"resource.001", 0, "d2f5a1be74ed963fa849a76892be5290", 794832}, - {"resource.002", 0, "c0c29c51af66d65cb53f49e785a2d978", 1280907}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Castle of Dr. Brain - English DOS Floppy 1.1 - {{"castlebrain", "", { - {"resource.map", 0, "f77728304c70017c54793eb6ca648174", 2745}, - {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 347071}, - {"resource.001", 0, "13e81e1839cd7b216d2bb5615c1ca160", 796776}, - {"resource.002", 0, "930e416bec196b9703a331d81b3d66f2", 1283812}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Castle of Dr. Brain - Spanish DOS - // SCI interpreter version 1.000.510 - {{"castlebrain", "", { - {"resource.map", 0, "5738c163e014bbe046474de009020b82", 2727}, - {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 1197694}, - {"resource.001", 0, "735be4e58957180cfc807d5e18fdffcd", 1433302}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Christmas Card 1988 - English DOS - // SCI interpreter version 0.000.294 - {{"christmas1988", "", { - {"resource.map", 0, "39485580d34a72997f3d5b3aba4d24f1", 426}, - {"resource.001", 0, "11391434f41c834090d7a1e9488ce936", 129739}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Christmas Card 1990: The Seasoned Professional - English DOS (16 Colors) - // SCI interpreter version 1.000.172 - {{"christmas1990", "16 Colors", { - {"resource.map", 0, "8f656714a05b94423ac6eb10ee8797d0", 600}, - {"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 272629}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Christmas Card 1990: The Seasoned Professional - English DOS (256 Colors) - // SCI interpreter version 1.000.174 - {{"christmas1990", "256 Colors", { - {"resource.map", 0, "44b8f45b841b9b5e17e939a35e443988", 600}, - {"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 335362}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Christmas Card 1992 - English DOS - // SCI interpreter version 1.001.055 - {{"christmas1992", "", { - {"resource.map", 0, "f1f8c8a8443f523422af70b4ec85b71c", 318}, - {"resource.000", 0, "62fb9256f8e7e6e65a6875efdb7939ac", 203396}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Codename: Iceman - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.002.031" - // SCI interpreter version 0.000.685 - {{"iceman", "", { - {"resource.map", 0, "035829b391709a4e542d7c7b224625f6", 6000}, - {"resource.000", 0, "b1bccd827453d4cb834bfd5b45bef63c", 73682}, - {"resource.001", 0, "ede5a0e1e2a80fb629dae72c72f33d37", 293145}, - {"resource.002", 0, "36670a917550757d57df84c96cf9e6d9", 469387}, - {"resource.003", 0, "d97a96f1ab91b41cf46a02cc89b0a04e", 619219}, - {"resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 713382}, - {"resource.005", 0, "605b67a9ef199a9bb015745e7c004cf4", 478384}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Codename: Iceman - English DOS Non-Interactive Demo - // Executable scanning reports "0.000.685" - {{"iceman", "Demo", { - {"resource.map", 0, "782974f29d8a824782d2d4aea39964e3", 1056}, - {"resource.001", 0, "d4b75e280d1c3a97cfef1b0bebff387c", 573647}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Codename: Iceman - English DOS (from jvprat) - // Executable scanning reports "0.000.685", Floppy label reports "1.033, 6.8.90", VERSION file reports "1.033" - // SCI interpreter version 0.000.685 - {{"iceman", "", { - {"resource.map", 0, "a18f3cef4481a81d3415fb87a754343e", 5700}, - {"resource.000", 0, "b1bccd827453d4cb834bfd5b45bef63c", 26989}, - {"resource.001", 0, "32b351072fccf76fc82234d73d28c08b", 438872}, - {"resource.002", 0, "36670a917550757d57df84c96cf9e6d9", 566549}, - {"resource.003", 0, "d97a96f1ab91b41cf46a02cc89b0a04e", 624303}, - {"resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 670883}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Codename: Iceman - English DOS (from FRG) - // SCI interpreter version 0.000.668 - {{"iceman", "", { - {"resource.map", 0, "554b44b79b0e9a7fc59f66dda0daac02", 5670}, - {"resource.000", 0, "b1bccd827453d4cb834bfd5b45bef63c", 26974}, - {"resource.001", 0, "005bd332d4b0f9d8e99d3b905223a332", 438501}, - {"resource.002", 0, "250b859381ebf2bf8922bd99683b0cc1", 566464}, - {"resource.003", 0, "dc7c5280e7acfaffe6ef2a6c963c5f94", 622118}, - {"resource.004", 0, "64f342463f6f35ba71b3509ef696ae3f", 669188}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of Camelot - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.002.030" - // SCI interpreter version 0.000.685 - {{"camelot", "", { - {"resource.map", 0, "51aba42f8e63b219755d4372ea424509", 6654}, - {"resource.000", 0, "dfadf0b4c9fb44ce55570149856c302d", 128100}, - {"resource.001", 0, "67391de361b9347f123ac0899b4b91f7", 300376}, - {"resource.002", 0, "8c7f12b2c38d225d4c7121b30ea1b4d2", 605334}, - {"resource.003", 0, "82a73e7572e7ee627429bb5111ff82ca", 672392}, - {"resource.004", 0, "6821dc97cf643ba521a4e840dda3c58b", 647410}, - {"resource.005", 0, "c6e551bdc24f0acc193159038d4ca767", 605882}, - {"resource.006", 0, "8f880a536908ab496bbc552f7f5c3738", 585255}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of Camelot - English DOS Non-Interactive Demo - // SCI interpreter version 0.000.668 - {{"camelot", "Demo", { - {"resource.map", 0, "f4cd75c15be75e04cdca3acda2c0b0ea", 468}, - {"resource.001", 0, "4930708722f34bfbaa4945fb08f55f61", 232523}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of Camelot - English DOS (from jvprat) - // Executable scanning reports "0.000.685", Floppy label reports "1.001, 0.000.685", VERSION file reports "1.001.000" - // SCI interpreter version 0.000.685 - {{"camelot", "", { - {"resource.map", 0, "95eca3991906dfd7ed26d193df07596f", 7278}, - {"resource.001", 0, "8e1a3a8c588007404b532b8dfacc1460", 596774}, - {"resource.002", 0, "8e1a3a8c588007404b532b8dfacc1460", 722250}, - {"resource.003", 0, "8e1a3a8c588007404b532b8dfacc1460", 723712}, - {"resource.004", 0, "8e1a3a8c588007404b532b8dfacc1460", 729143}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of Camelot - English DOS - // SCI interpreter version 0.000.685 - {{"camelot", "", { - {"resource.map", 0, "86bffb2a393b7a5d8de45e735091f037", 9504}, - {"resource.001", 0, "8e1a3a8c588007404b532b8dfacc1460", 212461}, - {"resource.002", 0, "8e1a3a8c588007404b532b8dfacc1460", 317865}, - {"resource.003", 0, "8e1a3a8c588007404b532b8dfacc1460", 359145}, - {"resource.004", 0, "8e1a3a8c588007404b532b8dfacc1460", 345180}, - {"resource.005", 0, "8e1a3a8c588007404b532b8dfacc1460", 345734}, - {"resource.006", 0, "8e1a3a8c588007404b532b8dfacc1460", 332446}, - {"resource.007", 0, "8e1a3a8c588007404b532b8dfacc1460", 358182}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of the Longbow - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.005.001" - // SCI interpreter version 1.000.510 - {{"longbow", "", { - {"resource.map", 0, "6204f3d00c0f6c0f5f95a29a4190f2f9", 6048}, - {"resource.000", 0, "8d11c744b4a51e7a8ceac687a46f08ca", 830333}, - {"resource.001", 0, "76caf8593e065a98c8ab4a6e2c7dbafc", 839008}, - {"resource.002", 0, "eb312373045906b54a3181bebaf6651a", 733145}, - {"resource.003", 0, "7fe3b3372d7fdda60045807e9c8e4867", 824554}, - {"resource.004", 0, "d1038c75d85a6650d48e07d174a6a913", 838175}, - {"resource.005", 0, "1c3804e56b114028c5873a35c2f06d13", 653002}, - {"resource.006", 0, "f9487732289a4f4966b4e34eea413325", 842817}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of the Longbow - English DOS - // SCI interpreter version 1.000.510 - {{"longbow", "", { - {"resource.map", 0, "36d3b81ff75b67dd4d27b7f5d3166503", 6261}, - {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 1096767}, - {"resource.001", 0, "d4c299213f8d799da1492680d12d0fb3", 1133226}, - {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1128555}, - {"resource.003", 0, "21ebe6b39b57a73fc449f67f013765aa", 972635}, - {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1064637}, - {"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1154950}, - {"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1042966}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of the Longbow - English DOS Floppy (from jvprat) - // Executable scanning reports "1.000.168", Floppy label reports "1.1, 1.13.92", VERSION file reports "1.1" - // SCI interpreter version 1.000.510 - {{"longbow", "", { - {"resource.map", 0, "247f955865572569342751de47e861ab", 6027}, - {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 1297120}, - {"resource.001", 0, "1e6084a19f7a6c50af88d3a9b32c411e", 1366155}, - {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1234743}, - {"resource.003", 0, "1867136d01ece57b531032d466910522", 823686}, - {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1261462}, - {"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284720}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of the Longbow - English DOS - // SCI interpreter version 1.000.510 - {{"longbow", "", { - {"resource.map", 0, "737c6f83a1ee601727ff026898f19fa1", 6045}, - {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 1296607}, - {"resource.001", 0, "1e6084a19f7a6c50af88d3a9b32c411e", 1379267}, - {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1234140}, - {"resource.003", 0, "1867136d01ece57b531032d466910522", 823610}, - {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1260237}, - {"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284609}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of the Longbow EGA - English DOS - // SCI interpreter version 1.000.510 - {{"longbow", "EGA", { - {"resource.map", 0, "7676ec9f08967d7a9a7724f5170456e0", 6261}, - {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 718161}, - {"resource.001", 0, "3c3735caa34fa3f261a9552831bb43ed", 705680}, - {"resource.002", 0, "7025b87e735b1df3f0e9488a621f4333", 700633}, - {"resource.003", 0, "eaca7933e8e56bea22b42f7fd5d7a8a7", 686510}, - {"resource.004", 0, "b7bb35c027bb424ecefcd122768e5e60", 705631}, - {"resource.005", 0, "58942b1aa6d6ffeb66e9f8897fd4435f", 469243}, - {"resource.006", 0, "8c767b3939add63d11274065e46aad04", 713158}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0, - }, - - // Conquests of the Longbow - English DOS Non-Interactive Demo - // SCI interpreter version 1.000.510 - {{"longbow", "Demo", { - {"resource.map", 0, "cbc5cb73341de1bff1b1e20a640af220", 588}, - {"resource.001", 0, "f05a20cc07eee85da8e999d0ac0f596b", 869916}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Conquests of the Longbow - German DOS (suplied by markcoolio in bug report #2727681) - // SCI interpreter version 1.000.510 - {{"longbow", "", { - {"resource.map", 0, "7376b7a07f8bd3a8ab8d67595d3f5b51", 6285}, - {"resource.000", 0, "ee39f92e006142424cf9209329e727c6", 977281}, - {"resource.001", 0, "d4c299213f8d799da1492680d12d0fb3", 1167657}, - {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1172521}, - {"resource.003", 0, "a204de2a083a7770ff455a838210a678", 1165249}, - {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1101869}, - {"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1176914}, - {"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1123585}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest - English DOS Non-Interactive Demo (from FRG) - // Executable scanning reports "x.yyy.zzz" - // SCI interpreter version 1.001.069 (just a guess) - {{"ecoquest", "Demo", { - {"resource.map", 0, "c819e171359b7c95f4c13b846d5c034e", 873}, - {"resource.001", 0, "baf9393a9bfa73098adb501e5bc5487b", 657518}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest - English DOS CD 1.1 - // SCI interpreter version 1.001.064 - {{"ecoquest", "CD", { - {"resource.map", 0, "a4b73d5d2b55bdb6e44345e99c8fbdd0", 4804}, - {"resource.000", 0, "d908dbef56816ac6c60dd145fdeafb2b", 3536046}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Eco Quest - English DOS Floppy - // SCI interpreter version 1.000.510 - {{"ecoquest", "Floppy", { - {"resource.map", 0, "704367225929a88aad281ac72844ddac", 4053}, - {"resource.000", 0, "241b98d3903f6a5b872baa19b80aef3b", 1099239}, - {"resource.001", 0, "96d4435d24c01f1c1675e46457604c5f", 1413719}, - {"resource.002", 0, "28fe9b4f0567e71feb198bc9f3a2c605", 1241816}, - {"resource.003", 0, "f3146df0ad4297f5ce35aa8c4753bf6c", 586832}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest - English DOS Floppy - // SCI interpreter version 1.000.510 - {{"ecoquest", "Floppy", { - {"resource.map", 0, "f77baec05fae76707205f5be6534a7f3", 4059}, - {"resource.000", 0, "241b98d3903f6a5b872baa19b80aef3b", 858490}, - {"resource.001", 0, "2fed7451bca81b0c891eed1a956f2263", 1212161}, - {"resource.002", 0, "323b3b12f43d53f27d259beb225f0aa7", 1129316}, - {"resource.003", 0, "83ac03e4bddb2c1ac2d36d2a587d0536", 1145616}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest - German DOS Floppy (supplied by markcoolio in bug report #2723744) - // SCI interpreter version 1.000.510 - {{"ecoquest", "Floppy", { - {"resource.map", 0, "7a9b43bf27dc000ac8559ecbe824b659", 4395}, - {"resource.000", 0, "99b73d40403a51c7e60d01df0d6cd34a", 998227}, - {"resource.001", 0, "2fed7451bca81b0c891eed1a956f2263", 1212060}, - {"resource.002", 0, "02d7d0411f7903aacb3bc8b0f8ca8a9a", 1202581}, - {"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1175835}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest - Spanish DOS Floppy (from jvprat) - // Executable scanning reports "1.ECO.013", VERSION file reports "1.000, 11.12.92" - // SCI interpreter version 1.000.510 - {{"ecoquest", "Floppy", { - {"resource.map", 0, "82e6b1e3bdb2f064b18380009df7b345", 4395}, - {"resource.000", 0, "0b12a91c935e385308af8d17811deded", 1004085}, - {"resource.001", 0, "2fed7451bca81b0c891eed1a956f2263", 1212060}, - {"resource.002", 0, "2d21a1d2dcbffa551552e3e0725d2284", 1186033}, - {"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1174993}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest - French DOS Floppy (from Strangerke) - // SCI interpreter version 1.ECO.013 - {{"ecoquest", "Floppy", { - {"resource.map", 0, "67742945cd59b896d9f22a549f605217", 4407}, - {"resource.000", 0, "0b12a91c935e385308af8d17811deded", 973723}, - {"resource.001", 0, "fc7fba54b6bb88fd7e9c229636599aa9", 1205841}, - {"resource.002", 0, "b836c6ee9de67d814ac5d1b05f5b9858", 1173872}, - {"resource.003", 0, "f8f767f9d6351432621c6e54c1b2ba8c", 1141520}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest 2 - English DOS Non-Interactive Demo - // SCI interpreter version 1.001.055 - {{"ecoquest2", "Demo", { - {"resource.map", 0, "607cfa0d8a03b7d348c06ee727e3d939", 1321}, - {"resource.000", 0, "dd6f614c43c029f063e93cd243af90a4", 525992}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest 2 - English DOS Floppy (supplied by markcoolio in bug report #2723761) - // SCI interpreter version 1.001.065 - {{"ecoquest2", "Floppy", { - {"resource.map", 0, "28fb7b6abb9fc1cb8882d7c2e701b63f", 5658}, - {"resource.000", 0, "cc1d17e5637528dbe4a812699e1cbfc6", 4208192}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Eco Quest 2 - French DOS Floppy (from Strangerke) - // SCI interpreter version 1.001.081 - {{"ecoquest2", "Floppy", { - {"resource.map", 0, "c22ab8b33c339c138b6b1697b77b9e79", 5588}, - {"resource.000", 0, "1c4093f7248240329121fdf8c0d59152", 4231946}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Freddy Pharkas - English DOS demo (from FRG) - // SCI interpreter version 1.001.069 - {{"freddypharkas", "Demo", { - {"resource.map", 0, "97aa9fcfe84c9993a64debd28c32393a", 1909}, - {"resource.000", 0, "5ea8e7a3ea10cce6efd5c106dc62fd8c", 867724}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Freddy Pharkas - English CD (from FRG) - // SCI interpreter version 1.001.132 - {{"freddypharkas", "CD", { - {"resource.map", 0, "d46b282f228a67ba13bd4b4009e95f8f", 6058}, - {"resource.000", 0, "ee3c64ffff0ba9fb08bea2624631c598", 5490246}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Freddy Pharkas - English DOS Floppy (updated information from markcoolio in bug reports #2723773 and #2724720) - // Executable scanning reports "1.cfs.081" - // SCI interpreter version 1.001.132 (just a guess) - {{"freddypharkas", "Floppy", { - {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, - {"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230}, - {"resource.msg", 0, "554f65315d851184f6e38211489fdd8f", -1}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Freddy Pharkas - German DOS Floppy (from Tobis87, updated information from markcoolio in bug reports #2723772 and #2724720) - // Executable scanning reports "1.cfs.081" - // SCI interpreter version 1.001.132 (just a guess) - {{"freddypharkas", "", { - {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, - {"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230}, - {"resource.msg", 0, "304b5a5781800affd2235152a5794fa8", -1}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Freddy Pharkas - Spanish DOS (from jvprat) - // Executable scanning reports "1.cfs.081", VERSION file reports "1.000, March 30, 1995" - // SCI interpreter version 1.001.132 (just a guess) - {{"freddypharkas", "CD", { - {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, - {"resource.000", 0, "fed4808fdb72486908ac7ad0044b14d8", 1456640}, - {"resource.001", 0, "15298fac241b5360763bfb68add1db07", 1456640}, - {"resource.002", 0, "419dbd5366f702b4123dedbbb0cffaae", 1456640}, - {"resource.003", 0, "05acdc256c742e79c50b9fe7ec2cc898", 863310}, - {"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Freddy Pharkas - Spanish DOS (from jvprat) - // Executable scanning reports "1.cfs.081", VERSION file reports "1.000, March 30, 1995" - // SCI interpreter version 1.001.132 (just a guess) - {{"freddypharkas", "Floppy", { - {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, - {"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230}, - {"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Freddy Pharkas - English DOS CD Demo - // SCI interpreter version 1.001.095 - {{"freddypharkas", "CD Demo", { - {"resource.map", 0, "a62a7eae85dd1e6b07f39662b278437e", 1918}, - {"resource.000", 0, "4962a3c4dd44e36e78ea4a7a374c2220", 957382}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NONE}, - 0 - }, - - // Fun Seeker's Guide - English DOS - // SCI interpreter version 0.000.506 - {{"funseeker", "", { - {"resource.map", 0, "7ee6859ef74314f6d91938c3595348a9", 282}, - {"resource.001", 0, "f1e680095424e31f7fae1255d36bacba", 40692}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Gabriel Knight - English DOS CD Demo - // SCI interpreter version 1.001.092 - {{"gk1", "CD Demo", { - {"resource.map", 0, "39645952ae0ed8072c7e838f31b75464", 2490}, - {"resource.000", 0, "eb3ed7477ca4110813fe1fcf35928561", 1718450}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NONE}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Gabriel Knight - English DOS Floppy - // SCI interpreter version 2.000.000 - {{"gk1", "", { - {"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10783}, - {"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Gabriel Knight - English DOS Floppy (supplied my markcoolio in bug report #2723777) - // SCI interpreter version 2.000.000 - {{"gk1", "", { - {"resource.map", 0, "65e8c14092e4c9b3b3538b7602c8c5ec", 10783}, - {"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Gabriel Knight - German DOS Floppy (supplied my markcoolio in bug report #2723775) - // SCI interpreter version 2.000.000 - {{"gk1", "", { - {"resource.map", 0, "ad6508b0296b25c07b1f58828dc33696", 10789}, - {"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13077029}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Gabriel Knight - English DOS CD (from jvprat) - // Executable scanning reports "2.000.000", VERSION file reports "01.100.000" - {{"gk1", "CD", { - {"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10996}, - {"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 12581736}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Gabriel Knight - German DOS CD (from Tobis87) - // SCI interpreter version 2.000.000 - {{"gk1", "CD", { - {"resource.map", 0, "a7d3e55114c65647310373cb390815ba", 11392}, - {"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13400497}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Gabriel Knight - Spanish DOS CD (from jvprat) - // Executable scanning reports "2.000.000", VERSION file reports "1.000.000, April 13, 1995" - {{"gk1", "CD", { - {"resource.map", 0, "7cb6e9bba15b544ec7a635c45bde9953", 11404}, - {"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13381599}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Gabriel Knight 2 - English Windows Non-Interactive Demo - // Executable scanning reports "2.100.002" - {{"gk2", "Demo", { - {"resource.map", 0, "e0effce11c4908f4b91838741716c83d", 1351}, - {"resource.000", 0, "d04cfc7f04b6f74d13025378be49ec2b", 4640330}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - // Gabriel Knight 2 - English DOS (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "1.1" - {{"gk2", "", { - {"resmap.001", 0, "1b8bf6a23b37ed67358eb825fc687260", 2776}, - {"ressci.001", 0, "24463ae235b1afbbc4ff5e2ed1b8e3b2", 50496082}, - {"resmap.002", 0, "2028230674bb54cd24370e0745e7a9f4", 1975}, - {"ressci.002", 0, "f0edc1dcd704bd99e598c5a742dc7150", 42015676}, - {"resmap.003", 0, "51f3372a2133c406719dafad86369be3", 1687}, - {"ressci.003", 0, "86cb3f3d176994e7f8a9ad663a4b907e", 35313750}, - {"resmap.004", 0, "0f6e48f3e84e867f7d4a5215fcff8d5c", 2719}, - {"ressci.004", 0, "4f30aa6e6f895132402c8652f9e1d741", 58317316}, - {"resmap.005", 0, "2dac0e232262b4a51271fd28559b3e70", 2065}, - {"ressci.005", 0, "14b62d4a3bddee57a03cb1495a798a0f", 38075705}, - {"resmap.006", 0, "ce9359037277b7d7976da185c2fa0aad", 2977}, - {"ressci.006", 0, "8e44e03890205a7be12f45aaba9644b4", 60659424}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, -#endif // ENABLE_SCI32 - - // Hoyle 1 - English DOS (supplied by wibble92 in bug report #2644547) - // SCI interpreter version 0.000.530 - {{"hoyle1", "", { - {"resource.map", 0, "9de9aa6d23569b3c8bf798503cf1216a", 7818}, - {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 162783}, - {"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 342309}, - {"resource.003", 0, "e0dd44069a62a463fd124974b915f10d", 328912}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Hoyle 1 - English DOS (supplied by merkur in bug report #2719227) - // SCI interpreter version 0.000.530 - {{"hoyle1", "", { - {"resource.map", 0, "1034a218943d12f1f36e753fa10c95b8", 4386}, - {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 518308}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - -#if 0 // TODO: unknown if these files are corrupt - // Hoyle 1 - English Amiga (from www.back2roots.org) - // SCI interpreter version 0.000.519 - FIXME: some have 0.000.530, others x.yyy.zzz - {{"hoyle1", "", { - {"resource.map", 0, "2a72b1aba65fa6e339370eb86d8601d1", 5166}, - {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 218755}, - {"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 439502}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, -#endif - - // Hoyle 2 - English DOS - // SCI interpreter version 0.000.572 - {{"hoyle2", "", { - {"resource.map", 0, "4f894d203f64aa23d9ff64d30ae36926", 2100}, - {"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 98138}, - {"resource.002", 0, "8f2dd70abe01112eca464cda818b5eb6", 196631}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Hoyle 2 - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.002.032" - // SCI interpreter version 0.000.685 - {{"hoyle2", "", { - {"resource.map", 0, "62ed48d20c580e5a98f102f7cd93706a", 1356}, - {"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 222704}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - -#if 0 // TODO: unknown if these files are corrupt - // Hoyle 3 - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.005.000" - // SCI interpreter version 1.000.510 - {{"hoyle3", "", { - {"resource.map", 0, "f1f158e428398cb87fc41fb4aa8c2119", 2088}, - {"resource.000", 0, "595b6039ea1356e7f96a52c58eedcf22", 355791}, - {"resource.001", 0, "143df8aef214a2db34c2d48190742012", 632273}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, -#endif - - // Hoyle 3 - English DOS Non-Interactive Demo - // Executable scanning reports "x.yyy.zzz" - // SCI interpreter version 1.000.510 (just a guess) - {{"hoyle3", "Demo", { - {"resource.map", 0, "0d06cacc87dc21a08cd017e73036f905", 735}, - {"resource.001", 0, "24db2bccda0a3c43ac4a7b5edb116c7e", 797678}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Hoyle 3 - English DOS Floppy (from jvprat) - // Executable scanning reports "x.yyy.zzz", Floppy label reports "1.0, 11.2.91", VERSION file reports "1.000" - // SCI interpreter version 1.000.510 (just a guess) - {{"hoyle3", "", { - {"resource.map", 0, "7216a2972f9c595c45ab314941628e43", 2247}, - {"resource.000", 0, "6ef28cac094dcd97fdb461662ead6f92", 541845}, - {"resource.001", 0, "0a98a268ee99b92c233a0d7187c1f0fa", 845795}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Hoyle 4 - English DOS Demo - // SCI interpreter version 1.001.200 (just a guess) - {{"hoyle4", "Demo", { - {"resource.map", 0, "662087cb383e52e3cc4ae7ecb10e20aa", 938}, - {"resource.000", 0, "24c10844792c54d476d272213cbac300", 675252}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - -#if 0 - // Jones in the Fast Lane - English DOS - // SCI interpreter version 1.000.172 - {{"jones", "", { - {"resource.map", 0, "65cbe19b36fffc71c8e7b2686bd49ad7", 1800}, - {"resource.001", 0, "bac3ec6cb3e3920984ab0f32becf5163", 313476}, - {"resource.002", 0, "b86daa3ba2784d1502da881eedb80d9b", 719747}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, -#endif - - // King's Quest 1 SCI Remake - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.003.007" - // SCI interpreter version 0.001.010 - {{"kq1sci", "SCI Remake", { - {"resource.map", 0, "37ed1a05eb719629eba15059c2eb6cbe", 6798}, - {"resource.001", 0, "9ae2a13708d691cd42f9129173c4b39d", 266621}, - {"resource.002", 0, "9ae2a13708d691cd42f9129173c4b39d", 795123}, - {"resource.003", 0, "9ae2a13708d691cd42f9129173c4b39d", 763224}, - {"resource.004", 0, "9ae2a13708d691cd42f9129173c4b39d", 820443}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 1 SCI Remake - English DOS Non-Interactive Demo - // Executable scanning reports "S.old.010" - {{"kq1sci", "SCI Remake Demo", { - {"resource.map", 0, "59b13619078bd47011421468959ee5d4", 954}, - {"resource.001", 0, "4cfb9040db152868f7cb6a1e8151c910", 296555}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 1 SCI Remake - English DOS (from the King's Quest Collection) - // Executable scanning reports "S.old.010", VERSION file reports "1.000.051" - // SCI interpreter version 0.000.999 - {{"kq1sci", "SCI Remake", { - {"resource.map", 0, "7fe9399a0bec84ca5727309778d27f07", 5790}, - {"resource.001", 0, "fed9e0072ffd511d248674e60dee2099", 555439}, - {"resource.002", 0, "fed9e0072ffd511d248674e60dee2099", 714062}, - {"resource.003", 0, "fed9e0072ffd511d248674e60dee2099", 717478}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 4 - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.002.032" - // SCI interpreter version 0.000.685 - {{"kq4sci", "", { - {"resource.map", 0, "f88dd267fb9504d40a04d599c048d42b", 6354}, - {"resource.000", 0, "77615c595388acf3d1df8e107bfb6b52", 138523}, - {"resource.001", 0, "52c2231765eced34faa7f7bcff69df83", 44751}, - {"resource.002", 0, "fb351106ec865fad9af5d78bd6b8e3cb", 663629}, - {"resource.003", 0, "fd16c9c223f7dc5b65f06447615224ff", 683016}, - {"resource.004", 0, "3fac034c7d130e055d05bc43a1f8d5f8", 549993}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 4 - English DOS Non-Interactive Demo - // Executable scanning reports "0.000.494" - {{"kq4sci", "Demo", { - {"resource.map", 0, "992ac7cc31d3717fe53818a9bb6d1dae", 594}, - {"resource.001", 0, "143e1c14f15ad0fbfc714f648a65f661", 205330}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // King's Quest 4 - English DOS (from the King's Quest Collection) - // Executable scanning reports "0.000.502" - // SCI interpreter version 0.000.502 - {{"kq4sci", "", { - {"resource.map", 0, "3164a39790b599c954ecf716d0b32be8", 7476}, - {"resource.001", 0, "77615c595388acf3d1df8e107bfb6b52", 452523}, - {"resource.002", 0, "77615c595388acf3d1df8e107bfb6b52", 536573}, - {"resource.003", 0, "77615c595388acf3d1df8e107bfb6b52", 707591}, - {"resource.004", 0, "77615c595388acf3d1df8e107bfb6b52", 479562}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // King's Quest 4 - English DOS - // SCI interpreter version 0.000.274 - {{"kq4sci", "", { - {"resource.map", 0, "adbe267662a5915d3c89c9075ec8cf3e", 9474}, - {"resource.001", 0, "851a62d00972dc4002f472cc0d84e71d", 188239}, - {"resource.002", 0, "851a62d00972dc4002f472cc0d84e71d", 329895}, - {"resource.003", 0, "851a62d00972dc4002f472cc0d84e71d", 355385}, - {"resource.004", 0, "851a62d00972dc4002f472cc0d84e71d", 322951}, - {"resource.005", 0, "851a62d00972dc4002f472cc0d84e71d", 321593}, - {"resource.006", 0, "851a62d00972dc4002f472cc0d84e71d", 333777}, - {"resource.007", 0, "851a62d00972dc4002f472cc0d84e71d", 341038}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // King's Quest 4 - English DOS - // SCI interpreter version 0.000.253 - {{"kq4sci", "", { - {"resource.map", 0, "381d9dcb69c626f0a60631dbfec1d13a", 9474}, - {"resource.001", 0, "0c8566848a76eea19a6d6220914030a7", 191559}, - {"resource.002", 0, "0c8566848a76eea19a6d6220914030a7", 333345}, - {"resource.003", 0, "0c8566848a76eea19a6d6220914030a7", 358513}, - {"resource.004", 0, "0c8566848a76eea19a6d6220914030a7", 326297}, - {"resource.005", 0, "0c8566848a76eea19a6d6220914030a7", 325102}, - {"resource.006", 0, "0c8566848a76eea19a6d6220914030a7", 337288}, - {"resource.007", 0, "0c8566848a76eea19a6d6220914030a7", 343882}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // King's Quest 5 - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.004.018" - // SCI interpreter version 1.000.060 - {{"kq5", "", { - {"resource.map", 0, "fcbcca058e1157221ffc27251cd59bc3", 8040}, - {"resource.000", 0, "c595ca99e7fa9b2cabcf69cfab0caf67", 344909}, - {"resource.001", 0, "964a3be90d810a99baf72ea70c09f935", 836477}, - {"resource.002", 0, "d10f3e8ff2cd95a798b21cd08797b694", 814730}, - {"resource.003", 0, "f72fdd994d9ba03a8360d639f256344e", 804882}, - {"resource.004", 0, "a5b80f95c66b3a032348989408eec287", 747914}, - {"resource.005", 0, "31a5487f4d942e6354d5be49d59707c9", 834146}, - {"resource.006", 0, "26c0c25399b6715fec03fc3e12544fe3", 823048}, - {"resource.007", 0, "b914b5901e786327213e779725d30dd1", 778772}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 5 - German Amiga - // Executable scanning reports "1.004.024" - // SCI interpreter version 1.000.060 - {{"kq5", "", { - {"resource.map", 0, "bfbffd923cd64b24498e54f797aa6e41", 8250}, - {"resource.000", 0, "79479b5e4e5b0085d8eea1c7ff0f9f5a", 306893}, - {"resource.001", 0, "7840aadc82977c7b4f504a7e4a12829f", 720376}, - {"resource.002", 0, "d547167d4204170b44de8e1d63506215", 792586}, - {"resource.003", 0, "9cbb0712816097cbc9d0c1f987717c7f", 646446}, - {"resource.004", 0, "319712573661bd122390cdfbafb000fd", 831842}, - {"resource.005", 0, "5aa3d59968b569cd509dde00d4eb8751", 754201}, - {"resource.006", 0, "56546b20db11a4836f900efa6d3a3e74", 672099}, - {"resource.007", 0, "56546b20db11a4836f900efa6d3a3e74", 794194}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 5 - Italian Amiga - // Executable scanning reports "1.004.024" - // SCI interpreter version 1.000.060 - {{"kq5", "", { - {"resource.map", 0, "12e2f80c0269932411716dad06d2b229", 8250}, - {"resource.000", 0, "c598ff615a61bc0e418761283409f128", 305879}, - {"resource.001", 0, "17e63cfe78632fe07222e13a26dc0fb2", 720023}, - {"resource.002", 0, "abb340a53e4873a7c3bacfb16c0b779d", 792432}, - {"resource.003", 0, "aced8ce0be07eef77c0e7cff8cc4e476", 646088}, - {"resource.004", 0, "13fc1f1679f7f226ba52ffffe2e65f38", 831805}, - {"resource.005", 0, "de3c5c09e350fded36ca354998c2194d", 754784}, - {"resource.006", 0, "11cb750f5f816445ad0f4b9f50a4f59a", 672527}, - {"resource.007", 0, "11cb750f5f816445ad0f4b9f50a4f59a", 794259}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 5 - English DOS CD (from the King's Quest Collection) - // Executable scanning reports "x.yyy.zzz", VERSION file reports "1.000.052" - // SCI interpreter version 1.000.784 - {{"kq5", "CD", { - {"resource.map", 0, "f68ba690e5920725dcf9328001b90e33", 13122}, - {"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368}, - {"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // King's Quest 5 - English DOS Floppy - // SCI interpreter version 1.000.060 - {{"kq5", "", { - {"resource.map", 0, "d6172c27b453350e158815fbae23f41e", 8004}, - {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276351}, - {"resource.001", 0, "3f28c72dc7531aaccf8e972c7ee50d14", 1022087}, - {"resource.002", 0, "3e56ba5bf5e8637c619b57f6b6cacbb4", 1307211}, - {"resource.003", 0, "5d5d498f33ca7cde0d5b058630b36ad3", 1347875}, - {"resource.004", 0, "944a996f9cc90dabde9f51ed7dd52366", 1239689}, - {"resource.005", 0, "b6c43441cb78a9b484efc8e614aac092", 1287999}, - {"resource.006", 0, "672ede1136e9e401658538e51bd5dc22", 1172619}, - {"resource.007", 0, "2f48faf27666b58c276dda20f91f4a93", 1240456}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 5 - German DOS Floppy (supplied by markcoolio in bug report #2727101) - // SCI interpreter version 1.000.060 - {{"kq5", "", { - {"resource.map", 0, "bff44f0c326a71b1757c793a02b502d6", 8283}, - {"resource.000", 0, "d7ed18ec4a5de02a9a57830aa65a600d", 336826}, - {"resource.001", 0, "b1e5ec6a17be7e75ddb955f6f73191e4", 1136919}, - {"resource.002", 0, "04a88122db44610a4af019a579ec5ff6", 1340813}, - {"resource.003", 0, "215bb35acefae75fc80757c717166d7e", 1323916}, - {"resource.004", 0, "fecdec847e3bd8e3b0f9827900aa95fd", 1331811}, - {"resource.005", 0, "9c429782d102739f6bbb81e8b953b0cb", 1267525}, - {"resource.006", 0, "d1a75fdc01840664d00366cff6919366", 1208972}, - {"resource.007", 0, "c07494f0cce7c05210893938786a955b", 1337361}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 5 - French DOS Floppy (from the King's Quest Collector's Edition 1994) - // Supplied by aroenai in bug report #2812611 - // VERSION file reports "1.000", SCI interpreter version 1.000.784 - {{"kq5", "", { - {"resource.map", 0, "eb7853832f3bb10900b13b421a0bbe7f", 8283}, - {"resource.000", 0, "f063775b279208c14a83eda47073be90", 332806}, - {"resource.001", 0, "3e6add38564250fd1a5bb10593007530", 1136827}, - {"resource.002", 0, "d9a97a9cf6c79bbe8f19378f6dea45d5", 1343738}, - {"resource.003", 0, "bef90d755076c110e67ee3e635503f82", 1324811}, - {"resource.004", 0, "c14dbafcfbe00855ac6b2f2701058047", 1332216}, - {"resource.005", 0, "f4b31cafc5defac75125c5f7b7f9a31a", 1268334}, - {"resource.006", 0, "f7dc85307632ef657ceb1651204f6f51", 1210081}, - {"resource.007", 0, "7db4d0a1d8d547c0019cb7d2a6acbdd4", 1338473}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 5 - Italian DOS Floppy (from glorifindel) - // SCI interpreter version 1.000.060 - {{"kq5", "", { - {"resource.map", 0, "d55c9e83894a0885e37cd79bacf86384", 8283}, - {"resource.000", 0, "c99bbb11ace4aaacdc98b588a2ecea06", 332246}, - {"resource.001", 0, "42b98457b1a7282daa27afd89eef53f4", 1136389}, - {"resource.002", 0, "8cdc160f9dfc84aed7caa6c66fa31000", 1340730}, - {"resource.003", 0, "d0cb52dc41488c018359aa79a6527f51", 1323676}, - {"resource.004", 0, "e5c57060adf2b5c6fc24142acba023da", 1331097}, - {"resource.005", 0, "f4e441f284560eaa8022102315656a7d", 1267757}, - {"resource.006", 0, "8eeabd92af71e766e323db2100879102", 1209325}, - {"resource.007", 0, "dc10c107e0923b902326a040b9c166b9", 1337859}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722) - // SCI interpreter version 1.000.060 - {{"kq5", "", { - {"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998}, - {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398}, - {"resource.001", 0, "c0f48d4a7ebeaa6aa074fc98d77423e9", 1018560}, - {"resource.002", 0, "7f188a95acdb60bbe32a8379ba299393", 1307048}, - {"resource.003", 0, "0860785af59518b94d54718dddcd6907", 1348500}, - {"resource.004", 0, "c4745dd1e261c22daa6477961d08bf6c", 1239887}, - {"resource.005", 0, "6556ff8e7c4d1acf6a78aea154daa76c", 1287869}, - {"resource.006", 0, "da82e4beb744731d0a151f1d4922fafa", 1170456}, - {"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176}, - {NULL, 0, NULL, 0}}, Common::PL_POL, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 6 - English DOS Non-Interactive Demo - // Executable scanning reports "1.001.055", VERSION file reports "1.000.000" - // SCI interpreter version 1.001.055 - {{"kq6", "Demo", { - {"resource.map", 0, "f75727c00a6d884234fa2a43c951943a", 706}, - {"resource.000", 0, "535b1b920441ec73f42eaa4ccfd47b89", 264116}, - {"resource.msg", 0, "54d1fdc936f98c81f9e4c19e04fb1510", 8260}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 6 - English DOS Floppy - // SCI interpreter version 1.001.054 - {{"kq6", "", { - {"resource.map", 0, "a362063318eebe7d6423b1d9dc6213e1", 8703}, - {"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324}, - {"resource.msg", 0, "3cf5de44de36191f109d425b8450efc8", 258590}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 6 - German DOS Floppy (supplied by markcoolio in bug report #2727156) - // SCI interpreter version 1.001.054 - {{"kq6", "", { - {"resource.map", 0, "a362063318eebe7d6423b1d9dc6213e1", 8703}, - {"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324}, - {"resource.msg", 0, "756297b2155db9e43f621c6f6fb763c3", 282822}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 6 - English Windows CD (from the King's Quest Collection) - // Executable scanning reports "1.cfs.158", VERSION file reports "1.034 9/11/94 - KQ6 version 1.000.00G" - // SCI interpreter version 1.001.054 - {{"kq6", "CD", { - {"resource.map", 0, "7a550ebfeae2575ca00d47703a6a774c", 9215}, - {"resource.000", 0, "233394a5f33b475ae5975e7e9a420865", 8376352}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // King's Quest 6 - Spanish DOS CD (from jvprat) - // Executable scanning reports "1.cfs.158", VERSION file reports "1.000.000, July 5, 1994" - // SCI interpreter version 1.001.055 - {{"kq6", "CD", { - {"resource.map", 0, "a73a5ab04b8f60c4b75b946a4dccea5a", 8953}, - {"resource.000", 0, "4da3ad5868a775549a7cc4f72770a58e", 8537260}, - {"resource.msg", 0, "41eed2d3893e1ca6c3695deba4e9d2e8", 267102}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - -#ifdef ENABLE_SCI32 - // King's Quest 7 - English DOS (from the King's Quest Collection) - // Executable scanning reports "2.100.002", VERSION file reports "1.4" - {{"kq7", "", { - {"resource.map", 0, "2be9ab94429c721af8e05c507e048a15", 18697}, - {"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 203882535}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 7 - English DOS (from FRG) - // SCI interpreter version 2.100.002 - {{"kq7", "", { - {"resource.map", 0, "8676b0fbbd7362989a029fe72fea14c6", 18709}, - {"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 7 - German Windows (supplied by markcoolio in bug report #2727402) - // SCI interpreter version 2.100.002 - {{"kq7", "", { - {"resource.map", 0, "838b9ff132bd6962026fee832e8a7ddb", 18697}, - {"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 206626576}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 7 - Spanish DOS (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "2.00" - {{"kq7", "", { - {"resource.map", 0, "0b62693cbe87e3aaca3e8655a437f27f", 18709}, - {"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // King's Quest 7 - English DOS Non-Interactive Demo - // SCI interpreter version 2.100.002 - {{"kq7", "Demo", { - {"resource.map", 0, "b44f774108d63faa1d021101221c5a54", 1690}, - {"resource.000", 0, "d9659d2cf0c269c6a9dc776707f5bea0", 2433827}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, -#endif // ENABLE_SCI32 - - // Laura Bow - English Amiga - // Executable scanning reports "1.002.030" - // SCI interpreter version 0.000.685 - {{"laurabow", "", { - {"resource.map", 0, "731ab85e138f8cef1a7f4d1f36dfd375", 7422}, - {"resource.000", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 126317}, - {"resource.001", 0, "42fe895e9eb60e103025fd9ca737a849", 264763}, - {"resource.002", 0, "6f1ebd3692ce76644e0e06a38b7b56b5", 677436}, - {"resource.003", 0, "2ab23f64306b18c28302c8ec2964c5d6", 605134}, - {"resource.004", 0, "aa553977f7e5804081de293800d3bcce", 695067}, - {"resource.005", 0, "bfd870d51dc97729f0914095f58e6957", 676881}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow - English Atari ST (from jvprat) - // Executable scanning reports "1.002.030", Floppy label reports "1.000.062, 9.23.90" - // SCI interpreter version 0.000.685 - {{"laurabow", "", { - {"resource.map", 0, "9f90878e6e1b8c96e692203f068ce2b1", 8478}, - {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 515964}, - {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 721149}, - {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 667365}, - {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 683737}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow - English DOS Non-Interactive Demo - // Executable scanning reports "x.yyy.zzz" - {{"laurabow", "Demo", { - {"resource.map", 0, "e625726268ff4e123ada11f31f0249f3", 768}, - {"resource.001", 0, "0c8912290af0890f8d95faeb4ddb2d68", 333031}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow - English DOS 3.5" Floppy (from "The Roberta Williams Anthology"/1996) - // SCI interpreter version 0.000.631 - {{"laurabow", "", { - {"resource.map", 0, "4e511f47d9893fa529d6621a93fa0030", 8478}, - {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 515788}, - {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 721381}, - {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 667468}, - {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 683807}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow - English DOS (from FRG) - // SCI interpreter version 0.000.631 (or 0.000.685?) - {{"laurabow", "", { - {"resource.map", 0, "b1905f6aa68ff65a057b080b1eae954c", 12030}, - {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 108032}, - {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 354680}, - {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 361815}, - {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 339714}, - {"resource.005", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 327465}, - {"resource.006", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 328390}, - {"resource.007", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 317687}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow - German DOS (from Tobis87) - // SCI interpreter version 0.000.631 (or 0.000.685?) - {{"laurabow", "", { - {"resource.map", 0, "b1905f6aa68ff65a057b080b1eae954c", 12030}, - {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 108032}, - {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 354680}, - {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 361815}, - {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 339714}, - {"resource.005", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 327465}, - {"resource.006", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 328390}, - {"resource.007", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 317687}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow 2 - English DOS Non-Interactive Demo (from FRG) - // Executable scanning reports "x.yyy.zzz" - // SCI interpreter version 1.001.069 (just a guess) - {{"laurabow2", "Demo", { - {"resource.map", 0, "24dffc5db1d88c7999f13e8767ed7346", 855}, - {"resource.000", 0, "2b2b1b4f7584f9b38fd13f6ab95634d1", 781912}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow 2 - English DOS Floppy - // Executable scanning reports "2.000.274" - // SCI interpreter version 1.001.069 (just a guess) - {{"laurabow2", "", { - {"resource.map", 0, "610bfd9a852004222f0faaf5fc9e630a", 6489}, - {"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5035964}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow 2 - English DOS CD (from "The Roberta Williams Antology"/1996) - // Executable scanning reports "1.001.072", VERSION file reports "1.1" (from jvprat) - // SCI interpreter version 1.001.069 (just a guess) - {{"laurabow2", "CD", { - {"resource.map", 0, "a70945e61ba7ac7bfea6b7bd72c6aec5", 7274}, - {"resource.000", 0, "82578b8d5a7e09c4c58891ca49fae35b", 5598672}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Laura Bow 2 v1.1 - German DOS Floppy (from Tobis87, updated info from markcoolio in bug report #2723787, updated info from #2797962)) - // Executable scanning reports "2.000.274" - {{"laurabow2", "", { - {"resource.map", 0, "3b6dfbcda210bbc3f23fd1927113bf98", 6483}, - {"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766}, - {"resource.msg", 0, "795c928cd00dfec9fbc62ebcd12e1f65", 303185}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Laura Bow 2 - Spanish DOS CD (from jvprat) - // Executable scanning reports "2.000.274", VERSION file reports "1.000.000, May 10, 1994" - {{"laurabow2", "CD", { - {"resource.map", 0, "3b6dfbcda210bbc3f23fd1927113bf98", 6483}, - {"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766}, - {"resource.msg", 0, "71f1f0cd9f082da2e750c793a8ed9d84", 286141}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 1 EGA Remake - English DOS (from spookypeanut) - // SCI interpreter version 0.000.510 (or 0.000.577?) - {{"lsl1sci", "EGA Remake", { - {"resource.map", 0, "abc0dc50c55de5b9723bb6de193f8756", 3282}, - {"resource.000", 0, "d3bceaebef3f7be941c2038b3565161e", 451366}, - {"resource.001", 0, "38936d3c68b6f79d3ffb13955713fed7", 591352}, - {"resource.002", 0, "24c958bc922b07f91e25e8c93aa01fcf", 491230}, - {"resource.003", 0, "685cd6c1e05a695ab1e0db826337ee2a", 553279}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 1 VGA Remake - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.004.024" - // SCI interpreter version 1.000.784 - {{"lsl1sci", "VGA Remake", { - {"resource.map", 0, "7d115a9e27dc8ac71e8d5ef33d589bd5", 3366}, - {"resource.000", 0, "e67fd129d5810fc7ad8ea509d891cc00", 363073}, - {"resource.001", 0, "24ed6dc01b1e7fbc66c3d63a5994549a", 750465}, - {"resource.002", 0, "5790ac0505f7ca98d4567132b875eb1e", 681041}, - {"resource.003", 0, "4a34c3367c2fe7eb380d741374da1989", 572251}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 1 VGA Remake - English DOS (from spookypeanut) - // Executable scanning reports "1.000.577", VERSION file reports "2.1" - {{"lsl1sci", "VGA Remake", { - {"resource.map", 0, "6d04d26466337a1a64b8c6c0eb65c9a9", 3222}, - {"resource.000", 0, "d3bceaebef3f7be941c2038b3565161e", 922406}, - {"resource.001", 0, "ec20246209d7b19f38989261e5c8f5b8", 1111226}, - {"resource.002", 0, "85d6935ef77e6b0e16bc307640a0d913", 1088312}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 1 VGA Remake - English DOS (from FRG) - // SCI interpreter version 1.000.510 - {{"lsl1sci", "VGA Remake", { - {"resource.map", 0, "8606b083b011a0cc4a1fbfc2198a0a77", 3198}, - {"resource.000", 0, "d3bceaebef3f7be941c2038b3565161e", 918242}, - {"resource.001", 0, "d34cadb11e1aefbb497cf91bc1d3baa7", 1114688}, - {"resource.002", 0, "85b030bb66d5342b0a068f1208c431a8", 1078443}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 1 VGA Remake - English DOS Non-Interactive Demo - // SCI interpreter version 1.000.084 - {{"lsl1sci", "VGA Remake Demo", { - {"resource.map", 0, "434e1f6c39d71647b34f0ee57b2bbd68", 444}, - {"resource.001", 0, "0c0768215c562d9dace4a5ca53696cf3", 359913}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Larry 1 VGA Remake - Spanish DOS (from the Leisure Suit Larry Collection) - // Executable scanning reports "1.SQ4.057", VERSION file reports "1.000" - // This version is known to be corrupted - // SCI interpreter version 1.000.510 - {{"lsl1sci", "VGA Remake", { - {"resource.map", 0, "4fbe5c25878d51d7b2a68b710de4491b", 3327}, - {"resource.000", 0, "5e501a9bf8c753bf4c96158042422f00", 839172}, - {"resource.001", 0, "112648995dbc194037f1e4ed2e195910", 1063341}, - {"resource.002", 0, "3fe2a3aec0ed53c7d6db1845a67e3aa2", 1095908}, - {"resource.003", 0, "ac175df0ea9a2cba57f0248651856d27", 376556}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 1 VGA Remake - Russian DOS - // Executable scanning reports "1.000.510", VERSION file reports "2.0" - // SCI interpreter version 1.000.510 - {{"lsl1sci", "VGA Remake", { - {"resource.map", 0, "b54413d35e206d21ae2b2bdb092bd13a", 3198}, - {"resource.000", 0, "0d7b2afa666bd36d9535a15d3a837a66", 928566}, - {"resource.001", 0, "bc8ca10c807515d959cbd91f9ba47735", 1123759}, - {"resource.002", 0, "b7409ab32bc3bee2d6cce887cd33f2b6", 1092160}, - {NULL, 0, NULL, 0}}, Common::RU_RUS, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 2 - English Amiga (from www.back2roots.org) - // Executable scanning reports "x.yyy.zzz" - // SCI interpreter version 0.000.572 - {{"lsl2", "", { - {"resource.map", 0, "e36ce0fc94d1678d15acbf12d84ec47d", 6612}, - {"resource.001", 0, "a0d4a625311d307257da7fc43d00459d", 409124}, - {"resource.002", 0, "a0d4a625311d307257da7fc43d00459d", 630106}, - {"resource.003", 0, "a0d4a625311d307257da7fc43d00459d", 570356}, - {"resource.004", 0, "a0d4a625311d307257da7fc43d00459d", 717844}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 2 - English DOS Non-Interactive Demo - // Executable scanning reports "x.yyy.zzz" - // SCI interpreter version 0.000.409 - {{"lsl2", "Demo", { - {"resource.map", 0, "03dba704bb77da55a91ad27b5a3cac09", 528}, - {"resource.001", 0, "9f5520f0297206928df0b0b36493cd33", 127532}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 2 - English DOS - // SCI interpreter version 0.000.409 - {{"lsl2", "", { - {"resource.map", 0, "42258cf767a8ebaa9e66b6151a80e601", 5628}, - {"resource.001", 0, "4a24443a25e2b1492462a52809605dc2", 143847}, - {"resource.002", 0, "4a24443a25e2b1492462a52809605dc2", 348331}, - {"resource.003", 0, "4a24443a25e2b1492462a52809605dc2", 236550}, - {"resource.004", 0, "4a24443a25e2b1492462a52809605dc2", 204861}, - {"resource.005", 0, "4a24443a25e2b1492462a52809605dc2", 277732}, - {"resource.006", 0, "4a24443a25e2b1492462a52809605dc2", 345683}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 2 - English DOS - // SCI interpreter version 0.000.343 - {{"lsl2", "", { - {"resource.map", 0, "6bd43c92eaf561f64818116eed683fcf", 5598}, - {"resource.001", 0, "96033f57accfca903750413fd09193c8", 140526}, - {"resource.002", 0, "96033f57accfca903750413fd09193c8", 348672}, - {"resource.003", 0, "96033f57accfca903750413fd09193c8", 236676}, - {"resource.004", 0, "96033f57accfca903750413fd09193c8", 204867}, - {"resource.005", 0, "96033f57accfca903750413fd09193c8", 274953}, - {"resource.006", 0, "96033f57accfca903750413fd09193c8", 345818}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 3 - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.002.032" - // SCI interpreter version 0.000.685 - {{"lsl3", "", { - {"resource.map", 0, "4a6da6322ce189431b5ffbac992bad3a", 5328}, - {"resource.000", 0, "cdc2e21e297b10fe8fed6377af8c5698", 66523}, - {"resource.001", 0, "6abbaf8c7e3b36dd868868ed187e8995", 71761}, - {"resource.002", 0, "a883424fe6d594fec0cd5a79e7ad54c8", 476490}, - {"resource.003", 0, "5c10e462c8cf589610773e4fe8bfd996", 527238}, - {"resource.004", 0, "f408e59cbee1457f042e5773b8c53951", 651634}, - {"resource.005", 0, "433911eb764089d493aed1f958a5615a", 524259}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 3 - English DOS - // SCI interpreter version 0.000.572 - {{"lsl3", "", { - {"resource.map", 0, "0b6bd3e039682830a51c5755c06591db", 5916}, - {"resource.001", 0, "f18441027154292836b973c655fa3175", 456722}, - {"resource.002", 0, "f18441027154292836b973c655fa3175", 578024}, - {"resource.003", 0, "f18441027154292836b973c655fa3175", 506807}, - {"resource.004", 0, "f18441027154292836b973c655fa3175", 513651}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 3 - English DOS - // SCI interpreter version 0.000.572 - {{"lsl3", "", { - {"resource.map", 0, "0f429f5186f96d6c501838a1cb44bd43", 7452}, - {"resource.001", 0, "f18441027154292836b973c655fa3175", 141381}, - {"resource.002", 0, "f18441027154292836b973c655fa3175", 345171}, - {"resource.003", 0, "f18441027154292836b973c655fa3175", 329214}, - {"resource.004", 0, "f18441027154292836b973c655fa3175", 290173}, - {"resource.005", 0, "f18441027154292836b973c655fa3175", 302946}, - {"resource.006", 0, "f18441027154292836b973c655fa3175", 282465}, - {"resource.007", 0, "f18441027154292836b973c655fa3175", 257174}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 3 - English DOS Non-Interactive Demo - // SCI interpreter version 0.000.530 - {{"lsl3", "Demo", { - {"resource.map", 0, "33a2384f395470af3d2180e37ad0322a", 1140}, - {"resource.001", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 76525}, - {"resource.002", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 268299}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 3 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723832) - // Executable scanning reports "S.old.123" - // SCI interpreter version 0.000.572 (just a guess) - {{"lsl3", "", { - {"resource.map", 0, "4a77c8382e48a90c4168d3c144fc1b8f", 6480}, - {"resource.001", 0, "3827a9b17b926e12dcc336860f50612a", 460488}, - {"resource.002", 0, "3827a9b17b926e12dcc336860f50612a", 672403}, - {"resource.003", 0, "3827a9b17b926e12dcc336860f50612a", 587036}, - {"resource.004", 0, "3827a9b17b926e12dcc336860f50612a", 691932}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 3 - French DOS (provided by richiefs in bug report #2670691) - // Executable scanning reports "S.old.123" - // SCI interpreter version 0.000.572 (just a guess) - {{"lsl3", "", { - {"resource.map", 0, "13541234d440c7988a13582468b0e4be", 6480}, - {"resource.001", 0, "65f1bdaa20f6d0470e9d969f22473873", 457402}, - {"resource.002", 0, "65f1bdaa20f6d0470e9d969f22473873", 671614}, - {"resource.003", 0, "65f1bdaa20f6d0470e9d969f22473873", 586921}, - {"resource.004", 0, "65f1bdaa20f6d0470e9d969f22473873", 690826}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Larry 5 - English Amiga - // Executable scanning reports "1.004.023" - // SCI interpreter version 1.000.784 - {{"lsl5", "", { - {"resource.map", 0, "e36052ae0c8b14d6f074bcb0aee50a38", 6096}, - {"resource.000", 0, "d8b58ce10de52aa16f8b2006838c4fcc", 310510}, - {"resource.001", 0, "8caa8fbb50ea43f3efdfb66f1e68998b", 800646}, - {"resource.002", 0, "abdaa299e00c908052d33cd82eb60e9b", 784576}, - {"resource.003", 0, "810ad1d61638c27a780576cb09f18ed7", 805941}, - {"resource.004", 0, "3ce5901f1bc171ac0274d99a4eeb9e57", 623022}, - {"resource.005", 0, "f8b2d1137bb767e5d232056b99dd69eb", 623621}, - {"resource.006", 0, "bafc64e3144f115dc58c6aee02de98fb", 715598}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 5 - German Amiga - // Executable scanning reports "1.004.024" - // SCI interpreter version 1.000.784 - {{"lsl5", "", { - {"resource.map", 0, "863326c2eb5160f0b0960e159e8bf954", 6372}, - {"resource.000", 0, "5113d03db08e3da77a5b61294001331b", 357525}, - {"resource.001", 0, "59eba83ad465b08d763b44f86afa86f6", 837566}, - {"resource.002", 0, "59eba83ad465b08d763b44f86afa86f6", 622229}, - {"resource.003", 0, "59eba83ad465b08d763b44f86afa86f6", 383690}, - {"resource.004", 0, "59eba83ad465b08d763b44f86afa86f6", 654296}, - {"resource.005", 0, "59eba83ad465b08d763b44f86afa86f6", 664717}, - {"resource.006", 0, "bafc64e3144f115dc58c6aee02de98fb", 754966}, - {"resource.007", 0, "59eba83ad465b08d763b44f86afa86f6", 683135}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 5 - English DOS Non-Interactive Demo (from FRG) - // SCI interpreter version 1.000.181 - {{"lsl5", "Demo", { - {"resource.map", 0, "efe8d3f45ce4f6bd9a6643e0ac8d2a97", 504}, - {"resource.001", 0, "8bd8d9c0b5f455ee1269d63ce86c50dd", 531380}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Larry 5 - English DOS (from spookypeanut) - // SCI interpreter version 1.000.510 - {{"lsl5", "", { - {"resource.map", 0, "be00ef895197754ae4eab021ca44cbcd", 6417}, - {"resource.000", 0, "f671ab479df0c661b19cd16237692846", 726823}, - {"resource.001", 0, "db4a1381d88028876a99303bfaaba893", 751296}, - {"resource.002", 0, "d39d8db1a1e7806e7ccbfea3ef22df44", 1137646}, - {"resource.003", 0, "13fd4942bb818f9acd2970d66fca6509", 768599}, - {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 1024516}, - {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 1011944}, - {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1024810}, - {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 1030656}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 5 - German DOS (from Tobis87) - // SCI interpreter version 1.000.510 (just a guess) - {{"lsl5", "", { - {"resource.map", 0, "c97297aa76d4dd2ed144c7b7769e2caf", 6867}, - {"resource.000", 0, "4c00c14b8181ad47076a51d86097d97e", 759095}, - {"resource.001", 0, "245c44f8ccd796732e61857e67b30079", 918742}, - {"resource.002", 0, "e86aeb27711f4a673e06ec32cfc84125", 947382}, - {"resource.003", 0, "74edc89d8c1cb346ca346081b927e4c6", 1006884}, - {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 1023776}, - {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 959342}, - {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1021774}, - {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 993408}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 5 - French DOS (provided by richiefs in bug report #2670691) - // Executable scanning reports "1.lsl5.019" - // SCI interpreter version 1.000.510 (just a guess) - {{"lsl5", "", { - {"resource.map", 0, "499898e652dc41b51e368ae41acce41f", 7023}, - {"resource.000", 0, "4c00c14b8181ad47076a51d86097d97e", 958096}, - {"resource.001", 0, "245c44f8ccd796732e61857e67b30079", 1196765}, - {"resource.002", 0, "e86aeb27711f4a673e06ec32cfc84125", 948898}, - {"resource.003", 0, "74edc89d8c1cb346ca346081b927e4c6", 1006608}, - {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 971293}, - {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 920524}, - {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 946540}, - {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 958842}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 5 - Spanish DOS (from the Leisure Suit Larry Collection) - // Executable scanning reports "1.ls5.006", VERSION file reports "1.000, 4/21/92" - // SCI interpreter version 1.000.510 (just a guess) - {{"lsl5", "", { - {"resource.map", 0, "b6f7da7bf24e5a6b2946032cec3ea59c", 6861}, - {"resource.000", 0, "4c00c14b8181ad47076a51d86097d97e", 765418}, - {"resource.001", 0, "245c44f8ccd796732e61857e67b30079", 916028}, - {"resource.002", 0, "e86aeb27711f4a673e06ec32cfc84125", 929645}, - {"resource.003", 0, "74edc89d8c1cb346ca346081b927e4c6", 1005496}, - {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 1021996}, - {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 958079}, - {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1015136}, - {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 987222}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 5 - Italian DOS Floppy (from glorifindel) - // SCI interpreter version 1.000.510 (just a guess) - {{"lsl5", "", { - {"resource.map", 0, "a99776df795127f387cb35dae872d4e4", 5919}, - {"resource.000", 0, "a8989a5a89e7d4f702b26b378c7a357a", 7001981}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 6 - English DOS (from spookypeanut) - // SCI interpreter version 1.001.113 - {{"lsl6", "", { - {"resource.map", 0, "bb8a39d9e2a77ba449a1e591109ad9a8", 6973}, - {"resource.000", 0, "4462fe48c7452d98fddcec327a3e738d", 5789138}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 6 - English/German/French DOS CD - LORES - // SCI interpreter version 1.001.115 - {{"lsl6", "", { - {"resource.map", 0, "0b91234b7112782962cb480b7791b6e2", 7263}, - {"resource.000", 0, "57d5fe8bb9e044158514476ea7678eb0", 5754790}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 6 - German DOS CD - LORES (provided by richiefs in bug report #2670691) - // SCI interpreter version 1.001.115 - {{"lsl6", "", { - {"resource.map", 0, "bafe85f32738854135991d4324ad147e", 7268}, - {"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5773160}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 6 - French DOS CD - LORES (provided by richiefs in bug report #2670691) - // SCI interpreter version 1.001.115 - {{"lsl6", "", { - {"resource.map", 0, "97797ea775baaf18a1907d357d3c0ea6", 7268}, - {"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5776092}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 6 - Spanish DOS - LORES (from the Leisure Suit Larry Collection) - // Executable scanning reports "1.001.113", VERSION file reports "1.000, 11.06.93, FIVE PATCHES ADDED TO DISK 6 ON 11-18-93" - {{"lsl6", "", { - {"resource.map", 0, "633bf8f42170b6271019917c8009989b", 6943}, - {"resource.000", 0, "7884a8db9253e29e6b37a2651fd90ba3", 5733116}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Leisure Suit Larry's Casino - English DOS (from the Leisure Suit Larry Collection) - // Executable scanning reports "1.001.029", VERSION file reports "1.000" - {{"lslcasino", "", { - {"resource.map", 0, "194f1578f2624db813c9072359ad1639", 783}, - {"resource.001", 0, "3733433b517ec3d14a3331d9ab3842ae", 344830}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Larry 6 - English/German DOS CD - HIRES - // SCI interpreter version 2.100.002 - {{"lsl6", "", { - {"resource.map", 0, "0c0804434ea62278dd15032b1947426c", 8872}, - {"resource.000", 0, "9a9f4870504444cda863dd14d077a680", 18520872}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 6 - German DOS CD - HIRES (provided by richiefs in bug report #2670691) - // SCI interpreter version 2.100.002 - {{"lsl6", "", { - {"resource.map", 0, "badfdf446ffed569a310d2c63a249421", 8896}, - {"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18534274}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 6 - French DOS CD - HIRES (provided by richiefs in bug report #2670691) - // SCI interpreter version 2.100.002 - {{"lsl6", "", { - {"resource.map", 0, "d184e9aa4f2d4b5670ddb3669db82cda", 8896}, - {"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18538987}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 7 - English DOS CD (from spookypeanut) - // SCI interpreter version 3.000.000 - {{"lsl7", "", { - {"resmap.000", 0, "eae93e1b1d1ccc58b4691c371281c95d", 8188}, - {"ressci.000", 0, "89353723488219e25589165d73ed663e", 66965678}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 7 - German DOS (from Tobis87) - // SCI interpreter version 3.000.000 - {{"lsl7", "", { - {"resmap.000", 0, "c11e6bfcfc2f2d05da47e5a7df3e9b1a", 8188}, - {"ressci.000", 0, "a8c6817bb94f332ff498a71c8b47f893", 66971724}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 7 - French DOS (provided by richiefs in bug report #2670691) - // SCI interpreter version 3.000.000 - {{"lsl7", "", { - {"resmap.000", 0, "4407849fd52fe3efb0c30fba60cd5cd4", 8206}, - {"ressci.000", 0, "dc37c3055fffbefb494ff22b145d377b", 66964472}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 7 - Italian DOS CD (from glorifindel) - // SCI interpreter version 3.000.000 - {{"lsl7", "", { - {"resmap.000", 0, "9852a97141f789413f29bf956052acdb", 8212}, - {"ressci.000", 0, "440b9fed89590abb4e4386ed6f948ee2", 67140181}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Larry 7 - Spanish DOS (from the Leisure Suit Larry Collection) - // Executable scanning reports "3.000.000", VERSION file reports "1.0s" - {{"lsl7", "", { - {"resmap.000", 0, "8f3d603e1acc834a5d598b30cdfc93f3", 8188}, - {"ressci.000", 0, "32792f9bc1bf3633a88b382bb3f6e40d", 67071418}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Larry 7 - English DOS Demo (provided by richiefs in bug report #2670691) - // SCI interpreter version 2.100.002 - {{"lsl7", "Demo", { - {"ressci.000", 0, "5cc6159688b2dc03790a67c90ccc67f9", 10195878}, - {"resmap.000", 0, "6a2b2811eef82e87cde91cf1de845af8", 2695}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Lighthouse - English Windows Demo (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "1.00" - {{"lighthouse", "Demo", { - {"resource.map", 0, "543124606352bfa5e07696ddf2a669be", 64}, - {"resource.000", 0, "5d7714416b612463d750fb9c5690c859", 28952}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Lighthouse - English Windows Demo - // Executable scanning reports "3.000.000", VERSION file reports "1.00" - {{"lighthouse", "Demo", { - {"resmap.000", 0, "3bdee7a16926975a4729f75cf6b80a92", 1525}, - {"ressci.000", 0, "3c585827fa4a82f4c04a56a0bc52ccee", 11494351}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Lighthouse - English DOS (from jvprat) - // Executable scanning reports "3.000.000", VERSION file reports "1.1" - {{"lighthouse", "", { - {"resmap.001", 0, "47abc502c0b541b582db28f38dbc6a56", 7801}, - {"ressci.001", 0, "14e922c47b92156377cb49e241691792", 99591924}, - {"resmap.002", 0, "c68db5333f152fea6ca2dfc75cad8b34", 7573}, - {"ressci.002", 0, "175468431a979b9f317c294ce3bc1430", 94628315}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Lighthouse - Spanish DOS (from jvprat) - // Executable scanning reports "3.000.000", VERSION file reports "1.1" - {{"lighthouse", "", { - {"resmap.001", 0, "c5d49b2a8a4eafc92fd041a3a0f2da68", 7846}, - {"ressci.001", 0, "18553177dbf83fb2cb6c8edcbb174183", 99543093}, - {"resmap.002", 0, "e7dc85884a2417e2eff9de0c63dd65fa", 7630}, - {"ressci.002", 0, "3c8d627c555b0e3e4f1d9955bc0f0df4", 94631127}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, -#endif // ENABLE_SCI32 - - // Mixed-Up Fairy Tales v1.000 - English DOS Non-Interactive Demo - {{"fairytales", "Demo", { - {"resource.map", 0, "c2cf672c3f4251e7472d4542af3bf764", 933}, - {"resource.000", 0, "8be56a3a88c065ee00c02c0e29199f3a", 14643}, - {"resource.001", 0, "9e33566515b18bee7915db448063bba2", 871853}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Mixed-Up Fairy Tales v1.000 - English DOS (supplied by markcoolio in bug report #2723791) - // Executable scanning reports "1.000.145" - {{"fairytales", "", { - {"resource.map", 0, "9ae5aecc1cb797b11ea5cf0caeea272c", 3261}, - {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 923685}, - {"resource.001", 0, "49c8f7dcd9989e4491a93554bec325b0", 52324}, - {"resource.002", 0, "6767f8c8585f617aaa91d442f41ae714", 1032989}, - {"resource.003", 0, "b1288e0821ee358d1ffe877e5900c8ec", 1047565}, - {"resource.004", 0, "f79daa70390d73746742ffcfc3dc4471", 937580}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Mixed-Up Fairy Tales - English DOS Floppy (from jvprat) - // Executable scanning reports "1.000.145", Floppy label reports "1.0, 11.13.91", VERSION file reports "1.000" - {{"fairytales", "", { - {"resource.map", 0, "66105c02fa8f1785a3fd28957e41cb48", 3249}, - {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 984439}, - {"resource.001", 0, "49c8f7dcd9989e4491a93554bec325b0", 238019}, - {"resource.002", 0, "564f516d991032e781492592a4eaa275", 1414142}, - {"resource.003", 0, "dd6cef0c592eadb7e6be9a25307c57a2", 1344719}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Mixed-Up Mother Goose - English Amiga (from www.back2roots.org) - // Executable scanning reports "1.003.009" - // SCI interpreter version 0.001.010 - {{"mothergoose", "", { - {"resource.map", 0, "4aa28ac93fae03cf854594da13d9229c", 2700}, - {"resource.001", 0, "fb552ae550ca1dac19ed8f6a3767612d", 262885}, - {"resource.002", 0, "fb552ae550ca1dac19ed8f6a3767612d", 817191}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Mixed-Up Mother Goose v2.000 - English DOS Floppy (supplied by markcoolio in bug report #2723795) - // Executable scanning reports "1.001.031" - {{"mothergoose", "", { - {"resource.map", 0, "52aae15e493cafd1da7e1c9b657a5bb9", 7026}, - {"resource.000", 0, "b7ecd8ae9e254e80310b5a668b276e6e", 2948975}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Mixed-Up Mother Goose - English DOS CD (from jvprat) - // Executable scanning reports "x.yyy.zzz" - // SCI interpreter version 0.000.999 (just a guess) - {{"mothergoose", "CD", { - {"resource.map", 0, "1c7f311b0a2c927b2fbe81ae341fb2f6", 5790}, - {"resource.001", 0, "5a0ed1d745855148364de1b3be099bac", 4369438}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Mixed-Up Mother Goose - English Windows Interactive Demo - // Executable scanning reports "x.yyy.zzz" - {{"mothergoose", "Demo", { - {"resource.map", 0, "87f9dc1cafc4d4fa835fb2f00cf3a6ef", 4560}, - {"resource.001", 0, "5a0ed1d745855148364de1b3be099bac", 2070072}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Mixed-Up Mother Goose Deluxe - English Windows/DOS CD (supplied by markcoolio in bug report #2723810) - // Executable scanning reports "2.100.002" - {{"mothergoose", "", { - {"resource.map", 0, "5159a1578c4306bfe070a3e4d8c2e1d3", 4741}, - {"resource.000", 0, "1926925c95d82f0999590e93b02887c5", 15150768}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, -#endif // ENABLE_SCI32 - - // Ms. Astro Chicken - English DOS - // SCI interpreter version 1.000.679 - {{"msastrochicken", "", { - {"resource.map", 0, "5b457cbe5042f557e5b610148171f6c0", 1158}, - {"resource.001", 0, "453ea81ef66a50cbe33ce06302afe47f", 229737}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Phantasmagoria - English DOS (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "1.100.000UK" - {{"phantasmagoria", "", { - {"resmap.001", 0, "416138651ea828219ca454cae18341a3", 11518}, - {"ressci.001", 0, "3aae6559aa1df273bc542d5ac6330d75", 65844612}, - {"resmap.002", 0, "de521d0c7ab32897e7fe58e421c816b7", 12058}, - {"ressci.002", 0, "3aae6559aa1df273bc542d5ac6330d75", 71588691}, - {"resmap.003", 0, "25df95bd7da3686f71a0af8784a2b8ca", 12334}, - {"ressci.003", 0, "3aae6559aa1df273bc542d5ac6330d75", 73651084}, - {"resmap.004", 0, "e108a3d35794f1721aeea3e62a3f8b3b", 12556}, - {"ressci.004", 0, "3aae6559aa1df273bc542d5ac6330d75", 75811935}, - {"resmap.005", 0, "390d81f9e14a3f3ee2ea477135f0288e", 12604}, - {"ressci.005", 0, "3aae6559aa1df273bc542d5ac6330d75", 78814934}, - {"resmap.006", 0, "8ea3c954606e80604680f9fe707f15d8", 12532}, - {"ressci.006", 0, "3aae6559aa1df273bc542d5ac6330d75", 77901360}, - {"resmap.007", 0, "afbd16ea77869a720afa1c5371de107d", 7972}, - //{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 25859038}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Phantasmagoria 2 - English Windows (from jvprat) - // Executable scanning reports "3.000.000", VERSION file reports "001.0.06" - {{"phantasmagoria2", "", { - {"resmap.001", 0, "0a961e135f4f7effb195158325856633", 1108}, - {"ressci.001", 0, "53f457cddb0dffc056593905c4cbb989", 24379964}, - {"resmap.002", 0, "5d3189fe3d4f286f83c5c8031fa3e9f7", 1126}, - {"ressci.002", 0, "53f457cddb0dffc056593905c4cbb989", 34465805}, - {"resmap.003", 0, "c92e3c840b827c236ab6671c03760c56", 1162}, - {"ressci.003", 0, "53f457cddb0dffc056593905c4cbb989", 38606375}, - {"resmap.004", 0, "8d5cfe19365f71370b87063686f39171", 1288}, - {"ressci.004", 0, "53f457cddb0dffc056593905c4cbb989", 42447131}, - {"resmap.005", 0, "8bd5ceeedcbe16dfe55d1b90dcd4be84", 1942}, - {"ressci.005", 0, "05f9fe2bee749659acb3cd2c90252fc5", 67905112}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, -#endif // ENABLE_SCI32 - - // Pepper's Adventure In Time 1.000 English - // Executable scanning reports "1.001.072", VERSION file reports "1.000" - {{"pepper", "", { - {"resource.map", 0, "72726dc81c1b4c1110c486be77369bc8", 5179}, - {"resource.000", 0, "670d0c53622429f4b11275caf7f8d292", 5459574}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Pepper - English DOS Non-Interactive Demo - // Executable scanning reports "1.001.060", VERSION file reports "1.000" - {{"pepper", "Demo", { - {"resource.map", 0, "379bb4fb896630b14f2d91ed21e36ba1", 984}, - {"resource.000", 0, "118f6c31a93ec7fd9a231c61125229e3", 645494}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Pepper - English DOS/Windows Interactive Demo - // Executable scanning reports "1.001.069", VERSION file reports ".001" - {{"pepper", "Demo", { - {"resource.map", 0, "975e8df76106a5c13d12ab674f906a02", 2514}, - {"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1698164}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Pepper - English DOS Interactive Demo - // Executable scanning reports "1.001.072", VERSION file reports "1.000" - {{"pepper", "Demo", { - {"resource.map", 0, "9c9b7b900651a370dd3fb38d478b1798", 2524}, - {"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1713544}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 1 VGA Remake - English DOS (from the Police Quest Collection) - // Executable scanning reports "1.001.029", VERSION file reports "2.000" - {{"pq1sci", "VGA Remake", { - {"resource.map", 0, "35efa814fb994b1cbdac9611e401da67", 5013}, - {"resource.000", 0, "e0d5ddf34eda903a38f0837e2aa7145b", 6401433}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 2 - English Amiga (from www.back2roots.org) - // SCI interpreter version 0.000.685 (just a guess) - {{"pq2", "", { - {"resource.map", 0, "499de78ae72b7ce219f944c5e7ef0c5b", 3426}, - {"resource.000", 0, "77f02def3094af804fd2371db25b7100", 250232}, - {"resource.001", 0, "523db0c07f1da2a822c2c39ee0482544", 179334}, - {"resource.002", 0, "499737c21a28ac026e11ab817100d610", 511099}, - {"resource.003", 0, "e008f5d6e2a7c4d4a0da0173e4fa8f8b", 553970}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 2 - English DOS Non-Interactive Demo - // Executable scanning reports "0.000.413" - {{"pq2", "Demo", { - {"resource.map", 0, "8b77d0d4650c2052b356cece28294b58", 576}, - {"resource.001", 0, "376ef6d6eaaeed66e1424bd219c4b9ab", 215398}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Police Quest 2 - English DOS (provided by richiefs in bug report #2670691) - // SCI interpreter version 0.000.395 - {{"pq2", "", { - {"resource.map", 0, "9cff78c4be9e6a4848b6e9377569e3d9", 5700}, - {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 163291}, - {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 329367}, - {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 305819}, - {"resource.004", 0, "77f02def3094af804fd2371db25b7100", 342149}, - {"resource.005", 0, "77f02def3094af804fd2371db25b7100", 349899}, - {"resource.006", 0, "77f02def3094af804fd2371db25b7100", 354991}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Police Quest 2 - English DOS (from the Police Quest Collection) - // Executable scanning reports "0.000.490" - {{"pq2", "", { - {"resource.map", 0, "28a6f471c7900c2c92da40eecb615d9d", 4584}, - {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 509525}, - {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 546000}, - {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Police Quest 2 - English DOS (from FRG) - // SCI interpreter version 0.000.395 - {{"pq2", "", { - {"resource.map", 0, "fe019e9773623fcb7da810db9e64c8a9", 4548}, - {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 509760}, - {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 542897}, - {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 586857}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Police Quest 3 - English Amiga - // Executable scanning reports "1.004.024" - // SCI interpreter version 1.000.784 - {{"pq3", "", { - {"resource.map", 0, "29923fe1ef1f0909b57255d61c558e68", 5742}, - {"resource.000", 0, "4908e4f4977e8e19c90c29b36a741ffe", 298541}, - {"resource.001", 0, "0eb943ca807e2f69578821d490770d2c", 836567}, - {"resource.002", 0, "f7044bb08a1fcbe5077791ed8d4996f0", 691207}, - {"resource.003", 0, "630bfa65beb05f743552704ac2899dae", 759891}, - {"resource.004", 0, "7b229fbdf30d670d0728cede3e984a7e", 838663}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 3 - German Amiga - // Executable scanning reports "1.004.024" - // SCI interpreter version 1.000.784 - {{"pq3", "", { - {"resource.map", 0, "357304811fc2bbaa3443fc62d677fe06", 6282}, - {"resource.000", 0, "49879e6ce7c19151ffa6af1a09763dc7", 324273}, - {"resource.001", 0, "015e6119badb391ab5f4b36abedb5d4a", 718814}, - {"resource.002", 0, "1ee419ba252fbed47fbce8399f56f8ad", 674823}, - {"resource.003", 0, "87361c17fd863b58f98828de68770279", 682288}, - {"resource.004", 0, "6258d5dd85898d8e218eb8113ebc9059", 722738}, - {"resource.005", 0, "6258d5dd85898d8e218eb8113ebc9059", 704485}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 3 - English DOS (from the Police Quest Collection) - // Executable scanning reports "T.A00.178", VERSION file reports "1.00" - // SCI interpreter version 1.000.510 - {{"pq3", "", { - {"resource.map", 0, "6457bf0c8ca865a42d9ff5827ab49b89", 5559}, - {"resource.000", 0, "7659713720d61d9465a59091b7ee63ea", 737253}, - {"resource.001", 0, "61c7c187d25a8346be0a092d5f037278", 1196787}, - {"resource.002", 0, "c18e0d408e4f4f40365d42aa15931f67", 1153561}, - {"resource.003", 0, "8791b9eef53edf77c2dac950142221d3", 1159791}, - {"resource.004", 0, "1b91e891a3c60a941dac0eecdf83375b", 1143606}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 3 - English DOS Non-Interactive Demo - // Executable scanning reports "T.A00.052" - // SCI interpreter version 1.000.510 - {{"pq3", "Demo", { - {"resource.map", 0, "ec8e58e7663ae5173853abf6c76b52bb", 867}, - {"resource.000", 0, "277f97771f7a6d89677141f02da313d6", 65150}, - {"resource.001", 0, "5c5a551b6c86cce2ee75becb90e0b586", 624411}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 3 - German DOS (supplied by markcoolio in bug report #2723837) - // Executable scanning reports "T.A00.178" - // SCI interpreter version 1.000.510 - {{"pq3", "", { - {"resource.map", 0, "8a970edf98eba4c11bb1827aab1694d1", 5625}, - {"resource.000", 0, "5ee460af3d70c06a745cc482b6c783ba", 865204}, - {"resource.001", 0, "ff6182bf96c8f8af5bd8c11769c9cbf2", 1183456}, - {"resource.002", 0, "cce99b96a578b62ff6cebdae8d122feb", 1179358}, - {"resource.003", 0, "4836f460f4cfc8de61e2df4c45775504", 1180956}, - {"resource.004", 0, "0c3eb84b9755852d9e795e0d5c9373c7", 1171760}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 4 - English DOS Non-Interactive Demo (from FRG) - // SCI interpreter version 1.001.096 - {{"pq4", "Demo", { - {"resource.map", 0, "be56f87a1c4a13062a30a362df860c2f", 1472}, - {"resource.000", 0, "527d5684016e6816157cd15d9071b11b", 1121310}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Police Quest 4 - English DOS (from the Police Quest Collection) - // Executable scanning reports "2.100.002", VERSION file reports "1.100.000" - {{"pq4", "", { - {"resource.map", 0, "379dfe80ed6bd16c47e4b950c4722eac", 11374}, - {"resource.000", 0, "fd316a09b628b7032248139003369022", 18841068}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 4 - English DOS - // SCI interpreter version 2.000.000 (a guess?) - {{"pq4", "", { - {"resource.map", 0, "aed9643158ccf01b71f359db33137f82", 9895}, - {"resource.000", 0, "da383857b3be1e4514daeba2524359e0", 15141432}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest 4 - German DOS (supplied by markcoolio in bug report #2723840) - // SCI interpreter version 2.000.000 (a guess?) - {{"pq4", "", { - {"resource.map", 0, "2393ee728ab930b2762cb5889f9b5aff", 9256}, - {"resource.000", 0, "6ba98bd2e436739d87ecd2a9b99cabb4", 14730155}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest: SWAT - English DOS/Windows Demo (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "0.001.200" - {{"pqswat", "Demo", { - {"resource.map", 0, "8c96733ef94c21526792f7ca4e3f2120", 1648}, - {"resource.000", 0, "d8892f1b8c56c8f7704325460f49b300", 3676175}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Police Quest: SWAT - English Windows (from the Police Quest Collection) - // Executable scanning reports "2.100.002", VERSION file reports "1.0c" - {{"pqswat", "", { - {"resmap.001", 0, "de5ea1beb3d9490737aa5fd398fe9765", 6937}, - {"ressci.001", 0, "7cd5414f54748f90904a46123a52472f", 29467363}, - {"resmap.002", 0, "ff7a7e0f3dea2c73182b7ea84e3431cc", 6211}, - {"ressci.002", 0, "e613357f3349c4bfa5a7b7b312be7f97", 25987989}, - {"resmap.003", 0, "84303aa019fa75a0eb20ba502bc4ccae", 6601}, - {"ressci.003", 0, "00a755e917c442ca8cf1a1bea689e6fb", 45073980}, - {"resmap.004", 0, "4228038906f041623e65789500b22285", 6835}, - {"ressci.004", 0, "b7e619e6ecf62fe65d5116a3a422e5f0", 46223872}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, -#endif // ENABLE_SCI32 - - // Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy (supplied by merkur in bug report #2718784) - // Executable scanning reports "0.000.566" - {{"qfg1", "", { - {"resource.map", 0, "c1dc4470fb947c067567252f62d6c1b6", 6474}, - {"resource.000", 0, "481b034132106390cb5160fe61dd5f58", 80334}, - {"resource.001", 0, "4d67acf52833ff45c7f753d6663532e8", 462727}, - {"resource.002", 0, "439ba9b6dde216e6eb97ef3a9830fbe4", 646869}, - {"resource.003", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 642203}, - {"resource.004", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 641688}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy (supplied by markcoolio in bug report #2723843) - // Executable scanning reports "0.000.566" - {{"qfg1", "", { - {"resource.map", 0, "94bc3f2ae2dad12f1303606740d087ff", 6936}, - {"resource.000", 0, "481b034132106390cb5160fe61dd5f58", 80334}, - {"resource.001", 0, "4d67acf52833ff45c7f753d6663532e8", 95498}, - {"resource.002", 0, "3e2a89d60d385caca5b3394049da4bc4", 271587}, - {"resource.003", 0, "e56e9fd2f7d2c98774699f7a5087e524", 255998}, - {"resource.004", 0, "d74cd4290bf60e1409117202e4ce8592", 266415}, - {"resource.005", 0, "7288ed6d5da89b7a80b4af3897a7963a", 271185}, - {"resource.006", 0, "69366c2a2f99917199fe1b60a4fee19d", 267852}, - {"resource.007", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 272747}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Quest for Glory 1 - Japanese PC-98 5.25" Floppy - // Executable scanning reports "S.old.201" - {{"qfg1", "8 Colors", { - {"resource.map", 0, "5cbeb95dd2a4b7cb242b415cc6ec1c47", 6444}, - {"resource.001", 0, "a21451ef6fa8179bd4b22c4950004c44", 859959}, - {"resource.002", 0, "a21451ef6fa8179bd4b22c4950004c44", 1136968}, - {"resource.003", 0, "a21451ef6fa8179bd4b22c4950004c44", 769897}, - {NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 1 - Japanese PC-98 5.25" Floppy - // Executable scanning reports "S.old.201" - {{"qfg1", "16 Colors", { - {"resource.map", 0, "3ecaba33bf77cb434067a0b8aee15097", 6444}, - {"resource.001", 0, "a21451ef6fa8179bd4b22c4950004c44", 864754}, - {"resource.002", 0, "a21451ef6fa8179bd4b22c4950004c44", 1147121}, - {"resource.003", 0, "a21451ef6fa8179bd4b22c4950004c44", 777575}, - {NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 1 - English Amiga - // Executable scanning reports "1.002.020" - // SCI interpreter version 0.000.685 - {{"qfg1", "", { - {"resource.map", 0, "e65034832f0c9df1dc22128227b782d0", 6066}, - {"resource.000", 0, "1c0255dea2d3cd71eee9f2db201eee3f", 111987}, - {"resource.001", 0, "a270012fa74445d74c044d1b65a9ff8c", 143570}, - {"resource.002", 0, "e64004e020fdf1813be52b639b08be89", 553201}, - {"resource.003", 0, "16cd4414c37ae3bb6d6da33dce8e25e8", 654096}, - {"resource.004", 0, "16cd4414c37ae3bb6d6da33dce8e25e8", 689124}, - {"resource.005", 0, "5f3386ef2f2b1254e4a066f5d9027324", 609529}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 1 - English DOS - // SCI interpreter version 0.000.629 - {{"qfg1", "", { - {"resource.map", 0, "74a108a7fb345bfc84f4113b6e5241bb", 6432}, - {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 79181}, - {"resource.001", 0, "917fcef303e9489597154727baaa9e07", 461422}, - {"resource.002", 0, "05ddce5f437a516b89ede2438fac09d8", 635734}, - {"resource.003", 0, "951299a82a8134ed12c5c18118d45c2f", 640483}, - {"resource.004", 0, "951299a82a8134ed12c5c18118d45c2f", 644443}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 1 VGA Remake - English DOS - // Executable scanning reports "2.000.411" - {{"qfg1", "VGA Remake", { - {"resource.map", 0, "a731fb6c9c0b282443f7027bc8694d4c", 8469}, - {"resource.000", 0, "ecace1a2771846b1a8aa1afdd44111a0", 6570147}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 1 VGA Remake - English DOS Non-Interactive Demo (from FRG) - // SCI interpreter version 1.001.029 - {{"qfg1", "VGA Remake Demo", { - {"resource.map", 0, "ac0257051c95a59c0cdc0be24d9b11fa", 729}, - {"resource.000", 0, "ec6f5cf369054dd3e5392995e9975b9e", 768218}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 2 - English Amiga - // Executable scanning reports "1.003.004" - // SCI interpreter version 0.001.010 - {{"qfg2", "", { - {"resource.map", 0, "365ea1033ba26d227ec4007be88c59cc", 7596}, - {"resource.000", 0, "810245be50fde5a67e3ea95e876e3e64", 233341}, - {"resource.001", 0, "7a5fde9875211ed67a896fc0d91940c8", 127294}, - {"resource.002", 0, "dcf6bc2c18660d7ad532fb61861eb721", 543644}, - {"resource.003", 0, "dcf6bc2c18660d7ad532fb61861eb721", 565044}, - {"resource.004", 0, "dcf6bc2c18660d7ad532fb61861eb721", 466630}, - {"resource.005", 0, "a77d2576c842b2b06da57d4ac8fc51c0", 579975}, - {"resource.006", 0, "ccf5dba33e5cab6d5872838c0f8db44c", 500039}, - {"resource.007", 0, "4c9fc1587545879295cb9627f56a2cb8", 575056}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 2 - English (from FRG) - // Executable scanning reports "1.000.072" - {{"qfg2", "", { - {"resource.map", 0, "bc79c5685c00edab3ad6df18691703bc", 6906}, - {"resource.000", 0, "a17e374c4d33b81208c862bc0ffc1a38", 212119}, - {"resource.001", 0, "e08d7887e30b12008c40f9570447711a", 867866}, - {"resource.002", 0, "df137dc7869cab07e1149ba2333c815c", 790750}, - {"resource.003", 0, "b192607c42f6960ecdf2ad2e4f90e9bc", 972804}, - {"resource.004", 0, "cd2de58e27665d5853530de93fae7cd6", 983617}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 2 - English DOS - // Executable scanning reports "1.000.072" - {{"qfg2", "", { - {"resource.map", 0, "be23af27e9557bf232efe213ac7f277c", 8166}, - {"resource.000", 0, "a17e374c4d33b81208c862bc0ffc1a38", 212120}, - {"resource.001", 0, "e08d7887e30b12008c40f9570447711a", 331973}, - {"resource.002", 0, "df137dc7869cab07e1149ba2333c815c", 467505}, - {"resource.003", 0, "df137dc7869cab07e1149ba2333c815c", 502560}, - {"resource.004", 0, "df137dc7869cab07e1149ba2333c815c", 488541}, - {"resource.005", 0, "df137dc7869cab07e1149ba2333c815c", 478688}, - {"resource.006", 0, "b1944bd664ddbd2859cdaa0c4a0d6281", 507489}, - {"resource.007", 0, "cd2de58e27665d5853530de93fae7cd6", 490794}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 2 - English DOS Non-Interactive Demo - // Executable scanning reports "1.000.046" - {{"qfg2", "Demo", { - {"resource.map", 0, "e75eb86bdd517b3ef709058249986a87", 906}, - {"resource.001", 0, "9b098f9e1008abe30e56c93b896494e6", 362123}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 3 - English DOS Non-Interactive Demo (from FRG) - // Executable scanning reports "1.001.021", VERSION file reports "1.000, 0.001.059, 6.12.92" - {{"qfg3", "Demo", { - {"resource.map", 0, "fd71de9b588a45f085317caacf050e91", 687}, - {"resource.000", 0, "b6c69bf6c18bf177492249fe81fc6a6d", 648702}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 3 - English DOS - // SCI interpreter version 1.001.050 - {{"qfg3", "", { - {"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958}, - {"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868000}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 3 - German DOS (supplied by markcoolio in bug report #2723846) - // Executable scanning reports "L.rry.083" - {{"qfg3", "", { - {"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958}, - {"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868042}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 3 - Spanish DOS CD (from jvprat) - // Executable scanning reports "L.rry.083", VERSION file reports "1.000.000, June 30, 1994" - {{"qfg3", "", { - {"resource.map", 0, "10809197c33a5e62819311d8a2f73f85", 5978}, - {"resource.000", 0, "ba7ac86155e4c531e46cd73c86daa80a", 5884098}, - {"resource.msg", 0, "a63974730d294dec0bea10057c36e506", 256014}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Quest for Glory 4 - English DOS Non-Interactive Demo (from FRG) - // SCI interpreter version 1.001.069 (just a guess) - {{"qfg4", "Demo", { - {"resource.map", 0, "1ba7c7ae1efb315326d45cb931569b1b", 922}, - {"resource.000", 0, "41ba03f0b188b029132daa3ece0d3e14", 623154}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Quest for Glory 4 1.1 Floppy - English DOS (supplied by markcool in bug report #2723852) - // SCI interpreter version 2.000.000 (a guess?) - {{"qfg4", "", { - {"resource.map", 0, "685bdb1ed47bbbb0e5e25db392da83ce", 9301}, - {"resource.000", 0, "f64fd6aa3977939a86ff30783dd677e1", 11004993}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 4 1.1 Floppy - German DOS (supplied by markcool in bug report #2723850) - // SCI interpreter version 2.000.000 (a guess?) - {{"qfg4", "", { - {"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301}, - {"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Quest for Glory 4 - English DOS/Windows (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "1.0" - {{"qfg4", "", { - {"resource.map", 0, "aba367f2102e81782d961b14fbe3d630", 10246}, - {"resource.000", 0, "263dce4aa34c49d3ad29bec889007b1c", 11571394}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - -#if 0 - // NOTE: This version looks to be exactly the same as the English one - // Perhaps it's the English one? - - // Quest for Glory 4 - German DOS/Windows (from PCJoker 2/98) - {{"qfg4", "", { - {"resource.map", 0, "aba367f2102e81782d961b14fbe3d630", 10246}, - {"resource.000", 0, "263dce4aa34c49d3ad29bec889007b1c", 11571394}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, -#endif - - // Quest for Glory 4 - German DOS/Windows Disk V1.1 (from PCJoker 2/89) - // SCI interpreter version 2.000.000 (a guess?) - {{"qfg4", "", { - {"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301}, - {"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, -#endif - - // Slater & Charlie go camping - {{"slater", "", { - {"resource.000", 0, "1846b57fe84774be72f7c50ab3c90df0", 2256126}, - {"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044}, - {"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // RAMA - English DOS/Windows Demo - // Executable scanning reports "2.100.002", VERSION file reports "000.000.008" - {{"rama", "Demo", { - {"resmap.001", 0, "775304e9b2a545156be4d94209550094", 1393}, - {"ressci.001", 0, "259437fd75fdf51e8207fda8c01fa4fd", 2334384}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // RAMA - English Windows (from jvprat) - // Executable scanning reports "3.000.000", VERSION file reports "1.100.000" - {{"rama", "", { - {"resmap.001", 0, "3bac72a1910a563f8f92cf5b77c8b7f2", 8338}, - {"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70588050}, - {"resmap.002", 0, "83c2aa4653a985ab4b49ff60532ed08f", 12082}, - {"ressci.002", 0, "2a68edd064e5e4937b5e9c74b38f2082", 128562138}, - {"resmap.003", 0, "31ef4c0621711585d031f0ae81707251", 1636}, - {"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6860492}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, - - // RAMA - Italian Windows CD (from glorifindel) - // SCI interpreter version 3.000.000 (a guess?) - {{"rama", "", { - {"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70611091}, - {"resmap.001", 0, "70ba2ff04a2b7fb2c52420ba7fbd47c2", 8338}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE}, - 0 - }, - - // Shivers - English Windows (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "1.02" - {{"shivers", "", { - {"resmap.000", 0, "f2ead37749ed8f6535a2445a7d05a0cc", 46525}, - {"ressci.000", 0, "4294c6d7510935f2e0a52e302073c951", 262654836}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, - - // Shivers - German Windows (from Tobis87) - {{"shivers", "", { - {"resmap.000", 0, "f483d0a1f78334c18052e92785c3086e", 46537}, - {"ressci.000", 0, "6751b144671e2deed919eb9d284b07eb", 262390692}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, - - // Shivers - English Windows Demo - // Executable scanning reports "2.100.002" - {{"shivers", "Demo", { - {"resmap.000", 0, "d9e0bc5eddefcbe47f528760085d8927", 1186}, - {"ressci.000", 0, "3a93c6340b54e07e65d0e5583354d186", 10505469}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Shivers2 - English Windows Demo - // Executable scanning reports "3.000.000" - {{"shivers2", "Demo", { - {"resmap.000", 0, "d8659188b84beaef076bd869837cd530", 634}, - {"ressci.000", 0, "7fbac0807a044c9543e8ac376d200e59", 4925003}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, -#endif // ENABLE_SCI32 - - // Slater & Charlie Go Camping - English DOS Demo - // Executable scanning reports "1.cfs.081", VERSION file reports "1.000" - {{"slater", "Demo", { - {"resource.map", 0, "61b4f74039399e5aa1e737b16d0fc023", 1409}, - {"resource.msg", 0, "1aeafe2b495de288d002109650b66614", 1364}, - {"resource.000", 0, "8e10d4f05c1fd9f883384fa38a898489", 377394}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 1 VGA Remake - English Amiga (from www.back2roots.org) - // SCI interpreter version 1.000.510 (just a guess) - {{"sq1sci", "VGA Remake", { - {"resource.map", 0, "106484b372af1d4cbf866472cc2813dc", 6396}, - {"resource.000", 0, "cc9d6ace343661ae51ec8bd6e6b00a8c", 340944}, - {"resource.001", 0, "59efcfa2268d2f8608f544e2674d8151", 761721}, - {"resource.002", 0, "f00ef883128bf5fc2fbb888cdd7adf25", 814461}, - {"resource.003", 0, "2588c1c2ca8b9bed0e3411948c0856a9", 839302}, - {"resource.004", 0, "b25a1539c71701f7715f738c5037e9a6", 775515}, - {"resource.005", 0, "640ffe1a9acde392cc33cc1b1a528328", 806324}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 1 VGA Remake - English DOS (from the Space Quest Collection) - // Executable scanning reports "T.A00.081", VERSION file reports "2.000" - // SCI interpreter version 1.000.510 (just a guess) - {{"sq1sci", "VGA Remake", { - {"resource.map", 0, "38a74d8f555a2da9ca4f21d14e3c1d33", 5913}, - {"resource.000", 0, "e9d866534f8c84de82e25f2631ff258c", 1016436}, - {"resource.001", 0, "a89b7b52064c75b1985b289edc2f5c69", 1038757}, - {"resource.002", 0, "a9e847c687529481f3a22b9bf01f45f7", 1169831}, - {"resource.003", 0, "c47600e50c6fc591957ae0c5020ee7b8", 1213262}, - {"resource.004", 0, "e19ea4ad131472f9238590f2e1d40289", 1203051}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 1 VGA Remake - English Non-Interactive Demo (from FRG) - // SCI interpreter version 1.000.181 - {{"sq1sci", "VGA Remake Demo", { - {"resource.map", 0, "5af709ac5e0e923e0b8174f49978c30e", 636}, - {"resource.001", 0, "fd99ea43f57576ded7c86036996346cf", 507642}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 1 VGA Remake - Spanish DOS Floppy (from jvprat) - // Executable scanning reports "T.A00.081", VERSION file reports "2.000" - // SCI interpreter version 1.000.510 (just a guess) - {{"sq1sci", "VGA Remake", { - {"resource.map", 0, "cee2a67fa7f8f1f520f398110ca1c37e", 6111}, - {"resource.000", 0, "945081a73211e0c40e62f709edcd8d1d", 970657}, - {"resource.001", 0, "94692dc84c85c93bb8850f58aebf3cfc", 1085687}, - {"resource.002", 0, "fc9ad3357e4cedec1611ad2b67b193a9", 1175465}, - {"resource.003", 0, "8c22700a02991b763f512f837636b3ca", 1211307}, - {"resource.004", 0, "9b78228ad4f9f335fedf74f1812dcfca", 513325}, - {"resource.005", 0, "7d4ebcb745c0bf8fc42e4013f52ecd49", 1101812}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 3 - English Amiga (from www.back2roots.org) - // SCI interpreter version 0.000.453 (just a guess) - {{"sq3", "", { - {"resource.map", 0, "bad41385acde6d677a8d55a7b20437e3", 5868}, - {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 171636}, - {"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 754432}, - {"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 746496}, - {"resource.004", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 761984}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Space Quest 3 - German Amiga - // Executable scanning reports "1.004.006" - // SCI interpreter version 0.000.453 (just a guess) - {{"sq3", "", { - {"resource.map", 0, "44f53185fdf3f44f946e9cac3ca6588b", 6348}, - {"resource.001", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 238664}, - {"resource.002", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 642014}, - {"resource.003", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 712374}, - {"resource.004", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 545053}, - {"resource.005", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 687507}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 3 - English DOS Non-Interactive Demo - // SCI interpreter version 0.000.453 - {{"sq3", "Demo", { - {"resource.map", 0, "ec66ac2b1ce58b2575ba00b65058de1a", 612}, - {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 180245}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Space Quest 3 - English DOS (provided by richiefs in bug report #2670691) - // SCI interpreter version 0.000.453 - {{"sq3", "", { - {"resource.map", 0, "fee82d211c3918a90ce3b476d3dbb245", 5484}, - {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 485158}, - {"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 720244}, - {"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 688367}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Space Quest 3 - English DOS (from the Space Quest Collection) - // Executable scanning reports "0.000.685", VERSION file reports "1.018" - {{"sq3", "", { - {"resource.map", 0, "55e91aeef1705bce2a9b79172682f36d", 5730}, - {"resource.001", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 490247}, - {"resource.002", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 715777}, - {"resource.003", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 703370}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 3 - German DOS (from Tobis87) - // SCI interpreter version 0.000.453 (?) - {{"sq3", "", { - {"resource.map", 0, "4965c78b5eff50d5e4148ce114594ba8", 7584}, - {"resource.001", 0, "9107c2aa5398e28b5c5406df13491f85", 117869}, - {"resource.002", 0, "9107c2aa5398e28b5c5406df13491f85", 336101}, - {"resource.003", 0, "9107c2aa5398e28b5c5406df13491f85", 350391}, - {"resource.004", 0, "9107c2aa5398e28b5c5406df13491f85", 349750}, - {"resource.005", 0, "9107c2aa5398e28b5c5406df13491f85", 322107}, - {"resource.006", 0, "9107c2aa5398e28b5c5406df13491f85", 320643}, - {"resource.007", 0, "9107c2aa5398e28b5c5406df13491f85", 344287}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - GF_FOR_SCI0_BEFORE_629 - }, - - // Space Quest 3 v1.052 - German DOS (supplied by markcoolio in bug report #2723860) - // Executable scanning reports "S.old.114" - {{"sq3", "", { - {"resource.map", 0, "f0dd735098c254f584878649c6f08dbc", 5154}, - {"resource.001", 0, "9107c2aa5398e28b5c5406df13491f85", 567245}, - {"resource.002", 0, "9107c2aa5398e28b5c5406df13491f85", 596768}, - {"resource.003", 0, "9107c2aa5398e28b5c5406df13491f85", 693573}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - English Amiga - // Executable scanning reports "1.004.024" - // SCI interpreter version 1.000.200 - {{"sq4", "", { - {"resource.map", 0, "d87ae90031e7fd04f32a27db054f5c9c", 6174}, - {"resource.000", 0, "19671ac620a0a4720a1937c20c2e24a1", 323309}, - {"resource.001", 0, "abca51a4c896df550f095a2db71dce46", 805915}, - {"resource.002", 0, "5667852471ba5b7f5b9a770eabd07df2", 796615}, - {"resource.003", 0, "6ec43464f6a17e612636e2928fd9471c", 803868}, - {"resource.004", 0, "1887ed88bb34ae7238650e8f77f26315", 798226}, - {"resource.005", 0, "3540d1cc84d674cf4b2c898b88a3b563", 790296}, - {"resource.006", 0, "ade814bc4d56244c156d9e9bcfebbc11", 664085}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - German Amiga (from www.back2roots.org) - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "79641c0d43408e33c251a1d494d2575e", 6252}, - {"resource.000", 0, "feff51c52146b3a31d4793c718279e13", 345170}, - {"resource.001", 0, "ab33060bfebe32450c0b8d9a3a066efc", 822470}, - {"resource.002", 0, "f79fd6a62da082addb205ed6cef99629", 810458}, - {"resource.003", 0, "f4c21da916f450d4b893b4cba6120866", 815854}, - {"resource.004", 0, "99c6a017da5e769a3b427ca52c8a564f", 824601}, - {"resource.005", 0, "10ee1709e6559c724676d058199b75b5", 818745}, - {"resource.006", 0, "67fb188b191d88efe8414af6ea297b93", 672675}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - English DOS - // Executable scanning reports "1.000.753" - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "a18088c8aceb06025dbc945f29e02935", 5124}, - {"resource.000", 0, "e1f46832cd2458796028e054a0466031", 5502009}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - English DOS - // Executable scanning reports "1.000.753" - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "71ccf4f82ac4efb588731acfb7bf2603", 5646}, - {"resource.000", 0, "e1f46832cd2458796028e054a0466031", 933928}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 1.052 - English DOS Floppy (supplied by markcoolio in bug report #2723865) - // Executable scanning reports "1.000.753" - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "98852d6379622001efd0b50ae93c9a30", 5928}, - {"resource.000", 0, "e1f46832cd2458796028e054a0466031", 173330}, - {"resource.001", 0, "cc2f89e6057e05b040566b3699df7288", 1247215}, - {"resource.002", 0, "9c342cd76b421369406d6fafd7b1a285", 1218373}, - {"resource.003", 0, "96fa33d89d838bc3f671c5b953e7a896", 1240130}, - {"resource.004", 0, "ff9c87da3bc53473fdee8b9d3edbc93c", 1200631}, - {"resource.005", 0, "e33019ac19f755ae33fbf49b4fc9066c", 1053294}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - German DOS (from Tobis87) - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "71715e775e3791178d606cfe6c7e1fb9", 6339}, - {"resource.000", 0, "5f6a1fff40584ee807efd547899b1ba5", 206032}, - {"resource.001", 0, "e924cf86a72ada7736043f045cce345f", 1065442}, - {"resource.002", 0, "e18d731c3fba51333a7f402e454714a5", 858402}, - {"resource.003", 0, "7c2e7508af1a6af877d921e476f70b5e", 1172738}, - {"resource.004", 0, "b8d6efbd3235329bfe844c794097b2c9", 1064761}, - {"resource.005", 0, "47ee647b5b12232d27e63cc627c25899", 1156765}, - {"resource.006", 0, "dfb023e4e2a1e7a00fa18f9ede72a91b", 924059}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - Italian DOS Floppy (from glorifindel) - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "e753dfa96d68dd95f84f6cd80479a35e", 6135}, - {"resource.000", 0, "2ac39ff61e369b79f3d7a4ad514f8e29", 203170}, - {"resource.001", 0, "99a6df6d366b3f061271ff3450ac0d32", 1286269}, - {"resource.002", 0, "a6a8d7a24dbb7a266a26b084e7275e89", 1241124}, - {"resource.003", 0, "5289000399d503b59da9e23129256f1a", 1325546}, - {"resource.004", 0, "4277c61bed40a50dadc4b5a344520af2", 1251000}, - {"resource.005", 0, "5f885abd335978e2fd4e5f886d7676c8", 1102880}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - Japanese PC-98 5.25" Floppy - // SCI interpreter version 1.000.1068 - {{"sq4", "", { - {"resource.map", 0, "ca7bba01019222b6f3e54e9051067a99", 5283}, - {"resource.000", 0, "161d719f38ed98d33f058a8cf3dc09c3", 952909}, - {"resource.001", 0, "454684e3a7a68cbca073945e50778447", 1187088}, - {"resource.002", 0, "6dc668326cc22cb9e8bd8ca9e68d2a66", 1181249}, - {NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - Japanese PC-98 5.25" Floppy - // SCI interpreter version 1.000.1068 - {{"sq4", "", { - {"resource.map", 0, "ca7bba01019222b6f3e54e9051067a99", 5283}, - {"resource.000", 0, "161d719f38ed98d33f058a8cf3dc09c3", 952909}, - {"resource.001", 0, "454684e3a7a68cbca073945e50778447", 1187088}, - {"resource.002", 0, "6dc668326cc22cb9e8bd8ca9e68d2a66", 1181249}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 - English DOS CD (from the Space Quest Collection) - // Executable scanning reports "1.001.064", VERSION file reports "1.0" - {{"sq4", "CD", { - {"resource.map", 0, "ed90a8e3ccc53af6633ff6ab58392bae", 7054}, - {"resource.000", 0, "63247e3901ab8963d4eece73747832e0", 5157378}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Space Quest 4 - Spanish DOS CD (from jvprat) - // Executable scanning reports "1.SQ4.057", VERSION file reports "1.000" - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "51bcb305568ec19713f8b79727f10071", 6159}, - {"resource.000", 0, "8000a55aebc50a68b7cce07a8c33758c", 204315}, - {"resource.001", 0, "99a6df6d366b3f061271ff3450ac0d32", 1269094}, - {"resource.002", 0, "a6a8d7a24dbb7a266a26b084e7275e89", 1240998}, - {"resource.003", 0, "42a307941edeb1a3be31daeb2e4be90b", 1319306}, - {"resource.004", 0, "776fba81c110d1908776232cbe190e20", 1253752}, - {"resource.005", 0, "55fae26c2a92f16ef72c1e216e827c0f", 1098328}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Space Quest 4 - Spanish DOS Floppy (from jvprat) - // Executable scanning reports "1.SQ4.056", VERSION file reports "1.000" - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "41543ae71036046fef69df29a838ee05", 5589}, - {"resource.000", 0, "2ac39ff61e369b79f3d7a4ad514f8e29", 242470}, - {"resource.001", 0, "567608beb69d9dffdb42a8f39cb11a5e", 994323}, - {"resource.002", 0, "74c62fa2146ff3b3b2ea2b3fb95b9af9", 1140801}, - {"resource.003", 0, "42a307941edeb1a3be31daeb2e4be90b", 1088408}, - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 4 1.000 - German DOS Floppy (supplied by markcoolio in bug report #2723862) - // Executable scanning reports "1.SQ4.030" - // SCI interpreter version 1.000.200 (just a guess) - {{"sq4", "", { - {"resource.map", 0, "8f08b97ca093f370c56d99715b015554", 6153}, - {"resource.000", 0, "5f6a1fff40584ee807efd547899b1ba5", 206032}, - {"resource.001", 0, "99a6df6d366b3f061271ff3450ac0d32", 1270577}, - {"resource.002", 0, "a6a8d7a24dbb7a266a26b084e7275e89", 1242817}, - {"resource.003", 0, "47ee647b5b12232d27e63cc627c25899", 1321146}, - {"resource.004", 0, "c06350184a490c10eb4585fff0aa3192", 1254368}, - {"resource.005", 0, "b8d6efbd3235329bfe844c794097b2c9", 1098717}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 5 - English DOS (from the Space Quest Collection) - // Executable scanning reports "1.001.068", VERSION file reports "1.04" - {{"sq5", "", { - {"resource.map", 0, "66317c12ac6e818d1f7c17e83c1d9819", 6143}, - {"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486}, - {"resource.msg", 0, "bb8ad78793c26bdb3f77498b1d6515a9", 125988}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 5 - English DOS - // SCI interpreter version 1.001.067 - {{"sq5", "", { - {"resource.map", 0, "8bde0a9adb9a3e9aaa861826874c9834", 6473}, - {"resource.000", 0, "f4a48705764544d7cc64a7bb22a610df", 6025184}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 5 v1.04 - German DOS (from Tobis87, updated information by markcool from bug reports #2723935 and #2724762) - // SCI interpreter version 1.001.068 - {{"sq5", "", { - {"resource.map", 0, "66317c12ac6e818d1f7c17e83c1d9819", 6143}, - {"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486}, - {"resource.msg", 0, "7c71cfc36153cfe07b450423a51f7e68", 146282}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 5 - Italian DOS Floppy (from glorifindel) - // SCI interpreter version 1.001.068 (just a guess) - {{"sq5", "", { - {"resource.000", 0, "5040026519f37199f3616fb1d4704dff", 6047170}, - {"resource.map", 0, "5b09168baa2f6e2e22787429b2d72f54", 6492}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Space Quest 6 - English DOS/Win3.11 CD (from the Space Quest Collection) - // Executable scanning reports "2.100.002", VERSION file reports "1.0" - {{"sq6", "", { - {"resource.map", 0, "6dddfa3a8f3a3a513ec9dfdfae955005", 10528}, - {"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Space Quest 6 - English DOS/Win3.11 CD ver 1.11 (from FRG) - // SCI interpreter version 2.100.002 (just a guess) - {{"sq6", "", { - {"resource.map", 0, "e0615d6e4e10e37ae42e6a2a95aaf145", 10528}, - {"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // Space Quest 6 - English DOS/Win3.11 Interactive Demo (from FRG) - // SCI interpreter version 2.100.002 (just a guess) - {{"sq6", "Demo", { - {"resource.map", 0, "368f07b07433db3f819fa3fa0e5efee5", 2572}, - {"resource.000", 0, "ab12724e078dea34b624e0d2a38dcd7c", 2272050}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Space Quest 6 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723884) - // SCI interpreter version 2.100.002 (just a guess) - {{"sq6", "", { - {"resource.map", 0, "664d797415484f85c90b1b45aedc7686", 10534}, - {"resource.000", 0, "ba87ba91e5bdabb4169dd0df75777722", 40933685}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, -#endif // ENABLE_SCI32 - - // The Island of Dr. Brain - English DOS CD (from jvprat) - // Executable scanning reports "1.001.053", VERSION file reports "1.0 10.27.92" - {{"islandbrain", "", { - {"resource.map", 0, "2388efef8430b041b0f3b00b9050e4a2", 3281}, - {"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 2103560}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, - 0 - }, - - // The Island of Dr. Brain - English DOS (from Quietust) - // Executable scanning reports "1.001.053", VERSION file reports "1.1 2.3.93" - {{"islandbrain", "", { - {"resource.map", 0, "3c07da06bdd1689f9d07af78fb94d0ec", 3101}, - {"resource.000", 0, "ecc686e0034fb4d41de077ac7167b3cf", 1947866}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, - 0 - }, - - // The Island of Dr. Brain - English DOS Non-Interactive Demo - // SCI interpreter version 1.001.053 (just a guess) - {{"islandbrain", "Demo", { - {"resource.map", 0, "a8e5ca8ed1996974afa59f4c45e06195", 986}, - {"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 586560}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - -#ifdef ENABLE_SCI32 - // Torin's Passage - English Windows Interactive Demo - // SCI interpreter version 2.100.002 (just a guess) - {{"torin", "Demo", { - {"resmap.000", 0, "9a3e172cde9963d0a969f26469318cec", 3403}, - {"ressci.000", 0, "db3e290481c35c3224e9602e71e4a1f1", 5073868}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, - 0 - }, - - // Torin's Passage - English Windows - // SCI interpreter version 2.100.002 (just a guess) - {{"torin", "", { - {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, - {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, - {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, - - // Torin's Passage - Spanish Windows (from jvprat) - // Executable scanning reports "2.100.002", VERSION file reports "1.0" - {{"torin", "", { - {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, - {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, - // TODO: depend on one of the patches? - {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, - - // Torin's Passage - French Windows - // SCI interpreter version 2.100.002 (just a guess) - {{"torin", "", { - {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, - {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, - {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, - - // Torin's Passage - German Windows - // SCI interpreter version 2.100.002 (just a guess) - {{"torin", "", { - {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, - {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, - {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, - 0 - }, - - // Torin's Passage - Italian Windows CD (from glorifindel) - // SCI interpreter version 2.100.002 (just a guess) - {{"torin", "", { - {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, - {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, - {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE}, - 0 - }, -#endif // ENABLE_SCI32 - - // SCI Fanmade Games - FANMADE("Al Pond 2: Island Quest", "9625372e710d1a95d2027b48f9e325af", 1506, "a0f9aa65b9bf3d8703adff5a621f243c", 889843), - FANMADE("Al Pond: Island Quest 2", "4cba6a5a4c8f66f21935ed78b0511a92", 870, "876587dc9a5ec569287a3dc4b29139d8", 613769), - FANMADE("Another DG Game: I Want My C64 Back", "4a8ca7ca2abd18899ef856f47665e2e9", 588, "12ff558d20c72e42cc6adb408f34d6d8", 150513), - FANMADE_L("Another DG Game: I Want My C64 Back", "13dc1d9ebc57daf8895412eee5e39fea", 576, "e2ad60b3a280171429db5c85f158f84a", 141697, Common::FR_FRA), - FANMADE("Bluntman and Chronic (Politically Correct Version)", "c3ef9fa6c7c5fb840078bf28d87c7f8b", 1362, "441636a9f6f86710844868fded868ee7", 596688), - FANMADE("Cascade Quest", "c94efc10d18c040b6e22a1dc6d3adfe1", 3468, "8ada33dfa945f81531e5508240b573de", 1432195), - FANMADE("Curt Quest 1.0", "b0e555370380d218968a40a68eaaaffc", 1146, "c851182cdf6fc6a81b840f4d4875f1a0", 307165), - FANMADE("Curt Quest 1.1", "54084c29346683296e45ef32d7ae74f3", 1128, "c851182cdf6fc6a81b840f4d4875f1a0", 302000), - FANMADE("Demo Quest", "c89a0c9e0a4e4af0ecedb300a3b31dbf", 384, "a32f3495ba24764cba091119cc3f1e13", 160098), - FANMADE("Dr. Jummybummy's Space Adventure 2", "6ae6cb7de423f51736d9487b4ca0c6da", 810, "26e5b563f578e104d79689f36568b7cf", 394670), - FANMADE_L("Grostesteing: Plus Mechant que Jamais", "ec9a97ccb134f69249f6ea8b16c13d8e", 1500, "b869f5f11bfe2ab5f67f4f0c618f2ce1", 464657, Common::FR_FRA), // FIXME: Accent - FANMADE("Jim Quest", "0af50be1d3f0cb77a09137709a76ef4f", 960, "9c042c136548b20d9183495668e03526", 496446), - FANMADE("Knight's Quest Demo 1.0", "5e816edf993956752ed06fccfeeae6d9", 1260, "959321f88a22905fa1f8c6d897874744", 703836), - FANMADE("LockerGnome Quest", "3eeff9130206cad0c4e1551e2b9dd2c5", 420, "ae05ca90806fd90cc43f147c82d3547c", 158906), - FANMADE("New Year's Mystery", "efd1beb5120293725065c95959144f81", 714, "b3bd3c2372ed6efa28adb12403c4c31a", 305027), - FANMADE("Osama", "db8f1710453cfbecf4214b2946970043", 390, "7afd75d4620dedf97a84ae8f0a7523cf", 123827), - FANMADE("Quest for the Cheat", "a359d4cf27f98264b42b55c017671214", 882, "8a943029f73c4bc85d454b7f473455ba", 455209), - FANMADE("SCI Companion Template", "ad54d4f504086cd597aa2348d0aa3b09", 354, "6798b7b601ce8154c1d1bc0f0edcdd18", 113061), - FANMADE("SCI Studio Template 3.0", "ca0dc8d586e0a8670b7621cde090b532", 354, "58a48ee692a86c0575e6bd0b00a92b9a", 113097), - FANMADE("SCI Quest", "9067e1f1e54436d2dbfce855524bc84a", 552, "ffa7d355cd9223f245289108a696bcd2", 149634), - FANMADE("The Legend of the Lost Jewel", "ba1bca315e3818c5626eda51bcfbcccf", 636, "9b0736d69924af0cff32a0f78db96855", 300398), - - // FIXME: The vga demo does not have a resource.000/001 file. - //FANMADE_V("SCI VGA Demo", "00b1abd87bad356b90fcdfcb6132c26f", 8, "", 0, 0), - - {AD_TABLE_END_MARKER, 0} -}; +#include "sci/detection_tables.h" /** * The fallback game descriptor used by the SCI engine's fallbackDetector. @@ -3006,7 +118,7 @@ static SciGameDescription s_fallbackDesc = { Common::UNK_LANG, Common::kPlatformPC, ADGF_NO_FLAGS, - GUIO_NONE + Common::GUIO_NONE }, 0 }; @@ -3014,7 +126,7 @@ static SciGameDescription s_fallbackDesc = { static const ADParams detectionParams = { // Pointer to ADGameDescription or its superset structure - (const byte *)SciGameDescriptions, + (const byte *)Sci::SciGameDescriptions, // Size of that superset structure sizeof(SciGameDescription), // Number of bytes to compute MD5 sum for diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h new file mode 100644 index 0000000000..f935bdff0d --- /dev/null +++ b/engines/sci/detection_tables.h @@ -0,0 +1,2918 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +namespace Sci { + +#define FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, lang) \ + {{"sci-fanmade", name, { \ + {"resource.map", 0, resMapMd5, resMapSize}, \ + {"resource.001", 0, resMd5, resSize}, \ + {NULL, 0, NULL, 0}}, lang, Common::kPlatformPC, 0, GUIO_NOSPEECH}, \ + 0 \ + } + +#define FANMADE(name, resMapMd5, resMapSize, resMd5, resSize) FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, Common::EN_ANY) + +using Common::GUIO_NONE; +using Common::GUIO_NOSPEECH; + +// Game descriptions +static const struct SciGameDescription SciGameDescriptions[] = { + // Astro Chicken - English DOS + // SCI interpreter version 0.000.453 + {{"astrochicken", "", { + {"resource.map", 0, "f3d1be7752d30ba60614533d531e2e98", 474}, + {"resource.001", 0, "6fd05926c2199af0af6f72f90d0d7260", 126895}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Castle of Dr. Brain - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.005.000" + // SCI interpreter version 1.000.510 + {{"castlebrain", "", { + {"resource.map", 0, "9f9fb826aa7e944b95eadbf568244a68", 2766}, + {"resource.000", 0, "0efa8409c43d42b32642f96652d3230d", 314773}, + {"resource.001", 0, "3fb02ce493f6eacdcc3713851024f80e", 559540}, + {"resource.002", 0, "d226d7d3b4f77c4a566913fc310487fc", 792380}, + {"resource.003", 0, "d226d7d3b4f77c4a566913fc310487fc", 464348}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Castle of Dr. Brain - German Amiga (from www.back2roots.org) + // Executable scanning reports "1.005.001" + // SCI interpreter version 1.000.510 + {{"castlebrain", "", { + {"resource.map", 0, "8e60424682db52a982bcc3535a7e86f3", 2796}, + {"resource.000", 0, "0efa8409c43d42b32642f96652d3230d", 332468}, + {"resource.001", 0, "4e0836fadc324316c1a418125709ba45", 569057}, + {"resource.002", 0, "85e51acb5f9c539d66e3c8fe40e17da5", 826309}, + {"resource.003", 0, "85e51acb5f9c539d66e3c8fe40e17da5", 493638}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Castle of Dr. Brain - English DOS Non-Interactive Demo + // SCI interpreter version 1.000.005 + {{"castlebrain", "Demo", { + {"resource.map", 0, "467bb5e3224bb54640c3280032aebff5", 633}, + {"resource.000", 0, "9780f040d58182994e22d2e34fab85b0", 67367}, + {"resource.001", 0, "2af49dbd8f2e1db4ab09f9310dc91259", 570553}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Castle of Dr. Brain - English DOS Floppy (from jvprat) + // Executable scanning reports "1.000.044", Floppy label reports "1.0, 10.30.91", VERSION file reports "1.000" + // SCI interpreter version 1.000.510 + {{"castlebrain", "", { + {"resource.map", 0, "1302ceb141d44b05a42723791b2d84c6", 2739}, + {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 346731}, + {"resource.001", 0, "d2f5a1be74ed963fa849a76892be5290", 794832}, + {"resource.002", 0, "c0c29c51af66d65cb53f49e785a2d978", 1280907}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Castle of Dr. Brain - English DOS Floppy 1.1 + {{"castlebrain", "", { + {"resource.map", 0, "f77728304c70017c54793eb6ca648174", 2745}, + {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 347071}, + {"resource.001", 0, "13e81e1839cd7b216d2bb5615c1ca160", 796776}, + {"resource.002", 0, "930e416bec196b9703a331d81b3d66f2", 1283812}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Castle of Dr. Brain - Spanish DOS + // SCI interpreter version 1.000.510 + {{"castlebrain", "", { + {"resource.map", 0, "5738c163e014bbe046474de009020b82", 2727}, + {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 1197694}, + {"resource.001", 0, "735be4e58957180cfc807d5e18fdffcd", 1433302}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Christmas Card 1988 - English DOS + // SCI interpreter version 0.000.294 + {{"christmas1988", "", { + {"resource.map", 0, "39485580d34a72997f3d5b3aba4d24f1", 426}, + {"resource.001", 0, "11391434f41c834090d7a1e9488ce936", 129739}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Christmas Card 1990: The Seasoned Professional - English DOS (16 Colors) + // SCI interpreter version 1.000.172 + {{"christmas1990", "16 Colors", { + {"resource.map", 0, "8f656714a05b94423ac6eb10ee8797d0", 600}, + {"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 272629}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Christmas Card 1990: The Seasoned Professional - English DOS (256 Colors) + // SCI interpreter version 1.000.174 + {{"christmas1990", "256 Colors", { + {"resource.map", 0, "44b8f45b841b9b5e17e939a35e443988", 600}, + {"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 335362}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Christmas Card 1992 - English DOS + // SCI interpreter version 1.001.055 + {{"christmas1992", "", { + {"resource.map", 0, "f1f8c8a8443f523422af70b4ec85b71c", 318}, + {"resource.000", 0, "62fb9256f8e7e6e65a6875efdb7939ac", 203396}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Codename: Iceman - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.002.031" + // SCI interpreter version 0.000.685 + {{"iceman", "", { + {"resource.map", 0, "035829b391709a4e542d7c7b224625f6", 6000}, + {"resource.000", 0, "b1bccd827453d4cb834bfd5b45bef63c", 73682}, + {"resource.001", 0, "ede5a0e1e2a80fb629dae72c72f33d37", 293145}, + {"resource.002", 0, "36670a917550757d57df84c96cf9e6d9", 469387}, + {"resource.003", 0, "d97a96f1ab91b41cf46a02cc89b0a04e", 619219}, + {"resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 713382}, + {"resource.005", 0, "605b67a9ef199a9bb015745e7c004cf4", 478384}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Codename: Iceman - English DOS Non-Interactive Demo + // Executable scanning reports "0.000.685" + {{"iceman", "Demo", { + {"resource.map", 0, "782974f29d8a824782d2d4aea39964e3", 1056}, + {"resource.001", 0, "d4b75e280d1c3a97cfef1b0bebff387c", 573647}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Codename: Iceman - English DOS (from jvprat) + // Executable scanning reports "0.000.685", Floppy label reports "1.033, 6.8.90", VERSION file reports "1.033" + // SCI interpreter version 0.000.685 + {{"iceman", "", { + {"resource.map", 0, "a18f3cef4481a81d3415fb87a754343e", 5700}, + {"resource.000", 0, "b1bccd827453d4cb834bfd5b45bef63c", 26989}, + {"resource.001", 0, "32b351072fccf76fc82234d73d28c08b", 438872}, + {"resource.002", 0, "36670a917550757d57df84c96cf9e6d9", 566549}, + {"resource.003", 0, "d97a96f1ab91b41cf46a02cc89b0a04e", 624303}, + {"resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 670883}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Codename: Iceman - English DOS (from FRG) + // SCI interpreter version 0.000.668 + {{"iceman", "", { + {"resource.map", 0, "554b44b79b0e9a7fc59f66dda0daac02", 5670}, + {"resource.000", 0, "b1bccd827453d4cb834bfd5b45bef63c", 26974}, + {"resource.001", 0, "005bd332d4b0f9d8e99d3b905223a332", 438501}, + {"resource.002", 0, "250b859381ebf2bf8922bd99683b0cc1", 566464}, + {"resource.003", 0, "dc7c5280e7acfaffe6ef2a6c963c5f94", 622118}, + {"resource.004", 0, "64f342463f6f35ba71b3509ef696ae3f", 669188}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of Camelot - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.002.030" + // SCI interpreter version 0.000.685 + {{"camelot", "", { + {"resource.map", 0, "51aba42f8e63b219755d4372ea424509", 6654}, + {"resource.000", 0, "dfadf0b4c9fb44ce55570149856c302d", 128100}, + {"resource.001", 0, "67391de361b9347f123ac0899b4b91f7", 300376}, + {"resource.002", 0, "8c7f12b2c38d225d4c7121b30ea1b4d2", 605334}, + {"resource.003", 0, "82a73e7572e7ee627429bb5111ff82ca", 672392}, + {"resource.004", 0, "6821dc97cf643ba521a4e840dda3c58b", 647410}, + {"resource.005", 0, "c6e551bdc24f0acc193159038d4ca767", 605882}, + {"resource.006", 0, "8f880a536908ab496bbc552f7f5c3738", 585255}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of Camelot - English DOS Non-Interactive Demo + // SCI interpreter version 0.000.668 + {{"camelot", "Demo", { + {"resource.map", 0, "f4cd75c15be75e04cdca3acda2c0b0ea", 468}, + {"resource.001", 0, "4930708722f34bfbaa4945fb08f55f61", 232523}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of Camelot - English DOS (from jvprat) + // Executable scanning reports "0.000.685", Floppy label reports "1.001, 0.000.685", VERSION file reports "1.001.000" + // SCI interpreter version 0.000.685 + {{"camelot", "", { + {"resource.map", 0, "95eca3991906dfd7ed26d193df07596f", 7278}, + {"resource.001", 0, "8e1a3a8c588007404b532b8dfacc1460", 596774}, + {"resource.002", 0, "8e1a3a8c588007404b532b8dfacc1460", 722250}, + {"resource.003", 0, "8e1a3a8c588007404b532b8dfacc1460", 723712}, + {"resource.004", 0, "8e1a3a8c588007404b532b8dfacc1460", 729143}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of Camelot - English DOS + // SCI interpreter version 0.000.685 + {{"camelot", "", { + {"resource.map", 0, "86bffb2a393b7a5d8de45e735091f037", 9504}, + {"resource.001", 0, "8e1a3a8c588007404b532b8dfacc1460", 212461}, + {"resource.002", 0, "8e1a3a8c588007404b532b8dfacc1460", 317865}, + {"resource.003", 0, "8e1a3a8c588007404b532b8dfacc1460", 359145}, + {"resource.004", 0, "8e1a3a8c588007404b532b8dfacc1460", 345180}, + {"resource.005", 0, "8e1a3a8c588007404b532b8dfacc1460", 345734}, + {"resource.006", 0, "8e1a3a8c588007404b532b8dfacc1460", 332446}, + {"resource.007", 0, "8e1a3a8c588007404b532b8dfacc1460", 358182}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of the Longbow - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.005.001" + // SCI interpreter version 1.000.510 + {{"longbow", "", { + {"resource.map", 0, "6204f3d00c0f6c0f5f95a29a4190f2f9", 6048}, + {"resource.000", 0, "8d11c744b4a51e7a8ceac687a46f08ca", 830333}, + {"resource.001", 0, "76caf8593e065a98c8ab4a6e2c7dbafc", 839008}, + {"resource.002", 0, "eb312373045906b54a3181bebaf6651a", 733145}, + {"resource.003", 0, "7fe3b3372d7fdda60045807e9c8e4867", 824554}, + {"resource.004", 0, "d1038c75d85a6650d48e07d174a6a913", 838175}, + {"resource.005", 0, "1c3804e56b114028c5873a35c2f06d13", 653002}, + {"resource.006", 0, "f9487732289a4f4966b4e34eea413325", 842817}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of the Longbow - English DOS + // SCI interpreter version 1.000.510 + {{"longbow", "", { + {"resource.map", 0, "36d3b81ff75b67dd4d27b7f5d3166503", 6261}, + {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 1096767}, + {"resource.001", 0, "d4c299213f8d799da1492680d12d0fb3", 1133226}, + {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1128555}, + {"resource.003", 0, "21ebe6b39b57a73fc449f67f013765aa", 972635}, + {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1064637}, + {"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1154950}, + {"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1042966}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of the Longbow - English DOS Floppy (from jvprat) + // Executable scanning reports "1.000.168", Floppy label reports "1.1, 1.13.92", VERSION file reports "1.1" + // SCI interpreter version 1.000.510 + {{"longbow", "", { + {"resource.map", 0, "247f955865572569342751de47e861ab", 6027}, + {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 1297120}, + {"resource.001", 0, "1e6084a19f7a6c50af88d3a9b32c411e", 1366155}, + {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1234743}, + {"resource.003", 0, "1867136d01ece57b531032d466910522", 823686}, + {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1261462}, + {"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284720}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of the Longbow - English DOS + // SCI interpreter version 1.000.510 + {{"longbow", "", { + {"resource.map", 0, "737c6f83a1ee601727ff026898f19fa1", 6045}, + {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 1296607}, + {"resource.001", 0, "1e6084a19f7a6c50af88d3a9b32c411e", 1379267}, + {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1234140}, + {"resource.003", 0, "1867136d01ece57b531032d466910522", 823610}, + {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1260237}, + {"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284609}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of the Longbow EGA - English DOS + // SCI interpreter version 1.000.510 + {{"longbow", "EGA", { + {"resource.map", 0, "7676ec9f08967d7a9a7724f5170456e0", 6261}, + {"resource.000", 0, "36e8fda5d0b8c49e587c8a9617959f72", 718161}, + {"resource.001", 0, "3c3735caa34fa3f261a9552831bb43ed", 705680}, + {"resource.002", 0, "7025b87e735b1df3f0e9488a621f4333", 700633}, + {"resource.003", 0, "eaca7933e8e56bea22b42f7fd5d7a8a7", 686510}, + {"resource.004", 0, "b7bb35c027bb424ecefcd122768e5e60", 705631}, + {"resource.005", 0, "58942b1aa6d6ffeb66e9f8897fd4435f", 469243}, + {"resource.006", 0, "8c767b3939add63d11274065e46aad04", 713158}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0, + }, + + // Conquests of the Longbow - English DOS Non-Interactive Demo + // SCI interpreter version 1.000.510 + {{"longbow", "Demo", { + {"resource.map", 0, "cbc5cb73341de1bff1b1e20a640af220", 588}, + {"resource.001", 0, "f05a20cc07eee85da8e999d0ac0f596b", 869916}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Conquests of the Longbow - German DOS (suplied by markcoolio in bug report #2727681) + // SCI interpreter version 1.000.510 + {{"longbow", "", { + {"resource.map", 0, "7376b7a07f8bd3a8ab8d67595d3f5b51", 6285}, + {"resource.000", 0, "ee39f92e006142424cf9209329e727c6", 977281}, + {"resource.001", 0, "d4c299213f8d799da1492680d12d0fb3", 1167657}, + {"resource.002", 0, "7f6ce331219d58d5087731e4475ab4f1", 1172521}, + {"resource.003", 0, "a204de2a083a7770ff455a838210a678", 1165249}, + {"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1101869}, + {"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1176914}, + {"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1123585}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest - English DOS Non-Interactive Demo (from FRG) + // Executable scanning reports "x.yyy.zzz" + // SCI interpreter version 1.001.069 (just a guess) + {{"ecoquest", "Demo", { + {"resource.map", 0, "c819e171359b7c95f4c13b846d5c034e", 873}, + {"resource.001", 0, "baf9393a9bfa73098adb501e5bc5487b", 657518}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest - English DOS CD 1.1 + // SCI interpreter version 1.001.064 + {{"ecoquest", "CD", { + {"resource.map", 0, "a4b73d5d2b55bdb6e44345e99c8fbdd0", 4804}, + {"resource.000", 0, "d908dbef56816ac6c60dd145fdeafb2b", 3536046}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Eco Quest - English DOS Floppy + // SCI interpreter version 1.000.510 + {{"ecoquest", "Floppy", { + {"resource.map", 0, "704367225929a88aad281ac72844ddac", 4053}, + {"resource.000", 0, "241b98d3903f6a5b872baa19b80aef3b", 1099239}, + {"resource.001", 0, "96d4435d24c01f1c1675e46457604c5f", 1413719}, + {"resource.002", 0, "28fe9b4f0567e71feb198bc9f3a2c605", 1241816}, + {"resource.003", 0, "f3146df0ad4297f5ce35aa8c4753bf6c", 586832}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest - English DOS Floppy + // SCI interpreter version 1.000.510 + {{"ecoquest", "Floppy", { + {"resource.map", 0, "f77baec05fae76707205f5be6534a7f3", 4059}, + {"resource.000", 0, "241b98d3903f6a5b872baa19b80aef3b", 858490}, + {"resource.001", 0, "2fed7451bca81b0c891eed1a956f2263", 1212161}, + {"resource.002", 0, "323b3b12f43d53f27d259beb225f0aa7", 1129316}, + {"resource.003", 0, "83ac03e4bddb2c1ac2d36d2a587d0536", 1145616}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest - German DOS Floppy (supplied by markcoolio in bug report #2723744) + // SCI interpreter version 1.000.510 + {{"ecoquest", "Floppy", { + {"resource.map", 0, "7a9b43bf27dc000ac8559ecbe824b659", 4395}, + {"resource.000", 0, "99b73d40403a51c7e60d01df0d6cd34a", 998227}, + {"resource.001", 0, "2fed7451bca81b0c891eed1a956f2263", 1212060}, + {"resource.002", 0, "02d7d0411f7903aacb3bc8b0f8ca8a9a", 1202581}, + {"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1175835}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest - Spanish DOS Floppy (from jvprat) + // Executable scanning reports "1.ECO.013", VERSION file reports "1.000, 11.12.92" + // SCI interpreter version 1.000.510 + {{"ecoquest", "Floppy", { + {"resource.map", 0, "82e6b1e3bdb2f064b18380009df7b345", 4395}, + {"resource.000", 0, "0b12a91c935e385308af8d17811deded", 1004085}, + {"resource.001", 0, "2fed7451bca81b0c891eed1a956f2263", 1212060}, + {"resource.002", 0, "2d21a1d2dcbffa551552e3e0725d2284", 1186033}, + {"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1174993}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest - French DOS Floppy (from Strangerke) + // SCI interpreter version 1.ECO.013 + {{"ecoquest", "Floppy", { + {"resource.map", 0, "67742945cd59b896d9f22a549f605217", 4407}, + {"resource.000", 0, "0b12a91c935e385308af8d17811deded", 973723}, + {"resource.001", 0, "fc7fba54b6bb88fd7e9c229636599aa9", 1205841}, + {"resource.002", 0, "b836c6ee9de67d814ac5d1b05f5b9858", 1173872}, + {"resource.003", 0, "f8f767f9d6351432621c6e54c1b2ba8c", 1141520}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest 2 - English DOS Non-Interactive Demo + // SCI interpreter version 1.001.055 + {{"ecoquest2", "Demo", { + {"resource.map", 0, "607cfa0d8a03b7d348c06ee727e3d939", 1321}, + {"resource.000", 0, "dd6f614c43c029f063e93cd243af90a4", 525992}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest 2 - English DOS Floppy (supplied by markcoolio in bug report #2723761) + // SCI interpreter version 1.001.065 + {{"ecoquest2", "Floppy", { + {"resource.map", 0, "28fb7b6abb9fc1cb8882d7c2e701b63f", 5658}, + {"resource.000", 0, "cc1d17e5637528dbe4a812699e1cbfc6", 4208192}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Eco Quest 2 - French DOS Floppy (from Strangerke) + // SCI interpreter version 1.001.081 + {{"ecoquest2", "Floppy", { + {"resource.map", 0, "c22ab8b33c339c138b6b1697b77b9e79", 5588}, + {"resource.000", 0, "1c4093f7248240329121fdf8c0d59152", 4231946}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Freddy Pharkas - English DOS demo (from FRG) + // SCI interpreter version 1.001.069 + {{"freddypharkas", "Demo", { + {"resource.map", 0, "97aa9fcfe84c9993a64debd28c32393a", 1909}, + {"resource.000", 0, "5ea8e7a3ea10cce6efd5c106dc62fd8c", 867724}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Freddy Pharkas - English CD (from FRG) + // SCI interpreter version 1.001.132 + {{"freddypharkas", "CD", { + {"resource.map", 0, "d46b282f228a67ba13bd4b4009e95f8f", 6058}, + {"resource.000", 0, "ee3c64ffff0ba9fb08bea2624631c598", 5490246}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Freddy Pharkas - English DOS Floppy (updated information from markcoolio in bug reports #2723773 and #2724720) + // Executable scanning reports "1.cfs.081" + // SCI interpreter version 1.001.132 (just a guess) + {{"freddypharkas", "Floppy", { + {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, + {"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230}, + {"resource.msg", 0, "554f65315d851184f6e38211489fdd8f", -1}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Freddy Pharkas - German DOS Floppy (from Tobis87, updated information from markcoolio in bug reports #2723772 and #2724720) + // Executable scanning reports "1.cfs.081" + // SCI interpreter version 1.001.132 (just a guess) + {{"freddypharkas", "", { + {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, + {"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230}, + {"resource.msg", 0, "304b5a5781800affd2235152a5794fa8", -1}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Freddy Pharkas - Spanish DOS (from jvprat) + // Executable scanning reports "1.cfs.081", VERSION file reports "1.000, March 30, 1995" + // SCI interpreter version 1.001.132 (just a guess) + {{"freddypharkas", "CD", { + {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, + {"resource.000", 0, "fed4808fdb72486908ac7ad0044b14d8", 1456640}, + {"resource.001", 0, "15298fac241b5360763bfb68add1db07", 1456640}, + {"resource.002", 0, "419dbd5366f702b4123dedbbb0cffaae", 1456640}, + {"resource.003", 0, "05acdc256c742e79c50b9fe7ec2cc898", 863310}, + {"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Freddy Pharkas - Spanish DOS (from jvprat) + // Executable scanning reports "1.cfs.081", VERSION file reports "1.000, March 30, 1995" + // SCI interpreter version 1.001.132 (just a guess) + {{"freddypharkas", "Floppy", { + {"resource.map", 0, "a32674e7fbf7b213b4a066c8037f16b6", 5816}, + {"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230}, + {"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Freddy Pharkas - English DOS CD Demo + // SCI interpreter version 1.001.095 + {{"freddypharkas", "CD Demo", { + {"resource.map", 0, "a62a7eae85dd1e6b07f39662b278437e", 1918}, + {"resource.000", 0, "4962a3c4dd44e36e78ea4a7a374c2220", 957382}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NONE}, + 0 + }, + + // Fun Seeker's Guide - English DOS + // SCI interpreter version 0.000.506 + {{"funseeker", "", { + {"resource.map", 0, "7ee6859ef74314f6d91938c3595348a9", 282}, + {"resource.001", 0, "f1e680095424e31f7fae1255d36bacba", 40692}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Gabriel Knight - English DOS CD Demo + // SCI interpreter version 1.001.092 + {{"gk1", "CD Demo", { + {"resource.map", 0, "39645952ae0ed8072c7e838f31b75464", 2490}, + {"resource.000", 0, "eb3ed7477ca4110813fe1fcf35928561", 1718450}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NONE}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Gabriel Knight - English DOS Floppy + // SCI interpreter version 2.000.000 + {{"gk1", "", { + {"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10783}, + {"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Gabriel Knight - English DOS Floppy (supplied my markcoolio in bug report #2723777) + // SCI interpreter version 2.000.000 + {{"gk1", "", { + {"resource.map", 0, "65e8c14092e4c9b3b3538b7602c8c5ec", 10783}, + {"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Gabriel Knight - German DOS Floppy (supplied my markcoolio in bug report #2723775) + // SCI interpreter version 2.000.000 + {{"gk1", "", { + {"resource.map", 0, "ad6508b0296b25c07b1f58828dc33696", 10789}, + {"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13077029}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Gabriel Knight - English DOS CD (from jvprat) + // Executable scanning reports "2.000.000", VERSION file reports "01.100.000" + {{"gk1", "CD", { + {"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10996}, + {"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 12581736}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Gabriel Knight - German DOS CD (from Tobis87) + // SCI interpreter version 2.000.000 + {{"gk1", "CD", { + {"resource.map", 0, "a7d3e55114c65647310373cb390815ba", 11392}, + {"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13400497}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Gabriel Knight - Spanish DOS CD (from jvprat) + // Executable scanning reports "2.000.000", VERSION file reports "1.000.000, April 13, 1995" + {{"gk1", "CD", { + {"resource.map", 0, "7cb6e9bba15b544ec7a635c45bde9953", 11404}, + {"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13381599}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Gabriel Knight 2 - English Windows Non-Interactive Demo + // Executable scanning reports "2.100.002" + {{"gk2", "Demo", { + {"resource.map", 0, "e0effce11c4908f4b91838741716c83d", 1351}, + {"resource.000", 0, "d04cfc7f04b6f74d13025378be49ec2b", 4640330}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + // Gabriel Knight 2 - English DOS (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "1.1" + {{"gk2", "", { + {"resmap.001", 0, "1b8bf6a23b37ed67358eb825fc687260", 2776}, + {"ressci.001", 0, "24463ae235b1afbbc4ff5e2ed1b8e3b2", 50496082}, + {"resmap.002", 0, "2028230674bb54cd24370e0745e7a9f4", 1975}, + {"ressci.002", 0, "f0edc1dcd704bd99e598c5a742dc7150", 42015676}, + {"resmap.003", 0, "51f3372a2133c406719dafad86369be3", 1687}, + {"ressci.003", 0, "86cb3f3d176994e7f8a9ad663a4b907e", 35313750}, + {"resmap.004", 0, "0f6e48f3e84e867f7d4a5215fcff8d5c", 2719}, + {"ressci.004", 0, "4f30aa6e6f895132402c8652f9e1d741", 58317316}, + {"resmap.005", 0, "2dac0e232262b4a51271fd28559b3e70", 2065}, + {"ressci.005", 0, "14b62d4a3bddee57a03cb1495a798a0f", 38075705}, + {"resmap.006", 0, "ce9359037277b7d7976da185c2fa0aad", 2977}, + {"ressci.006", 0, "8e44e03890205a7be12f45aaba9644b4", 60659424}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, +#endif // ENABLE_SCI32 + + // Hoyle 1 - English DOS (supplied by wibble92 in bug report #2644547) + // SCI interpreter version 0.000.530 + {{"hoyle1", "", { + {"resource.map", 0, "9de9aa6d23569b3c8bf798503cf1216a", 7818}, + {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 162783}, + {"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 342309}, + {"resource.003", 0, "e0dd44069a62a463fd124974b915f10d", 328912}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Hoyle 1 - English DOS (supplied by merkur in bug report #2719227) + // SCI interpreter version 0.000.530 + {{"hoyle1", "", { + {"resource.map", 0, "1034a218943d12f1f36e753fa10c95b8", 4386}, + {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 518308}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + +#if 0 // TODO: unknown if these files are corrupt + // Hoyle 1 - English Amiga (from www.back2roots.org) + // SCI interpreter version 0.000.519 - FIXME: some have 0.000.530, others x.yyy.zzz + {{"hoyle1", "", { + {"resource.map", 0, "2a72b1aba65fa6e339370eb86d8601d1", 5166}, + {"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 218755}, + {"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 439502}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, +#endif + + // Hoyle 2 - English DOS + // SCI interpreter version 0.000.572 + {{"hoyle2", "", { + {"resource.map", 0, "4f894d203f64aa23d9ff64d30ae36926", 2100}, + {"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 98138}, + {"resource.002", 0, "8f2dd70abe01112eca464cda818b5eb6", 196631}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Hoyle 2 - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.002.032" + // SCI interpreter version 0.000.685 + {{"hoyle2", "", { + {"resource.map", 0, "62ed48d20c580e5a98f102f7cd93706a", 1356}, + {"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 222704}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + +#if 0 // TODO: unknown if these files are corrupt + // Hoyle 3 - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.005.000" + // SCI interpreter version 1.000.510 + {{"hoyle3", "", { + {"resource.map", 0, "f1f158e428398cb87fc41fb4aa8c2119", 2088}, + {"resource.000", 0, "595b6039ea1356e7f96a52c58eedcf22", 355791}, + {"resource.001", 0, "143df8aef214a2db34c2d48190742012", 632273}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, +#endif + + // Hoyle 3 - English DOS Non-Interactive Demo + // Executable scanning reports "x.yyy.zzz" + // SCI interpreter version 1.000.510 (just a guess) + {{"hoyle3", "Demo", { + {"resource.map", 0, "0d06cacc87dc21a08cd017e73036f905", 735}, + {"resource.001", 0, "24db2bccda0a3c43ac4a7b5edb116c7e", 797678}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Hoyle 3 - English DOS Floppy (from jvprat) + // Executable scanning reports "x.yyy.zzz", Floppy label reports "1.0, 11.2.91", VERSION file reports "1.000" + // SCI interpreter version 1.000.510 (just a guess) + {{"hoyle3", "", { + {"resource.map", 0, "7216a2972f9c595c45ab314941628e43", 2247}, + {"resource.000", 0, "6ef28cac094dcd97fdb461662ead6f92", 541845}, + {"resource.001", 0, "0a98a268ee99b92c233a0d7187c1f0fa", 845795}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Hoyle 4 - English DOS Demo + // SCI interpreter version 1.001.200 (just a guess) + {{"hoyle4", "Demo", { + {"resource.map", 0, "662087cb383e52e3cc4ae7ecb10e20aa", 938}, + {"resource.000", 0, "24c10844792c54d476d272213cbac300", 675252}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + +#if 0 + // Jones in the Fast Lane - English DOS + // SCI interpreter version 1.000.172 + {{"jones", "", { + {"resource.map", 0, "65cbe19b36fffc71c8e7b2686bd49ad7", 1800}, + {"resource.001", 0, "bac3ec6cb3e3920984ab0f32becf5163", 313476}, + {"resource.002", 0, "b86daa3ba2784d1502da881eedb80d9b", 719747}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, +#endif + + // King's Quest 1 SCI Remake - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.003.007" + // SCI interpreter version 0.001.010 + {{"kq1sci", "SCI Remake", { + {"resource.map", 0, "37ed1a05eb719629eba15059c2eb6cbe", 6798}, + {"resource.001", 0, "9ae2a13708d691cd42f9129173c4b39d", 266621}, + {"resource.002", 0, "9ae2a13708d691cd42f9129173c4b39d", 795123}, + {"resource.003", 0, "9ae2a13708d691cd42f9129173c4b39d", 763224}, + {"resource.004", 0, "9ae2a13708d691cd42f9129173c4b39d", 820443}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 1 SCI Remake - English DOS Non-Interactive Demo + // Executable scanning reports "S.old.010" + {{"kq1sci", "SCI Remake Demo", { + {"resource.map", 0, "59b13619078bd47011421468959ee5d4", 954}, + {"resource.001", 0, "4cfb9040db152868f7cb6a1e8151c910", 296555}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 1 SCI Remake - English DOS (from the King's Quest Collection) + // Executable scanning reports "S.old.010", VERSION file reports "1.000.051" + // SCI interpreter version 0.000.999 + {{"kq1sci", "SCI Remake", { + {"resource.map", 0, "7fe9399a0bec84ca5727309778d27f07", 5790}, + {"resource.001", 0, "fed9e0072ffd511d248674e60dee2099", 555439}, + {"resource.002", 0, "fed9e0072ffd511d248674e60dee2099", 714062}, + {"resource.003", 0, "fed9e0072ffd511d248674e60dee2099", 717478}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 4 - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.002.032" + // SCI interpreter version 0.000.685 + {{"kq4sci", "", { + {"resource.map", 0, "f88dd267fb9504d40a04d599c048d42b", 6354}, + {"resource.000", 0, "77615c595388acf3d1df8e107bfb6b52", 138523}, + {"resource.001", 0, "52c2231765eced34faa7f7bcff69df83", 44751}, + {"resource.002", 0, "fb351106ec865fad9af5d78bd6b8e3cb", 663629}, + {"resource.003", 0, "fd16c9c223f7dc5b65f06447615224ff", 683016}, + {"resource.004", 0, "3fac034c7d130e055d05bc43a1f8d5f8", 549993}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 4 - English DOS Non-Interactive Demo + // Executable scanning reports "0.000.494" + {{"kq4sci", "Demo", { + {"resource.map", 0, "992ac7cc31d3717fe53818a9bb6d1dae", 594}, + {"resource.001", 0, "143e1c14f15ad0fbfc714f648a65f661", 205330}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // King's Quest 4 - English DOS (from the King's Quest Collection) + // Executable scanning reports "0.000.502" + // SCI interpreter version 0.000.502 + {{"kq4sci", "", { + {"resource.map", 0, "3164a39790b599c954ecf716d0b32be8", 7476}, + {"resource.001", 0, "77615c595388acf3d1df8e107bfb6b52", 452523}, + {"resource.002", 0, "77615c595388acf3d1df8e107bfb6b52", 536573}, + {"resource.003", 0, "77615c595388acf3d1df8e107bfb6b52", 707591}, + {"resource.004", 0, "77615c595388acf3d1df8e107bfb6b52", 479562}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // King's Quest 4 - English DOS + // SCI interpreter version 0.000.274 + {{"kq4sci", "", { + {"resource.map", 0, "adbe267662a5915d3c89c9075ec8cf3e", 9474}, + {"resource.001", 0, "851a62d00972dc4002f472cc0d84e71d", 188239}, + {"resource.002", 0, "851a62d00972dc4002f472cc0d84e71d", 329895}, + {"resource.003", 0, "851a62d00972dc4002f472cc0d84e71d", 355385}, + {"resource.004", 0, "851a62d00972dc4002f472cc0d84e71d", 322951}, + {"resource.005", 0, "851a62d00972dc4002f472cc0d84e71d", 321593}, + {"resource.006", 0, "851a62d00972dc4002f472cc0d84e71d", 333777}, + {"resource.007", 0, "851a62d00972dc4002f472cc0d84e71d", 341038}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // King's Quest 4 - English DOS + // SCI interpreter version 0.000.253 + {{"kq4sci", "", { + {"resource.map", 0, "381d9dcb69c626f0a60631dbfec1d13a", 9474}, + {"resource.001", 0, "0c8566848a76eea19a6d6220914030a7", 191559}, + {"resource.002", 0, "0c8566848a76eea19a6d6220914030a7", 333345}, + {"resource.003", 0, "0c8566848a76eea19a6d6220914030a7", 358513}, + {"resource.004", 0, "0c8566848a76eea19a6d6220914030a7", 326297}, + {"resource.005", 0, "0c8566848a76eea19a6d6220914030a7", 325102}, + {"resource.006", 0, "0c8566848a76eea19a6d6220914030a7", 337288}, + {"resource.007", 0, "0c8566848a76eea19a6d6220914030a7", 343882}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // King's Quest 5 - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.004.018" + // SCI interpreter version 1.000.060 + {{"kq5", "", { + {"resource.map", 0, "fcbcca058e1157221ffc27251cd59bc3", 8040}, + {"resource.000", 0, "c595ca99e7fa9b2cabcf69cfab0caf67", 344909}, + {"resource.001", 0, "964a3be90d810a99baf72ea70c09f935", 836477}, + {"resource.002", 0, "d10f3e8ff2cd95a798b21cd08797b694", 814730}, + {"resource.003", 0, "f72fdd994d9ba03a8360d639f256344e", 804882}, + {"resource.004", 0, "a5b80f95c66b3a032348989408eec287", 747914}, + {"resource.005", 0, "31a5487f4d942e6354d5be49d59707c9", 834146}, + {"resource.006", 0, "26c0c25399b6715fec03fc3e12544fe3", 823048}, + {"resource.007", 0, "b914b5901e786327213e779725d30dd1", 778772}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 5 - German Amiga + // Executable scanning reports "1.004.024" + // SCI interpreter version 1.000.060 + {{"kq5", "", { + {"resource.map", 0, "bfbffd923cd64b24498e54f797aa6e41", 8250}, + {"resource.000", 0, "79479b5e4e5b0085d8eea1c7ff0f9f5a", 306893}, + {"resource.001", 0, "7840aadc82977c7b4f504a7e4a12829f", 720376}, + {"resource.002", 0, "d547167d4204170b44de8e1d63506215", 792586}, + {"resource.003", 0, "9cbb0712816097cbc9d0c1f987717c7f", 646446}, + {"resource.004", 0, "319712573661bd122390cdfbafb000fd", 831842}, + {"resource.005", 0, "5aa3d59968b569cd509dde00d4eb8751", 754201}, + {"resource.006", 0, "56546b20db11a4836f900efa6d3a3e74", 672099}, + {"resource.007", 0, "56546b20db11a4836f900efa6d3a3e74", 794194}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 5 - Italian Amiga + // Executable scanning reports "1.004.024" + // SCI interpreter version 1.000.060 + {{"kq5", "", { + {"resource.map", 0, "12e2f80c0269932411716dad06d2b229", 8250}, + {"resource.000", 0, "c598ff615a61bc0e418761283409f128", 305879}, + {"resource.001", 0, "17e63cfe78632fe07222e13a26dc0fb2", 720023}, + {"resource.002", 0, "abb340a53e4873a7c3bacfb16c0b779d", 792432}, + {"resource.003", 0, "aced8ce0be07eef77c0e7cff8cc4e476", 646088}, + {"resource.004", 0, "13fc1f1679f7f226ba52ffffe2e65f38", 831805}, + {"resource.005", 0, "de3c5c09e350fded36ca354998c2194d", 754784}, + {"resource.006", 0, "11cb750f5f816445ad0f4b9f50a4f59a", 672527}, + {"resource.007", 0, "11cb750f5f816445ad0f4b9f50a4f59a", 794259}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 5 - English DOS CD (from the King's Quest Collection) + // Executable scanning reports "x.yyy.zzz", VERSION file reports "1.000.052" + // SCI interpreter version 1.000.784 + {{"kq5", "CD", { + {"resource.map", 0, "f68ba690e5920725dcf9328001b90e33", 13122}, + {"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368}, + {"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // King's Quest 5 - English DOS Floppy + // SCI interpreter version 1.000.060 + {{"kq5", "", { + {"resource.map", 0, "d6172c27b453350e158815fbae23f41e", 8004}, + {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276351}, + {"resource.001", 0, "3f28c72dc7531aaccf8e972c7ee50d14", 1022087}, + {"resource.002", 0, "3e56ba5bf5e8637c619b57f6b6cacbb4", 1307211}, + {"resource.003", 0, "5d5d498f33ca7cde0d5b058630b36ad3", 1347875}, + {"resource.004", 0, "944a996f9cc90dabde9f51ed7dd52366", 1239689}, + {"resource.005", 0, "b6c43441cb78a9b484efc8e614aac092", 1287999}, + {"resource.006", 0, "672ede1136e9e401658538e51bd5dc22", 1172619}, + {"resource.007", 0, "2f48faf27666b58c276dda20f91f4a93", 1240456}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 5 - German DOS Floppy (supplied by markcoolio in bug report #2727101) + // SCI interpreter version 1.000.060 + {{"kq5", "", { + {"resource.map", 0, "bff44f0c326a71b1757c793a02b502d6", 8283}, + {"resource.000", 0, "d7ed18ec4a5de02a9a57830aa65a600d", 336826}, + {"resource.001", 0, "b1e5ec6a17be7e75ddb955f6f73191e4", 1136919}, + {"resource.002", 0, "04a88122db44610a4af019a579ec5ff6", 1340813}, + {"resource.003", 0, "215bb35acefae75fc80757c717166d7e", 1323916}, + {"resource.004", 0, "fecdec847e3bd8e3b0f9827900aa95fd", 1331811}, + {"resource.005", 0, "9c429782d102739f6bbb81e8b953b0cb", 1267525}, + {"resource.006", 0, "d1a75fdc01840664d00366cff6919366", 1208972}, + {"resource.007", 0, "c07494f0cce7c05210893938786a955b", 1337361}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 5 - French DOS Floppy (from the King's Quest Collector's Edition 1994) + // Supplied by aroenai in bug report #2812611 + // VERSION file reports "1.000", SCI interpreter version 1.000.784 + {{"kq5", "", { + {"resource.map", 0, "eb7853832f3bb10900b13b421a0bbe7f", 8283}, + {"resource.000", 0, "f063775b279208c14a83eda47073be90", 332806}, + {"resource.001", 0, "3e6add38564250fd1a5bb10593007530", 1136827}, + {"resource.002", 0, "d9a97a9cf6c79bbe8f19378f6dea45d5", 1343738}, + {"resource.003", 0, "bef90d755076c110e67ee3e635503f82", 1324811}, + {"resource.004", 0, "c14dbafcfbe00855ac6b2f2701058047", 1332216}, + {"resource.005", 0, "f4b31cafc5defac75125c5f7b7f9a31a", 1268334}, + {"resource.006", 0, "f7dc85307632ef657ceb1651204f6f51", 1210081}, + {"resource.007", 0, "7db4d0a1d8d547c0019cb7d2a6acbdd4", 1338473}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 5 - Italian DOS Floppy (from glorifindel) + // SCI interpreter version 1.000.060 + {{"kq5", "", { + {"resource.map", 0, "d55c9e83894a0885e37cd79bacf86384", 8283}, + {"resource.000", 0, "c99bbb11ace4aaacdc98b588a2ecea06", 332246}, + {"resource.001", 0, "42b98457b1a7282daa27afd89eef53f4", 1136389}, + {"resource.002", 0, "8cdc160f9dfc84aed7caa6c66fa31000", 1340730}, + {"resource.003", 0, "d0cb52dc41488c018359aa79a6527f51", 1323676}, + {"resource.004", 0, "e5c57060adf2b5c6fc24142acba023da", 1331097}, + {"resource.005", 0, "f4e441f284560eaa8022102315656a7d", 1267757}, + {"resource.006", 0, "8eeabd92af71e766e323db2100879102", 1209325}, + {"resource.007", 0, "dc10c107e0923b902326a040b9c166b9", 1337859}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722) + // SCI interpreter version 1.000.060 + {{"kq5", "", { + {"resource.map", 0, "70010c20138541f89013bb5e1b30f16a", 7998}, + {"resource.000", 0, "a591bd4b879fc832b8095c0b3befe9e2", 276398}, + {"resource.001", 0, "c0f48d4a7ebeaa6aa074fc98d77423e9", 1018560}, + {"resource.002", 0, "7f188a95acdb60bbe32a8379ba299393", 1307048}, + {"resource.003", 0, "0860785af59518b94d54718dddcd6907", 1348500}, + {"resource.004", 0, "c4745dd1e261c22daa6477961d08bf6c", 1239887}, + {"resource.005", 0, "6556ff8e7c4d1acf6a78aea154daa76c", 1287869}, + {"resource.006", 0, "da82e4beb744731d0a151f1d4922fafa", 1170456}, + {"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176}, + {NULL, 0, NULL, 0}}, Common::PL_POL, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 6 - English DOS Non-Interactive Demo + // Executable scanning reports "1.001.055", VERSION file reports "1.000.000" + // SCI interpreter version 1.001.055 + {{"kq6", "Demo", { + {"resource.map", 0, "f75727c00a6d884234fa2a43c951943a", 706}, + {"resource.000", 0, "535b1b920441ec73f42eaa4ccfd47b89", 264116}, + {"resource.msg", 0, "54d1fdc936f98c81f9e4c19e04fb1510", 8260}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 6 - English DOS Floppy + // SCI interpreter version 1.001.054 + {{"kq6", "", { + {"resource.map", 0, "a362063318eebe7d6423b1d9dc6213e1", 8703}, + {"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324}, + {"resource.msg", 0, "3cf5de44de36191f109d425b8450efc8", 258590}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 6 - German DOS Floppy (supplied by markcoolio in bug report #2727156) + // SCI interpreter version 1.001.054 + {{"kq6", "", { + {"resource.map", 0, "a362063318eebe7d6423b1d9dc6213e1", 8703}, + {"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324}, + {"resource.msg", 0, "756297b2155db9e43f621c6f6fb763c3", 282822}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 6 - English Windows CD (from the King's Quest Collection) + // Executable scanning reports "1.cfs.158", VERSION file reports "1.034 9/11/94 - KQ6 version 1.000.00G" + // SCI interpreter version 1.001.054 + {{"kq6", "CD", { + {"resource.map", 0, "7a550ebfeae2575ca00d47703a6a774c", 9215}, + {"resource.000", 0, "233394a5f33b475ae5975e7e9a420865", 8376352}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // King's Quest 6 - Spanish DOS CD (from jvprat) + // Executable scanning reports "1.cfs.158", VERSION file reports "1.000.000, July 5, 1994" + // SCI interpreter version 1.001.055 + {{"kq6", "CD", { + {"resource.map", 0, "a73a5ab04b8f60c4b75b946a4dccea5a", 8953}, + {"resource.000", 0, "4da3ad5868a775549a7cc4f72770a58e", 8537260}, + {"resource.msg", 0, "41eed2d3893e1ca6c3695deba4e9d2e8", 267102}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + +#ifdef ENABLE_SCI32 + // King's Quest 7 - English DOS (from the King's Quest Collection) + // Executable scanning reports "2.100.002", VERSION file reports "1.4" + {{"kq7", "", { + {"resource.map", 0, "2be9ab94429c721af8e05c507e048a15", 18697}, + {"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 203882535}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 7 - English DOS (from FRG) + // SCI interpreter version 2.100.002 + {{"kq7", "", { + {"resource.map", 0, "8676b0fbbd7362989a029fe72fea14c6", 18709}, + {"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 7 - German Windows (supplied by markcoolio in bug report #2727402) + // SCI interpreter version 2.100.002 + {{"kq7", "", { + {"resource.map", 0, "838b9ff132bd6962026fee832e8a7ddb", 18697}, + {"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 206626576}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 7 - Spanish DOS (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "2.00" + {{"kq7", "", { + {"resource.map", 0, "0b62693cbe87e3aaca3e8655a437f27f", 18709}, + {"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // King's Quest 7 - English DOS Non-Interactive Demo + // SCI interpreter version 2.100.002 + {{"kq7", "Demo", { + {"resource.map", 0, "b44f774108d63faa1d021101221c5a54", 1690}, + {"resource.000", 0, "d9659d2cf0c269c6a9dc776707f5bea0", 2433827}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, +#endif // ENABLE_SCI32 + + // Laura Bow - English Amiga + // Executable scanning reports "1.002.030" + // SCI interpreter version 0.000.685 + {{"laurabow", "", { + {"resource.map", 0, "731ab85e138f8cef1a7f4d1f36dfd375", 7422}, + {"resource.000", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 126317}, + {"resource.001", 0, "42fe895e9eb60e103025fd9ca737a849", 264763}, + {"resource.002", 0, "6f1ebd3692ce76644e0e06a38b7b56b5", 677436}, + {"resource.003", 0, "2ab23f64306b18c28302c8ec2964c5d6", 605134}, + {"resource.004", 0, "aa553977f7e5804081de293800d3bcce", 695067}, + {"resource.005", 0, "bfd870d51dc97729f0914095f58e6957", 676881}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow - English Atari ST (from jvprat) + // Executable scanning reports "1.002.030", Floppy label reports "1.000.062, 9.23.90" + // SCI interpreter version 0.000.685 + {{"laurabow", "", { + {"resource.map", 0, "9f90878e6e1b8c96e692203f068ce2b1", 8478}, + {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 515964}, + {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 721149}, + {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 667365}, + {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 683737}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow - English DOS Non-Interactive Demo + // Executable scanning reports "x.yyy.zzz" + {{"laurabow", "Demo", { + {"resource.map", 0, "e625726268ff4e123ada11f31f0249f3", 768}, + {"resource.001", 0, "0c8912290af0890f8d95faeb4ddb2d68", 333031}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow - English DOS 3.5" Floppy (from "The Roberta Williams Anthology"/1996) + // SCI interpreter version 0.000.631 + {{"laurabow", "", { + {"resource.map", 0, "4e511f47d9893fa529d6621a93fa0030", 8478}, + {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 515788}, + {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 721381}, + {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 667468}, + {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 683807}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow - English DOS (from FRG) + // SCI interpreter version 0.000.631 (or 0.000.685?) + {{"laurabow", "", { + {"resource.map", 0, "b1905f6aa68ff65a057b080b1eae954c", 12030}, + {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 108032}, + {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 354680}, + {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 361815}, + {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 339714}, + {"resource.005", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 327465}, + {"resource.006", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 328390}, + {"resource.007", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 317687}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow - German DOS (from Tobis87) + // SCI interpreter version 0.000.631 (or 0.000.685?) + {{"laurabow", "", { + {"resource.map", 0, "b1905f6aa68ff65a057b080b1eae954c", 12030}, + {"resource.001", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 108032}, + {"resource.002", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 354680}, + {"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 361815}, + {"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 339714}, + {"resource.005", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 327465}, + {"resource.006", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 328390}, + {"resource.007", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 317687}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow 2 - English DOS Non-Interactive Demo (from FRG) + // Executable scanning reports "x.yyy.zzz" + // SCI interpreter version 1.001.069 (just a guess) + {{"laurabow2", "Demo", { + {"resource.map", 0, "24dffc5db1d88c7999f13e8767ed7346", 855}, + {"resource.000", 0, "2b2b1b4f7584f9b38fd13f6ab95634d1", 781912}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow 2 - English DOS Floppy + // Executable scanning reports "2.000.274" + // SCI interpreter version 1.001.069 (just a guess) + {{"laurabow2", "", { + {"resource.map", 0, "610bfd9a852004222f0faaf5fc9e630a", 6489}, + {"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5035964}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow 2 - English DOS CD (from "The Roberta Williams Antology"/1996) + // Executable scanning reports "1.001.072", VERSION file reports "1.1" (from jvprat) + // SCI interpreter version 1.001.069 (just a guess) + {{"laurabow2", "CD", { + {"resource.map", 0, "a70945e61ba7ac7bfea6b7bd72c6aec5", 7274}, + {"resource.000", 0, "82578b8d5a7e09c4c58891ca49fae35b", 5598672}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Laura Bow 2 v1.1 - German DOS Floppy (from Tobis87, updated info from markcoolio in bug report #2723787, updated info from #2797962)) + // Executable scanning reports "2.000.274" + {{"laurabow2", "", { + {"resource.map", 0, "3b6dfbcda210bbc3f23fd1927113bf98", 6483}, + {"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766}, + {"resource.msg", 0, "795c928cd00dfec9fbc62ebcd12e1f65", 303185}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Laura Bow 2 - Spanish DOS CD (from jvprat) + // Executable scanning reports "2.000.274", VERSION file reports "1.000.000, May 10, 1994" + {{"laurabow2", "CD", { + {"resource.map", 0, "3b6dfbcda210bbc3f23fd1927113bf98", 6483}, + {"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766}, + {"resource.msg", 0, "71f1f0cd9f082da2e750c793a8ed9d84", 286141}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 1 EGA Remake - English DOS (from spookypeanut) + // SCI interpreter version 0.000.510 (or 0.000.577?) + {{"lsl1sci", "EGA Remake", { + {"resource.map", 0, "abc0dc50c55de5b9723bb6de193f8756", 3282}, + {"resource.000", 0, "d3bceaebef3f7be941c2038b3565161e", 451366}, + {"resource.001", 0, "38936d3c68b6f79d3ffb13955713fed7", 591352}, + {"resource.002", 0, "24c958bc922b07f91e25e8c93aa01fcf", 491230}, + {"resource.003", 0, "685cd6c1e05a695ab1e0db826337ee2a", 553279}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 1 VGA Remake - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.004.024" + // SCI interpreter version 1.000.784 + {{"lsl1sci", "VGA Remake", { + {"resource.map", 0, "7d115a9e27dc8ac71e8d5ef33d589bd5", 3366}, + {"resource.000", 0, "e67fd129d5810fc7ad8ea509d891cc00", 363073}, + {"resource.001", 0, "24ed6dc01b1e7fbc66c3d63a5994549a", 750465}, + {"resource.002", 0, "5790ac0505f7ca98d4567132b875eb1e", 681041}, + {"resource.003", 0, "4a34c3367c2fe7eb380d741374da1989", 572251}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 1 VGA Remake - English DOS (from spookypeanut) + // Executable scanning reports "1.000.577", VERSION file reports "2.1" + {{"lsl1sci", "VGA Remake", { + {"resource.map", 0, "6d04d26466337a1a64b8c6c0eb65c9a9", 3222}, + {"resource.000", 0, "d3bceaebef3f7be941c2038b3565161e", 922406}, + {"resource.001", 0, "ec20246209d7b19f38989261e5c8f5b8", 1111226}, + {"resource.002", 0, "85d6935ef77e6b0e16bc307640a0d913", 1088312}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 1 VGA Remake - English DOS (from FRG) + // SCI interpreter version 1.000.510 + {{"lsl1sci", "VGA Remake", { + {"resource.map", 0, "8606b083b011a0cc4a1fbfc2198a0a77", 3198}, + {"resource.000", 0, "d3bceaebef3f7be941c2038b3565161e", 918242}, + {"resource.001", 0, "d34cadb11e1aefbb497cf91bc1d3baa7", 1114688}, + {"resource.002", 0, "85b030bb66d5342b0a068f1208c431a8", 1078443}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 1 VGA Remake - English DOS Non-Interactive Demo + // SCI interpreter version 1.000.084 + {{"lsl1sci", "VGA Remake Demo", { + {"resource.map", 0, "434e1f6c39d71647b34f0ee57b2bbd68", 444}, + {"resource.001", 0, "0c0768215c562d9dace4a5ca53696cf3", 359913}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Larry 1 VGA Remake - Spanish DOS (from the Leisure Suit Larry Collection) + // Executable scanning reports "1.SQ4.057", VERSION file reports "1.000" + // This version is known to be corrupted + // SCI interpreter version 1.000.510 + {{"lsl1sci", "VGA Remake", { + {"resource.map", 0, "4fbe5c25878d51d7b2a68b710de4491b", 3327}, + {"resource.000", 0, "5e501a9bf8c753bf4c96158042422f00", 839172}, + {"resource.001", 0, "112648995dbc194037f1e4ed2e195910", 1063341}, + {"resource.002", 0, "3fe2a3aec0ed53c7d6db1845a67e3aa2", 1095908}, + {"resource.003", 0, "ac175df0ea9a2cba57f0248651856d27", 376556}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 1 VGA Remake - Russian DOS + // Executable scanning reports "1.000.510", VERSION file reports "2.0" + // SCI interpreter version 1.000.510 + {{"lsl1sci", "VGA Remake", { + {"resource.map", 0, "b54413d35e206d21ae2b2bdb092bd13a", 3198}, + {"resource.000", 0, "0d7b2afa666bd36d9535a15d3a837a66", 928566}, + {"resource.001", 0, "bc8ca10c807515d959cbd91f9ba47735", 1123759}, + {"resource.002", 0, "b7409ab32bc3bee2d6cce887cd33f2b6", 1092160}, + {NULL, 0, NULL, 0}}, Common::RU_RUS, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 2 - English Amiga (from www.back2roots.org) + // Executable scanning reports "x.yyy.zzz" + // SCI interpreter version 0.000.572 + {{"lsl2", "", { + {"resource.map", 0, "e36ce0fc94d1678d15acbf12d84ec47d", 6612}, + {"resource.001", 0, "a0d4a625311d307257da7fc43d00459d", 409124}, + {"resource.002", 0, "a0d4a625311d307257da7fc43d00459d", 630106}, + {"resource.003", 0, "a0d4a625311d307257da7fc43d00459d", 570356}, + {"resource.004", 0, "a0d4a625311d307257da7fc43d00459d", 717844}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 2 - English DOS Non-Interactive Demo + // Executable scanning reports "x.yyy.zzz" + // SCI interpreter version 0.000.409 + {{"lsl2", "Demo", { + {"resource.map", 0, "03dba704bb77da55a91ad27b5a3cac09", 528}, + {"resource.001", 0, "9f5520f0297206928df0b0b36493cd33", 127532}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 2 - English DOS + // SCI interpreter version 0.000.409 + {{"lsl2", "", { + {"resource.map", 0, "42258cf767a8ebaa9e66b6151a80e601", 5628}, + {"resource.001", 0, "4a24443a25e2b1492462a52809605dc2", 143847}, + {"resource.002", 0, "4a24443a25e2b1492462a52809605dc2", 348331}, + {"resource.003", 0, "4a24443a25e2b1492462a52809605dc2", 236550}, + {"resource.004", 0, "4a24443a25e2b1492462a52809605dc2", 204861}, + {"resource.005", 0, "4a24443a25e2b1492462a52809605dc2", 277732}, + {"resource.006", 0, "4a24443a25e2b1492462a52809605dc2", 345683}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 2 - English DOS + // SCI interpreter version 0.000.343 + {{"lsl2", "", { + {"resource.map", 0, "6bd43c92eaf561f64818116eed683fcf", 5598}, + {"resource.001", 0, "96033f57accfca903750413fd09193c8", 140526}, + {"resource.002", 0, "96033f57accfca903750413fd09193c8", 348672}, + {"resource.003", 0, "96033f57accfca903750413fd09193c8", 236676}, + {"resource.004", 0, "96033f57accfca903750413fd09193c8", 204867}, + {"resource.005", 0, "96033f57accfca903750413fd09193c8", 274953}, + {"resource.006", 0, "96033f57accfca903750413fd09193c8", 345818}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 3 - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.002.032" + // SCI interpreter version 0.000.685 + {{"lsl3", "", { + {"resource.map", 0, "4a6da6322ce189431b5ffbac992bad3a", 5328}, + {"resource.000", 0, "cdc2e21e297b10fe8fed6377af8c5698", 66523}, + {"resource.001", 0, "6abbaf8c7e3b36dd868868ed187e8995", 71761}, + {"resource.002", 0, "a883424fe6d594fec0cd5a79e7ad54c8", 476490}, + {"resource.003", 0, "5c10e462c8cf589610773e4fe8bfd996", 527238}, + {"resource.004", 0, "f408e59cbee1457f042e5773b8c53951", 651634}, + {"resource.005", 0, "433911eb764089d493aed1f958a5615a", 524259}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 3 - English DOS + // SCI interpreter version 0.000.572 + {{"lsl3", "", { + {"resource.map", 0, "0b6bd3e039682830a51c5755c06591db", 5916}, + {"resource.001", 0, "f18441027154292836b973c655fa3175", 456722}, + {"resource.002", 0, "f18441027154292836b973c655fa3175", 578024}, + {"resource.003", 0, "f18441027154292836b973c655fa3175", 506807}, + {"resource.004", 0, "f18441027154292836b973c655fa3175", 513651}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 3 - English DOS + // SCI interpreter version 0.000.572 + {{"lsl3", "", { + {"resource.map", 0, "0f429f5186f96d6c501838a1cb44bd43", 7452}, + {"resource.001", 0, "f18441027154292836b973c655fa3175", 141381}, + {"resource.002", 0, "f18441027154292836b973c655fa3175", 345171}, + {"resource.003", 0, "f18441027154292836b973c655fa3175", 329214}, + {"resource.004", 0, "f18441027154292836b973c655fa3175", 290173}, + {"resource.005", 0, "f18441027154292836b973c655fa3175", 302946}, + {"resource.006", 0, "f18441027154292836b973c655fa3175", 282465}, + {"resource.007", 0, "f18441027154292836b973c655fa3175", 257174}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 3 - English DOS Non-Interactive Demo + // SCI interpreter version 0.000.530 + {{"lsl3", "Demo", { + {"resource.map", 0, "33a2384f395470af3d2180e37ad0322a", 1140}, + {"resource.001", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 76525}, + {"resource.002", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 268299}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 3 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723832) + // Executable scanning reports "S.old.123" + // SCI interpreter version 0.000.572 (just a guess) + {{"lsl3", "", { + {"resource.map", 0, "4a77c8382e48a90c4168d3c144fc1b8f", 6480}, + {"resource.001", 0, "3827a9b17b926e12dcc336860f50612a", 460488}, + {"resource.002", 0, "3827a9b17b926e12dcc336860f50612a", 672403}, + {"resource.003", 0, "3827a9b17b926e12dcc336860f50612a", 587036}, + {"resource.004", 0, "3827a9b17b926e12dcc336860f50612a", 691932}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 3 - French DOS (provided by richiefs in bug report #2670691) + // Executable scanning reports "S.old.123" + // SCI interpreter version 0.000.572 (just a guess) + {{"lsl3", "", { + {"resource.map", 0, "13541234d440c7988a13582468b0e4be", 6480}, + {"resource.001", 0, "65f1bdaa20f6d0470e9d969f22473873", 457402}, + {"resource.002", 0, "65f1bdaa20f6d0470e9d969f22473873", 671614}, + {"resource.003", 0, "65f1bdaa20f6d0470e9d969f22473873", 586921}, + {"resource.004", 0, "65f1bdaa20f6d0470e9d969f22473873", 690826}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Larry 5 - English Amiga + // Executable scanning reports "1.004.023" + // SCI interpreter version 1.000.784 + {{"lsl5", "", { + {"resource.map", 0, "e36052ae0c8b14d6f074bcb0aee50a38", 6096}, + {"resource.000", 0, "d8b58ce10de52aa16f8b2006838c4fcc", 310510}, + {"resource.001", 0, "8caa8fbb50ea43f3efdfb66f1e68998b", 800646}, + {"resource.002", 0, "abdaa299e00c908052d33cd82eb60e9b", 784576}, + {"resource.003", 0, "810ad1d61638c27a780576cb09f18ed7", 805941}, + {"resource.004", 0, "3ce5901f1bc171ac0274d99a4eeb9e57", 623022}, + {"resource.005", 0, "f8b2d1137bb767e5d232056b99dd69eb", 623621}, + {"resource.006", 0, "bafc64e3144f115dc58c6aee02de98fb", 715598}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 5 - German Amiga + // Executable scanning reports "1.004.024" + // SCI interpreter version 1.000.784 + {{"lsl5", "", { + {"resource.map", 0, "863326c2eb5160f0b0960e159e8bf954", 6372}, + {"resource.000", 0, "5113d03db08e3da77a5b61294001331b", 357525}, + {"resource.001", 0, "59eba83ad465b08d763b44f86afa86f6", 837566}, + {"resource.002", 0, "59eba83ad465b08d763b44f86afa86f6", 622229}, + {"resource.003", 0, "59eba83ad465b08d763b44f86afa86f6", 383690}, + {"resource.004", 0, "59eba83ad465b08d763b44f86afa86f6", 654296}, + {"resource.005", 0, "59eba83ad465b08d763b44f86afa86f6", 664717}, + {"resource.006", 0, "bafc64e3144f115dc58c6aee02de98fb", 754966}, + {"resource.007", 0, "59eba83ad465b08d763b44f86afa86f6", 683135}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 5 - English DOS Non-Interactive Demo (from FRG) + // SCI interpreter version 1.000.181 + {{"lsl5", "Demo", { + {"resource.map", 0, "efe8d3f45ce4f6bd9a6643e0ac8d2a97", 504}, + {"resource.001", 0, "8bd8d9c0b5f455ee1269d63ce86c50dd", 531380}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Larry 5 - English DOS (from spookypeanut) + // SCI interpreter version 1.000.510 + {{"lsl5", "", { + {"resource.map", 0, "be00ef895197754ae4eab021ca44cbcd", 6417}, + {"resource.000", 0, "f671ab479df0c661b19cd16237692846", 726823}, + {"resource.001", 0, "db4a1381d88028876a99303bfaaba893", 751296}, + {"resource.002", 0, "d39d8db1a1e7806e7ccbfea3ef22df44", 1137646}, + {"resource.003", 0, "13fd4942bb818f9acd2970d66fca6509", 768599}, + {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 1024516}, + {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 1011944}, + {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1024810}, + {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 1030656}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 5 - German DOS (from Tobis87) + // SCI interpreter version 1.000.510 (just a guess) + {{"lsl5", "", { + {"resource.map", 0, "c97297aa76d4dd2ed144c7b7769e2caf", 6867}, + {"resource.000", 0, "4c00c14b8181ad47076a51d86097d97e", 759095}, + {"resource.001", 0, "245c44f8ccd796732e61857e67b30079", 918742}, + {"resource.002", 0, "e86aeb27711f4a673e06ec32cfc84125", 947382}, + {"resource.003", 0, "74edc89d8c1cb346ca346081b927e4c6", 1006884}, + {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 1023776}, + {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 959342}, + {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1021774}, + {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 993408}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 5 - French DOS (provided by richiefs in bug report #2670691) + // Executable scanning reports "1.lsl5.019" + // SCI interpreter version 1.000.510 (just a guess) + {{"lsl5", "", { + {"resource.map", 0, "499898e652dc41b51e368ae41acce41f", 7023}, + {"resource.000", 0, "4c00c14b8181ad47076a51d86097d97e", 958096}, + {"resource.001", 0, "245c44f8ccd796732e61857e67b30079", 1196765}, + {"resource.002", 0, "e86aeb27711f4a673e06ec32cfc84125", 948898}, + {"resource.003", 0, "74edc89d8c1cb346ca346081b927e4c6", 1006608}, + {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 971293}, + {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 920524}, + {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 946540}, + {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 958842}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 5 - Spanish DOS (from the Leisure Suit Larry Collection) + // Executable scanning reports "1.ls5.006", VERSION file reports "1.000, 4/21/92" + // SCI interpreter version 1.000.510 (just a guess) + {{"lsl5", "", { + {"resource.map", 0, "b6f7da7bf24e5a6b2946032cec3ea59c", 6861}, + {"resource.000", 0, "4c00c14b8181ad47076a51d86097d97e", 765418}, + {"resource.001", 0, "245c44f8ccd796732e61857e67b30079", 916028}, + {"resource.002", 0, "e86aeb27711f4a673e06ec32cfc84125", 929645}, + {"resource.003", 0, "74edc89d8c1cb346ca346081b927e4c6", 1005496}, + {"resource.004", 0, "999f407c9f38f937d4b8c4230ff5bb38", 1021996}, + {"resource.005", 0, "0cc8d35a744031c772ca7cd21ae95273", 958079}, + {"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1015136}, + {"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 987222}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 5 - Italian DOS Floppy (from glorifindel) + // SCI interpreter version 1.000.510 (just a guess) + {{"lsl5", "", { + {"resource.map", 0, "a99776df795127f387cb35dae872d4e4", 5919}, + {"resource.000", 0, "a8989a5a89e7d4f702b26b378c7a357a", 7001981}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 6 - English DOS (from spookypeanut) + // SCI interpreter version 1.001.113 + {{"lsl6", "", { + {"resource.map", 0, "bb8a39d9e2a77ba449a1e591109ad9a8", 6973}, + {"resource.000", 0, "4462fe48c7452d98fddcec327a3e738d", 5789138}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 6 - English/German/French DOS CD - LORES + // SCI interpreter version 1.001.115 + {{"lsl6", "", { + {"resource.map", 0, "0b91234b7112782962cb480b7791b6e2", 7263}, + {"resource.000", 0, "57d5fe8bb9e044158514476ea7678eb0", 5754790}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 6 - German DOS CD - LORES (provided by richiefs in bug report #2670691) + // SCI interpreter version 1.001.115 + {{"lsl6", "", { + {"resource.map", 0, "bafe85f32738854135991d4324ad147e", 7268}, + {"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5773160}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 6 - French DOS CD - LORES (provided by richiefs in bug report #2670691) + // SCI interpreter version 1.001.115 + {{"lsl6", "", { + {"resource.map", 0, "97797ea775baaf18a1907d357d3c0ea6", 7268}, + {"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5776092}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 6 - Spanish DOS - LORES (from the Leisure Suit Larry Collection) + // Executable scanning reports "1.001.113", VERSION file reports "1.000, 11.06.93, FIVE PATCHES ADDED TO DISK 6 ON 11-18-93" + {{"lsl6", "", { + {"resource.map", 0, "633bf8f42170b6271019917c8009989b", 6943}, + {"resource.000", 0, "7884a8db9253e29e6b37a2651fd90ba3", 5733116}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Leisure Suit Larry's Casino - English DOS (from the Leisure Suit Larry Collection) + // Executable scanning reports "1.001.029", VERSION file reports "1.000" + {{"lslcasino", "", { + {"resource.map", 0, "194f1578f2624db813c9072359ad1639", 783}, + {"resource.001", 0, "3733433b517ec3d14a3331d9ab3842ae", 344830}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Larry 6 - English/German DOS CD - HIRES + // SCI interpreter version 2.100.002 + {{"lsl6", "", { + {"resource.map", 0, "0c0804434ea62278dd15032b1947426c", 8872}, + {"resource.000", 0, "9a9f4870504444cda863dd14d077a680", 18520872}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 6 - German DOS CD - HIRES (provided by richiefs in bug report #2670691) + // SCI interpreter version 2.100.002 + {{"lsl6", "", { + {"resource.map", 0, "badfdf446ffed569a310d2c63a249421", 8896}, + {"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18534274}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 6 - French DOS CD - HIRES (provided by richiefs in bug report #2670691) + // SCI interpreter version 2.100.002 + {{"lsl6", "", { + {"resource.map", 0, "d184e9aa4f2d4b5670ddb3669db82cda", 8896}, + {"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18538987}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 7 - English DOS CD (from spookypeanut) + // SCI interpreter version 3.000.000 + {{"lsl7", "", { + {"resmap.000", 0, "eae93e1b1d1ccc58b4691c371281c95d", 8188}, + {"ressci.000", 0, "89353723488219e25589165d73ed663e", 66965678}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 7 - German DOS (from Tobis87) + // SCI interpreter version 3.000.000 + {{"lsl7", "", { + {"resmap.000", 0, "c11e6bfcfc2f2d05da47e5a7df3e9b1a", 8188}, + {"ressci.000", 0, "a8c6817bb94f332ff498a71c8b47f893", 66971724}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 7 - French DOS (provided by richiefs in bug report #2670691) + // SCI interpreter version 3.000.000 + {{"lsl7", "", { + {"resmap.000", 0, "4407849fd52fe3efb0c30fba60cd5cd4", 8206}, + {"ressci.000", 0, "dc37c3055fffbefb494ff22b145d377b", 66964472}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 7 - Italian DOS CD (from glorifindel) + // SCI interpreter version 3.000.000 + {{"lsl7", "", { + {"resmap.000", 0, "9852a97141f789413f29bf956052acdb", 8212}, + {"ressci.000", 0, "440b9fed89590abb4e4386ed6f948ee2", 67140181}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Larry 7 - Spanish DOS (from the Leisure Suit Larry Collection) + // Executable scanning reports "3.000.000", VERSION file reports "1.0s" + {{"lsl7", "", { + {"resmap.000", 0, "8f3d603e1acc834a5d598b30cdfc93f3", 8188}, + {"ressci.000", 0, "32792f9bc1bf3633a88b382bb3f6e40d", 67071418}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Larry 7 - English DOS Demo (provided by richiefs in bug report #2670691) + // SCI interpreter version 2.100.002 + {{"lsl7", "Demo", { + {"ressci.000", 0, "5cc6159688b2dc03790a67c90ccc67f9", 10195878}, + {"resmap.000", 0, "6a2b2811eef82e87cde91cf1de845af8", 2695}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Lighthouse - English Windows Demo (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "1.00" + {{"lighthouse", "Demo", { + {"resource.map", 0, "543124606352bfa5e07696ddf2a669be", 64}, + {"resource.000", 0, "5d7714416b612463d750fb9c5690c859", 28952}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Lighthouse - English Windows Demo + // Executable scanning reports "3.000.000", VERSION file reports "1.00" + {{"lighthouse", "Demo", { + {"resmap.000", 0, "3bdee7a16926975a4729f75cf6b80a92", 1525}, + {"ressci.000", 0, "3c585827fa4a82f4c04a56a0bc52ccee", 11494351}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Lighthouse - English DOS (from jvprat) + // Executable scanning reports "3.000.000", VERSION file reports "1.1" + {{"lighthouse", "", { + {"resmap.001", 0, "47abc502c0b541b582db28f38dbc6a56", 7801}, + {"ressci.001", 0, "14e922c47b92156377cb49e241691792", 99591924}, + {"resmap.002", 0, "c68db5333f152fea6ca2dfc75cad8b34", 7573}, + {"ressci.002", 0, "175468431a979b9f317c294ce3bc1430", 94628315}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Lighthouse - Spanish DOS (from jvprat) + // Executable scanning reports "3.000.000", VERSION file reports "1.1" + {{"lighthouse", "", { + {"resmap.001", 0, "c5d49b2a8a4eafc92fd041a3a0f2da68", 7846}, + {"ressci.001", 0, "18553177dbf83fb2cb6c8edcbb174183", 99543093}, + {"resmap.002", 0, "e7dc85884a2417e2eff9de0c63dd65fa", 7630}, + {"ressci.002", 0, "3c8d627c555b0e3e4f1d9955bc0f0df4", 94631127}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, +#endif // ENABLE_SCI32 + + // Mixed-Up Fairy Tales v1.000 - English DOS Non-Interactive Demo + {{"fairytales", "Demo", { + {"resource.map", 0, "c2cf672c3f4251e7472d4542af3bf764", 933}, + {"resource.000", 0, "8be56a3a88c065ee00c02c0e29199f3a", 14643}, + {"resource.001", 0, "9e33566515b18bee7915db448063bba2", 871853}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Mixed-Up Fairy Tales v1.000 - English DOS (supplied by markcoolio in bug report #2723791) + // Executable scanning reports "1.000.145" + {{"fairytales", "", { + {"resource.map", 0, "9ae5aecc1cb797b11ea5cf0caeea272c", 3261}, + {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 923685}, + {"resource.001", 0, "49c8f7dcd9989e4491a93554bec325b0", 52324}, + {"resource.002", 0, "6767f8c8585f617aaa91d442f41ae714", 1032989}, + {"resource.003", 0, "b1288e0821ee358d1ffe877e5900c8ec", 1047565}, + {"resource.004", 0, "f79daa70390d73746742ffcfc3dc4471", 937580}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Mixed-Up Fairy Tales - English DOS Floppy (from jvprat) + // Executable scanning reports "1.000.145", Floppy label reports "1.0, 11.13.91", VERSION file reports "1.000" + {{"fairytales", "", { + {"resource.map", 0, "66105c02fa8f1785a3fd28957e41cb48", 3249}, + {"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 984439}, + {"resource.001", 0, "49c8f7dcd9989e4491a93554bec325b0", 238019}, + {"resource.002", 0, "564f516d991032e781492592a4eaa275", 1414142}, + {"resource.003", 0, "dd6cef0c592eadb7e6be9a25307c57a2", 1344719}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Mixed-Up Mother Goose - English Amiga (from www.back2roots.org) + // Executable scanning reports "1.003.009" + // SCI interpreter version 0.001.010 + {{"mothergoose", "", { + {"resource.map", 0, "4aa28ac93fae03cf854594da13d9229c", 2700}, + {"resource.001", 0, "fb552ae550ca1dac19ed8f6a3767612d", 262885}, + {"resource.002", 0, "fb552ae550ca1dac19ed8f6a3767612d", 817191}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Mixed-Up Mother Goose v2.000 - English DOS Floppy (supplied by markcoolio in bug report #2723795) + // Executable scanning reports "1.001.031" + {{"mothergoose", "", { + {"resource.map", 0, "52aae15e493cafd1da7e1c9b657a5bb9", 7026}, + {"resource.000", 0, "b7ecd8ae9e254e80310b5a668b276e6e", 2948975}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Mixed-Up Mother Goose - English DOS CD (from jvprat) + // Executable scanning reports "x.yyy.zzz" + // SCI interpreter version 0.000.999 (just a guess) + {{"mothergoose", "CD", { + {"resource.map", 0, "1c7f311b0a2c927b2fbe81ae341fb2f6", 5790}, + {"resource.001", 0, "5a0ed1d745855148364de1b3be099bac", 4369438}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Mixed-Up Mother Goose - English Windows Interactive Demo + // Executable scanning reports "x.yyy.zzz" + {{"mothergoose", "Demo", { + {"resource.map", 0, "87f9dc1cafc4d4fa835fb2f00cf3a6ef", 4560}, + {"resource.001", 0, "5a0ed1d745855148364de1b3be099bac", 2070072}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Mixed-Up Mother Goose Deluxe - English Windows/DOS CD (supplied by markcoolio in bug report #2723810) + // Executable scanning reports "2.100.002" + {{"mothergoose", "", { + {"resource.map", 0, "5159a1578c4306bfe070a3e4d8c2e1d3", 4741}, + {"resource.000", 0, "1926925c95d82f0999590e93b02887c5", 15150768}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, +#endif // ENABLE_SCI32 + + // Ms. Astro Chicken - English DOS + // SCI interpreter version 1.000.679 + {{"msastrochicken", "", { + {"resource.map", 0, "5b457cbe5042f557e5b610148171f6c0", 1158}, + {"resource.001", 0, "453ea81ef66a50cbe33ce06302afe47f", 229737}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Phantasmagoria - English DOS (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "1.100.000UK" + {{"phantasmagoria", "", { + {"resmap.001", 0, "416138651ea828219ca454cae18341a3", 11518}, + {"ressci.001", 0, "3aae6559aa1df273bc542d5ac6330d75", 65844612}, + {"resmap.002", 0, "de521d0c7ab32897e7fe58e421c816b7", 12058}, + {"ressci.002", 0, "3aae6559aa1df273bc542d5ac6330d75", 71588691}, + {"resmap.003", 0, "25df95bd7da3686f71a0af8784a2b8ca", 12334}, + {"ressci.003", 0, "3aae6559aa1df273bc542d5ac6330d75", 73651084}, + {"resmap.004", 0, "e108a3d35794f1721aeea3e62a3f8b3b", 12556}, + {"ressci.004", 0, "3aae6559aa1df273bc542d5ac6330d75", 75811935}, + {"resmap.005", 0, "390d81f9e14a3f3ee2ea477135f0288e", 12604}, + {"ressci.005", 0, "3aae6559aa1df273bc542d5ac6330d75", 78814934}, + {"resmap.006", 0, "8ea3c954606e80604680f9fe707f15d8", 12532}, + {"ressci.006", 0, "3aae6559aa1df273bc542d5ac6330d75", 77901360}, + {"resmap.007", 0, "afbd16ea77869a720afa1c5371de107d", 7972}, + //{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 25859038}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Phantasmagoria 2 - English Windows (from jvprat) + // Executable scanning reports "3.000.000", VERSION file reports "001.0.06" + {{"phantasmagoria2", "", { + {"resmap.001", 0, "0a961e135f4f7effb195158325856633", 1108}, + {"ressci.001", 0, "53f457cddb0dffc056593905c4cbb989", 24379964}, + {"resmap.002", 0, "5d3189fe3d4f286f83c5c8031fa3e9f7", 1126}, + {"ressci.002", 0, "53f457cddb0dffc056593905c4cbb989", 34465805}, + {"resmap.003", 0, "c92e3c840b827c236ab6671c03760c56", 1162}, + {"ressci.003", 0, "53f457cddb0dffc056593905c4cbb989", 38606375}, + {"resmap.004", 0, "8d5cfe19365f71370b87063686f39171", 1288}, + {"ressci.004", 0, "53f457cddb0dffc056593905c4cbb989", 42447131}, + {"resmap.005", 0, "8bd5ceeedcbe16dfe55d1b90dcd4be84", 1942}, + {"ressci.005", 0, "05f9fe2bee749659acb3cd2c90252fc5", 67905112}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, +#endif // ENABLE_SCI32 + + // Pepper's Adventure In Time 1.000 English + // Executable scanning reports "1.001.072", VERSION file reports "1.000" + {{"pepper", "", { + {"resource.map", 0, "72726dc81c1b4c1110c486be77369bc8", 5179}, + {"resource.000", 0, "670d0c53622429f4b11275caf7f8d292", 5459574}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Pepper - English DOS Non-Interactive Demo + // Executable scanning reports "1.001.060", VERSION file reports "1.000" + {{"pepper", "Demo", { + {"resource.map", 0, "379bb4fb896630b14f2d91ed21e36ba1", 984}, + {"resource.000", 0, "118f6c31a93ec7fd9a231c61125229e3", 645494}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Pepper - English DOS/Windows Interactive Demo + // Executable scanning reports "1.001.069", VERSION file reports ".001" + {{"pepper", "Demo", { + {"resource.map", 0, "975e8df76106a5c13d12ab674f906a02", 2514}, + {"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1698164}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Pepper - English DOS Interactive Demo + // Executable scanning reports "1.001.072", VERSION file reports "1.000" + {{"pepper", "Demo", { + {"resource.map", 0, "9c9b7b900651a370dd3fb38d478b1798", 2524}, + {"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1713544}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 1 VGA Remake - English DOS (from the Police Quest Collection) + // Executable scanning reports "1.001.029", VERSION file reports "2.000" + {{"pq1sci", "VGA Remake", { + {"resource.map", 0, "35efa814fb994b1cbdac9611e401da67", 5013}, + {"resource.000", 0, "e0d5ddf34eda903a38f0837e2aa7145b", 6401433}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 2 - English Amiga (from www.back2roots.org) + // SCI interpreter version 0.000.685 (just a guess) + {{"pq2", "", { + {"resource.map", 0, "499de78ae72b7ce219f944c5e7ef0c5b", 3426}, + {"resource.000", 0, "77f02def3094af804fd2371db25b7100", 250232}, + {"resource.001", 0, "523db0c07f1da2a822c2c39ee0482544", 179334}, + {"resource.002", 0, "499737c21a28ac026e11ab817100d610", 511099}, + {"resource.003", 0, "e008f5d6e2a7c4d4a0da0173e4fa8f8b", 553970}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 2 - English DOS Non-Interactive Demo + // Executable scanning reports "0.000.413" + {{"pq2", "Demo", { + {"resource.map", 0, "8b77d0d4650c2052b356cece28294b58", 576}, + {"resource.001", 0, "376ef6d6eaaeed66e1424bd219c4b9ab", 215398}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Police Quest 2 - English DOS (provided by richiefs in bug report #2670691) + // SCI interpreter version 0.000.395 + {{"pq2", "", { + {"resource.map", 0, "9cff78c4be9e6a4848b6e9377569e3d9", 5700}, + {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 163291}, + {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 329367}, + {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 305819}, + {"resource.004", 0, "77f02def3094af804fd2371db25b7100", 342149}, + {"resource.005", 0, "77f02def3094af804fd2371db25b7100", 349899}, + {"resource.006", 0, "77f02def3094af804fd2371db25b7100", 354991}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Police Quest 2 - English DOS (from the Police Quest Collection) + // Executable scanning reports "0.000.490" + {{"pq2", "", { + {"resource.map", 0, "28a6f471c7900c2c92da40eecb615d9d", 4584}, + {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 509525}, + {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 546000}, + {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Police Quest 2 - English DOS (from FRG) + // SCI interpreter version 0.000.395 + {{"pq2", "", { + {"resource.map", 0, "fe019e9773623fcb7da810db9e64c8a9", 4548}, + {"resource.001", 0, "77f02def3094af804fd2371db25b7100", 509760}, + {"resource.002", 0, "77f02def3094af804fd2371db25b7100", 542897}, + {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 586857}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Police Quest 3 - English Amiga + // Executable scanning reports "1.004.024" + // SCI interpreter version 1.000.784 + {{"pq3", "", { + {"resource.map", 0, "29923fe1ef1f0909b57255d61c558e68", 5742}, + {"resource.000", 0, "4908e4f4977e8e19c90c29b36a741ffe", 298541}, + {"resource.001", 0, "0eb943ca807e2f69578821d490770d2c", 836567}, + {"resource.002", 0, "f7044bb08a1fcbe5077791ed8d4996f0", 691207}, + {"resource.003", 0, "630bfa65beb05f743552704ac2899dae", 759891}, + {"resource.004", 0, "7b229fbdf30d670d0728cede3e984a7e", 838663}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 3 - German Amiga + // Executable scanning reports "1.004.024" + // SCI interpreter version 1.000.784 + {{"pq3", "", { + {"resource.map", 0, "357304811fc2bbaa3443fc62d677fe06", 6282}, + {"resource.000", 0, "49879e6ce7c19151ffa6af1a09763dc7", 324273}, + {"resource.001", 0, "015e6119badb391ab5f4b36abedb5d4a", 718814}, + {"resource.002", 0, "1ee419ba252fbed47fbce8399f56f8ad", 674823}, + {"resource.003", 0, "87361c17fd863b58f98828de68770279", 682288}, + {"resource.004", 0, "6258d5dd85898d8e218eb8113ebc9059", 722738}, + {"resource.005", 0, "6258d5dd85898d8e218eb8113ebc9059", 704485}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 3 - English DOS (from the Police Quest Collection) + // Executable scanning reports "T.A00.178", VERSION file reports "1.00" + // SCI interpreter version 1.000.510 + {{"pq3", "", { + {"resource.map", 0, "6457bf0c8ca865a42d9ff5827ab49b89", 5559}, + {"resource.000", 0, "7659713720d61d9465a59091b7ee63ea", 737253}, + {"resource.001", 0, "61c7c187d25a8346be0a092d5f037278", 1196787}, + {"resource.002", 0, "c18e0d408e4f4f40365d42aa15931f67", 1153561}, + {"resource.003", 0, "8791b9eef53edf77c2dac950142221d3", 1159791}, + {"resource.004", 0, "1b91e891a3c60a941dac0eecdf83375b", 1143606}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 3 - English DOS Non-Interactive Demo + // Executable scanning reports "T.A00.052" + // SCI interpreter version 1.000.510 + {{"pq3", "Demo", { + {"resource.map", 0, "ec8e58e7663ae5173853abf6c76b52bb", 867}, + {"resource.000", 0, "277f97771f7a6d89677141f02da313d6", 65150}, + {"resource.001", 0, "5c5a551b6c86cce2ee75becb90e0b586", 624411}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 3 - German DOS (supplied by markcoolio in bug report #2723837) + // Executable scanning reports "T.A00.178" + // SCI interpreter version 1.000.510 + {{"pq3", "", { + {"resource.map", 0, "8a970edf98eba4c11bb1827aab1694d1", 5625}, + {"resource.000", 0, "5ee460af3d70c06a745cc482b6c783ba", 865204}, + {"resource.001", 0, "ff6182bf96c8f8af5bd8c11769c9cbf2", 1183456}, + {"resource.002", 0, "cce99b96a578b62ff6cebdae8d122feb", 1179358}, + {"resource.003", 0, "4836f460f4cfc8de61e2df4c45775504", 1180956}, + {"resource.004", 0, "0c3eb84b9755852d9e795e0d5c9373c7", 1171760}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 4 - English DOS Non-Interactive Demo (from FRG) + // SCI interpreter version 1.001.096 + {{"pq4", "Demo", { + {"resource.map", 0, "be56f87a1c4a13062a30a362df860c2f", 1472}, + {"resource.000", 0, "527d5684016e6816157cd15d9071b11b", 1121310}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Police Quest 4 - English DOS (from the Police Quest Collection) + // Executable scanning reports "2.100.002", VERSION file reports "1.100.000" + {{"pq4", "", { + {"resource.map", 0, "379dfe80ed6bd16c47e4b950c4722eac", 11374}, + {"resource.000", 0, "fd316a09b628b7032248139003369022", 18841068}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 4 - English DOS + // SCI interpreter version 2.000.000 (a guess?) + {{"pq4", "", { + {"resource.map", 0, "aed9643158ccf01b71f359db33137f82", 9895}, + {"resource.000", 0, "da383857b3be1e4514daeba2524359e0", 15141432}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest 4 - German DOS (supplied by markcoolio in bug report #2723840) + // SCI interpreter version 2.000.000 (a guess?) + {{"pq4", "", { + {"resource.map", 0, "2393ee728ab930b2762cb5889f9b5aff", 9256}, + {"resource.000", 0, "6ba98bd2e436739d87ecd2a9b99cabb4", 14730155}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest: SWAT - English DOS/Windows Demo (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "0.001.200" + {{"pqswat", "Demo", { + {"resource.map", 0, "8c96733ef94c21526792f7ca4e3f2120", 1648}, + {"resource.000", 0, "d8892f1b8c56c8f7704325460f49b300", 3676175}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Police Quest: SWAT - English Windows (from the Police Quest Collection) + // Executable scanning reports "2.100.002", VERSION file reports "1.0c" + {{"pqswat", "", { + {"resmap.001", 0, "de5ea1beb3d9490737aa5fd398fe9765", 6937}, + {"ressci.001", 0, "7cd5414f54748f90904a46123a52472f", 29467363}, + {"resmap.002", 0, "ff7a7e0f3dea2c73182b7ea84e3431cc", 6211}, + {"ressci.002", 0, "e613357f3349c4bfa5a7b7b312be7f97", 25987989}, + {"resmap.003", 0, "84303aa019fa75a0eb20ba502bc4ccae", 6601}, + {"ressci.003", 0, "00a755e917c442ca8cf1a1bea689e6fb", 45073980}, + {"resmap.004", 0, "4228038906f041623e65789500b22285", 6835}, + {"ressci.004", 0, "b7e619e6ecf62fe65d5116a3a422e5f0", 46223872}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, +#endif // ENABLE_SCI32 + + // Quest for Glory 1 / Hero's Quest - English DOS 3.5" Floppy (supplied by merkur in bug report #2718784) + // Executable scanning reports "0.000.566" + {{"qfg1", "", { + {"resource.map", 0, "c1dc4470fb947c067567252f62d6c1b6", 6474}, + {"resource.000", 0, "481b034132106390cb5160fe61dd5f58", 80334}, + {"resource.001", 0, "4d67acf52833ff45c7f753d6663532e8", 462727}, + {"resource.002", 0, "439ba9b6dde216e6eb97ef3a9830fbe4", 646869}, + {"resource.003", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 642203}, + {"resource.004", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 641688}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy (supplied by markcoolio in bug report #2723843) + // Executable scanning reports "0.000.566" + {{"qfg1", "", { + {"resource.map", 0, "94bc3f2ae2dad12f1303606740d087ff", 6936}, + {"resource.000", 0, "481b034132106390cb5160fe61dd5f58", 80334}, + {"resource.001", 0, "4d67acf52833ff45c7f753d6663532e8", 95498}, + {"resource.002", 0, "3e2a89d60d385caca5b3394049da4bc4", 271587}, + {"resource.003", 0, "e56e9fd2f7d2c98774699f7a5087e524", 255998}, + {"resource.004", 0, "d74cd4290bf60e1409117202e4ce8592", 266415}, + {"resource.005", 0, "7288ed6d5da89b7a80b4af3897a7963a", 271185}, + {"resource.006", 0, "69366c2a2f99917199fe1b60a4fee19d", 267852}, + {"resource.007", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 272747}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Quest for Glory 1 - Japanese PC-98 5.25" Floppy + // Executable scanning reports "S.old.201" + {{"qfg1", "8 Colors", { + {"resource.map", 0, "5cbeb95dd2a4b7cb242b415cc6ec1c47", 6444}, + {"resource.001", 0, "a21451ef6fa8179bd4b22c4950004c44", 859959}, + {"resource.002", 0, "a21451ef6fa8179bd4b22c4950004c44", 1136968}, + {"resource.003", 0, "a21451ef6fa8179bd4b22c4950004c44", 769897}, + {NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 1 - Japanese PC-98 5.25" Floppy + // Executable scanning reports "S.old.201" + {{"qfg1", "16 Colors", { + {"resource.map", 0, "3ecaba33bf77cb434067a0b8aee15097", 6444}, + {"resource.001", 0, "a21451ef6fa8179bd4b22c4950004c44", 864754}, + {"resource.002", 0, "a21451ef6fa8179bd4b22c4950004c44", 1147121}, + {"resource.003", 0, "a21451ef6fa8179bd4b22c4950004c44", 777575}, + {NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 1 - English Amiga + // Executable scanning reports "1.002.020" + // SCI interpreter version 0.000.685 + {{"qfg1", "", { + {"resource.map", 0, "e65034832f0c9df1dc22128227b782d0", 6066}, + {"resource.000", 0, "1c0255dea2d3cd71eee9f2db201eee3f", 111987}, + {"resource.001", 0, "a270012fa74445d74c044d1b65a9ff8c", 143570}, + {"resource.002", 0, "e64004e020fdf1813be52b639b08be89", 553201}, + {"resource.003", 0, "16cd4414c37ae3bb6d6da33dce8e25e8", 654096}, + {"resource.004", 0, "16cd4414c37ae3bb6d6da33dce8e25e8", 689124}, + {"resource.005", 0, "5f3386ef2f2b1254e4a066f5d9027324", 609529}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 1 - English DOS + // SCI interpreter version 0.000.629 + {{"qfg1", "", { + {"resource.map", 0, "74a108a7fb345bfc84f4113b6e5241bb", 6432}, + {"resource.000", 0, "40332d3ebfc70a4b6a6a0443c2763287", 79181}, + {"resource.001", 0, "917fcef303e9489597154727baaa9e07", 461422}, + {"resource.002", 0, "05ddce5f437a516b89ede2438fac09d8", 635734}, + {"resource.003", 0, "951299a82a8134ed12c5c18118d45c2f", 640483}, + {"resource.004", 0, "951299a82a8134ed12c5c18118d45c2f", 644443}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 1 VGA Remake - English DOS + // Executable scanning reports "2.000.411" + {{"qfg1", "VGA Remake", { + {"resource.map", 0, "a731fb6c9c0b282443f7027bc8694d4c", 8469}, + {"resource.000", 0, "ecace1a2771846b1a8aa1afdd44111a0", 6570147}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 1 VGA Remake - English DOS Non-Interactive Demo (from FRG) + // SCI interpreter version 1.001.029 + {{"qfg1", "VGA Remake Demo", { + {"resource.map", 0, "ac0257051c95a59c0cdc0be24d9b11fa", 729}, + {"resource.000", 0, "ec6f5cf369054dd3e5392995e9975b9e", 768218}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 2 - English Amiga + // Executable scanning reports "1.003.004" + // SCI interpreter version 0.001.010 + {{"qfg2", "", { + {"resource.map", 0, "365ea1033ba26d227ec4007be88c59cc", 7596}, + {"resource.000", 0, "810245be50fde5a67e3ea95e876e3e64", 233341}, + {"resource.001", 0, "7a5fde9875211ed67a896fc0d91940c8", 127294}, + {"resource.002", 0, "dcf6bc2c18660d7ad532fb61861eb721", 543644}, + {"resource.003", 0, "dcf6bc2c18660d7ad532fb61861eb721", 565044}, + {"resource.004", 0, "dcf6bc2c18660d7ad532fb61861eb721", 466630}, + {"resource.005", 0, "a77d2576c842b2b06da57d4ac8fc51c0", 579975}, + {"resource.006", 0, "ccf5dba33e5cab6d5872838c0f8db44c", 500039}, + {"resource.007", 0, "4c9fc1587545879295cb9627f56a2cb8", 575056}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 2 - English (from FRG) + // Executable scanning reports "1.000.072" + {{"qfg2", "", { + {"resource.map", 0, "bc79c5685c00edab3ad6df18691703bc", 6906}, + {"resource.000", 0, "a17e374c4d33b81208c862bc0ffc1a38", 212119}, + {"resource.001", 0, "e08d7887e30b12008c40f9570447711a", 867866}, + {"resource.002", 0, "df137dc7869cab07e1149ba2333c815c", 790750}, + {"resource.003", 0, "b192607c42f6960ecdf2ad2e4f90e9bc", 972804}, + {"resource.004", 0, "cd2de58e27665d5853530de93fae7cd6", 983617}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 2 - English DOS + // Executable scanning reports "1.000.072" + {{"qfg2", "", { + {"resource.map", 0, "be23af27e9557bf232efe213ac7f277c", 8166}, + {"resource.000", 0, "a17e374c4d33b81208c862bc0ffc1a38", 212120}, + {"resource.001", 0, "e08d7887e30b12008c40f9570447711a", 331973}, + {"resource.002", 0, "df137dc7869cab07e1149ba2333c815c", 467505}, + {"resource.003", 0, "df137dc7869cab07e1149ba2333c815c", 502560}, + {"resource.004", 0, "df137dc7869cab07e1149ba2333c815c", 488541}, + {"resource.005", 0, "df137dc7869cab07e1149ba2333c815c", 478688}, + {"resource.006", 0, "b1944bd664ddbd2859cdaa0c4a0d6281", 507489}, + {"resource.007", 0, "cd2de58e27665d5853530de93fae7cd6", 490794}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 2 - English DOS Non-Interactive Demo + // Executable scanning reports "1.000.046" + {{"qfg2", "Demo", { + {"resource.map", 0, "e75eb86bdd517b3ef709058249986a87", 906}, + {"resource.001", 0, "9b098f9e1008abe30e56c93b896494e6", 362123}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 3 - English DOS Non-Interactive Demo (from FRG) + // Executable scanning reports "1.001.021", VERSION file reports "1.000, 0.001.059, 6.12.92" + {{"qfg3", "Demo", { + {"resource.map", 0, "fd71de9b588a45f085317caacf050e91", 687}, + {"resource.000", 0, "b6c69bf6c18bf177492249fe81fc6a6d", 648702}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 3 - English DOS + // SCI interpreter version 1.001.050 + {{"qfg3", "", { + {"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958}, + {"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868000}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 3 - German DOS (supplied by markcoolio in bug report #2723846) + // Executable scanning reports "L.rry.083" + {{"qfg3", "", { + {"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958}, + {"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868042}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 3 - Spanish DOS CD (from jvprat) + // Executable scanning reports "L.rry.083", VERSION file reports "1.000.000, June 30, 1994" + {{"qfg3", "", { + {"resource.map", 0, "10809197c33a5e62819311d8a2f73f85", 5978}, + {"resource.000", 0, "ba7ac86155e4c531e46cd73c86daa80a", 5884098}, + {"resource.msg", 0, "a63974730d294dec0bea10057c36e506", 256014}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Quest for Glory 4 - English DOS Non-Interactive Demo (from FRG) + // SCI interpreter version 1.001.069 (just a guess) + {{"qfg4", "Demo", { + {"resource.map", 0, "1ba7c7ae1efb315326d45cb931569b1b", 922}, + {"resource.000", 0, "41ba03f0b188b029132daa3ece0d3e14", 623154}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Quest for Glory 4 1.1 Floppy - English DOS (supplied by markcool in bug report #2723852) + // SCI interpreter version 2.000.000 (a guess?) + {{"qfg4", "", { + {"resource.map", 0, "685bdb1ed47bbbb0e5e25db392da83ce", 9301}, + {"resource.000", 0, "f64fd6aa3977939a86ff30783dd677e1", 11004993}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 4 1.1 Floppy - German DOS (supplied by markcool in bug report #2723850) + // SCI interpreter version 2.000.000 (a guess?) + {{"qfg4", "", { + {"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301}, + {"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Quest for Glory 4 - English DOS/Windows (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "1.0" + {{"qfg4", "", { + {"resource.map", 0, "aba367f2102e81782d961b14fbe3d630", 10246}, + {"resource.000", 0, "263dce4aa34c49d3ad29bec889007b1c", 11571394}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + +#if 0 + // NOTE: This version looks to be exactly the same as the English one + // Perhaps it's the English one? + + // Quest for Glory 4 - German DOS/Windows (from PCJoker 2/98) + {{"qfg4", "", { + {"resource.map", 0, "aba367f2102e81782d961b14fbe3d630", 10246}, + {"resource.000", 0, "263dce4aa34c49d3ad29bec889007b1c", 11571394}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, +#endif + + // Quest for Glory 4 - German DOS/Windows Disk V1.1 (from PCJoker 2/89) + // SCI interpreter version 2.000.000 (a guess?) + {{"qfg4", "", { + {"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301}, + {"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, +#endif + + // Slater & Charlie go camping + {{"slater", "", { + {"resource.000", 0, "1846b57fe84774be72f7c50ab3c90df0", 2256126}, + {"resource.map", 0, "21f85414124dc23e54544a5536dc35cd", 4044}, + {"resource.msg", 0, "c44f51fb955eae266fecf360ebcd5ad2", 1132}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // RAMA - English DOS/Windows Demo + // Executable scanning reports "2.100.002", VERSION file reports "000.000.008" + {{"rama", "Demo", { + {"resmap.001", 0, "775304e9b2a545156be4d94209550094", 1393}, + {"ressci.001", 0, "259437fd75fdf51e8207fda8c01fa4fd", 2334384}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // RAMA - English Windows (from jvprat) + // Executable scanning reports "3.000.000", VERSION file reports "1.100.000" + {{"rama", "", { + {"resmap.001", 0, "3bac72a1910a563f8f92cf5b77c8b7f2", 8338}, + {"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70588050}, + {"resmap.002", 0, "83c2aa4653a985ab4b49ff60532ed08f", 12082}, + {"ressci.002", 0, "2a68edd064e5e4937b5e9c74b38f2082", 128562138}, + {"resmap.003", 0, "31ef4c0621711585d031f0ae81707251", 1636}, + {"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6860492}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, + + // RAMA - Italian Windows CD (from glorifindel) + // SCI interpreter version 3.000.000 (a guess?) + {{"rama", "", { + {"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70611091}, + {"resmap.001", 0, "70ba2ff04a2b7fb2c52420ba7fbd47c2", 8338}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE}, + 0 + }, + + // Shivers - English Windows (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "1.02" + {{"shivers", "", { + {"resmap.000", 0, "f2ead37749ed8f6535a2445a7d05a0cc", 46525}, + {"ressci.000", 0, "4294c6d7510935f2e0a52e302073c951", 262654836}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, + + // Shivers - German Windows (from Tobis87) + {{"shivers", "", { + {"resmap.000", 0, "f483d0a1f78334c18052e92785c3086e", 46537}, + {"ressci.000", 0, "6751b144671e2deed919eb9d284b07eb", 262390692}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, + + // Shivers - English Windows Demo + // Executable scanning reports "2.100.002" + {{"shivers", "Demo", { + {"resmap.000", 0, "d9e0bc5eddefcbe47f528760085d8927", 1186}, + {"ressci.000", 0, "3a93c6340b54e07e65d0e5583354d186", 10505469}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Shivers2 - English Windows Demo + // Executable scanning reports "3.000.000" + {{"shivers2", "Demo", { + {"resmap.000", 0, "d8659188b84beaef076bd869837cd530", 634}, + {"ressci.000", 0, "7fbac0807a044c9543e8ac376d200e59", 4925003}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, +#endif // ENABLE_SCI32 + + // Slater & Charlie Go Camping - English DOS Demo + // Executable scanning reports "1.cfs.081", VERSION file reports "1.000" + {{"slater", "Demo", { + {"resource.map", 0, "61b4f74039399e5aa1e737b16d0fc023", 1409}, + {"resource.msg", 0, "1aeafe2b495de288d002109650b66614", 1364}, + {"resource.000", 0, "8e10d4f05c1fd9f883384fa38a898489", 377394}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 1 VGA Remake - English Amiga (from www.back2roots.org) + // SCI interpreter version 1.000.510 (just a guess) + {{"sq1sci", "VGA Remake", { + {"resource.map", 0, "106484b372af1d4cbf866472cc2813dc", 6396}, + {"resource.000", 0, "cc9d6ace343661ae51ec8bd6e6b00a8c", 340944}, + {"resource.001", 0, "59efcfa2268d2f8608f544e2674d8151", 761721}, + {"resource.002", 0, "f00ef883128bf5fc2fbb888cdd7adf25", 814461}, + {"resource.003", 0, "2588c1c2ca8b9bed0e3411948c0856a9", 839302}, + {"resource.004", 0, "b25a1539c71701f7715f738c5037e9a6", 775515}, + {"resource.005", 0, "640ffe1a9acde392cc33cc1b1a528328", 806324}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 1 VGA Remake - English DOS (from the Space Quest Collection) + // Executable scanning reports "T.A00.081", VERSION file reports "2.000" + // SCI interpreter version 1.000.510 (just a guess) + {{"sq1sci", "VGA Remake", { + {"resource.map", 0, "38a74d8f555a2da9ca4f21d14e3c1d33", 5913}, + {"resource.000", 0, "e9d866534f8c84de82e25f2631ff258c", 1016436}, + {"resource.001", 0, "a89b7b52064c75b1985b289edc2f5c69", 1038757}, + {"resource.002", 0, "a9e847c687529481f3a22b9bf01f45f7", 1169831}, + {"resource.003", 0, "c47600e50c6fc591957ae0c5020ee7b8", 1213262}, + {"resource.004", 0, "e19ea4ad131472f9238590f2e1d40289", 1203051}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 1 VGA Remake - English Non-Interactive Demo (from FRG) + // SCI interpreter version 1.000.181 + {{"sq1sci", "VGA Remake Demo", { + {"resource.map", 0, "5af709ac5e0e923e0b8174f49978c30e", 636}, + {"resource.001", 0, "fd99ea43f57576ded7c86036996346cf", 507642}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 1 VGA Remake - Spanish DOS Floppy (from jvprat) + // Executable scanning reports "T.A00.081", VERSION file reports "2.000" + // SCI interpreter version 1.000.510 (just a guess) + {{"sq1sci", "VGA Remake", { + {"resource.map", 0, "cee2a67fa7f8f1f520f398110ca1c37e", 6111}, + {"resource.000", 0, "945081a73211e0c40e62f709edcd8d1d", 970657}, + {"resource.001", 0, "94692dc84c85c93bb8850f58aebf3cfc", 1085687}, + {"resource.002", 0, "fc9ad3357e4cedec1611ad2b67b193a9", 1175465}, + {"resource.003", 0, "8c22700a02991b763f512f837636b3ca", 1211307}, + {"resource.004", 0, "9b78228ad4f9f335fedf74f1812dcfca", 513325}, + {"resource.005", 0, "7d4ebcb745c0bf8fc42e4013f52ecd49", 1101812}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 3 - English Amiga (from www.back2roots.org) + // SCI interpreter version 0.000.453 (just a guess) + {{"sq3", "", { + {"resource.map", 0, "bad41385acde6d677a8d55a7b20437e3", 5868}, + {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 171636}, + {"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 754432}, + {"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 746496}, + {"resource.004", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 761984}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Space Quest 3 - German Amiga + // Executable scanning reports "1.004.006" + // SCI interpreter version 0.000.453 (just a guess) + {{"sq3", "", { + {"resource.map", 0, "44f53185fdf3f44f946e9cac3ca6588b", 6348}, + {"resource.001", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 238664}, + {"resource.002", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 642014}, + {"resource.003", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 712374}, + {"resource.004", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 545053}, + {"resource.005", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 687507}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 3 - English DOS Non-Interactive Demo + // SCI interpreter version 0.000.453 + {{"sq3", "Demo", { + {"resource.map", 0, "ec66ac2b1ce58b2575ba00b65058de1a", 612}, + {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 180245}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Space Quest 3 - English DOS (provided by richiefs in bug report #2670691) + // SCI interpreter version 0.000.453 + {{"sq3", "", { + {"resource.map", 0, "fee82d211c3918a90ce3b476d3dbb245", 5484}, + {"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 485158}, + {"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 720244}, + {"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 688367}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Space Quest 3 - English DOS (from the Space Quest Collection) + // Executable scanning reports "0.000.685", VERSION file reports "1.018" + {{"sq3", "", { + {"resource.map", 0, "55e91aeef1705bce2a9b79172682f36d", 5730}, + {"resource.001", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 490247}, + {"resource.002", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 715777}, + {"resource.003", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 703370}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 3 - German DOS (from Tobis87) + // SCI interpreter version 0.000.453 (?) + {{"sq3", "", { + {"resource.map", 0, "4965c78b5eff50d5e4148ce114594ba8", 7584}, + {"resource.001", 0, "9107c2aa5398e28b5c5406df13491f85", 117869}, + {"resource.002", 0, "9107c2aa5398e28b5c5406df13491f85", 336101}, + {"resource.003", 0, "9107c2aa5398e28b5c5406df13491f85", 350391}, + {"resource.004", 0, "9107c2aa5398e28b5c5406df13491f85", 349750}, + {"resource.005", 0, "9107c2aa5398e28b5c5406df13491f85", 322107}, + {"resource.006", 0, "9107c2aa5398e28b5c5406df13491f85", 320643}, + {"resource.007", 0, "9107c2aa5398e28b5c5406df13491f85", 344287}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + GF_FOR_SCI0_BEFORE_629 + }, + + // Space Quest 3 v1.052 - German DOS (supplied by markcoolio in bug report #2723860) + // Executable scanning reports "S.old.114" + {{"sq3", "", { + {"resource.map", 0, "f0dd735098c254f584878649c6f08dbc", 5154}, + {"resource.001", 0, "9107c2aa5398e28b5c5406df13491f85", 567245}, + {"resource.002", 0, "9107c2aa5398e28b5c5406df13491f85", 596768}, + {"resource.003", 0, "9107c2aa5398e28b5c5406df13491f85", 693573}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - English Amiga + // Executable scanning reports "1.004.024" + // SCI interpreter version 1.000.200 + {{"sq4", "", { + {"resource.map", 0, "d87ae90031e7fd04f32a27db054f5c9c", 6174}, + {"resource.000", 0, "19671ac620a0a4720a1937c20c2e24a1", 323309}, + {"resource.001", 0, "abca51a4c896df550f095a2db71dce46", 805915}, + {"resource.002", 0, "5667852471ba5b7f5b9a770eabd07df2", 796615}, + {"resource.003", 0, "6ec43464f6a17e612636e2928fd9471c", 803868}, + {"resource.004", 0, "1887ed88bb34ae7238650e8f77f26315", 798226}, + {"resource.005", 0, "3540d1cc84d674cf4b2c898b88a3b563", 790296}, + {"resource.006", 0, "ade814bc4d56244c156d9e9bcfebbc11", 664085}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - German Amiga (from www.back2roots.org) + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "79641c0d43408e33c251a1d494d2575e", 6252}, + {"resource.000", 0, "feff51c52146b3a31d4793c718279e13", 345170}, + {"resource.001", 0, "ab33060bfebe32450c0b8d9a3a066efc", 822470}, + {"resource.002", 0, "f79fd6a62da082addb205ed6cef99629", 810458}, + {"resource.003", 0, "f4c21da916f450d4b893b4cba6120866", 815854}, + {"resource.004", 0, "99c6a017da5e769a3b427ca52c8a564f", 824601}, + {"resource.005", 0, "10ee1709e6559c724676d058199b75b5", 818745}, + {"resource.006", 0, "67fb188b191d88efe8414af6ea297b93", 672675}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - English DOS + // Executable scanning reports "1.000.753" + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "a18088c8aceb06025dbc945f29e02935", 5124}, + {"resource.000", 0, "e1f46832cd2458796028e054a0466031", 5502009}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - English DOS + // Executable scanning reports "1.000.753" + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "71ccf4f82ac4efb588731acfb7bf2603", 5646}, + {"resource.000", 0, "e1f46832cd2458796028e054a0466031", 933928}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 1.052 - English DOS Floppy (supplied by markcoolio in bug report #2723865) + // Executable scanning reports "1.000.753" + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "98852d6379622001efd0b50ae93c9a30", 5928}, + {"resource.000", 0, "e1f46832cd2458796028e054a0466031", 173330}, + {"resource.001", 0, "cc2f89e6057e05b040566b3699df7288", 1247215}, + {"resource.002", 0, "9c342cd76b421369406d6fafd7b1a285", 1218373}, + {"resource.003", 0, "96fa33d89d838bc3f671c5b953e7a896", 1240130}, + {"resource.004", 0, "ff9c87da3bc53473fdee8b9d3edbc93c", 1200631}, + {"resource.005", 0, "e33019ac19f755ae33fbf49b4fc9066c", 1053294}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - German DOS (from Tobis87) + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "71715e775e3791178d606cfe6c7e1fb9", 6339}, + {"resource.000", 0, "5f6a1fff40584ee807efd547899b1ba5", 206032}, + {"resource.001", 0, "e924cf86a72ada7736043f045cce345f", 1065442}, + {"resource.002", 0, "e18d731c3fba51333a7f402e454714a5", 858402}, + {"resource.003", 0, "7c2e7508af1a6af877d921e476f70b5e", 1172738}, + {"resource.004", 0, "b8d6efbd3235329bfe844c794097b2c9", 1064761}, + {"resource.005", 0, "47ee647b5b12232d27e63cc627c25899", 1156765}, + {"resource.006", 0, "dfb023e4e2a1e7a00fa18f9ede72a91b", 924059}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - Italian DOS Floppy (from glorifindel) + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "e753dfa96d68dd95f84f6cd80479a35e", 6135}, + {"resource.000", 0, "2ac39ff61e369b79f3d7a4ad514f8e29", 203170}, + {"resource.001", 0, "99a6df6d366b3f061271ff3450ac0d32", 1286269}, + {"resource.002", 0, "a6a8d7a24dbb7a266a26b084e7275e89", 1241124}, + {"resource.003", 0, "5289000399d503b59da9e23129256f1a", 1325546}, + {"resource.004", 0, "4277c61bed40a50dadc4b5a344520af2", 1251000}, + {"resource.005", 0, "5f885abd335978e2fd4e5f886d7676c8", 1102880}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - Japanese PC-98 5.25" Floppy + // SCI interpreter version 1.000.1068 + {{"sq4", "", { + {"resource.map", 0, "ca7bba01019222b6f3e54e9051067a99", 5283}, + {"resource.000", 0, "161d719f38ed98d33f058a8cf3dc09c3", 952909}, + {"resource.001", 0, "454684e3a7a68cbca073945e50778447", 1187088}, + {"resource.002", 0, "6dc668326cc22cb9e8bd8ca9e68d2a66", 1181249}, + {NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - Japanese PC-98 5.25" Floppy + // SCI interpreter version 1.000.1068 + {{"sq4", "", { + {"resource.map", 0, "ca7bba01019222b6f3e54e9051067a99", 5283}, + {"resource.000", 0, "161d719f38ed98d33f058a8cf3dc09c3", 952909}, + {"resource.001", 0, "454684e3a7a68cbca073945e50778447", 1187088}, + {"resource.002", 0, "6dc668326cc22cb9e8bd8ca9e68d2a66", 1181249}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC98, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 - English DOS CD (from the Space Quest Collection) + // Executable scanning reports "1.001.064", VERSION file reports "1.0" + {{"sq4", "CD", { + {"resource.map", 0, "ed90a8e3ccc53af6633ff6ab58392bae", 7054}, + {"resource.000", 0, "63247e3901ab8963d4eece73747832e0", 5157378}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Space Quest 4 - Spanish DOS CD (from jvprat) + // Executable scanning reports "1.SQ4.057", VERSION file reports "1.000" + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "51bcb305568ec19713f8b79727f10071", 6159}, + {"resource.000", 0, "8000a55aebc50a68b7cce07a8c33758c", 204315}, + {"resource.001", 0, "99a6df6d366b3f061271ff3450ac0d32", 1269094}, + {"resource.002", 0, "a6a8d7a24dbb7a266a26b084e7275e89", 1240998}, + {"resource.003", 0, "42a307941edeb1a3be31daeb2e4be90b", 1319306}, + {"resource.004", 0, "776fba81c110d1908776232cbe190e20", 1253752}, + {"resource.005", 0, "55fae26c2a92f16ef72c1e216e827c0f", 1098328}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Space Quest 4 - Spanish DOS Floppy (from jvprat) + // Executable scanning reports "1.SQ4.056", VERSION file reports "1.000" + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "41543ae71036046fef69df29a838ee05", 5589}, + {"resource.000", 0, "2ac39ff61e369b79f3d7a4ad514f8e29", 242470}, + {"resource.001", 0, "567608beb69d9dffdb42a8f39cb11a5e", 994323}, + {"resource.002", 0, "74c62fa2146ff3b3b2ea2b3fb95b9af9", 1140801}, + {"resource.003", 0, "42a307941edeb1a3be31daeb2e4be90b", 1088408}, + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 4 1.000 - German DOS Floppy (supplied by markcoolio in bug report #2723862) + // Executable scanning reports "1.SQ4.030" + // SCI interpreter version 1.000.200 (just a guess) + {{"sq4", "", { + {"resource.map", 0, "8f08b97ca093f370c56d99715b015554", 6153}, + {"resource.000", 0, "5f6a1fff40584ee807efd547899b1ba5", 206032}, + {"resource.001", 0, "99a6df6d366b3f061271ff3450ac0d32", 1270577}, + {"resource.002", 0, "a6a8d7a24dbb7a266a26b084e7275e89", 1242817}, + {"resource.003", 0, "47ee647b5b12232d27e63cc627c25899", 1321146}, + {"resource.004", 0, "c06350184a490c10eb4585fff0aa3192", 1254368}, + {"resource.005", 0, "b8d6efbd3235329bfe844c794097b2c9", 1098717}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 5 - English DOS (from the Space Quest Collection) + // Executable scanning reports "1.001.068", VERSION file reports "1.04" + {{"sq5", "", { + {"resource.map", 0, "66317c12ac6e818d1f7c17e83c1d9819", 6143}, + {"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486}, + {"resource.msg", 0, "bb8ad78793c26bdb3f77498b1d6515a9", 125988}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 5 - English DOS + // SCI interpreter version 1.001.067 + {{"sq5", "", { + {"resource.map", 0, "8bde0a9adb9a3e9aaa861826874c9834", 6473}, + {"resource.000", 0, "f4a48705764544d7cc64a7bb22a610df", 6025184}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 5 v1.04 - German DOS (from Tobis87, updated information by markcool from bug reports #2723935 and #2724762) + // SCI interpreter version 1.001.068 + {{"sq5", "", { + {"resource.map", 0, "66317c12ac6e818d1f7c17e83c1d9819", 6143}, + {"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486}, + {"resource.msg", 0, "7c71cfc36153cfe07b450423a51f7e68", 146282}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 5 - Italian DOS Floppy (from glorifindel) + // SCI interpreter version 1.001.068 (just a guess) + {{"sq5", "", { + {"resource.000", 0, "5040026519f37199f3616fb1d4704dff", 6047170}, + {"resource.map", 0, "5b09168baa2f6e2e22787429b2d72f54", 6492}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Space Quest 6 - English DOS/Win3.11 CD (from the Space Quest Collection) + // Executable scanning reports "2.100.002", VERSION file reports "1.0" + {{"sq6", "", { + {"resource.map", 0, "6dddfa3a8f3a3a513ec9dfdfae955005", 10528}, + {"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Space Quest 6 - English DOS/Win3.11 CD ver 1.11 (from FRG) + // SCI interpreter version 2.100.002 (just a guess) + {{"sq6", "", { + {"resource.map", 0, "e0615d6e4e10e37ae42e6a2a95aaf145", 10528}, + {"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // Space Quest 6 - English DOS/Win3.11 Interactive Demo (from FRG) + // SCI interpreter version 2.100.002 (just a guess) + {{"sq6", "Demo", { + {"resource.map", 0, "368f07b07433db3f819fa3fa0e5efee5", 2572}, + {"resource.000", 0, "ab12724e078dea34b624e0d2a38dcd7c", 2272050}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Space Quest 6 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723884) + // SCI interpreter version 2.100.002 (just a guess) + {{"sq6", "", { + {"resource.map", 0, "664d797415484f85c90b1b45aedc7686", 10534}, + {"resource.000", 0, "ba87ba91e5bdabb4169dd0df75777722", 40933685}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, +#endif // ENABLE_SCI32 + + // The Island of Dr. Brain - English DOS CD (from jvprat) + // Executable scanning reports "1.001.053", VERSION file reports "1.0 10.27.92" + {{"islandbrain", "", { + {"resource.map", 0, "2388efef8430b041b0f3b00b9050e4a2", 3281}, + {"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 2103560}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE}, + 0 + }, + + // The Island of Dr. Brain - English DOS (from Quietust) + // Executable scanning reports "1.001.053", VERSION file reports "1.1 2.3.93" + {{"islandbrain", "", { + {"resource.map", 0, "3c07da06bdd1689f9d07af78fb94d0ec", 3101}, + {"resource.000", 0, "ecc686e0034fb4d41de077ac7167b3cf", 1947866}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH}, + 0 + }, + + // The Island of Dr. Brain - English DOS Non-Interactive Demo + // SCI interpreter version 1.001.053 (just a guess) + {{"islandbrain", "Demo", { + {"resource.map", 0, "a8e5ca8ed1996974afa59f4c45e06195", 986}, + {"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 586560}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + +#ifdef ENABLE_SCI32 + // Torin's Passage - English Windows Interactive Demo + // SCI interpreter version 2.100.002 (just a guess) + {{"torin", "Demo", { + {"resmap.000", 0, "9a3e172cde9963d0a969f26469318cec", 3403}, + {"ressci.000", 0, "db3e290481c35c3224e9602e71e4a1f1", 5073868}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH}, + 0 + }, + + // Torin's Passage - English Windows + // SCI interpreter version 2.100.002 (just a guess) + {{"torin", "", { + {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, + {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, + {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, + + // Torin's Passage - Spanish Windows (from jvprat) + // Executable scanning reports "2.100.002", VERSION file reports "1.0" + {{"torin", "", { + {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, + {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, + // TODO: depend on one of the patches? + {NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, + + // Torin's Passage - French Windows + // SCI interpreter version 2.100.002 (just a guess) + {{"torin", "", { + {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, + {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, + {NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, + + // Torin's Passage - German Windows + // SCI interpreter version 2.100.002 (just a guess) + {{"torin", "", { + {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, + {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, + {NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NOSPEECH}, + 0 + }, + + // Torin's Passage - Italian Windows CD (from glorifindel) + // SCI interpreter version 2.100.002 (just a guess) + {{"torin", "", { + {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799}, + {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887}, + {NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE}, + 0 + }, +#endif // ENABLE_SCI32 + + // SCI Fanmade Games + FANMADE("Al Pond 2: Island Quest", "9625372e710d1a95d2027b48f9e325af", 1506, "a0f9aa65b9bf3d8703adff5a621f243c", 889843), + FANMADE("Al Pond: Island Quest 2", "4cba6a5a4c8f66f21935ed78b0511a92", 870, "876587dc9a5ec569287a3dc4b29139d8", 613769), + FANMADE("Another DG Game: I Want My C64 Back", "4a8ca7ca2abd18899ef856f47665e2e9", 588, "12ff558d20c72e42cc6adb408f34d6d8", 150513), + FANMADE_L("Another DG Game: I Want My C64 Back", "13dc1d9ebc57daf8895412eee5e39fea", 576, "e2ad60b3a280171429db5c85f158f84a", 141697, Common::FR_FRA), + FANMADE("Bluntman and Chronic (Politically Correct Version)", "c3ef9fa6c7c5fb840078bf28d87c7f8b", 1362, "441636a9f6f86710844868fded868ee7", 596688), + FANMADE("Cascade Quest", "c94efc10d18c040b6e22a1dc6d3adfe1", 3468, "8ada33dfa945f81531e5508240b573de", 1432195), + FANMADE("Curt Quest 1.0", "b0e555370380d218968a40a68eaaaffc", 1146, "c851182cdf6fc6a81b840f4d4875f1a0", 307165), + FANMADE("Curt Quest 1.1", "54084c29346683296e45ef32d7ae74f3", 1128, "c851182cdf6fc6a81b840f4d4875f1a0", 302000), + FANMADE("Demo Quest", "c89a0c9e0a4e4af0ecedb300a3b31dbf", 384, "a32f3495ba24764cba091119cc3f1e13", 160098), + FANMADE("Dr. Jummybummy's Space Adventure 2", "6ae6cb7de423f51736d9487b4ca0c6da", 810, "26e5b563f578e104d79689f36568b7cf", 394670), + FANMADE_L("Grostesteing: Plus Mechant que Jamais", "ec9a97ccb134f69249f6ea8b16c13d8e", 1500, "b869f5f11bfe2ab5f67f4f0c618f2ce1", 464657, Common::FR_FRA), // FIXME: Accent + FANMADE("Jim Quest", "0af50be1d3f0cb77a09137709a76ef4f", 960, "9c042c136548b20d9183495668e03526", 496446), + FANMADE("Knight's Quest Demo 1.0", "5e816edf993956752ed06fccfeeae6d9", 1260, "959321f88a22905fa1f8c6d897874744", 703836), + FANMADE("LockerGnome Quest", "3eeff9130206cad0c4e1551e2b9dd2c5", 420, "ae05ca90806fd90cc43f147c82d3547c", 158906), + FANMADE("New Year's Mystery", "efd1beb5120293725065c95959144f81", 714, "b3bd3c2372ed6efa28adb12403c4c31a", 305027), + FANMADE("Osama", "db8f1710453cfbecf4214b2946970043", 390, "7afd75d4620dedf97a84ae8f0a7523cf", 123827), + FANMADE("Quest for the Cheat", "a359d4cf27f98264b42b55c017671214", 882, "8a943029f73c4bc85d454b7f473455ba", 455209), + FANMADE("SCI Companion Template", "ad54d4f504086cd597aa2348d0aa3b09", 354, "6798b7b601ce8154c1d1bc0f0edcdd18", 113061), + FANMADE("SCI Studio Template 3.0", "ca0dc8d586e0a8670b7621cde090b532", 354, "58a48ee692a86c0575e6bd0b00a92b9a", 113097), + FANMADE("SCI Quest", "9067e1f1e54436d2dbfce855524bc84a", 552, "ffa7d355cd9223f245289108a696bcd2", 149634), + FANMADE("The Legend of the Lost Jewel", "ba1bca315e3818c5626eda51bcfbcccf", 636, "9b0736d69924af0cff32a0f78db96855", 300398), + + // FIXME: The vga demo does not have a resource.000/001 file. + //FANMADE_V("SCI VGA Demo", "00b1abd87bad356b90fcdfcb6132c26f", 8, "", 0, 0), + + {AD_TABLE_END_MARKER, 0} +}; + +} // End of namespace Sci -- cgit v1.2.3 From 4c62b6ac86d28d5701dd2563eb030bf5cfa0d036 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 24 Aug 2009 08:10:29 +0000 Subject: - Removed the code which reads the SCI version string from the game executable in the fallback detector. We no longer use the actual SCI version string, and we can auto-detect a lot of features from the game resources now. The EXE version string was only used to display the detected SCI version in the console, which isn't very useful to us anymore. - Added detection for PC and Amiga versions based on the game's detected view types. Still need to do detection for Mac and Atari ST versions svn-id: r43683 --- engines/sci/detection.cpp | 40 +++++++---- engines/sci/exereader.cpp | 172 ---------------------------------------------- engines/sci/exereader.h | 1 - 3 files changed, 26 insertions(+), 187 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 177fc2fbd1..55ea8ee00a 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -260,7 +260,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl bool foundResMap = false; bool foundRes000 = false; Common::Platform exePlatform = Common::kPlatformUnknown; - Common::String exeVersionString; // First grab all filenames for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { @@ -293,22 +292,15 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl // Check if it's a known executable name // Note: "sier" matches "sier.exe", "sierra.exe", "sierw.exe" and "sierw5.exe" + // TODO: Try to remove this code, and base platform detection on game resources + // instead of the executable itself if (filename.contains("scidhuv") || filename.contains("sciduv") || filename.contains("sciv") || filename.contains("sciw") || filename.contains("prog") || filename.contains("sier")) { - // We already found a valid exe, no need to check this one. - if (!exeVersionString.empty()) - continue; - // Is it really an executable file? Common::SeekableReadStream *fileStream = file->createReadStream(); exePlatform = getGameExePlatform(fileStream); - - // It's a valid exe, read the interpreter version string - if (exePlatform != Common::kPlatformUnknown) - exeVersionString = readSciVersionFromExe(fileStream, exePlatform); - delete fileStream; } } @@ -319,19 +311,40 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl return 0; } + ResourceManager *resMgr = new ResourceManager(fslist); + SciVersion version = resMgr->sciVersion(); + SegManager *segManager = new SegManager(resMgr, version); + // Set some defaults s_fallbackDesc.desc.extra = ""; s_fallbackDesc.desc.language = Common::UNK_LANG; + if (exePlatform == Common::kPlatformUnknown) { + // Try to determine the platform from game resources + ViewType gameViews = resMgr->getViewType(); + if (gameViews == kViewEga || gameViews == kViewVga || + gameViews == kViewVga11) { + // Must be PC or Mac, set to PC for now + // TODO: Is there a reliable way to determine the game + // platform from the resources? So far, I've noticed + // that Mac versions have a different signature for + // kGetEvent and kNewWindow. I'm unsure about Atari ST + // versions. Could we base detection on this? + exePlatform = Common::kPlatformPC; + } else if (gameViews == kViewAmiga) { + exePlatform = Common::kPlatformAmiga; + } + // TODO: detection for Mac and Atari ST + } + s_fallbackDesc.desc.platform = exePlatform; s_fallbackDesc.desc.flags = ADGF_NO_FLAGS; // Determine the game id - ResourceManager *resMgr = new ResourceManager(fslist); - SciVersion version = resMgr->sciVersion(); - SegManager *segManager = new SegManager(resMgr, version); if (!script_instantiate(resMgr, segManager, version, 0)) { warning("fallbackDetect(): Could not instantiate script 0"); SearchMan.remove("SCI_detection"); + delete segManager; + delete resMgr; return 0; } reg_t game_obj = script_lookup_export(segManager, 0, 0); @@ -345,7 +358,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl printf("If this is *NOT* a fan-modified version (in particular, not a fan-made\n"); printf("translation), please, report the data above, including the following\n"); printf("version number, from the game's executable:\n"); - printf("Version: %s\n\n", exeVersionString.empty() ? "not found" : exeVersionString.c_str()); SearchMan.remove("SCI_detection"); diff --git a/engines/sci/exereader.cpp b/engines/sci/exereader.cpp index ce6bf184fb..fbeda66b45 100644 --- a/engines/sci/exereader.cpp +++ b/engines/sci/exereader.cpp @@ -96,62 +96,6 @@ Common::Platform getGameExePlatform(Common::SeekableReadStream *exeStream) { return Common::kPlatformUnknown; } -bool isLZEXECompressed(Common::SeekableReadStream *exeStream) { - uint32 filepos = 0; - - exeStream->seek(0, SEEK_SET); - - // First 2 bytes should be "MZ" (0x5A4D) - if (exeStream->readUint16LE() != 0x5A4D) // at pos 0, +2 - return false; - - exeStream->skip(6); - - // Header size should be 2 - filepos = exeStream->readUint16LE(); - if (filepos != 2) // at pos 8, +2 - return false; - - exeStream->skip(12); - - // Calculate code segment offset in exe file - filepos += exeStream->readUint16LE(); // at pos 22, +2 - filepos <<= 4; - - // First relocation item offset should be 0x1c - if (exeStream->readUint16LE() != 0x1c) // at pos 24, +2 - return false; - - // Number of overlays should be 0 - if (exeStream->readUint16LE() != 0) // at pos 26, +2 - return false; - - // Look for LZEXE signature - byte magic[4]; - exeStream->read(magic, 4); - - if (memcmp(magic, "LZ09", 4) && memcmp(magic, "LZ91", 4)) - return false; - - // Seek to offset 8 of info table at start of code segment - exeStream->seek(filepos + 8, SEEK_SET); - if (exeStream->err()) - return false; - - // Read size of compressed data in paragraphs - uint16 size = exeStream->readUint16LE(); - - // Move file pointer to start of compressed data - filepos -= size << 4; - exeStream->seek(filepos, SEEK_SET); - if (exeStream->err()) - return false; - - // All conditions met, this is an LZEXE packed file - // We are currently at the start of the compressed file data - return true; -} - uint getBit(Common::SeekableReadStream *input) { uint bit = _bits & 1; _bitCount--; @@ -172,120 +116,4 @@ uint getBit(Common::SeekableReadStream *input) { return bit; } -Common::String readSciVersionFromExe(Common::SeekableReadStream *exeStream, Common::Platform platform) { - int len = exeStream->size(); - unsigned char *buffer = NULL; - - // Read the executable - bool isLZEXE = isLZEXECompressed(exeStream); - - if (!isLZEXE) { - buffer = new unsigned char[exeStream->size()]; - - exeStream->seek(0, SEEK_SET); - exeStream->read(buffer, exeStream->size()); - } else { - buffer = new unsigned char[exeStream->size() * 3]; - _bitCount = 0; - - // Skip LZEXE header - exeStream->seek(32, SEEK_SET); - - int pos = 0; - int repeat; - short offset; - - while (1) { - if (exeStream->ioFailed()) { - warning("Error reading from input file"); - delete[] buffer; - return NULL; - } - - if (getBit(exeStream)) { - buffer[pos++] = exeStream->readByte(); - } else { - if (getBit(exeStream)) { - byte tmp[2]; - exeStream->read(tmp, 2); - repeat = (tmp[1] & 0x07); - offset = ((tmp[1] & ~0x07) << 5) | tmp[0] | 0xE000; - - if (repeat == 0) { - repeat = exeStream->readByte(); - - if (repeat == 0) { - len = pos; - break; - } - else if (repeat == 1) - continue; - else - repeat++; - } else - repeat += 2; - } else { - repeat = getBit(exeStream) << 1; - repeat += getBit(exeStream) + 2; - offset = exeStream->readByte() | 0xFF00; - } - - while (repeat > 0) { - buffer[pos] = buffer[pos + offset]; - pos++; - repeat--; - } - } - } - } - - // Find SCI version number - - int state = 0; - /* 'state' encodes how far we have matched the version pattern - ** "n.nnn.nnn" - ** - ** n.nnn.nnn - ** 0123456789 - ** - ** Since we cannot be certain that the pattern does not begin with an - ** alphanumeric character, some states are ambiguous. - ** The pattern is expected to be terminated with a non-alphanumeric - ** character. - */ - - - int accept; - unsigned char *buf = buffer; - - // String-encoded result, copied from buffer - char currentString[10]; - - for (int i = 0; i < len; i++) { - unsigned char ch = *buf++; - // By default, we don't like this character - accept = 0; - - if (isalnum(ch)) { - accept = (state != 1 && state != 5 && state != 9); - } else if (ch == '.') { - accept = (state == 1 || state == 5); - } else if (state == 9) { - // Terminate string - currentString[9] = 0; - - // Return the current string - return currentString; - } - - if (accept) - currentString[state++] = ch; - else - state = 0; - } - - delete[] buffer; - return "unknown"; -} - } // End of namespace Sci diff --git a/engines/sci/exereader.h b/engines/sci/exereader.h index e30d3d90c4..e114c0a3a4 100644 --- a/engines/sci/exereader.h +++ b/engines/sci/exereader.h @@ -32,7 +32,6 @@ namespace Sci { Common::Platform getGameExePlatform(Common::SeekableReadStream *exeStream); -Common::String readSciVersionFromExe(Common::SeekableReadStream *exeStream, Common::Platform platform); } // End of namespace Sci -- cgit v1.2.3 From de2e283492fc9378909ffa892f2ef5f1b0698e1e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 24 Aug 2009 09:07:21 +0000 Subject: Added code to launch the GMM save/load dialogues from the in-game Player menu, replacing the older code that just saved/loaded the game in a single slot without prompting svn-id: r43685 --- engines/cruise/cruise.h | 1 + engines/cruise/detection.cpp | 4 ++++ engines/cruise/menu.cpp | 42 +++++++++++++++++++++++++++++++++++++++--- 3 files changed, 44 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/cruise/cruise.h b/engines/cruise/cruise.h index 574017dfc7..eff3e9b92f 100644 --- a/engines/cruise/cruise.h +++ b/engines/cruise/cruise.h @@ -83,6 +83,7 @@ public: virtual bool hasFeature(EngineFeature f) const; int getGameType() const; + const char *getGameId() const; uint32 getFeatures() const; Common::Language getLanguage() const; Common::Platform getPlatform() const; diff --git a/engines/cruise/detection.cpp b/engines/cruise/detection.cpp index 1045ed3b0b..054550e439 100644 --- a/engines/cruise/detection.cpp +++ b/engines/cruise/detection.cpp @@ -41,6 +41,10 @@ struct CRUISEGameDescription { uint32 features; }; +const char *CruiseEngine::getGameId() const { + return _gameDescription->desc.gameid; +} + int CruiseEngine::getGameType() const { return _gameDescription->gameType; } diff --git a/engines/cruise/menu.cpp b/engines/cruise/menu.cpp index 7e454e78f8..c620a39b7d 100644 --- a/engines/cruise/menu.cpp +++ b/engines/cruise/menu.cpp @@ -27,8 +27,13 @@ #include "cruise/cruise_main.h" #include "cruise/staticres.h" +#include "engines/metaengine.h" +#include "gui/saveload.h" + namespace Cruise { +extern int currentMouseButton; + menuStruct *menuTable[8]; menuStruct *createMenu(int X, int Y, const char *menuName) { @@ -202,6 +207,38 @@ int processMenu(menuStruct *pMenu) { return -1; } +static void handleSaveLoad(bool saveFlag) { + const EnginePlugin *plugin = 0; + EngineMan.findGame(_vm->getGameId(), &plugin); + GUI::SaveLoadChooser *dialog; + if (saveFlag) + dialog = new GUI::SaveLoadChooser("Save game:", "Save"); + else + dialog = new GUI::SaveLoadChooser("Load game:", "Load"); + + dialog->setSaveMode(saveFlag); + int slot = dialog->runModal(plugin, ConfMan.getActiveDomainName()); + + if (slot >= 0) { + if (!saveFlag) + _vm->loadGameState(slot); + else { + Common::String result(dialog->getResultString()); + if (result.empty()) { + // If the user was lazy and entered no save name, come up with a default name. + char buf[20]; + snprintf(buf, 20, "Save %d", slot + 1); + + _vm->saveGameState(slot, buf); + } else { + _vm->saveGameState(slot, result.c_str()); + } + } + } + + delete dialog; +} + int playerMenu(int menuX, int menuY) { int retourMenu; //int restartGame = 0; @@ -251,15 +288,14 @@ int playerMenu(int menuX, int menuY) { freeMenu(menuTable[0]); menuTable[0] = NULL; + currentMouseButton = 0; switch (retourMenu) { case 3: // select save drive break; case 4: // save - saveSavegameData(0, "Default Save"); - break; case 5: // load - loadSavegameData(0); + handleSaveLoad(retourMenu == 4); break; case 6: // restart _vm->sound().fadeOutMusic(); -- cgit v1.2.3 From cba88415bbd3fbb6d66e54b36379a38a7c4f3eea Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 24 Aug 2009 10:06:38 +0000 Subject: Fix bug #2843387 - PUTTPUTT/FATTYBEAR: Macintosh versions assert on startup. svn-id: r43687 --- engines/scumm/he/script_v60he.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'engines') diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index 92848ce981..4c01d3b15c 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -98,6 +98,13 @@ int ScummEngine_v60he::convertFilePath(byte *dst, int dstSize) { int len = resStrLen(dst); if (_game.platform == Common::kPlatformMacintosh) { + // Remove : prefix in HE71 games + if (dst[0] == ':') { + len -= 1; + memmove(dst, dst + 1, len); + dst[len] = 0; + } + // Switch all : to / for portablity for (int i = 0; i < len; i++) { if (dst[i] == ':') -- cgit v1.2.3 From 8d5a2542fbd4fd9a16d2e4451d6cf4d7e3078965 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 24 Aug 2009 10:09:31 +0000 Subject: Whitespace changes. svn-id: r43689 --- engines/agos/rooms.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/agos/rooms.cpp b/engines/agos/rooms.cpp index d5146ae408..c390269fec 100644 --- a/engines/agos/rooms.cpp +++ b/engines/agos/rooms.cpp @@ -92,7 +92,7 @@ void AGOSEngine::changeDoorState(SubRoom *r, uint16 d, uint16 n) { mask <<= d; n <<= d; r->roomExitStates &= ~mask; - r->roomExitStates|= n; + r->roomExitStates |= n; } void AGOSEngine::setDoorState(Item *i, uint16 d, uint16 n) { -- cgit v1.2.3 From 1f39c1b569831913ccf44f44113393f5c7510760 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 24 Aug 2009 10:23:22 +0000 Subject: Bugfix for freeze when the in-game Pause 'P' key is used svn-id: r43690 --- engines/cruise/cruise.cpp | 2 ++ engines/cruise/cruise_main.cpp | 3 +++ 2 files changed, 5 insertions(+) (limited to 'engines') diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp index 1286c38ff3..c4b2cd53fe 100644 --- a/engines/cruise/cruise.cpp +++ b/engines/cruise/cruise.cpp @@ -201,6 +201,8 @@ void CruiseEngine::pauseEngine(bool pause) { flipScreen(); changeCursor(_savedCursor); } + + gfxModuleData_addDirtyRect(Common::Rect(64, 100, 256, 117)); } Common::Error CruiseEngine::loadGameState(int slot) { diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp index aa3283aab7..5bde40b7ad 100644 --- a/engines/cruise/cruise_main.cpp +++ b/engines/cruise/cruise_main.cpp @@ -1330,6 +1330,8 @@ bool checkInput(int16 *buttonPtr) { return false; } +extern bool manageEvents(); + int CruiseEngine::processInput(void) { int16 mouseX = 0; int16 mouseY = 0; @@ -1367,6 +1369,7 @@ int CruiseEngine::processInput(void) { bool pausedButtonDown = false; while (!_vm->shouldQuit()) { + manageEvents(); getMouseStatus(&main10, &mouseX, &button, &mouseY); if (button) pausedButtonDown = true; -- cgit v1.2.3 From ea08733873a0f2a0058ef452a7751beed4882e8e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 24 Aug 2009 11:36:00 +0000 Subject: Small syntax change in the hope to make the motoezx target happy. svn-id: r43692 --- engines/m4/script.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'engines') diff --git a/engines/m4/script.h b/engines/m4/script.h index 63dc32958b..2cb2219b8d 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -120,8 +120,7 @@ public: clear(); } template - T *load(Common::File *fd, uint32 ofs) { - T *item; + void load(Common::File *fd, uint32 ofs, T *&item) { if (_cache.contains(ofs)) { item = (T*)(_cache[ofs]); } else { @@ -130,7 +129,6 @@ public: item->load(fd); _cache[ofs] = item; } - return item; } void clear() { // TODO: Free all cached items @@ -300,7 +298,8 @@ public: const T& toData(const ScriptValue &value) { printf("ScriptInterpreter::toData() index = %d; type = %d; max = %d\n", value.value, _data[value.value]->type, _data.size()); assert((uint32)value.value < _data.size()); - T *result = _dataCache->load(_scriptFile, _data[value.value]->offset); + T *result = 0; + _dataCache->load(_scriptFile, _data[value.value]->offset, result); return *result; } -- cgit v1.2.3 From 40aac5fbf7a2f582ecc38d99c67a52e5fefdff17 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 24 Aug 2009 12:27:25 +0000 Subject: Add comment why the syntax for ScriptDataCache::load was changed. svn-id: r43694 --- engines/m4/script.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines') diff --git a/engines/m4/script.h b/engines/m4/script.h index 2cb2219b8d..2eb608ccbb 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -119,6 +119,15 @@ public: ~ScriptDataCache() { clear(); } + + // WORKAROUND: The old prototype for this function was: + // template T *load(Common::File *fd, uint32 ofs); + // that caused a parser error in g++ 3.3.6 used by our + // "motoezx" target of our buildbot. The actual parser + // error happended, when calling the function like this: + // "T *result = _dataCache->load(_scriptFile, _data[value.value]->offset);" + // in ScriptInterpreter::toData. To work around this + // we moved the return value as parameter instead. template void load(Common::File *fd, uint32 ofs, T *&item) { if (_cache.contains(ofs)) { -- cgit v1.2.3 From 184aae3c8c863541771fbeb09ce5f1a72ecabb95 Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Mon, 24 Aug 2009 12:39:03 +0000 Subject: Enable alternative palettse for Amiga Monkey Island - Patch ID: 2819787 use tables for palette colors instead of code with constants svn-id: r43696 --- engines/saga/animation.cpp | 4 +- engines/scumm/palette.cpp | 320 ++++++++++++++++++--------------------------- engines/scumm/scumm.cpp | 4 +- engines/scumm/scumm.h | 9 +- 4 files changed, 131 insertions(+), 206 deletions(-) (limited to 'engines') diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 0d298bf96a..95a850cfe2 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -826,12 +826,10 @@ int Anim::fillFrameOffsets(AnimationData *anim, bool reallyFill) { int i; bool longData = isLongData(); - MemoryReadStreamEndian readS(anim->resourceData, anim->resourceLength, _vm->isBigEndian()); + MemoryReadStreamEndian readS(anim->resourceData, anim->resourceLength, !_vm->isBigEndian()); // RLE has inversion BE<>LE readS.seek(12); - readS._bigEndian = !_vm->isBigEndian(); // RLE has inversion BE<>LE - while (readS.pos() != readS.size()) { if (reallyFill) { anim->frameOffsets[currentFrame] = readS.pos(); diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index a596cc5b1a..2fe3f34530 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -55,230 +55,155 @@ uint16 ScummEngine::get16BitColor(uint8 r, uint8 g, uint8 b) { } void ScummEngine::resetPalette() { + static const byte tableC64Palette[] = { + 0x00, 0x00, 0x00, 0xFD, 0xFE, 0xFC, 0xBE, 0x1A, 0x24, 0x30, 0xE6, 0xC6, + 0xB4, 0x1A, 0xE2, 0x1F, 0xD2, 0x1E, 0x21, 0x1B, 0xAE, 0xDF, 0xF6, 0x0A, + 0xB8, 0x41, 0x04, 0x6A, 0x33, 0x04, 0xFE, 0x4A, 0x57, 0x42, 0x45, 0x40, + 0x70, 0x74, 0x6F, 0x59, 0xFE, 0x59, 0x5F, 0x53, 0xFE, 0xA4, 0xA7, 0xA2, + + // Use 17 color table for v1 games to allow correct color for inventory and + // sentence line. Original games used some kind of dynamic color table + // remapping between rooms. + 0xFF, 0x55, 0xFF + }; + + static const byte tableNESPalette[] = { + /* 0x1D */ + 0x00, 0x00, 0x00, 0x00, 0x24, 0x92, 0x00, 0x00, 0xDB, 0x6D, 0x49, 0xDB, + 0x92, 0x00, 0x6D, 0xB6, 0x00, 0x6D, 0xB6, 0x24, 0x00, 0x92, 0x49, 0x00, + 0x6D, 0x49, 0x00, 0x24, 0x49, 0x00, 0x00, 0x6D, 0x24, 0x00, 0x92, 0x00, + 0x00, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + 0xB6, 0xB6, 0xB6, 0x00, 0x6D, 0xDB, 0x00, 0x49, 0xFF, 0x92, 0x00, 0xFF, + 0xB6, 0x00, 0xFF, 0xFF, 0x00, 0x92, 0xFF, 0x00, 0x00, 0xDB, 0x6D, 0x00, + 0x92, 0x6D, 0x00, 0x24, 0x92, 0x00, 0x00, 0x92, 0x00, 0x00, 0xB6, 0x6D, + /* 0x00 */ + 0x00, 0x92, 0x92, 0x6D, 0x6D, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + 0xFF, 0xFF, 0xFF, 0x6D, 0xB6, 0xFF, 0x92, 0x92, 0xFF, 0xDB, 0x6D, 0xFF, + 0xFF, 0x00, 0xFF, 0xFF, 0x6D, 0xFF, 0xFF, 0x92, 0x00, 0xFF, 0xB6, 0x00, + 0xDB, 0xDB, 0x00, 0x6D, 0xDB, 0x00, 0x00, 0xFF, 0x00, 0x49, 0xFF, 0xDB, + 0x00, 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + + 0xFF, 0xFF, 0xFF, 0xB6, 0xDB, 0xFF, 0xDB, 0xB6, 0xFF, 0xFF, 0xB6, 0xFF, + 0xFF, 0x92, 0xFF, 0xFF, 0xB6, 0xB6, 0xFF, 0xDB, 0x92, 0xFF, 0xFF, 0x49, + 0xFF, 0xFF, 0x6D, 0xB6, 0xFF, 0x49, 0x92, 0xFF, 0x6D, 0x49, 0xFF, 0xDB, + 0x92, 0xDB, 0xFF, 0x92, 0x92, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + static const byte tableAmigaPalette[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0x00, 0xBB, 0x00, 0x00, 0xBB, 0xBB, + 0xBB, 0x00, 0x00, 0xBB, 0x00, 0xBB, 0xBB, 0x77, 0x00, 0xBB, 0xBB, 0xBB, + 0x77, 0x77, 0x77, 0x77, 0x77, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0xFF, + 0xFF, 0x88, 0x88, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0xFF, 0xFF, 0xFF + }; + + static const byte tableAmigaMIPalette[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x00, 0x88, 0x22, 0x00, 0x66, 0x77, + 0xBB, 0x66, 0x66, 0xAA, 0x22, 0xAA, 0x88, 0x55, 0x22, 0x77, 0x77, 0x77, + 0x33, 0x33, 0x33, 0x22, 0x55, 0xDD, 0x22, 0xDD, 0x44, 0x00, 0xCC, 0xFF, + 0xFF, 0x99, 0x99, 0xFF, 0x55, 0xFF, 0xFF, 0xFF, 0x77, 0xFF, 0xFF, 0xFF + }; + + static const byte tableEGAPalette[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0xAA, 0x00, 0xAA, 0x00, 0x00, 0xAA, 0xAA, + 0xAA, 0x00, 0x00, 0xAA, 0x00, 0xAA, 0xAA, 0x55, 0x00, 0xAA, 0xAA, 0xAA, + 0x55, 0x55, 0x55, 0x55, 0x55, 0xFF, 0x55, 0xFF, 0x55, 0x55, 0xFF, 0xFF, + 0xFF, 0x55, 0x55, 0xFF, 0x55, 0xFF, 0xFF, 0xFF, 0x55, 0xFF, 0xFF, 0xFF + }; + + static const byte tableV1Palette[] = { + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xAA, 0x00, 0x00, 0x00, 0xAA, 0xAA, + 0xAA, 0x00, 0xAA, 0x00, 0xAA, 0x00, 0x00, 0x00, 0xAA, 0xFF, 0xFF, 0x55, + 0xFF, 0x55, 0x55, 0xAA, 0x55, 0x00, 0xFF, 0x55, 0x55, 0x55, 0x55, 0x55, + 0xAA, 0xAA, 0xAA, 0x55, 0xFF, 0x55, 0x55, 0x55, 0xFF, 0x55, 0x55, 0x55, + + 0xFF, 0x55, 0xFF + }; + + static const byte tableCGAPalette[] = { + 0x00, 0x00, 0x00, 0x00, 0xA8, 0xA8, 0xA8, 0x00, 0xA8, 0xA8, 0xA8, 0xA8 + }; + + static const byte tableHercAPalette[] = { + 0x00, 0x00, 0x00, 0xAE, 0x69, 0x38 + }; + + static const byte tableHercGPalette[] = { + 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00 + }; + if (_game.version <= 1) { if (_game.platform == Common::kPlatformApple2GS) { // TODO: unique palette? - setC64Palette(); + setPaletteFromTable(tableC64Palette, sizeof(tableC64Palette) / 3); } else if (_game.platform == Common::kPlatformC64) { - setC64Palette(); + setPaletteFromTable(tableC64Palette, sizeof(tableC64Palette) / 3); } else if (_game.platform == Common::kPlatformNES) { - setNESPalette(); + setPaletteFromTable(tableNESPalette, sizeof(tableNESPalette) / 3); } else { - setV1Palette(); + setPaletteFromTable(tableV1Palette, sizeof(tableV1Palette) / 3); + if (_game.id == GID_ZAK) + setPalColor(15, 170, 170, 170); } } else if (_game.features & GF_16COLOR) { + bool setupCursor = false; + switch (_renderMode) { case Common::kRenderEGA: - setEGAPalette(); + setPaletteFromTable(tableEGAPalette, sizeof(tableEGAPalette) / 3); break; case Common::kRenderAmiga: - setAmigaPalette(); + setPaletteFromTable(tableAmigaPalette, sizeof(tableAmigaPalette) / 3); break; case Common::kRenderCGA: - setCGAPalette(); + setPaletteFromTable(tableCGAPalette, sizeof(tableCGAPalette) / 3); + setupCursor = true; break; case Common::kRenderHercA: + setPaletteFromTable(tableHercAPalette, sizeof(tableHercAPalette) / 3); + setupCursor = true; + break; + case Common::kRenderHercG: - setHercPalette(); + setPaletteFromTable(tableHercGPalette, sizeof(tableHercGPalette) / 3); + setupCursor = true; break; default: if ((_game.platform == Common::kPlatformAmiga) || (_game.platform == Common::kPlatformAtariST)) - setAmigaPalette(); + setPaletteFromTable(tableAmigaPalette, sizeof(tableAmigaPalette) / 3); else - setEGAPalette(); + setPaletteFromTable(tableEGAPalette, sizeof(tableEGAPalette) / 3); + } + if (setupCursor) { + // Setup cursor palette + setPalColor( 7, 170, 170, 170); + setPalColor( 8, 85, 85, 85); + setPalColor(15, 255, 255, 255); } - } else - setDirtyColors(0, 255); -} - -void ScummEngine::setC64Palette() { - setPalColor( 0, 0x00, 0x00, 0x00); - setPalColor( 1, 0xFD, 0xFE, 0xFC); - setPalColor( 2, 0xBE, 0x1A, 0x24); - setPalColor( 3, 0x30, 0xE6, 0xC6); - setPalColor( 4, 0xB4, 0x1A, 0xE2); - setPalColor( 5, 0x1F, 0xD2, 0x1E); - setPalColor( 6, 0x21, 0x1B, 0xAE); - setPalColor( 7, 0xDF, 0xF6, 0x0A); - setPalColor( 8, 0xB8, 0x41, 0x04); - setPalColor( 9, 0x6A, 0x33, 0x04); - setPalColor(10, 0xFE, 0x4A, 0x57); - setPalColor(11, 0x42, 0x45, 0x40); - setPalColor(12, 0x70, 0x74, 0x6F); - setPalColor(13, 0x59, 0xFE, 0x59); - setPalColor(14, 0x5F, 0x53, 0xFE); - setPalColor(15, 0xA4, 0xA7, 0xA2); - - // Use 17 color table for v1 games to allow correct color for inventory and - // sentence line. Original games used some kind of dynamic color table - // remapping between rooms. - setPalColor(16, 255, 85, 255); -} - -void ScummEngine::setNESPalette() { - setPalColor(0x00,0x00,0x00,0x00); // 0x1D - setPalColor(0x01,0x00,0x24,0x92); - setPalColor(0x02,0x00,0x00,0xDB); - setPalColor(0x03,0x6D,0x49,0xDB); - setPalColor(0x04,0x92,0x00,0x6D); - setPalColor(0x05,0xB6,0x00,0x6D); - setPalColor(0x06,0xB6,0x24,0x00); - setPalColor(0x07,0x92,0x49,0x00); - setPalColor(0x08,0x6D,0x49,0x00); - setPalColor(0x09,0x24,0x49,0x00); - setPalColor(0x0A,0x00,0x6D,0x24); - setPalColor(0x0B,0x00,0x92,0x00); - setPalColor(0x0C,0x00,0x49,0x49); - setPalColor(0x0D,0x00,0x00,0x00); - setPalColor(0x0E,0x00,0x00,0x00); - setPalColor(0x0F,0x00,0x00,0x00); - - setPalColor(0x10,0xB6,0xB6,0xB6); - setPalColor(0x11,0x00,0x6D,0xDB); - setPalColor(0x12,0x00,0x49,0xFF); - setPalColor(0x13,0x92,0x00,0xFF); - setPalColor(0x14,0xB6,0x00,0xFF); - setPalColor(0x15,0xFF,0x00,0x92); - setPalColor(0x16,0xFF,0x00,0x00); - setPalColor(0x17,0xDB,0x6D,0x00); - setPalColor(0x18,0x92,0x6D,0x00); - setPalColor(0x19,0x24,0x92,0x00); - setPalColor(0x1A,0x00,0x92,0x00); - setPalColor(0x1B,0x00,0xB6,0x6D); - setPalColor(0x1C,0x00,0x92,0x92); - setPalColor(0x1D,0x6D,0x6D,0x6D); // 0x00 - setPalColor(0x1E,0x00,0x00,0x00); - setPalColor(0x1F,0x00,0x00,0x00); - - setPalColor(0x20,0xFF,0xFF,0xFF); - setPalColor(0x21,0x6D,0xB6,0xFF); - setPalColor(0x22,0x92,0x92,0xFF); - setPalColor(0x23,0xDB,0x6D,0xFF); - setPalColor(0x24,0xFF,0x00,0xFF); - setPalColor(0x25,0xFF,0x6D,0xFF); - setPalColor(0x26,0xFF,0x92,0x00); - setPalColor(0x27,0xFF,0xB6,0x00); - setPalColor(0x28,0xDB,0xDB,0x00); - setPalColor(0x29,0x6D,0xDB,0x00); - setPalColor(0x2A,0x00,0xFF,0x00); - setPalColor(0x2B,0x49,0xFF,0xDB); - setPalColor(0x2C,0x00,0xFF,0xFF); - setPalColor(0x2D,0x49,0x49,0x49); - setPalColor(0x2E,0x00,0x00,0x00); - setPalColor(0x2F,0x00,0x00,0x00); - - setPalColor(0x30,0xFF,0xFF,0xFF); - setPalColor(0x31,0xB6,0xDB,0xFF); - setPalColor(0x32,0xDB,0xB6,0xFF); - setPalColor(0x33,0xFF,0xB6,0xFF); - setPalColor(0x34,0xFF,0x92,0xFF); - setPalColor(0x35,0xFF,0xB6,0xB6); - setPalColor(0x36,0xFF,0xDB,0x92); - setPalColor(0x37,0xFF,0xFF,0x49); - setPalColor(0x38,0xFF,0xFF,0x6D); - setPalColor(0x39,0xB6,0xFF,0x49); - setPalColor(0x3A,0x92,0xFF,0x6D); - setPalColor(0x3B,0x49,0xFF,0xDB); - setPalColor(0x3C,0x92,0xDB,0xFF); - setPalColor(0x3D,0x92,0x92,0x92); - setPalColor(0x3E,0x00,0x00,0x00); - setPalColor(0x3F,0x00,0x00,0x00); -} - -void ScummEngine::setAmigaPalette() { - setPalColor( 0, 0, 0, 0); - setPalColor( 1, 0, 0, 187); - setPalColor( 2, 0, 187, 0); - setPalColor( 3, 0, 187, 187); - setPalColor( 4, 187, 0, 0); - setPalColor( 5, 187, 0, 187); - setPalColor( 6, 187, 119, 0); - setPalColor( 7, 187, 187, 187); - setPalColor( 8, 119, 119, 119); - setPalColor( 9, 119, 119, 255); - setPalColor(10, 0, 255, 0); - setPalColor(11, 0, 255, 255); - setPalColor(12, 255, 136, 136); - setPalColor(13, 255, 0, 255); - setPalColor(14, 255, 255, 0); - setPalColor(15, 255, 255, 255); -} - -void ScummEngine::setHercPalette() { - setPalColor( 0, 0, 0, 0); - - if (_renderMode == Common::kRenderHercA) - setPalColor( 1, 0xAE, 0x69, 0x38); - else - setPalColor( 1, 0x00, 0xFF, 0x00); - - // Setup cursor palette - setPalColor( 7, 170, 170, 170); - setPalColor( 8, 85, 85, 85); - setPalColor(15, 255, 255, 255); -} - -void ScummEngine::setCGAPalette() { - setPalColor( 0, 0, 0, 0); - setPalColor( 1, 0, 168, 168); - setPalColor( 2, 168, 0, 168); - setPalColor( 3, 168, 168, 168); - - // Setup cursor palette - setPalColor( 7, 170, 170, 170); - setPalColor( 8, 85, 85, 85); - setPalColor(15, 255, 255, 255); -} -void ScummEngine::setEGAPalette() { - setPalColor( 0, 0, 0, 0); - setPalColor( 1, 0, 0, 170); - setPalColor( 2, 0, 170, 0); - setPalColor( 3, 0, 170, 170); - setPalColor( 4, 170, 0, 0); - setPalColor( 5, 170, 0, 170); - setPalColor( 6, 170, 85, 0); - setPalColor( 7, 170, 170, 170); - setPalColor( 8, 85, 85, 85); - setPalColor( 9, 85, 85, 255); - setPalColor(10, 85, 255, 85); - setPalColor(11, 85, 255, 255); - setPalColor(12, 255, 85, 85); - setPalColor(13, 255, 85, 255); - setPalColor(14, 255, 255, 85); - setPalColor(15, 255, 255, 255); + } else { + if ((_game.platform == Common::kPlatformAmiga) && _game.version == 4) { + // if rendermode is set to EGA we use the full palette from the resources + // else we initialise and then lock down the first 16 colors. + if (_renderMode != Common::kRenderEGA) + setPaletteFromTable(tableAmigaMIPalette, sizeof(tableAmigaMIPalette) / 3); + } + setDirtyColors(0, 255); + } } -void ScummEngine::setV1Palette() { - setPalColor( 0, 0, 0, 0); - setPalColor( 1, 255, 255, 255); - setPalColor( 2, 170, 0, 0); - setPalColor( 3, 0, 170, 170); - setPalColor( 4, 170, 0, 170); - setPalColor( 5, 0, 170, 0); - setPalColor( 6, 0, 0, 170); - setPalColor( 7, 255, 255, 85); - setPalColor( 8, 255, 85, 85); - setPalColor( 9, 170, 85, 0); - setPalColor(10, 255, 85, 85); - setPalColor(11, 85, 85, 85); - setPalColor(12, 170, 170, 170); - setPalColor(13, 85, 255, 85); - setPalColor(14, 85, 85, 255); - - if (_game.id == GID_ZAK) - setPalColor(15, 170, 170, 170); - else - setPalColor(15, 85, 85, 85); - - setPalColor(16, 255, 85, 255); +void ScummEngine::setPaletteFromTable(const byte *ptr, int numcolor, int index) { + for ( ; numcolor > 0; --numcolor, ++index, ptr += 3) + setPalColor( index, ptr[0], ptr[1], ptr[2]); } void ScummEngine::setPaletteFromPtr(const byte *ptr, int numcolor) { + int firstIndex = 0; int i; byte *dest, r, g, b; @@ -298,7 +223,14 @@ void ScummEngine::setPaletteFromPtr(const byte *ptr, int numcolor) { dest = _currentPalette; - for (i = 0; i < numcolor; i++) { + // Test for Amiga Monkey Island and EGA Mode unset, if true then skip the first 16 colors. + if ((_game.platform == Common::kPlatformAmiga) && _game.version == 4 && _renderMode != Common::kRenderEGA) { + firstIndex = 16; + dest += 3 * 16; + ptr += 3 * 16; + } + + for (i = firstIndex; i < numcolor; i++) { r = *ptr++; g = *ptr++; b = *ptr++; @@ -323,7 +255,7 @@ void ScummEngine::setPaletteFromPtr(const byte *ptr, int numcolor) { memcpy(_darkenPalette, _currentPalette, 768); } - setDirtyColors(0, numcolor - 1); + setDirtyColors(firstIndex, numcolor - 1); } void ScummEngine::setDirtyColors(int min, int max) { diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 9f3ebb8053..af6b9278c6 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -499,7 +499,9 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) case Common::kRenderCGA: case Common::kRenderEGA: case Common::kRenderAmiga: - if ((_game.version >= 4 && !(_game.features & GF_16COLOR)) || (_game.features & GF_OLD256)) + if ((_game.version >= 4 && !(_game.features & GF_16COLOR) + && !(_game.platform == Common::kPlatformAmiga && _renderMode == Common::kRenderEGA)) + || (_game.features & GF_OLD256)) _renderMode = Common::kRenderDefault; break; diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 7d2bf3336a..6866b17668 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -1029,14 +1029,7 @@ protected: const byte *getPalettePtr(int palindex, int room); - void setC64Palette(); - void setNESPalette(); - void setAmigaPalette(); - void setHercPalette(); - void setCGAPalette(); - void setEGAPalette(); - void setV1Palette(); - + void setPaletteFromTable(const byte *ptr, int numcolor, int firstIndex = 0); void resetPalette(); void setCurrentPalette(int pal); -- cgit v1.2.3 From 54ef7a892ba9460c21fdb7bb5cc72fedc9d4b8cd Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Mon, 24 Aug 2009 13:08:21 +0000 Subject: reverting changes from patch 43696 that shouldnt have been committed svn-id: r43697 --- engines/saga/animation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp index 95a850cfe2..0d298bf96a 100644 --- a/engines/saga/animation.cpp +++ b/engines/saga/animation.cpp @@ -826,10 +826,12 @@ int Anim::fillFrameOffsets(AnimationData *anim, bool reallyFill) { int i; bool longData = isLongData(); - MemoryReadStreamEndian readS(anim->resourceData, anim->resourceLength, !_vm->isBigEndian()); // RLE has inversion BE<>LE + MemoryReadStreamEndian readS(anim->resourceData, anim->resourceLength, _vm->isBigEndian()); readS.seek(12); + readS._bigEndian = !_vm->isBigEndian(); // RLE has inversion BE<>LE + while (readS.pos() != readS.size()) { if (reallyFill) { anim->frameOffsets[currentFrame] = readS.pos(); -- cgit v1.2.3 From 56189652821ee3248cf931b3e2500766082caab9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 24 Aug 2009 13:47:38 +0000 Subject: More work on the fallback detector: added detection of CD games and prevented a crash when detecting a SCI32 game if SCI32 isn't compiled in svn-id: r43698 --- engines/sci/detection.cpp | 55 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 9 deletions(-) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 55ea8ee00a..7f2a3ff705 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -261,6 +261,13 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl bool foundRes000 = false; Common::Platform exePlatform = Common::kPlatformUnknown; + // Set some defaults + s_fallbackDesc.desc.extra = ""; + s_fallbackDesc.desc.language = Common::UNK_LANG; + s_fallbackDesc.desc.flags = ADGF_NO_FLAGS; + s_fallbackDesc.desc.platform = Common::kPlatformUnknown; + s_fallbackDesc.desc.gameid = "sci"; + // First grab all filenames for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { if (file->isDirectory()) @@ -286,6 +293,28 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl foundResMap = true; } + // Determine if we got a CD version and set the CD flag accordingly, by checking for + // resource.aud. We assume that the file should be over 10MB, as it contains all the + // game speech and is usually around 450MB+. The size check is for some floppy game + // versions like KQ6 floppy, which also have a small resource.aud file + if (filename.contains("resource.aud")) { + Common::SeekableReadStream *tmpStream = file->createReadStream(); + if (tmpStream->size() > 10 * 1024 * 1024) { + // We got a CD version, so set the CD flag accordingly + s_fallbackDesc.desc.flags |= ADGF_CD; + s_fallbackDesc.desc.extra = "CD"; + } + delete tmpStream; + } + + // Check if we got a map file for older SCI1 CD versions (like KQ5CD) + // It's named like "audioXXX.map" + if (filename.contains("audio") && filename.contains(".map")) { + // We got a CD version, so set the CD flag accordingly + s_fallbackDesc.desc.flags |= ADGF_CD; + s_fallbackDesc.desc.extra = "CD"; + } + if (filename.contains("resource.000") || filename.contains("resource.001") || filename.contains("ressci.000") || filename.contains("ressci.001")) foundRes000 = true; @@ -313,14 +342,27 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl ResourceManager *resMgr = new ResourceManager(fslist); SciVersion version = resMgr->sciVersion(); + ViewType gameViews = resMgr->getViewType(); + + // Have we identified the game views? If not, stop here + if (gameViews == kViewUnknown) { + SearchMan.remove("SCI_detection"); + return (const ADGameDescription *)&s_fallbackDesc; + } + +#ifndef ENABLE_SCI32 + // Is SCI32 compiled in? If not, and this is a SCI32 game, + // stop here + if (resMgr->sciVersion() == SCI_VERSION_32) { + SearchMan.remove("SCI_detection"); + return (const ADGameDescription *)&s_fallbackDesc; + } +#endif + SegManager *segManager = new SegManager(resMgr, version); - // Set some defaults - s_fallbackDesc.desc.extra = ""; - s_fallbackDesc.desc.language = Common::UNK_LANG; if (exePlatform == Common::kPlatformUnknown) { // Try to determine the platform from game resources - ViewType gameViews = resMgr->getViewType(); if (gameViews == kViewEga || gameViews == kViewVga || gameViews == kViewVga11) { // Must be PC or Mac, set to PC for now @@ -337,7 +379,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl } s_fallbackDesc.desc.platform = exePlatform; - s_fallbackDesc.desc.flags = ADGF_NO_FLAGS; // Determine the game id if (!script_instantiate(resMgr, segManager, version, 0)) { @@ -355,10 +396,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl delete segManager; delete resMgr; - printf("If this is *NOT* a fan-modified version (in particular, not a fan-made\n"); - printf("translation), please, report the data above, including the following\n"); - printf("version number, from the game's executable:\n"); - SearchMan.remove("SCI_detection"); return (const ADGameDescription *)&s_fallbackDesc; -- cgit v1.2.3 From f7b7b494f95a46808eab570c99d40b2626673b34 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 24 Aug 2009 14:00:29 +0000 Subject: Show if a game is using EGA graphics or not in the detected entry svn-id: r43699 --- engines/sci/detection.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines') diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 7f2a3ff705..ef229c8a19 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -359,6 +359,10 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl } #endif + // EGA views + if (gameViews == kViewEga) + s_fallbackDesc.desc.extra = "EGA"; + SegManager *segManager = new SegManager(resMgr, version); if (exePlatform == Common::kPlatformUnknown) { -- cgit v1.2.3