summaryrefslogtreecommitdiffstats
path: root/src/BlockID.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-10-26 10:13:43 +0100
committerMattes D <github@xoft.cz>2014-10-26 10:13:43 +0100
commitaff537e7141952f743d6536c8e66d54374d1c2ba (patch)
treeb47b9da4bcb23795bd5cfec3e74cab0e526235a4 /src/BlockID.h
parentAPIDump: Added basic projectile documentation. (diff)
downloadcuberite-aff537e7141952f743d6536c8e66d54374d1c2ba.tar
cuberite-aff537e7141952f743d6536c8e66d54374d1c2ba.tar.gz
cuberite-aff537e7141952f743d6536c8e66d54374d1c2ba.tar.bz2
cuberite-aff537e7141952f743d6536c8e66d54374d1c2ba.tar.lz
cuberite-aff537e7141952f743d6536c8e66d54374d1c2ba.tar.xz
cuberite-aff537e7141952f743d6536c8e66d54374d1c2ba.tar.zst
cuberite-aff537e7141952f743d6536c8e66d54374d1c2ba.zip
Diffstat (limited to '')
-rw-r--r--src/BlockID.h12
1 files changed, 11 insertions, 1 deletions
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
{