Files
@ r8373:e7760b9340e5
Branch filter:
Location: cpp/openttd-patchpack/source/src/music/music_driver.hpp - annotation
r8373:e7760b9340e5
768 B
text/x-c++hdr
(svn r11939) -Codechange: some type fixes and very initial steps into supporting NDS by default. Based on work by Dominik.
r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7193:2cae66b95848 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r7170:38b143754b40 r8275:5932486ddd21 r7170:38b143754b40 r7170:38b143754b40 | /* $Id$ */
#ifndef MUSIC_MUSIC_DRIVER_HPP
#define MUSIC_MUSIC_DRIVER_HPP
#include "../driver.h"
class MusicDriver: public Driver {
public:
virtual void PlaySong(const char *filename) = 0;
virtual void StopSong() = 0;
virtual bool IsSongPlaying() = 0;
virtual void SetVolume(byte vol) = 0;
};
class MusicDriverFactoryBase: public DriverFactoryBase {
};
template <class T>
class MusicDriverFactory: public MusicDriverFactoryBase {
public:
MusicDriverFactory() { this->RegisterDriver(((T *)this)->GetName(), Driver::DT_MUSIC, ((T *)this)->priority); }
/**
* Get the long, human readable, name for the Driver-class.
*/
const char *GetName();
};
extern MusicDriver *_music_driver;
extern char _ini_musicdriver[32];
#endif /* MUSIC_MUSIC_DRIVER_HPP */
|