I think finished structures
and some changes in loading and changes in map class we have 2 TODO now
This commit is contained in:
30
map.h
30
map.h
@@ -17,7 +17,6 @@ class Map : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
enum CellType
|
||||
{
|
||||
Player = 1,
|
||||
@@ -38,33 +37,38 @@ public:
|
||||
// -3 - -/-
|
||||
// -1000 - it is wall or some place where you can't build
|
||||
|
||||
QVector < QVector <int> > Cells;
|
||||
QList <QPoint> starts;
|
||||
QList <QPoint> finishs;
|
||||
int maxPlayers;
|
||||
|
||||
explicit Map(int Id, QObject *parent = 0);
|
||||
int Id() const {return mapId;}
|
||||
explicit Map(QByteArray data, QSize size, QString name, int maxPlayers, int image, QObject *parent = 0);
|
||||
bool addTowerOnMap(int playerId, QPoint pos);
|
||||
bool isFreePlace(QPoint pos);
|
||||
void delTowerOnMap(QPoint pos);
|
||||
void removeAliensPath();
|
||||
QVector <QPointF> CreatePath(QPoint start, QPoint finish);
|
||||
QSize size() const {return mapsize;}
|
||||
void load();
|
||||
// QSize size() const {return mapsize;}
|
||||
// QString name() const {return mapName;}
|
||||
QList <QPoint> Starts() const {return starts;}
|
||||
QList <QPoint> Finishs() const {return finishs;}
|
||||
int Image() const {return imageType;}
|
||||
signals:
|
||||
void RecreateAlienPath(bool * pathOK);
|
||||
public slots:
|
||||
void printMap();
|
||||
|
||||
private:
|
||||
int mapId;
|
||||
QSize mapsize;
|
||||
QSize mapSize;
|
||||
QString mapName;
|
||||
int players;
|
||||
int imageType;
|
||||
QVector < QVector <int> > Cells;
|
||||
QList <QPoint> starts;
|
||||
QList <QPoint> finishs;
|
||||
|
||||
QVector < QVector <int> > TmpCells;
|
||||
|
||||
QVector<QPoint> InvWaveTrace(QPoint finish, int cnt);
|
||||
int WaveTrace(QPoint start, QPoint finish);
|
||||
void CreateMapExample();
|
||||
void ReadSettings();
|
||||
//void CreateMapExample();
|
||||
//void ReadSettings();
|
||||
};
|
||||
|
||||
#endif // MAP_H
|
||||
|
||||
Reference in New Issue
Block a user