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

View File

@@ -5,24 +5,41 @@
class Splashes : public QObject
{
Q_OBJECT
Q_OBJECT
public:
explicit Splashes(Game_Data * gd, QObject *parent = 0);
void addSplash( int player, int srcTower, int srcId, QPointF pos, QPointF dest, int aim, QPoint curTower);
void delSplash(int Id);
void update();
void setScene(QGraphicsScene * scene_) {scene = scene_;}
signals:
/// TODO : fix killalien - new function for adding alien in kill list and del aliens in finish update
void killAlien(int playerId, int alienId);
public slots:
void addSplash(QPoint towerId);
void addSplash(int player, srcSplashType * src, QPointF pos, QPointF dest, int aim = -1);
void addSplash(const TowerType &tower);
void addSplash(srcTowerType * srctower, int id, QPointF pos, QPointF dest, int aim = -1, QPoint towerId = QPoint(-1,-1));
void addSplash(SplashType *spl);
private:
QGraphicsScene * scene;
Game_Data *gameData;
int nextId;
struct DeadAlienIndex
{
DeadAlienIndex(int i, int p) {id = i; player = p;}
int player;
int id;
};
QHash <int, DeadAlienIndex> dead;
void doTriggerOnDest(const SplashType &spl, QList <int> * deadIndexes,
void doTriggerOnDest(QHash<int, SplashType>::iterator
spl, QList <int> * deadIndexes,
bool badAl);
void doTriggerOnTimer(SplashType * spl, QList <int> * deadIndexes);
void doTriggerOnTimer(QHash<int, SplashType>::iterator
spl, QList <int> * deadIndexes);
};
#endif // SPLASHES_H