Created stub manager class for sound effects

svn-id: r39856
This commit is contained in:
Paul Gilbert 2009-04-05 07:51:31 +00:00
parent 197c2bbb99
commit d90a343790
4 changed files with 18 additions and 1 deletions

View File

@ -69,6 +69,7 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
CruiseEngine::~CruiseEngine() {
delete _debugger;
delete _music;
delete _sound;
freeSystem();
}
@ -125,6 +126,7 @@ void CruiseEngine::initialize() {
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
_music = new MusicPlayer();
_sound = new SoundPlayer();
}
bool CruiseEngine::loadLanguageStrings() {

View File

@ -56,6 +56,7 @@ private:
Debugger *_debugger;
MidiDriver *_driver;
MusicPlayer *_music;
SoundPlayer *_sound;
bool _mt32, _adlib;
int _musicVolume;
Common::StringList _langStrings;
@ -84,6 +85,7 @@ public:
Common::Language getLanguage() const;
Common::Platform getPlatform() const;
MusicPlayer &music() { return *_music; }
SoundPlayer &sound() { return *_sound; }
bool mt32() const { return _mt32; }
bool adlib() const { return _adlib; }
virtual GUI::Debugger *getDebugger() { return _debugger; }

View File

@ -112,7 +112,7 @@ void MusicPlayer::loadSong(const char *name) {
// Get the details of the song
// TODO: Figure this out for sure for use in actually playing song
//int numTracksMaybe = *(_songPointer + 470);
//int size = *(_songPointer + 470);
//int speed = 244 - *(_songPointer + 471);
//int musicSpeed = (speed * 100) / 1060;

View File

@ -45,6 +45,7 @@ private:
byte _masterVolume;
byte *_songPointer;
// TODO: lib_SongSize
int _songSize;
void patchMidi(uint32 adr, const byte *data, int size);
@ -71,10 +72,22 @@ public:
bool songLoaded() const { return _songPointer != NULL; }
bool songPlayed() const { return _songPlayed; }
bool isPlaying() const { return _isPlaying; }
bool looping() const { return _looping; }
byte volume() const { return _masterVolume; }
byte *songData() { return _songPointer; }
void setPlaying(bool playing) { _isPlaying = playing; }
void setLoop(bool loop) { _looping = loop; }
};
class SoundPlayer {
public:
SoundPlayer() {}
void startSound(int channelNum, const byte *ptr, int size, int speed, int volume, bool loop) {}
void startNote(int channelNum, int speed, int volume) {}
void stopChannel(int channelNum) {}
};
} // End of namespace Cruise
#endif