mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r17428) -Codechange: add a function to get the name of a driver
This commit is contained in:
parent
3c1aa02560
commit
ad201e5a00
@ -36,6 +36,8 @@ public:
|
||||
DT_VIDEO,
|
||||
DT_END,
|
||||
};
|
||||
|
||||
virtual const char *GetName() const = 0;
|
||||
};
|
||||
|
||||
DECLARE_POSTFIX_INCREMENT(Driver::Type);
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "allegro"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_Allegro: public MusicDriverFactory<FMusicDriver_Allegro> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "bemidi"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_BeMidi: public MusicDriverFactory<FMusicDriver_BeMidi> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "dmusic"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_DMusic: public MusicDriverFactory<FMusicDriver_DMusic> {
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "extmidi"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_ExtMidi: public MusicDriverFactory<FMusicDriver_ExtMidi> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "libtimidity"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_LibTimidity: public MusicDriverFactory<FMusicDriver_LibTimidity> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying() { return true; }
|
||||
|
||||
/* virtual */ void SetVolume(byte vol) { }
|
||||
/* virtual */ const char *GetName() const { return "null"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_Null: public MusicDriverFactory<FMusicDriver_Null> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "os2"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_OS2: public MusicDriverFactory<FMusicDriver_OS2> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "qt"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_QtMidi: public MusicDriverFactory<FMusicDriver_QtMidi> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool IsSongPlaying();
|
||||
|
||||
/* virtual */ void SetVolume(byte vol);
|
||||
/* virtual */ const char *GetName() const { return "win32"; }
|
||||
};
|
||||
|
||||
class FMusicDriver_Win32: public MusicDriverFactory<FMusicDriver_Win32> {
|
||||
|
@ -21,6 +21,7 @@ public:
|
||||
/* virtual */ void Stop();
|
||||
|
||||
/* virtual */ void MainLoop();
|
||||
/* virtual */ const char *GetName() const { return "allegro"; }
|
||||
};
|
||||
|
||||
class FSoundDriver_Allegro: public SoundDriverFactory<FSoundDriver_Allegro> {
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
|
||||
/* virtual */ void Stop();
|
||||
/* virtual */ const char *GetName() const { return "cocoa"; }
|
||||
};
|
||||
|
||||
class FSoundDriver_Cocoa: public SoundDriverFactory<FSoundDriver_Cocoa> {
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
/* virtual */ const char *Start(const char * const *param) { return NULL; }
|
||||
|
||||
/* virtual */ void Stop() { }
|
||||
/* virtual */ const char *GetName() const { return "null"; }
|
||||
};
|
||||
|
||||
class FSoundDriver_Null: public SoundDriverFactory<FSoundDriver_Null> {
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
|
||||
/* virtual */ void Stop();
|
||||
/* virtual */ const char *GetName() const { return "sdl"; }
|
||||
};
|
||||
|
||||
class FSoundDriver_SDL: public SoundDriverFactory<FSoundDriver_SDL> {
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
/* virtual */ const char *Start(const char * const *param);
|
||||
|
||||
/* virtual */ void Stop();
|
||||
/* virtual */ const char *GetName() const { return "win32"; }
|
||||
};
|
||||
|
||||
class FSoundDriver_Win32: public SoundDriverFactory<FSoundDriver_Win32> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "allegro"; }
|
||||
};
|
||||
|
||||
class FVideoDriver_Allegro: public VideoDriverFactory<FVideoDriver_Allegro> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "dedicated"; }
|
||||
};
|
||||
|
||||
class FVideoDriver_Dedicated: public VideoDriverFactory<FVideoDriver_Dedicated> {
|
||||
|
@ -30,6 +30,7 @@ public:
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "null"; }
|
||||
};
|
||||
|
||||
class FVideoDriver_Null: public VideoDriverFactory<FVideoDriver_Null> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "sdl"; }
|
||||
};
|
||||
|
||||
class FVideoDriver_SDL: public VideoDriverFactory<FVideoDriver_SDL> {
|
||||
|
@ -27,6 +27,7 @@ public:
|
||||
/* virtual */ bool ChangeResolution(int w, int h);
|
||||
|
||||
/* virtual */ bool ToggleFullscreen(bool fullscreen);
|
||||
/* virtual */ const char *GetName() const { return "win32"; }
|
||||
};
|
||||
|
||||
class FVideoDriver_Win32: public VideoDriverFactory<FVideoDriver_Win32> {
|
||||
|
Loading…
Reference in New Issue
Block a user