Files @ r7192:543ddd0c4867
Branch filter:

Location: cpp/openttd-patchpack/source/src/music/null_m.h

peter1138
(svn r10470) -Fix: clamp station build date to 16 bit value for newgrf, preventing overflow and incorrect graphics shown past a certain date.
/* $Id$ */

#ifndef MUSIC_NULL_H
#define MUSIC_NULL_H

#include "music_driver.hpp"

class MusicDriver_Null: public MusicDriver {
public:
	/* virtual */ bool CanProbe() { return false; }

	/* virtual */ const char *Start(const char * const *param) { return NULL; }

	/* virtual */ void Stop() { }

	/* virtual */ void PlaySong(const char *filename) { }

	/* virtual */ void StopSong() { }

	/* virtual */ bool IsSongPlaying() { return true; }

	/* virtual */ void SetVolume(byte vol) { }
};

class FMusicDriver_Null: public MusicDriverFactory<FMusicDriver_Null> {
public:
	/* virtual */ const char *GetName() { return "null"; }
	/* virtual */ const char *GetDescription() { return "Null Music Driver"; }
	/* virtual */ Driver *CreateInstance() { return new MusicDriver_Null(); }
};

#endif /* MUSIC_NULL_H */