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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Tue Jul 13 01:19:33 CEST 2010


Revision: 50834
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50834&view=rev
Author:   fingolfin
Date:     2010-07-12 23:19:33 +0000 (Mon, 12 Jul 2010)

Log Message:
-----------
TINSEL: Replace global object s_rectList by a TinselEngine member var

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

Modified: scummvm/trunk/engines/tinsel/cliprect.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/cliprect.cpp	2010-07-12 23:19:08 UTC (rev 50833)
+++ scummvm/trunk/engines/tinsel/cliprect.cpp	2010-07-12 23:19:33 UTC (rev 50834)
@@ -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 @@
  * @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 @@
  * the total number of clip rectangles.
  */
 void MergeClipRect() {
+	RectList &s_rectList = _vm->_clipRects;
+
 	if (s_rectList.size() <= 1)
 		return;
 

Modified: scummvm/trunk/engines/tinsel/tinsel.h
===================================================================
--- scummvm/trunk/engines/tinsel/tinsel.h	2010-07-12 23:19:08 UTC (rev 50833)
+++ scummvm/trunk/engines/tinsel/tinsel.h	2010-07-12 23:19:33 UTC (rev 50834)
@@ -61,6 +61,8 @@
 class Scheduler;
 class SoundManager;
 
+typedef Common::List<Common::Rect> RectList;
+
 enum TinselGameID {
 	GID_DW1 = 0,
 	GID_DW2 = 1
@@ -203,6 +205,10 @@
 	/** Stack of pending keypresses. */
 	Common::List<Common::Event> _keypresses;
 
+
+	/** List of all clip rectangles. */
+	RectList _clipRects;
+
 private:
 	//MidiMusicPlayer *_midiMusic;
 	int _musicVolume;


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