kettek2/wiki/games/newsboy/Newsboy_0x00/engine/EntityData.h

38 lines
779 B
C

#ifndef ENTITY_DATA_H
#define ENTITY_DATA_H
// it's pretty dumb, but we store floats as ints in the following manner:
// 16.000 = 16000
// Need to fix, but in a hurry (self-made ntohf/hntof didn't work)
struct EntityData {
char *filename;
char *name;
char *anim;
char *set;
char *face;
int frame;
int type;
int behave;
float mass;
float radius;
float speed;
float turn;
int hp;
float sight;
float range;
int attack;
int damage;
char *spawn;
int time;
};
struct EntityData *newEntityData();
int freeEntityData(struct EntityData *entity_data);
int saveEntityData(struct EntityData *entity_data);
int loadEntityData(struct EntityData *entity_data, const char *filename);
struct EntityData *loadEntityData_res(const char *filename);
#endif