Cleaned up lua glue macro a bit

This commit is contained in:
KimLS
2013-05-13 14:40:15 -07:00
parent 7b23c8dc75
commit 20fc585b5e
6 changed files with 350 additions and 346 deletions
+4 -3
View File
@@ -8,14 +8,15 @@ class NPC;
class Lua_NPC : public Lua_Mob
{
typedef NPC NativeType;
public:
Lua_NPC() { d_ = nullptr; }
Lua_NPC(NPC *d) { d_ = d; }
Lua_NPC(NativeType *d) { d_ = d; }
virtual ~Lua_NPC() { }
operator NPC* () {
operator NativeType* () {
if(d_) {
return reinterpret_cast<NPC*>(d_);
return reinterpret_cast<NativeType*>(d_);
}
return nullptr;