From a277430f0ddde9ea2583f4b0c44fcafe8a2528bf Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 2 Oct 2015 08:47:11 -0400 Subject: added inventories --- include/entities.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/entities.h') diff --git a/include/entities.h b/include/entities.h index b58d569..4c1b484 100644 --- a/include/entities.h +++ b/include/entities.h @@ -2,18 +2,25 @@ #define ENTITIES_H #include +#include #define NPCp(n) ((NPC *)n) +#define PLAYER_INV_SIZE 30 // The size of the player's inventory +#define NPC_INV_SIZE 3 // Size of an NPC's inventory + extern FILE* names; class Entity{ public: + Inventory *inv; + void *inWorld; + float width; //width and height of the player float height; float speed; //speed of the play - //type and subtype + int subtype; _TYPE type; //example: @@ -21,8 +28,10 @@ public: // |(subtype) // |-> 0 Base NPC // |-> 1 Merchant + vec2 loc; //location and velocity of the entity vec2 vel; + bool near; bool right,left, canMove; //movement variables bool alive; //the flag for whether or not the entity is alive -- cgit v1.2.3