summaryrefslogtreecommitdiff
path: root/src/sound.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
committerrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
commitf35ed4bbc2b05f1b83476b60948d64375f77f1b4 (patch)
tree1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/sound.h
parenta332d10fd938f345fff18e5f4a662a58f692f734 (diff)
downloadopenttd-f35ed4bbc2b05f1b83476b60948d64375f77f1b4.tar.xz
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/sound.h')
-rw-r--r--src/sound.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sound.h b/src/sound.h
index fd5638558..b815471c4 100644
--- a/src/sound.h
+++ b/src/sound.h
@@ -3,6 +3,8 @@
#ifndef SOUND_H
#define SOUND_H
+#include "helpers.hpp"
+
typedef struct MusicFileSettings {
byte playlist;
byte music_vol;
@@ -30,7 +32,8 @@ bool SoundInitialize(const char *filename);
uint GetNumOriginalSounds(void);
typedef enum SoundFx {
- SND_02_SPLAT, // 0 == 0x00 !
+ SND_BEGIN = 0,
+ SND_02_SPLAT = 0, // 0 == 0x00 !
SND_03_FACTORY_WHISTLE,
SND_04_TRAIN,
SND_05_TRAIN_THROUGH_TUNNEL,
@@ -102,9 +105,14 @@ typedef enum SoundFx {
SND_45_PLANE_CRASHING,
SND_46_PLANE_ENGINE_SPUTTERING,
SND_47_MAGLEV_2,
- SND_48_DISTANT_BIRD // 72 == 0x48
+ SND_48_DISTANT_BIRD, // 72 == 0x48
+ SND_END
} SoundFx;
+/** Define basic enum properties */
+template <> struct EnumPropsT<SoundFx> : MakeEnumPropsT<SoundFx, byte, SND_BEGIN, SND_END, SND_END> {};
+typedef TinyEnumT<SoundFx> SoundFxByte;
+
void SndPlayTileFx(SoundFx sound, TileIndex tile);
void SndPlayVehicleFx(SoundFx sound, const Vehicle *v);
void SndPlayFx(SoundFx sound);