[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.12,1.13 cutaway.h,1.6,1.7

David Eriksson twogood at users.sourceforge.net
Fri Oct 10 06:02:11 CEST 2003


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

Modified Files:
	cutaway.cpp cutaway.h 
Log Message:
Get Graphics object as parameter too.


Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cutaway.cpp	9 Oct 2003 09:09:40 -0000	1.12
+++ cutaway.cpp	10 Oct 2003 13:01:13 -0000	1.13
@@ -57,27 +57,25 @@
 void Cutaway::run(
 		const char *filename, 
 		char *nextFilename,
+		Graphics *graphics,
 		Logic *logic,
 		Resource *resource) {
-	Cutaway *cutaway = new Cutaway(filename, logic, resource);
+	Cutaway *cutaway = new Cutaway(filename, graphics,logic, resource);
 	cutaway->run(nextFilename);
 	delete cutaway;
 }
 
 Cutaway::Cutaway(
 		const char *filename, 
+		Graphics *graphics,
 		Logic *logic,
 		Resource *resource) 
-: _logic(logic), _resource(resource), _quit(false), _lastSong(0), _songBeforeComic(0) {
-	// XXX should not create this object ourselves
-	_graphics = new Graphics(resource);
+: _graphics(graphics), _logic(logic), _resource(resource), _quit(false), _lastSong(0), _songBeforeComic(0) {
 	memset(&_bankNames, 0, sizeof(_bankNames));
 	load(filename); 
 }
 
 Cutaway::~Cutaway() {
-	// XXX only delete this if we created it
-	delete _graphics;
 	delete[] _fileData;
 }
 

Index: cutaway.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cutaway.h	7 Oct 2003 03:58:44 -0000	1.6
+++ cutaway.h	10 Oct 2003 13:01:14 -0000	1.7
@@ -36,6 +36,7 @@
 		static void run(
 				const char *filename,
 				char *nextFilename,
+				Graphics *graphics,
 				Logic *logic,
 				Resource *resource);
 	private:
@@ -181,6 +182,7 @@
 
 		Cutaway(
 				const char *filename, 
+				Graphics *graphics,
 				Logic *logic,
 				Resource *resource);
 		~Cutaway();





More information about the Scummvm-git-logs mailing list