diff --git a/JGE/Makefile b/JGE/Makefile index 5962f652c..197ce8f15 100644 --- a/JGE/Makefile +++ b/JGE/Makefile @@ -122,6 +122,6 @@ endif Makefile.linux: g++ -o /dev/null src/testfeatures.c -L$(LIBDIR) -lfmod-3.75 - @if [ "0" == "$?" ]; then echo 'FMOD=-DWITH_FMOD'; else echo 'FMOD=-DWITHOUT_FMOD'; fi > $@ + @if [ "0" = "$$?" ]; then echo 'FMOD=-DWITH_FMOD'; else echo 'FMOD=-DWITHOUT_FMOD'; fi > $@ -include Makefile.$(TARGET_ARCHITECTURE) diff --git a/JGE/include/JSoundSystem.h b/JGE/include/JSoundSystem.h index 441b25513..0a44525ef 100644 --- a/JGE/include/JSoundSystem.h +++ b/JGE/include/JSoundSystem.h @@ -39,7 +39,9 @@ #include "JMP3.h" #endif - +#ifdef WITH_FMOD + #include "../Dependencies/include/fmod.h" +#endif //------------------------------------------------------------------------------------------------ class JMusic diff --git a/JGE/src/pc/JSfx.cpp b/JGE/src/pc/JSfx.cpp index 4fe8e0def..ebad5a109 100644 --- a/JGE/src/pc/JSfx.cpp +++ b/JGE/src/pc/JSfx.cpp @@ -3,7 +3,7 @@ // JGE++ is a hardware accelerated 2D game SDK for PSP/Windows. // // Licensed under the BSD license, see LICENSE in JGE root for details. -// +// // Copyright (c) 2007 James Hui (a.k.a. Dr.Watson) // //------------------------------------------------------------------------------------- @@ -115,7 +115,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName) { #ifndef WITH_FMOD return NULL; -#elif +#else JMusic* music = new JMusic(); if (music) { @@ -126,7 +126,7 @@ JMusic *JSoundSystem::LoadMusic(const char *fileName) char *buffer = new char[size]; fileSystem->ReadFile(buffer, size); music->mTrack = FSOUND_Sample_Load(FSOUND_UNMANAGED, buffer, FSOUND_LOADMEMORY, 0, size); - + delete[] buffer; fileSystem->CloseFile(); } @@ -176,7 +176,7 @@ void JSoundSystem::SetMusicVolume(int volume) } void JSoundSystem::SetSfxVolume(int volume){ - //this sets the volume to all channels then reverts back the volume for music.. + //this sets the volume to all channels then reverts back the volume for music.. //that's a bit dirty but it works #ifdef WITH_FMOD FSOUND_SetVolumeAbsolute(FSOUND_ALL, volume * 2.55);