aboutsummaryrefslogtreecommitdiffstats
path: root/include/entities.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-01-16 12:31:42 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-01-16 12:31:42 -0500
commit4b21a0fa4e6a7e35b7d9a01bbc0a7080dd392996 (patch)
tree849e56e7515d9bcd3fdcd38840af07dc2ac77987 /include/entities.h
parent48cf19db2fc33875e32209eb6e32728d019cd6da (diff)
dynamic world linking
Diffstat (limited to 'include/entities.h')
-rw-r--r--include/entities.h65
1 files changed, 4 insertions, 61 deletions
diff --git a/include/entities.h b/include/entities.h
index 412ec42..d434546 100644
--- a/include/entities.h
+++ b/include/entities.h
@@ -47,31 +47,6 @@ enum BUILD_SUB{
FIRE_PIT = 7
};
-typedef struct {
- InventorySavePacket isp;
- vec2 loc;
- vec2 vel;
- float width;
- float height;
- float speed;
- float health;
- float maxHealth;
- int subtype;
- int ticksToUse;
- unsigned int randDialog;
- unsigned char ground;
- bool near;
- bool canMove;
- bool right,left;
- bool alive;
- bool hit;
- _TYPE type;
- GENDER gender;
- size_t nameSize;
- char name[32];
- //Texturec *tex;
-} __attribute__ ((packed)) EntitySavePacket;
-
class World;
class Particles{
@@ -176,9 +151,6 @@ public:
virtual void interact(){}
virtual ~Entity(){}
-
- char *baseSave(void);
- void baseLoad(char *);
};
class Player : public Entity{
@@ -194,6 +166,7 @@ public:
class NPC : public Entity{
public:
std::vector<int (*)(NPC *)>aiFunc;
+ unsigned int dialogIndex;
NPC();
~NPC();
@@ -201,29 +174,18 @@ public:
void addAIFunc(int (*func)(NPC *),bool preload);
void interact();
void wander(int);
-
- char *save(unsigned int *size);
- void load(unsigned int,char *b);
};
-typedef struct {
- EntitySavePacket esp;
- BUILD_SUB bsubtype;
-} __attribute__ ((packed)) StructuresSavePacket;
-
class Structures : public Entity{
public:
- World *inWorld;
- World **inside;
BUILD_SUB bsubtype;
+ char *inside;
+ //char *outside;
Structures();
~Structures();
- unsigned int spawn(BUILD_SUB, float, float, World *);
-
- char *save(void);
- void load(char *s);
+ unsigned int spawn(BUILD_SUB, float, float);
};
class Mob : public Entity{
@@ -235,24 +197,8 @@ public:
~Mob();
void wander(int);
-
- char *save(void);
- void load(char *);
};
-typedef struct {
- EntitySavePacket esp;
- double init_y;
- //void (*hey)(Mob *callee);
-} __attribute__ ((packed)) MobSavePacket;
-
-typedef struct {
- EntitySavePacket esp;
- ITEM_ID identifier;
- bool questObject;
- char pickupDialog[256];
-} __attribute__ ((packed)) ObjectSavePacket;
-
class Object : public Entity{
private:
ITEM_ID identifier;
@@ -267,9 +213,6 @@ public:
void reloadTexture(void);
void interact(void);
-
- char *save(void);
- void load(char *);
};
#endif // ENTITIES_H