From aff537e7141952f743d6536c8e66d54374d1c2ba Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 26 Oct 2014 10:13:43 +0100 Subject: Added type to block type enum. --- src/BlockID.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/BlockID.h') diff --git a/src/BlockID.h b/src/BlockID.h index bb06722d2..b0cdc2a00 100644 --- a/src/BlockID.h +++ b/src/BlockID.h @@ -1,7 +1,13 @@ #pragma once +// The following hackery is to allow typed C++ enum for C++ code, yet have ToLua pocess the values. +// ToLua doesn't understand typed enums, so we use preprocessor to hide it from ToLua + +enum ENUM_BLOCK_ID : BLOCKTYPE +#if 0 +enum ENUM_BLOCK_ID // tolua_export +#endif // tolua_begin -enum ENUM_BLOCK_ID { E_BLOCK_AIR = 0, E_BLOCK_STONE = 1, @@ -221,6 +227,10 @@ enum ENUM_BLOCK_ID }; // tolua_end + + + + // tolua_begin enum ENUM_ITEM_ID { -- cgit v1.2.3 From 11a80b5d09241ade0a740d1db0d0d2084ab81e3a Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Mon, 27 Oct 2014 16:46:17 +0000 Subject: Pocess? --- src/BlockID.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/BlockID.h') diff --git a/src/BlockID.h b/src/BlockID.h index b0cdc2a00..98eef2684 100644 --- a/src/BlockID.h +++ b/src/BlockID.h @@ -1,7 +1,7 @@ #pragma once -// The following hackery is to allow typed C++ enum for C++ code, yet have ToLua pocess the values. -// ToLua doesn't understand typed enums, so we use preprocessor to hide it from ToLua +// The following hackery is to allow typed C++ enum for C++ code, yet have ToLua peocess the values. +// ToLua doesn't understand typed enums, so we use preprocessor to hide it from ToLua. enum ENUM_BLOCK_ID : BLOCKTYPE #if 0 -- cgit v1.2.3 From cbb637187e4ca3435bddc0c07285ba4933445fba Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Mon, 27 Oct 2014 16:46:30 +0000 Subject: Fixed typo. --- src/BlockID.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/BlockID.h') diff --git a/src/BlockID.h b/src/BlockID.h index 98eef2684..24de2dc8a 100644 --- a/src/BlockID.h +++ b/src/BlockID.h @@ -1,6 +1,6 @@ #pragma once -// The following hackery is to allow typed C++ enum for C++ code, yet have ToLua peocess the values. +// The following hackery is to allow typed C++ enum for C++ code, yet have ToLua process the values. // ToLua doesn't understand typed enums, so we use preprocessor to hide it from ToLua. enum ENUM_BLOCK_ID : BLOCKTYPE -- cgit v1.2.3