aboutsummaryrefslogtreecommitdiff
path: root/engines/tucker/tucker.h
diff options
context:
space:
mode:
authorGregory Montoir2009-08-25 21:28:29 +0000
committerGregory Montoir2009-08-25 21:28:29 +0000
commite4d04fec8dbbce352282413a914ebdb82f0d384b (patch)
treed7c58e43e0db222391d511e4bfb6513fb50c619d /engines/tucker/tucker.h
parentcce199c48bb00b61c6962626d01eb588b34803d2 (diff)
downloadscummvm-rg350-e4d04fec8dbbce352282413a914ebdb82f0d384b.tar.gz
scummvm-rg350-e4d04fec8dbbce352282413a914ebdb82f0d384b.tar.bz2
scummvm-rg350-e4d04fec8dbbce352282413a914ebdb82f0d384b.zip
TUCKER: add support for commpressed intro sound effects
svn-id: r43733
Diffstat (limited to 'engines/tucker/tucker.h')
-rw-r--r--engines/tucker/tucker.h33
1 files changed, 27 insertions, 6 deletions
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index ce43fa66a1..1b2462a9e3 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -210,6 +210,29 @@ enum GameFlag {
kGameFlagIntroOnly = 1 << 3
};
+enum CompressedSoundType {
+ kSoundTypeFx,
+ kSoundTypeMusic,
+ kSoundTypeSpeech,
+ kSoundTypeIntro
+};
+
+class CompressedSound {
+public:
+
+ CompressedSound() : _compressedSoundType(-1) {}
+
+ void openFile();
+ void closeFile();
+ Audio::AudioStream *load(CompressedSoundType type, int num, bool loop);
+
+private:
+
+ int _compressedSoundType;
+ int _compressedSoundFlags;
+ Common::File _fCompressedSound;
+};
+
inline int scaleMixerVolume(int volume, int max = 100) {
return volume * Audio::Mixer::kMaxChannelVolume / max;
}
@@ -542,8 +565,6 @@ protected:
void copyMapRect(int x, int y, int w, int h);
int handleSpecialObjectSelectionSequence();
- void openCompressedSoundFile();
- void closeCompressedSoundFile();
uint8 *loadFile(const char *filename, uint8 *p);
void loadImage(const char *filename, uint8 *dst, int a);
void loadCursor();
@@ -574,6 +595,7 @@ protected:
Common::RandomSource _rnd;
AnimationSequencePlayer *_player;
+ CompressedSound _compressedSound;
Common::Language _gameLang;
uint32 _gameFlags;
@@ -603,8 +625,6 @@ protected:
int _gameHintsStringNum;
int _fileLoadSize;
- int _compressedSoundType;
- Common::File _fCompressedSound;
uint8 *_loadTempBuf;
uint8 *_cursorGfxBuf;
uint8 *_charsetGfxBuf;
@@ -890,7 +910,7 @@ public:
void (AnimationSequencePlayer::*play)();
};
- AnimationSequencePlayer(OSystem *system, Audio::Mixer *mixer, Common::EventManager *event, int num);
+ AnimationSequencePlayer(OSystem *system, Audio::Mixer *mixer, Common::EventManager *event, CompressedSound *sound, int num);
~AnimationSequencePlayer();
void mainLoop();
@@ -899,7 +919,7 @@ private:
void syncTime();
void loadSounds(int num);
- Audio::AudioStream *loadSoundFileAsStream(int index, AnimationSoundType type);
+ Audio::AudioStream *loadSound(int index, AnimationSoundType type);
void updateSounds();
void fadeInPalette();
void fadeOutPalette();
@@ -933,6 +953,7 @@ private:
OSystem *_system;
Audio::Mixer *_mixer;
Common::EventManager *_event;
+ CompressedSound *_compressedSound;
int _seqNum;
bool _changeToNextSequence;