diff options
author | Alejandro Marzini | 2010-07-13 04:31:15 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-13 04:31:15 +0000 |
commit | 609e08d5dbae3179eddf981abe73d69009432de4 (patch) | |
tree | cddbd0a0e69eaa53b85f98f96dc410a307773f08 /engines/tinsel | |
parent | 8b6a670391f1b5103e3761d78eef8f41d64cf8cd (diff) | |
parent | 03c0faa5d76f547603ee6389cdf958e2a6f0f43d (diff) | |
download | scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.tar.gz scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.tar.bz2 scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.zip |
Merged from trunk, from Rev 49499 to HEAD
svn-id: r50840
Diffstat (limited to 'engines/tinsel')
-rw-r--r-- | engines/tinsel/cliprect.cpp | 12 | ||||
-rw-r--r-- | engines/tinsel/detection.cpp | 550 | ||||
-rw-r--r-- | engines/tinsel/detection_tables.h | 567 | ||||
-rw-r--r-- | engines/tinsel/graphics.cpp | 23 | ||||
-rw-r--r-- | engines/tinsel/pcode.cpp | 7 | ||||
-rw-r--r-- | engines/tinsel/tinlib.cpp | 2 | ||||
-rw-r--r-- | engines/tinsel/tinsel.cpp | 8 | ||||
-rw-r--r-- | engines/tinsel/tinsel.h | 6 |
8 files changed, 620 insertions, 555 deletions
diff --git a/engines/tinsel/cliprect.cpp b/engines/tinsel/cliprect.cpp index 69a71b874f..5f287d3eab 100644 --- a/engines/tinsel/cliprect.cpp +++ b/engines/tinsel/cliprect.cpp @@ -28,17 +28,15 @@ #include "tinsel/graphics.h" // normal object drawing #include "tinsel/object.h" #include "tinsel/palette.h" +#include "tinsel/tinsel.h" // for _vm namespace Tinsel { -/** list of all clip rectangles */ -static RectList s_rectList; - /** * Resets the clipping rectangle allocator. */ void ResetClipRect() { - s_rectList.clear(); + _vm->_clipRects.clear(); } /** @@ -46,11 +44,11 @@ void ResetClipRect() { * @param pClip clip rectangle dimensions to allocate */ void AddClipRect(const Common::Rect &pClip) { - s_rectList.push_back(pClip); + _vm->_clipRects.push_back(pClip); } const RectList &GetClipRects() { - return s_rectList; + return _vm->_clipRects; } /** @@ -175,6 +173,8 @@ void FindMovingObjects(OBJECT *pObjList, Common::Point *pWin, Common::Rect *pCli * the total number of clip rectangles. */ void MergeClipRect() { + RectList &s_rectList = _vm->_clipRects; + if (s_rectList.size() <= 1) return; diff --git a/engines/tinsel/detection.cpp b/engines/tinsel/detection.cpp index 70a2f475ee..d6bdad6032 100644 --- a/engines/tinsel/detection.cpp +++ b/engines/tinsel/detection.cpp @@ -75,549 +75,7 @@ static const PlainGameDescriptor tinselGames[] = { {0, 0} }; - -namespace Tinsel { - -using Common::GUIO_NONE; -using Common::GUIO_NOSPEECH; -using Common::GUIO_NOSFX; -using Common::GUIO_NOMUSIC; - -static const TinselGameDescription gameDescriptions[] = { - - // Note: The following is the (hopefully) definitive list of version details: - // TINSEL_V0: Used only by the Discworld 1 demo - this used a more primitive version - // of the Tinsel engine and graphics compression - // TINSEL_V1: There were two versions of the Discworld 1 game - the first used .GRA - // files, and the second used .SCN files. The second also provided some fixes to - // various script bugs and coding errors, but is still considered TINSEL_V1, - // as both game versions work equally well with the newer code. - // TINSEL_V2: The Discworld 2 game used this updated version of the Tinsel 1 engine, - // and as far as we know there aren't any variations of this engine. - - { // Floppy Demo V0 from http://www.adventure-treff.de/specials/dl_demos.php - { - "dw", - "Floppy Demo", - AD_ENTRY1s("dw.gra", "ce1b57761ba705221bcf70955b827b97", 441192), - //AD_ENTRY1s("dw.scn", "ccd72f02183d0e96b6e7d8df9492cda8", 23308), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO, - GUIO_NOSPEECH | GUIO_NOSFX | GUIO_NOMUSIC - }, - GID_DW1, - 0, - GF_DEMO, - TINSEL_V0, - }, - - { // CD Demo V1 version, with *.gra files - { - "dw", - "CD Demo", - { - {"dw.gra", 0, "ef5a2518c9e205f786f5a4526396e661", 781676}, - {"english.smp", 0, NULL, -1}, - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_DEMO, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD, - TINSEL_V1, - }, - - { // Multilingual Floppy V1 with *.gra files. - // Note: It contains no english subtitles. - { - "dw", - "Floppy", - { - {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, - {"french.txt", 0, NULL, -1}, - {"german.txt", 0, NULL, -1}, - {"italian.txt", 0, NULL, -1}, - {"spanish.txt", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - GUIO_NOSPEECH - }, - GID_DW1, - 0, - GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // Floppy V1 version, with *.gra files - { - "dw", - "Floppy", - AD_ENTRY1s("dw.gra", "c8808ccd988d603dd35dff42013ae7fd", 781656), - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NOSPEECH - }, - GID_DW1, - 0, - GF_FLOPPY | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // CD V1 version, with *.gra files (same as the floppy one, with english.smp) - { - "dw", - "CD", - { - {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, - {"english.smp", 0, NULL, -1}, - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // Italian CD with english speech and *.gra files. - // Note: It contains only italian subtitles, but inside english.txt - { - "dw", - "CD", - { - {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, - {"english.txt", 0, "15f0703f85477d7fab4280bf938b61c1", 237774}, - {"english.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::IT_ITA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // Multilingual CD with english speech and *.gra files. - // Note: It contains no english subtitles. - { - "dw", - "CD", - { - {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, - {"english.smp", 0, NULL, -1}, - {"french.txt", 0, NULL, -1}, - {"german.txt", 0, NULL, -1}, - {"italian.txt", 0, NULL, -1}, - {"spanish.txt", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { - { - "dw", - "CD", - { - {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, - {"english.smp", 0, NULL, -1}, - {"french.txt", 0, NULL, -1}, - {"german.txt", 0, NULL, -1}, - {"italian.txt", 0, NULL, -1}, - {"spanish.txt", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - { - { - "dw", - "CD", - { - {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, - {"english.smp", 0, NULL, -1}, - {"french.txt", 0, NULL, -1}, - {"german.txt", 0, NULL, -1}, - {"italian.txt", 0, NULL, -1}, - {"spanish.txt", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::IT_ITA, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - { - { - "dw", - "CD", - { - {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, - {"english.smp", 0, NULL, -1}, - {"french.txt", 0, NULL, -1}, - {"german.txt", 0, NULL, -1}, - {"italian.txt", 0, NULL, -1}, - {"spanish.txt", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::ES_ESP, - Common::kPlatformPC, - ADGF_DROPLANGUAGE, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // English CD v2 - { - "dw", - "CD", - { - {"dw.scn", 0, "70955425870c7720d6eebed903b2ef41", 776188}, - {"english.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // Hebrew CD v2 - { - "dw", - "CD", - { - {"dw.scn", 0, "759d1374b4f02af6d52fc07c96679936", 770780}, - {"english.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::HE_ISR, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // Discworld PSX CD - { - "dw", - "CD", - { - {"english.txt", 0, "7526cfc3a64e00f223795de476b4e2c9", 230326}, - {NULL, 0, NULL, 0} - }, - Common::EN_ANY, - Common::kPlatformPSX, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // multilanguage PSX demo - { - "dw", - "CD demo", - { - {"french.txt", 0, "e7020d35f58d0d187052ac406d86cc87", 273914}, - {"german.txt", 0, "52f0a01e0ff0d340b02a36fd5109d705", 263942}, - {"italian.txt", 0, "15f0703f85477d7fab4280bf938b61c1", 239834}, - {"spanish.txt", 0, "c324170c3f1922c605c5cc09ba265aa5", 236702}, - {"english.txt", 0, "7526cfc3a64e00f223795de476b4e2c9", 230326}, - {NULL, 0, NULL, 0} - }, - Common::EN_ANY, - Common::kPlatformPSX, - ADGF_DEMO, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V1, - }, - -#if 0 - { // English Saturn CD - { - "dw", - "CD", - { - {"dw.scn", 0, "6803f293c88758057cc685b9437f7637", 382248}, - {"english.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::EN_ANY, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, -#endif - -#if 0 - { // Mac multilanguage CD - { - "dw", - "CD", - { - {"dw.scn", 0, "cfc40a8d5d476a1c9d3abf826fa46f8c", 1265532}, - {"english.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::EN_ANY, - Common::kPlatformMacintosh, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - -#endif - - { // German CD re-release "Neon Edition" - // Note: This release has ENGLISH.TXT (with german content) instead of GERMAN.TXT - { - "dw", - "CD", - AD_ENTRY1s("dw.scn", "6182c7986eaec893c62fb6ea13a9f225", 774556), - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // Russian Discworld 1 - { - "dw", - "CD", - { - {"dw.scn", 0, "133041bde59d05c1bf084fd6f1bdce4b", 776524}, - {"english.txt", 0, "f73dcbd7b136b37c2adf7c9448ea336d", 231821}, - {"english.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::RU_RUS, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW1, - 0, - GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, - TINSEL_V1, - }, - - { // European/Australian Discworld 2 release - { - "dw2", - "CD", - { - {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, - {"english1.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::EN_GRB, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - - { // US Discworld 2 release - { - "dw2", - "CD", - { - {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, - {"us1.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::EN_USA, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - - { // French version of Discworld 2 - { - "dw2", - "CD", - { - {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, - {"french1.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::FR_FRA, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - - { // German Discworld 2 re-release "Neon Edition" - { - "dw2", - "CD", - { - {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, - {"german1.smp", 0, NULL, -1}, - {NULL, 0, NULL, 0} - }, - Common::DE_DEU, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - - { // Italian/Spanish Discworld 2 - { - "dw2", - "CD", - { - {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, - {"english1.smp", 0, NULL, -1}, - {"italian1.txt", 0, "d443249f8b55489b5888c227b9096f4e", 246495}, - {NULL, 0, NULL, 0} - }, - Common::IT_ITA, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - { - { - "dw2", - "CD", - { - {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, - {"english1.smp", 0, NULL, -1}, - {"spanish1.txt", 0, "bc6e147c5f542db228ac577357e4d897", 230323}, - {NULL, 0, NULL, 0} - }, - Common::ES_ESP, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - - { // Russian Discworld 2 release by Fargus - { - "dw2", - "CD", - { - {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, - {"english1.smp", 0, NULL, -1}, - {"english1.txt", 0, "b522e19d7b2cd7b85e50e36fe48e36a9", 274444}, - {NULL, 0, NULL, 0} - }, - Common::RU_RUS, - Common::kPlatformPC, - ADGF_NO_FLAGS, - GUIO_NONE - }, - GID_DW2, - 0, - GF_CD | GF_SCNFILES, - TINSEL_V2, - }, - - { AD_TABLE_END_MARKER, 0, 0, 0, 0 } -}; - -} // End of namespace Tinsel +#include "tinsel/detection_tables.h" static const ADParams detectionParams = { // Pointer to ADGameDescription or its superset structure @@ -637,7 +95,11 @@ static const ADParams detectionParams = { // Flags 0, // Additional GUI options (for every game} - Common::GUIO_NONE + Common::GUIO_NONE, + // Maximum directory depth + 1, + // List of directory globs + 0 }; class TinselMetaEngine : public AdvancedMetaEngine { diff --git a/engines/tinsel/detection_tables.h b/engines/tinsel/detection_tables.h new file mode 100644 index 0000000000..b467cc613e --- /dev/null +++ b/engines/tinsel/detection_tables.h @@ -0,0 +1,567 @@ +/* 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 Tinsel { + +using Common::GUIO_NONE; +using Common::GUIO_NOSPEECH; +using Common::GUIO_NOSFX; +using Common::GUIO_NOMUSIC; + +static const TinselGameDescription gameDescriptions[] = { + + // Note: The following is the (hopefully) definitive list of version details: + // TINSEL_V0: Used only by the Discworld 1 demo - this used a more primitive version + // of the Tinsel engine and graphics compression + // TINSEL_V1: There were two versions of the Discworld 1 game - the first used .GRA + // files, and the second used .SCN files. The second also provided some fixes to + // various script bugs and coding errors, but is still considered TINSEL_V1, + // as both game versions work equally well with the newer code. + // TINSEL_V2: The Discworld 2 game used this updated version of the Tinsel 1 engine, + // and as far as we know there aren't any variations of this engine. + + { // Floppy Demo V0 from http://www.adventure-treff.de/specials/dl_demos.php + { + "dw", + "Floppy Demo", + AD_ENTRY1s("dw.gra", "ce1b57761ba705221bcf70955b827b97", 441192), + //AD_ENTRY1s("dw.scn", "ccd72f02183d0e96b6e7d8df9492cda8", 23308), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + GUIO_NOSPEECH | GUIO_NOSFX | GUIO_NOMUSIC + }, + GID_DW1, + 0, + GF_DEMO, + TINSEL_V0, + }, + + { // CD Demo V1 version, with *.gra files + { + "dw", + "CD Demo", + { + {"dw.gra", 0, "ef5a2518c9e205f786f5a4526396e661", 781676}, + {"english.smp", 0, NULL, -1}, + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_DEMO, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD, + TINSEL_V1, + }, + + { // Multilingual Floppy V1 with *.gra files. + // Note: It contains no english subtitles. + { + "dw", + "Floppy", + { + {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, + {"french.txt", 0, NULL, -1}, + {"german.txt", 0, NULL, -1}, + {"italian.txt", 0, NULL, -1}, + {"spanish.txt", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + GUIO_NOSPEECH + }, + GID_DW1, + 0, + GF_FLOPPY | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // Floppy V1 version, with *.gra files + { + "dw", + "Floppy", + AD_ENTRY1s("dw.gra", "c8808ccd988d603dd35dff42013ae7fd", 781656), + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NOSPEECH + }, + GID_DW1, + 0, + GF_FLOPPY | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // CD V1 version, with *.gra files (same as the floppy one, with english.smp) + { + "dw", + "CD", + { + {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, + {"english.smp", 0, NULL, -1}, + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // Italian CD with english speech and *.gra files. + // Note: It contains only italian subtitles, but inside english.txt + { + "dw", + "CD", + { + {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, + {"english.txt", 0, "15f0703f85477d7fab4280bf938b61c1", 237774}, + {"english.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::IT_ITA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // Multilingual CD with english speech and *.gra files. + // Note: It contains no english subtitles. + { + "dw", + "CD", + { + {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, + {"english.smp", 0, NULL, -1}, + {"french.txt", 0, NULL, -1}, + {"german.txt", 0, NULL, -1}, + {"italian.txt", 0, NULL, -1}, + {"spanish.txt", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { + { + "dw", + "CD", + { + {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, + {"english.smp", 0, NULL, -1}, + {"french.txt", 0, NULL, -1}, + {"german.txt", 0, NULL, -1}, + {"italian.txt", 0, NULL, -1}, + {"spanish.txt", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + { + { + "dw", + "CD", + { + {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, + {"english.smp", 0, NULL, -1}, + {"french.txt", 0, NULL, -1}, + {"german.txt", 0, NULL, -1}, + {"italian.txt", 0, NULL, -1}, + {"spanish.txt", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::IT_ITA, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + { + { + "dw", + "CD", + { + {"dw.gra", 0, "c8808ccd988d603dd35dff42013ae7fd", 781656}, + {"english.smp", 0, NULL, -1}, + {"french.txt", 0, NULL, -1}, + {"german.txt", 0, NULL, -1}, + {"italian.txt", 0, NULL, -1}, + {"spanish.txt", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::ES_ESP, + Common::kPlatformPC, + ADGF_DROPLANGUAGE, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_USE_4FLAGS | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // English CD v2 + { + "dw", + "CD", + { + {"dw.scn", 0, "70955425870c7720d6eebed903b2ef41", 776188}, + {"english.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // Hebrew CD v2 + { + "dw", + "CD", + { + {"dw.scn", 0, "759d1374b4f02af6d52fc07c96679936", 770780}, + {"english.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::HE_ISR, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // Discworld PSX CD + { + "dw", + "CD", + { + {"english.txt", 0, "7526cfc3a64e00f223795de476b4e2c9", 230326}, + {NULL, 0, NULL, 0} + }, + Common::EN_ANY, + Common::kPlatformPSX, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // multilanguage PSX demo + { + "dw", + "CD demo", + { + {"french.txt", 0, "e7020d35f58d0d187052ac406d86cc87", 273914}, + {"german.txt", 0, "52f0a01e0ff0d340b02a36fd5109d705", 263942}, + {"italian.txt", 0, "15f0703f85477d7fab4280bf938b61c1", 239834}, + {"spanish.txt", 0, "c324170c3f1922c605c5cc09ba265aa5", 236702}, + {"english.txt", 0, "7526cfc3a64e00f223795de476b4e2c9", 230326}, + {NULL, 0, NULL, 0} + }, + Common::EN_ANY, + Common::kPlatformPSX, + ADGF_DEMO, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V1, + }, + +#if 0 + { // English Saturn CD + { + "dw", + "CD", + { + {"dw.scn", 0, "6803f293c88758057cc685b9437f7637", 382248}, + {"english.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::EN_ANY, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, +#endif + +#if 0 + { // Mac multilanguage CD + { + "dw", + "CD", + { + {"dw.scn", 0, "cfc40a8d5d476a1c9d3abf826fa46f8c", 1265532}, + {"english.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::EN_ANY, + Common::kPlatformMacintosh, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + +#endif + + { // German CD re-release "Neon Edition" + // Note: This release has ENGLISH.TXT (with german content) instead of GERMAN.TXT + { + "dw", + "CD", + AD_ENTRY1s("dw.scn", "6182c7986eaec893c62fb6ea13a9f225", 774556), + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // Russian Discworld 1 + { + "dw", + "CD", + { + {"dw.scn", 0, "133041bde59d05c1bf084fd6f1bdce4b", 776524}, + {"english.txt", 0, "f73dcbd7b136b37c2adf7c9448ea336d", 231821}, + {"english.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::RU_RUS, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW1, + 0, + GF_CD | GF_SCNFILES | GF_ENHANCED_AUDIO_SUPPORT, + TINSEL_V1, + }, + + { // European/Australian Discworld 2 release + { + "dw2", + "CD", + { + {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, + {"english1.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::EN_GRB, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + + { // US Discworld 2 release + { + "dw2", + "CD", + { + {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, + {"us1.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::EN_USA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + + { // French version of Discworld 2 + { + "dw2", + "CD", + { + {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, + {"french1.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::FR_FRA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + + { // German Discworld 2 re-release "Neon Edition" + { + "dw2", + "CD", + { + {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, + {"german1.smp", 0, NULL, -1}, + {NULL, 0, NULL, 0} + }, + Common::DE_DEU, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + + { // Italian/Spanish Discworld 2 + { + "dw2", + "CD", + { + {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, + {"english1.smp", 0, NULL, -1}, + {"italian1.txt", 0, "d443249f8b55489b5888c227b9096f4e", 246495}, + {NULL, 0, NULL, 0} + }, + Common::IT_ITA, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + { + { + "dw2", + "CD", + { + {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, + {"english1.smp", 0, NULL, -1}, + {"spanish1.txt", 0, "bc6e147c5f542db228ac577357e4d897", 230323}, + {NULL, 0, NULL, 0} + }, + Common::ES_ESP, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + + { // Russian Discworld 2 release by Fargus + { + "dw2", + "CD", + { + {"dw2.scn", 0, "c6d15ce9720a9d8fef06e6582dcf3f34", 103593}, + {"english1.smp", 0, NULL, -1}, + {"english1.txt", 0, "b522e19d7b2cd7b85e50e36fe48e36a9", 274444}, + {NULL, 0, NULL, 0} + }, + Common::RU_RUS, + Common::kPlatformPC, + ADGF_NO_FLAGS, + GUIO_NONE + }, + GID_DW2, + 0, + GF_CD | GF_SCNFILES, + TINSEL_V2, + }, + + { AD_TABLE_END_MARKER, 0, 0, 0, 0 } +}; + +} // End of namespace Tinsel diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp index 9700e8947f..48270d94e3 100644 --- a/engines/tinsel/graphics.cpp +++ b/engines/tinsel/graphics.cpp @@ -443,6 +443,12 @@ static void t2WrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, bool apply int numBytes; int clipAmount; + // WORKAROUND: One of the mortician frames has several corrupt bytes in the Russian version + if ((pObj->hBits == 2517583660UL) && (_vm->getLanguage() == Common::RU_RUS)) { + uint8 correctBytes[5] = {0xA3, 0x00, 0x89, 0xC0, 0xA6}; + Common::copy(&correctBytes[0], &correctBytes[5], srcP); + } + for (int y = 0; y < pObj->height; ++y) { // Get the position to start writing out from uint8 *tempP = !horizFlipped ? destP : @@ -596,6 +602,23 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP, int numBytes, colour; int v; + if (_vm->getLanguage() == Common::RU_RUS) { + // WORKAROUND: One of the mortician frames has several corrupt bytes in the Russian version + if (pObj->hBits == 2517583393UL) { + uint8 correctBytes[5] = {0x00, 0x00, 0x17, 0x01, 0x00}; + Common::copy(&correctBytes[0], &correctBytes[5], srcP + 267); + } + // WORKAROUND: One of Dibbler's frames in the end sequence has corrupt bytes in the Russian version + if (pObj->hBits == 33651742) { + uint8 correctBytes[40] = { + 0x06, 0xc0, 0xd6, 0xc1, 0x09, 0xce, 0x0d, 0x24, 0x02, 0x12, 0x01, 0x00, 0x00, 0x23, 0x21, 0x32, + 0x12, 0x00, 0x00, 0x20, 0x01, 0x11, 0x32, 0x12, 0x01, 0x00, 0x00, 0x1b, 0x02, 0x11, 0x34, 0x11, + 0x00, 0x00, 0x18, 0x01, 0x11, 0x35, 0x21, 0x01 + }; + Common::copy(&correctBytes[0], &correctBytes[40], srcP); + } + } + if (applyClipping) { pObj->height -= pObj->botClip; topClip = pObj->topClip; diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp index c472a770d2..98fb078459 100644 --- a/engines/tinsel/pcode.cpp +++ b/engines/tinsel/pcode.cpp @@ -148,6 +148,7 @@ static const byte fragment12[] = {OP_JMPTRUE | OPSIZE16, FRAGMENT_WORD(1491), OP_ONE, OP_LIBCALL | OPSIZE8, 14, // Re-show the cursor OP_IMM | OPSIZE16, FRAGMENT_WORD(322), OP_LIBCALL | OPSIZE8, 46, // Give back the whistle OP_JUMP | OPSIZE16, FRAGMENT_WORD(1568)}; +static const byte fragment13[] = {OP_ZERO, OP_GSTORE | OPSIZE16, FRAGMENT_WORD(306)}; #undef FRAGMENT_WORD @@ -207,6 +208,12 @@ const WorkaroundEntry workaroundList[] = { // See bug report #2934211. {TINSEL_V1, true, 352601285, 1569, sizeof(fragment11), fragment11}, {TINSEL_V1, false, 352602304, 1488, sizeof(fragment12), fragment12}, + + // DW2: Corrects a bug with global 306 not being cleared if you leave + // the marketplace scene whilst D'Blah is talking (even if it's not + // actually audible); returning to the scene and clicking on him multiple + // times would cause the game to crash + {TINSEL_V2, true, 1109294728, 0, sizeof(fragment13), fragment13}, {TINSEL_V0, false, 0, 0, 0, NULL} }; diff --git a/engines/tinsel/tinlib.cpp b/engines/tinsel/tinlib.cpp index 677392a35d..766d4ed54a 100644 --- a/engines/tinsel/tinlib.cpp +++ b/engines/tinsel/tinlib.cpp @@ -5557,7 +5557,7 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi case WALKED: { // Common to both DW1 & DW2 pp -= 3; // 4 parameters - bool tmp; + bool tmp = false; Walked(coroParam, pp[0], pp[1], pp[2], pp[3], pic->escOn, pic->myEscape, tmp); if (!coroParam) { // Only write the result to the stack if walked actually completed running. diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp index 4335b51818..3a4191227a 100644 --- a/engines/tinsel/tinsel.cpp +++ b/engines/tinsel/tinsel.cpp @@ -855,11 +855,11 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc) if (cd_num >= 0) _system->getAudioCDManager()->openCD(cd_num); - MidiDriverType midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI); - bool native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32")); - //bool adlib = (midiDriver == MD_ADLIB); + MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM); + bool native_mt32 = ((MidiDriver::getMusicType(dev) == MT_MT32) || ConfMan.getBool("native_mt32")); + //bool adlib = (MidiDriver::getMusicType(dev) == MT_ADLIB); - _driver = MidiDriver::createMidi(midiDriver); + _driver = MidiDriver::createMidi(dev); if (native_mt32) _driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 0e1d705815..df27a1e0e1 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -61,6 +61,8 @@ class PCMMusicPlayer; class Scheduler; class SoundManager; +typedef Common::List<Common::Rect> RectList; + enum TinselGameID { GID_DW1 = 0, GID_DW2 = 1 @@ -203,6 +205,10 @@ public: /** Stack of pending keypresses. */ Common::List<Common::Event> _keypresses; + + /** List of all clip rectangles. */ + RectList _clipRects; + private: //MidiMusicPlayer *_midiMusic; int _musicVolume; |