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 Mob;
class Lua_Mob : public Lua_Entity
{
typedef Mob NativeType;
public:
Lua_Mob() { d_ = nullptr; }
Lua_Mob(Mob *d) { d_ = d; }
Lua_Mob(NativeType *d) { d_ = d; }
virtual ~Lua_Mob() { }
operator Mob* () {
operator NativeType* () {
if(d_) {
return reinterpret_cast<Mob*>(d_);
return reinterpret_cast<NativeType*>(d_);
}
return nullptr;