aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2010-10-18 17:12:00 +0000
committerEugene Sandulenko2010-10-18 17:12:00 +0000
commit3feac393b0c951c53d96181b320dd42f5c725f35 (patch)
tree9fdf2fa312777288a76356c21e2d2098fd752d0f
parent3b21db16188899eac9914fe1c3b32b311a3aa344 (diff)
downloadscummvm-rg350-3feac393b0c951c53d96181b320dd42f5c725f35.tar.gz
scummvm-rg350-3feac393b0c951c53d96181b320dd42f5c725f35.tar.bz2
scummvm-rg350-3feac393b0c951c53d96181b320dd42f5c725f35.zip
SWORD25: Renamed Lua .c files to .cpp and make it compilable
svn-id: r53568
-rw-r--r--engines/sword25/gfx/graphicengine.cpp8
-rw-r--r--engines/sword25/input/inputengine_script.cpp2
-rw-r--r--engines/sword25/math/vertex.cpp7
-rw-r--r--engines/sword25/math/vertex.h10
-rw-r--r--engines/sword25/module.mk5
-rw-r--r--engines/sword25/package/packagemanager_script.cpp2
-rw-r--r--engines/sword25/script/luabindhelper.h9
-rw-r--r--engines/sword25/script/luacallback.cpp7
-rw-r--r--engines/sword25/script/luacallback.h6
-rw-r--r--engines/sword25/script/luascript.cpp8
-rw-r--r--engines/sword25/script/luascript.h9
-rw-r--r--engines/sword25/util/lua/lapi.cpp (renamed from engines/sword25/util/lua/lapi.c)0
-rw-r--r--engines/sword25/util/lua/lauxlib.cpp (renamed from engines/sword25/util/lua/lauxlib.c)0
-rw-r--r--engines/sword25/util/lua/lbaselib.cpp (renamed from engines/sword25/util/lua/lbaselib.c)0
-rw-r--r--engines/sword25/util/lua/lcode.cpp (renamed from engines/sword25/util/lua/lcode.c)0
-rw-r--r--engines/sword25/util/lua/ldblib.cpp (renamed from engines/sword25/util/lua/ldblib.c)0
-rw-r--r--engines/sword25/util/lua/ldebug.cpp (renamed from engines/sword25/util/lua/ldebug.c)0
-rw-r--r--engines/sword25/util/lua/ldo.cpp (renamed from engines/sword25/util/lua/ldo.c)0
-rw-r--r--engines/sword25/util/lua/ldump.cpp (renamed from engines/sword25/util/lua/ldump.c)0
-rw-r--r--engines/sword25/util/lua/lfunc.cpp (renamed from engines/sword25/util/lua/lfunc.c)0
-rw-r--r--engines/sword25/util/lua/lgc.cpp (renamed from engines/sword25/util/lua/lgc.c)0
-rw-r--r--engines/sword25/util/lua/linit.cpp (renamed from engines/sword25/util/lua/linit.c)0
-rw-r--r--engines/sword25/util/lua/liolib.cpp (renamed from engines/sword25/util/lua/liolib.c)0
-rw-r--r--engines/sword25/util/lua/llex.cpp (renamed from engines/sword25/util/lua/llex.c)0
-rw-r--r--engines/sword25/util/lua/lmathlib.cpp (renamed from engines/sword25/util/lua/lmathlib.c)0
-rw-r--r--engines/sword25/util/lua/lmem.cpp (renamed from engines/sword25/util/lua/lmem.c)0
-rw-r--r--engines/sword25/util/lua/loadlib.cpp (renamed from engines/sword25/util/lua/loadlib.c)0
-rw-r--r--engines/sword25/util/lua/lobject.cpp (renamed from engines/sword25/util/lua/lobject.c)0
-rw-r--r--engines/sword25/util/lua/lopcodes.cpp (renamed from engines/sword25/util/lua/lopcodes.c)0
-rw-r--r--engines/sword25/util/lua/loslib.cpp (renamed from engines/sword25/util/lua/loslib.c)0
-rw-r--r--engines/sword25/util/lua/lparser.cpp (renamed from engines/sword25/util/lua/lparser.c)0
-rw-r--r--engines/sword25/util/lua/lstate.cpp (renamed from engines/sword25/util/lua/lstate.c)0
-rw-r--r--engines/sword25/util/lua/lstring.cpp (renamed from engines/sword25/util/lua/lstring.c)0
-rw-r--r--engines/sword25/util/lua/lstrlib.cpp (renamed from engines/sword25/util/lua/lstrlib.c)0
-rw-r--r--engines/sword25/util/lua/ltable.cpp (renamed from engines/sword25/util/lua/ltable.c)0
-rw-r--r--engines/sword25/util/lua/ltablib.cpp (renamed from engines/sword25/util/lua/ltablib.c)0
-rw-r--r--engines/sword25/util/lua/ltm.cpp (renamed from engines/sword25/util/lua/ltm.c)0
-rw-r--r--engines/sword25/util/lua/lundump.cpp (renamed from engines/sword25/util/lua/lundump.c)0
-rw-r--r--engines/sword25/util/lua/lvm.cpp (renamed from engines/sword25/util/lua/lvm.c)0
-rw-r--r--engines/sword25/util/lua/lzio.cpp (renamed from engines/sword25/util/lua/lzio.c)0
-rw-r--r--engines/sword25/util/lua/print.cpp (renamed from engines/sword25/util/lua/print.c)0
-rw-r--r--engines/sword25/util/pluto/pdep.cpp (renamed from engines/sword25/util/pluto/pdep.c)0
-rw-r--r--engines/sword25/util/pluto/pluto.cpp (renamed from engines/sword25/util/pluto/pluto.c)0
-rw-r--r--engines/sword25/util/pluto/plzio.cpp (renamed from engines/sword25/util/pluto/plzio.c)0
-rw-r--r--engines/sword25/util/pluto/pptest.cpp (renamed from engines/sword25/util/pluto/pptest.c)0
-rw-r--r--engines/sword25/util/pluto/puptest.cpp (renamed from engines/sword25/util/pluto/puptest.c)0
46 files changed, 2 insertions, 71 deletions
diff --git a/engines/sword25/gfx/graphicengine.cpp b/engines/sword25/gfx/graphicengine.cpp
index 8b9d617cee..a94395628b 100644
--- a/engines/sword25/gfx/graphicengine.cpp
+++ b/engines/sword25/gfx/graphicengine.cpp
@@ -52,14 +52,8 @@
#include "sword25/gfx/graphicengine.h"
-namespace Lua {
-extern "C"
-{
#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
-}
-}
-
enum {
BIT_DEPTH = 32,
BACKBUFFER_COUNT = 1
@@ -68,8 +62,6 @@ enum {
namespace Sword25 {
-using namespace Lua;
-
static const uint FRAMETIME_SAMPLE_COUNT = 5; // Anzahl der Framezeiten über die, die Framezeit gemittelt wird
GraphicEngine::GraphicEngine(Kernel *pKernel) :
diff --git a/engines/sword25/input/inputengine_script.cpp b/engines/sword25/input/inputengine_script.cpp
index f9771a2aa2..2b1f3b9ec6 100644
--- a/engines/sword25/input/inputengine_script.cpp
+++ b/engines/sword25/input/inputengine_script.cpp
@@ -51,8 +51,6 @@
namespace Sword25 {
-using namespace Lua;
-
// -----------------------------------------------------------------------------
// Callback-Objekte
// -----------------------------------------------------------------------------
diff --git a/engines/sword25/math/vertex.cpp b/engines/sword25/math/vertex.cpp
index 4997da09d3..d9a709ab49 100644
--- a/engines/sword25/math/vertex.cpp
+++ b/engines/sword25/math/vertex.cpp
@@ -34,15 +34,8 @@
#include "sword25/math/vertex.h"
-namespace Lua {
-
-extern "C"
-{
#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
-}
-
-}
namespace Sword25 {
diff --git a/engines/sword25/math/vertex.h b/engines/sword25/math/vertex.h
index 18ea4c082c..b923841a0f 100644
--- a/engines/sword25/math/vertex.h
+++ b/engines/sword25/math/vertex.h
@@ -45,6 +45,7 @@
// Includes
#include <math.h>
#include "sword25/kernel/common.h"
+#include "sword25/util/lua/lua.h"
#if defined(MACOSX) || defined(SOLARIS) || defined(__MINGW32__)
// Older versions of Mac OS X didn't supply a powf function, so using it
@@ -63,15 +64,6 @@
#define atan2f(x,y) ((float)atan2(x,y))
#endif
-namespace Lua {
-
-// Forward declarations
-struct lua_State;
-
-}
-
-using namespace Lua;
-
namespace Sword25 {
/**
diff --git a/engines/sword25/module.mk b/engines/sword25/module.mk
index 1534dc15fd..19f3c1d858 100644
--- a/engines/sword25/module.mk
+++ b/engines/sword25/module.mk
@@ -102,11 +102,6 @@ MODULE_OBJS += \
fmv/yuvtorgba.o
endif
-# HACK. Use proper CC compiler here
-%.o: %.c
- $(QUIET)$(MKDIR) $(*D)/$(DEPDIR)
- $(QUIET_CXX)$(CXX) -x c $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-
# This module can be built as a plugin
ifeq ($(ENABLE_SWORD25), DYNAMIC_PLUGIN)
PLUGIN := 1
diff --git a/engines/sword25/package/packagemanager_script.cpp b/engines/sword25/package/packagemanager_script.cpp
index 84cfc45cae..8a32d0b4cc 100644
--- a/engines/sword25/package/packagemanager_script.cpp
+++ b/engines/sword25/package/packagemanager_script.cpp
@@ -41,8 +41,6 @@
namespace Sword25 {
-using namespace Lua;
-
static PackageManager *getPM() {
Kernel *pKernel = Kernel::GetInstance();
BS_ASSERT(pKernel);
diff --git a/engines/sword25/script/luabindhelper.h b/engines/sword25/script/luabindhelper.h
index 0dbaaa3186..dc45104d53 100644
--- a/engines/sword25/script/luabindhelper.h
+++ b/engines/sword25/script/luabindhelper.h
@@ -37,17 +37,8 @@
#include "sword25/kernel/common.h"
-namespace Lua {
-
-extern "C"
-{
#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
-}
-
-}
-
-using namespace Lua;
namespace Sword25 {
diff --git a/engines/sword25/script/luacallback.cpp b/engines/sword25/script/luacallback.cpp
index 6d2e634632..bb2c821aa8 100644
--- a/engines/sword25/script/luacallback.cpp
+++ b/engines/sword25/script/luacallback.cpp
@@ -35,18 +35,11 @@
#include "sword25/script/luacallback.h"
#include "sword25/script/luabindhelper.h"
-namespace Lua {
-
-extern "C"
-{
#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lauxlib.h"
-}
const char *CALLBACKTABLE_NAME = "__CALLBACKS";
-}
-
namespace Sword25 {
#define BS_LOG_PREFIX "LUA"
diff --git a/engines/sword25/script/luacallback.h b/engines/sword25/script/luacallback.h
index 0a5dec17d9..e097f5b499 100644
--- a/engines/sword25/script/luacallback.h
+++ b/engines/sword25/script/luacallback.h
@@ -37,14 +37,8 @@
#include "sword25/kernel/common.h"
-namespace Lua {
-
struct lua_State;
-}
-
-using namespace Lua;
-
namespace Sword25 {
class LuaCallback {
diff --git a/engines/sword25/script/luascript.cpp b/engines/sword25/script/luascript.cpp
index 6c01ca1de5..a16959656d 100644
--- a/engines/sword25/script/luascript.cpp
+++ b/engines/sword25/script/luascript.cpp
@@ -45,21 +45,13 @@
#include "sword25/kernel/outputpersistenceblock.h"
#include "sword25/kernel/inputpersistenceblock.h"
-namespace Lua {
-
-extern "C" {
#include "sword25/util/lua/lua.h"
#include "sword25/util/lua/lualib.h"
#include "sword25/util/lua/lauxlib.h"
#include "sword25/util/pluto/pluto.h"
-}
-
-}
namespace Sword25 {
-using namespace Lua;
-
LuaScriptEngine::LuaScriptEngine(Kernel *KernelPtr) :
ScriptEngine(KernelPtr),
_state(0),
diff --git a/engines/sword25/script/luascript.h b/engines/sword25/script/luascript.h
index f557ae45f1..b66c32176a 100644
--- a/engines/sword25/script/luascript.h
+++ b/engines/sword25/script/luascript.h
@@ -39,14 +39,7 @@
#include "common/str-array.h"
#include "sword25/kernel/common.h"
#include "sword25/script/script.h"
-
-namespace Lua {
-
-struct lua_State;
-
-}
-
-using namespace Lua;
+#include "sword25/util/lua/lua.h"
namespace Sword25 {
diff --git a/engines/sword25/util/lua/lapi.c b/engines/sword25/util/lua/lapi.cpp
index e4a3d86dc3..e4a3d86dc3 100644
--- a/engines/sword25/util/lua/lapi.c
+++ b/engines/sword25/util/lua/lapi.cpp
diff --git a/engines/sword25/util/lua/lauxlib.c b/engines/sword25/util/lua/lauxlib.cpp
index 53c0556625..53c0556625 100644
--- a/engines/sword25/util/lua/lauxlib.c
+++ b/engines/sword25/util/lua/lauxlib.cpp
diff --git a/engines/sword25/util/lua/lbaselib.c b/engines/sword25/util/lua/lbaselib.cpp
index 5032e6322a..5032e6322a 100644
--- a/engines/sword25/util/lua/lbaselib.c
+++ b/engines/sword25/util/lua/lbaselib.cpp
diff --git a/engines/sword25/util/lua/lcode.c b/engines/sword25/util/lua/lcode.cpp
index 6e7e10017f..6e7e10017f 100644
--- a/engines/sword25/util/lua/lcode.c
+++ b/engines/sword25/util/lua/lcode.cpp
diff --git a/engines/sword25/util/lua/ldblib.c b/engines/sword25/util/lua/ldblib.cpp
index b2e249e9b7..b2e249e9b7 100644
--- a/engines/sword25/util/lua/ldblib.c
+++ b/engines/sword25/util/lua/ldblib.cpp
diff --git a/engines/sword25/util/lua/ldebug.c b/engines/sword25/util/lua/ldebug.cpp
index 0b26522b31..0b26522b31 100644
--- a/engines/sword25/util/lua/ldebug.c
+++ b/engines/sword25/util/lua/ldebug.cpp
diff --git a/engines/sword25/util/lua/ldo.c b/engines/sword25/util/lua/ldo.cpp
index 07508fbb14..07508fbb14 100644
--- a/engines/sword25/util/lua/ldo.c
+++ b/engines/sword25/util/lua/ldo.cpp
diff --git a/engines/sword25/util/lua/ldump.c b/engines/sword25/util/lua/ldump.cpp
index 3ce16542d6..3ce16542d6 100644
--- a/engines/sword25/util/lua/ldump.c
+++ b/engines/sword25/util/lua/ldump.cpp
diff --git a/engines/sword25/util/lua/lfunc.c b/engines/sword25/util/lua/lfunc.cpp
index ce7acf4e77..ce7acf4e77 100644
--- a/engines/sword25/util/lua/lfunc.c
+++ b/engines/sword25/util/lua/lfunc.cpp
diff --git a/engines/sword25/util/lua/lgc.c b/engines/sword25/util/lua/lgc.cpp
index 52ff72bdc9..52ff72bdc9 100644
--- a/engines/sword25/util/lua/lgc.c
+++ b/engines/sword25/util/lua/lgc.cpp
diff --git a/engines/sword25/util/lua/linit.c b/engines/sword25/util/lua/linit.cpp
index 93f41d0350..93f41d0350 100644
--- a/engines/sword25/util/lua/linit.c
+++ b/engines/sword25/util/lua/linit.cpp
diff --git a/engines/sword25/util/lua/liolib.c b/engines/sword25/util/lua/liolib.cpp
index aa44dcafa3..aa44dcafa3 100644
--- a/engines/sword25/util/lua/liolib.c
+++ b/engines/sword25/util/lua/liolib.cpp
diff --git a/engines/sword25/util/lua/llex.c b/engines/sword25/util/lua/llex.cpp
index fdde2b8e5f..fdde2b8e5f 100644
--- a/engines/sword25/util/lua/llex.c
+++ b/engines/sword25/util/lua/llex.cpp
diff --git a/engines/sword25/util/lua/lmathlib.c b/engines/sword25/util/lua/lmathlib.cpp
index fd9c69681f..fd9c69681f 100644
--- a/engines/sword25/util/lua/lmathlib.c
+++ b/engines/sword25/util/lua/lmathlib.cpp
diff --git a/engines/sword25/util/lua/lmem.c b/engines/sword25/util/lua/lmem.cpp
index ccd69357e0..ccd69357e0 100644
--- a/engines/sword25/util/lua/lmem.c
+++ b/engines/sword25/util/lua/lmem.cpp
diff --git a/engines/sword25/util/lua/loadlib.c b/engines/sword25/util/lua/loadlib.cpp
index e060611450..e060611450 100644
--- a/engines/sword25/util/lua/loadlib.c
+++ b/engines/sword25/util/lua/loadlib.cpp
diff --git a/engines/sword25/util/lua/lobject.c b/engines/sword25/util/lua/lobject.cpp
index 24718931ed..24718931ed 100644
--- a/engines/sword25/util/lua/lobject.c
+++ b/engines/sword25/util/lua/lobject.cpp
diff --git a/engines/sword25/util/lua/lopcodes.c b/engines/sword25/util/lua/lopcodes.cpp
index d9da16f689..d9da16f689 100644
--- a/engines/sword25/util/lua/lopcodes.c
+++ b/engines/sword25/util/lua/lopcodes.cpp
diff --git a/engines/sword25/util/lua/loslib.c b/engines/sword25/util/lua/loslib.cpp
index 70a67bccf7..70a67bccf7 100644
--- a/engines/sword25/util/lua/loslib.c
+++ b/engines/sword25/util/lua/loslib.cpp
diff --git a/engines/sword25/util/lua/lparser.c b/engines/sword25/util/lua/lparser.cpp
index 03ea333315..03ea333315 100644
--- a/engines/sword25/util/lua/lparser.c
+++ b/engines/sword25/util/lua/lparser.cpp
diff --git a/engines/sword25/util/lua/lstate.c b/engines/sword25/util/lua/lstate.cpp
index 495d75c8a6..495d75c8a6 100644
--- a/engines/sword25/util/lua/lstate.c
+++ b/engines/sword25/util/lua/lstate.cpp
diff --git a/engines/sword25/util/lua/lstring.c b/engines/sword25/util/lua/lstring.cpp
index cd55cc63bf..cd55cc63bf 100644
--- a/engines/sword25/util/lua/lstring.c
+++ b/engines/sword25/util/lua/lstring.cpp
diff --git a/engines/sword25/util/lua/lstrlib.c b/engines/sword25/util/lua/lstrlib.cpp
index e5501b9b49..e5501b9b49 100644
--- a/engines/sword25/util/lua/lstrlib.c
+++ b/engines/sword25/util/lua/lstrlib.cpp
diff --git a/engines/sword25/util/lua/ltable.c b/engines/sword25/util/lua/ltable.cpp
index 35d763eac3..35d763eac3 100644
--- a/engines/sword25/util/lua/ltable.c
+++ b/engines/sword25/util/lua/ltable.cpp
diff --git a/engines/sword25/util/lua/ltablib.c b/engines/sword25/util/lua/ltablib.cpp
index 607c09ae71..607c09ae71 100644
--- a/engines/sword25/util/lua/ltablib.c
+++ b/engines/sword25/util/lua/ltablib.cpp
diff --git a/engines/sword25/util/lua/ltm.c b/engines/sword25/util/lua/ltm.cpp
index 02856a58fc..02856a58fc 100644
--- a/engines/sword25/util/lua/ltm.c
+++ b/engines/sword25/util/lua/ltm.cpp
diff --git a/engines/sword25/util/lua/lundump.c b/engines/sword25/util/lua/lundump.cpp
index 4ffc623575..4ffc623575 100644
--- a/engines/sword25/util/lua/lundump.c
+++ b/engines/sword25/util/lua/lundump.cpp
diff --git a/engines/sword25/util/lua/lvm.c b/engines/sword25/util/lua/lvm.cpp
index ae70fe2645..ae70fe2645 100644
--- a/engines/sword25/util/lua/lvm.c
+++ b/engines/sword25/util/lua/lvm.cpp
diff --git a/engines/sword25/util/lua/lzio.c b/engines/sword25/util/lua/lzio.cpp
index e1e7b28a29..e1e7b28a29 100644
--- a/engines/sword25/util/lua/lzio.c
+++ b/engines/sword25/util/lua/lzio.cpp
diff --git a/engines/sword25/util/lua/print.c b/engines/sword25/util/lua/print.cpp
index 22039c9861..22039c9861 100644
--- a/engines/sword25/util/lua/print.c
+++ b/engines/sword25/util/lua/print.cpp
diff --git a/engines/sword25/util/pluto/pdep.c b/engines/sword25/util/pluto/pdep.cpp
index a32c43b42d..a32c43b42d 100644
--- a/engines/sword25/util/pluto/pdep.c
+++ b/engines/sword25/util/pluto/pdep.cpp
diff --git a/engines/sword25/util/pluto/pluto.c b/engines/sword25/util/pluto/pluto.cpp
index 61eb40e984..61eb40e984 100644
--- a/engines/sword25/util/pluto/pluto.c
+++ b/engines/sword25/util/pluto/pluto.cpp
diff --git a/engines/sword25/util/pluto/plzio.c b/engines/sword25/util/pluto/plzio.cpp
index 0efc3dfcf2..0efc3dfcf2 100644
--- a/engines/sword25/util/pluto/plzio.c
+++ b/engines/sword25/util/pluto/plzio.cpp
diff --git a/engines/sword25/util/pluto/pptest.c b/engines/sword25/util/pluto/pptest.cpp
index 1bfecf2b75..1bfecf2b75 100644
--- a/engines/sword25/util/pluto/pptest.c
+++ b/engines/sword25/util/pluto/pptest.cpp
diff --git a/engines/sword25/util/pluto/puptest.c b/engines/sword25/util/pluto/puptest.cpp
index e9aa7ea305..e9aa7ea305 100644
--- a/engines/sword25/util/pluto/puptest.c
+++ b/engines/sword25/util/pluto/puptest.cpp