From 96e05a1ff9a4ef70c862a3294b989b53cac35691 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 13 Oct 2010 17:42:56 +0000 Subject: SWORD25: Hopefully fix compilation when libtheora is not present svn-id: r53439 --- engines/sword25/fmv/movieplayer.cpp | 10 ++++------ engines/sword25/kernel/service_ids.h | 4 ++++ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'engines') 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[] = { -- cgit v1.2.3