aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova/resman.h
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2018-03-25 05:57:49 +0200
committerThierry Crozat2018-04-15 18:28:38 +0100
commit454b8a98c308b04f4ee3205ae6ed0fcce88a07d1 (patch)
treee930e008adb2319127b2a1c7d97c655315de7724 /engines/supernova/resman.h
parent019381479602aa27ee3de5d6fdbea3301cc7e7ea (diff)
downloadscummvm-rg350-454b8a98c308b04f4ee3205ae6ed0fcce88a07d1.tar.gz
scummvm-rg350-454b8a98c308b04f4ee3205ae6ed0fcce88a07d1.tar.bz2
scummvm-rg350-454b8a98c308b04f4ee3205ae6ed0fcce88a07d1.zip
SUPERNOVA: Wraps resources in ScopedPtr
Diffstat (limited to 'engines/supernova/resman.h')
-rw-r--r--engines/supernova/resman.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/engines/supernova/resman.h b/engines/supernova/resman.h
index 12304abf5e..080ecc5da4 100644
--- a/engines/supernova/resman.h
+++ b/engines/supernova/resman.h
@@ -23,13 +23,12 @@
#ifndef SUPERNOVA_RESOURCES_H
#define SUPERNOVA_RESOURCES_H
+#include "audio/audiostream.h"
#include "common/ptr.h"
+#include "supernova/graphics.h"
#include "supernova/sound.h"
-namespace Audio {
-class SeekableAudioStream;
-}
namespace Common {
class MemoryReadStream;
@@ -37,8 +36,6 @@ class MemoryReadStream;
namespace Supernova {
-class MSNImage;
-
class ResourceManager {
public:
enum CursorId {
@@ -51,11 +48,10 @@ public:
public:
ResourceManager();
- ~ResourceManager();
Audio::SeekableAudioStream *getSoundStream(AudioId index);
Audio::AudioStream *getSoundStream(MusicId index);
- MSNImage *getImage(int filenumber) const;
+ const MSNImage *getImage(int filenumber) const;
const byte *getImage(CursorId id) const;
private:
@@ -65,13 +61,13 @@ private:
void initImages();
private:
- Audio::SeekableAudioStream *_soundSamples[kAudioNumSamples];
+ Common::ScopedPtr<Audio::SeekableAudioStream> _soundSamples[kAudioNumSamples];
Common::ScopedPtr<Common::MemoryReadStream> _musicIntroBuffer;
Common::ScopedPtr<Common::MemoryReadStream> _musicOutroBuffer;
Common::ScopedPtr<Audio::AudioStream> _musicIntro;
Common::ScopedPtr<Audio::AudioStream> _musicOutro;
int _audioRate;
- MSNImage *_images[kNumImageFiles];
+ MSNImage _images[kNumImageFiles];
byte _cursorNormal[256];
byte _cursorWait[256];
};