summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--cmake/mxe.cmake1
-rw-r--r--src/app/app.cpp17
-rw-r--r--src/common/config.h.cmake2
4 files changed, 14 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 230faf5..04e7b8e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,4 +5,4 @@ script: cmake . -DCMAKE_VERBOSE_MAKEFILE=ON && make all doc test
before_install:
- git submodule update --init --recursive
- sudo apt-get update -qq
- - sudo apt-get install -qq --no-install-recommends libgl1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libpng12-dev libltdl-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev google-mock libgtest-dev doxygen graphviz
+ - sudo apt-get install -qq --no-install-recommends libgl1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libpng12-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev google-mock libgtest-dev doxygen graphviz
diff --git a/cmake/mxe.cmake b/cmake/mxe.cmake
index 5c5ebde..322ba4a 100644
--- a/cmake/mxe.cmake
+++ b/cmake/mxe.cmake
@@ -18,7 +18,6 @@ if((${CMAKE_CROSSCOMPILING}) AND (DEFINED MSYS))
${CMAKE_FIND_ROOT_PATH}/lib/libiconv.a
${CMAKE_FIND_ROOT_PATH}/lib/libglew32s.a
${CMAKE_FIND_ROOT_PATH}/lib/libfreetype.a
- ${CMAKE_FIND_ROOT_PATH}/lib/libltdl.a
${CMAKE_FIND_ROOT_PATH}/lib/libopengl32.a
${CMAKE_FIND_ROOT_PATH}/lib/libjpeg.a
${CMAKE_FIND_ROOT_PATH}/lib/libwinmm.a
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 924ec74..683b053 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -40,6 +40,11 @@
#include <unistd.h>
+#ifdef OPENAL_SOUND
+ #include "sound/oalsound/alsound.h"
+#endif
+
+
template<> CApplication* CSingleton<CApplication>::mInstance = nullptr;
//! Static buffer for putenv locale
@@ -332,12 +337,12 @@ bool CApplication::Create()
if (GetProfile().GetLocalProfileString("Resources", "Data", path))
m_dataPath = path;
- m_sound = static_cast<CSoundInterface*>(CInstanceManager::GetInstancePointer()->SearchInstance(CLASS_SOUND));
-
- if (!m_sound) {
- GetLogger()->Error("Sound not loaded, falling back to fake sound!\n");
- m_sound = new CSoundInterface();
- }
+ #ifdef OPENAL_SOUND
+ m_sound = static_cast<CSoundInterface *>(new ALSound());
+ #else
+ GetLogger()->Info("No sound support.\n");
+ m_sound = new CSoundInterface();
+ #endif
m_sound->Create(true);
if (GetProfile().GetLocalProfileString("Resources", "Sound", path))
diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake
index 9b30720..dd280a3 100644
--- a/src/common/config.h.cmake
+++ b/src/common/config.h.cmake
@@ -10,3 +10,5 @@
#define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@"
#define COLOBOT_I18N_DIR "@COLOBOT_INSTALL_I18N_DIR@"
+
+#cmakedefine OPENAL_SOUND