diff options
author | Max Horn | 2010-07-12 23:19:33 +0000 |
---|---|---|
committer | Max Horn | 2010-07-12 23:19:33 +0000 |
commit | 4f914e7a9f1379f06749b1f01fa83b8464c13d7f (patch) | |
tree | 9b43c116fb2cf2c6c7df0eda890976eae07017eb /engines | |
parent | e2c1ee853a1cd1ce56536a4b4436a8da5277d0cb (diff) | |
download | scummvm-rg350-4f914e7a9f1379f06749b1f01fa83b8464c13d7f.tar.gz scummvm-rg350-4f914e7a9f1379f06749b1f01fa83b8464c13d7f.tar.bz2 scummvm-rg350-4f914e7a9f1379f06749b1f01fa83b8464c13d7f.zip |
TINSEL: Replace global object s_rectList by a TinselEngine member var
svn-id: r50834
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/cliprect.cpp | 12 | ||||
-rw-r--r-- | engines/tinsel/tinsel.h | 6 |
2 files changed, 12 insertions, 6 deletions
diff --git a/engines/tinsel/cliprect.cpp b/engines/tinsel/cliprect.cpp index 69a71b874f..5f287d3eab 100644 --- a/engines/tinsel/cliprect.cpp +++ b/engines/tinsel/cliprect.cpp @@ -28,17 +28,15 @@ #include "tinsel/graphics.h" // normal object drawing #include "tinsel/object.h" #include "tinsel/palette.h" +#include "tinsel/tinsel.h" // for _vm namespace Tinsel { -/** list of all clip rectangles */ -static RectList s_rectList; - /** * Resets the clipping rectangle allocator. */ void ResetClipRect() { - s_rectList.clear(); + _vm->_clipRects.clear(); } /** @@ -46,11 +44,11 @@ void ResetClipRect() { * @param pClip clip rectangle dimensions to allocate */ void AddClipRect(const Common::Rect &pClip) { - s_rectList.push_back(pClip); + _vm->_clipRects.push_back(pClip); } const RectList &GetClipRects() { - return s_rectList; + return _vm->_clipRects; } /** @@ -175,6 +173,8 @@ void FindMovingObjects(OBJECT *pObjList, Common::Point *pWin, Common::Rect *pCli * the total number of clip rectangles. */ void MergeClipRect() { + RectList &s_rectList = _vm->_clipRects; + if (s_rectList.size() <= 1) return; diff --git a/engines/tinsel/tinsel.h b/engines/tinsel/tinsel.h index 0e1d705815..df27a1e0e1 100644 --- a/engines/tinsel/tinsel.h +++ b/engines/tinsel/tinsel.h @@ -61,6 +61,8 @@ class PCMMusicPlayer; class Scheduler; class SoundManager; +typedef Common::List<Common::Rect> RectList; + enum TinselGameID { GID_DW1 = 0, GID_DW2 = 1 @@ -203,6 +205,10 @@ public: /** Stack of pending keypresses. */ Common::List<Common::Event> _keypresses; + + /** List of all clip rectangles. */ + RectList _clipRects; + private: //MidiMusicPlayer *_midiMusic; int _musicVolume; |