summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAlexander Baldeck <alexander@archlinux.org>2004-12-29 12:29:58 +0000
committerAlexander Baldeck <alexander@archlinux.org>2004-12-29 12:29:58 +0000
commit8fe800f7afa25e052c387b8a1a7ad6d46f38d916 (patch)
treeca0f0bf3ef5f556caa3b82f77b9691680182c799 /src/gui
parentff208227c9dcda7a8279acc8ee43fa28ea284478 (diff)
downloadmana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.gz
mana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.bz2
mana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.tar.xz
mana-client-8fe800f7afa25e052c387b8a1a7ad6d46f38d916.zip
- 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
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui.cpp2
-rw-r--r--src/gui/setup.cpp5
-rw-r--r--src/gui/setup.h3
3 files changed, 7 insertions, 3 deletions
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 <allegro.h>
+
+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 <winalleg.h>
#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