aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25
diff options
context:
space:
mode:
authorEugene Sandulenko2010-07-31 11:49:39 +0000
committerEugene Sandulenko2010-10-12 22:15:10 +0000
commitbed623b11ef007bb46b26f1f995b6073914383c5 (patch)
tree823c2cf9aeea3e45256f2e08cbdf147c76aa1eb9 /engines/sword25
parent6a55700935983efc0d7e9fd37563c14dcc199027 (diff)
downloadscummvm-rg350-bed623b11ef007bb46b26f1f995b6073914383c5.tar.gz
scummvm-rg350-bed623b11ef007bb46b26f1f995b6073914383c5.tar.bz2
scummvm-rg350-bed623b11ef007bb46b26f1f995b6073914383c5.zip
SWORD25: Fix compilation
svn-id: r53193
Diffstat (limited to 'engines/sword25')
-rw-r--r--engines/sword25/fmv/movieplayer.cpp13
-rw-r--r--engines/sword25/fmv/movieplayer.h2
-rw-r--r--engines/sword25/fmv/movieplayer_script.cpp31
-rw-r--r--engines/sword25/math/geometry.cpp19
-rw-r--r--engines/sword25/math/geometry.h15
-rw-r--r--engines/sword25/script/luabindhelper.h16
6 files changed, 39 insertions, 57 deletions
diff --git a/engines/sword25/fmv/movieplayer.cpp b/engines/sword25/fmv/movieplayer.cpp
index 20a780f201..bfba6d1b7a 100644
--- a/engines/sword25/fmv/movieplayer.cpp
+++ b/engines/sword25/fmv/movieplayer.cpp
@@ -32,20 +32,17 @@
*
*/
-// -----------------------------------------------------------------------------
-// Includes
-// -----------------------------------------------------------------------------
-
#include "sword25/fmv/movieplayer.h"
-#define BS_LOG_PREFIX "MOVIEPLAYER"
+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
diff --git a/engines/sword25/fmv/movieplayer.h b/engines/sword25/fmv/movieplayer.h
index 365ec99af5..9988b5e182 100644
--- a/engines/sword25/fmv/movieplayer.h
+++ b/engines/sword25/fmv/movieplayer.h
@@ -71,7 +71,7 @@ public:
* @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.
diff --git a/engines/sword25/fmv/movieplayer_script.cpp b/engines/sword25/fmv/movieplayer_script.cpp
index b04cff35f7..f95dc90b1d 100644
--- a/engines/sword25/fmv/movieplayer_script.cpp
+++ b/engines/sword25/fmv/movieplayer_script.cpp
@@ -43,9 +43,7 @@
#include "sword25/fmv/movieplayer.h"
-namespace
-{
- // -------------------------------------------------------------------------
+namespace Sword25 {
int LoadMovie(lua_State * L)
{
@@ -171,21 +169,18 @@ namespace
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()
{
@@ -200,3 +195,5 @@ bool BS_MoviePlayer::_RegisterScriptBindings()
return true;
}
+
+} // End of namespace Sword25
diff --git a/engines/sword25/math/geometry.cpp b/engines/sword25/math/geometry.cpp
index b797667c9d..f6cab4ed80 100644
--- a/engines/sword25/math/geometry.cpp
+++ b/engines/sword25/math/geometry.cpp
@@ -34,27 +34,20 @@
#include "sword25/math/geometry.h"
-#define BS_LOG_PREFIX "GEOMETRY"
+namespace Sword25 {
-// -----------------------------------------------------------------------------
-// Konstruktion / Destruktion
-// -----------------------------------------------------------------------------
+#define BS_LOG_PREFIX "GEOMETRY"
-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
diff --git a/engines/sword25/math/geometry.h b/engines/sword25/math/geometry.h
index fa00e9fa21..20c7eb4b54 100644
--- a/engines/sword25/math/geometry.h
+++ b/engines/sword25/math/geometry.h
@@ -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
diff --git a/engines/sword25/script/luabindhelper.h b/engines/sword25/script/luabindhelper.h
index 7e92fd121d..0891cb4938 100644
--- a/engines/sword25/script/luabindhelper.h
+++ b/engines/sword25/script/luabindhelper.h
@@ -64,7 +64,7 @@ public:
Das Array muss mit dem Eintrag {0, 0} terminiert sein.
@return Gibt true bei Erfolg zurück, 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ügt eine Menge von Konstanten einer Lua-Library hinzu.
@@ -75,7 +75,7 @@ public:
Das Array muss mit dem Eintrag {0, 0} terminiert sein.
@return Gibt true bei Erfolg zurück, 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ügt eine Menge von Methoden zu einer Lua-Klasse hinzu.
@@ -86,7 +86,7 @@ public:
Das Array muss mit dem Eintrag {0, 0} terminiert sein.
@return Gibt true bei Erfolg zurück, 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öscht werden.
@@ -96,14 +96,14 @@ public:
@param GCHandler ein Funktionspointer auf die Funktion.
@return Gibt true bei Erfolg zurück, 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ück, der einen Stackdump des Lua-Stacks enthält.
@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ück, den den Inhalt einer Tabelle beschreibt.
@@ -111,12 +111,12 @@ public:
@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