[Scummvm-cvs-logs] scummvm branch-1-8 -> 9474459224f9adebd2d261606b040aa14b11108c

sev- sev at scummvm.org
Wed Mar 9 15:54:03 CET 2016


This automated email contains information about 9 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
bb9e7d0e14 SWORD25: Fixed "Resource not released" warnings [GSoC]
fbcff87f13 GCW0: Disabled more 640x480-only engines
00f1ec7fd9 CONFIGURE: Introduced new engine dependency: highres
2cef763544 CONFIGURE: Error out when host-os is msys.
9dbde83764 LAB: Process events during ending sequence
70c42a797c LAB: Remove gap handling from removeSaveState.
1b089f8492 SWORD25: Add engine option to use English speech instead of German
7d1d1dac06 SCUMM: Fix bugs #7070, #7071.
9474459224 SWORD25: Fix error after changing language in-game with the data file distributed by ScummVM


Commit: bb9e7d0e142ade99316506cec49fe88be5538287
    https://github.com/scummvm/scummvm/commit/bb9e7d0e142ade99316506cec49fe88be5538287
Author: Tkachov (Tkachov at TLab)
Date: 2016-03-09T15:52:14+01:00

Commit Message:
SWORD25: Fixed "Resource not released" warnings [GSoC]

(Look https://sourceforge.net/p/scummvm/bugs/6980/)

The warning messages were appearing because when PRECACHE_RESOURCES is
not defined, ResourceManager's `requestResource()` was used to manually
"cache" them. When you do that, ResourceManager "locks" the resource
once, so you must `release()` it later.

Resources were not released, and warnings appeared. When you
`release()` resource, it still is loaded ("cached"). Resource's
`getLockCount()` is 0, though, so it might be unloaded by
ResourceManager if there is a lot of resources.

Changed paths:
    engines/sword25/gfx/animationresource.cpp
    engines/sword25/gfx/fontresource.cpp
    engines/sword25/gfx/text.cpp



diff --git a/engines/sword25/gfx/animationresource.cpp b/engines/sword25/gfx/animationresource.cpp
index 431d466..423a2b8 100644
--- a/engines/sword25/gfx/animationresource.cpp
+++ b/engines/sword25/gfx/animationresource.cpp
@@ -211,8 +211,9 @@ bool AnimationResource::precacheAllFrames() const {
 			error("Could not precache \"%s\".", (*iter).fileName.c_str());
 			return false;
 		}
-#else
-		Kernel::getInstance()->getResourceManager()->requestResource((*iter).fileName);
+#else		 
+		Resource *pResource = Kernel::getInstance()->getResourceManager()->requestResource((*iter).fileName);
+		pResource->release(); //unlock precached resource
 #endif
 	}
 
