[Scummvm-cvs-logs] SF.net SVN: scummvm:[33237] scummvm/trunk/engines/tinsel

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Jul 23 12:33:37 CEST 2008


Revision: 33237
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33237&view=rev
Author:   fingolfin
Date:     2008-07-23 10:33:36 +0000 (Wed, 23 Jul 2008)

Log Message:
-----------
cleanup; removed const  bNoScroll variable

Modified Paths:
--------------
    scummvm/trunk/engines/tinsel/background.cpp
    scummvm/trunk/engines/tinsel/background.h
    scummvm/trunk/engines/tinsel/object.cpp

Modified: scummvm/trunk/engines/tinsel/background.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/background.cpp	2008-07-23 10:29:37 UTC (rev 33236)
+++ scummvm/trunk/engines/tinsel/background.cpp	2008-07-23 10:33:36 UTC (rev 33237)
@@ -34,15 +34,9 @@
 
 namespace Tinsel {
 
-// screen clipping rectangle
-Common::Rect rcScreen(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
-
 // current background
 BACKGND *pCurBgnd = NULL;
 
-// scroll flag - when set scrolling and velocity additions are paused
-bool bNoScroll;
-
 /**
  * Called to initialise a background.
  * @param pBgnd			Pointer to data struct for current background
@@ -175,26 +169,24 @@
 		prevX = fracToInt(pPlay->fieldX);
 		prevY = fracToInt(pPlay->fieldY);
 
-		if (!bNoScroll) {
-			// update scrolling
-			pPlay->fieldX += pPlay->fieldXvel;
-			pPlay->fieldY += pPlay->fieldYvel;
+		// update scrolling
+		pPlay->fieldX += pPlay->fieldXvel;
+		pPlay->fieldY += pPlay->fieldYvel;
 
-			// convert fixed point window pos to a int
-			ptWin.x = fracToInt(pPlay->fieldX);
-			ptWin.y = fracToInt(pPlay->fieldY);
+		// convert fixed point window pos to a int
+		ptWin.x = fracToInt(pPlay->fieldX);
+		ptWin.y = fracToInt(pPlay->fieldY);
 
-			// set the moved flag if the playfield has moved
-			if (prevX != ptWin.x || prevY != ptWin.y)
-				pPlay->bMoved = true;
-		}
+		// set the moved flag if the playfield has moved
+		if (prevX != ptWin.x || prevY != ptWin.y)
+			pPlay->bMoved = true;
 
 		// sort the display list for this background - just in case somebody has changed object Z positions
 		SortObjectList((OBJECT *)&pPlay->pDispList);
 
 		// generate clipping rects for all objects that have moved etc.
 		FindMovingObjects((OBJECT *)&pPlay->pDispList, &ptWin,
-			&pPlay->rcClip,	bNoScroll, pPlay->bMoved);
+			&pPlay->rcClip,	false, pPlay->bMoved);
 
 		// clear playfield moved flag
 		pPlay->bMoved = false;

Modified: scummvm/trunk/engines/tinsel/background.h
===================================================================
--- scummvm/trunk/engines/tinsel/background.h	2008-07-23 10:29:37 UTC (rev 33236)
+++ scummvm/trunk/engines/tinsel/background.h	2008-07-23 10:33:36 UTC (rev 33237)
@@ -71,13 +71,6 @@
 };
 
 
-/** screen clipping rect */
-extern Common::Rect rcScreen;
-
-/** scroll flag - when set scrolling and velocity additions are paused */
-extern bool bNoScroll;
-
-
 /*----------------------------------------------------------------------*\
 |*			Background Function Prototypes			*|
 \*----------------------------------------------------------------------*/

Modified: scummvm/trunk/engines/tinsel/object.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/object.cpp	2008-07-23 10:29:37 UTC (rev 33236)
+++ scummvm/trunk/engines/tinsel/object.cpp	2008-07-23 10:33:36 UTC (rev 33237)
@@ -25,7 +25,7 @@
  */
 
 #include "tinsel/object.h"
-#include "tinsel/background.h"	// for rcScreen definition
+#include "tinsel/background.h"
 #include "tinsel/cliprect.h"	// object clip rect defs
 #include "tinsel/graphics.h"	// low level interface
 #include "tinsel/handle.h"
@@ -34,6 +34,9 @@
 
 namespace Tinsel {
 
+/** screen clipping rectangle */
+static const Common::Rect rcScreen(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+
 // list of all objects
 OBJECT *objectList = 0;
 


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