From: Clyne Sullivan Date: Mon, 28 Sep 2015 12:50:24 +0000 (-0400) Subject: improvements ;) X-Git-Url: https://code.bitgloo.com/?a=commitdiff_plain;h=7125200e83a9255b8da6745b4a457996705bf263;p=clyne%2Fgamedev.git improvements ;) --- 7125200e83a9255b8da6745b4a457996705bf263 diff --cc src/entities.cpp index 9808086,421badb..c341dba --- a/src/entities.cpp +++ b/src/entities.cpp @@@ -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 6a1650b,b24c747..a7a8991 --- a/src/main.cpp +++ b/src/main.cpp @@@ -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;iinWorld=test; }