diff --git a/engines/sword25/gfx/fontresource.cpp b/engines/sword25/gfx/fontresource.cpp
index c4d4c3c..1d7aedc 100644
--- a/engines/sword25/gfx/fontresource.cpp
+++ b/engines/sword25/gfx/fontresource.cpp
@@ -103,8 +103,9 @@ bool FontResource::parserCallback_font(ParserNode *node) {
 	if (!_pKernel->getResourceManager()->precacheResource(_bitmapFileName)) {
 		error("Could not precache \"%s\".", _bitmapFileName.c_str());
 	}
-#else
-	_pKernel->getResourceManager()->requestResource(_bitmapFileName);
+#else	
+	Resource *pResource = _pKernel->getResourceManager()->requestResource(_bitmapFileName);
+	pResource->release(); //unlock precached resource
 #endif
 
 	return true;
diff --git a/engines/sword25/gfx/text.cpp b/engines/sword25/gfx/text.cpp
index d409c53..769c9b1 100644
--- a/engines/sword25/gfx/text.cpp
+++ b/engines/sword25/gfx/text.cpp
@@ -77,7 +77,8 @@ bool Text::setFont(const Common::String &font) {
 		return false;
 	}
 #else
-	getResourceManager()->requestResource(font);
+	Resource *pResource = getResourceManager()->requestResource(font);
+	pResource->release(); //unlock precached resource
 	_font = font;
 	updateFormat();
 	forceRefresh();


Commit: fbcff87f13655dc4cd7ca385878d44ae3e41821c
    https://github.com/scummvm/scummvm/commit/fbcff87f13655dc4cd7ca385878d44ae3e41821c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-09T15:52:24+01:00

Commit Message:
GCW0: Disabled more 640x480-only engines

Changed paths:
    backends/platform/dingux/build.gcw0.sh



diff --git a/backends/platform/dingux/build.gcw0.sh b/backends/platform/dingux/build.gcw0.sh
index c4bb9d2..eafccb1 100755
--- a/backends/platform/dingux/build.gcw0.sh
+++ b/backends/platform/dingux/build.gcw0.sh
@@ -3,4 +3,4 @@
 export PATH=/opt/gcw0-toolchain/usr/bin:$PATH
 
 # Disable high resolution engines since we have 320x240 hardware
-./configure --host=gcw0 --enable-plugins --default-dynamic --enable-release  --disable-engine=mohawk,neverhood,sword25,toltecs,wintermute,zvision --disable-mt32emu --disable-hq-scalers && make -j6 gcw-opk && ls -l scummvm.opk
+./configure --host=gcw0 --enable-plugins --default-dynamic --enable-release  --disable-engine=he,mohawk,neverhood,sword1,sword2,sword25,toltecs,wintermute,zvision --disable-mt32emu --disable-hq-scalers && make -j6 gcw-opk && ls -l scummvm.opk


Commit: 00f1ec7fd90de369272a7b1cb8f7932498b6cd45
    https://github.com/scummvm/scummvm/commit/00f1ec7fd90de369272a7b1cb8f7932498b6cd45
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-03-09T15:52:34+01:00

Commit Message:
CONFIGURE: Introduced new engine dependency: highres

Some backends like GCW0 do no support graphics >320x240 due to
the hardware limitation (downscaling is possible but it will ruin
the pixel hunting which is often part of the gameplay).

Instead of manually updating the list of engines, we now introduce
a new dependency.

I marked all relevant engines, but some, like tinsel, require more
work with putting their relevant high-res games under USE_HIGHRES
define.

Changed paths:
    configure
    engines/agos/configure.engine
    engines/avalanche/configure.engine
    engines/composer/configure.engine
    engines/fullpipe/configure.engine
    engines/groovie/configure.engine
    engines/hopkins/configure.engine
    engines/lastexpress/configure.engine
    engines/mohawk/configure.engine
    engines/mortevielle/configure.engine
    engines/neverhood/configure.engine
    engines/pegasus/configure.engine
    engines/prince/configure.engine
    engines/saga/configure.engine
    engines/sci/configure.engine
    engines/scumm/configure.engine
    engines/sword1/configure.engine
    engines/sword2/configure.engine
    engines/sword25/configure.engine
    engines/toltecs/configure.engine
    engines/tony/configure.engine
    engines/toon/configure.engine
    engines/touche/configure.engine
    engines/wintermute/configure.engine
    engines/zvision/configure.engine



diff --git a/configure b/configure
index 6bc0e85..1af8c29 100755
--- a/configure
+++ b/configure
@@ -162,6 +162,7 @@ _translation=yes
 # Default platform settings
 _backend=sdl
 _16bit=auto
+_highres=auto
 _savegame_timestamp=auto
 _dynamic_modules=no
 _elf_loader=no
@@ -201,6 +202,7 @@ add_feature 16bit "16bit color" "_16bit"
 add_feature faad "libfaad" "_faad"
 add_feature flac "FLAC" "_flac"
 add_feature freetype2 "FreeType2" "_freetype2"
+add_feature highres "high resolution" "_highres"
 add_feature mad "MAD" "_mad"
 add_feature jpeg "JPEG" "_jpeg"
 add_feature png "PNG" "_png"
@@ -922,6 +924,7 @@ Optional Features:
   --default-dynamic        make plugins dynamic by default
   --disable-mt32emu        don't enable the integrated MT-32 emulator
   --disable-16bit          don't enable 16bit color support
+  --disable-highres        don't enable support for high resolution engines >320x240
   --disable-savegame-timestamp don't use timestamps for blank savegame descriptions
   --disable-scalers        exclude scalers
   --disable-hq-scalers     exclude HQ2x and HQ3x scalers
@@ -1019,6 +1022,8 @@ done # for parm in ...
 for ac_option in $@; do
 	case "$ac_option" in
 	--disable-16bit)          _16bit=no       ;;
+	--enable-highres)         _highres=yes    ;;
+	--disable-highres)        _highres=no     ;;
 	--disable-savegame-timestamp) _savegame_timestamp=no ;;
 	--disable-scalers)        _build_scalers=no ;;
 	--disable-hq-scalers)     _build_hq_scalers=no ;;
@@ -3210,6 +3215,26 @@ case $_backend in
 esac
 
 #
+# Enable High resolution engines (>320x240) support only for backends which support it
+#
+case $_backend in
+	gcw0)
+		if test "$_highres" = yes ; then
+			_highres=yes
+		else
+			_highres=no
+		fi
+		;;
+	*)
+		if test "$_highres" = no ; then
+			_highres=no
+		else
+			_highres=yes
+		fi
+		;;
+esac
+
+#
 # Enable Event Recorder only for backends that support it
 #
 case $_backend in
@@ -3522,6 +3547,11 @@ define_in_config_if_yes "$_mt32emu" 'USE_MT32EMU'
 define_in_config_if_yes "$_16bit" 'USE_RGB_COLOR'
 
 #
