aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2010-10-13 17:42:56 +0000
committerFilippos Karapetis2010-10-13 17:42:56 +0000
commit96e05a1ff9a4ef70c862a3294b989b53cac35691 (patch)
tree4a5bf9d31d3fbf697b16723209aecbc0d9c66250 /engines
parenta52f986125305ff8dd57e65c2c6d2c53e15064a2 (diff)
downloadscummvm-rg350-96e05a1ff9a4ef70c862a3294b989b53cac35691.tar.gz
scummvm-rg350-96e05a1ff9a4ef70c862a3294b989b53cac35691.tar.bz2
scummvm-rg350-96e05a1ff9a4ef70c862a3294b989b53cac35691.zip
SWORD25: Hopefully fix compilation when libtheora is not present
svn-id: r53439
Diffstat (limited to 'engines')
-rw-r--r--engines/sword25/fmv/movieplayer.cpp10
-rw-r--r--engines/sword25/kernel/service_ids.h4
2 files changed, 8 insertions, 6 deletions
diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp
index e8f0ea5ad6..1ca7b43dae 100644
--- a/engines/sword25/fmv/movieplayer.cpp
+++ b/engines/sword25/fmv/movieplayer.cpp
@@ -39,6 +39,8 @@
#include "sword25/package/packagemanager.h"
#include "sword25/sfx/soundengine.h"
+#ifdef USE_THEORADEC
+
namespace Sword25 {
#define BS_LOG_PREFIX "MOVIEPLAYER"
@@ -46,14 +48,9 @@ namespace Sword25 {
#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */
Service *OggTheora_CreateObject(Kernel *pKernel) {
-#ifdef USE_THEORADEC
return new MoviePlayer(pKernel);
-#else
- return NULL;
-#endif
}
-#ifdef USE_THEORADEC
MoviePlayer::MoviePlayer(Kernel *pKernel) : Service(pKernel), _decoder(g_system->getMixer()) {
if (!registerScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
@@ -156,6 +153,7 @@ double MoviePlayer::getTime() {
return _decoder.getElapsedTime() / 1000.0;
}
+} // End of namespace Sword25
+
#endif
-} // End of namespace Sword25
diff --git a/engines/sword25/kernel/service_ids.h b/engines/sword25/kernel/service_ids.h
index 5ffd83d743..fd5f6ee6f8 100644
--- a/engines/sword25/kernel/service_ids.h
+++ b/engines/sword25/kernel/service_ids.h
@@ -55,7 +55,11 @@ Service *InputEngine_CreateObject(Kernel *pKernel);
Service *SoundEngine_CreateObject(Kernel *pKernel);
Service *LuaScriptEngine_CreateObject(Kernel *pKernel);
Service *Geometry_CreateObject(Kernel *pKernel);
+#ifndef USE_THEORADEC
Service *OggTheora_CreateObject(Kernel *pKernel);
+#else
+Service *OggTheora_CreateObject(Kernel *pKernel) { return NULL; }
+#endif
// Services are recorded in this table
const BS_ServiceInfo BS_SERVICE_TABLE[] = {