From: Clyne Sullivan Date: Mon, 5 Oct 2015 11:30:11 +0000 (-0400) Subject: quest lights X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=1e88bc916af1a76e4790bdfcac459bf7ee3e0d48;p=clyne%2Fgamedev.git quest lights --- diff --git a/include/entities.h b/include/entities.h index 4c1b484..e579355 100644 --- a/include/entities.h +++ b/include/entities.h @@ -59,9 +59,8 @@ public: }; class NPC : public Entity{ -private: - std::vectoraiFunc; public: + std::vectoraiFunc; NPC(); void addAIFunc(int (*func)(NPC *)); void interact(); diff --git a/src/entities.cpp b/src/entities.cpp index d5328f0..43c7bf3 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -22,6 +22,10 @@ void Entity::spawn(float x, float y){ //spawns the entity you pass to it based o void Entity::draw(void){ //draws the entities if(type==NPCT){ + if(NPCp(this)->aiFunc.size()){ + glColor3ub(255,255,0); + glRectf(loc.x,loc.y+height+HLINE,loc.x+width,loc.y+height+HLINE*5); + } if(gender == MALE) glColor3ub(0,0,100); else if(gender == FEMALE)