+# Check whether High resolution graphics support is requested
+#
+define_in_config_if_yes "$_highres" 'USE_HIGHRES'
+
+#
 # Check whether save games use the current time as default description
 #
 define_in_config_if_yes "$_savegame_timestamp" 'USE_SAVEGAME_TIMESTAMP'
@@ -4424,6 +4454,10 @@ if test "$_16bit" = yes ; then
 	echo_n ", 16bit color"
 fi
 
+if test "$_highres" = yes ; then
+	echo_n ", highres"
+fi
+
 if test "$_savegame_timestamp" = yes ; then
 	echo_n ", savegame timestamp"
 fi
diff --git a/engines/agos/configure.engine b/engines/agos/configure.engine
index 3ae1fb1..cd7fcf9 100644
--- a/engines/agos/configure.engine
+++ b/engines/agos/configure.engine
@@ -1,4 +1,4 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
 add_engine agos "AGOS" yes "agos2" "AGOS 1 games"
-add_engine agos2 "AGOS 2 games" yes
+add_engine agos2 "AGOS 2 games" yes "" "" "highres"
diff --git a/engines/avalanche/configure.engine b/engines/avalanche/configure.engine
index 28d6a55..9b913ff 100644
--- a/engines/avalanche/configure.engine
+++ b/engines/avalanche/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine avalanche "Lord Avalot d'Argent" no
+add_engine avalanche "Lord Avalot d'Argent" no "" "" "highres"
diff --git a/engines/composer/configure.engine b/engines/composer/configure.engine
index 71a79ac..17120a3 100644
--- a/engines/composer/configure.engine
+++ b/engines/composer/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine composer "Magic Composer" yes
+add_engine composer "Magic Composer" yes "" "" "highres"
diff --git a/engines/fullpipe/configure.engine b/engines/fullpipe/configure.engine
index a904244..611d018 100644
--- a/engines/fullpipe/configure.engine
+++ b/engines/fullpipe/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine fullpipe "Full Pipe" no "" "" "16bit"
+add_engine fullpipe "Full Pipe" no "" "" "16bit highres"
diff --git a/engines/groovie/configure.engine b/engines/groovie/configure.engine
index 212a49b..f283731 100644
--- a/engines/groovie/configure.engine
+++ b/engines/groovie/configure.engine
@@ -1,4 +1,4 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine groovie "Groovie" yes "groovie2" "7th Guest"
+add_engine groovie "Groovie" yes "groovie2" "7th Guest" "highres"
 add_engine groovie2 "Groovie 2 games" no "" "" "jpeg 16bit"
diff --git a/engines/hopkins/configure.engine b/engines/hopkins/configure.engine
index c38ecd4..cd9f50a 100644
--- a/engines/hopkins/configure.engine
+++ b/engines/hopkins/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine hopkins "Hopkins FBI" yes "" "" "16bit"
+add_engine hopkins "Hopkins FBI" yes "" "" "16bit highres"
diff --git a/engines/lastexpress/configure.engine b/engines/lastexpress/configure.engine
index 807b1a0..66bac55 100644
--- a/engines/lastexpress/configure.engine
+++ b/engines/lastexpress/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine lastexpress "The Last Express" no "" "" "16bit"
+add_engine lastexpress "The Last Express" no "" "" "16bit highres"
diff --git a/engines/mohawk/configure.engine b/engines/mohawk/configure.engine
index 47402c4..24f6dec 100644
--- a/engines/mohawk/configure.engine
+++ b/engines/mohawk/configure.engine
@@ -1,6 +1,6 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine mohawk "Mohawk" yes "cstime myst riven" "Living Books"
+add_engine mohawk "Mohawk" yes "cstime myst riven" "Living Books" "highres"
 add_engine cstime "Where in Time is Carmen Sandiego?" no
 add_engine riven "Riven: The Sequel to Myst" no "" "" "16bit"
 add_engine myst "Myst" no
diff --git a/engines/mortevielle/configure.engine b/engines/mortevielle/configure.engine
index a7fb2cc..0fe89ac 100644
--- a/engines/mortevielle/configure.engine
+++ b/engines/mortevielle/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine mortevielle "Mortevielle" yes
+add_engine mortevielle "Mortevielle" yes "" "" "highres"
diff --git a/engines/neverhood/configure.engine b/engines/neverhood/configure.engine
index 46910e2..f04e6c6 100644
--- a/engines/neverhood/configure.engine
+++ b/engines/neverhood/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine neverhood "Neverhood" yes
+add_engine neverhood "Neverhood" yes "" "" "highres"
diff --git a/engines/pegasus/configure.engine b/engines/pegasus/configure.engine
index ed7e295..650d57a 100644
--- a/engines/pegasus/configure.engine
+++ b/engines/pegasus/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine pegasus "The Journeyman Project: Pegasus Prime" yes "" "" "16bit"
+add_engine pegasus "The Journeyman Project: Pegasus Prime" yes "" "" "16bit highres"
diff --git a/engines/prince/configure.engine b/engines/prince/configure.engine
index 50740d9..827579b 100644
--- a/engines/prince/configure.engine
+++ b/engines/prince/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine prince "The Prince and The Coward" no
+add_engine prince "The Prince and The Coward" no "" "" "highres"
diff --git a/engines/saga/configure.engine b/engines/saga/configure.engine
index 99e2ab3..adb904a 100644
--- a/engines/saga/configure.engine
+++ b/engines/saga/configure.engine
@@ -1,5 +1,5 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
 add_engine saga "SAGA" yes "ihnm saga2" "ITE"
