S7 header config & prototyping support
This commit is contained in:
@@ -33,6 +33,14 @@ int id_from_gameobject(struct gameobject *go) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
void gameobject_apply(struct gameobject *go)
|
||||
{
|
||||
cpBodySetType(go->body, go->bodytype);
|
||||
|
||||
if (go->bodytype == CP_BODY_TYPE_DYNAMIC)
|
||||
cpBodySetMass(go->body, go->mass);
|
||||
}
|
||||
|
||||
static void gameobject_setpickcolor(struct gameobject *go)
|
||||
{
|
||||
float r = ((go->editor.id & 0x000000FF) >> 0) / 255.f;
|
||||
@@ -144,6 +152,8 @@ void gameobject_init(struct gameobject *go, FILE * fprefab)
|
||||
cpBodySetType(go->body, go->bodytype);
|
||||
cpBodySetUserData(go->body, go);
|
||||
|
||||
|
||||
|
||||
int comp_n;
|
||||
fread(&comp_n, sizeof(int), 1, fprefab);
|
||||
arrfree(go->components);
|
||||
|
||||
Reference in New Issue
Block a user