hm.... new global restruct... i think it last!

This commit is contained in:
2010-07-28 23:07:42 +04:00
parent 52a5384e6f
commit 2869e716b3
32 changed files with 721 additions and 1375 deletions

View File

@@ -1,37 +1,13 @@
#include "towers.h"
towers::towers(games *parent)
Towers::Towers(Game_Data *gamedata, QObject *parent) :
QObject(parent)
{
game = parent;
GameData = gamedata;
}
void towers::drawcell(QPoint pnt)
{
QPainter painter(game->background);
QPen pen(QColor(0,0,0));
QBrush brush(QColor(0,0,0),Qt::SolidPattern);
painter.setPen(pen);
painter.setBrush(brush);
painter.drawRect(pnt.x()*game->cellsize+1,pnt.y()*game->cellsize+1,game->cellsize - 2, game->cellsize - 2);
painter.end();
}
void towers::clearcell(QPoint pnt)
{
QPainter painter(game->background);
QPen pen(QColor::fromRgb(qRgb(150,150,150)));
QBrush brush(QColor(150,150,150),Qt::SolidPattern);
painter.setPen(pen);
painter.setBrush(brush);
painter.drawRect(pnt.x()*game->cellsize+1,pnt.y()*game->cellsize+1,game->cellsize - 2, game->cellsize - 2);
painter.end();
}
/*
void towers::AddTower(QPoint point, int type)
void Towers::update()
{
}
*/