-add_engine ihnm "IHNM" yes
-add_engine saga2 "SAGA 2 games" no
+add_engine ihnm "IHNM" yes "" "" "highres"
+add_engine saga2 "SAGA 2 games" no "" "" "highres"
diff --git a/engines/sci/configure.engine b/engines/sci/configure.engine
index d1c45a4..f8a5190 100644
--- a/engines/sci/configure.engine
+++ b/engines/sci/configure.engine
@@ -1,4 +1,4 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
 add_engine sci "SCI" yes "sci32" "SCI 0-1.1 games"
-add_engine sci32 "SCI32 games" no
+add_engine sci32 "SCI32 games" no "" "" "highres"
diff --git a/engines/scumm/configure.engine b/engines/scumm/configure.engine
index e1de788..e8962a3 100644
--- a/engines/scumm/configure.engine
+++ b/engines/scumm/configure.engine
@@ -2,4 +2,4 @@
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
 add_engine scumm "SCUMM" yes "scumm_7_8 he" "v0-v6 games"
 add_engine scumm_7_8 "v7 & v8 games" yes
-add_engine he "HE71+ games" yes
+add_engine he "HE71+ games" yes "" "" "highres"
diff --git a/engines/sword1/configure.engine b/engines/sword1/configure.engine
index 0578d17..1d17903 100644
--- a/engines/sword1/configure.engine
+++ b/engines/sword1/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine sword1 "Broken Sword" yes
+add_engine sword1 "Broken Sword" yes "" "" "highres"
diff --git a/engines/sword2/configure.engine b/engines/sword2/configure.engine
index 7153605..a794e72 100644
--- a/engines/sword2/configure.engine
+++ b/engines/sword2/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine sword2 "Broken Sword II" yes
+add_engine sword2 "Broken Sword II" yes "" "" "highres"
diff --git a/engines/sword25/configure.engine b/engines/sword25/configure.engine
index 6a9428c..f805483 100644
--- a/engines/sword25/configure.engine
+++ b/engines/sword25/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine sword25 "Broken Sword 2.5" yes "" "" "png zlib 16bit"
+add_engine sword25 "Broken Sword 2.5" yes "" "" "png zlib 16bit highres"
diff --git a/engines/toltecs/configure.engine b/engines/toltecs/configure.engine
index be5533e..8310a6d 100644
--- a/engines/toltecs/configure.engine
+++ b/engines/toltecs/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine toltecs "3 Skulls of the Toltecs" yes
+add_engine toltecs "3 Skulls of the Toltecs" yes "" "" "highres"
diff --git a/engines/tony/configure.engine b/engines/tony/configure.engine
index f85f45d..2df4434 100644
--- a/engines/tony/configure.engine
+++ b/engines/tony/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit"
+add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit highres"
diff --git a/engines/toon/configure.engine b/engines/toon/configure.engine
index 00c98f7..689bce1 100644
--- a/engines/toon/configure.engine
+++ b/engines/toon/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine toon "Toonstruck" yes
+add_engine toon "Toonstruck" yes "" "" "highres"
diff --git a/engines/touche/configure.engine b/engines/touche/configure.engine
index 777578e..f35940e 100644
--- a/engines/touche/configure.engine
+++ b/engines/touche/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes
+add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes "" "" "highres"
diff --git a/engines/wintermute/configure.engine b/engines/wintermute/configure.engine
index bdaf49d..5538577 100644
--- a/engines/wintermute/configure.engine
+++ b/engines/wintermute/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine wintermute "Wintermute" yes "" "" "jpeg png zlib vorbis 16bit"
+add_engine wintermute "Wintermute" yes "" "" "jpeg png zlib vorbis 16bit highres"
diff --git a/engines/zvision/configure.engine b/engines/zvision/configure.engine
index 226870c..8681522 100644
--- a/engines/zvision/configure.engine
+++ b/engines/zvision/configure.engine
@@ -1,3 +1,3 @@
 # This file is included from the main "configure" script
 # add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps]
-add_engine zvision "Z-Vision" yes "" "" "freetype2 16bit"
+add_engine zvision "Z-Vision" yes "" "" "freetype2 16bit highres"


