diff options
author | Filippos Karapetis | 2016-09-26 23:26:28 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-10-03 00:34:32 +0300 |
commit | 8c7c42d13d652abd8e7982fb402cc70150e15491 (patch) | |
tree | 9e6fc5a76ab91eeb43ff2c9f0418f9c70726dc5a | |
parent | 8c755b268c41be8d1ecc688c83c8904c41f7419e (diff) | |
download | scummvm-rg350-8c7c42d13d652abd8e7982fb402cc70150e15491.tar.gz scummvm-rg350-8c7c42d13d652abd8e7982fb402cc70150e15491.tar.bz2 scummvm-rg350-8c7c42d13d652abd8e7982fb402cc70150e15491.zip |
CHEWY: Use virtual destructors. Some cleanup
-rw-r--r-- | engines/chewy/events.h | 2 | ||||
-rw-r--r-- | engines/chewy/graphics.h | 2 | ||||
-rw-r--r-- | engines/chewy/resource.h | 23 | ||||
-rw-r--r-- | engines/chewy/sound.h | 2 |
4 files changed, 8 insertions, 21 deletions
diff --git a/engines/chewy/events.h b/engines/chewy/events.h index c202b277de..fb2ab408e8 100644 --- a/engines/chewy/events.h +++ b/engines/chewy/events.h @@ -34,7 +34,7 @@ class Console; class Events { public: Events(ChewyEngine *vm, Graphics *graphics, Console *console); - ~Events() {} + virtual ~Events() {} void processEvents(); diff --git a/engines/chewy/graphics.h b/engines/chewy/graphics.h index 90315e34a1..28af8fedc6 100644 --- a/engines/chewy/graphics.h +++ b/engines/chewy/graphics.h @@ -32,7 +32,7 @@ class SpriteResource; class Graphics { public: Graphics(ChewyEngine *vm); - ~Graphics(); + virtual ~Graphics(); void drawImage(Common::String filename, int imageNum); void playVideo(uint num); diff --git a/engines/chewy/resource.h b/engines/chewy/resource.h index b869840975..04a0598803 100644 --- a/engines/chewy/resource.h +++ b/engines/chewy/resource.h @@ -86,19 +86,6 @@ struct TBFChunk { byte *data; }; -// TAF (sprite) chunk header -/*struct TAFHeader { - // TAF chunk header - // ID (TAF, followed by a zero) - uint16 screenMode; - uint16 spriteCount; - uint32 size; // total size (width * height) of all sprites - byte palette[3 * 256]; - uint32 nextSpriteOffset; - uint16 correctionTable; - // 1 byte padding -};*/ - // TAF (sprite) image data chunk header - 15 bytes struct TAFChunk { uint16 compressionFlag; @@ -160,7 +147,7 @@ protected: class SpriteResource : public Resource { public: SpriteResource(Common::String filename) : Resource(filename) {} - ~SpriteResource() {} + virtual ~SpriteResource() {} TAFChunk *getSprite(uint num); }; @@ -168,7 +155,7 @@ public: class BackgroundResource : public Resource { public: BackgroundResource(Common::String filename) : Resource(filename) {} - ~BackgroundResource() {} + virtual ~BackgroundResource() {} TBFChunk *getImage(uint num); }; @@ -176,7 +163,7 @@ public: class SoundResource : public Resource { public: SoundResource(Common::String filename) : Resource(filename) {} - ~SoundResource() {} + virtual ~SoundResource() {} SoundChunk *getSound(uint num); }; @@ -184,7 +171,7 @@ public: class TextResource : public Resource { public: TextResource(Common::String filename) : Resource(filename) {} - ~TextResource() {} + virtual ~TextResource() {} Common::String getText(uint num); }; @@ -192,7 +179,7 @@ public: class VideoResource : public Resource { public: VideoResource(Common::String filename) : Resource(filename) {} - ~VideoResource() {} + virtual ~VideoResource() {} VideoChunk *getVideoHeader(uint num); Common::SeekableReadStream *getVideoStream(uint num); diff --git a/engines/chewy/sound.h b/engines/chewy/sound.h index 9dc953618c..7884eadb63 100644 --- a/engines/chewy/sound.h +++ b/engines/chewy/sound.h @@ -33,7 +33,7 @@ class SoundResource; class Sound { public: Sound(Audio::Mixer *mixer); - ~Sound(); + virtual ~Sound(); void playSound(int num, bool loop = false); void playMusic(int num, bool loop = false); |