miniswig supports int, float and string constants now
[supertux.git] / src / scripting / sound.cpp
1 #include <config.h>
2
3 #include <string>
4 #include <stdio.h>
5 #include "sound.hpp"
6 #include "resources.hpp"
7 #include "audio/sound_manager.hpp"
8
9 namespace Scripting
10 {
11
12   Sound::Sound()
13   {}
14
15   Sound::~Sound() 
16   {}
17
18   void
19   Sound::play_music(const std::string& name)
20   {
21     std::string filename = "music/";
22     filename += name;
23     filename += ".ogg";
24     sound_manager->play_music(name);
25   }
26
27   void
28   Sound::play(const std::string& name)
29   {
30     sound_manager->play(name);
31   }
32 }