Commit: 2cef763544888ddff3e0327e598f5de9273fd65c
    https://github.com/scummvm/scummvm/commit/2cef763544888ddff3e0327e598f5de9273fd65c
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2016-03-09T15:52:43+01:00

Commit Message:
CONFIGURE: Error out when host-os is msys.

The msys shell can be run in both msys and in mingw mode. We don't
support it when in msys mode, as this mode seems to be intended as a
cygwin-like compatibility layer, instead of for native Windows
applications.

Changed paths:
    configure



diff --git a/configure b/configure
index 1af8c29..88b8456 100755
--- a/configure
+++ b/configure
@@ -2443,6 +2443,10 @@ case $_host_os in
 	mint*)
 		append_var DEFINES "-DSYSTEM_NOT_SUPPORTING_D_TYPE"
 		;;
+	msys)
+		echo ERROR: Using the MSYS shell in msys mode is not supported. Please use the MSYS shell in mingw mode instead.
+		exit 1
+		;;
 	n64)
 		append_var DEFINES "-D__N64__"
 		append_var DEFINES "-DLIMIT_FPS"


Commit: 9dbde8376426c7f0cbf4613981480bba6c77102f
    https://github.com/scummvm/scummvm/commit/9dbde8376426c7f0cbf4613981480bba6c77102f
Author: Bendegúz (bendeguz.nagy.rf at gmail.com)
Date: 2016-03-09T15:52:51+01:00

Commit Message:
LAB: Process events during ending sequence

LAB: Fix bug #7022 - Events not processed during ending sequence

Changed paths:
    engines/lab/processroom.cpp



