From 2423fbf2efa39e28cc348acc11b9269e573dcdef Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 17 Jul 2014 22:15:34 +0200 Subject: Normalized comments. This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign. --- src/Bindings/DeprecatedBindings.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/Bindings/DeprecatedBindings.cpp') diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp index d51ba2da3..d2e60945d 100644 --- a/src/Bindings/DeprecatedBindings.cpp +++ b/src/Bindings/DeprecatedBindings.cpp @@ -39,7 +39,7 @@ static int tolua_get_AllToLua_g_BlockLightValue(lua_State* tolua_S) tolua_pushnumber(tolua_S,(lua_Number)cBlockInfo::GetLightValue((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -65,7 +65,7 @@ static int tolua_get_AllToLua_g_BlockSpreadLightFalloff(lua_State* tolua_S) tolua_pushnumber(tolua_S, (lua_Number)cBlockInfo::GetSpreadLightFalloff((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -91,7 +91,7 @@ static int tolua_get_AllToLua_g_BlockTransparent(lua_State* tolua_S) tolua_pushboolean(tolua_S, cBlockInfo::IsTransparent((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -117,7 +117,7 @@ static int tolua_get_AllToLua_g_BlockOneHitDig(lua_State* tolua_S) tolua_pushboolean(tolua_S, cBlockInfo::IsOneHitDig((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -143,7 +143,7 @@ static int tolua_get_AllToLua_g_BlockPistonBreakable(lua_State* tolua_S) tolua_pushboolean(tolua_S, cBlockInfo::IsPistonBreakable((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -169,7 +169,7 @@ static int tolua_get_AllToLua_g_BlockIsSnowable(lua_State* tolua_S) tolua_pushboolean(tolua_S, cBlockInfo::IsSnowable((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -195,7 +195,7 @@ static int tolua_get_AllToLua_g_BlockRequiresSpecialTool(lua_State* tolua_S) tolua_pushboolean(tolua_S, cBlockInfo::RequiresSpecialTool((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -221,7 +221,7 @@ static int tolua_get_AllToLua_g_BlockIsSolid(lua_State* tolua_S) tolua_pushboolean(tolua_S, (bool)cBlockInfo::IsSolid((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE @@ -247,7 +247,7 @@ static int tolua_get_AllToLua_g_BlockFullyOccupiesVoxel(lua_State* tolua_S) tolua_pushboolean(tolua_S, (bool)cBlockInfo::FullyOccupiesVoxel((BLOCKTYPE)BlockType)); return 1; } -#endif //#ifndef TOLUA_DISABLE +#endif // #ifndef TOLUA_DISABLE -- cgit v1.2.3 From 0f8c24e04d60aa1642a5fe7346941ccd7697977e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 17 Jul 2014 22:26:53 +0100 Subject: Fixed issues relating to saplings and leaves - Removed cBlockInfo::RequiresSpecialTool * Fixes #1195 * Fixes #1201 --- src/Bindings/DeprecatedBindings.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/Bindings/DeprecatedBindings.cpp') diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp index d51ba2da3..5bba1ea7a 100644 --- a/src/Bindings/DeprecatedBindings.cpp +++ b/src/Bindings/DeprecatedBindings.cpp @@ -175,32 +175,6 @@ static int tolua_get_AllToLua_g_BlockIsSnowable(lua_State* tolua_S) -/* get function: g_BlockRequiresSpecialTool */ -#ifndef TOLUA_DISABLE_tolua_get_AllToLua_g_BlockRequiresSpecialTool -static int tolua_get_AllToLua_g_BlockRequiresSpecialTool(lua_State* tolua_S) -{ - int BlockType; - #ifndef TOLUA_RELEASE - { - tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); - } - #endif - BlockType = (int)tolua_tonumber(tolua_S, 2, 0); - if ((BlockType < 0) || (BlockType > E_BLOCK_MAX_TYPE_ID)) - { - tolua_error(tolua_S, "array indexing out of range.", NULL); - } - tolua_pushboolean(tolua_S, cBlockInfo::RequiresSpecialTool((BLOCKTYPE)BlockType)); - return 1; -} -#endif //#ifndef TOLUA_DISABLE - - - - - /* get function: g_BlockIsSolid */ #ifndef TOLUA_DISABLE_tolua_get_AllToLua_g_BlockIsSolid static int tolua_get_AllToLua_g_BlockIsSolid(lua_State* tolua_S) @@ -263,7 +237,6 @@ void DeprecatedBindings::Bind(lua_State * tolua_S) tolua_array(tolua_S, "g_BlockOneHitDig", tolua_get_AllToLua_g_BlockOneHitDig, NULL); tolua_array(tolua_S, "g_BlockPistonBreakable", tolua_get_AllToLua_g_BlockPistonBreakable, NULL); tolua_array(tolua_S, "g_BlockIsSnowable", tolua_get_AllToLua_g_BlockIsSnowable, NULL); - tolua_array(tolua_S, "g_BlockRequiresSpecialTool", tolua_get_AllToLua_g_BlockRequiresSpecialTool, NULL); tolua_array(tolua_S, "g_BlockIsSolid", tolua_get_AllToLua_g_BlockIsSolid, NULL); tolua_array(tolua_S, "g_BlockFullyOccupiesVoxel", tolua_get_AllToLua_g_BlockFullyOccupiesVoxel, NULL); -- cgit v1.2.3 From 00c524519ef6c7ceaf4ac91307617cfd65d7cf21 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 19 Jul 2014 14:53:41 +0200 Subject: Fixed style: spaces after commas. --- src/Bindings/DeprecatedBindings.cpp | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/Bindings/DeprecatedBindings.cpp') diff --git a/src/Bindings/DeprecatedBindings.cpp b/src/Bindings/DeprecatedBindings.cpp index d2e60945d..07b1a29fd 100644 --- a/src/Bindings/DeprecatedBindings.cpp +++ b/src/Bindings/DeprecatedBindings.cpp @@ -25,9 +25,9 @@ static int tolua_get_AllToLua_g_BlockLightValue(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) { - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } } #endif @@ -36,7 +36,7 @@ static int tolua_get_AllToLua_g_BlockLightValue(lua_State* tolua_S) { tolua_error(tolua_S, "array indexing out of range.", NULL); } - tolua_pushnumber(tolua_S,(lua_Number)cBlockInfo::GetLightValue((BLOCKTYPE)BlockType)); + tolua_pushnumber(tolua_S, (lua_Number)cBlockInfo::GetLightValue((BLOCKTYPE)BlockType)); return 1; } #endif // #ifndef TOLUA_DISABLE @@ -53,8 +53,8 @@ static int tolua_get_AllToLua_g_BlockSpreadLightFalloff(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); @@ -79,8 +79,8 @@ static int tolua_get_AllToLua_g_BlockTransparent(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); @@ -105,8 +105,8 @@ static int tolua_get_AllToLua_g_BlockOneHitDig(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); @@ -131,8 +131,8 @@ static int tolua_get_AllToLua_g_BlockPistonBreakable(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); @@ -157,8 +157,8 @@ static int tolua_get_AllToLua_g_BlockIsSnowable(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); @@ -183,8 +183,8 @@ static int tolua_get_AllToLua_g_BlockRequiresSpecialTool(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); @@ -209,8 +209,8 @@ static int tolua_get_AllToLua_g_BlockIsSolid(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); @@ -235,8 +235,8 @@ static int tolua_get_AllToLua_g_BlockFullyOccupiesVoxel(lua_State* tolua_S) #ifndef TOLUA_RELEASE { tolua_Error tolua_err; - if (!tolua_isnumber(tolua_S,2,0,&tolua_err)) - tolua_error(tolua_S,"#vinvalid type in array indexing.",&tolua_err); + if (!tolua_isnumber(tolua_S, 2, 0, &tolua_err)) + tolua_error(tolua_S, "#vinvalid type in array indexing.", &tolua_err); } #endif BlockType = (int)tolua_tonumber(tolua_S, 2, 0); -- cgit v1.2.3