add loader

add schema
new loader model using xml
separated work and load data
validation using schema
map data in xml
new core model... proecting
This commit is contained in:
2010-08-19 20:52:32 +03:00
parent 87455a622e
commit da42fe8f58
20 changed files with 943 additions and 140 deletions

View File

@@ -4,23 +4,27 @@ adCore::adCore(QObject *parent) :
QThread(parent)
{
step = 0;
admap = new Map(1);
addata = new Game_Data(admap);
Player * pl1 = new Player(0);
Player * pl2 = new Player(0);
addata->players.push_back(pl1);
addata->players.push_back(pl2);
adaliens = new Aliens(addata);
adtowers = new Towers(addata);
adsplashes = new Splashes(addata);
connect(admap,SIGNAL(RecreateAlienPath(bool*)),adaliens,SLOT(retrace(bool*)));
adaliens->AddAlien(0);
adaliens->AddAlien(0);
adaliens->AddAlien(0);
for (int i=0; i<qMin(admap->mapsize.width(),admap->mapsize.height()); i++)
adtowers->AddTower(0,0,QPoint(i,i));
for (int i=0; i<admap->mapsize.height();i++)
adtowers->AddTower(1,0,QPoint(admap->mapsize.width()-2,i));
//admap = new Map(1);
//addata = new Game_Data(admap);
adload = new Loader();
//admap->load();
//adload->create();
//adload->readAliens();
// Player * pl1 = new Player(0);
// Player * pl2 = new Player(0);
// addata->players.push_back(pl1);
// addata->players.push_back(pl2);
// adaliens = new Aliens(addata);
// adtowers = new Towers(addata);
// adsplashes = new Splashes(addata);
// connect(admap,SIGNAL(RecreateAlienPath(bool*)),adaliens,SLOT(retrace(bool*)));
// adaliens->AddAlien(0);
// adaliens->AddAlien(0);
// adaliens->AddAlien(0);
// for (int i=0; i<qMin(admap->mapsize.width(),admap->mapsize.height()); i++)
// adtowers->AddTower(0,0,QPoint(i,i));
// for (int i=0; i<admap->mapsize.height();i++)
// adtowers->AddTower(1,0,QPoint(admap->mapsize.width()-2,i));
}