[Scummvm-cvs-logs] SF.net SVN: scummvm:[39856] scummvm/trunk/engines/cruise
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Apr 5 09:51:31 CEST 2009
Revision: 39856
http://scummvm.svn.sourceforge.net/scummvm/?rev=39856&view=rev
Author: dreammaster
Date: 2009-04-05 07:51:31 +0000 (Sun, 05 Apr 2009)
Log Message:
-----------
Created stub manager class for sound effects
Modified Paths:
--------------
scummvm/trunk/engines/cruise/cruise.cpp
scummvm/trunk/engines/cruise/cruise.h
scummvm/trunk/engines/cruise/sound.cpp
scummvm/trunk/engines/cruise/sound.h
Modified: scummvm/trunk/engines/cruise/cruise.cpp
===================================================================
--- scummvm/trunk/engines/cruise/cruise.cpp 2009-04-05 00:06:22 UTC (rev 39855)
+++ scummvm/trunk/engines/cruise/cruise.cpp 2009-04-05 07:51:31 UTC (rev 39856)
@@ -69,6 +69,7 @@
CruiseEngine::~CruiseEngine() {
delete _debugger;
delete _music;
+ delete _sound;
freeSystem();
}
@@ -125,6 +126,7 @@
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
_music = new MusicPlayer();
+ _sound = new SoundPlayer();
}
bool CruiseEngine::loadLanguageStrings() {
Modified: scummvm/trunk/engines/cruise/cruise.h
===================================================================
--- scummvm/trunk/engines/cruise/cruise.h 2009-04-05 00:06:22 UTC (rev 39855)
+++ scummvm/trunk/engines/cruise/cruise.h 2009-04-05 07:51:31 UTC (rev 39856)
@@ -56,6 +56,7 @@
Debugger *_debugger;
MidiDriver *_driver;
MusicPlayer *_music;
+ SoundPlayer *_sound;
bool _mt32, _adlib;
int _musicVolume;
Common::StringList _langStrings;
@@ -84,6 +85,7 @@
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; }
Modified: scummvm/trunk/engines/cruise/sound.cpp
===================================================================
--- scummvm/trunk/engines/cruise/sound.cpp 2009-04-05 00:06:22 UTC (rev 39855)
+++ scummvm/trunk/engines/cruise/sound.cpp 2009-04-05 07:51:31 UTC (rev 39856)
@@ -112,7 +112,7 @@
// 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;
Modified: scummvm/trunk/engines/cruise/sound.h
===================================================================
--- scummvm/trunk/engines/cruise/sound.h 2009-04-05 00:06:22 UTC (rev 39855)
+++ scummvm/trunk/engines/cruise/sound.h 2009-04-05 07:51:31 UTC (rev 39856)
@@ -45,6 +45,7 @@
byte _masterVolume;
byte *_songPointer;
+ // TODO: lib_SongSize
int _songSize;
void patchMidi(uint32 adr, const byte *data, int size);
@@ -71,10 +72,22 @@
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
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list