]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
fixed structure drawing
authorClyne Sullivan <tullivan99@gmail.com>
Wed, 30 Sep 2015 19:40:48 +0000 (15:40 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Wed, 30 Sep 2015 19:40:48 +0000 (15:40 -0400)
Bugs [new file with mode: 0644]
Changelog
src/entities.cpp
src/main.cpp
src/ui.cpp

diff --git a/Bugs b/Bugs
new file mode 100644 (file)
index 0000000..1b4a683
--- /dev/null
+++ b/Bugs
@@ -0,0 +1,14 @@
+Major bugs:
+===========
+
+       - 
+       
+Minor bugs:
+===========
+
+       - 
+       
+Maybe bugs:
+===========
+
+       - Player is generated a random name (9/30/15)
index a699b0d1b904cda22beabc2c4a38a495a114d62f..901918d528e3cbbeb134fdc3dde75707183f6617 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -53,3 +53,4 @@
        - added quest stuff between NPCs and player
        - began work on giving names to NPCs
        - began working on config file
+       - created a bug file
index b40ddd45756b29899ef3612ee84e77852698ad7c..85505ce6c04f51a2b3bb9d07e836d4925f5266ac 100644 (file)
@@ -19,13 +19,14 @@ 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(type==NPCT){
                if(gender == MALE)
                        glColor3ub(0,0,100);
                else if(gender == FEMALE)
                        glColor3ub(255,105,180);
-       else if(type==STRUCTURET)
+       }else if(type==STRUCTURET){
                glColor3ub(100,0,100);
+       }
        glRectf(loc.x,loc.y,loc.x+width,loc.y+height);
 }
 
index 8b919a215d63c4f53856852c6605ff9f6ba088f6..ea196681ffb12e9e47ac762c4ef5f2607789647b 100644 (file)
@@ -23,7 +23,7 @@ Player *player;
 
 std::vector<Entity*>entity;
 std::vector<NPC>npc;
-std::vector<Structures>build;
+std::vector<Structures *>build;
 
 int mx, my;
 FILE* names;
@@ -32,6 +32,7 @@ void logic();
 void render();
 
 int entityInteractTest(NPC *speaker){
+       ui::dialogBox("Here, have a quest!");
        player->qh.assign("Test");
        return 1;
 }
@@ -111,12 +112,12 @@ int main(int argc, char *argv[]){
        
        // Make structures
        entity.push_back(new Entity());
-       build.push_back(Structures());
-       entity[0]=&build[0];
+       build.push_back(new Structures());
+       entity[0]=build[0];
        
        static unsigned int i;
-       build[0].spawn(STRUCTURET,0,10);
-       build[0].inside=iw;
+       build[0]->spawn(STRUCTURET,0,10);
+       build[0]->inside=iw;
        for(i=0;i<entity.size()+1;i++){
                entity[i]->inWorld=test;
        }
index ec78507b09c23e913ac8db6bb86d899c397b9cf4..c14b4ff69f91e0afb1e41dab5d8dca159cab585f 100644 (file)
@@ -117,6 +117,7 @@ namespace ui {
                free(buf);
        }
        void dialogBox(const char *text){
+               //while(dialogBoxExists);
                dialogBoxExists=true;
                dialogBoxText=text;
        }