diff options
-rw-r--r-- | queen/cutaway.cpp | 10 | ||||
-rw-r--r-- | queen/cutaway.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/queen/cutaway.cpp b/queen/cutaway.cpp index 248acb952a..a3c3914d3d 100644 --- a/queen/cutaway.cpp +++ b/queen/cutaway.cpp @@ -57,27 +57,25 @@ namespace Queen { 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; } diff --git a/queen/cutaway.h b/queen/cutaway.h index 2718cd773a..81e5100591 100644 --- a/queen/cutaway.h +++ b/queen/cutaway.h @@ -36,6 +36,7 @@ class Cutaway { static void run( const char *filename, char *nextFilename, + Graphics *graphics, Logic *logic, Resource *resource); private: @@ -181,6 +182,7 @@ class Cutaway { Cutaway( const char *filename, + Graphics *graphics, Logic *logic, Resource *resource); ~Cutaway(); |