[Scummvm-cvs-logs] CVS: scummvm/queen graphics.cpp,1.5,1.6 graphics.h,1.4,1.5

David Eriksson twogood at users.sourceforge.net
Thu Oct 2 12:32:04 CEST 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv4430/queen

Modified Files:
	graphics.cpp graphics.h 
Log Message:
- Added QueenGraphics::bob() method
- Match new[] with delete[]


Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- graphics.cpp	2 Oct 2003 07:54:01 -0000	1.5
+++ graphics.cpp	2 Oct 2003 19:31:43 -0000	1.6
@@ -39,7 +39,7 @@
 		delete _banks[i].data;
 	}
 //	frameClearAll();
-	delete _shrinkBuffer.data;
+	delete[] _shrinkBuffer.data;
 }
 
 
@@ -492,6 +492,14 @@
 	}
 }
 
+BobSlot *QueenGraphics::bob(int index) {
+	if (index < MAX_BOBS_NUMBER)
+		return _bobs + index;
+	else {
+		error("QueenGraphics::bob called with index = %i but MAX_BOBS_NUMBER = %i", 
+				index, MAX_BOBS_NUMBER);
+	}
+}
 
 void QueenGraphics::frameErase(uint32 fslot) {
 

Index: graphics.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- graphics.h	2 Oct 2003 07:54:01 -0000	1.4
+++ graphics.h	2 Oct 2003 19:31:43 -0000	1.5
@@ -113,6 +113,8 @@
 	void bobDrawAll(); // drawbobs()
 	void bobClearAll(); // clearallbobs()
 
+	BobSlot *bob(int index);
+
 	void frameErase(uint32 fslot);
 
 private:





More information about the Scummvm-git-logs mailing list