diff options
author | Max Horn | 2008-07-23 10:33:36 +0000 |
---|---|---|
committer | Max Horn | 2008-07-23 10:33:36 +0000 |
commit | 33c34f2eb474fb4ce1256c5b389b1149e6e13a60 (patch) | |
tree | 39367ccb70afa5c676b08c70c8bc09331b455baf | |
parent | 3595a9b2a4e8b34c24cd740e84687d7f804f51df (diff) | |
download | scummvm-rg350-33c34f2eb474fb4ce1256c5b389b1149e6e13a60.tar.gz scummvm-rg350-33c34f2eb474fb4ce1256c5b389b1149e6e13a60.tar.bz2 scummvm-rg350-33c34f2eb474fb4ce1256c5b389b1149e6e13a60.zip |
cleanup; removed const bNoScroll variable
svn-id: r33237
-rw-r--r-- | engines/tinsel/background.cpp | 28 | ||||
-rw-r--r-- | engines/tinsel/background.h | 7 | ||||
-rw-r--r-- | engines/tinsel/object.cpp | 5 |
3 files changed, 14 insertions, 26 deletions
diff --git a/engines/tinsel/background.cpp b/engines/tinsel/background.cpp index 6c586e11d9..91d21b4e0b 100644 --- a/engines/tinsel/background.cpp +++ b/engines/tinsel/background.cpp @@ -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 @@ void DrawBackgnd(void) { 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; diff --git a/engines/tinsel/background.h b/engines/tinsel/background.h index e95a80581e..7b8d099446 100644 --- a/engines/tinsel/background.h +++ b/engines/tinsel/background.h @@ -71,13 +71,6 @@ struct BACKGND { }; -/** screen clipping rect */ -extern Common::Rect rcScreen; - -/** scroll flag - when set scrolling and velocity additions are paused */ -extern bool bNoScroll; - - /*----------------------------------------------------------------------*\ |* Background Function Prototypes *| \*----------------------------------------------------------------------*/ diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp index 5ec0ec46e6..6996cff64e 100644 --- a/engines/tinsel/object.cpp +++ b/engines/tinsel/object.cpp @@ -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; |