From 64260f5787b3e9f2c694e6a5f25a820fd0aa334e Mon Sep 17 00:00:00 2001 From: "jean.chalard" Date: Tue, 2 Feb 2010 09:15:39 +0000 Subject: [PATCH] J : * Fix linux32 compilation. * Wagic+JGE are now expected to compile on any unix that has an X and an OpenGL library. If fmod is correctly installed it will use it, else there won't be any sound. --- projects/mtg/Makefile | 4 ++-- projects/mtg/src/WCachedResource.cpp | 17 +++++------------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/projects/mtg/Makefile b/projects/mtg/Makefile index bdcbe3e42..4a73c4798 100644 --- a/projects/mtg/Makefile +++ b/projects/mtg/Makefile @@ -75,7 +75,7 @@ else $(TARGET): Makefile.$(TARGET_ARCHITECTURE) $(OBJS) ../../JGE/lib/linux/libjge.a - g++ -o $(TARGET) $(OBJS) $(LIBS) $(LIBDIR) + $(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LIBDIR) linux: $(TARGET) @@ -100,7 +100,7 @@ Makefile.psp: Makefile.linux: g++ -o /dev/null src/testfeatures.c $(LIBDIR) -lfmod-3.75 - @if [ "0" == "$?" ]; then echo 'FMOD=-lfmod-3.75'; else echo 'FMOD='; fi > $@ + @if [ "0" = "$$?" ]; then echo 'FMOD=-lfmod-3.75'; else echo 'FMOD='; fi > $@ -include $(DEPS) -include Makefile.$(TARGET_ARCHITECTURE) diff --git a/projects/mtg/src/WCachedResource.cpp b/projects/mtg/src/WCachedResource.cpp index 66ed5f787..8836326bc 100644 --- a/projects/mtg/src/WCachedResource.cpp +++ b/projects/mtg/src/WCachedResource.cpp @@ -9,7 +9,8 @@ #include "../include/GameOptions.h" #include "../include/WResourceManager.h" #include - +#ifdef WITH_FMOD +#endif //WResource WResource::~WResource(){ @@ -312,20 +313,12 @@ JSample * WCachedSample::Actual(){ return sample; } + unsigned long WCachedSample::size(){ if(!sample || !sample->mSample) return 0; - -#if defined WIN32 || defined LINUX - #if defined __LP64__ - return 0; - #else - return FSOUND_Sample_GetLength(sample->mSample); - #endif -#else - return sample->mSample->fileSize; -#endif -} + return sample->fileSize(); +} bool WCachedSample::isGood(){ if(!sample || !sample->mSample)