diff options
Diffstat (limited to 'source/squirrelbindings')
-rw-r--r-- | source/squirrelbindings/SquirrelArray.h | 24 | ||||
-rw-r--r-- | source/squirrelbindings/SquirrelBaseClass.h | 29 | ||||
-rw-r--r-- | source/squirrelbindings/SquirrelBindings.cpp | 30 | ||||
-rw-r--r-- | source/squirrelbindings/SquirrelBindings.h | 23 | ||||
-rw-r--r-- | source/squirrelbindings/SquirrelFunctions.cpp | 28 | ||||
-rw-r--r-- | source/squirrelbindings/SquirrelFunctions.h | 24 | ||||
-rw-r--r-- | source/squirrelbindings/SquirrelObject.h | 28 |
7 files changed, 175 insertions, 11 deletions
diff --git a/source/squirrelbindings/SquirrelArray.h b/source/squirrelbindings/SquirrelArray.h index 0c2e34f7f..c54315aae 100644 --- a/source/squirrelbindings/SquirrelArray.h +++ b/source/squirrelbindings/SquirrelArray.h @@ -1,5 +1,15 @@ +
#pragma once
-#include <string>
+
+
+
+
+
+#ifdef USE_SQUIRREL
+
+
+
+
template <typename T>
class SquirrelArray
@@ -33,4 +43,14 @@ protected: };
-class SquirrelStringArray : public SquirrelArray<std::string> { };
\ No newline at end of file +class SquirrelStringArray : public SquirrelArray<std::string> { };
+
+
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+
diff --git a/source/squirrelbindings/SquirrelBaseClass.h b/source/squirrelbindings/SquirrelBaseClass.h index ef03c1a55..36f532611 100644 --- a/source/squirrelbindings/SquirrelBaseClass.h +++ b/source/squirrelbindings/SquirrelBaseClass.h @@ -1,11 +1,26 @@ +
#pragma once
+
+
+
+
+#ifdef USE_SQUIRREL
+
+
+
+
+
#include "SquirrelBindings.h"
#include "../Plugin_Squirrel.h"
#include "../PluginManager.h"
#include "../Root.h"
#include "../SquirrelCommandBinder.h"
-//The baseclass for squirrel plugins
+
+
+
+
+// The baseclass for squirrel plugins
class cSquirrelBaseClass
{
public:
@@ -38,4 +53,14 @@ public: protected:
cPlugin_Squirrel *m_Instance;
-};
\ No newline at end of file +};
+
+
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+
diff --git a/source/squirrelbindings/SquirrelBindings.cpp b/source/squirrelbindings/SquirrelBindings.cpp index 5c6b585f4..a463e55d1 100644 --- a/source/squirrelbindings/SquirrelBindings.cpp +++ b/source/squirrelbindings/SquirrelBindings.cpp @@ -1,4 +1,15 @@ +
#include "Globals.h"
+
+
+
+
+
+#ifdef USE_SQUIRREL
+
+
+
+
#include "SquirrelBindings.h"
#include "SquirrelFunctions.h"
@@ -7,9 +18,16 @@ #include "../Player.h"
+
+
+
+
using namespace Sqrat;
-#ifdef USE_SQUIRREL
+
+
+
+
void BindSquirrel(HSQUIRRELVM vm)
{
RootTable()
@@ -166,4 +184,12 @@ void BindSquirrel(HSQUIRRELVM vm) .Const("UpdatedSign", cPluginManager::HOOK_UPDATED_SIGN));
}
-#endif
\ No newline at end of file +
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+
diff --git a/source/squirrelbindings/SquirrelBindings.h b/source/squirrelbindings/SquirrelBindings.h index e16311d6a..fef563f4a 100644 --- a/source/squirrelbindings/SquirrelBindings.h +++ b/source/squirrelbindings/SquirrelBindings.h @@ -1,11 +1,32 @@ +
#pragma once
+
+
+
#ifdef USE_SQUIRREL
+
+
+
+
#include <squirrel.h>
#include <sqrat.h>
+
+
+
+
void BindSquirrel(HSQUIRRELVM vm);
-#endif
+
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+
+
diff --git a/source/squirrelbindings/SquirrelFunctions.cpp b/source/squirrelbindings/SquirrelFunctions.cpp index b6410ad2e..0e35f7361 100644 --- a/source/squirrelbindings/SquirrelFunctions.cpp +++ b/source/squirrelbindings/SquirrelFunctions.cpp @@ -1,13 +1,29 @@ #include "Globals.h"
+
+
+
+
+
+#ifdef USE_SQUIRREL
+
+
+
+
+
#include "SquirrelFunctions.h"
#include "SquirrelBindings.h"
-#ifdef USE_SQUIRREL
+
+
static HSQUIRRELVM squirrelvm = NULL;
+
+
+
+
SQInteger runtimeErrorHandler(HSQUIRRELVM a_VM)
{
const SQChar *sErr = 0;
@@ -67,4 +83,12 @@ void sqPrint(SQChar * text) LOGINFO("%s", text);
}
-#endif
\ No newline at end of file +
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+
diff --git a/source/squirrelbindings/SquirrelFunctions.h b/source/squirrelbindings/SquirrelFunctions.h index 0d08a726c..2b74fb52d 100644 --- a/source/squirrelbindings/SquirrelFunctions.h +++ b/source/squirrelbindings/SquirrelFunctions.h @@ -1,6 +1,28 @@ +
#pragma once
+
+#ifdef USE_SQUIRREL
+
+
+
+
#include <sqrat.h>
+
+
+
+
+
HSQUIRRELVM OpenSquirrelVM();
void CloseSquirrelVM();
-void sqPrint(SQChar * text);
\ No newline at end of file +void sqPrint(SQChar * text);
+
+
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+
diff --git a/source/squirrelbindings/SquirrelObject.h b/source/squirrelbindings/SquirrelObject.h index 547dd4e02..a7a44d531 100644 --- a/source/squirrelbindings/SquirrelObject.h +++ b/source/squirrelbindings/SquirrelObject.h @@ -1,6 +1,22 @@ +
#pragma once
+
+
+
+
+
+#ifdef USE_SQUIRREL
+
+
+
+
+
#include <sqrat.h>
+
+
+
+
class SquirrelObject
{
public:
@@ -26,4 +42,14 @@ public: protected:
Sqrat::Object m_SquirrelObject;
-};
\ No newline at end of file +};
+
+
+
+
+
+#endif // USE_SQUIRREL
+
+
+
+
|