(svn r17428) -Codechange: add a function to get the name of a driver

This commit is contained in:
rubidium 2009-09-05 21:26:51 +00:00
parent 3c1aa02560
commit ad201e5a00
20 changed files with 21 additions and 0 deletions

View File

@ -36,6 +36,8 @@ public:
DT_VIDEO,
DT_END,
};
virtual const char *GetName() const = 0;
};
DECLARE_POSTFIX_INCREMENT(Driver::Type);

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {

View File

@ -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> {