scheme
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include "mathc.h"
|
||||
#include "transform.h"
|
||||
#include "config.h"
|
||||
#include <stdbool.h>
|
||||
#include <chipmunk/chipmunk.h>
|
||||
#include "2dphysics.h"
|
||||
#include "registry.h"
|
||||
|
||||
struct shader;
|
||||
struct sprite;
|
||||
@@ -29,16 +29,15 @@ struct go_temp {
|
||||
};
|
||||
|
||||
struct gameobject {
|
||||
struct mTransform transform;
|
||||
struct editor editor;
|
||||
cpBodyType bodytype;
|
||||
float scale;
|
||||
float mass;
|
||||
cpBody *body;
|
||||
float f; /* friction */
|
||||
float e; /* elasticity */
|
||||
cpBody *body;
|
||||
struct component *components;
|
||||
struct phys_cbs *cbs;
|
||||
struct editor editor;
|
||||
};
|
||||
|
||||
extern struct gameobject *gameobjects;
|
||||
@@ -49,16 +48,16 @@ void gameobject_delete(int id);
|
||||
void clear_gameobjects();
|
||||
int number_of_gameobjects();
|
||||
void set_n_gameobjects(int n);
|
||||
void setup_model_transform(struct mTransform *t, struct shader *s, float scale);
|
||||
void toggleprefab(struct gameobject *go);
|
||||
|
||||
struct gameobject *get_gameobject_from_id(int id);
|
||||
int id_from_gameobject(struct gameobject *go);
|
||||
|
||||
void gameobject_save(struct gameobject *go, FILE * file);
|
||||
void gameobject_addcomponent(struct gameobject *go, struct component *c);
|
||||
void gameobject_addcomponent(struct gameobject *go, struct component_interface *c);
|
||||
void gameobject_delcomponent(struct gameobject *go, int n);
|
||||
void gameobject_loadcomponent(struct gameobject *go, int id);
|
||||
int gameobject_ncomponents(struct gameobject *go);
|
||||
|
||||
void gameobject_saveprefab(struct gameobject *go);
|
||||
int gameobject_makefromprefab(char *path);
|
||||
|
||||
Reference in New Issue
Block a user