work on winXp

This commit is contained in:
2009-09-07 14:45:31 +04:00
parent 4e723909e7
commit d3064428c3
38 changed files with 36825 additions and 303 deletions

View File

@@ -8,7 +8,7 @@ MainWindow::MainWindow(QWidget *parent)
qDebug() << "Load START!";
ui->setupUi(this);
sndr = new UdpSender("127.0.0.1",10101);
//sndr->connectSend("hellow");
sndr->connectSend("hellow");
cellsize = 16;
destx = this->width() / cellsize;
desty = this->height() / cellsize / 2;
@@ -21,7 +21,6 @@ MainWindow::MainWindow(QWidget *parent)
if (!aliens->AddAlien()) qDebug() << "Error Loading";
this->setGeometry(100,100,this->width(),this->height());
//qDebug() << "QT version" << qVersion();
//AnimAlien = 0;
timer->start(50);
qDebug() << "Load DONE!";
}
@@ -31,7 +30,7 @@ void MainWindow::ADrender()
{
//aliens->AddAlien();
aliens->updateAliens();
adp->drawAliens(&aliens->curAliens[0], &aliens->AliensPixmaps[aliens->curAliens[0].PicType]);
adp->drawAliens(&aliens->curAliens[0], &aliens->AliensPixmaps[0]);
this->repaint();
}
@@ -75,10 +74,13 @@ void MainWindow::SetCell(int x, int y)
aliens->Cells[cp.x()][cp.y()] = - 1;
adp->drawcell(cp);
//aliens->recreatePath();
adp->StepAlien=0;
//adp->AnimAlien=0;
//aliens->curAliens[aliens->CurWave].Position.pnt = aliens->curAliens[aliens->CurWave-1].path[adp->StepAlien];
if (!aliens->recreatePath()) ClearCell(x,y);
if (!aliens->recreatePath()) {
aliens->Cells[cp.x()][cp.y()] = 0;
adp->clearcell(cp);
qDebug() << "DONT CLOSE THE PATH";
}
}
}
@@ -93,11 +95,9 @@ void MainWindow::ClearCell(int x, int y)
//qDebug() << "click: " << cp.x() << ";" << cp.y();
aliens->Cells[cp.x()][cp.y()] = 0;
adp->clearcell(cp);
adp->StepAlien=0;
qDebug() << aliens->recreatePath();
aliens->recreatePath();
//aliens->clearAliens();
//aliens->AddAlien();
}
}
@@ -105,6 +105,6 @@ void MainWindow::ClearCell(int x, int y)
MainWindow::~MainWindow()
{
delete ui;
delete aliens;
delete aliens;
delete adp;
}