[Scummvm-cvs-logs] scummvm master -> e47425aaf58cff34343f76f6e7d5745b4ba95622

bluegr bluegr at gmail.com
Fri Oct 5 23:15:18 CEST 2012


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

Summary:
650df5a16c TOLTECS: Remove redundant screen updates
e47425aaf5 TOLTECS: Wait a bit after drawing each frame


Commit: 650df5a16c601bfb442d8e0355acbfdab3d4c99e
    https://github.com/scummvm/scummvm/commit/650df5a16c601bfb442d8e0355acbfdab3d4c99e
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-10-05T14:12:53-07:00

Commit Message:
TOLTECS: Remove redundant screen updates

Changed paths:
    engines/toltecs/script.cpp



diff --git a/engines/toltecs/script.cpp b/engines/toltecs/script.cpp
index 03a2b66..caa7410 100644
--- a/engines/toltecs/script.cpp
+++ b/engines/toltecs/script.cpp
@@ -183,10 +183,7 @@ void ScriptInterpreter::setMainScript(uint slotIndex) {
 }
 
 void ScriptInterpreter::runScript() {
-	uint32 lastScreenUpdate = 0;
-
 	while (!_vm->shouldQuit()) {
-
 		if (_vm->_movieSceneFlag)
 			_vm->_mouseButton = 0;
 
@@ -217,17 +214,7 @@ void ScriptInterpreter::runScript() {
 
 		byte opcode = readByte();
 		execOpcode(opcode);
-
-		// Update the screen at semi-regular intervals, else the mouse
-		// cursor will be jerky.
-		uint32 now = _vm->_system->getMillis();
-		if (now < lastScreenUpdate || now - lastScreenUpdate > 10) {
-			_vm->_system->updateScreen();
-			lastScreenUpdate = _vm->_system->getMillis();
-		}
-
 	}
-
 }
 
 byte ScriptInterpreter::readByte() {


Commit: e47425aaf58cff34343f76f6e7d5745b4ba95622
    https://github.com/scummvm/scummvm/commit/e47425aaf58cff34343f76f6e7d5745b4ba95622
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-10-05T14:13:50-07:00

Commit Message:
TOLTECS: Wait a bit after drawing each frame

This reduces the CPU load considerably (it's around 10% now, down from 50%)

Changed paths:
    engines/toltecs/toltecs.cpp



diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp
index 71264a6..9f3a10a 100644
--- a/engines/toltecs/toltecs.cpp
+++ b/engines/toltecs/toltecs.cpp
@@ -311,6 +311,7 @@ void ToltecsEngine::drawScreen() {
 	}
 
 	_system->updateScreen();
+	_system->delayMillis(10);
 
 	updateCamera();
 }






More information about the Scummvm-git-logs mailing list