From 82d5e77a3fa4f3f9cc3145969d99ba8326af9892 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Wed, 16 Sep 2015 11:48:48 -0400 Subject: Fixed mouse, and debug --- include/UIClass.h | 1 + include/World.h | 6 +++--- include/common.h | 1 + include/entities.h | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/UIClass.h b/include/UIClass.h index e6f4825..9bf301c 100644 --- a/include/UIClass.h +++ b/include/UIClass.h @@ -16,6 +16,7 @@ public: void msgBox(const char *str,...); void handleEvents(); int mousex, mousey; + bool debug = false; }; #endif // UICLASS_H diff --git a/include/World.h b/include/World.h index fca108d..7d9224e 100644 --- a/include/World.h +++ b/include/World.h @@ -4,7 +4,7 @@ #include // Total amount of entities that can be bound to a layer -#define MAX_ENTITIES 16 +#define MAX_ENTITIES 32 // Easy shortcuts used in UIClass #define goWorldLeft(w) if(w->toLeft){w=w->toLeft;} @@ -18,7 +18,7 @@ private: } __attribute__ ((packed)) *line; unsigned int lineCount; // Size of line array, calculated in the constructor unsigned int entCount; // Count of currently bound entities - void *entity[MAX_ENTITIES]; + void **entity; public: World *behind,*infront; // As in layers World *toLeft,*toRight; // 'new' worlds (off screen) @@ -31,4 +31,4 @@ public: void addEntity(void *e); // Adds (binds) an entity to the world }; -#endif // WORLD_H +#endif // WORLD_H diff --git a/include/common.h b/include/common.h index 290e47a..bddb1b3 100644 --- a/include/common.h +++ b/include/common.h @@ -7,6 +7,7 @@ typedef struct{float x; float y;}vec2; #include #include +#include #include #include #include diff --git a/include/entities.h b/include/entities.h index 7d5e356..bc277cd 100644 --- a/include/entities.h +++ b/include/entities.h @@ -16,6 +16,8 @@ public: bool right,left, canMove; bool alive; + unsigned int texture[]; + void spawn(float, float); void draw(void); void wander(int, vec2*); -- cgit v1.2.3