diff options
author | Eugene Sandulenko | 2010-10-19 20:52:06 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-19 20:52:06 +0000 |
commit | bbd95da899c496c10a4050b7b3cfd3f8dc8aa6b3 (patch) | |
tree | 53122d619c22e501328dd0cd034a08c3605a6ab3 /engines/sword25/fmv/movieplayer_script.cpp | |
parent | d94435eebd8ab8e21a4a28a0274cae02910cb41d (diff) | |
download | scummvm-rg350-bbd95da899c496c10a4050b7b3cfd3f8dc8aa6b3.tar.gz scummvm-rg350-bbd95da899c496c10a4050b7b3cfd3f8dc8aa6b3.tar.bz2 scummvm-rg350-bbd95da899c496c10a4050b7b3cfd3f8dc8aa6b3.zip |
SWORD25: Fix engine exit when running without theoradec
svn-id: r53622
Diffstat (limited to 'engines/sword25/fmv/movieplayer_script.cpp')
-rw-r--r-- | engines/sword25/fmv/movieplayer_script.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/engines/sword25/fmv/movieplayer_script.cpp b/engines/sword25/fmv/movieplayer_script.cpp index 5305fa82fd..ea1a9c3a6b 100644 --- a/engines/sword25/fmv/movieplayer_script.cpp +++ b/engines/sword25/fmv/movieplayer_script.cpp @@ -44,127 +44,91 @@ namespace Sword25 { int loadMovie(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushbooleancpp(L, FMVPtr->loadMovie(luaL_checkstring(L, 1), lua_gettop(L) == 2 ? static_cast<uint>(luaL_checknumber(L, 2)) : 10)); -#else - lua_pushbooleancpp(L, true); -#endif return 1; } int unloadMovie(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushbooleancpp(L, FMVPtr->unloadMovie()); -#else - lua_pushbooleancpp(L, true); -#endif return 1; } int play(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushbooleancpp(L, FMVPtr->play()); -#else - lua_pushbooleancpp(L, true); -#endif return 1; } int pause(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushbooleancpp(L, FMVPtr->pause()); -#else - lua_pushbooleancpp(L, true); -#endif return 1; } int update(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); FMVPtr->update(); -#endif return 0; } int isMovieLoaded(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushbooleancpp(L, FMVPtr->isMovieLoaded()); -#else - lua_pushbooleancpp(L, true); -#endif return 1; } int isPaused(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushbooleancpp(L, FMVPtr->isPaused()); -#else - lua_pushbooleancpp(L, false); -#endif return 1; } int getScaleFactor(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushnumber(L, FMVPtr->getScaleFactor()); -#else - lua_pushnumber(L, 1); -#endif return 1; } int setScaleFactor(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); FMVPtr->setScaleFactor(static_cast<float>(luaL_checknumber(L, 1))); -#endif return 0; } int getTime(lua_State *L) { -#ifdef USE_THEORADEC MoviePlayer *FMVPtr = Kernel::GetInstance()->GetFMV(); BS_ASSERT(FMVPtr); lua_pushnumber(L, FMVPtr->getTime()); -#else - lua_pushnumber(L, 0); -#endif return 1; } @@ -185,7 +149,6 @@ const luaL_reg LIBRARY_FUNCTIONS[] = { { 0, 0 } }; -#ifdef USE_THEORADEC bool MoviePlayer::registerScriptBindings() { ScriptEngine *pScript = Kernel::GetInstance()->GetScript(); BS_ASSERT(pScript); @@ -196,6 +159,5 @@ bool MoviePlayer::registerScriptBindings() { return true; } -#endif } // End of namespace Sword25 |