summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-29 14:12:39 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-29 14:12:39 +0000
commit4988b2ae63413a754196b915c2de34f74ad3ce8d (patch)
treec4a761a6ed2fe0df0706af05631ba05968ae4e78 /src/main.cpp
parentb2ee6c2da10288415e597d254a7694f7ddccbc78 (diff)
downloadmana-client-4988b2ae63413a754196b915c2de34f74ad3ce8d.tar.gz
mana-client-4988b2ae63413a754196b915c2de34f74ad3ce8d.tar.bz2
mana-client-4988b2ae63413a754196b915c2de34f74ad3ce8d.tar.xz
mana-client-4988b2ae63413a754196b915c2de34f74ad3ce8d.zip
Changes to disable sound on Windows.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index eb830773..ffbd4f5a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -91,7 +91,9 @@ unsigned char stretch_mode, screen_mode;
char *dir;
// new sound-engine /- kth5
+#ifndef WIN32
Sound sound;
+#endif /* not WIN32 */
// ini file configuration reader
Configuration config;
@@ -267,7 +269,9 @@ void exit_engine() {
config.write(dir);
delete dir;
gui_exit();
+#ifndef WIN32
SDL_Quit();
+#endif /* not WIN32 */
destroy_bitmap(buffer);
allegro_exit();
}
@@ -275,6 +279,7 @@ void exit_engine() {
/** Main */
int main() {
init_engine();
+#ifndef WIN32
// initialize sound-engine and start playing intro-theme /-kth5
try {
if (config.getValue("sound", 0) == 1) {
@@ -290,6 +295,7 @@ int main() {
ok("Sound Engine", err);
warning(err);
}
+#endif /* not WIN32 */
while (state != EXIT) {
switch(state) {
@@ -306,7 +312,9 @@ int main() {
charSelect();
break;
case GAME:
+#ifndef WIN32
sound.stopBgm();
+#endif /* not WIN32 */
status("GAME");
map_start();
if( state==GAME )