Using latest love-android branch (e263d91d136d)

This commit is contained in:
fysx
2014-04-04 11:37:36 +02:00
parent 8acfb8d91a
commit e96eef4435
87 changed files with 1070 additions and 397 deletions
+26 -1
View File
@@ -41,6 +41,16 @@ class World;
class Shape;
class Fixture;
/**
* This struct is stored in a void pointer in the Box2D Body class. For now, all
* we need is a Lua reference to arbitrary data, but we might need more later.
**/
struct bodyudata
{
// Reference to arbitrary data.
Reference *ref;
};
/**
* A Body is an entity which has position and orientation
* in world space. A Body does have collision geometry
@@ -388,6 +398,18 @@ public:
**/
void destroy();
/**
* This function stores an in-C reference to
* arbitrary Lua data in the Box2D Body object.
**/
int setUserData(lua_State *L);
/**
* Gets the data set with setData. If no
* data is set, nil is returned.
**/
int getUserData(lua_State *L);
private:
/**
@@ -408,7 +430,10 @@ private:
// This ensures that a World only can be destroyed
// once all bodies have been destroyed too.
World *world;
};
bodyudata *udata;
}; // Body
} // box2d
} // physics