From 6a28f446c501f09153ca77eb22951de7bb144e18 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Sat, 12 Sep 2015 01:24:33 -0400 Subject: Fixed movement and did a SUPER BETA version of NPC's As much as I didn't want to, I had to get rid of SDL_AddTimer. Since it runs in a separate thread and does calculations at the same time as the main thread, a bunch of the data was getting messed up during the loop, so it was just easiest to remove it. (Just refresh the world a lot to see a village house spawn) --- include/entities.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/entities.h') diff --git a/include/entities.h b/include/entities.h index 5deaa00..e50c77a 100644 --- a/include/entities.h +++ b/include/entities.h @@ -10,9 +10,9 @@ public: float speed; int type; vec2 loc; - vec2 loci; vec2 vel; - vec2 velg; + bool right,left; + void spawn(float, float); }; @@ -22,4 +22,9 @@ public: ~Player(); }; +class NPC : public Entities{ +public: + NPC(); +}; + #endif // ENTITIES_H -- cgit v1.2.3