[Scummvm-cvs-logs] SF.net SVN: scummvm:[53193] scummvm/trunk/engines/sword25
sev at users.sourceforge.net
sev at users.sourceforge.net
Wed Oct 13 00:15:10 CEST 2010
Revision: 53193
http://scummvm.svn.sourceforge.net/scummvm/?rev=53193&view=rev
Author: sev
Date: 2010-10-12 22:15:10 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
SWORD25: Fix compilation
Modified Paths:
--------------
scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
scummvm/trunk/engines/sword25/fmv/movieplayer.h
scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
scummvm/trunk/engines/sword25/math/geometry.cpp
scummvm/trunk/engines/sword25/math/geometry.h
scummvm/trunk/engines/sword25/script/luabindhelper.h
Modified: scummvm/trunk/engines/sword25/fmv/movieplayer.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer.cpp 2010-10-12 22:14:33 UTC (rev 53192)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer.cpp 2010-10-12 22:15:10 UTC (rev 53193)
@@ -32,20 +32,17 @@
*
*/
-// -----------------------------------------------------------------------------
-// Includes
-// -----------------------------------------------------------------------------
-
#include "sword25/fmv/movieplayer.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "MOVIEPLAYER"
-// -----------------------------------------------------------------------------
-
-BS_MoviePlayer::BS_MoviePlayer(BS_Kernel * pKernel) : BS_Service(pKernel)
-{
+BS_MoviePlayer::BS_MoviePlayer(BS_Kernel * pKernel) : BS_Service(pKernel) {
if (!_RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
else
BS_LOGLN("Script bindings registered.");
}
+
+} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/fmv/movieplayer.h
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer.h 2010-10-12 22:14:33 UTC (rev 53192)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer.h 2010-10-12 22:15:10 UTC (rev 53193)
@@ -71,7 +71,7 @@
* @param Z Z indicates the position of the film on the main graphics layer
* @return Returns false if an error occured while loading, otherwise true.
*/
- virtual bool LoadMovie(const std::string & Filename, unsigned int Z) = 0;
+ virtual bool LoadMovie(const Common::String &Filename, unsigned int Z) = 0;
/**
* Unloads the currently loaded movie file.
Modified: scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp 2010-10-12 22:14:33 UTC (rev 53192)
+++ scummvm/trunk/engines/sword25/fmv/movieplayer_script.cpp 2010-10-12 22:15:10 UTC (rev 53193)
@@ -43,9 +43,7 @@
#include "sword25/fmv/movieplayer.h"
-namespace
-{
- // -------------------------------------------------------------------------
+namespace Sword25 {
int LoadMovie(lua_State * L)
{
@@ -171,22 +169,19 @@
const luaL_reg LIBRARY_FUNCTIONS[] =
{
- "LoadMovie", LoadMovie,
- "UnloadMovie", UnloadMovie,
- "Play", Play,
- "Pause", Pause,
- "Update", Update,
- "IsMovieLoaded", IsMovieLoaded,
- "IsPaused", IsPaused,
- "GetScaleFactor", GetScaleFactor,
- "SetScaleFactor", SetScaleFactor,
- "GetTime", GetTime,
- 0, 0,
+ { "LoadMovie", LoadMovie },
+ { "UnloadMovie", UnloadMovie },
+ { "Play", Play },
+ { "Pause", Pause },
+ { "Update", Update },
+ { "IsMovieLoaded", IsMovieLoaded },
+ { "IsPaused", IsPaused },
+ { "GetScaleFactor", GetScaleFactor },
+ { "SetScaleFactor", SetScaleFactor },
+ { "GetTime", GetTime },
+ { 0, 0 }
};
-}
-// -----------------------------------------------------------------------------
-
bool BS_MoviePlayer::_RegisterScriptBindings()
{
BS_Kernel * pKernel = BS_Kernel::GetInstance();
@@ -200,3 +195,5 @@
return true;
}
+
+} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/math/geometry.cpp
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry.cpp 2010-10-12 22:14:33 UTC (rev 53192)
+++ scummvm/trunk/engines/sword25/math/geometry.cpp 2010-10-12 22:15:10 UTC (rev 53193)
@@ -34,27 +34,20 @@
#include "sword25/math/geometry.h"
+namespace Sword25 {
+
#define BS_LOG_PREFIX "GEOMETRY"
-// -----------------------------------------------------------------------------
-// Konstruktion / Destruktion
-// -----------------------------------------------------------------------------
-
-BS_Geometry::BS_Geometry(BS_Kernel * pKernel) :
- BS_Service(pKernel)
-{
+BS_Geometry::BS_Geometry(BS_Kernel *pKernel) : BS_Service(pKernel) {
if (!_RegisterScriptBindings())
BS_LOG_ERRORLN("Script bindings could not be registered.");
else
BS_LOGLN("Script bindings registered.");
}
-// -----------------------------------------------------------------------------
-BS_Geometry::~BS_Geometry()
-{
+BS_Service *BS_Geometry_CreateObject(BS_Kernel *pKernel) {
+ return new BS_Geometry(pKernel);
}
-// -----------------------------------------------------------------------------
-
-BS_Service * BS_Geometry_CreateObject(BS_Kernel* pKernel) { return new BS_Geometry(pKernel); }
\ No newline at end of file
+} // End of namespace Sword25
Modified: scummvm/trunk/engines/sword25/math/geometry.h
===================================================================
--- scummvm/trunk/engines/sword25/math/geometry.h 2010-10-12 22:14:33 UTC (rev 53192)
+++ scummvm/trunk/engines/sword25/math/geometry.h 2010-10-12 22:15:10 UTC (rev 53193)
@@ -35,27 +35,22 @@
#ifndef SWORD25_GEOMETRY_H
#define SWORD25_GEOMETRY_H
-// -----------------------------------------------------------------------------
-// Includes
-// -----------------------------------------------------------------------------
-
#include "sword25/kernel/common.h"
#include "sword25/kernel/service.h"
-// -----------------------------------------------------------------------------
+namespace Sword25 {
class BS_Kernel;
-// -----------------------------------------------------------------------------
-
-class BS_Geometry : public BS_Service
-{
+class BS_Geometry : public BS_Service {
public:
- BS_Geometry(BS_Kernel * pKernel);
+ BS_Geometry(BS_Kernel *pKernel);
virtual ~BS_Geometry();
private:
bool _RegisterScriptBindings();
};
+} // End of namespace Sword25
+
#endif
Modified: scummvm/trunk/engines/sword25/script/luabindhelper.h
===================================================================
--- scummvm/trunk/engines/sword25/script/luabindhelper.h 2010-10-12 22:14:33 UTC (rev 53192)
+++ scummvm/trunk/engines/sword25/script/luabindhelper.h 2010-10-12 22:15:10 UTC (rev 53193)
@@ -64,7 +64,7 @@
Das Array muss mit dem Eintrag {0, 0} terminiert sein.
@return Gibt true bei Erfolg zur\xFCck, ansonsten false.
*/
- static bool AddFunctionsToLib(lua_State * L, const std::string & LibName, const luaL_reg * Functions);
+ static bool AddFunctionsToLib(lua_State * L, const Common::String & LibName, const luaL_reg * Functions);
/**
@brief F\xFCgt eine Menge von Konstanten einer Lua-Library hinzu.
@@ -75,7 +75,7 @@
Das Array muss mit dem Eintrag {0, 0} terminiert sein.
@return Gibt true bei Erfolg zur\xFCck, ansonsten false.
*/
- static bool AddConstantsToLib(lua_State * L, const std::string & LibName, const lua_constant_reg * Constants);
+ static bool AddConstantsToLib(lua_State * L, const Common::String & LibName, const lua_constant_reg * Constants);
/**
@brief F\xFCgt eine Menge von Methoden zu einer Lua-Klasse hinzu.
@@ -86,7 +86,7 @@
Das Array muss mit dem Eintrag {0, 0} terminiert sein.
@return Gibt true bei Erfolg zur\xFCck, ansonsten false.
*/
- static bool AddMethodsToClass(lua_State * L, const std::string & ClassName, const luaL_reg * Methods);
+ static bool AddMethodsToClass(lua_State *L, const Common::String &ClassName, const luaL_reg *Methods);
/**
@brief Legt eine Funktion fest, die aufgerufen wird, wenn Exemplare einer bestimmten Lua-Klasse vom Garbage-Collecter gel\xF6scht werden.
@@ -96,14 +96,14 @@
@param GCHandler ein Funktionspointer auf die Funktion.
@return Gibt true bei Erfolg zur\xFCck, ansonsten false.
*/
- static bool SetClassGCHandler(lua_State * L, const std::string & ClassName, lua_CFunction GCHandler);
+ static bool SetClassGCHandler(lua_State *L, const Common::String &ClassName, lua_CFunction GCHandler);
/**
@brief Gibt einen String zur\xFCck, der einen Stackdump des Lua-Stacks enth\xE4lt.
@param L ein Pointer auf die Lua-VM.
*/
- static std::string StackDump(lua_State * L);
+ static Common::String StackDump(lua_State *L);
/**
@brief Gibt einen String zur\xFCck, den den Inhalt einer Tabelle beschreibt.
@@ -111,12 +111,12 @@
@param L ein Pointer auf die Lua-VM.
@remark Auf dem Lua-Stack muss die Tabelle liegen, die ausgelesen werden soll.
*/
- static std::string TableDump(lua_State * L);
+ static Common::String TableDump(lua_State *L);
- static bool GetMetatable(lua_State * L, const std::string & TableName);
+ static bool GetMetatable(lua_State *L, const Common::String &TableName);
private:
- static bool _CreateTable(lua_State * L, const std::string & TableName);
+ static bool _CreateTable(lua_State *L, const Common::String &TableName);
};
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list