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

megath at users.sourceforge.net megath at users.sourceforge.net
Wed Jan 6 21:49:16 CET 2010


Revision: 47095
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47095&view=rev
Author:   megath
Date:     2010-01-06 20:49:16 +0000 (Wed, 06 Jan 2010)

Log Message:
-----------
better z-ordering for the mark's animation

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

Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp	2010-01-06 20:39:17 UTC (rev 47094)
+++ scummvm/trunk/engines/teenagent/scene.cpp	2010-01-06 20:49:16 UTC (rev 47095)
@@ -663,15 +663,24 @@
 		Common::sort(z_order.begin(), z_order.end(), ZOrderCmp());
 		Common::List<Surface *>::iterator z_order_it;
 
+		Surface *mark = actor_animation.currentFrame(game_delta);
+		int horizon = mark != NULL? mark->y + mark->h: position.y;
+
 		for(z_order_it = z_order.begin(); z_order_it != z_order.end(); ++z_order_it) {
 			Surface *s = *z_order_it;
-			if (s->y + s->h > position.y)
+			if (s->y + s->h > horizon)
 				break;
 			s->render(surface);
 		}
 
-		Surface *mark = actor_animation.currentFrame(game_delta);
-		if (!hide_actor && mark == NULL) {
+		if (mark != NULL) {
+			actor_animation_position = mark->render(surface);
+			if (!actor_animation.ignore) 
+				busy = true;
+			else 
+				busy = false;
+			got_any_animation = true;
+		} else if (!hide_actor) {
 			actor_animation.free();
 			uint zoom = lookupZoom(position.y);
 
@@ -739,14 +748,6 @@
 			Surface *s = *z_order_it;
 			s->render(surface);
 		}
-		if (mark != NULL) {
-			actor_animation_position = mark->render(surface);
-			if (!actor_animation.ignore) 
-				busy = true;
-			else 
-				busy = false;
-			got_any_animation = true;
-		}
 
 		if (!message.empty()) {
 			bool visible = true;


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