]> code.bitgloo.com Git - clyne/gamedev.git/commitdiff
improvements ;)
authorClyne Sullivan <tullivan99@gmail.com>
Mon, 28 Sep 2015 12:50:24 +0000 (08:50 -0400)
committerClyne Sullivan <tullivan99@gmail.com>
Mon, 28 Sep 2015 12:50:24 +0000 (08:50 -0400)
1  2 
src/entities.cpp
src/main.cpp
src/ui.cpp

index 980808633975fb072086088c66d8887de5ea9be1,421badbb66989a118321fc9c6270b14825e66166..c341dba73cbe8e155d7e740b967a59bbcc9fde9f
@@@ -61,21 -61,19 +61,21 @@@ void NPC::interact()
  }
  
  Structures::Structures(){
-       type = -1;
+       type = STRUCTURET;
        speed = 0;
 +      alive = true;
  }
  
- unsigned int Structures::spawn(int t, float x, float y){
+ unsigned int Structures::spawn(_TYPE t, float x, float y){
        loc.x = x;
        loc.y = y;
        type = t;
  
        /*VILLAGE*/
-       if(type == -1){
+       if(type == STRUCTURET){
 -              width =  4 * HLINE;
 -              height = 4 * HLINE;
 +              loc.y=100;
 +              width =  20 * HLINE;
 +              height = 16 * HLINE;
  
                //int tempN = (getRand() % 5 + 1);
                int tempN = 2;
diff --cc src/main.cpp
index 6a1650b246a6f99a51f45e4f025e700a615daaed,b24c7471f7c03eda38e64c7ac06d7681f34735a4..a7a89915e2e97d4825ac47cace8f2edb12ade8d0
@@@ -106,9 -109,8 +106,9 @@@ int main(int argc, char *argv[])
        entity[0]=&build[0];
        
        static unsigned int i;
-       build[0].spawn(-1,0,10);
+       build[0].spawn(STRUCTURET,0,10);
 -      for(i=0;i<=entity.size();i++){
 +      build[0].inside=iw;
 +      for(i=0;i<entity.size()+1;i++){
                entity[i]->inWorld=test;
        }
        
diff --cc src/ui.cpp
Simple merge