[Scummvm-cvs-logs] SF.net SVN: scummvm: [23790] scummvm/trunk/engines/sword1

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Mon Aug 28 06:53:26 CEST 2006


Revision: 23790
Author:   eriktorbjorn
Date:     2006-08-27 21:53:21 -0700 (Sun, 27 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=23790&view=rev

Log Message:
-----------
Only clear the part of the screen usually controlled by the Screen class. The
buffer might not be large enough to cover the menu areas, and they will
probably be clear already.

Only terminate the loop, not the entire function, when pressing Esc during a
cutscene. Otherwise, there may be palette glitches.

Modified Paths:
--------------
    scummvm/trunk/engines/sword1/animation.cpp
    scummvm/trunk/engines/sword1/screen.cpp
Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp	2006-08-27 12:30:38 UTC (rev 23789)
+++ scummvm/trunk/engines/sword1/animation.cpp	2006-08-28 04:53:21 UTC (rev 23790)
@@ -191,7 +191,8 @@
 		_snd->playInputStream(Audio::Mixer::kSFXSoundType, &_bgSoundHandle, _bgSoundStream);
 	}
 	_currentFrame = 0;
-	while (decodeFrame()) {
+	bool terminated = false;
+	while (!terminated && decodeFrame()) {
 		processFrame();
 		syncFrame();
 		updateScreen();
@@ -205,7 +206,7 @@
 			case OSystem::EVENT_KEYDOWN:
 				if (event.kbd.keycode == 27) {
 					_snd->stopHandle(_bgSoundHandle);
-					return;
+					terminated = true;
 				}
 				break;
 			case OSystem::EVENT_QUIT:

Modified: scummvm/trunk/engines/sword1/screen.cpp
===================================================================
--- scummvm/trunk/engines/sword1/screen.cpp	2006-08-27 12:30:38 UTC (rev 23789)
+++ scummvm/trunk/engines/sword1/screen.cpp	2006-08-28 04:53:21 UTC (rev 23790)
@@ -68,7 +68,9 @@
 	if (_screenBuf) {
 		_fullRefresh = true;
 		memset(_screenBuf, 0, _scrnSizeX * _scrnSizeY);
-		_system->copyRectToScreen(_screenBuf, 640, 0, 0, 640, 480);
+		// The buffer isn't necessarily big enough to clear the entire
+		// screen, so the menu areas are unaffected. For now.
+		_system->copyRectToScreen(_screenBuf, SCREEN_WIDTH, 0, 40, SCREEN_WIDTH, SCREEN_DEPTH);
 	}
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list