added some graphics but only for debug

This commit is contained in:
peri4
2010-08-27 14:04:05 +04:00
parent b3854e867d
commit 95f3fb74fa
37 changed files with 876 additions and 707 deletions

View File

@@ -9,7 +9,7 @@ Splashes::Splashes(Game_Data *gd, QObject *parent) :
}
bool Splashes::AddSplash(int srcId, QPointF pos)
bool Splashes::addSplash(int srcId, QPointF pos)
{
if (srcId < 0 || srcId >= gameData->srcSplashes.size())
{
@@ -23,7 +23,7 @@ bool Splashes::AddSplash(int srcId, QPointF pos)
spl.TowerId = QPoint(-1,-1);
spl.life = 0;
spl.imgType = src.imgType;
if (!gameData->map->Rect().contains(pos.toPoint()))
if (!gameData->map->rect().contains(pos.toPoint()))
{
qCritical("ERROR splash out of map size");
return false;
@@ -33,7 +33,7 @@ bool Splashes::AddSplash(int srcId, QPointF pos)
spl.angle = 0;
spl.destination = pos;
TriggerType trig;
for(int i; i<src.triggerIndexes.size(); i++)
for(int i=0; i<src.triggerIndexes.size(); i++)
{
trig.timer = gameData->srTriggers.at(src.triggerIndexes.at(i)).timer;
trig.src = src.triggerIndexes.at(i);
@@ -45,7 +45,7 @@ bool Splashes::AddSplash(int srcId, QPointF pos)
}
void Splashes::AddSplash(srcSplashType src, int index, TowerType tw)
void Splashes::addSplash(srcSplashType src, int index, TowerType tw)
{
SplashType spl;
spl.Id = nextId;
@@ -63,7 +63,7 @@ void Splashes::AddSplash(srcSplashType src, int index, TowerType tw)
spl.life = 0;
spl.src = index;
TriggerType trig;
for(int i; i<src.triggerIndexes.size(); i++)
for(int i=0; i<src.triggerIndexes.size(); i++)
{
trig.timer = gameData->players.at(tw.PlayerId)->srcTowers.at(tw.src).triggers.at(src.triggerIndexes.at(i)).timer;
trig.src = src.triggerIndexes.at(i);
@@ -76,13 +76,13 @@ void Splashes::AddSplash(srcSplashType src, int index, TowerType tw)
void Splashes::update()
{
for (int i; i<gameData->curSplashes.size(); i++)
for (int i=0; i<gameData->curSplashes.size(); i++)
{
SplashType spl = gameData->curSplashes.values().at(i);
bool isTowerSplash = false;
srcSplashType src;
TowerType tw;
if (gameData->map->Rect().contains(spl.TowerId))
if (gameData->map->rect().contains(spl.TowerId))
{
if (gameData->curTowers.contains(spl.TowerId))
{