summaryrefslogtreecommitdiff
path: root/src/music/os2_m.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-07-05 12:23:54 +0000
committerpeter1138 <peter1138@openttd.org>2007-07-05 12:23:54 +0000
commit68c6add8ccd9aa32eb799a433aa8a3b05ec84a57 (patch)
tree52e0cc5b1e4eb6cf9aed8556873ee6833662e11f /src/music/os2_m.h
parentb5079071762021ebfbb66a14eaa598e48d6a3234 (diff)
downloadopenttd-68c6add8ccd9aa32eb799a433aa8a3b05ec84a57.tar.xz
(svn r10444) -Codechange: switch to c++ classes and inheritance for sound/music/video drivers, using self-registration based on the blitter-model.
Diffstat (limited to 'src/music/os2_m.h')
-rw-r--r--src/music/os2_m.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/music/os2_m.h b/src/music/os2_m.h
index fef15b91f..b0f4d71ce 100644
--- a/src/music/os2_m.h
+++ b/src/music/os2_m.h
@@ -3,8 +3,30 @@
#ifndef MUSIC_OS2_H
#define MUSIC_OS2_H
-#include "../hal.h"
+#include "music_driver.hpp"
-extern const HalMusicDriver _os2_music_driver;
+class MusicDriver_OS2: public MusicDriver {
+public:
+ /* virtual */ bool CanProbe() { return true; }
+
+ /* virtual */ const char *Start(const char * const *param);
+
+ /* virtual */ void Stop();
+
+ /* virtual */ void PlaySong(const char *filename);
+
+ /* virtual */ void StopSong();
+
+ /* virtual */ bool IsSongPlaying();
+
+ /* virtual */ void SetVolume(byte vol);
+};
+
+class FMusicDriver_OS2: public MusicDriverFactory<FMusicDriver_OS2> {
+public:
+ /* virtual */ const char *GetName() { return "os2"; }
+ /* virtual */ const char *GetDescription() { return "OS/2 Music Driver"; }
+ /* virtual */ Driver *CreateInstance() { return new MusicDriver_OS2(); }
+};
#endif /* MUSIC_OS2_H */