diff options
author | David Eriksson | 2003-10-10 13:01:14 +0000 |
---|---|---|
committer | David Eriksson | 2003-10-10 13:01:14 +0000 |
commit | 1f9497cb1fbfcc8c3ffd412ce450144983b2452d (patch) | |
tree | 6e5770e73090ddfd513d14b4b48d4bcdee2fb8ef /queen | |
parent | c11ebb33b6c4ae7c9766d1dd94009f390eedd846 (diff) | |
download | scummvm-rg350-1f9497cb1fbfcc8c3ffd412ce450144983b2452d.tar.gz scummvm-rg350-1f9497cb1fbfcc8c3ffd412ce450144983b2452d.tar.bz2 scummvm-rg350-1f9497cb1fbfcc8c3ffd412ce450144983b2452d.zip |
Get Graphics object as parameter too.
svn-id: r10719
Diffstat (limited to 'queen')
-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(); |