diff --git a/engines/lab/processroom.cpp b/engines/lab/processroom.cpp
index 44c8d65..5093e8e 100644
--- a/engines/lab/processroom.cpp
+++ b/engines/lab/processroom.cpp
@@ -238,6 +238,8 @@ void LabEngine::doActions(const ActionList &actionList) {
 	ActionList::const_iterator action;
 	for (action = actionList.begin(); action != actionList.end(); ++action) {
 		updateEvents();
+		if (_quitLab || shouldQuit())
+			return;
 
 		switch (action->_actionType) {
 		case kActionPlaySound:
@@ -381,6 +383,8 @@ void LabEngine::doActions(const ActionList &actionList) {
 
 				while (_system->getMillis() < targetMillis) {
 					updateEvents();
+					if (_quitLab || shouldQuit())
+						return;
 					_anim->diffNextFrame();
 				}
 			}
@@ -409,6 +413,8 @@ void LabEngine::doActions(const ActionList &actionList) {
 		case kActionWaitSound:	// used in scene 44 (heart of the labyrinth / ending)
 			while (_music->isSoundEffectActive()) {
 				updateEvents();
+				if (_quitLab || shouldQuit())
+					return;
 				_anim->diffNextFrame();
 				waitTOF();
 			}


Commit: 70c42a797c01f720a82e18a338e49e7c27c8dd63
    https://github.com/scummvm/scummvm/commit/70c42a797c01f720a82e18a338e49e7c27c8dd63
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-09T15:53:23+01:00

Commit Message:
LAB: Remove gap handling from removeSaveState.

This removes the annoying behavior that removing a save state causes your
physical files to be renamed.

Changed paths:
    engines/lab/detection.cpp



diff --git a/engines/lab/detection.cpp b/engines/lab/detection.cpp
index f1083be..4e58172 100644
--- a/engines/lab/detection.cpp
+++ b/engines/lab/detection.cpp
@@ -196,26 +196,7 @@ int LabMetaEngine::getMaximumSaveSlot() const {
 
 void LabMetaEngine::removeSaveState(const char *target, int slot) const {
 	Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
-	Common::String filename = Common::String::format("%s.%03u", target, slot);
-
-	saveFileMan->removeSavefile(filename.c_str());
-
-	Common::StringArray filenames;
-	Common::String pattern = target;
-	pattern += ".###";
-	filenames = saveFileMan->listSavefiles(pattern.c_str());
-	Common::sort(filenames.begin(), filenames.end());   // Sort (hopefully ensuring we are sorted numerically..)
-
-	for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) {
-		// Obtain the last 3 digits of the filename, since they correspond to the save slot
-		int slotNum = atoi(file->c_str() + file->size() - 3);
-
-		// Rename every slot greater than the deleted slot,
-		if (slotNum > slot) {
-			saveFileMan->renameSavefile(file->c_str(), filename.c_str());
-			filename = Common::String::format("%s.%03u", target, ++slot);
-		}
-	}
+	saveFileMan->removeSavefile(Common::String::format("%s.%03u", target, slot));
 }
 
 SaveStateDescriptor LabMetaEngine::querySaveMetaInfos(const char *target, int slot) const {


Commit: 1b089f8492f27ed88aef0bb57f088338de1133b0
    https://github.com/scummvm/scummvm/commit/1b089f8492f27ed88aef0bb57f088338de1133b0
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-03-09T15:53:33+01:00

Commit Message:
SWORD25: Add engine option to use English speech instead of German

When selecting non-English language, the scripts default to using
German voices. This commit edits the file path on the fly to use instead
English voices for all languages other than German. This implements bug
#6804 - SWORD25: add option to choose language speech.

If the English voice pack is not present it falls back to using German voices.

The way this is implemented here however does not allow to use German
voices with English text or English voices with German text. This could be
achieved with a slightly different implementation of the same idea.

Changed paths:
  A engines/sword25/POTFILES
    engines/sword25/detection.cpp
    engines/sword25/package/packagemanager.cpp
    engines/sword25/package/packagemanager.h



diff --git a/engines/sword25/POTFILES b/engines/sword25/POTFILES
new file mode 100644
index 0000000..f4b0e6f
--- /dev/null
+++ b/engines/sword25/POTFILES
@@ -0,0 +1 @@
+engines/sword25/detection.cpp
diff --git a/engines/sword25/detection.cpp b/engines/sword25/detection.cpp
index df68d11..175261a 100644
--- a/engines/sword25/detection.cpp
+++ b/engines/sword25/detection.cpp
@@ -21,6 +21,7 @@
  */
 
 #include "base/plugins.h"
+#include "common/translation.h"
 #include "engines/advancedDetector.h"
 
 #include "sword25/sword25.h"
@@ -41,6 +42,13 @@ static const char *directoryGlobs[] = {
 	0
 };
 
+static const ExtraGuiOption sword25ExtraGuiOption = {
+	_s("Use English speech"),
+	_s("Use English speech instead of German for every language other than German"),
+	"english_speech",
+	false
+};
+
 class Sword25MetaEngine : public AdvancedMetaEngine {
 public:
 	Sword25MetaEngine() : AdvancedMetaEngine(Sword25::gameDescriptions, sizeof(ADGameDescription), sword25Game) {
@@ -58,6 +66,7 @@ public:
 
 	virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
 	virtual bool hasFeature(MetaEngineFeature f) const;
+	virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const;
 	virtual int getMaximumSaveSlot() const { return Sword25::PersistenceService::getSlotCount(); }
 	virtual SaveStateList listSaves(const char *target) const;
 };
@@ -74,6 +83,12 @@ bool Sword25MetaEngine::hasFeature(MetaEngineFeature f) const {
 		(f == kSupportsListSaves);
 }
 
+const ExtraGuiOptions Sword25MetaEngine::getExtraGuiOptions(const Common::String &target) const {
+	ExtraGuiOptions options;
+	options.push_back(sword25ExtraGuiOption);
+	return options;
+}
+
 SaveStateList Sword25MetaEngine::listSaves(const char *target) const {
 	Common::String pattern = target;
 	pattern = pattern + ".???";
diff --git a/engines/sword25/package/packagemanager.cpp b/engines/sword25/package/packagemanager.cpp
index 2db4f2d..457dda6 100644
--- a/engines/sword25/package/packagemanager.cpp
+++ b/engines/sword25/package/packagemanager.cpp
@@ -56,7 +56,8 @@ static Common::String normalizePath(const Common::String &path, const Common::St
 
 PackageManager::PackageManager(Kernel *pKernel) : Service(pKernel),
 	_currentDirectory(PATH_SEPARATOR),
-	_rootFolder(ConfMan.get("path")) {
+	_rootFolder(ConfMan.get("path")),
+	_useEnglishSpeech(ConfMan.getBool("english_speech")) {
 	if (!registerScriptBindings())
 		error("Script bindings could not be registered.");
 	else
@@ -71,14 +72,34 @@ PackageManager::~PackageManager() {
 
 }
 
+Common::String PackageManager::ensureSpeechLang(const Common::String &fileName) {
+	if (!_useEnglishSpeech || fileName.size() < 9 || !fileName.hasPrefix("/speech/"))
+		return fileName;
+	
+	// Always keep German speech as a fallback in case the English speech pack is not present.
+	// However this means we cannot play with German text and English voice.
+	if (fileName.hasPrefix("/speech/de"))
+		return fileName;
+
+	Common::String newFileName = "/speech/en";
+	int fileIdx = 9;
+	while (fileIdx < fileName.size() && fileName[fileIdx] != '/')
+		++fileIdx;
+	if (fileIdx < fileName.size())
+		newFileName += fileName.c_str() + fileIdx;
+
+	return newFileName;
+}
+
 /**
  * Scans through the archive list for a specified file
  */
 Common::ArchiveMemberPtr PackageManager::getArchiveMember(const Common::String &fileName) {
+	Common::String fileName2 = ensureSpeechLang(fileName);
 	// Loop through checking each archive
 	Common::List<ArchiveEntry *>::iterator i;
 	for (i = _archiveList.begin(); i != _archiveList.end(); ++i) {
-		if (!fileName.hasPrefix((*i)->_mountPath)) {
+		if (!fileName2.hasPrefix((*i)->_mountPath)) {
 			// The mount path is in different subtree. Skipping
 			continue;
 		}
@@ -87,7 +108,7 @@ Common::ArchiveMemberPtr PackageManager::getArchiveMember(const Common::String &
 		Common::Archive *archiveFolder = (*i)->archive;
 
 		// Construct relative path
-		Common::String resPath(&fileName.c_str()[(*i)->_mountPath.size()]);
+		Common::String resPath(&fileName2.c_str()[(*i)->_mountPath.size()]);
 
 		if (archiveFolder->hasFile(resPath)) {
 			return archiveFolder->getMember(resPath);
@@ -203,23 +224,29 @@ bool PackageManager::changeDirectory(const Common::String &directory) {
 }
 
 Common::String PackageManager::getAbsolutePath(const Common::String &fileName) {
-	return normalizePath(fileName, _currentDirectory);
+	return normalizePath(ensureSpeechLang(fileName), _currentDirectory);
 }
 
 bool PackageManager::fileExists(const Common::String &fileName) {
 	// FIXME: The current Zip implementation doesn't support getting a folder entry, which is needed for detecting
-	// the English voick pack
-	if (fileName == "/speech/en") {
+	// the English voice pack
+	Common::String fileName2 = ensureSpeechLang(fileName);
+	if (fileName2 == "/speech/en") {
 		// To get around this, change to detecting one of the files in the folder
-		return getArchiveMember(normalizePath(fileName + "/APO0001.ogg", _currentDirectory));
+		bool exists = getArchiveMember(normalizePath(fileName2 + "/APO0001.ogg", _currentDirectory));
+		if (!exists && _useEnglishSpeech) {
+			_useEnglishSpeech = false;
+			warning("English speech not found");
+		}
+		return exists;
 	}
 
-	Common::ArchiveMemberPtr fileNode = getArchiveMember(normalizePath(fileName, _currentDirectory));
+	Common::ArchiveMemberPtr fileNode = getArchiveMember(normalizePath(fileName2, _currentDirectory));
 	return fileNode;
 }
 
 int PackageManager::doSearch(Common::ArchiveMemberList &list, const Common::String &filter, const Common::String &path, uint typeFilter) {
-	Common::String normalizedFilter = normalizePath(filter, _currentDirectory);
+	Common::String normalizedFilter = normalizePath(ensureSpeechLang(filter), _currentDirectory);
 	int num = 0;
 
 	if (path.size() > 0)
diff --git a/engines/sword25/package/packagemanager.h b/engines/sword25/package/packagemanager.h
index a1806a4..5475cb0 100644
--- a/engines/sword25/package/packagemanager.h
+++ b/engines/sword25/package/packagemanager.h
@@ -87,6 +87,9 @@ private:
 	Common::String _currentDirectory;
 	Common::FSNode _rootFolder;
 	Common::List<ArchiveEntry *> _archiveList;
+	
+	bool _useEnglishSpeech;
+	Common::String ensureSpeechLang(const Common::String &fileName);
 
 	Common::ArchiveMemberPtr getArchiveMember(const Common::String &fileName);
 


Commit: 7d1d1dac06d1cd467a06b63a19ca2af8623f32a1
    https://github.com/scummvm/scummvm/commit/7d1d1dac06d1cd467a06b63a19ca2af8623f32a1
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2016-03-09T15:53:41+01:00

Commit Message:
SCUMM: Fix bugs #7070, #7071.

When adding support for Russian fan translations the font source data was
accidentally switched to the Russian font data for all game versions, not just
the Russian one. Now we only use the Russian font data only for the Russian
versions.

Bug #7071 "MM V2: Umlauts disappeared in German versions" is a regression from
556d65713b8ed50c734b2466529cb1c4ac44cf36.

Bug #7070 "ZAK V2: Umlauts disappeared in German versions" is a regression from
c809a65b93d23aa30296f7f22ef4b160f628b9aa.

Changed paths:
    engines/scumm/charset-fontdata.cpp



diff --git a/engines/scumm/charset-fontdata.cpp b/engines/scumm/charset-fontdata.cpp
index 23e89b1..a1e92a9 100644
--- a/engines/scumm/charset-fontdata.cpp
+++ b/engines/scumm/charset-fontdata.cpp
@@ -591,35 +591,40 @@ CharsetRendererV2::CharsetRendererV2(ScummEngine *vm, Common::Language language)
 	_fontHeight = 8;
 	_curId = 0;
 
-	const byte *replacementData = NULL;
+	const byte *replacementMap = NULL, *replacementData = NULL;
 	int replacementChars = 0;
 
 	switch (language) {
 	case Common::DE_DEU:
 		if (_vm->_game.version == 0) {
-			replacementData = germanCharsetDataV0;
+			replacementMap = germanCharsetDataV0;
 			replacementChars = sizeof(germanCharsetDataV0) / 2;
 		} else {
-			replacementData = germanCharsetDataV2;
+			replacementMap = germanCharsetDataV2;
 			replacementChars = sizeof(germanCharsetDataV2) / 2;
 		}
+		replacementData = specialCharsetData;
 		break;
 	case Common::FR_FRA:
-		replacementData = frenchCharsetDataV2;
+		replacementMap = frenchCharsetDataV2;
 		replacementChars = sizeof(frenchCharsetDataV2) / 2;
+		replacementData = specialCharsetData;
 		break;
 	case Common::IT_ITA:
-		replacementData = italianCharsetDataV2;
+		replacementMap = italianCharsetDataV2;
 		replacementChars = sizeof(italianCharsetDataV2) / 2;
+		replacementData = specialCharsetData;
 		break;
 	case Common::ES_ESP:
-		replacementData = spanishCharsetDataV2;
+		replacementMap = spanishCharsetDataV2;
 		replacementChars = sizeof(spanishCharsetDataV2) / 2;
+		replacementData = specialCharsetData;
 		break;
 	case Common::RU_RUS:
 		if (((_vm->_game.id == GID_MANIAC) || (_vm->_game.id == GID_ZAK)) && (_vm->_game.version == 2)) {
-			replacementData = russCharsetDataV2;
+			replacementMap = russCharsetDataV2;
 			replacementChars = sizeof(russCharsetDataV2) / 2;
+			replacementData = russianCharsetDataV2;
 		} else {
 			_fontPtr = russianCharsetDataV2;
 		}
@@ -629,20 +634,16 @@ CharsetRendererV2::CharsetRendererV2(ScummEngine *vm, Common::Language language)
 		break;
 	}
 
-	if (replacementData) {
+	if (replacementMap && replacementData) {
 		_fontPtr = new byte[sizeof(englishCharsetDataV2)];
 		_deleteFontPtr = true;
 		memcpy(const_cast<byte *>(_fontPtr), englishCharsetDataV2, sizeof(englishCharsetDataV2));
 
 		for (int i = 0; i < replacementChars; i++) {
-			int ch1 = replacementData[2 * i];
-			int ch2 = replacementData[2 * i + 1];
+			int ch1 = replacementMap[2 * i];
+			int ch2 = replacementMap[2 * i + 1];
 
-			if (((_vm->_game.id == GID_MANIAC) || (_vm->_game.id == GID_ZAK)) && (_vm->_game.version == 2)) {
-				memcpy(const_cast<byte *>(_fontPtr) + 8 * ch1, russianCharsetDataV2 + 8 * ch2, 8);
-			} else {
-				memcpy(const_cast<byte *>(_fontPtr) + 8 * ch1, specialCharsetData + 8 * ch2, 8);
-			}
+			memcpy(const_cast<byte *>(_fontPtr) + 8 * ch1, replacementData + 8 * ch2, 8);
 		}
 	} else
 		_deleteFontPtr = false;


Commit: 9474459224f9adebd2d261606b040aa14b11108c
    https://github.com/scummvm/scummvm/commit/9474459224f9adebd2d261606b040aa14b11108c
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-03-09T15:53:50+01:00

Commit Message:
SWORD25: Fix error after changing language in-game with the data file distributed by ScummVM

Changing the language in-game causes the language to be set for the target in the
scummvm.ini file. Then the next time we try to start the engine, if was causing an error
(Sword25 failed to instantiate engine: Game data not found) because there was no match
for the path and language in the detection table. Setting the language to Unknown in
the detection table for this multilingual data file fixes the issue.

Changed paths:
    engines/sword25/detection_tables.h



diff --git a/engines/sword25/detection_tables.h b/engines/sword25/detection_tables.h
index fa79bde..927060b 100644
--- a/engines/sword25/detection_tables.h
+++ b/engines/sword25/detection_tables.h
@@ -132,11 +132,14 @@ static const ADGameDescription gameDescriptions[] = {
 
 	// Distributed by ScummVM
 	// Contains all language packs, English voice-overs and Hungarian version
+	// Mark it as Unknown Language since it contains multiple languages. If we
+	// mark it as English, then changing the language in-game causes the detection
+	// to fail the next time we try to start the engine.
 	{
 		"sword25",
 		"Latest version",
 		AD_ENTRY1s("data.b25c", "880a8a67faf4a4e7ab62cf114b771428", 827397764),
-		Common::EN_ANY,
+		Common::UNK_LANG,
 		Common::kPlatformUnknown,
 		ADGF_NO_FLAGS,
 		GUIO1(GUIO_NOASPECT)






More information about the Scummvm-git-logs mailing list