summaryrefslogtreecommitdiff
path: root/src/common.hpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-03-26 13:33:49 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-03-26 13:33:49 +0200
commit2ae4b0ff77a2b2be2c485ac3ba6c1ef3facb874c (patch)
treee810997d58165e41eb4225a522d9d8886849331c /src/common.hpp
parent680ce5519c24dd0fa87ae85dd824000e915974b0 (diff)
Basic audio system + firing sound.
Diffstat (limited to 'src/common.hpp')
-rw-r--r--src/common.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/common.hpp b/src/common.hpp
index 87706c8..846b166 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -25,6 +25,7 @@ along with Minitrem. If not, see <http://www.gnu.org/licenses/>.
#include <sstream>
#include <stack>
#include <SFML/Graphics.hpp>
+#include <SFML/Audio.hpp>
#include "math.hpp"
#define COUNT(A) (sizeof(A) / sizeof((A)[0]))
@@ -377,6 +378,16 @@ namespace render {
};
}
+namespace audio {
+ class sound_t {
+ sf::SoundBuffer buffer;
+
+ public:
+ void load(const char *path);
+ void play(void);
+ };
+}
+
extern render::state_t *debug_render;
// Divide and round to minus infinity.