[Scummvm-cvs-logs] scummvm master -> 4a7532fb227d0325a1ae30c72155c642e2c55a4b

fuzzie fuzzie at fuzzie.org
Tue Aug 23 23:20:47 CEST 2011


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

Summary:
ee58dc522e COMPOSER: Replace install.inf with book.ini in some detection entries.
b777a2f7b9 COMPOSER: Remove broken quitGame call.
fca52e0514 COMPOSER: Another attempt to fix timing issues.
4a7532fb22 COMPOSER: Change a common warning to use debug().


Commit: ee58dc522e16aff7f5e6f1122d44b08edb43e486
    https://github.com/scummvm/scummvm/commit/ee58dc522e16aff7f5e6f1122d44b08edb43e486
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-08-23T14:11:49-07:00

Commit Message:
COMPOSER: Replace install.inf with book.ini in some detection entries.

Changed paths:
    engines/composer/detection.cpp



diff --git a/engines/composer/detection.cpp b/engines/composer/detection.cpp
index 8c97b6c..d6df942 100644
--- a/engines/composer/detection.cpp
+++ b/engines/composer/detection.cpp
@@ -84,7 +84,7 @@ static const ComposerGameDescription gameDescriptions[] = {
 		{
 			"liam",
 			0,
-			AD_ENTRY1("install.inf", "320d2f1d4f8dd96947676ae25d6688c6"),
+			AD_ENTRY1s("book.ini", "fc9d9b9e72e7301d011b808606eaa15b", 834),
 			Common::EN_ANY,
 			Common::kPlatformWindows,
 			ADGF_NO_FLAGS,
@@ -111,7 +111,11 @@ static const ComposerGameDescription gameDescriptions[] = {
 		{
 			"darby",
 			0,
-			AD_ENTRY1("install.inf", "e83cc20ee18a2e138da1aadfc640dff2"),
+			{
+				{"book.ini", 0, "7e3404c559d058521fff2aebe5c427a8", 2545},
+				{"page99.rsc", 0, "49cc6b16caa1c5ec7d94a3c47eed9a02", 1286480},
+				AD_LISTEND
+			},
 			Common::EN_ANY,
 			Common::kPlatformWindows,
 			ADGF_NO_FLAGS,
@@ -137,7 +141,11 @@ static const ComposerGameDescription gameDescriptions[] = {
 		{
 			"gregory",
 			0,
-			AD_ENTRY1("install.inf", "b7e9d6f7949d412dad0a183375069844"),
+			{
+				{"book.ini", 0, "14a562dcf361773445255af9f3e94790", 2234},
+				{"page99.rsc", 0, "01f9381162467e052dfd4c704169ef3e", 388644},
+				AD_LISTEND
+			},
 			Common::EN_ANY,
 			Common::kPlatformWindows,
 			ADGF_NO_FLAGS,
@@ -192,10 +200,19 @@ static const ComposerGameDescription gameDescriptions[] = {
 
 using namespace Composer;
 
+// we match from data too, to stop detection from a non-top-level directory
+const static char *directoryGlobs[] = {
+	"data",
+	"programs",
+	0
+};
+
 class ComposerMetaEngine : public AdvancedMetaEngine {
 public:
 	ComposerMetaEngine() : AdvancedMetaEngine(Composer::gameDescriptions, sizeof(Composer::ComposerGameDescription), composerGames) {
 		_singleid = "composer";
+		_maxScanDepth = 2;
+		_directoryGlobs = directoryGlobs;
 	}
 
 	virtual const char *getName() const {


Commit: b777a2f7b98bbccc5c723f5c40cb64e03f1bbba4
    https://github.com/scummvm/scummvm/commit/b777a2f7b98bbccc5c723f5c40cb64e03f1bbba4
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-08-23T14:13:02-07:00

Commit Message:
COMPOSER: Remove broken quitGame call.

Changed paths:
    engines/composer/composer.cpp



diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index d9bb0cd..c31111a 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -176,11 +176,6 @@ Common::Error ComposerEngine::run() {
 				onKeyDown(event.kbd.keycode);
 				break;
 
-			case Common::EVENT_QUIT:
-			case Common::EVENT_RTL:
-				quitGame();
-				break;
-
 			default:
 				break;
 			}


Commit: fca52e05148f350ee31f9921f260404fad03152d
    https://github.com/scummvm/scummvm/commit/fca52e05148f350ee31f9921f260404fad03152d
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-08-23T14:13:18-07:00

Commit Message:
COMPOSER: Another attempt to fix timing issues.

Changed paths:
    engines/composer/composer.cpp
    engines/composer/composer.h
    engines/composer/scripting.cpp



diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index c31111a..45ca714 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -97,9 +97,13 @@ Common::Error ComposerEngine::run() {
 
 	loadLibrary(0);
 
+	_currentTime = 0;
+	_lastTime = 0;
+
 	uint fps = atoi(getStringFromConfig("Common", "FPS").c_str());
 	uint frameTime = 1000 / fps;
 	uint32 lastDrawTime = 0;
+
 	while (!shouldQuit()) {
 		for (uint i = 0; i < _pendingPageChanges.size(); i++) {
 			if (_pendingPageChanges[i]._remove)
@@ -112,15 +116,24 @@ Common::Error ComposerEngine::run() {
 		_pendingPageChanges.clear();
 
 		uint32 thisTime = _system->getMillis();
+		// maintain our own internal timing, since otherwise we get
+		// confused when starved of CPU (for example when the user
+		// is dragging the scummvm window around)
+		if (thisTime > _lastTime + frameTime)
+			_currentTime += frameTime;
+		else
+			_currentTime += thisTime - _lastTime;
+		_lastTime = thisTime;
+
 		for (uint i = 0; i < _queuedScripts.size(); i++) {
 			QueuedScript &script = _queuedScripts[i];
 			if (!script._count)
 				continue;
-			if (script._baseTime + script._duration > thisTime)
+			if (script._baseTime + script._duration > _currentTime)
 				continue;
 			if (script._count != 0xffffffff)
 				script._count--;
-			script._baseTime = thisTime;
+			script._baseTime = _currentTime;
 			runScript(script._scriptId, i, 0, 0);
 		}
 
diff --git a/engines/composer/composer.h b/engines/composer/composer.h
index c0d456d..03e895b 100644
--- a/engines/composer/composer.h
+++ b/engines/composer/composer.h
@@ -140,6 +140,8 @@ private:
 	Audio::QueuingAudioStream *_audioStream;
 	uint16 _currSoundPriority;
 
+	uint32 _currentTime, _lastTime;
+
 	bool _needsUpdate;
 	Common::Array<Common::Rect> _dirtyRects;
 	Graphics::Surface _surface;
diff --git a/engines/composer/scripting.cpp b/engines/composer/scripting.cpp
index d85bd52..83b6336 100644
--- a/engines/composer/scripting.cpp
+++ b/engines/composer/scripting.cpp
@@ -531,7 +531,7 @@ int16 ComposerEngine::scriptFuncCall(uint16 id, int16 param1, int16 param2, int1
 		return 0;
 	case kFuncQueueScript:
 		debug(3, "kFuncQueueScript(%d, %d, %d)", param1, param2, param3);
-		_queuedScripts[param1]._baseTime = _system->getMillis();
+		_queuedScripts[param1]._baseTime = _currentTime;
 		_queuedScripts[param1]._duration = 10 * param2;
 		_queuedScripts[param1]._count = 0xffffffff;
 		_queuedScripts[param1]._scriptId = param3;
@@ -642,7 +642,7 @@ int16 ComposerEngine::scriptFuncCall(uint16 id, int16 param1, int16 param2, int1
 		return 1;
 	case kFuncQueueScriptOnce:
 		debug(3, "kFuncQueueScriptOnce(%d, %d, %d)", param1, param2, param3);
-		_queuedScripts[param1]._baseTime = _system->getMillis();
+		_queuedScripts[param1]._baseTime = _currentTime;
 		_queuedScripts[param1]._duration = 10 * param2;
 		_queuedScripts[param1]._count = 1;
 		_queuedScripts[param1]._scriptId = param3;


Commit: 4a7532fb227d0325a1ae30c72155c642e2c55a4b
    https://github.com/scummvm/scummvm/commit/4a7532fb227d0325a1ae30c72155c642e2c55a4b
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-08-23T14:13:34-07:00

Commit Message:
COMPOSER: Change a common warning to use debug().

Changed paths:
    engines/composer/scripting.cpp



diff --git a/engines/composer/scripting.cpp b/engines/composer/scripting.cpp
index 83b6336..1989919 100644
--- a/engines/composer/scripting.cpp
+++ b/engines/composer/scripting.cpp
@@ -160,7 +160,7 @@ void ComposerEngine::setArg(uint16 arg, uint16 type, uint16 val) {
 
 void ComposerEngine::runScript(uint16 id) {
 	if (!hasResource(ID_SCRP, id)) {
-		warning("ignoring attempt to run script %d, because it doesn't exist", id);
+		debug(1, "ignoring attempt to run script %d, because it doesn't exist", id);
 		return;
 	}
 






More information about the Scummvm-git-logs mailing list