summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorcedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-16 00:40:51 +0200
committercedeel@gmail.com <cedeel@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-06-16 00:40:51 +0200
commitc4f785e0bea4104d9a0f3346478d856cd9903605 (patch)
tree42c570687d30b3f0c1ae0a78e6be2e1df9fad5b1 /source
parentRewritten ForEach using #define-s, new ones can be added as a simple one-liner (diff)
downloadcuberite-c4f785e0bea4104d9a0f3346478d856cd9903605.tar
cuberite-c4f785e0bea4104d9a0f3346478d856cd9903605.tar.gz
cuberite-c4f785e0bea4104d9a0f3346478d856cd9903605.tar.bz2
cuberite-c4f785e0bea4104d9a0f3346478d856cd9903605.tar.lz
cuberite-c4f785e0bea4104d9a0f3346478d856cd9903605.tar.xz
cuberite-c4f785e0bea4104d9a0f3346478d856cd9903605.tar.zst
cuberite-c4f785e0bea4104d9a0f3346478d856cd9903605.zip
Diffstat (limited to 'source')
-rw-r--r--source/AllToLua.pkg101
-rw-r--r--source/Bindings.cpp68
-rw-r--r--source/Bindings.h2
-rw-r--r--source/cVine.h12
4 files changed, 110 insertions, 73 deletions
diff --git a/source/AllToLua.pkg b/source/AllToLua.pkg
index 09c6b7a2d..7a5de8d49 100644
--- a/source/AllToLua.pkg
+++ b/source/AllToLua.pkg
@@ -1,50 +1,51 @@
-
-$#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
-
-$#include "tolua_base.h"
-
-$cfile "cTorch.h"
-$cfile "cStairs.h"
-$cfile "cStep.h"
-$cfile "cLadder.h"
-
-$cfile "../iniFile/iniFile.h"
-
-$cfile "BlockID.h"
-$cfile "PacketID.h"
-$cfile "Defines.h"
-$cfile "LuaFunctions.h"
-$cfile "cStringMap.h"
-$cfile "cChatColor.h"
-$cfile "cClientHandle.h"
-$cfile "cEntity.h"
-$cfile "cPawn.h"
-$cfile "cPlayer.h"
-$cfile "cPluginManager.h"
-$cfile "cPlugin.h"
-$cfile "cPlugin_NewLua.h"
-$cfile "cPlugin_Lua.h"
-$cfile "cServer.h"
-$cfile "cWorld.h"
-$cfile "cInventory.h"
-$cfile "cItem.h"
-$cfile "cWebAdmin.h"
-$cfile "cWebPlugin.h"
-$cfile "cWebPlugin_Lua.h"
-$cfile "cPickup.h"
-$cfile "cRoot.h"
-$cfile "cTCPLink.h"
-$cfile "Vector3f.h"
-$cfile "Vector3d.h"
-$cfile "Vector3i.h"
-$cfile "Matrix4f.h"
-$cfile "cCuboid.h"
-$cfile "cMCLogger.h"
-$cfile "cTracer.h"
-$cfile "cGroup.h"
-$cfile "packets/cPacket_Login.h"
-$cfile "packets/cPacket_BlockDig.h"
-$cfile "packets/cPacket_BlockPlace.h"
-$cfile "cLuaChunk.h"
-$cfile "CraftingRecipes.h"
-$cfile "LuaItems.h"
+
+$#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
+
+$#include "tolua_base.h"
+
+$cfile "cTorch.h"
+$cfile "cStairs.h"
+$cfile "cStep.h"
+$cfile "cLadder.h"
+$cfile "cVine.h"
+
+$cfile "../iniFile/iniFile.h"
+
+$cfile "BlockID.h"
+$cfile "PacketID.h"
+$cfile "Defines.h"
+$cfile "LuaFunctions.h"
+$cfile "cStringMap.h"
+$cfile "cChatColor.h"
+$cfile "cClientHandle.h"
+$cfile "cEntity.h"
+$cfile "cPawn.h"
+$cfile "cPlayer.h"
+$cfile "cPluginManager.h"
+$cfile "cPlugin.h"
+$cfile "cPlugin_NewLua.h"
+$cfile "cPlugin_Lua.h"
+$cfile "cServer.h"
+$cfile "cWorld.h"
+$cfile "cInventory.h"
+$cfile "cItem.h"
+$cfile "cWebAdmin.h"
+$cfile "cWebPlugin.h"
+$cfile "cWebPlugin_Lua.h"
+$cfile "cPickup.h"
+$cfile "cRoot.h"
+$cfile "cTCPLink.h"
+$cfile "Vector3f.h"
+$cfile "Vector3d.h"
+$cfile "Vector3i.h"
+$cfile "Matrix4f.h"
+$cfile "cCuboid.h"
+$cfile "cMCLogger.h"
+$cfile "cTracer.h"
+$cfile "cGroup.h"
+$cfile "packets/cPacket_Login.h"
+$cfile "packets/cPacket_BlockDig.h"
+$cfile "packets/cPacket_BlockPlace.h"
+$cfile "cLuaChunk.h"
+$cfile "CraftingRecipes.h"
+$cfile "LuaItems.h"
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index 2c3af87bb..17d65bfcb 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 06/15/12 23:23:53.
+** Generated automatically by tolua++-1.0.92 on Sat Jun 16 00:40:32 2012.
*/
#ifndef __cplusplus
@@ -19,6 +19,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S);
#include "cStairs.h"
#include "cStep.h"
#include "cLadder.h"
+#include "cVine.h"
#include "../iniFile/iniFile.h"
#include "BlockID.h"
#include "PacketID.h"
@@ -173,23 +174,24 @@ static int tolua_collect_Vector3d (lua_State* tolua_S)
static void tolua_reg_types (lua_State* tolua_S)
{
tolua_usertype(tolua_S,"BLOCKTYPE");
- tolua_usertype(tolua_S,"TakeDamageInfo");
tolua_usertype(tolua_S,"cLuaItems");
- tolua_usertype(tolua_S,"cLuaChunk");
+ tolua_usertype(tolua_S,"TakeDamageInfo");
+ tolua_usertype(tolua_S,"HTTPFormData");
tolua_usertype(tolua_S,"cCraftingGrid");
+ tolua_usertype(tolua_S,"cLuaChunk");
tolua_usertype(tolua_S,"cCraftingRecipe");
tolua_usertype(tolua_S,"cPlugin");
- tolua_usertype(tolua_S,"cEntity");
- tolua_usertype(tolua_S,"NIBBLETYPE");
tolua_usertype(tolua_S,"Lua__cPacket_BlockDig");
+ tolua_usertype(tolua_S,"NIBBLETYPE");
+ tolua_usertype(tolua_S,"cCraftingRecipes");
tolua_usertype(tolua_S,"cTCPLink");
- tolua_usertype(tolua_S,"Lua__cTCPLink");
+ tolua_usertype(tolua_S,"cCuboid");
tolua_usertype(tolua_S,"Json::Value");
tolua_usertype(tolua_S,"cServer");
tolua_usertype(tolua_S,"cRoot");
- tolua_usertype(tolua_S,"cMCLogger");
tolua_usertype(tolua_S,"cGroup");
tolua_usertype(tolua_S,"cTracer");
+ tolua_usertype(tolua_S,"cMCLogger");
tolua_usertype(tolua_S,"cPlugin::CommandStruct");
tolua_usertype(tolua_S,"cPickup");
tolua_usertype(tolua_S,"cItems");
@@ -197,13 +199,13 @@ static void tolua_reg_types (lua_State* tolua_S)
tolua_usertype(tolua_S,"cClientHandle");
tolua_usertype(tolua_S,"cStep");
tolua_usertype(tolua_S,"cFurnaceRecipe");
- tolua_usertype(tolua_S,"cCuboid");
- tolua_usertype(tolua_S,"cChatColor");
tolua_usertype(tolua_S,"Vector3i");
+ tolua_usertype(tolua_S,"cChatColor");
+ tolua_usertype(tolua_S,"cStairs");
tolua_usertype(tolua_S,"cPacket_PickupSpawn");
tolua_usertype(tolua_S,"Lua__cWebPlugin");
tolua_usertype(tolua_S,"Lua__cPawn");
- tolua_usertype(tolua_S,"cStairs");
+ tolua_usertype(tolua_S,"Lua__cTCPLink");
tolua_usertype(tolua_S,"cItem");
tolua_usertype(tolua_S,"Vector3f");
tolua_usertype(tolua_S,"cPlugin_Lua");
@@ -212,26 +214,26 @@ static void tolua_reg_types (lua_State* tolua_S)
tolua_usertype(tolua_S,"cPacket");
tolua_usertype(tolua_S,"cPacket_BlockDig");
tolua_usertype(tolua_S,"cWebAdmin");
- tolua_usertype(tolua_S,"cCraftingRecipes");
- tolua_usertype(tolua_S,"cBlockEntity");
tolua_usertype(tolua_S,"cGroupManager");
+ tolua_usertype(tolua_S,"cBlockEntity");
tolua_usertype(tolua_S,"Lua__cPickup");
- tolua_usertype(tolua_S,"Lua__cPlugin");
tolua_usertype(tolua_S,"cWebPlugin");
+ tolua_usertype(tolua_S,"Lua__cPlugin");
+ tolua_usertype(tolua_S,"cInventory");
tolua_usertype(tolua_S,"cPacket_BlockPlace");
tolua_usertype(tolua_S,"cLadder");
tolua_usertype(tolua_S,"cPluginManager");
- tolua_usertype(tolua_S,"HTTPFormData");
- tolua_usertype(tolua_S,"cIniFile");
tolua_usertype(tolua_S,"Lua__cPlayer");
+ tolua_usertype(tolua_S,"cIniFile");
+ tolua_usertype(tolua_S,"cEntity");
tolua_usertype(tolua_S,"HTTPRequest");
tolua_usertype(tolua_S,"cPawn");
tolua_usertype(tolua_S,"cPlayer");
tolua_usertype(tolua_S,"cTorch");
tolua_usertype(tolua_S,"cStringMap");
- tolua_usertype(tolua_S,"cInventory");
tolua_usertype(tolua_S,"cWorld");
tolua_usertype(tolua_S,"cPlugin_NewLua");
+ tolua_usertype(tolua_S,"cVine");
tolua_usertype(tolua_S,"Lua__cEntity");
tolua_usertype(tolua_S,"Vector3d");
}
@@ -418,6 +420,36 @@ static int tolua_AllToLua_cLadder_MetaDataToDirection00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
+/* method: DirectionToMetaData of class cVine */
+#ifndef TOLUA_DISABLE_tolua_AllToLua_cVine_DirectionToMetaData00
+static int tolua_AllToLua_cVine_DirectionToMetaData00(lua_State* tolua_S)
+{
+#ifndef TOLUA_RELEASE
+ tolua_Error tolua_err;
+ if (
+ !tolua_isusertable(tolua_S,1,"cVine",0,&tolua_err) ||
+ !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
+ !tolua_isnoobj(tolua_S,3,&tolua_err)
+ )
+ goto tolua_lerror;
+ else
+#endif
+ {
+ char a_Direction = ((char) tolua_tonumber(tolua_S,2,0));
+ {
+ char tolua_ret = (char) cVine::DirectionToMetaData(a_Direction);
+ tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
+ }
+ }
+ return 1;
+#ifndef TOLUA_RELEASE
+ tolua_lerror:
+ tolua_error(tolua_S,"#ferror in function 'DirectionToMetaData'.",&tolua_err);
+ return 0;
+#endif
+}
+#endif //#ifndef TOLUA_DISABLE
+
/* method: new of class cIniFile */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cIniFile_new00
static int tolua_AllToLua_cIniFile_new00(lua_State* tolua_S)
@@ -19967,6 +19999,10 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_function(tolua_S,"DirectionToMetaData",tolua_AllToLua_cLadder_DirectionToMetaData00);
tolua_function(tolua_S,"MetaDataToDirection",tolua_AllToLua_cLadder_MetaDataToDirection00);
tolua_endmodule(tolua_S);
+ tolua_cclass(tolua_S,"cVine","cVine","",NULL);
+ tolua_beginmodule(tolua_S,"cVine");
+ tolua_function(tolua_S,"DirectionToMetaData",tolua_AllToLua_cVine_DirectionToMetaData00);
+ tolua_endmodule(tolua_S);
#ifdef __cplusplus
tolua_cclass(tolua_S,"cIniFile","cIniFile","",tolua_collect_cIniFile);
#else
diff --git a/source/Bindings.h b/source/Bindings.h
index 3a224fd25..cd95c2699 100644
--- a/source/Bindings.h
+++ b/source/Bindings.h
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 06/15/12 23:23:53.
+** Generated automatically by tolua++-1.0.92 on Sat Jun 16 00:40:32 2012.
*/
/* Exported function */
diff --git a/source/cVine.h b/source/cVine.h
index 6d2a92d15..a99a98aca 100644
--- a/source/cVine.h
+++ b/source/cVine.h
@@ -1,11 +1,11 @@
#pragma once
-class cVine //tolua_export
-{ //tolua_export
+class cVine //tolua_export
+{ //tolua_export
public:
- static char DirectionToMetaData( char a_Direction )
- {
+ static char DirectionToMetaData( char a_Direction ) //tolua_export
+ { //tolua_export
switch (a_Direction)
{
case 0x2:
@@ -20,5 +20,5 @@ public:
return 0xf;
};
return 0xf;
- } //tolua_export
-}; //tolua_export \ No newline at end of file
+ } //tolua_export
+}; //tolua_export \ No newline at end of file