mirror of https://github.com/bjornbytes/lovr.git
Cleanup;
This commit is contained in:
parent
c7515a1f7e
commit
bca3335da8
|
@ -265,6 +265,12 @@ World* lovrBodyGetWorld(Body* body) {
|
|||
return body->world;
|
||||
}
|
||||
|
||||
void lovrShapeDestroy(const Ref* ref) {
|
||||
Shape* shape = containerof(ref, Shape);
|
||||
dGeomDestroy(shape->id);
|
||||
free(shape);
|
||||
}
|
||||
|
||||
ShapeType lovrShapeGetType(Shape* shape) {
|
||||
return shape->type;
|
||||
}
|
||||
|
@ -278,8 +284,4 @@ void lovrShapeSetBody(Shape* shape, Body* body) {
|
|||
dGeomSetBody(shape->id, body ? body->id : 0);
|
||||
}
|
||||
|
||||
void lovrShapeDestroy(const Ref* ref) {
|
||||
Shape* shape = containerof(ref, Shape);
|
||||
dGeomDestroy(shape->id);
|
||||
free(shape);
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ void* lovrBodyGetUserData(Body* body);
|
|||
void lovrBodySetUserData(Body* body, void* data);
|
||||
World* lovrBodyGetWorld(Body* body);
|
||||
|
||||
void lovrShapeDestroy(const Ref* ref);
|
||||
ShapeType lovrShapeGetType(Shape* shape);
|
||||
Body* lovrShapeGetBody(Shape* shape);
|
||||
void lovrShapeSetBody(Shape* shape, Body* body);
|
||||
void lovrShapeDestroy(const Ref* ref);
|
||||
|
|
Loading…
Reference in New Issue