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

@@ -11,10 +11,7 @@ Q_OBJECT
public:
explicit Towers(Game_Data * gd, QObject *parent = 0);
bool AddTower(int playerId, int srcId, QPoint pos);
void DelTowerById(int Id);
void DelTowerByPos(QPoint pos);
void DelTower(int index);
int TowerIndex(int towerId);
void DelTower(QPoint pos);
void update();
int size() const {return gameData->curTowers.size();}
signals:
@@ -23,8 +20,11 @@ public slots:
private:
Game_Data * gameData;
int nextId;
};
inline uint qHash(const QPoint &pos)
{
return qHash(pos.x()) + (qHash(pos.y()) << 16);
}
#endif // TOWERS_H