From 8285a11a26d78784f26b76e6bcdfa479f6c1a345 Mon Sep 17 00:00:00 2001
From: faketruth
Date: Tue, 8 Nov 2011 01:25:01 +0000
Subject: It's a Squirrel!! In SquirrelBindings.h use #define USE_SQUIRREL 1 to
enable squirrel
git-svn-id: http://mc-server.googlecode.com/svn/trunk@76 0a769ca7-a7f5-676a-18bf-c427514a06d6
---
Plugins/SquirrelChatLog.nut | 26 +
VC2010/JsonCpp.vcxproj | 1 +
VC2010/MCServer.sln | 17 +-
VC2010/MCServer.vcxproj | 14 +-
VC2010/MCServer.vcxproj.filters | 10 +
VC2010/WebServer.vcxproj | 1 +
VC2010/ZLib.vcxproj | 3 +-
VC2010/lua-5.1.4.vcxproj | 3 +-
VC2010/tolua++-1.0.93.vcxproj | 1 +
settings.ini | 1 +
source/Bindings.cpp | 281 ++-
source/Bindings.h | 2 +-
source/SquirrelBindings.cpp | 136 ++
source/SquirrelBindings.h | 15 +
source/cClientHandle.cpp | 1 +
source/cPlugin.cpp | 3 +-
source/cPlugin.h | 18 +-
source/cPluginManager.cpp | 87 +-
source/cPluginManager.h | 3 +-
source/cWebAdmin.cpp | 2 +-
source/main.cpp | 12 +
squirrel_3_0_1_stable/COMPILE | 41 +
squirrel_3_0_1_stable/COPYRIGHT | 21 +
squirrel_3_0_1_stable/HISTORY | 422 ++++
squirrel_3_0_1_stable/Makefile | 18 +
squirrel_3_0_1_stable/README | 23 +
squirrel_3_0_1_stable/include/sqstdaux.h | 16 +
squirrel_3_0_1_stable/include/sqstdblob.h | 20 +
squirrel_3_0_1_stable/include/sqstdio.h | 53 +
squirrel_3_0_1_stable/include/sqstdmath.h | 15 +
squirrel_3_0_1_stable/include/sqstdstring.h | 33 +
squirrel_3_0_1_stable/include/sqstdsystem.h | 15 +
squirrel_3_0_1_stable/include/squirrel.h | 500 +++++
squirrel_3_0_1_stable/sqplus/Makefile | 18 +
squirrel_3_0_1_stable/sqplus/SqPlus.cpp | 382 ++++
squirrel_3_0_1_stable/sqplus/SqPlusCallTemplates.h | 337 +++
squirrel_3_0_1_stable/sqplus/SqPlusConst.h | 74 +
.../sqplus/SqPlusFunctionCallImpl.h | 114 +
squirrel_3_0_1_stable/sqplus/SqPlusOCharBuf.cpp | 61 +
squirrel_3_0_1_stable/sqplus/SqPlusOCharBuf.h | 193 ++
squirrel_3_0_1_stable/sqplus/SqPlusOverload.h | 819 +++++++
squirrel_3_0_1_stable/sqplus/SqPlusSetup.h | 129 ++
squirrel_3_0_1_stable/sqplus/SqPlusSmartPointer.h | 141 ++
squirrel_3_0_1_stable/sqplus/SqPlusTypeMask.h | 169 ++
squirrel_3_0_1_stable/sqplus/SqPlusUtf8.cpp | 133 ++
squirrel_3_0_1_stable/sqplus/SqPlusUtf8.h | 15 +
.../sqplus/SquirrelBindingsUtils.cpp | 161 ++
.../sqplus/SquirrelBindingsUtils.h | 152 ++
.../sqplus/SquirrelBindingsUtilsWin32.cpp | 31 +
.../sqplus/SquirrelBindingsUtilsWin32.h | 41 +
squirrel_3_0_1_stable/sqplus/SquirrelObject.cpp | 702 ++++++
squirrel_3_0_1_stable/sqplus/SquirrelObject.h | 256 +++
squirrel_3_0_1_stable/sqplus/SquirrelVM.cpp | 505 +++++
squirrel_3_0_1_stable/sqplus/SquirrelVM.h | 179 ++
squirrel_3_0_1_stable/sqplus/changes.txt | 359 +++
squirrel_3_0_1_stable/sqplus/sqplus.cbp | 190 ++
squirrel_3_0_1_stable/sqplus/sqplus.h | 2327 ++++++++++++++++++++
squirrel_3_0_1_stable/sqplus/sqplus.vcproj | 355 +++
squirrel_3_0_1_stable/sqplus/sqplus.vcxproj | 159 ++
.../sqplus/sqplus.vcxproj.filters | 65 +
squirrel_3_0_1_stable/sqplus/sqplus.vcxproj.user | 3 +
squirrel_3_0_1_stable/sqplus/sqplus71.vcproj | 235 ++
squirrel_3_0_1_stable/sqplus/sqplusWin32.h | 7 +
squirrel_3_0_1_stable/sqstdlib/Makefile | 41 +
squirrel_3_0_1_stable/sqstdlib/sqstdaux.cpp | 129 ++
squirrel_3_0_1_stable/sqstdlib/sqstdblob.cpp | 275 +++
squirrel_3_0_1_stable/sqstdlib/sqstdblobimpl.h | 108 +
squirrel_3_0_1_stable/sqstdlib/sqstdio.cpp | 419 ++++
squirrel_3_0_1_stable/sqstdlib/sqstdlib.dsp | 131 ++
squirrel_3_0_1_stable/sqstdlib/sqstdmath.cpp | 107 +
squirrel_3_0_1_stable/sqstdlib/sqstdrex.cpp | 638 ++++++
squirrel_3_0_1_stable/sqstdlib/sqstdstream.cpp | 336 +++
squirrel_3_0_1_stable/sqstdlib/sqstdstream.h | 18 +
squirrel_3_0_1_stable/sqstdlib/sqstdstring.cpp | 378 ++++
squirrel_3_0_1_stable/sqstdlib/sqstdsystem.cpp | 147 ++
squirrel_3_0_1_stable/squirrel.dsw | 77 +
squirrel_3_0_1_stable/squirrel/Makefile | 52 +
squirrel_3_0_1_stable/squirrel/sqapi.cpp | 1456 ++++++++++++
squirrel_3_0_1_stable/squirrel/sqarray.h | 94 +
squirrel_3_0_1_stable/squirrel/sqbaselib.cpp | 1110 ++++++++++
squirrel_3_0_1_stable/squirrel/sqclass.cpp | 213 ++
squirrel_3_0_1_stable/squirrel/sqclass.h | 158 ++
squirrel_3_0_1_stable/squirrel/sqclosure.h | 193 ++
squirrel_3_0_1_stable/squirrel/sqcompiler.cpp | 1504 +++++++++++++
squirrel_3_0_1_stable/squirrel/sqcompiler.h | 77 +
squirrel_3_0_1_stable/squirrel/sqdebug.cpp | 116 +
squirrel_3_0_1_stable/squirrel/sqfuncproto.h | 154 ++
squirrel_3_0_1_stable/squirrel/sqfuncstate.cpp | 652 ++++++
squirrel_3_0_1_stable/squirrel/sqfuncstate.h | 91 +
squirrel_3_0_1_stable/squirrel/sqlexer.cpp | 489 ++++
squirrel_3_0_1_stable/squirrel/sqlexer.h | 47 +
squirrel_3_0_1_stable/squirrel/sqmem.cpp | 9 +
squirrel_3_0_1_stable/squirrel/sqobject.cpp | 655 ++++++
squirrel_3_0_1_stable/squirrel/sqobject.h | 354 +++
squirrel_3_0_1_stable/squirrel/sqopcodes.h | 132 ++
squirrel_3_0_1_stable/squirrel/sqpcheader.h | 19 +
squirrel_3_0_1_stable/squirrel/sqstate.cpp | 648 ++++++
squirrel_3_0_1_stable/squirrel/sqstate.h | 144 ++
squirrel_3_0_1_stable/squirrel/sqstring.h | 31 +
squirrel_3_0_1_stable/squirrel/sqtable.cpp | 220 ++
squirrel_3_0_1_stable/squirrel/sqtable.h | 92 +
squirrel_3_0_1_stable/squirrel/squirrel.dsp | 302 +++
squirrel_3_0_1_stable/squirrel/squserdata.h | 40 +
squirrel_3_0_1_stable/squirrel/squtils.h | 112 +
squirrel_3_0_1_stable/squirrel/sqvm.cpp | 1714 ++++++++++++++
squirrel_3_0_1_stable/squirrel/sqvm.h | 208 ++
users.ini | 31 +-
107 files changed, 23980 insertions(+), 67 deletions(-)
create mode 100644 Plugins/SquirrelChatLog.nut
create mode 100644 source/SquirrelBindings.cpp
create mode 100644 source/SquirrelBindings.h
create mode 100644 squirrel_3_0_1_stable/COMPILE
create mode 100644 squirrel_3_0_1_stable/COPYRIGHT
create mode 100644 squirrel_3_0_1_stable/HISTORY
create mode 100644 squirrel_3_0_1_stable/Makefile
create mode 100644 squirrel_3_0_1_stable/README
create mode 100644 squirrel_3_0_1_stable/include/sqstdaux.h
create mode 100644 squirrel_3_0_1_stable/include/sqstdblob.h
create mode 100644 squirrel_3_0_1_stable/include/sqstdio.h
create mode 100644 squirrel_3_0_1_stable/include/sqstdmath.h
create mode 100644 squirrel_3_0_1_stable/include/sqstdstring.h
create mode 100644 squirrel_3_0_1_stable/include/sqstdsystem.h
create mode 100644 squirrel_3_0_1_stable/include/squirrel.h
create mode 100644 squirrel_3_0_1_stable/sqplus/Makefile
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlus.cpp
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusCallTemplates.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusConst.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusFunctionCallImpl.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusOCharBuf.cpp
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusOCharBuf.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusOverload.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusSetup.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusSmartPointer.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusTypeMask.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusUtf8.cpp
create mode 100644 squirrel_3_0_1_stable/sqplus/SqPlusUtf8.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtils.cpp
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtils.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.cpp
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelBindingsUtilsWin32.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelObject.cpp
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelObject.h
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelVM.cpp
create mode 100644 squirrel_3_0_1_stable/sqplus/SquirrelVM.h
create mode 100644 squirrel_3_0_1_stable/sqplus/changes.txt
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplus.cbp
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplus.h
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplus.vcproj
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplus.vcxproj
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplus.vcxproj.filters
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplus.vcxproj.user
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplus71.vcproj
create mode 100644 squirrel_3_0_1_stable/sqplus/sqplusWin32.h
create mode 100644 squirrel_3_0_1_stable/sqstdlib/Makefile
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdaux.cpp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdblob.cpp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdblobimpl.h
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdio.cpp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdlib.dsp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdmath.cpp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdrex.cpp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdstream.cpp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdstream.h
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdstring.cpp
create mode 100644 squirrel_3_0_1_stable/sqstdlib/sqstdsystem.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel.dsw
create mode 100644 squirrel_3_0_1_stable/squirrel/Makefile
create mode 100644 squirrel_3_0_1_stable/squirrel/sqapi.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqarray.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqbaselib.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqclass.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqclass.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqclosure.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqcompiler.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqcompiler.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqdebug.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqfuncproto.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqfuncstate.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqfuncstate.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqlexer.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqlexer.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqmem.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqobject.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqobject.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqopcodes.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqpcheader.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqstate.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqstate.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqstring.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqtable.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqtable.h
create mode 100644 squirrel_3_0_1_stable/squirrel/squirrel.dsp
create mode 100644 squirrel_3_0_1_stable/squirrel/squserdata.h
create mode 100644 squirrel_3_0_1_stable/squirrel/squtils.h
create mode 100644 squirrel_3_0_1_stable/squirrel/sqvm.cpp
create mode 100644 squirrel_3_0_1_stable/squirrel/sqvm.h
diff --git a/Plugins/SquirrelChatLog.nut b/Plugins/SquirrelChatLog.nut
new file mode 100644
index 000000000..586e8d6e2
--- /dev/null
+++ b/Plugins/SquirrelChatLog.nut
@@ -0,0 +1,26 @@
+class SquirrelChatLog extends cPlugin__Squirrel
+{
+ constructor()
+ {
+ base.constructor();
+ }
+
+ function Initialize()
+ {
+ ::print("SquirrelChatLog initialize()");
+ this.SetName("SquirrelChatLog");
+
+ local PluginManager = cRoot.Get().GetPluginManager();
+ PluginManager.AddHook( this, PluginManager.E_PLUGIN_CHAT );
+ return true;
+ }
+
+ function OnChat( Message, Player )
+ {
+ ::print(Player.GetName() + ": " + Message);
+ }
+}
+
+
+Plugin <- SquirrelChatLog();
+cRoot.Get().GetPluginManager().AddPlugin( Plugin );
diff --git a/VC2010/JsonCpp.vcxproj b/VC2010/JsonCpp.vcxproj
index 1596ff6c1..7e92d3e51 100644
--- a/VC2010/JsonCpp.vcxproj
+++ b/VC2010/JsonCpp.vcxproj
@@ -55,6 +55,7 @@
true
..\jsoncpp-src-0.5.0\include;%(AdditionalIncludeDirectories)
MultiThreaded
+ Speed
true
diff --git a/VC2010/MCServer.sln b/VC2010/MCServer.sln
index 5ac930e28..79a5670f1 100644
--- a/VC2010/MCServer.sln
+++ b/VC2010/MCServer.sln
@@ -17,10 +17,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebServer", "WebServer.vcxp
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JsonCpp", "JsonCpp.vcxproj", "{ADBF25B9-7192-4E54-B35E-8EC47CA5EF86}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Converter", "Converter.vcxproj", "{9AB1FB82-2148-40E4-919F-3B184B4593C8}"
- ProjectSection(ProjectDependencies) = postProject
- {F6F43A78-816D-4C37-A07B-68BED529273A} = {F6F43A78-816D-4C37-A07B-68BED529273A}
- EndProjectSection
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "squirrel_3_0_1_stable", "squirrel_3_0_1_stable.vcxproj", "{4571CE2D-9E18-452F-90D6-94AE8E2406F4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -76,12 +73,12 @@ Global
{ADBF25B9-7192-4E54-B35E-8EC47CA5EF86}.Release|Win32.ActiveCfg = Release|Win32
{ADBF25B9-7192-4E54-B35E-8EC47CA5EF86}.Release|Win32.Build.0 = Release|Win32
{ADBF25B9-7192-4E54-B35E-8EC47CA5EF86}.Release|x64.ActiveCfg = Release|Win32
- {9AB1FB82-2148-40E4-919F-3B184B4593C8}.Debug|Win32.ActiveCfg = Debug|Win32
- {9AB1FB82-2148-40E4-919F-3B184B4593C8}.Debug|Win32.Build.0 = Debug|Win32
- {9AB1FB82-2148-40E4-919F-3B184B4593C8}.Debug|x64.ActiveCfg = Debug|Win32
- {9AB1FB82-2148-40E4-919F-3B184B4593C8}.Release|Win32.ActiveCfg = Release|Win32
- {9AB1FB82-2148-40E4-919F-3B184B4593C8}.Release|Win32.Build.0 = Release|Win32
- {9AB1FB82-2148-40E4-919F-3B184B4593C8}.Release|x64.ActiveCfg = Release|Win32
+ {4571CE2D-9E18-452F-90D6-94AE8E2406F4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4571CE2D-9E18-452F-90D6-94AE8E2406F4}.Debug|Win32.Build.0 = Debug|Win32
+ {4571CE2D-9E18-452F-90D6-94AE8E2406F4}.Debug|x64.ActiveCfg = Debug|Win32
+ {4571CE2D-9E18-452F-90D6-94AE8E2406F4}.Release|Win32.ActiveCfg = Release|Win32
+ {4571CE2D-9E18-452F-90D6-94AE8E2406F4}.Release|Win32.Build.0 = Release|Win32
+ {4571CE2D-9E18-452F-90D6-94AE8E2406F4}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/VC2010/MCServer.vcxproj b/VC2010/MCServer.vcxproj
index c761becb2..500c235e2 100644
--- a/VC2010/MCServer.vcxproj
+++ b/VC2010/MCServer.vcxproj
@@ -78,7 +78,7 @@
/ZI /D_DEBUG %(AdditionalOptions)
Disabled
- ..\tolua++-1.0.93\include;..\lua-5.1.4\src;..\zlib-1.2.5;..\mysql-connector\include;..\source\;..\pdcurs34\;..\jsoncpp-src-0.5.0\include;%(AdditionalIncludeDirectories)
+ ..\tolua++-1.0.93\include;..\lua-5.1.4\src;..\zlib-1.2.5;..\mysql-connector\include;..\source\;..\pdcurs34\;..\jsoncpp-src-0.5.0\include;..\squirrel_3_0_1_stable\include;..\squirrel_3_0_1_stable;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
false
Sync
@@ -94,7 +94,7 @@
/IGNORE:4078 %(AdditionalOptions)
- winmm.lib;ws2_32.lib;Psapi.lib;ZLib.lib;tolua++-1.0.93.lib;lua-5.1.4.lib;WebServer.lib;JsonCpp.lib;%(AdditionalDependencies)
+ winmm.lib;ws2_32.lib;Psapi.lib;ZLib.lib;tolua++-1.0.93.lib;lua-5.1.4.lib;WebServer.lib;JsonCpp.lib;squirrel_3_0_1_stable.lib;%(AdditionalDependencies)
../$(ProjectName)_debug.exe
VLD;./Debug/;%(AdditionalLibraryDirectories)
%(IgnoreSpecificDefaultLibraries)
@@ -145,10 +145,7 @@
Default
true
Speed
- false
- ..\tolua++-1.0.93\include;..\lua-5.1.4\src;..\zlib-1.2.5;..\mysql-connector\include;..\source\;..\pdcurs34\;..\jsoncpp-src-0.5.0\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions)
- Sync
+ ..\tolua++-1.0.93\include;..\lua-5.1.4\src;..\zlib-1.2.5;..\mysql-connector\include;..\source\;..\pdcurs34\;..\jsoncpp-src-0.5.0\include;..\squirrel_3_0_1_stable\include;..\squirrel_3_0_1_stable;%(AdditionalIncludeDirectories)
Default
MultiThreaded
false
@@ -161,10 +158,11 @@
Level4
+ true
/IGNORE:4078 %(AdditionalOptions)
- winmm.lib;ws2_32.lib;Psapi.lib;ZLib.lib;tolua++-1.0.93.lib;lua-5.1.4.lib;WebServer.lib;JsonCpp.lib;libCMT.lib;%(AdditionalDependencies)
+ winmm.lib;ws2_32.lib;Psapi.lib;ZLib.lib;tolua++-1.0.93.lib;lua-5.1.4.lib;WebServer.lib;JsonCpp.lib;squirrel_3_0_1_stable.lib;LIBCMT.LIB;%(AdditionalDependencies)
../$(ProjectName).exe
./Release/;%(AdditionalLibraryDirectories)
LIBCMT;%(IgnoreSpecificDefaultLibraries)
@@ -350,6 +348,7 @@
+
@@ -498,6 +497,7 @@
+
diff --git a/VC2010/MCServer.vcxproj.filters b/VC2010/MCServer.vcxproj.filters
index 7bdb69d87..77ed3cf2b 100644
--- a/VC2010/MCServer.vcxproj.filters
+++ b/VC2010/MCServer.vcxproj.filters
@@ -385,6 +385,9 @@
{b0401fd9-4021-4ab7-bf61-c8de112b4196}
+
+ {a71ee043-df55-4d42-a9aa-1643b40e1c22}
+
{0a6d025d-4fb8-4557-a348-004b819ea477}
@@ -781,6 +784,10 @@
cLavaSimulator
+
+ LuaBindings\SquirrelBindings
+
+
Packets\cPacket_Explosion
@@ -1212,6 +1219,9 @@
cLavaSimulator
+
+ LuaBindings\SquirrelBindings
+
Packets\cPacket_Explosion
diff --git a/VC2010/WebServer.vcxproj b/VC2010/WebServer.vcxproj
index c19fafad6..934c3803d 100644
--- a/VC2010/WebServer.vcxproj
+++ b/VC2010/WebServer.vcxproj
@@ -98,6 +98,7 @@
true
true
MultiThreaded
+ Speed
true
diff --git a/VC2010/ZLib.vcxproj b/VC2010/ZLib.vcxproj
index 6b8a56cb1..fcc0538e1 100644
--- a/VC2010/ZLib.vcxproj
+++ b/VC2010/ZLib.vcxproj
@@ -71,7 +71,6 @@
EnableFastChecks
MultiThreadedDebugDLL
Level3
- EditAndContinue
@@ -94,7 +93,7 @@
MultiThreaded
true
Level3
- ProgramDatabase
+ Speed
true
diff --git a/VC2010/lua-5.1.4.vcxproj b/VC2010/lua-5.1.4.vcxproj
index 2cf480b02..503345c0e 100644
--- a/VC2010/lua-5.1.4.vcxproj
+++ b/VC2010/lua-5.1.4.vcxproj
@@ -69,9 +69,9 @@
Disabled
true
EnableFastChecks
- MultiThreadedDebug
Level3
EditAndContinue
+ MultiThreadedDebugDLL
@@ -95,6 +95,7 @@
true
Level3
ProgramDatabase
+ Speed
true
diff --git a/VC2010/tolua++-1.0.93.vcxproj b/VC2010/tolua++-1.0.93.vcxproj
index 02d38f145..9fbec5d5d 100644
--- a/VC2010/tolua++-1.0.93.vcxproj
+++ b/VC2010/tolua++-1.0.93.vcxproj
@@ -98,6 +98,7 @@
true
Level3
ProgramDatabase
+ Speed
true
diff --git a/settings.ini b/settings.ini
index b30b03958..09bd77466 100644
--- a/settings.ini
+++ b/settings.ini
@@ -10,6 +10,7 @@ World=world_sexy
Plugin=Core
Plugin=Fire
Plugin=MagicCarpet
+Squirrel=SquirrelChatLog
[HelpPlugin]
ShowPluginNames=1
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index 330582dea..a0465e8ea 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 11/01/11 22:50:07.
+** Generated automatically by tolua++-1.0.92 on 11/08/11 02:11:35.
*/
#ifndef __cplusplus
@@ -6006,7 +6006,7 @@ static int tolua_AllToLua_cPluginManager_GetPlugin00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"cPluginManager",0,&tolua_err) ||
- !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
+ !tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
@@ -6014,7 +6014,7 @@ static int tolua_AllToLua_cPluginManager_GetPlugin00(lua_State* tolua_S)
#endif
{
cPluginManager* self = (cPluginManager*) tolua_tousertype(tolua_S,1,0);
- std::string a_Plugin = ((std::string) tolua_tocppstring(tolua_S,2,0));
+ const char* a_Plugin = ((const char*) tolua_tostring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPlugin'", NULL);
#endif
@@ -6545,7 +6545,7 @@ static int tolua_AllToLua_cPlugin_OnChat00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"cPlugin",0,&tolua_err) ||
- !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
+ !tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isusertype(tolua_S,3,"cPlayer",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
@@ -6554,7 +6554,7 @@ static int tolua_AllToLua_cPlugin_OnChat00(lua_State* tolua_S)
#endif
{
cPlugin* self = (cPlugin*) tolua_tousertype(tolua_S,1,0);
- std::string a_Chat = ((std::string) tolua_tocppstring(tolua_S,2,0));
+ const char* a_Chat = ((const char*) tolua_tostring(tolua_S,2,0));
cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'OnChat'", NULL);
@@ -6797,8 +6797,8 @@ static int tolua_AllToLua_cPlugin_GetName00(lua_State* tolua_S)
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetName'", NULL);
#endif
{
- std::string tolua_ret = (std::string) self->GetName();
- tolua_pushcppstring(tolua_S,(const char*)tolua_ret);
+ const char* tolua_ret = (const char*) self->GetName();
+ tolua_pushstring(tolua_S,(const char*)tolua_ret);
}
}
return 1;
@@ -6818,7 +6818,7 @@ static int tolua_AllToLua_cPlugin_SetName00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"cPlugin",0,&tolua_err) ||
- !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
+ !tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
@@ -6826,7 +6826,7 @@ static int tolua_AllToLua_cPlugin_SetName00(lua_State* tolua_S)
#endif
{
cPlugin* self = (cPlugin*) tolua_tousertype(tolua_S,1,0);
- std::string a_Name = ((std::string) tolua_tocppstring(tolua_S,2,0));
+ const char* a_Name = ((const char*) tolua_tostring(tolua_S,2,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetName'", NULL);
#endif
@@ -7120,9 +7120,9 @@ public:
return ( bool ) cPlugin:: OnBlockDig(a_PacketData,a_Player,a_PickupItem);
};
};
- bool OnChat( std::string a_Chat, cPlayer* a_Player) {
+ bool OnChat( const char* a_Chat, cPlayer* a_Player) {
if (push_method("OnChat", tolua_AllToLua_cPlugin_OnChat00)) {
- tolua_pushcppstring(lua_state, (const char*)a_Chat);
+ tolua_pushstring(lua_state, (const char*)a_Chat);
tolua_pushusertype(lua_state, (void*)a_Player, "cPlayer");
ToluaBase::dbcall(lua_state, 3, 1);
bool tolua_ret = ( bool )tolua_toboolean(lua_state, -1, 0);
@@ -7210,7 +7210,7 @@ public:
bool cPlugin__OnBlockDig( cPacket_BlockDig* a_PacketData, cPlayer* a_Player, cItem* a_PickupItem) {
return ( bool )cPlugin::OnBlockDig(a_PacketData,a_Player,a_PickupItem);
};
- bool cPlugin__OnChat( std::string a_Chat, cPlayer* a_Player) {
+ bool cPlugin__OnChat( const char* a_Chat, cPlayer* a_Player) {
return ( bool )cPlugin::OnChat(a_Chat,a_Player);
};
bool cPlugin__OnLogin( cPacket_Login* a_PacketData) {
@@ -7485,7 +7485,7 @@ static int tolua_AllToLua_Lua__cPlugin_cPlugin__OnChat00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"Lua__cPlugin",0,&tolua_err) ||
- !tolua_iscppstring(tolua_S,2,0,&tolua_err) ||
+ !tolua_isstring(tolua_S,2,0,&tolua_err) ||
!tolua_isusertype(tolua_S,3,"cPlayer",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
@@ -7494,7 +7494,7 @@ static int tolua_AllToLua_Lua__cPlugin_cPlugin__OnChat00(lua_State* tolua_S)
#endif
{
Lua__cPlugin* self = (Lua__cPlugin*) tolua_tousertype(tolua_S,1,0);
- std::string a_Chat = ((std::string) tolua_tocppstring(tolua_S,2,0));
+ const char* a_Chat = ((const char*) tolua_tostring(tolua_S,2,0));
cPlayer* a_Player = ((cPlayer*) tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
if (!self) tolua_error(tolua_S,"invalid 'self' in function 'cPlugin__OnChat'", NULL);
@@ -15097,7 +15097,22 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_BLOCK_LEAVES",E_BLOCK_LEAVES);
tolua_constant(tolua_S,"E_BLOCK_SPONGE",E_BLOCK_SPONGE);
tolua_constant(tolua_S,"E_BLOCK_GLASS",E_BLOCK_GLASS);
+ tolua_constant(tolua_S,"E_BLOCK_LAPIS_ORE",E_BLOCK_LAPIS_ORE);
+ tolua_constant(tolua_S,"E_BLOCK_LAPIS_BLOCK",E_BLOCK_LAPIS_BLOCK);
+ tolua_constant(tolua_S,"E_BLOCK_DISPENSER",E_BLOCK_DISPENSER);
+ tolua_constant(tolua_S,"E_BLOCK_SANDSTONE",E_BLOCK_SANDSTONE);
+ tolua_constant(tolua_S,"E_BLOCK_NOTE_BLOCK",E_BLOCK_NOTE_BLOCK);
+ tolua_constant(tolua_S,"E_BLOCK_BED",E_BLOCK_BED);
+ tolua_constant(tolua_S,"E_BLOCK_POWERED_RAIL",E_BLOCK_POWERED_RAIL);
+ tolua_constant(tolua_S,"E_BLOCK_DETECTOR_RAIL",E_BLOCK_DETECTOR_RAIL);
+ tolua_constant(tolua_S,"E_BLOCK_STICKY_PISTON",E_BLOCK_STICKY_PISTON);
+ tolua_constant(tolua_S,"E_BLOCK_COBWEB",E_BLOCK_COBWEB);
+ tolua_constant(tolua_S,"E_BLOCK_TALL_GRASS",E_BLOCK_TALL_GRASS);
+ tolua_constant(tolua_S,"E_BLOCK_DEAD_BUSH",E_BLOCK_DEAD_BUSH);
+ tolua_constant(tolua_S,"E_BLOCK_PISTON",E_BLOCK_PISTON);
+ tolua_constant(tolua_S,"E_BLOCK_PISTON_EXTENSION",E_BLOCK_PISTON_EXTENSION);
tolua_constant(tolua_S,"E_BLOCK_WHITE_CLOTH",E_BLOCK_WHITE_CLOTH);
+ tolua_constant(tolua_S,"E_BLOCK_PISTON_MOVED_BLOCK",E_BLOCK_PISTON_MOVED_BLOCK);
tolua_constant(tolua_S,"E_BLOCK_YELLOW_FLOWER",E_BLOCK_YELLOW_FLOWER);
tolua_constant(tolua_S,"E_BLOCK_RED_ROSE",E_BLOCK_RED_ROSE);
tolua_constant(tolua_S,"E_BLOCK_BROWN_MUSHROOM",E_BLOCK_BROWN_MUSHROOM);
@@ -15136,14 +15151,18 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_BLOCK_WOODEN_PRESSURE_PLATE",E_BLOCK_WOODEN_PRESSURE_PLATE);
tolua_constant(tolua_S,"E_BLOCK_REDSTONE_ORE",E_BLOCK_REDSTONE_ORE);
tolua_constant(tolua_S,"E_BLOCK_REDSTONE_ORE_GLOWING",E_BLOCK_REDSTONE_ORE_GLOWING);
- tolua_constant(tolua_S,"E_BLOCK_REDSTONE_TORCH_ON",E_BLOCK_REDSTONE_TORCH_ON);
tolua_constant(tolua_S,"E_BLOCK_REDSTONE_TORCH_OFF",E_BLOCK_REDSTONE_TORCH_OFF);
+ tolua_constant(tolua_S,"E_BLOCK_REDSTONE_TORCH_ON",E_BLOCK_REDSTONE_TORCH_ON);
+ tolua_constant(tolua_S,"E_BLOCK_STONE_BUTTON",E_BLOCK_STONE_BUTTON);
tolua_constant(tolua_S,"E_BLOCK_SNOW",E_BLOCK_SNOW);
tolua_constant(tolua_S,"E_BLOCK_ICE",E_BLOCK_ICE);
tolua_constant(tolua_S,"E_BLOCK_SNOW_BLOCK",E_BLOCK_SNOW_BLOCK);
tolua_constant(tolua_S,"E_BLOCK_CACTUS",E_BLOCK_CACTUS);
tolua_constant(tolua_S,"E_BLOCK_CLAY",E_BLOCK_CLAY);
tolua_constant(tolua_S,"E_BLOCK_REEDS",E_BLOCK_REEDS);
+ tolua_constant(tolua_S,"E_BLOCK_JUKEBOX",E_BLOCK_JUKEBOX);
+ tolua_constant(tolua_S,"E_BLOCK_FENCE",E_BLOCK_FENCE);
+ tolua_constant(tolua_S,"E_BLOCK_PUMPKIN",E_BLOCK_PUMPKIN);
tolua_constant(tolua_S,"E_BLOCK_BLOODSTONE",E_BLOCK_BLOODSTONE);
tolua_constant(tolua_S,"E_BLOCK_SOULSAND",E_BLOCK_SOULSAND);
tolua_constant(tolua_S,"E_BLOCK_GLOWSTONE",E_BLOCK_GLOWSTONE);
@@ -15154,6 +15173,32 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_BLOCK_REDSTONE_REPEATER_ON",E_BLOCK_REDSTONE_REPEATER_ON);
tolua_constant(tolua_S,"E_BLOCK_LOCKED_CHEST",E_BLOCK_LOCKED_CHEST);
tolua_constant(tolua_S,"E_BLOCK_TRAPDOOR",E_BLOCK_TRAPDOOR);
+ tolua_constant(tolua_S,"E_BLOCK_SILVERFISH_EGG",E_BLOCK_SILVERFISH_EGG);
+ tolua_constant(tolua_S,"E_BLOCK_STONE_BRICKS",E_BLOCK_STONE_BRICKS);
+ tolua_constant(tolua_S,"E_BLOCK_HUGE_BROWN_MUSHROOM",E_BLOCK_HUGE_BROWN_MUSHROOM);
+ tolua_constant(tolua_S,"E_BLOCK_HUGE_RED_MUSHROOM",E_BLOCK_HUGE_RED_MUSHROOM);
+ tolua_constant(tolua_S,"E_BLOCK_IRON_BAR",E_BLOCK_IRON_BAR);
+ tolua_constant(tolua_S,"E_BLOCK_GLASS_PLANE",E_BLOCK_GLASS_PLANE);
+ tolua_constant(tolua_S,"E_BLOCK_MELON",E_BLOCK_MELON);
+ tolua_constant(tolua_S,"E_BLOCK_PUMPKIN_STEM",E_BLOCK_PUMPKIN_STEM);
+ tolua_constant(tolua_S,"E_BLOCK_MELON_STEM",E_BLOCK_MELON_STEM);
+ tolua_constant(tolua_S,"E_BLOCK_VINES",E_BLOCK_VINES);
+ tolua_constant(tolua_S,"E_BLOCK_FENCE_GATE",E_BLOCK_FENCE_GATE);
+ tolua_constant(tolua_S,"E_BLOCK_BRICK_STAIRS",E_BLOCK_BRICK_STAIRS);
+ tolua_constant(tolua_S,"E_BLOCK_STONE_BRICK_STAIRS",E_BLOCK_STONE_BRICK_STAIRS);
+ tolua_constant(tolua_S,"E_BLOCK_MYCELIUM",E_BLOCK_MYCELIUM);
+ tolua_constant(tolua_S,"E_BLOCK_LILY_PAD",E_BLOCK_LILY_PAD);
+ tolua_constant(tolua_S,"E_BLOCK_NETHER_BRICK",E_BLOCK_NETHER_BRICK);
+ tolua_constant(tolua_S,"E_BLOCK_NETHER_BRICK_FENCE",E_BLOCK_NETHER_BRICK_FENCE);
+ tolua_constant(tolua_S,"E_BLOCK_NETHER_BRICK_STAIRS",E_BLOCK_NETHER_BRICK_STAIRS);
+ tolua_constant(tolua_S,"E_BLOCK_NETHER_WART",E_BLOCK_NETHER_WART);
+ tolua_constant(tolua_S,"E_BLOCK_ENCHANTMENT_TABLE",E_BLOCK_ENCHANTMENT_TABLE);
+ tolua_constant(tolua_S,"E_BLOCK_BREWING_STAND",E_BLOCK_BREWING_STAND);
+ tolua_constant(tolua_S,"E_BLOCK_CAULDRON",E_BLOCK_CAULDRON);
+ tolua_constant(tolua_S,"E_BLOCK_END_PORTAL",E_BLOCK_END_PORTAL);
+ tolua_constant(tolua_S,"E_BLOCK_END_PORTAL_FRAME",E_BLOCK_END_PORTAL_FRAME);
+ tolua_constant(tolua_S,"E_BLOCK_END_STONE",E_BLOCK_END_STONE);
+ tolua_constant(tolua_S,"E_BLOCK_",E_BLOCK_);
tolua_constant(tolua_S,"E_ITEM_EMPTY",E_ITEM_EMPTY);
tolua_constant(tolua_S,"E_ITEM_STONE",E_ITEM_STONE);
tolua_constant(tolua_S,"E_ITEM_GRASS",E_ITEM_GRASS);
@@ -15173,9 +15218,104 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_ITEM_COAL_ORE",E_ITEM_COAL_ORE);
tolua_constant(tolua_S,"E_ITEM_LOG",E_ITEM_LOG);
tolua_constant(tolua_S,"E_ITEM_LEAVES",E_ITEM_LEAVES);
+ tolua_constant(tolua_S,"E_ITEM_SPONGE",E_ITEM_SPONGE);
+ tolua_constant(tolua_S,"E_ITEM_GLASS",E_ITEM_GLASS);
+ tolua_constant(tolua_S,"E_ITEM_LAPIS_ORE",E_ITEM_LAPIS_ORE);
+ tolua_constant(tolua_S,"E_ITEM_LAPIS_BLOCK",E_ITEM_LAPIS_BLOCK);
+ tolua_constant(tolua_S,"E_ITEM_DISPENSER",E_ITEM_DISPENSER);
+ tolua_constant(tolua_S,"E_ITEM_SANDSTONE",E_ITEM_SANDSTONE);
+ tolua_constant(tolua_S,"E_ITEM_NOTE_ITEM",E_ITEM_NOTE_ITEM);
+ tolua_constant(tolua_S,"E_ITEM_POWERED_RAIL",E_ITEM_POWERED_RAIL);
+ tolua_constant(tolua_S,"E_ITEM_DETECTOR_RAIL",E_ITEM_DETECTOR_RAIL);
+ tolua_constant(tolua_S,"E_ITEM_STICKY_PISTON",E_ITEM_STICKY_PISTON);
+ tolua_constant(tolua_S,"E_ITEM_COBWEB",E_ITEM_COBWEB);
+ tolua_constant(tolua_S,"E_ITEM_TALL_GRASS",E_ITEM_TALL_GRASS);
+ tolua_constant(tolua_S,"E_ITEM_DEAD_BRUSH",E_ITEM_DEAD_BRUSH);
+ tolua_constant(tolua_S,"E_ITEM_PISTON",E_ITEM_PISTON);
+ tolua_constant(tolua_S,"E_ITEM_PISTON_EXTENSION",E_ITEM_PISTON_EXTENSION);
+ tolua_constant(tolua_S,"E_ITEM_WHITE_CLOTH",E_ITEM_WHITE_CLOTH);
+ tolua_constant(tolua_S,"E_ITEM_PISTON_MOVED_BLOCK",E_ITEM_PISTON_MOVED_BLOCK);
+ tolua_constant(tolua_S,"E_ITEM_YELLOW_FLOWER",E_ITEM_YELLOW_FLOWER);
+ tolua_constant(tolua_S,"E_ITEM_RED_ROSE",E_ITEM_RED_ROSE);
+ tolua_constant(tolua_S,"E_ITEM_BROWN_MUSHROOM",E_ITEM_BROWN_MUSHROOM);
+ tolua_constant(tolua_S,"E_ITEM_RED_MUSHROOM",E_ITEM_RED_MUSHROOM);
tolua_constant(tolua_S,"E_ITEM_GOLD_BLOCK",E_ITEM_GOLD_BLOCK);
tolua_constant(tolua_S,"E_ITEM_IRON_BLOCK",E_ITEM_IRON_BLOCK);
+ tolua_constant(tolua_S,"E_ITEM_DOUBLE_STEP",E_ITEM_DOUBLE_STEP);
+ tolua_constant(tolua_S,"E_ITEM_STEP",E_ITEM_STEP);
+ tolua_constant(tolua_S,"E_ITEM_BRICK",E_ITEM_BRICK);
+ tolua_constant(tolua_S,"E_ITEM_TNT",E_ITEM_TNT);
+ tolua_constant(tolua_S,"E_ITEM_BOOKCASE",E_ITEM_BOOKCASE);
+ tolua_constant(tolua_S,"E_ITEM_MOSSY_COBBLESTONE",E_ITEM_MOSSY_COBBLESTONE);
+ tolua_constant(tolua_S,"E_ITEM_OBSIDIAN",E_ITEM_OBSIDIAN);
+ tolua_constant(tolua_S,"E_ITEM_TORCH",E_ITEM_TORCH);
+ tolua_constant(tolua_S,"E_ITEM_FIRE",E_ITEM_FIRE);
+ tolua_constant(tolua_S,"E_ITEM_MOB_SPAWNER",E_ITEM_MOB_SPAWNER);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_STAIRS",E_ITEM_WOODEN_STAIRS);
+ tolua_constant(tolua_S,"E_ITEM_CHEST",E_ITEM_CHEST);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_WIRE",E_ITEM_REDSTONE_WIRE);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_ORE",E_ITEM_DIAMOND_ORE);
tolua_constant(tolua_S,"E_ITEM_DIAMOND_BLOCK",E_ITEM_DIAMOND_BLOCK);
+ tolua_constant(tolua_S,"E_ITEM_WORKBENCH",E_ITEM_WORKBENCH);
+ tolua_constant(tolua_S,"E_ITEM_CROPS",E_ITEM_CROPS);
+ tolua_constant(tolua_S,"E_ITEM_SOIL",E_ITEM_SOIL);
+ tolua_constant(tolua_S,"E_ITEM_FURNACE",E_ITEM_FURNACE);
+ tolua_constant(tolua_S,"E_ITEM_BURNING_FURNACE",E_ITEM_BURNING_FURNACE);
+ tolua_constant(tolua_S,"E_ITEM_SIGN_POST",E_ITEM_SIGN_POST);
+ tolua_constant(tolua_S,"E_ITEM_LADDER",E_ITEM_LADDER);
+ tolua_constant(tolua_S,"E_ITEM_MINECART_TRACKS",E_ITEM_MINECART_TRACKS);
+ tolua_constant(tolua_S,"E_ITEM_COBBLESTONE_STAIRS",E_ITEM_COBBLESTONE_STAIRS);
+ tolua_constant(tolua_S,"E_ITEM_WALLSIGN",E_ITEM_WALLSIGN);
+ tolua_constant(tolua_S,"E_ITEM_LEVER",E_ITEM_LEVER);
+ tolua_constant(tolua_S,"E_ITEM_STONE_PRESSURE_PLATE",E_ITEM_STONE_PRESSURE_PLATE);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_PRESSURE_PLATE",E_ITEM_WOODEN_PRESSURE_PLATE);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_ORE",E_ITEM_REDSTONE_ORE);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_ORE_GLOWING",E_ITEM_REDSTONE_ORE_GLOWING);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_TORCH_ON",E_ITEM_REDSTONE_TORCH_ON);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_TORCH_OFF",E_ITEM_REDSTONE_TORCH_OFF);
+ tolua_constant(tolua_S,"E_ITEM_STONE_BUTTON",E_ITEM_STONE_BUTTON);
+ tolua_constant(tolua_S,"E_ITEM_SNOW",E_ITEM_SNOW);
+ tolua_constant(tolua_S,"E_ITEM_ICE",E_ITEM_ICE);
+ tolua_constant(tolua_S,"E_ITEM_SNOW_BLOCK",E_ITEM_SNOW_BLOCK);
+ tolua_constant(tolua_S,"E_ITEM_CACTUS",E_ITEM_CACTUS);
+ tolua_constant(tolua_S,"E_ITEM_REEDS",E_ITEM_REEDS);
+ tolua_constant(tolua_S,"E_ITEM_JUKEBOX",E_ITEM_JUKEBOX);
+ tolua_constant(tolua_S,"E_ITEM_FENCE",E_ITEM_FENCE);
+ tolua_constant(tolua_S,"E_ITEM_PUMPKIN",E_ITEM_PUMPKIN);
+ tolua_constant(tolua_S,"E_ITEM_BLOODSTONE",E_ITEM_BLOODSTONE);
+ tolua_constant(tolua_S,"E_ITEM_SOULSAND",E_ITEM_SOULSAND);
+ tolua_constant(tolua_S,"E_ITEM_GLOWSTONE",E_ITEM_GLOWSTONE);
+ tolua_constant(tolua_S,"E_ITEM_PORT",E_ITEM_PORT);
+ tolua_constant(tolua_S,"E_ITEM_JACK_O_LANTERN",E_ITEM_JACK_O_LANTERN);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_REPEATER_OFF",E_ITEM_REDSTONE_REPEATER_OFF);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_REPEATER_ON",E_ITEM_REDSTONE_REPEATER_ON);
+ tolua_constant(tolua_S,"E_ITEM_LOCKED_CHEST",E_ITEM_LOCKED_CHEST);
+ tolua_constant(tolua_S,"E_ITEM_TRAPDOOR",E_ITEM_TRAPDOOR);
+ tolua_constant(tolua_S,"E_ITEM_SILVERFISH_EGG",E_ITEM_SILVERFISH_EGG);
+ tolua_constant(tolua_S,"E_ITEM_STONE_BRICKS",E_ITEM_STONE_BRICKS);
+ tolua_constant(tolua_S,"E_ITEM_HUGE_BROWN_MUSHROOM",E_ITEM_HUGE_BROWN_MUSHROOM);
+ tolua_constant(tolua_S,"E_ITEM_HUGE_RED_MUSHROOM",E_ITEM_HUGE_RED_MUSHROOM);
+ tolua_constant(tolua_S,"E_ITEM_IRON_BAR",E_ITEM_IRON_BAR);
+ tolua_constant(tolua_S,"E_ITEM_GLASS_PLANE",E_ITEM_GLASS_PLANE);
+ tolua_constant(tolua_S,"E_ITEM_MELON",E_ITEM_MELON);
+ tolua_constant(tolua_S,"E_ITEM_PUMPKIN_STEM",E_ITEM_PUMPKIN_STEM);
+ tolua_constant(tolua_S,"E_ITEM_MELON_STEM",E_ITEM_MELON_STEM);
+ tolua_constant(tolua_S,"E_ITEM_VINES",E_ITEM_VINES);
+ tolua_constant(tolua_S,"E_ITEM_FENCE_GATE",E_ITEM_FENCE_GATE);
+ tolua_constant(tolua_S,"E_ITEM_BRICK_STAIRS",E_ITEM_BRICK_STAIRS);
+ tolua_constant(tolua_S,"E_ITEM_STONE_BRICK_STAIRS",E_ITEM_STONE_BRICK_STAIRS);
+ tolua_constant(tolua_S,"E_ITEM_MYCELIUM",E_ITEM_MYCELIUM);
+ tolua_constant(tolua_S,"E_ITEM_LILY_PAD",E_ITEM_LILY_PAD);
+ tolua_constant(tolua_S,"E_ITEM_NETHER_BRICK",E_ITEM_NETHER_BRICK);
+ tolua_constant(tolua_S,"E_ITEM_NETHER_BRICK_FENCE",E_ITEM_NETHER_BRICK_FENCE);
+ tolua_constant(tolua_S,"E_ITEM_NETHER_BRICK_STAIRS",E_ITEM_NETHER_BRICK_STAIRS);
+ tolua_constant(tolua_S,"E_ITEM_ENCHANTMENT_TABLE",E_ITEM_ENCHANTMENT_TABLE);
+ tolua_constant(tolua_S,"E_ITEM_END_PORTAL",E_ITEM_END_PORTAL);
+ tolua_constant(tolua_S,"E_ITEM_END_PORTAL_FRAME",E_ITEM_END_PORTAL_FRAME);
+ tolua_constant(tolua_S,"E_ITEM_END_STONE",E_ITEM_END_STONE);
+ tolua_constant(tolua_S,"E_ITEM_IRON_SHOVEL",E_ITEM_IRON_SHOVEL);
+ tolua_constant(tolua_S,"E_ITEM_IRON_PICKAXE",E_ITEM_IRON_PICKAXE);
+ tolua_constant(tolua_S,"E_ITEM_IRON_AXE",E_ITEM_IRON_AXE);
tolua_constant(tolua_S,"E_ITEM_FLINT_AND_STEEL",E_ITEM_FLINT_AND_STEEL);
tolua_constant(tolua_S,"E_ITEM_APPLE",E_ITEM_APPLE);
tolua_constant(tolua_S,"E_ITEM_BOW",E_ITEM_BOW);
@@ -15184,6 +15324,21 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_ITEM_DIAMOND",E_ITEM_DIAMOND);
tolua_constant(tolua_S,"E_ITEM_IRON",E_ITEM_IRON);
tolua_constant(tolua_S,"E_ITEM_GOLD",E_ITEM_GOLD);
+ tolua_constant(tolua_S,"E_ITEM_IRON_SWORD",E_ITEM_IRON_SWORD);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_SWORD",E_ITEM_WOODEN_SWORD);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_SHOVEL",E_ITEM_WOODEN_SHOVEL);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_PICKAXE",E_ITEM_WOODEN_PICKAXE);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_AXE",E_ITEM_WOODEN_AXE);
+ tolua_constant(tolua_S,"E_ITEM_STONE_SWORD",E_ITEM_STONE_SWORD);
+ tolua_constant(tolua_S,"E_ITEM_STONE_SHOVEL",E_ITEM_STONE_SHOVEL);
+ tolua_constant(tolua_S,"E_ITEM_STONE_PICKAXE",E_ITEM_STONE_PICKAXE);
+ tolua_constant(tolua_S,"E_ITEM_STONE_AXE",E_ITEM_STONE_AXE);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_SWORD",E_ITEM_DIAMOND_SWORD);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_SHOVEL",E_ITEM_DIAMOND_SHOVEL);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_PICKAXE",E_ITEM_DIAMOND_PICKAXE);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_AXE",E_ITEM_DIAMOND_AXE);
+ tolua_constant(tolua_S,"E_ITEM_STICK",E_ITEM_STICK);
+ tolua_constant(tolua_S,"E_ITEM_BOWL",E_ITEM_BOWL);
tolua_constant(tolua_S,"E_ITEM_MUSHROOM_SOUP",E_ITEM_MUSHROOM_SOUP);
tolua_constant(tolua_S,"E_ITEM_GOLD_SWORD",E_ITEM_GOLD_SWORD);
tolua_constant(tolua_S,"E_ITEM_GOLD_SHOVEL",E_ITEM_GOLD_SHOVEL);
@@ -15191,12 +15346,61 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_ITEM_GOLD_AXE",E_ITEM_GOLD_AXE);
tolua_constant(tolua_S,"E_ITEM_STRING",E_ITEM_STRING);
tolua_constant(tolua_S,"E_ITEM_FEATHER",E_ITEM_FEATHER);
+ tolua_constant(tolua_S,"E_ITEM_GUNPOWDER",E_ITEM_GUNPOWDER);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_HOE",E_ITEM_WOODEN_HOE);
+ tolua_constant(tolua_S,"E_ITEM_STONE_HOE",E_ITEM_STONE_HOE);
+ tolua_constant(tolua_S,"E_ITEM_IRON_HOE",E_ITEM_IRON_HOE);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_HOE",E_ITEM_DIAMOND_HOE);
+ tolua_constant(tolua_S,"E_ITEM_GOLD_HOE",E_ITEM_GOLD_HOE);
+ tolua_constant(tolua_S,"E_ITEM_SEEDS",E_ITEM_SEEDS);
+ tolua_constant(tolua_S,"E_ITEM_WHEAT",E_ITEM_WHEAT);
tolua_constant(tolua_S,"E_ITEM_BREAD",E_ITEM_BREAD);
+ tolua_constant(tolua_S,"E_ITEM_LEATHER_CAP",E_ITEM_LEATHER_CAP);
+ tolua_constant(tolua_S,"E_ITEM_LEATHER_TUNIC",E_ITEM_LEATHER_TUNIC);
+ tolua_constant(tolua_S,"E_ITEM_LEATHER_PANTS",E_ITEM_LEATHER_PANTS);
+ tolua_constant(tolua_S,"E_ITEM_LEATHER_BOOTS",E_ITEM_LEATHER_BOOTS);
+ tolua_constant(tolua_S,"E_ITEM_CHAIN_HELMET",E_ITEM_CHAIN_HELMET);
+ tolua_constant(tolua_S,"E_ITEM_CHAIN_CHESTPLATE",E_ITEM_CHAIN_CHESTPLATE);
+ tolua_constant(tolua_S,"E_ITEM_CHAIN_LEGGINGS",E_ITEM_CHAIN_LEGGINGS);
+ tolua_constant(tolua_S,"E_ITEM_CHAIN_BOOTS",E_ITEM_CHAIN_BOOTS);
+ tolua_constant(tolua_S,"E_ITEM_IRON_HELMET",E_ITEM_IRON_HELMET);
+ tolua_constant(tolua_S,"E_ITEM_IRON_CHESTPLATE",E_ITEM_IRON_CHESTPLATE);
+ tolua_constant(tolua_S,"E_ITEM_IRON_LEGGINGS",E_ITEM_IRON_LEGGINGS);
+ tolua_constant(tolua_S,"E_ITEM_IRON_BOOTS",E_ITEM_IRON_BOOTS);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_HELMET",E_ITEM_DIAMOND_HELMET);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_CHESTPLATE",E_ITEM_DIAMOND_CHESTPLATE);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_LEGGINGS",E_ITEM_DIAMOND_LEGGINGS);
+ tolua_constant(tolua_S,"E_ITEM_DIAMOND_BOOTS",E_ITEM_DIAMOND_BOOTS);
+ tolua_constant(tolua_S,"E_ITEM_GOLD_HELMET",E_ITEM_GOLD_HELMET);
+ tolua_constant(tolua_S,"E_ITEM_GOLD_CHESTPLATE",E_ITEM_GOLD_CHESTPLATE);
+ tolua_constant(tolua_S,"E_ITEM_GOLD_LEGGINGS",E_ITEM_GOLD_LEGGINGS);
+ tolua_constant(tolua_S,"E_ITEM_GOLD_BOOTS",E_ITEM_GOLD_BOOTS);
+ tolua_constant(tolua_S,"E_ITEM_FLINT",E_ITEM_FLINT);
tolua_constant(tolua_S,"E_ITEM_RAW_MEAT",E_ITEM_RAW_MEAT);
tolua_constant(tolua_S,"E_ITEM_COOKED_MEAT",E_ITEM_COOKED_MEAT);
+ tolua_constant(tolua_S,"E_ITEM_PAINTINGS",E_ITEM_PAINTINGS);
tolua_constant(tolua_S,"E_ITEM_GOLDEN_APPLE",E_ITEM_GOLDEN_APPLE);
tolua_constant(tolua_S,"E_ITEM_SIGN",E_ITEM_SIGN);
+ tolua_constant(tolua_S,"E_ITEM_WOODEN_DOOR",E_ITEM_WOODEN_DOOR);
+ tolua_constant(tolua_S,"E_ITEM_BUCKET",E_ITEM_BUCKET);
+ tolua_constant(tolua_S,"E_ITEM_WATER_BUCKET",E_ITEM_WATER_BUCKET);
+ tolua_constant(tolua_S,"E_ITEM_LAVA_BUCKET",E_ITEM_LAVA_BUCKET);
+ tolua_constant(tolua_S,"E_ITEM_MINECART",E_ITEM_MINECART);
+ tolua_constant(tolua_S,"E_ITEM_SADDLE",E_ITEM_SADDLE);
+ tolua_constant(tolua_S,"E_ITEM_IRON_DOOR",E_ITEM_IRON_DOOR);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_DUST",E_ITEM_REDSTONE_DUST);
+ tolua_constant(tolua_S,"E_ITEM_SNOWBALL",E_ITEM_SNOWBALL);
+ tolua_constant(tolua_S,"E_ITEM_BOAT",E_ITEM_BOAT);
+ tolua_constant(tolua_S,"E_ITEM_LEATHER",E_ITEM_LEATHER);
tolua_constant(tolua_S,"E_ITEM_MILK",E_ITEM_MILK);
+ tolua_constant(tolua_S,"E_ITEM_CLAY_BRICK",E_ITEM_CLAY_BRICK);
+ tolua_constant(tolua_S,"E_ITEM_CLAY",E_ITEM_CLAY);
+ tolua_constant(tolua_S,"E_ITEM_SUGAR_CANE",E_ITEM_SUGAR_CANE);
+ tolua_constant(tolua_S,"E_ITEM_PAPER",E_ITEM_PAPER);
+ tolua_constant(tolua_S,"E_ITEM_BOOK",E_ITEM_BOOK);
+ tolua_constant(tolua_S,"E_ITEM_SLIMEBALL",E_ITEM_SLIMEBALL);
+ tolua_constant(tolua_S,"E_ITEM_CHEST_MINECART",E_ITEM_CHEST_MINECART);
+ tolua_constant(tolua_S,"E_ITEM_FURNACE_MINECART",E_ITEM_FURNACE_MINECART);
tolua_constant(tolua_S,"E_ITEM_EGG",E_ITEM_EGG);
tolua_constant(tolua_S,"E_ITEM_COMPASS",E_ITEM_COMPASS);
tolua_constant(tolua_S,"E_ITEM_FISHING_ROD",E_ITEM_FISHING_ROD);
@@ -15204,7 +15408,49 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_ITEM_GLOWSTONE_DUST",E_ITEM_GLOWSTONE_DUST);
tolua_constant(tolua_S,"E_ITEM_RAW_FISH",E_ITEM_RAW_FISH);
tolua_constant(tolua_S,"E_ITEM_COOKED_FISH",E_ITEM_COOKED_FISH);
+ tolua_constant(tolua_S,"E_ITEM_DYE",E_ITEM_DYE);
+ tolua_constant(tolua_S,"E_ITEM_BONE",E_ITEM_BONE);
+ tolua_constant(tolua_S,"E_ITEM_SUGAR",E_ITEM_SUGAR);
tolua_constant(tolua_S,"E_ITEM_CAKE",E_ITEM_CAKE);
+ tolua_constant(tolua_S,"E_ITEM_BED",E_ITEM_BED);
+ tolua_constant(tolua_S,"E_ITEM_REDSTONE_REPEATER",E_ITEM_REDSTONE_REPEATER);
+ tolua_constant(tolua_S,"E_ITEM_COOKIE",E_ITEM_COOKIE);
+ tolua_constant(tolua_S,"E_ITEM_MAP",E_ITEM_MAP);
+ tolua_constant(tolua_S,"E_ITEM_SHEARS",E_ITEM_SHEARS);
+ tolua_constant(tolua_S,"E_ITEM_MELON_SLICE",E_ITEM_MELON_SLICE);
+ tolua_constant(tolua_S,"E_ITEM_PUMPKIN_SEEDS",E_ITEM_PUMPKIN_SEEDS);
+ tolua_constant(tolua_S,"E_ITEM_MELON_SEEDS",E_ITEM_MELON_SEEDS);
+ tolua_constant(tolua_S,"E_ITEM_RAW_BEEF",E_ITEM_RAW_BEEF);
+ tolua_constant(tolua_S,"E_ITEM_STEAK",E_ITEM_STEAK);
+ tolua_constant(tolua_S,"E_ITEM_RAW_CHICKEN",E_ITEM_RAW_CHICKEN);
+ tolua_constant(tolua_S,"E_ITEM_COOKED_CHICKEN",E_ITEM_COOKED_CHICKEN);
+ tolua_constant(tolua_S,"E_ITEM_ROTTEN_FLESH",E_ITEM_ROTTEN_FLESH);
+ tolua_constant(tolua_S,"E_ITEM_ENDER_PEARL",E_ITEM_ENDER_PEARL);
+ tolua_constant(tolua_S,"E_ITEM_BLAZE_ROD",E_ITEM_BLAZE_ROD);
+ tolua_constant(tolua_S,"E_ITEM_GHAST_TEAR",E_ITEM_GHAST_TEAR);
+ tolua_constant(tolua_S,"E_ITEM_GOLD_NUGGET",E_ITEM_GOLD_NUGGET);
+ tolua_constant(tolua_S,"E_ITEM_NETHER_WART",E_ITEM_NETHER_WART);
+ tolua_constant(tolua_S,"E_ITEM_POTIONS",E_ITEM_POTIONS);
+ tolua_constant(tolua_S,"E_ITEM_GLASS_BOTTLE",E_ITEM_GLASS_BOTTLE);
+ tolua_constant(tolua_S,"E_ITEM_SPIDER_EYE",E_ITEM_SPIDER_EYE);
+ tolua_constant(tolua_S,"E_ITEM_FERMENTED_SPIDER_EYE",E_ITEM_FERMENTED_SPIDER_EYE);
+ tolua_constant(tolua_S,"E_ITEM_BLAZE_POWDER",E_ITEM_BLAZE_POWDER);
+ tolua_constant(tolua_S,"E_ITEM_MAGMA_CREAM",E_ITEM_MAGMA_CREAM);
+ tolua_constant(tolua_S,"E_ITEM_BREWING_STAND",E_ITEM_BREWING_STAND);
+ tolua_constant(tolua_S,"E_ITEM_CAULDRON",E_ITEM_CAULDRON);
+ tolua_constant(tolua_S,"E_ITEM_EYE_OF_ENDER",E_ITEM_EYE_OF_ENDER);
+ tolua_constant(tolua_S,"E_ITEM_GLISTERING_MELON",E_ITEM_GLISTERING_MELON);
+ tolua_constant(tolua_S,"E_ITEM_13_DISC",E_ITEM_13_DISC);
+ tolua_constant(tolua_S,"E_ITEM_CAT_DISC",E_ITEM_CAT_DISC);
+ tolua_constant(tolua_S,"E_ITEM_BLOCKS_DISC",E_ITEM_BLOCKS_DISC);
+ tolua_constant(tolua_S,"E_ITEM_CHIRP_DISC",E_ITEM_CHIRP_DISC);
+ tolua_constant(tolua_S,"E_ITEM_FAR_DISC",E_ITEM_FAR_DISC);
+ tolua_constant(tolua_S,"E_ITEM_MALL_DISC",E_ITEM_MALL_DISC);
+ tolua_constant(tolua_S,"E_ITEM_MELLOHI_DISC",E_ITEM_MELLOHI_DISC);
+ tolua_constant(tolua_S,"E_ITEM_STAL_DISC",E_ITEM_STAL_DISC);
+ tolua_constant(tolua_S,"E_ITEM_STRAD_DISC",E_ITEM_STRAD_DISC);
+ tolua_constant(tolua_S,"E_ITEM_WARD_DISC",E_ITEM_WARD_DISC);
+ tolua_constant(tolua_S,"E_ITEM_11_DISC",E_ITEM_11_DISC);
tolua_constant(tolua_S,"E_KEEP_ALIVE",E_KEEP_ALIVE);
tolua_constant(tolua_S,"E_LOGIN",E_LOGIN);
tolua_constant(tolua_S,"E_HANDSHAKE",E_HANDSHAKE);
@@ -15241,6 +15487,11 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"E_MAP_CHUNK",E_MAP_CHUNK);
tolua_constant(tolua_S,"E_MULTI_BLOCK",E_MULTI_BLOCK);
tolua_constant(tolua_S,"E_BLOCK_CHANGE",E_BLOCK_CHANGE);
+ tolua_constant(tolua_S,"E_BLOCK_ACTION",E_BLOCK_ACTION);
+ tolua_constant(tolua_S,"E_EXPLOSION",E_EXPLOSION);
+ tolua_constant(tolua_S,"E_SOUND_EFFECT",E_SOUND_EFFECT);
+ tolua_constant(tolua_S,"E_NEW_INVALID_STATE",E_NEW_INVALID_STATE);
+ tolua_constant(tolua_S,"E_THUNDERBOLT",E_THUNDERBOLT);
tolua_constant(tolua_S,"E_WINDOW_OPEN",E_WINDOW_OPEN);
tolua_constant(tolua_S,"E_WINDOW_CLOSE",E_WINDOW_CLOSE);
tolua_constant(tolua_S,"E_WINDOW_CLICK",E_WINDOW_CLICK);
diff --git a/source/Bindings.h b/source/Bindings.h
index 8c6c7302d..844bc3ff0 100644
--- a/source/Bindings.h
+++ b/source/Bindings.h
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 11/01/11 22:50:07.
+** Generated automatically by tolua++-1.0.92 on 11/08/11 02:11:36.
*/
/* Exported function */
diff --git a/source/SquirrelBindings.cpp b/source/SquirrelBindings.cpp
new file mode 100644
index 000000000..20f226e3a
--- /dev/null
+++ b/source/SquirrelBindings.cpp
@@ -0,0 +1,136 @@
+#include "SquirrelBindings.h"
+#if USE_SQUIRREL
+#pragma warning(disable:4100) // Getting A LOT of these warnings from SqPlus
+#pragma warning(disable:4127)
+
+#include "cMCLogger.h"
+
+#include
+#include
+#include <../squirrel/sqstate.h>
+#include <../squirrel/sqvm.h>
+#include
+
+#include "cPlugin.h"
+#include "cPluginManager.h"
+#include "cRoot.h"
+#include "cPlayer.h"
+
+bool SquirrelBindings::IsBound = false;
+
+bool IsTopClosure( HSQUIRRELVM v )
+{
+ return ( v->_stack[0]._type == OT_CLOSURE );
+}
+
+class __Squirrel_Base_Class // All inheritable classes should extend this class, as it allows virtual functions to call Squirrel
+{
+public:
+ template
+ static int ConstructAndDestruct(HSQUIRRELVM v, T* a_Instance, SQRELEASEHOOK a_ReleaseHook )
+ {
+ LOG("ConstructAndDestruct()");
+
+ StackHandler sa(v);
+ HSQOBJECT ho = sa.GetObjectHandle(1); // OT_INSTANCE
+ SquirrelObject instance(ho);
+ SqPlus::PopulateAncestry(v, instance, a_Instance);
+ a_Instance->vm = v;
+ a_Instance->obj = instance;
+
+ sq_setinstanceup(v, 1, a_Instance);
+ sq_setreleasehook(v, 1, a_ReleaseHook);
+ return TRUE;
+ }
+
+ HSQUIRRELVM vm;
+ SquirrelObject obj;
+};
+
+class cPlugin__Squirrel : public cPlugin, public __Squirrel_Base_Class
+{
+public:
+ cPlugin__Squirrel() { SetLanguage( cPlugin::E_SQUIRREL ); }
+
+ bool Initialize() // This is a pure virtual function, so it NEEDS an implementation on the script side or it would be an illegal instance
+ {
+ SqPlus::SquirrelFunction InitFunc(obj, "Initialize");
+ if( !InitFunc.func.IsNull() )
+ return InitFunc();
+ LOGWARN("cPlugin__Squirrel::Initialize() Pure virtual function called!"); // Spam some errorz to make it clear this function needs to be implemented
+ return false;
+ }
+
+ static int constructor(HSQUIRRELVM v) { return ConstructAndDestruct( v, new cPlugin__Squirrel, SqPlus::ReleaseClassPtr::release ); }
+
+ virtual bool OnChat( const char* a_Chat, cPlayer* a_Player )
+ {
+ if( !IsTopClosure(vm) ) // Avoid recursion (TODO: FIXME: THIS NEEDS MORE RESEARCH!)
+ { //Called from C++
+ return SqPlus::SquirrelFunction(obj, "OnChat")(a_Chat, a_Player);
+ }
+ else // Called from Squirrel
+ {
+ return cPlugin::OnChat(a_Chat, a_Player);
+ }
+ }
+};
+
+static void printFunc(HSQUIRRELVM v,const SQChar * s,...)
+{
+ (void)v;
+ va_list vl;
+ va_start(vl,s);
+ cMCLogger::GetInstance()->Log( s, vl );
+ va_end(vl);
+}
+
+DECLARE_INSTANCE_TYPE( cRoot );
+DECLARE_INSTANCE_TYPE( cPluginManager );
+DECLARE_ENUM_TYPE( cPluginManager::PluginHook );
+DECLARE_INSTANCE_TYPE( cPlugin );
+DECLARE_INSTANCE_TYPE( cPlugin__Squirrel );
+
+DECLARE_INSTANCE_TYPE( cEntity );
+DECLARE_INSTANCE_TYPE( cPawn );
+DECLARE_INSTANCE_TYPE( cPlayer );
+
+void SquirrelBindings::Bind( HSQUIRRELVM a_SquirrelVM )
+{
+ IsBound = true;
+
+ sq_setprintfunc(a_SquirrelVM, printFunc, printFunc);
+
+
+ SqPlus::SQClassDefNoConstructor("cEntity");
+ SqPlus::SQClassDefNoConstructor("cPawn", "cEntity");
+ SqPlus::SQClassDefNoConstructor("cPlayer", "cPawn"). // All NoConstructor because they need a custom one
+ func(&cPlayer::GetName, "GetName");
+
+ SqPlus::SQClassDefNoConstructor("cPlugin").
+ func(&cPlugin::SetName, "SetName").
+ func(&cPlugin::GetName, "GetName").
+ func(&cPlugin::GetVersion, "GetVersion").
+ func(&cPlugin::OnChat, "OnChat");
+
+
+ SqPlus::SQClassDef("cPlugin__Squirrel", "cPlugin").
+ staticFunc(&cPlugin__Squirrel::constructor, "constructor");
+
+
+ SqPlus::SQClassDefNoConstructor("cRoot").
+ staticFunc(&cRoot::Get, "Get").
+ func(static_cast(&cRoot::GetPluginManager), "GetPluginManager");
+
+
+ SqPlus::SQClassDefNoConstructor("cPluginManager").
+ overloadFunc(&cPluginManager::AddPlugin, "AddPlugin").
+ func(&cPluginManager::GetPlugin, "GetPlugin").
+ func(&cPluginManager::AddHook, "AddHook").
+ enumInt( cPluginManager::E_PLUGIN_CHAT, "E_PLUGIN_CHAT");
+
+
+
+}
+
+#endif
\ No newline at end of file
diff --git a/source/SquirrelBindings.h b/source/SquirrelBindings.h
new file mode 100644
index 000000000..492014560
--- /dev/null
+++ b/source/SquirrelBindings.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#define USE_SQUIRREL 0
+
+#if USE_SQUIRREL
+
+struct SQVM;
+class SquirrelBindings
+{
+public:
+ static void Bind( SQVM* a_SquirrelVM );
+ static bool IsBound;
+};
+
+#endif
\ No newline at end of file
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index 79488f0c4..2632d5ac6 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -69,6 +69,7 @@
#ifndef _WIN32
#define sprintf_s(dst, size, format, ...) sprintf(dst, format, __VA_ARGS__ )
+#include // rand()
#endif
#define AddPistonDir( x, y, z, dir, amount ) switch(dir) { case 0: (y)-=(amount); break; case 1: (y)+=(amount); break;\
diff --git a/source/cPlugin.cpp b/source/cPlugin.cpp
index 10f5d74d3..5fc056a2d 100644
--- a/source/cPlugin.cpp
+++ b/source/cPlugin.cpp
@@ -5,6 +5,7 @@
cPlugin::cPlugin()
: m_Version( 0 )
+ , m_Language( E_CPP )
{
}
@@ -44,7 +45,7 @@ bool cPlugin::OnDisconnect( std::string a_Reason, cPlayer* a_Player )
return false;
}
-bool cPlugin::OnChat( std::string a_Chat, cPlayer* a_Player )
+bool cPlugin::OnChat( const char* a_Chat, cPlayer* a_Player )
{
(void)a_Chat;
(void)a_Player;
diff --git a/source/cPlugin.h b/source/cPlugin.h
index 6c38871f3..a1e2a358f 100644
--- a/source/cPlugin.h
+++ b/source/cPlugin.h
@@ -41,7 +41,7 @@ public:
virtual bool OnDisconnect( std::string a_Reason, cPlayer* a_Player );
virtual bool OnBlockPlace( cPacket_BlockPlace* a_PacketData, cPlayer* a_Player );
virtual bool OnBlockDig( cPacket_BlockDig* a_PacketData, cPlayer* a_Player, cItem* a_PickupItem ) { (void)a_PacketData; (void)a_Player; (void)a_PickupItem; return false; }
- virtual bool OnChat( std::string a_Chat, cPlayer* a_Player );
+ virtual bool OnChat( const char* a_Chat, cPlayer* a_Player );
virtual bool OnLogin( cPacket_Login* a_PacketData );
virtual void OnPlayerSpawn( cPlayer* a_Player );
virtual bool OnPlayerJoin( cPlayer* a_Player );
@@ -50,8 +50,8 @@ public:
virtual bool OnKilled( cPawn* a_Killed, cEntity* a_Killer ) { (void)a_Killed; (void)a_Killer; return false; }
// Accessors
- std::string GetName() const { return m_Name; }
- void SetName( std::string a_Name ) { m_Name = a_Name; }
+ const char* GetName() const { return m_Name.c_str(); }
+ void SetName( const char* a_Name ) { m_Name = a_Name; }
int GetVersion() const { return m_Version; }
void SetVersion( int a_Version ) { m_Version = a_Version; }
@@ -69,7 +69,19 @@ public:
void BindCommand( FuncCommandHandler* a_Function, std::string & a_Command ); // >> EXPORTED IN MANUALBINDINGS <<
const std::vector< CommandStruct > & GetCommands() const { return m_Commands; } // >> EXPORTED IN MANUALBINDINGS <<
+
+ /* This should not be exposed to scripting languages */
+ enum PluginLanguage
+ {
+ E_CPP,
+ E_LUA,
+ E_SQUIRREL,
+ };
+ PluginLanguage GetLanguage() { return m_Language; }
+ void SetLanguage( PluginLanguage a_Language ) { m_Language = a_Language; }
+
private:
+ PluginLanguage m_Language;
std::vector< CommandStruct > m_Commands;
std::string m_Name;
int m_Version;
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp
index db776f0a7..f1369bf46 100644
--- a/source/cPluginManager.cpp
+++ b/source/cPluginManager.cpp
@@ -6,10 +6,16 @@
#include "cItem.h"
#include "cRoot.h"
#include "cLuaCommandBinder.h"
-
+#include "../iniFile/iniFile.h"
+#include //strcmp
#include
-#include "../iniFile/iniFile.h"
+#include "SquirrelBindings.h"
+#if USE_SQUIRREL
+#pragma warning(disable:4100;disable:4127;disable:4510;disable:4610;disable:4244;disable:4512) // Getting A LOT of these warnings from SqPlus
+#include
+#pragma warning(default:4100;default:4127;default:4510;default:4610;default:4244;default:4512)
+#endif
extern std::vector StringSplit(std::string str, std::string delim);
@@ -39,6 +45,7 @@ cPluginManager::cPluginManager()
cPluginManager::~cPluginManager()
{
UnloadPluginsNow();
+
delete m_LuaCommandBinder;
delete m_pState;
}
@@ -54,6 +61,16 @@ void cPluginManager::ReloadPluginsNow()
m_bReloadPlugins = false;
UnloadPluginsNow();
+
+
+#if USE_SQUIRREL
+ if( !SquirrelBindings::IsBound ) // Can only do this once apparently, or we're making ambiguous calls in the script
+ {
+ SquirrelVM::Init();
+ SquirrelBindings::Bind( SquirrelVM::GetVMPtr() );
+ }
+#endif
+
cIniFile IniFile("settings.ini");
if( IniFile.ReadFile() )
{
@@ -64,10 +81,10 @@ void cPluginManager::ReloadPluginsNow()
for(unsigned int i = 0; i < NumPlugins; i++)
{
std::string ValueName = IniFile.GetValueName(KeyNum, i );
- if( ValueName.compare("Plugin") == 0 )
- { // It's a plugin
+ if( ValueName.compare("Plugin") == 0 ) // It's a Lua plugin
+ {
std::string PluginFile = IniFile.GetValue(KeyNum, i );
- if( PluginFile.compare("") != 0 )
+ if( !PluginFile.empty() )
{
// allow for comma separated plugin list
// degrades and works fine for the plugin
@@ -82,6 +99,32 @@ void cPluginManager::ReloadPluginsNow()
}
}
}
+#if USE_SQUIRREL
+ else if( ValueName.compare("Squirrel") == 0 ) // Squirrel plugin
+ {
+ std::string PluginFile = IniFile.GetValue(KeyNum, i );
+ if( !PluginFile.empty() )
+ {
+ LOGINFO("Loading Squirrel plugin: %s", PluginFile.c_str() );
+ try
+ {
+ SquirrelObject SquirrelScript = SquirrelVM::CompileScript( (std::string("Plugins/") + PluginFile + ".nut").c_str() );
+ try
+ {
+ SquirrelVM::RunScript( SquirrelScript );
+ }
+ catch (SquirrelError & e)
+ {
+ LOGERROR("Error: %s, %s\n", e.desc, "SquirrelVM::RunScript");
+ }
+ }
+ catch (SquirrelError & e)
+ {
+ LOGERROR("Error: %s, %s\n", e.desc, "SquirrelVM::CompileScript");
+ }
+ }
+ }
+#endif
}
}
@@ -98,6 +141,8 @@ void cPluginManager::ReloadPluginsNow()
{
LOG("WARNING: Can't find settings.ini, so can't load any plugins.");
}
+
+
LOG("--Done loading plugins--");
}
@@ -291,11 +336,11 @@ bool cPluginManager::CallHook( PluginHook a_Hook, unsigned int a_NumArgs, ... )
return false;
}
-cPlugin* cPluginManager::GetPlugin( std::string a_Plugin )
+cPlugin* cPluginManager::GetPlugin( const char* a_Plugin )
{
for( PluginList::iterator itr = m_pState->Plugins.begin(); itr != m_pState->Plugins.end(); ++itr )
{
- if( (*itr)->GetName().compare( a_Plugin ) == 0 )
+ if( std::string( (*itr)->GetName() ).compare( a_Plugin ) == 0 )
{
return *itr;
}
@@ -328,6 +373,25 @@ void cPluginManager::UnloadPluginsNow()
{
RemovePlugin( *m_pState->Plugins.begin(), true );
}
+
+ //SquirrelVM::Shutdown(); // This breaks shit
+}
+
+void cPluginManager::RemoveHooks( cPlugin* a_Plugin )
+{
+ m_pState->Hooks[ E_PLUGIN_TICK ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_CHAT ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_COLLECT_ITEM ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_BLOCK_DIG ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_BLOCK_PLACE ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_DISCONNECT ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_HANDSHAKE ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_LOGIN ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_PLAYER_SPAWN ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_PLAYER_JOIN ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_PLAYER_MOVE ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_TAKE_DAMAGE ].remove( a_Plugin );
+ m_pState->Hooks[ E_PLUGIN_KILLED ].remove( a_Plugin );
}
void cPluginManager::RemovePlugin( cPlugin* a_Plugin, bool a_bDelete /* = false */ )
@@ -336,8 +400,10 @@ void cPluginManager::RemovePlugin( cPlugin* a_Plugin, bool a_bDelete /* = false
{
m_LuaCommandBinder->RemoveBindingsForPlugin( a_Plugin );
m_pState->Plugins.remove( a_Plugin );
+ RemoveHooks( a_Plugin );
a_Plugin->OnDisable();
- delete a_Plugin;
+ if( a_Plugin->GetLanguage() != cPlugin::E_SQUIRREL ) // Squirrel needs to clean it up himself!
+ delete a_Plugin;
}
else
{
@@ -356,11 +422,14 @@ bool cPluginManager::AddPlugin( cPlugin* a_Plugin )
m_pState->Plugins.push_back( a_Plugin );
return true;
}
+
+ RemoveHooks( a_Plugin ); // Undo any damage the Initialize() might have done
return false;
}
bool cPluginManager::AddPlugin( lua_State* a_LuaState, cPlugin* a_Plugin )
{
+ a_Plugin->SetLanguage( cPlugin::E_LUA );
cPlugin_Lua* LuaPlugin = GetLuaPlugin( a_LuaState );
if( LuaPlugin && a_Plugin->Initialize() )
{
@@ -391,8 +460,8 @@ void cPluginManager::RemoveLuaPlugin( std::string a_FileName )
if( (*itr)->GetFileName() == a_FileName )
{
cPlugin_Lua* Plugin = *itr;
- delete Plugin;
m_pState->LuaPlugins.remove( Plugin );
+ delete Plugin;
return;
}
}
diff --git a/source/cPluginManager.h b/source/cPluginManager.h
index 6a94060e0..ebe974b11 100644
--- a/source/cPluginManager.h
+++ b/source/cPluginManager.h
@@ -34,7 +34,7 @@ public: //tolua_export
static cPluginManager * GetPluginManager(); //tolua_export
typedef std::list< cPlugin* > PluginList;
- cPlugin* GetPlugin( std::string a_Plugin ); //tolua_export
+ cPlugin* GetPlugin( const char* a_Plugin ); //tolua_export
const PluginList & GetAllPlugins(); // >> EXPORTED IN MANUALBINDINGS <<
void ReloadPlugins(); //tolua_export
@@ -47,6 +47,7 @@ public: //tolua_export
bool CallHook( PluginHook a_Hook, unsigned int a_NumArgs, ... );
+ void RemoveHooks( cPlugin* a_Plugin );
void RemovePlugin( cPlugin* a_Plugin, bool a_bDelete = false ); //tolua_export
void RemoveLuaPlugin( std::string a_FileName ); //tolua_export
cPlugin_Lua* GetLuaPlugin( lua_State* a_State ); //tolua_export
diff --git a/source/cWebAdmin.cpp b/source/cWebAdmin.cpp
index 03775ee3f..bc22a4681 100644
--- a/source/cWebAdmin.cpp
+++ b/source/cWebAdmin.cpp
@@ -109,7 +109,7 @@ void cWebAdmin::Request_Handler(webserver::http_request* r)
const cPluginManager::PluginList & List = PM->GetAllPlugins();
for( cPluginManager::PluginList::const_iterator itr = List.begin(); itr != List.end(); ++itr )
{
- Content += (*itr)->GetName() + "
";
+ Content += std::string( (*itr)->GetName() ) + "
";
}
Content += "
";
Content += "Players:
";
diff --git a/source/main.cpp b/source/main.cpp
index 1868e30ca..cbe499281 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -9,6 +9,13 @@
#include //std::signal
#include //exit()
+#include "SquirrelBindings.h"
+#if USE_SQUIRREL
+#pragma warning(disable:4100;disable:4127;disable:4510;disable:4610;disable:4244;disable:4512) // Getting A LOT of these warnings from SqPlus
+#include
+#pragma warning(default:4100;default:4127;default:4510;default:4610;default:4244;default:4512)
+#endif
+
void ShowCrashReport(int)
{
std::signal(SIGSEGV, SIG_DFL);
@@ -43,6 +50,11 @@ int main( int argc, char **argv )
{
LOGERROR("Unknown exception!");
}
+
+#if USE_SQUIRREL
+ SquirrelVM::Shutdown();
+#endif
+
#ifdef _DEBUG
_CrtDumpMemoryLeaks();
#endif
diff --git a/squirrel_3_0_1_stable/COMPILE b/squirrel_3_0_1_stable/COMPILE
new file mode 100644
index 000000000..d032a2f4e
--- /dev/null
+++ b/squirrel_3_0_1_stable/COMPILE
@@ -0,0 +1,41 @@
+Squirrel 3.0 stable
+--------------------------------------------------------
+What is in this distribution?
+
+squirrel
+ static library implementing the compiler and interpreter of the language
+
+sqstdlib
+ the standard utility libraries
+
+sq
+ stand alone interpreter
+
+doc
+ The manual
+
+etc
+ a minimalistic embedding sample
+
+samples
+ samples programs
+
+
+HOW TO COMPILE
+---------------------------------------------------------
+GCC USERS
+.........................................................
+There is a very simple makefile that compiles all libraries and exes
+from the root of the project run 'make'
+
+for 32 bits systems
+
+ $ make
+
+for 64 bits systems
+
+ $ make sq64
+
+VISUAL C++ USERS
+.........................................................
+Open squirrel.dsw from the root project directory and build(dho!)
\ No newline at end of file
diff --git a/squirrel_3_0_1_stable/COPYRIGHT b/squirrel_3_0_1_stable/COPYRIGHT
new file mode 100644
index 000000000..40bea1615
--- /dev/null
+++ b/squirrel_3_0_1_stable/COPYRIGHT
@@ -0,0 +1,21 @@
+Copyright (c) 2003-2011 Alberto Demichelis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-----------------------------------------------------
+END OF COPYRIGHT
diff --git a/squirrel_3_0_1_stable/HISTORY b/squirrel_3_0_1_stable/HISTORY
new file mode 100644
index 000000000..d16ae44cc
--- /dev/null
+++ b/squirrel_3_0_1_stable/HISTORY
@@ -0,0 +1,422 @@
+***version 3.0.1 stable***
+-added # as alternative symbol for "line comment"(mostly useful for shell scripts)
+-added sq_throwobject() to throw an arbitrary object from the C API
+-added alignement flag for userdata types, SQ_ALIGNMENT (thx Shigemasa)
+-added rawset() and rawget() to class and instance default delegate
+-changed bytecode format now ensures matching integer size and float size
+-now inherited classes also inherit userdatasize
+-added SQUIRREL_VERSION_NUMBER in squirrel.h and _versionnumber_ global symbol
+-fixed sq_getmemberhandle
+-fixed sq_getrefcount
+-refactored some sqstdio code
+-refactored some clone code
+-refactored some stuff in the string lib
+-added -s and -fno-exceptions in GCC makefile(better performance when using GCC)
+
+***2011-03-13 ***
+***version 3.0 stable***
+-added sq_getcallee()
+-sq_getfreevariable() also works for native closures
+-minior optimizations
+-removed several warning when compiling with GCC 4.x
+-fixed some errors in the documentation
+-fixed bug when using SQUSEDOUBLE and 32bits intengers
+-fixed bug when invoking generators with closure.call() (thx huntercool)
+
+***2010-12-19 ***
+***version 3.0 release candidate 1(RC 1)***
+-improved metamethods error handling
+-added parameter 'isstatic' to _newmember metamethod(thx G.Meyer)
+-added sq_getrefcount() to return number of refences from C++(thx G.Meyer)
+
+***2010-11-07 ***
+***version 3.0 beta 3***
+-license changed to "MIT license"
+-added sq_resurrectunreachable() and resurrectunreachable()
+-added callee() built in function, returns the current running closure
+-added thread.getstackinfos()
+-added sq_objtouserpointer()
+-added sq_newtableex()
+-various refactoring and optimizations
+-fixed several 64bits issues regarding integer to string conversions
+-fixed some bugs when SQUSEDOUBLE is used in 32bits systems
+
+***2010-08-18 ***
+***version 3.0 beta 2.1***
+-fixed bug in class constructor
+-fixed bug in compound arith
+
+***2010-08-12 ***
+***version 3.0 beta 2***
+-class methods can be added or replaced after the class as been instantiated
+-JSON compliant table syntax, this is currently an experimental feature (thx atai)
+-sq_getsize() now returns userdatasize for classes and instances
+-now setroottable() and setconsttable() return the previous value of the respective table
+-fixed bug in compound arith operators when used on a free variable (thx ellon)
+-fixed some x64 minor bugs
+-fixed minor bug in the compiler
+-refactored some VM internals
+-documented sq_getmemberhandle, sq_getbyhandle, sq_setbyhandle to set and get value from classes
+
+***2009-11-15 ***
+***version 3.0 beta 1***
+-various refactoring and optimizations
+-fixed bug in free variables (thx mokehehe)
+-fixed bug in functions with default parameters (thx ara & Yexo)
+-fixed bug in exception handling
+-improved error propagation in _set and _get metamethods ( and 'throw null' for clean failure)
+-added sq_getmemberhandle, sq_getbyhandle, sq_setbyhandle to set and get value from classes
+
+***2009-06-30 ***
+***version 3.0 alpha 2***
+-added real free variables(thx Paul Ruizendaal)
+-added refactored function call implementation and compiler(thx Paul Ruizendaal)
+-added sq_getfunctioninfo
+-added compile time flag SQUSEDOUBLE to use double precision floats
+-added global slot _floatsize_ int the base lib to recognize single precision and double precision builds
+-sq_wakeupvm can now resume the vm with an exception
+-added sqstd_format
+-now blobs can be cloned
+-generators can now be instantiated by calling sq_call() or closure.call()
+-fixed debughook bug
+-fixed cooroutine error propagation
+
+***2008-07-23 ***
+***version 3.0 alpha 1***
+-first branch from 2.x source tree
+-added 'base' keyword
+-removed 'delegate' keyword
+-now compiled scripts are vararg functions
+-added setdelegate() and getdelegate() table builtin methods
+-added <=> 3 ways compare operator
+-added lambda expression @(a,b) a + b
+-added local function statement
+-added array built-in map(),reduce(),apply(),filter() and find()
+-generators hold only a weak reference of the enviroment object
+-removed 'vargv' and 'vargc' keywords
+-now var args are passed as an array called vargv(as a paramter)
+-removed 'parent' keyword
+-added class getbase() built in method
+-instanceof doesn't throw an exception if the left expression is not a class
+-lexical scoping for free variables(free variables are no longer in the second parameter list)
+-sq_setprintfunc accept error func
+-sq_geterrorfunc()
+-added sq_arrayremove() and sq_arrayinsert()
+-error() built in function(works like print but prints using the errorfunc)
+-added native debug hook
+
+***2008-02-17 ***
+***version 2.2 stable***
+-added _newslot metamethod in classes
+-added enums added constants
+-added sq_pushconsttable, sq_setconsttable
+-added default param
+-added octal literals(thx Dinosaur)
+-fixed debug hook, 'calls' and 'returns' are properly notified in the same number.
+-fixed a coroutine bug
+
+***2007-07-29 ***
+***version 2.1.2 stable***
+-new behaviour for generators iteration using foreach
+now when a generator is iterated by foreach the value returned by a 'return val' statement
+will terminate the iteration but will not be returned as foreach iteration
+-added sq_setclassudsize()
+-added sq_clear()
+-added table.clear(), array.clear()
+-fixed sq_cmp() (thx jyuill)
+-fixed minor bugs
+
+***2006-08-21 ***
+***version 2.1.1 stable***
+-vm refactoring
+-optimized internal function memory layout
+-new global symbol _version_ (is the version string)
+-code size optimization for float literals(on 32bits float builts)
+-now the raw ref API(sq_addref etc...) is fully reentrant.
+-fixed a bug in sq_getdelegate() now pushes null if the object doesn't have a delegate(thx MatzeB)
+-improved C reference performances in NO_GARBAGE_COLLECTOR builds
+-sq_getlocal() now enumerates also outer values.
+-fixed regexp library for GCC users.
+
+***2006-03-19 ***
+***version 2.1 stable***
+-added static class fields, new keyword static
+-added 64bits architecture support
+-added global slot _intsize_ int the base lib to recognize 32bits and 64bits builds
+-added functions with fixed environment, closure.bindenv() built-in function
+-all types except userdata and null implement the tostring() method
+-string concatenation now invokes metamethod _tostring
+-new metamethods for class objects _newmember and _inherited
+-sq_call() sq_resume() sq_wakeupvm() have a new signature
+-new C referencing implementation(scales more with the amount of references)
+-refactored hash table
+-new api functions sq_newslot(),sq_tobool(),sq_getbase(), sq_instanceof(), sq_bindenv()
+-the api func sq_createslot was deprecated but still supported in form of C macro on top of sq_newslot
+-sq_setreleasehook() now also works for classes
+-stream.readstr() and stream.writestr() have been deprecated(this affects file and blob)
+-fixed squirrel.h undeclared api calls
+-fixed few minor bugs
+-SQChar is now defined as wchar_t
+-removed warning when building with -Wall -pedantic for GCC users
+-added new std io function writeclosuretofile()
+-added new std string functions strip(),rstrip(),lstrip() and split()
+-regular expressions operators (+,*) now have more POSIX greedyness behaviour
+-class constructors are now invoked as normal functions
+
+***2005-10-02 ***
+***version 2.0.5 stable***
+-fixed some 64bits incompatibilities (thx sarge)
+-fixed minor bug in the stdlib format() function (thx Rick)
+-fixed a bug in dofile() that was preventing to compile empty files
+-added new API sq_poptop() & sq_getfreevariable()
+-some performance improvements
+
+***2005-08-14 ***
+***version 2.0.4 stable***
+-weak references and related API calls
+-added sq_objtobool()
+-class instances memory policies improved(1 mem allocation for the whole instance)
+-typetags are now declared as SQUserPointer instead of unsigned int
+-first pass for 64bits compatibility
+-fixed minor bug in the stdio stream
+-fixed a bug in format()
+-fixed bug in string.tointeger() and string.tofloat()
+
+***2005-06-24 ***
+***version 2.0.3 stable***
+-dofile() and loadfile() in the iolib now can decode ASCII, UTF8 files UCS2 big-endian and little-endian
+-sq_setparamscheck() : now typemesk can check for null
+-added string escape sequence \xhhhh
+-fixed some C++ standard incompatibilities
+
+***2005-05-15 ***
+***version 2.0.2 stable***
+-performances improvements (expecially for GCC users)
+-removed all dependencies from C++ exception handling
+-various bugfixes
+
+***2005-04-12 ***
+***version 2.0.1 stable***
+-various bugfixes
+-sq_setparamscheck() now allows spaces in the typemask
+
+***2005-04-03 ***
+***version 2.0 stable***
+-added API sq_gettypetag()
+-added built-in function to the bool type(tointeger, tostring etc...)
+
+***2005-02-27 ***
+***version 2.0 release candidate 1(RC 1)***
+-added API sq_reseterror()
+-modified sq_release()
+-now class instances can be cloned
+-various bufixes
+
+***2005-01-26 ***
+***version 2.0 beta 1***
+-added bool type
+-class properties can be redefined in a derived class
+-added ops *= /= and %=
+-new syntax for class attributes declaration and /> instead of ( and )
+-increased the max number of literals per function from 65535 to 16777215
+-now free variables have proper lexical scoping
+-added API sq_createinstance(), sq_pushbool(), sq_getbool()
+-added built-in function type()
+-added built-in function obj.rawin(key) in table,class and instance
+-sq_rawget() and sq_rawset() now work also on classes and instances
+-the VM no longer uses C++ exception handling (more suitable for embedded devices)
+-various bufixes
+
+***2004-12-21 ***
+***version 2.0 alpha 2***
+-globals scoping changed, now if :: is omitted the VM automatically falls back on the root table
+-various bufixes
+-added class level attributes
+
+***2004-12-12 ***
+***version 2.0 alpha 1***
+-codebase branch from version 1.x
+-added classes
+-added functions with variable number of parameters(vargc & vargv and the ...)
+-0 and 0.0 are now considered 'false' by all conditional statements(if,while,for,?,do-while)
+-added new api functions sq_newclass() sq_setinstanceup() sq_getinstanceup() sq_getattributes() sq_setattributes()
+-modified api sq_settypetag()
+
+***2004-11-01 ***
+***version 1.0 stable***
+-fixed some minor bug
+-improved operator 'delete' performances
+-added scientific notation for float numbers( eg. 2.e16 or 2.e-2)
+
+***2004-08-30 ***
+***version 1.0 release candidate 2(RC 2)***
+-fixed bug in the vm(thx Pierre Renaux)
+-fixed bug in the optimizer(thx Pierre Renaux)
+-fixed some bug in the documentation(thx JD)
+-added new api functions for raw object handling
+-removed nested multiline comments
+-reduced memory footprint in C references
+
+***2004-08-23 ***
+***version 1.0 release candidate 1(RC 1)***
+-fixed division by zero
+-the 'in' operator and obj.rawget() do not query the default delegate anymore
+-added function sq_getprintfunc()
+-added new standard library 'auxlib'(implements default error handlers)
+
+***2004-07-12 ***
+***version 1.0 beta 4***
+-fixed a bug in the integer.tochar() built-in method
+-fixed unary minus operator
+-fixed bug in dofile()
+-fixed inconsistency between != and == operators(on float/integer comparison)
+-added javascript style unsigned right shift operator '>>>'
+-added array(size) constructor built-in function
+-array.resize(size,[fill]) built-in function accepts an optional 'fill' value
+-improved debug API, added sq_getclosureinfo() and sq_setnativeclosurename()
+
+***2004-05-23 ***
+***version 1.0 beta 3***
+-minor vm bug fixes
+-string allocation is now faster
+-tables and array memory usage is now less conservative(they shrink)
+-added regular expression routines in the standard library
+-The 'c' expression now accepts only 1 character(thx irbrian)
+-multiline strings <[ ]> have been substituted with C# style verbatim strings (eg. @"string")
+-added new keyword 'parent' for accessing the delegate of tables and unserdata
+-The metamethod '_clone' has been renamed '_cloned'
+-the _delslot metamethod's behaviour and prototype have been changed
+-new default function in the integer and float object 'tochar()'
+-the built-in function chcode2string has been removed
+-the default method [table].getdelegate() has been removed
+-new api sq_rawdeleteslot()
+-new table built-in method rawdelete(key)
+-the dynamic mudule loading has been removed from the standard distribution
+-some optimizations in the VM
+
+***2004-04-21 ***
+***version 1.0 beta 2***
+-minor compiler/parser bug fixes
+-sq_newclosure has a different prototype, the "paramscheck" of paramter has been moved to the new function sq_setparamscheck()
+-sq_setparamscheck allows to add automatic parameters type checking in native closures
+-sq_compile() lost the lineinfo parameter
+-new api sq_enabledebuginfo() globally sets compiler's debug info generation
+-added consistency check on bytecode serialization
+-fixed += operator, now works on strings like +
+-added global slot in the base lib _charsize_ to recognize unicode builds from ascii builds runtime
+-added registry table
+-new api call sq_pushregistrytable()
+-added type tag to the userdata type sq_settypetag()
+-sq_getuserdata now queries the userdata typetag
+-the built in function collect_garbage() as been renamed collectgarbage() for consistency reasons
+-new standard libraries(sqlibs are now obsolete)
+
+***2004-02-20 ***
+***version 1.0 beta 1***
+-fixed a bug in the compiler (thanks Martin Kofler)
+-fixed bug in the switch case statement
+-fixed the _unm metamethod
+-fixed minor bugs in the API
+-fixed automatic stack resizing
+-first beta version
+ first pass code clean up in the VM and base lib
+ first pass code coverege test has been done on VM and built-in lib
+-new VM creation API sq_open() sq_close() (sq_newvm and sq_releasevm are now obsolete)
+-new api allows to specifiy a "print" function to output text(sq_printfunc)
+-added some small optimizations
+-new cooperative multi-threading capabilities in the base library(coroutines), VMs are now a built in type("thread")
+-new built in functions have been added for manipulating the new "thread" type
+-friend virtual machines share the same root table, error handler and debug hook by default
+-new compile time options
+
+***2004-01-19 ***
+***version 0.9 alpha***
+-fixed a garbage collection bug
+-fixed some API bugs(thanks to Joshua Jensen)
+-fixed tail calls (in the version 0.8 the tail call optimization was erroneously disabled)
+-new function parameters semantic, now passing a wrong number of parameters generates an exception
+-native closures have now a built in parameter number checking
+-sq_rawget and sq_rawset now work also on arrays
+-sq_getsize now woks also on userdata
+-the userdata release hook prototype is changed(now passes the size of the userdata)
+-the lexer reader function now returns an integer instead of a char that allows better error checking on the input(thx Joshua Jensen)
+-faster compiler
+-try/catch blocks do not cause any runtime memory allocation anymore
+
+***2003-12-06 ***
+***version 0.8 alpha***
+-fixed a bug that was preventing to have callable userdata throught the metamethod _call
+-fixed a garbage collection bug
+-fixed == operator now can compare correctly different types
+-new built in method getstackinfos(level)
+-improved line informations precision for the debug hook
+-new api call sq_compilebuffer()
+-new built-in api function compilestring()
+-new syntactic sugar for function declarations inside tables
+-the debug API has been finalized
+
+***2003-11-17 ***
+***version 0.7 alpha***
+-fixed critical bug SQInteger the tail call system
+-fixed bug in the continue statement code generation
+-fixed func call param issue(thanks to Rewoonenco Andrew)
+-added _delslot metamethod(thanks to Rewoonenco Andrew)
+-new multiline string expression ( delimited by <[ and ]> )
+-normal strings ("") do not allow embedded new line anymore
+-reduced vm memory footprint(C refs are shared between friend VMs)
+-new api method sq_deleteslot()
+-new debug hook event 'r' is triggered when a function returns
+
+***2003-11-04 ***
+***version 0.6 alpha***
+-fixed switch statement(was executing the default case after a break)
+-sq_call() doesn't pop the closure (just the params)
+-the vm execution can be suspended from the C API anytime (micro-threads)
+-new api calls sq_suspendvm() sq_wakeupvm() sq_getvmstate() and sq_reservestack()
+
+***2003-10-13 ***
+***version 0.5 alpha***
+-fixed some minor bug
+-tested with non ASCII identifiers in unicode mode(I've tried chinese chars)
+-added built-in function string.find()
+-the built-in function array.sort() optionally accepts a cmp(a,b) function
+-the debug hook function now has a new prototype debug_hook(event_type,sourcefile,line,functionname)
+-fixed some debug info imprecision
+
+***2003-10-01 ***
+***version 0.4 alpha***
+-faster VM
+-sq_call will pop arguments and closure also in case of failure
+-fixed a bug in sq_remove
+-now the VM detects delegation cycles(and throws an exception)
+-new operators ++ and --
+-new operator ',' comma operator
+-fixed some expression precedence issue
+-fixed bug in sq_arraypop
+
+***2003-09-15 ***
+***version 0.3 alpha***
+-fixed a bug in array::insert()
+-optional Unicode core(define SQUNICODE or _UNICODE on Win32)
+-sq_compiler uses a new reader function SQLEXREADFUNC
+-the debug hook passes 'l' instead of 'line' for line callbacks
+ and 'c' instead of 'call' for call callbacks
+-new array.extend() bulit-in function
+-new API sq_clone()
+
+***2003-09-10 ***
+***version 0.2 pre-alpha***
+-new completely reentrant VM (sq_open and sq_close are now obsolete)
+-sq_newvm() has a new prototype
+-allocators are now global and linked in the VM
+-_newslot meta method added
+-rawset creates a slot if doesn't exists
+-the compiler error callback pass the vm handle(thanks Pierre Renaux)
+-sq_setforeignptr() sq_getforeingptr() are now public
+-sq_resume() now is possible to resume generators from C
+-sq_getlasterror() retrieve the last thrown error
+-improved docs
+
+***2003-09-06 ***
+***version 0.1 pre-alpha***
+first release
diff --git a/squirrel_3_0_1_stable/Makefile b/squirrel_3_0_1_stable/Makefile
new file mode 100644
index 000000000..8218f5bfa
--- /dev/null
+++ b/squirrel_3_0_1_stable/Makefile
@@ -0,0 +1,18 @@
+
+SQUIRREL=.
+MAKE=make
+
+sq32:
+ cd squirrel; $(MAKE)
+ cd sqstdlib; $(MAKE)
+ cd sq; $(MAKE)
+
+sqprof:
+ cd squirrel; $(MAKE) sqprof
+ cd sqstdlib; $(MAKE) sqprof
+ cd sq; $(MAKE) sqprof
+
+sq64:
+ cd squirrel; $(MAKE) sq64
+ cd sqstdlib; $(MAKE) sq64
+ cd sq; $(MAKE) sq64
diff --git a/squirrel_3_0_1_stable/README b/squirrel_3_0_1_stable/README
new file mode 100644
index 000000000..803b26aa1
--- /dev/null
+++ b/squirrel_3_0_1_stable/README
@@ -0,0 +1,23 @@
+The programming language SQUIRREL 3.0 stable
+
+--------------------------------------------------
+The project has been compiled and run on Windows(x86 and x64) and
+Linux(x86 and x64) and Solaris(x86 and x64).
+
+Has been tested with the following compilers:
+ MS Visual C++ 6.0,7.0,7.1,8.0,9.0,10.0 (32 and 64bits)
+ MinGW gcc 3.2 (mingw special 20020817-1)
+ Cygnus gcc 3.2
+ Linux gcc 3.2.3
+ Linux gcc 4.0.0 (x86 & 64bits)
+ Solaris gcc 4.0.0 (x86 & 64bits)
+
+
+Feedback and suggestions are appreciated
+project page - http://www.squirrel-lang.org
+community forums - http://forum.squirrel-lang.org
+wiki - http://wiki.squirrel-lang.org
+author - alberto@demichelis.net
+
+END OF README
+
diff --git a/squirrel_3_0_1_stable/include/sqstdaux.h b/squirrel_3_0_1_stable/include/sqstdaux.h
new file mode 100644
index 000000000..b90034823
--- /dev/null
+++ b/squirrel_3_0_1_stable/include/sqstdaux.h
@@ -0,0 +1,16 @@
+/* see copyright notice in squirrel.h */
+#ifndef _SQSTD_AUXLIB_H_
+#define _SQSTD_AUXLIB_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SQUIRREL_API void sqstd_seterrorhandlers(HSQUIRRELVM v);
+SQUIRREL_API void sqstd_printcallstack(HSQUIRRELVM v);
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /* _SQSTD_AUXLIB_H_ */
diff --git a/squirrel_3_0_1_stable/include/sqstdblob.h b/squirrel_3_0_1_stable/include/sqstdblob.h
new file mode 100644
index 000000000..eda4cc9c5
--- /dev/null
+++ b/squirrel_3_0_1_stable/include/sqstdblob.h
@@ -0,0 +1,20 @@
+/* see copyright notice in squirrel.h */
+#ifndef _SQSTDBLOB_H_
+#define _SQSTDBLOB_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SQUIRREL_API SQUserPointer sqstd_createblob(HSQUIRRELVM v, SQInteger size);
+SQUIRREL_API SQRESULT sqstd_getblob(HSQUIRRELVM v,SQInteger idx,SQUserPointer *ptr);
+SQUIRREL_API SQInteger sqstd_getblobsize(HSQUIRRELVM v,SQInteger idx);
+
+SQUIRREL_API SQRESULT sqstd_register_bloblib(HSQUIRRELVM v);
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*_SQSTDBLOB_H_*/
+
diff --git a/squirrel_3_0_1_stable/include/sqstdio.h b/squirrel_3_0_1_stable/include/sqstdio.h
new file mode 100644
index 000000000..1174201a9
--- /dev/null
+++ b/squirrel_3_0_1_stable/include/sqstdio.h
@@ -0,0 +1,53 @@
+/* see copyright notice in squirrel.h */
+#ifndef _SQSTDIO_H_
+#define _SQSTDIO_H_
+
+#ifdef __cplusplus
+
+#define SQSTD_STREAM_TYPE_TAG 0x80000000
+
+struct SQStream {
+ virtual SQInteger Read(void *buffer, SQInteger size) = 0;
+ virtual SQInteger Write(void *buffer, SQInteger size) = 0;
+ virtual SQInteger Flush() = 0;
+ virtual SQInteger Tell() = 0;
+ virtual SQInteger Len() = 0;
+ virtual SQInteger Seek(SQInteger offset, SQInteger origin) = 0;
+ virtual bool IsValid() = 0;
+ virtual bool EOS() = 0;
+};
+
+extern "C" {
+#endif
+
+#define SQ_SEEK_CUR 0
+#define SQ_SEEK_END 1
+#define SQ_SEEK_SET 2
+
+typedef void* SQFILE;
+
+SQUIRREL_API SQFILE sqstd_fopen(const SQChar *,const SQChar *);
+SQUIRREL_API SQInteger sqstd_fread(SQUserPointer, SQInteger, SQInteger, SQFILE);
+SQUIRREL_API SQInteger sqstd_fwrite(const SQUserPointer, SQInteger, SQInteger, SQFILE);
+SQUIRREL_API SQInteger sqstd_fseek(SQFILE , SQInteger , SQInteger);
+SQUIRREL_API SQInteger sqstd_ftell(SQFILE);
+SQUIRREL_API SQInteger sqstd_fflush(SQFILE);
+SQUIRREL_API SQInteger sqstd_fclose(SQFILE);
+SQUIRREL_API SQInteger sqstd_feof(SQFILE);
+
+SQUIRREL_API SQRESULT sqstd_createfile(HSQUIRRELVM v, SQFILE file,SQBool own);
+SQUIRREL_API SQRESULT sqstd_getfile(HSQUIRRELVM v, SQInteger idx, SQFILE *file);
+
+//compiler helpers
+SQUIRREL_API SQRESULT sqstd_loadfile(HSQUIRRELVM v,const SQChar *filename,SQBool printerror);
+SQUIRREL_API SQRESULT sqstd_dofile(HSQUIRRELVM v,const SQChar *filename,SQBool retval,SQBool printerror);
+SQUIRREL_API SQRESULT sqstd_writeclosuretofile(HSQUIRRELVM v,const SQChar *filename);
+
+SQUIRREL_API SQRESULT sqstd_register_iolib(HSQUIRRELVM v);
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*_SQSTDIO_H_*/
+
diff --git a/squirrel_3_0_1_stable/include/sqstdmath.h b/squirrel_3_0_1_stable/include/sqstdmath.h
new file mode 100644
index 000000000..420f2ce67
--- /dev/null
+++ b/squirrel_3_0_1_stable/include/sqstdmath.h
@@ -0,0 +1,15 @@
+/* see copyright notice in squirrel.h */
+#ifndef _SQSTD_MATH_H_
+#define _SQSTD_MATH_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SQUIRREL_API SQRESULT sqstd_register_mathlib(HSQUIRRELVM v);
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*_SQSTD_MATH_H_*/
diff --git a/squirrel_3_0_1_stable/include/sqstdstring.h b/squirrel_3_0_1_stable/include/sqstdstring.h
new file mode 100644
index 000000000..771c2f658
--- /dev/null
+++ b/squirrel_3_0_1_stable/include/sqstdstring.h
@@ -0,0 +1,33 @@
+/* see copyright notice in squirrel.h */
+#ifndef _SQSTD_STRING_H_
+#define _SQSTD_STRING_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef unsigned int SQRexBool;
+typedef struct SQRex SQRex;
+
+typedef struct {
+ const SQChar *begin;
+ SQInteger len;
+} SQRexMatch;
+
+SQUIRREL_API SQRex *sqstd_rex_compile(const SQChar *pattern,const SQChar **error);
+SQUIRREL_API void sqstd_rex_free(SQRex *exp);
+SQUIRREL_API SQBool sqstd_rex_match(SQRex* exp,const SQChar* text);
+SQUIRREL_API SQBool sqstd_rex_search(SQRex* exp,const SQChar* text, const SQChar** out_begin, const SQChar** out_end);
+SQUIRREL_API SQBool sqstd_rex_searchrange(SQRex* exp,const SQChar* text_begin,const SQChar* text_end,const SQChar** out_begin, const SQChar** out_end);
+SQUIRREL_API SQInteger sqstd_rex_getsubexpcount(SQRex* exp);
+SQUIRREL_API SQBool sqstd_rex_getsubexp(SQRex* exp, SQInteger n, SQRexMatch *subexp);
+
+SQUIRREL_API SQRESULT sqstd_format(HSQUIRRELVM v,SQInteger nformatstringidx,SQInteger *outlen,SQChar **output);
+
+SQUIRREL_API SQRESULT sqstd_register_stringlib(HSQUIRRELVM v);
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*_SQSTD_STRING_H_*/
diff --git a/squirrel_3_0_1_stable/include/sqstdsystem.h b/squirrel_3_0_1_stable/include/sqstdsystem.h
new file mode 100644
index 000000000..daefa0fd5
--- /dev/null
+++ b/squirrel_3_0_1_stable/include/sqstdsystem.h
@@ -0,0 +1,15 @@
+/* see copyright notice in squirrel.h */
+#ifndef _SQSTD_SYSTEMLIB_H_
+#define _SQSTD_SYSTEMLIB_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SQUIRREL_API SQInteger sqstd_register_systemlib(HSQUIRRELVM v);
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /* _SQSTD_SYSTEMLIB_H_ */
diff --git a/squirrel_3_0_1_stable/include/squirrel.h b/squirrel_3_0_1_stable/include/squirrel.h
new file mode 100644
index 000000000..baaaf39c5
--- /dev/null
+++ b/squirrel_3_0_1_stable/include/squirrel.h
@@ -0,0 +1,500 @@
+/*
+Copyright (c) 2003-2011 Alberto Demichelis
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+#ifndef _SQUIRREL_H_
+#define _SQUIRREL_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef SQUIRREL_API
+#define SQUIRREL_API extern
+#endif
+
+#if (defined(_WIN64) || defined(_LP64))
+#ifndef _SQ64
+#define _SQ64
+#endif
+#endif
+
+#ifdef _SQ64
+
+#ifdef _MSC_VER
+typedef __int64 SQInteger;
+typedef unsigned __int64 SQUnsignedInteger;
+typedef unsigned __int64 SQHash; /*should be the same size of a pointer*/
+#else
+typedef long long SQInteger;
+typedef unsigned long long SQUnsignedInteger;
+typedef unsigned long long SQHash; /*should be the same size of a pointer*/
+#endif
+typedef int SQInt32;
+typedef unsigned int SQUnsignedInteger32;
+#else
+typedef int SQInteger;
+typedef int SQInt32; /*must be 32 bits(also on 64bits processors)*/
+typedef unsigned int SQUnsignedInteger32; /*must be 32 bits(also on 64bits processors)*/
+typedef unsigned int SQUnsignedInteger;
+typedef unsigned int SQHash; /*should be the same size of a pointer*/
+#endif
+
+
+#ifdef SQUSEDOUBLE
+typedef double SQFloat;
+#else
+typedef float SQFloat;
+#endif
+
+#if defined(SQUSEDOUBLE) && !defined(_SQ64) || !defined(SQUSEDOUBLE) && defined(_SQ64)
+#ifdef _MSC_VER
+typedef __int64 SQRawObjectVal; //must be 64bits
+#else
+typedef long long SQRawObjectVal; //must be 64bits
+#endif
+#define SQ_OBJECT_RAWINIT() { _unVal.raw = 0; }
+#else
+typedef SQUnsignedInteger SQRawObjectVal; //is 32 bits on 32 bits builds and 64 bits otherwise
+#define SQ_OBJECT_RAWINIT()
+#endif
+
+#ifndef SQ_ALIGNMENT // SQ_ALIGNMENT shall be less than or equal to SQ_MALLOC alignments, and its value shall be power of 2.
+#if defined(SQUSEDOUBLE) || defined(_SQ64)
+#define SQ_ALIGNMENT 8
+#else
+#define SQ_ALIGNMENT 4
+#endif
+#endif
+
+typedef void* SQUserPointer;
+typedef SQUnsignedInteger SQBool;
+typedef SQInteger SQRESULT;
+
+#define SQTrue (1)
+#define SQFalse (0)
+
+struct SQVM;
+struct SQTable;
+struct SQArray;
+struct SQString;
+struct SQClosure;
+struct SQGenerator;
+struct SQNativeClosure;
+struct SQUserData;
+struct SQFunctionProto;
+struct SQRefCounted;
+struct SQClass;
+struct SQInstance;
+struct SQDelegable;
+struct SQOuter;
+
+#ifdef _UNICODE
+#define SQUNICODE
+#endif
+
+#ifdef SQUNICODE
+#if (defined(_MSC_VER) && _MSC_VER >= 1400) // 1400 = VS8
+
+#if !defined(_NATIVE_WCHAR_T_DEFINED) //this is if the compiler considers wchar_t as native type
+#define wchar_t unsigned short
+#endif
+
+#else
+typedef unsigned short wchar_t;
+#endif
+
+typedef wchar_t SQChar;
+#define _SC(a) L##a
+#define scstrcmp wcscmp
+#define scsprintf swprintf
+#define scstrlen wcslen
+#define scstrtod wcstod
+#ifdef _SQ64
+#define scstrtol _wcstoi64
+#else
+#define scstrtol wcstol
+#endif
+#define scatoi _wtoi
+#define scstrtoul wcstoul
+#define scvsprintf vswprintf
+#define scstrstr wcsstr
+#define scisspace iswspace
+#define scisdigit iswdigit
+#define scisxdigit iswxdigit
+#define scisalpha iswalpha
+#define sciscntrl iswcntrl
+#define scisalnum iswalnum
+#define scprintf wprintf
+#define MAX_CHAR 0xFFFF
+#else
+typedef char SQChar;
+#define _SC(a) a
+#define scstrcmp strcmp
+#define scsprintf sprintf
+#define scstrlen strlen
+#define scstrtod strtod
+#ifdef _SQ64
+#ifdef _MSC_VER
+#define scstrtol _strtoi64
+#else
+#define scstrtol strtoll
+#endif
+#else
+#define scstrtol strtol
+#endif
+#define scatoi atoi
+#define scstrtoul strtoul
+#define scvsprintf vsprintf
+#define scstrstr strstr
+#define scisspace isspace
+#define scisdigit isdigit
+#define scisxdigit isxdigit
+#define sciscntrl iscntrl
+#define scisalpha isalpha
+#define scisalnum isalnum
+#define scprintf printf
+#define MAX_CHAR 0xFF
+#endif
+
+#ifdef _SQ64
+#define _PRINT_INT_PREC _SC("ll")
+#define _PRINT_INT_FMT _SC("%lld")
+#else
+#define _PRINT_INT_FMT _SC("%d")
+#endif
+
+#define SQUIRREL_VERSION _SC("Squirrel 3.0.1 stable")
+#define SQUIRREL_COPYRIGHT _SC("Copyright (C) 2003-2011 Alberto Demichelis")
+#define SQUIRREL_AUTHOR _SC("Alberto Demichelis")
+#define SQUIRREL_VERSION_NUMBER 301
+
+#define SQ_VMSTATE_IDLE 0
+#define SQ_VMSTATE_RUNNING 1
+#define SQ_VMSTATE_SUSPENDED 2
+
+#define SQUIRREL_EOB 0
+#define SQ_BYTECODE_STREAM_TAG 0xFAFA
+
+#define SQOBJECT_REF_COUNTED 0x08000000
+#define SQOBJECT_NUMERIC 0x04000000
+#define SQOBJECT_DELEGABLE 0x02000000
+#define SQOBJECT_CANBEFALSE 0x01000000
+
+#define SQ_MATCHTYPEMASKSTRING (-99999)
+
+#define _RT_MASK 0x00FFFFFF
+#define _RAW_TYPE(type) (type&_RT_MASK)
+
+#define _RT_NULL 0x00000001
+#define _RT_INTEGER 0x00000002
+#define _RT_FLOAT 0x00000004
+#define _RT_BOOL 0x00000008
+#define _RT_STRING 0x00000010
+#define _RT_TABLE 0x00000020
+#define _RT_ARRAY 0x00000040
+#define _RT_USERDATA 0x00000080
+#define _RT_CLOSURE 0x00000100
+#define _RT_NATIVECLOSURE 0x00000200
+#define _RT_GENERATOR 0x00000400
+#define _RT_USERPOINTER 0x00000800
+#define _RT_THREAD 0x00001000
+#define _RT_FUNCPROTO 0x00002000
+#define _RT_CLASS 0x00004000
+#define _RT_INSTANCE 0x00008000
+#define _RT_WEAKREF 0x00010000
+#define _RT_OUTER 0x00020000
+
+typedef enum tagSQObjectType{
+ OT_NULL = (_RT_NULL|SQOBJECT_CANBEFALSE),
+ OT_INTEGER = (_RT_INTEGER|SQOBJECT_NUMERIC|SQOBJECT_CANBEFALSE),
+ OT_FLOAT = (_RT_FLOAT|SQOBJECT_NUMERIC|SQOBJECT_CANBEFALSE),
+ OT_BOOL = (_RT_BOOL|SQOBJECT_CANBEFALSE),
+ OT_STRING = (_RT_STRING|SQOBJECT_REF_COUNTED),
+ OT_TABLE = (_RT_TABLE|SQOBJECT_REF_COUNTED|SQOBJECT_DELEGABLE),
+ OT_ARRAY = (_RT_ARRAY|SQOBJECT_REF_COUNTED),
+ OT_USERDATA = (_RT_USERDATA|SQOBJECT_REF_COUNTED|SQOBJECT_DELEGABLE),
+ OT_CLOSURE = (_RT_CLOSURE|SQOBJECT_REF_COUNTED),
+ OT_NATIVECLOSURE = (_RT_NATIVECLOSURE|SQOBJECT_REF_COUNTED),
+ OT_GENERATOR = (_RT_GENERATOR|SQOBJECT_REF_COUNTED),
+ OT_USERPOINTER = _RT_USERPOINTER,
+ OT_THREAD = (_RT_THREAD|SQOBJECT_REF_COUNTED) ,
+ OT_FUNCPROTO = (_RT_FUNCPROTO|SQOBJECT_REF_COUNTED), //internal usage only
+ OT_CLASS = (_RT_CLASS|SQOBJECT_REF_COUNTED),
+ OT_INSTANCE = (_RT_INSTANCE|SQOBJECT_REF_COUNTED|SQOBJECT_DELEGABLE),
+ OT_WEAKREF = (_RT_WEAKREF|SQOBJECT_REF_COUNTED),
+ OT_OUTER = (_RT_OUTER|SQOBJECT_REF_COUNTED) //internal usage only
+}SQObjectType;
+
+#define ISREFCOUNTED(t) (t&SQOBJECT_REF_COUNTED)
+
+
+typedef union tagSQObjectValue
+{
+ struct SQTable *pTable;
+ struct SQArray *pArray;
+ struct SQClosure *pClosure;
+ struct SQOuter *pOuter;
+ struct SQGenerator *pGenerator;
+ struct SQNativeClosure *pNativeClosure;
+ struct SQString *pString;
+ struct SQUserData *pUserData;
+ SQInteger nInteger;
+ SQFloat fFloat;
+ SQUserPointer pUserPointer;
+ struct SQFunctionProto *pFunctionProto;
+ struct SQRefCounted *pRefCounted;
+ struct SQDelegable *pDelegable;
+ struct SQVM *pThread;
+ struct SQClass *pClass;
+ struct SQInstance *pInstance;
+ struct SQWeakRef *pWeakRef;
+ SQRawObjectVal raw;
+}SQObjectValue;
+
+
+typedef struct tagSQObject
+{
+ SQObjectType _type;
+ SQObjectValue _unVal;
+}SQObject;
+
+typedef struct tagSQMemberHandle{
+ SQBool _static;
+ SQInteger _index;
+}SQMemberHandle;
+
+typedef struct tagSQStackInfos{
+ const SQChar* funcname;
+ const SQChar* source;
+ SQInteger line;
+}SQStackInfos;
+
+typedef struct SQVM* HSQUIRRELVM;
+typedef SQObject HSQOBJECT;
+typedef SQMemberHandle HSQMEMBERHANDLE;
+typedef SQInteger (*SQFUNCTION)(HSQUIRRELVM);
+typedef SQInteger (*SQRELEASEHOOK)(SQUserPointer,SQInteger size);
+typedef void (*SQCOMPILERERROR)(HSQUIRRELVM,const SQChar * /*desc*/,const SQChar * /*source*/,SQInteger /*line*/,SQInteger /*column*/);
+typedef void (*SQPRINTFUNCTION)(HSQUIRRELVM,const SQChar * ,...);
+typedef void (*SQDEBUGHOOK)(HSQUIRRELVM /*v*/, SQInteger /*type*/, const SQChar * /*sourcename*/, SQInteger /*line*/, const SQChar * /*funcname*/);
+typedef SQInteger (*SQWRITEFUNC)(SQUserPointer,SQUserPointer,SQInteger);
+typedef SQInteger (*SQREADFUNC)(SQUserPointer,SQUserPointer,SQInteger);
+
+typedef SQInteger (*SQLEXREADFUNC)(SQUserPointer);
+
+typedef struct tagSQRegFunction{
+ const SQChar *name;
+ SQFUNCTION f;
+ SQInteger nparamscheck;
+ const SQChar *typemask;
+}SQRegFunction;
+
+typedef struct tagSQFunctionInfo {
+ SQUserPointer funcid;
+ const SQChar *name;
+ const SQChar *source;
+}SQFunctionInfo;
+
+/*vm*/
+SQUIRREL_API HSQUIRRELVM sq_open(SQInteger initialstacksize);
+SQUIRREL_API HSQUIRRELVM sq_newthread(HSQUIRRELVM friendvm, SQInteger initialstacksize);
+SQUIRREL_API void sq_seterrorhandler(HSQUIRRELVM v);
+SQUIRREL_API void sq_close(HSQUIRRELVM v);
+SQUIRREL_API void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p);
+SQUIRREL_API SQUserPointer sq_getforeignptr(HSQUIRRELVM v);
+SQUIRREL_API void sq_setprintfunc(HSQUIRRELVM v, SQPRINTFUNCTION printfunc,SQPRINTFUNCTION errfunc);
+SQUIRREL_API SQPRINTFUNCTION sq_getprintfunc(HSQUIRRELVM v);
+SQUIRREL_API SQPRINTFUNCTION sq_geterrorfunc(HSQUIRRELVM v);
+SQUIRREL_API SQRESULT sq_suspendvm(HSQUIRRELVM v);
+SQUIRREL_API SQRESULT sq_wakeupvm(HSQUIRRELVM v,SQBool resumedret,SQBool retval,SQBool raiseerror,SQBool throwerror);
+SQUIRREL_API SQInteger sq_getvmstate(HSQUIRRELVM v);
+
+/*compiler*/
+SQUIRREL_API SQRESULT sq_compile(HSQUIRRELVM v,SQLEXREADFUNC read,SQUserPointer p,const SQChar *sourcename,SQBool raiseerror);
+SQUIRREL_API SQRESULT sq_compilebuffer(HSQUIRRELVM v,const SQChar *s,SQInteger size,const SQChar *sourcename,SQBool raiseerror);
+SQUIRREL_API void sq_enabledebuginfo(HSQUIRRELVM v, SQBool enable);
+SQUIRREL_API void sq_notifyallexceptions(HSQUIRRELVM v, SQBool enable);
+SQUIRREL_API void sq_setcompilererrorhandler(HSQUIRRELVM v,SQCOMPILERERROR f);
+
+/*stack operations*/
+SQUIRREL_API void sq_push(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API void sq_pop(HSQUIRRELVM v,SQInteger nelemstopop);
+SQUIRREL_API void sq_poptop(HSQUIRRELVM v);
+SQUIRREL_API void sq_remove(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQInteger sq_gettop(HSQUIRRELVM v);
+SQUIRREL_API void sq_settop(HSQUIRRELVM v,SQInteger newtop);
+SQUIRREL_API SQRESULT sq_reservestack(HSQUIRRELVM v,SQInteger nsize);
+SQUIRREL_API SQInteger sq_cmp(HSQUIRRELVM v);
+SQUIRREL_API void sq_move(HSQUIRRELVM dest,HSQUIRRELVM src,SQInteger idx);
+
+/*object creation handling*/
+SQUIRREL_API SQUserPointer sq_newuserdata(HSQUIRRELVM v,SQUnsignedInteger size);
+SQUIRREL_API void sq_newtable(HSQUIRRELVM v);
+SQUIRREL_API void sq_newtableex(HSQUIRRELVM v,SQInteger initialcapacity);
+SQUIRREL_API void sq_newarray(HSQUIRRELVM v,SQInteger size);
+SQUIRREL_API void sq_newclosure(HSQUIRRELVM v,SQFUNCTION func,SQUnsignedInteger nfreevars);
+SQUIRREL_API SQRESULT sq_setparamscheck(HSQUIRRELVM v,SQInteger nparamscheck,const SQChar *typemask);
+SQUIRREL_API SQRESULT sq_bindenv(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API void sq_pushstring(HSQUIRRELVM v,const SQChar *s,SQInteger len);
+SQUIRREL_API void sq_pushfloat(HSQUIRRELVM v,SQFloat f);
+SQUIRREL_API void sq_pushinteger(HSQUIRRELVM v,SQInteger n);
+SQUIRREL_API void sq_pushbool(HSQUIRRELVM v,SQBool b);
+SQUIRREL_API void sq_pushuserpointer(HSQUIRRELVM v,SQUserPointer p);
+SQUIRREL_API void sq_pushnull(HSQUIRRELVM v);
+SQUIRREL_API SQObjectType sq_gettype(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQInteger sq_getsize(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_getbase(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQBool sq_instanceof(HSQUIRRELVM v);
+SQUIRREL_API SQRESULT sq_tostring(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API void sq_tobool(HSQUIRRELVM v, SQInteger idx, SQBool *b);
+SQUIRREL_API SQRESULT sq_getstring(HSQUIRRELVM v,SQInteger idx,const SQChar **c);
+SQUIRREL_API SQRESULT sq_getinteger(HSQUIRRELVM v,SQInteger idx,SQInteger *i);
+SQUIRREL_API SQRESULT sq_getfloat(HSQUIRRELVM v,SQInteger idx,SQFloat *f);
+SQUIRREL_API SQRESULT sq_getbool(HSQUIRRELVM v,SQInteger idx,SQBool *b);
+SQUIRREL_API SQRESULT sq_getthread(HSQUIRRELVM v,SQInteger idx,HSQUIRRELVM *thread);
+SQUIRREL_API SQRESULT sq_getuserpointer(HSQUIRRELVM v,SQInteger idx,SQUserPointer *p);
+SQUIRREL_API SQRESULT sq_getuserdata(HSQUIRRELVM v,SQInteger idx,SQUserPointer *p,SQUserPointer *typetag);
+SQUIRREL_API SQRESULT sq_settypetag(HSQUIRRELVM v,SQInteger idx,SQUserPointer typetag);
+SQUIRREL_API SQRESULT sq_gettypetag(HSQUIRRELVM v,SQInteger idx,SQUserPointer *typetag);
+SQUIRREL_API void sq_setreleasehook(HSQUIRRELVM v,SQInteger idx,SQRELEASEHOOK hook);
+SQUIRREL_API SQChar *sq_getscratchpad(HSQUIRRELVM v,SQInteger minsize);
+SQUIRREL_API SQRESULT sq_getfunctioninfo(HSQUIRRELVM v,SQInteger idx,SQFunctionInfo *fi);
+SQUIRREL_API SQRESULT sq_getclosureinfo(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger *nparams,SQUnsignedInteger *nfreevars);
+SQUIRREL_API SQRESULT sq_setnativeclosurename(HSQUIRRELVM v,SQInteger idx,const SQChar *name);
+SQUIRREL_API SQRESULT sq_setinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer p);
+SQUIRREL_API SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer *p,SQUserPointer typetag);
+SQUIRREL_API SQRESULT sq_setclassudsize(HSQUIRRELVM v, SQInteger idx, SQInteger udsize);
+SQUIRREL_API SQRESULT sq_newclass(HSQUIRRELVM v,SQBool hasbase);
+SQUIRREL_API SQRESULT sq_createinstance(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_setattributes(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_getattributes(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_getclass(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API void sq_weakref(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_getdefaultdelegate(HSQUIRRELVM v,SQObjectType t);
+SQUIRREL_API SQRESULT sq_getmemberhandle(HSQUIRRELVM v,SQInteger idx,HSQMEMBERHANDLE *handle);
+SQUIRREL_API SQRESULT sq_getbyhandle(HSQUIRRELVM v,SQInteger idx,HSQMEMBERHANDLE *handle);
+SQUIRREL_API SQRESULT sq_setbyhandle(HSQUIRRELVM v,SQInteger idx,HSQMEMBERHANDLE *handle);
+
+/*object manipulation*/
+SQUIRREL_API void sq_pushroottable(HSQUIRRELVM v);
+SQUIRREL_API void sq_pushregistrytable(HSQUIRRELVM v);
+SQUIRREL_API void sq_pushconsttable(HSQUIRRELVM v);
+SQUIRREL_API SQRESULT sq_setroottable(HSQUIRRELVM v);
+SQUIRREL_API SQRESULT sq_setconsttable(HSQUIRRELVM v);
+SQUIRREL_API SQRESULT sq_newslot(HSQUIRRELVM v, SQInteger idx, SQBool bstatic);
+SQUIRREL_API SQRESULT sq_deleteslot(HSQUIRRELVM v,SQInteger idx,SQBool pushval);
+SQUIRREL_API SQRESULT sq_set(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_get(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_rawget(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_rawset(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_rawdeleteslot(HSQUIRRELVM v,SQInteger idx,SQBool pushval);
+SQUIRREL_API SQRESULT sq_arrayappend(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_arraypop(HSQUIRRELVM v,SQInteger idx,SQBool pushval);
+SQUIRREL_API SQRESULT sq_arrayresize(HSQUIRRELVM v,SQInteger idx,SQInteger newsize);
+SQUIRREL_API SQRESULT sq_arrayreverse(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_arrayremove(HSQUIRRELVM v,SQInteger idx,SQInteger itemidx);
+SQUIRREL_API SQRESULT sq_arrayinsert(HSQUIRRELVM v,SQInteger idx,SQInteger destpos);
+SQUIRREL_API SQRESULT sq_setdelegate(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_getdelegate(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_clone(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_setfreevariable(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval);
+SQUIRREL_API SQRESULT sq_next(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_getweakrefval(HSQUIRRELVM v,SQInteger idx);
+SQUIRREL_API SQRESULT sq_clear(HSQUIRRELVM v,SQInteger idx);
+
+/*calls*/
+SQUIRREL_API SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror);
+SQUIRREL_API SQRESULT sq_resume(HSQUIRRELVM v,SQBool retval,SQBool raiseerror);
+SQUIRREL_API const SQChar *sq_getlocal(HSQUIRRELVM v,SQUnsignedInteger level,SQUnsignedInteger idx);
+SQUIRREL_API SQRESULT sq_getcallee(HSQUIRRELVM v);
+SQUIRREL_API const SQChar *sq_getfreevariable(HSQUIRRELVM v,SQInteger idx,SQUnsignedInteger nval);
+SQUIRREL_API SQRESULT sq_throwerror(HSQUIRRELVM v,const SQChar *err);
+SQUIRREL_API SQRESULT sq_throwobject(HSQUIRRELVM v);
+SQUIRREL_API void sq_reseterror(HSQUIRRELVM v);
+SQUIRREL_API void sq_getlasterror(HSQUIRRELVM v);
+
+/*raw object handling*/
+SQUIRREL_API SQRESULT sq_getstackobj(HSQUIRRELVM v,SQInteger idx,HSQOBJECT *po);
+SQUIRREL_API void sq_pushobject(HSQUIRRELVM v,HSQOBJECT obj);
+SQUIRREL_API void sq_addref(HSQUIRRELVM v,HSQOBJECT *po);
+SQUIRREL_API SQBool sq_release(HSQUIRRELVM v,HSQOBJECT *po);
+SQUIRREL_API SQUnsignedInteger sq_getrefcount(HSQUIRRELVM v,HSQOBJECT *po);
+SQUIRREL_API void sq_resetobject(HSQOBJECT *po);
+SQUIRREL_API const SQChar *sq_objtostring(const HSQOBJECT *o);
+SQUIRREL_API SQBool sq_objtobool(const HSQOBJECT *o);
+SQUIRREL_API SQInteger sq_objtointeger(const HSQOBJECT *o);
+SQUIRREL_API SQFloat sq_objtofloat(const HSQOBJECT *o);
+SQUIRREL_API SQUserPointer sq_objtouserpointer(const HSQOBJECT *o);
+SQUIRREL_API SQRESULT sq_getobjtypetag(const HSQOBJECT *o,SQUserPointer * typetag);
+
+/*GC*/
+SQUIRREL_API SQInteger sq_collectgarbage(HSQUIRRELVM v);
+SQUIRREL_API SQRESULT sq_resurrectunreachable(HSQUIRRELVM v);
+
+/*serialization*/
+SQUIRREL_API SQRESULT sq_writeclosure(HSQUIRRELVM vm,SQWRITEFUNC writef,SQUserPointer up);
+SQUIRREL_API SQRESULT sq_readclosure(HSQUIRRELVM vm,SQREADFUNC readf,SQUserPointer up);
+
+/*mem allocation*/
+SQUIRREL_API void *sq_malloc(SQUnsignedInteger size);
+SQUIRREL_API void *sq_realloc(void* p,SQUnsignedInteger oldsize,SQUnsignedInteger newsize);
+SQUIRREL_API void sq_free(void *p,SQUnsignedInteger size);
+
+/*debug*/
+SQUIRREL_API SQRESULT sq_stackinfos(HSQUIRRELVM v,SQInteger level,SQStackInfos *si);
+SQUIRREL_API void sq_setdebughook(HSQUIRRELVM v);
+SQUIRREL_API void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook);
+
+/*UTILITY MACRO*/
+#define sq_isnumeric(o) ((o)._type&SQOBJECT_NUMERIC)
+#define sq_istable(o) ((o)._type==OT_TABLE)
+#define sq_isarray(o) ((o)._type==OT_ARRAY)
+#define sq_isfunction(o) ((o)._type==OT_FUNCPROTO)
+#define sq_isclosure(o) ((o)._type==OT_CLOSURE)
+#define sq_isgenerator(o) ((o)._type==OT_GENERATOR)
+#define sq_isnativeclosure(o) ((o)._type==OT_NATIVECLOSURE)
+#define sq_isstring(o) ((o)._type==OT_STRING)
+#define sq_isinteger(o) ((o)._type==OT_INTEGER)
+#define sq_isfloat(o) ((o)._type==OT_FLOAT)
+#define sq_isuserpointer(o) ((o)._type==OT_USERPOINTER)
+#define sq_isuserdata(o) ((o)._type==OT_USERDATA)
+#define sq_isthread(o) ((o)._type==OT_THREAD)
+#define sq_isnull(o) ((o)._type==OT_NULL)
+#define sq_isclass(o) ((o)._type==OT_CLASS)
+#define sq_isinstance(o) ((o)._type==OT_INSTANCE)
+#define sq_isbool(o) ((o)._type==OT_BOOL)
+#define sq_isweakref(o) ((o)._type==OT_WEAKREF)
+#define sq_type(o) ((o)._type)
+
+/* deprecated */
+#define sq_createslot(v,n) sq_newslot(v,n,SQFalse)
+
+#define SQ_OK (0)
+#define SQ_ERROR (-1)
+
+#define SQ_FAILED(res) (res<0)
+#define SQ_SUCCEEDED(res) (res>=0)
+
+#ifdef __cplusplus
+} /*extern "C"*/
+#endif
+
+#endif /*_SQUIRREL_H_*/
diff --git a/squirrel_3_0_1_stable/sqplus/Makefile b/squirrel_3_0_1_stable/sqplus/Makefile
new file mode 100644
index 000000000..1bef39832
--- /dev/null
+++ b/squirrel_3_0_1_stable/sqplus/Makefile
@@ -0,0 +1,18 @@
+SQUIRREL= ..
+
+OUT= $(SQUIRREL)/lib/libsqplus.a
+INCDIRS= -I$(SQUIRREL)/include -I. -Iinclude
+
+ALLSRCS = $(wildcard *.cpp)
+WIN32SRCS = $(wildcard *Win32*)
+SRCS = $(filter-out $(WIN32SRCS),$(ALLSRCS))
+
+sqplus:
+# g++ -fno-rtti -c $(SRCS) $(INCDIRS)
+ g++ -O3 -fno-rtti -Os -c $(SRCS) $(INCDIRS)
+ ar rc $(OUT) *.o
+ rm *.o
+
+
+#g++ -O3 -fno-rtti -Os -c $(SRCS) $(INCDIRS)
+#g++ -ggdb -fno-rtti -c $(SRCS) $(INCDIRS)
diff --git a/squirrel_3_0_1_stable/sqplus/SqPlus.cpp b/squirrel_3_0_1_stable/sqplus/SqPlus.cpp
new file mode 100644
index 000000000..a2eaacb72
--- /dev/null
+++ b/squirrel_3_0_1_stable/sqplus/SqPlus.cpp
@@ -0,0 +1,382 @@
+#include "sqplus.h"
+#include
+
+#ifdef SQPLUS_SMARTPOINTER_OPT
+#define SQPLUS_SMARTPOINTER_CPP_DECLARATION
+#include "SqPlusSmartPointer.h"
+#endif
+
+namespace SqPlus {
+
+static int getVarInfo(StackHandler & sa,VarRefPtr & vr) {
+ HSQOBJECT htable = sa.GetObjectHandle(1);
+ SquirrelObject table(htable);
+ const SQChar * el = sa.GetString(2);
+ ScriptStringVar256 varNameTag;
+ getVarNameTag(varNameTag,sizeof(varNameTag),el);
+ SQUserPointer data=0;
+ if (!table.RawGetUserData(varNameTag,&data)) {
+ return sa.ThrowError(_SC("getVarInfo: Could not retrieve UserData")); // Results in variable not being found error.
+ }
+ vr = (VarRefPtr)data;
+ return SQ_OK;
+} // getVarInfo
+
+static int getInstanceVarInfo(StackHandler & sa,VarRefPtr & vr,SQUserPointer & data) {
+ HSQOBJECT ho = sa.GetObjectHandle(1);
+ SquirrelObject instance(ho);
+ const SQChar * el = sa.GetString(2);
+ ScriptStringVar256 varNameTag;
+ getVarNameTag(varNameTag,sizeof(varNameTag),el);
+ SQUserPointer ivrData=0;
+ if (!instance.RawGetUserData(varNameTag,&ivrData)) {
+ return sa.ThrowError(_SC("getInstanceVarInfo: Could not retrieve UserData")); // Results in variable not being found error.
+ }
+ vr = (VarRefPtr)ivrData;
+
+ char * up;
+ if (!(vr->m_access & (VAR_ACCESS_STATIC|VAR_ACCESS_CONSTANT))) {
+ SQUserPointer typetag;
+ instance.GetTypeTag(&typetag);
+
+#if defined(SQ_USE_CLASS_INHERITANCE)
+ if (typetag != vr->instanceType) {
+ SquirrelObject typeTable = instance.GetValue(SQ_CLASS_OBJECT_TABLE_NAME);
+ up = (char *)typeTable.GetUserPointer(INT((size_t)vr->instanceType)); // 64-bit compatible version.
+ if (!up) {
+ throw SquirrelError(_SC("Invalid Instance Type"));
+ }
+ } else {
+ up = (char *)instance.GetInstanceUP(0);
+ } // if
+
+#elif defined(SQ_USE_CLASS_INHERITANCE_SIMPLE)
+ ClassTypeBase *ctb = (ClassTypeBase*)vr->instanceType;
+ up = (char *)instance.GetInstanceUP(0);
+ // Walk base classes until type tag match, adjust for inheritence offset
+ while(ctb && typetag!=ctb) {
+ up = (char*)up - ctb->m_offset;
+ ctb = ctb->m_pbase;
+ }
+ if (!ctb) {
+ throw SquirrelError(_SC("Invalid Instance Type"));
+ }
+#else
+ up = (char *)instance.GetInstanceUP(0);
+#endif
+
+#ifdef SQPLUS_SMARTPOINTER_OPT
+#define SQPLUS_SMARTPOINTER_INSTANCE_VARINFO
+#include "SqPlusSmartPointer.h"
+#endif
+
+ up += (size_t)vr->offsetOrAddrOrConst; // Offset
+ } else {
+ up = (char *)vr->offsetOrAddrOrConst; // Address
+ } // if
+ data = up;
+ return SQ_OK;
+} // getInstanceVarInfo
+
+
+// If not static/global, message can (and will) disappear before arriving at catch (G++)
+static ScriptStringVar256 g_msg_throw;
+
+static int setVar(StackHandler & sa,VarRef * vr,void * data) {
+ if (vr->m_access & (VAR_ACCESS_READ_ONLY|VAR_ACCESS_CONSTANT)) {
+ const SQChar * el = sa.GetString(2);
+ SCSNPRINTF(g_msg_throw.s,sizeof(g_msg_throw),_SC("setVar(): Cannot write to constant: %s"),el);
+ throw SquirrelError(g_msg_throw.s);
+ } // if
+ switch (vr->m_type) {
+ case TypeInfo::TypeID: {
+ INT * val = (INT *)data; // Address
+ if (val) {
+ INT v = sa.GetInt(3);
+ // Support for different int sizes
+ switch( vr->m_size ) {
+ case 1: v = (*(char*)val = (char)v); break;
+ case 2: v = (*(short*)val = (short)v); break;
+#ifdef _SQ64
+ case 4: v = (*(int*)val = (int)v); break;
+#endif
+ default: *val = v;
+ }
+ return sa.Return(v);
+ } // if
+ break;
+ } // case
+ case TypeInfo::TypeID: {
+ unsigned * val = (unsigned *)data; // Address
+ if (val) {
+ *val = sa.GetInt(3);
+ return sa.Return(static_cast(*val));
+ } // if
+ break;
+ } // case
+ case TypeInfo::TypeID: {
+ FLOAT * val = (FLOAT *)data; // Address
+ if (val) {
+ *val = sa.GetFloat(3);
+ return sa.Return(*val);
+ } // if
+ break;
+ } // case
+ case TypeInfo::TypeID: {
+ bool * val = (bool *)data; // Address
+ if (val) {
+ *val = sa.GetBool(3) ? true : false;
+ return sa.Return(*val);
+ } // if
+ break;
+ } // case
+ case VAR_TYPE_INSTANCE: {
+ HSQUIRRELVM v = sa.GetVMPtr();
+ SQUserPointer src = sa.GetInstanceUp(3,(SQUserPointer)vr->varType); // Effectively performs: ClassType<>::type() == ClassType<>().
+ if (!src) {
+ throw SquirrelError(_SC("INSTANCE type assignment mismatch"));
+ }
+ vr->varType->vgetCopyFunc()(data,src);
+ return 0;
+ }
+ case TypeInfo::TypeID: {
+ const SQChar * el = sa.GetString(2);
+ SCSNPRINTF(g_msg_throw.s,sizeof(g_msg_throw),_SC("setVar(): Cannot write to an SQUserPointer: %s"),el);
+ throw SquirrelError(g_msg_throw.s);
+ } // case
+ case TypeInfo::TypeID: {
+ ScriptStringVarBase * val = (ScriptStringVarBase *)data; // Address
+ if (val) {
+ const SQChar * strVal = sa.GetString(3);
+ if (strVal) {
+ *val = strVal;
+ return sa.Return(val->s);
+ } // if
+ } // if
+ break;
+ } // case
+#if defined(SQPLUS_SUPPORT_STD_STRING) && !defined(SQUNICODE)
+ case TypeInfo::TypeID: {
+ std::string *val = (std::string*)data; // Address
+ if (val) {
+ const SQChar *strVal = sa.GetString(3);
+ if (strVal) {
+ *val = strVal;
+ return sa.Return(val->c_str());
+ } // if
+ } // if
+ break;
+ } // case
+#endif
+ } // switch
+ return SQ_ERROR;
+} // setVar
+
+static int getVar(StackHandler & sa,VarRef * vr,void * data) {
+ switch (vr->m_type) {
+ case TypeInfo::TypeID: {
+ if (!(vr->m_access & VAR_ACCESS_CONSTANT)) {
+ if (data) {
+ INT v;
+ // Support for different int sizes
+ switch( vr->m_size ){
+ case 1: v = *(char*)data; break;
+ case 2: v = *(short*)data; break;
+#ifdef _SQ64
+ case 4: v = *(int*)data; break;
+#endif
+ default: v = *(INT*)data;
+ }
+ return sa.Return(v);
+ } // if
+ } else {
+ INT * val = (INT *)&data; // Constant value
+ return sa.Return(*val);
+ } // if
+ break;
+ } // case
+ case TypeInfo::TypeID: {
+ if (!(vr->m_access & VAR_ACCESS_CONSTANT)) {
+ unsigned * val = (unsigned *)data; // Address
+ if (val){
+ return sa.Return(static_cast(*val));
+ }
+ } else {
+ unsigned * val = (unsigned *)&data; // Constant value
+ return sa.Return(static_cast(*val));
+ } // if
+ break;
+ } // case
+ case TypeInfo::TypeID: {
+ if (!(vr->m_access & VAR_ACCESS_CONSTANT)) {
+ FLOAT * val = (FLOAT *)data; // Address
+ if (val) {
+ return sa.Return(*val);
+ } // if
+ } else {
+ FLOAT * val = (FLOAT *)&data; // Constant value
+ return sa.Return(*val);
+ } // if
+ break;
+ } // case
+ case TypeInfo::TypeID: {
+ if (!(vr->m_access & VAR_ACCESS_CONSTANT)) {
+ bool * val = (bool *)data; // Address
+ if (val) {
+ return sa.Return(*val);
+ } // if
+ } else {
+ bool * val = (bool *)&data; // Constant value
+ return sa.Return(*val);
+ } // if
+ break;
+ } // case
+ case VAR_TYPE_INSTANCE:
+ if (!CreateNativeClassInstance(sa.GetVMPtr(),vr->varType->GetTypeName(),data,0)) { // data = address. Allocates memory.
+ SCSNPRINTF(g_msg_throw.s,sizeof(g_msg_throw),_SC("getVar(): Could not create instance: %s"),vr->varType->GetTypeName());
+ throw SquirrelError(g_msg_throw.s);
+ } // if
+ return 1;
+ case TypeInfo::TypeID:
+ return sa.Return(data); // The address of member variable, not the variable itself.
+ case TypeInfo::TypeID: {
+ if (!(vr->m_access & VAR_ACCESS_CONSTANT)) {
+ ScriptStringVarBase * val = (ScriptStringVarBase *)data; // Address
+ if (val) {
+ return sa.Return(val->s);
+ } // if
+ } else {
+ throw SquirrelError(_SC("getVar(): Invalid type+access: 'ScriptStringVarBase' with VAR_ACCESS_CONSTANT (use VAR_ACCESS_READ_ONLY instead)"));
+ }
+ break;
+ } // case
+ case TypeInfo::TypeID: {
+ if (!(vr->m_access & VAR_ACCESS_CONSTANT)) {
+ if( vr->m_access==VAR_ACCESS_READ_WRITE )
+ throw SquirrelError(_SC("getVar(): Invalid type+access: 'const SQChar *' without VAR_ACCESS_CONSTANT"));
+ // It is OK to read from a SQChar* if requested
+ return sa.Return(*(const SQChar **)data); // Address
+ } else {
+ return sa.Return((const SQChar *)data); // Address
+ }
+ break;
+ } // case
+#ifdef SQPLUS_SUPPORT_STD_STRING
+ case TypeInfo::TypeID: {
+ if (!(vr->m_access & VAR_ACCESS_CONSTANT)) {
+ std::string *val = (std::string *)data; // Address
+ if (val) {
+ return sa.Return(val->c_str());
+ }
+ } else {
+ throw SquirrelError(_SC("getVar(): Invalid type+access: 'std::string' with VAR_ACCESS_CONSTANT (use VAR_ACCESS_READ_ONLY instead)"));
+ }
+ break;
+ } // case
+#endif
+ } // switch
+ return SQ_ERROR;
+} // getVar
+
+// === Global Vars ===
+
+int setVarFunc(HSQUIRRELVM v) {
+ SquirrelVM::Init(v); // For handling multi-VM setting right
+ StackHandler sa(v);
+ if (sa.GetType(1) == OT_TABLE) {
+ VarRefPtr vr;
+ int res = getVarInfo(sa,vr);
+ if (res != SQ_OK) return res;
+ return setVar(sa,vr,vr->offsetOrAddrOrConst);
+ } // if
+ return SQ_ERROR;
+} // setVarFunc
+
+int getVarFunc(HSQUIRRELVM v) {
+ SquirrelVM::Init(v); // For handling multi-VM setting right
+ StackHandler sa(v);
+ if (sa.GetType(1) == OT_TABLE) {
+ VarRefPtr vr;
+ int res = getVarInfo(sa,vr);
+ if (res != SQ_OK) return res;
+ return getVar(sa,vr,vr->offsetOrAddrOrConst);
+ } // if
+ return SQ_ERROR;
+} // getVarFunc
+
+// === Instance Vars ===
+
+int setInstanceVarFunc(HSQUIRRELVM v) {
+ SquirrelVM::Init(v); // For handling multi-VM setting right
+ StackHandler sa(v);
+ if (sa.GetType(1) == OT_INSTANCE) {
+ VarRefPtr vr;
+ void * data;
+ int res = getInstanceVarInfo(sa,vr,data);
+ if (res != SQ_OK) return res;
+ return setVar(sa,vr,data);
+ } // if
+ return SQ_ERROR;
+} // setInstanceVarFunc
+
+int getInstanceVarFunc(HSQUIRRELVM v) {
+ SquirrelVM::Init(v); // For handling multi-VM setting right
+ StackHandler sa(v);
+ if (sa.GetType(1) == OT_INSTANCE) {
+ VarRefPtr vr;
+ void * data;
+ int res = getInstanceVarInfo(sa,vr,data);
+ if (res != SQ_OK) return res;
+ return getVar(sa,vr,data);
+ } // if
+ return SQ_ERROR;
+} // getInstanceVarFunc
+
+// === Classes ===
+
+BOOL CreateClass(HSQUIRRELVM v,SquirrelObject & newClass,SQUserPointer classType,const SQChar * name,const SQChar * baseName) {
+ int n = 0;
+ int oldtop = sq_gettop(v);
+ sq_pushroottable(v);
+ sq_pushstring(v,name,-1);
+ if (baseName) {
+ sq_pushstring(v,baseName,-1);
+ if (SQ_FAILED(sq_get(v,-3))) { // Make sure the base exists if specified by baseName.
+ sq_settop(v,oldtop);
+ return FALSE;
+ } // if
+ } // if
+ if (SQ_FAILED(sq_newclass(v,baseName ? 1 : 0))) { // Will inherit from base class on stack from sq_get() above.
+ sq_settop(v,oldtop);
+ return FALSE;
+ } // if
+ newClass.AttachToStackObject(-1);
+ sq_settypetag(v,-1,classType);
+ sq_createslot(v,-3);
+ sq_pop(v,1);
+ return TRUE;
+} // CreateClass
+
+SquirrelObject RegisterClassType(HSQUIRRELVM v,const SQChar * scriptClassName,SQUserPointer classType,SQFUNCTION constructor) {
+ SquirrelVM::Init(v); // For handling multi-VM setting right
+ int top = sq_gettop(v);
+ SquirrelObject newClass;
+ if (CreateClass(v,newClass,classType,scriptClassName)) {
+ SquirrelVM::CreateFunction(newClass,constructor,_SC("constructor"));
+ } // if
+ sq_settop(v,top);
+ return newClass;
+} // RegisterClassType
+
+
+///////////////////////////////////////////////////////////////////////////
+// GCC sometimes has problems with finding inline functions at link time
+// (that also have a template definition). To solve the problem,
+// non-inlines goes here.
+#ifdef GCC_INLINE_WORKAROUND
+# include "SqPlusFunctionCallImpl.h"
+#endif // GCC_INLINE_WORKAROUND
+///////////////////////////////////////////////////////////////////////////
+
+} // namespace SqPlus
+
diff --git a/squirrel_3_0_1_stable/sqplus/SqPlusCallTemplates.h b/squirrel_3_0_1_stable/sqplus/SqPlusCallTemplates.h
new file mode 100644
index 000000000..75e4887c5
--- /dev/null
+++ b/squirrel_3_0_1_stable/sqplus/SqPlusCallTemplates.h
@@ -0,0 +1,337 @@
+
+// This file is included multiple times, with varying options - No header guard.
+
+// Include this file to generate Call templates with or without these options:
+// - SQPLUS_APPLY_CONST - const qualifier after functions signature (const func / member func)
+// - SQPLUS_APPLY_CDECL - qualifier before class name (MSVC specific calling convention)
+
+#undef CONST_QUAL
+#undef CALL_QUAL
+
+#ifdef SQPLUS_APPLY_CONST
+ #define CONST_QUAL const
+#else
+ #define CONST_QUAL
+#endif
+
+#ifdef SQPLUS_APPLY_CDECL
+ #define CALL_QUAL __cdecl
+#else
+ #define CALL_QUAL
+#endif
+
+
+#ifdef SQPLUS_CALL_MFUNC_RET0
+
+ // Include this file again, with __cdecl also (Visual C++ specific)
+ #if defined(SQPLUS_ENABLE_CDECL_MEMBER_FUNCTIONS) && !defined(SQPLUS_APPLY_CDECL)
+ #define SQPLUS_APPLY_CDECL
+ #include "SqPlusCallTemplates.h"
+ #undef CALL_QUAL
+ #define CALL_QUAL
+ #endif
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)() CONST_QUAL,HSQUIRRELVM v,int /*index*/) {
+ RT ret = (callee.*func)();
+ Push(v,ret);
+ return 1;
+ }
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)(P1) CONST_QUAL,HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ RT ret = (callee.*func)(
+ Get(TypeWrapper(),v,index + 0)
+ );
+ Push(v,ret);
+ return 1;
+ }
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)(P1,P2) CONST_QUAL,HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ RT ret = (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1)
+ );
+ Push(v,ret);
+ return 1;
+ }
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)(P1,P2,P3) CONST_QUAL,HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ RT ret = (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2)
+ );
+ Push(v,ret);
+ return 1;
+ }
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)(P1,P2,P3,P4) CONST_QUAL,HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ RT ret = (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3)
+ );
+ Push(v,ret);
+ return 1;
+ }
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)(P1,P2,P3,P4,P5) CONST_QUAL,HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ sq_argassert(5,index + 4);
+ RT ret = (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3),
+ Get(TypeWrapper(),v,index + 4)
+ );
+ Push(v,ret);
+ return 1;
+ }
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)(P1,P2,P3,P4,P5,P6) CONST_QUAL,HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ sq_argassert(5,index + 4);
+ sq_argassert(6,index + 5);
+ RT ret = (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3),
+ Get(TypeWrapper(),v,index + 4),
+ Get(TypeWrapper(),v,index + 5)
+ );
+ Push(v,ret);
+ return 1;
+ }
+
+ template
+ static int Call(Callee & callee,RT (CALL_QUAL Callee::*func)(P1,P2,P3,P4,P5,P6,P7) CONST_QUAL,HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ sq_argassert(5,index + 4);
+ sq_argassert(6,index + 5);
+ sq_argassert(7,index + 6);
+ RT ret = (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3),
+ Get(TypeWrapper(),v,index + 4),
+ Get(TypeWrapper(),v,index + 5),
+ Get(TypeWrapper(),v,index + 6)
+ );
+ Push(v,ret);
+ return 1;
+ }
+#undef SQPLUS_CALL_MFUNC_RET0
+#endif // SQPLUS_CALL_MFUNC_RET0
+
+
+#ifdef SQPLUS_CALL_MFUNC_NORET
+
+ // Include this very same thing with __cdecl also
+ #if defined(SQPLUS_ENABLE_CDECL_MEMBER_FUNCTIONS) && !defined(SQPLUS_APPLY_CDECL)
+ #define SQPLUS_APPLY_CDECL
+ #include "SqPlusCallTemplates.h"
+ #undef CALL_QUAL
+ #define CALL_QUAL
+ #endif
+
+ // === Member function calls ===
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)() CONST_QUAL, HSQUIRRELVM,int /*index*/) {
+ (callee.*func)();
+ return 0;
+ }
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)(P1) CONST_QUAL, HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ (callee.*func)(
+ Get(TypeWrapper(),v,index + 0)
+ );
+ return 0;
+ }
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)(P1,P2) CONST_QUAL, HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1)
+ );
+ return 0;
+ }
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)(P1,P2,P3) CONST_QUAL, HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2)
+ );
+ return 0;
+ }
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)(P1,P2,P3,P4) CONST_QUAL, HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3)
+ );
+ return 0;
+ }
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)(P1,P2,P3,P4,P5) CONST_QUAL, HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ sq_argassert(5,index + 4);
+ (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3),
+ Get(TypeWrapper(),v,index + 4)
+ );
+ return 0;
+ }
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)(P1,P2,P3,P4,P5,P6) CONST_QUAL, HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ sq_argassert(5,index + 4);
+ sq_argassert(6,index + 5);
+ (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3),
+ Get(TypeWrapper(),v,index + 4),
+ Get(TypeWrapper(),v,index + 5)
+ );
+ return 0;
+ }
+
+ template
+ static int Call(Callee & callee,void (CALL_QUAL Callee::*func)(P1,P2,P3,P4,P5,P6,P7) CONST_QUAL, HSQUIRRELVM v,int index) {
+ sq_argassert(1,index + 0);
+ sq_argassert(2,index + 1);
+ sq_argassert(3,index + 2);
+ sq_argassert(4,index + 3);
+ sq_argassert(5,index + 4);
+ sq_argassert(6,index + 5);
+ sq_argassert(7,index + 6);
+ (callee.*func)(
+ Get(TypeWrapper(),v,index + 0),
+ Get(TypeWrapper(),v,index + 1),
+ Get(TypeWrapper(),v,index + 2),
+ Get(TypeWrapper(),v,index + 3),
+ Get(TypeWrapper(),v,index + 4),
+ Get(TypeWrapper(),v,index + 5),
+ Get(TypeWrapper(),v,index + 6)
+ );
+ return 0;
+ }
+#undef SQPLUS_CALL_MFUNC_NORET
+#endif // SQPLUS_CALL_MFUNC_NORET
+
+
+#ifdef SQPLUS_CALL_MFUNC_RET1
+
+ // Include this very same thing with __cdecl also
+ #if defined(SQPLUS_ENABLE_CDECL_MEMBER_FUNCTIONS) && !defined(SQPLUS_APPLY_CDECL)
+ #define SQPLUS_APPLY_CDECL
+ #include "SqPlusCallTemplates.h"
+ #undef CALL_QUAL
+ #define CALL_QUAL
+ #endif
+
+ template
+ int Call(Callee & callee, RT (CALL_QUAL Callee::*func)() CONST_QUAL, HSQUIRRELVM v,int index) {
+ return ReturnSpecialization