[Scummvm-cvs-logs] SF.net SVN: scummvm:[45780] scummvm/trunk/engines/teenagent/scene.cpp

megath at users.sourceforge.net megath at users.sourceforge.net
Mon Nov 9 22:26:07 CET 2009


Revision: 45780
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45780&view=rev
Author:   megath
Date:     2009-11-09 21:26:07 +0000 (Mon, 09 Nov 2009)

Log Message:
-----------
added special case of loadScene

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/scene.cpp

Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp	2009-11-09 17:51:20 UTC (rev 45779)
+++ scummvm/trunk/engines/teenagent/scene.cpp	2009-11-09 21:26:07 UTC (rev 45780)
@@ -376,7 +376,10 @@
 			return true;
 		}
 
-		system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h);
+		if (background.pixels)
+			system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h);
+		else
+			system->fillScreen(0);
 
 		Graphics::Surface *surface = system->lockScreen();
 
@@ -590,8 +593,20 @@
 		break;
 
 		case SceneEvent::kLoadScene: {
-			init(current_event.scene, current_event.dst);
-			sounds.clear();
+			if (current_event.scene != 0) {
+				init(current_event.scene, current_event.dst);
+				sounds.clear();
+			} else {
+				//special case, empty scene
+				background.free();
+				on.free();
+				delete[] ons;
+				ons = NULL;
+				for (byte i = 0; i < 4; ++i) {
+					animation[i].free();
+					custom_animation[i].free();
+				}
+			}
 			current_event.clear();
 		}
 		break;


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