changes in arhitecture, some improvments, much optimising and simplify,

many bagfixes and new graphics engine
This commit is contained in:
blizer
2011-08-20 07:34:19 +04:00
committed by unknown
parent 0a9679fd99
commit f3d0ca7101
33 changed files with 1444 additions and 897 deletions

17
map.h
View File

@@ -5,6 +5,8 @@
// Maximum map is 65530 x 65530 because qHash may be repeat and towers has same Id
/// TODO: fix cell type - must be a union of int and bit flags
class Map : public QObject
{
Q_OBJECT
@@ -43,10 +45,10 @@ public:
void removeAliensPath();
QVector <QPointF> createPath(QPoint start, QPoint finish);
QRect rect() const {return QRect(QPoint(),mapSize);}
// QString name() const {return mapName;}
QList <QPoint> starts() const {return Starts;}
QList <QPoint> finishs() const {return Finishs;}
QVector < QVector <int> > cells() const {return Cells;}
const QString &name() const {return mapName;}
const QList <QPoint> &starts() const {return Starts;}
const QList <QPoint> &finishs() const {return Finishs;}
const QVector < QVector <int> > &cells() const {return Cells;}
int image() const {return imageType;}
int maxPlayers() const {return players;}
signals:
@@ -60,16 +62,13 @@ private:
int players;
int imageType;
QVector < QVector <int> > Cells;
QList <QPoint> Starts;
QVector < QVector <int> > TmpCells;
QList <QPoint> Starts;
QList <QPoint> Finishs;
QVector < QVector <int> > TmpCells;
QVector<QPoint> invWaveTrace(QPoint finish, int cnt);
int waveTrace(QPoint start, QPoint finish);
bool isReachable(int playerId, QPoint pos);
//void CreateMapExample();
//void ReadSettings();
};
#endif // MAP_H