From 8fe800f7afa25e052c387b8a1a7ad6d46f38d916 Mon Sep 17 00:00:00 2001 From: Alexander Baldeck Date: Wed, 29 Dec 2004 12:29:58 +0000 Subject: - ported sound engine to SDL_Mixer - name change from TmwSound to Sound as required by HACKING.txt - slight modification of other files using it due to interface changes - minor speedups in Configuration - makefile.static modfified to link against SDL --- src/gui/gui.cpp | 2 +- src/gui/setup.cpp | 5 ++++- src/gui/setup.h | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 24069cda..e8217cf8 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -50,7 +50,7 @@ BITMAP *gui_bitmap; bool drag; DATAFILE *gui_gfx; -extern TmwSound sound; +extern Sound sound; /* very internal update stuff */ int (*gui__external_slider_callback)(void *, int); diff --git a/src/gui/setup.cpp b/src/gui/setup.cpp index 233a36a5..d4396408 100644 --- a/src/gui/setup.cpp +++ b/src/gui/setup.cpp @@ -27,7 +27,8 @@ */ #include "setup.h" -#include + +extern Sound sound; /* * Metod returns the number of elements in container @@ -153,8 +154,10 @@ void Setup::action(const std::string& eventId) /* Sound settings */ if(soundCheckBox->isMarked() == true) { config.setValue("sound",1); + sound.init(32, 20); } else { config.setValue("sound",0); + sound.close(); } } else if(eventId == "cancel") { diff --git a/src/gui/setup.h b/src/gui/setup.h index 55343229..f1e10036 100644 --- a/src/gui/setup.h +++ b/src/gui/setup.h @@ -35,6 +35,7 @@ #include #endif +#include "../sound/sound.h" /* * The list model for modes list @@ -71,7 +72,7 @@ class Setup : public Window, public gcn::ActionListener { public: void action(const std::string& eventId); - static Setup * create_setup(); + static Setup * create_setup(); }; #endif -- cgit v1.2.3-70-g09d2