aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
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[] = {