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

megath at users.sourceforge.net megath at users.sourceforge.net
Fri Jan 1 13:14:25 CET 2010


Revision: 46816
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46816&view=rev
Author:   megath
Date:     2010-01-01 12:14:25 +0000 (Fri, 01 Jan 2010)

Log Message:
-----------
minor sizeof cleanup

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

Modified: scummvm/trunk/engines/teenagent/actor.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/actor.cpp	2010-01-01 11:44:33 UTC (rev 46815)
+++ scummvm/trunk/engines/teenagent/actor.cpp	2010-01-01 12:14:25 UTC (rev 46816)
@@ -72,13 +72,13 @@
 	case kActorLeft:
 	case kActorRight:
 		if (render_head) {
-			if (head_index >= sizeof(frames_head_left_right))
+			if (head_index >= ARRAYSIZE(frames_head_left_right))
 				head_index = 0;
 			head = frames + frames_head_left_right[head_index];
 			++head_index;
 		}
 
-		if (index >= sizeof(frames_left_right))
+		if (index >= ARRAYSIZE(frames_left_right))
 			index = 0;
 		s = frames + frames_left_right[index];
 		dx = 11;
@@ -86,13 +86,13 @@
 		break;
 	case kActorUp:
 		if (render_head) {
-			if (head_index >= sizeof(frames_head_up))
+			if (head_index >= ARRAYSIZE(frames_head_up))
 				head_index = 0;
 			head = frames + frames_head_up[head_index];
 			++head_index;
 		}
 
-		if (index >= sizeof(frames_up))
+		if (index >= ARRAYSIZE(frames_up))
 			index = 0;
 		s = frames + frames_up[index];
 		dx = 11;
@@ -100,13 +100,13 @@
 		break;
 	case kActorDown:
 		if (render_head) {
-			if (head_index >= sizeof(frames_head_down))
+			if (head_index >= ARRAYSIZE(frames_head_down))
 				head_index = 0;
 			head = frames + frames_head_down[head_index];
 			++head_index;
 		}
 
-		if (index >= sizeof(frames_down))
+		if (index >= ARRAYSIZE(frames_down))
 			index = 0;
 		s = frames + frames_down[index];
 		dx = 11;


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