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

@@ -388,7 +388,7 @@ void Loader::fillTowerChains(QList <tbChain> * chlist, QList <int> * trigIds, sr
}
}
QString Loader::CreateMapExample()
QString Loader::createMapExample()
{
QVector < QVector < int > > Cells;
Cells.resize(16);
@@ -448,11 +448,11 @@ void Loader::readAliens()
al.score = nm.namedItem("score").nodeValue().toInt();
al.isFlying = (nm.namedItem("flying").nodeValue() == "true");
aliens.insert(al.id,al);
qDebug() << tr("Alien %1 id=%2 health=%3 speed=%4 prise=%5 imgType=%6 armor=%7 regeneration=%8 score=%10").arg(al.name).arg(al.id).arg(al.health).arg(al.speed).arg(al.prise).arg(al.imgType).arg(al.armor).arg(al.regeneration).arg(al.score);
//qDebug() << tr("Alien %1 id=%2 health=%3 speed=%4 prise=%5 imgType=%6 armor=%7 regeneration=%8 score=%10").arg(al.name).arg(al.id).arg(al.health).arg(al.speed).arg(al.prise).arg(al.imgType).arg(al.armor).arg(al.regeneration).arg(al.score);
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 aliens").arg(aliens.size());
qDebug("================");
//qDebug("================");
}
@@ -469,11 +469,11 @@ void Loader::readWaves()
w.prise = nm.namedItem("prise").nodeValue().toInt();
w.timeout = nm.namedItem("timeout").nodeValue().toInt();
waves.insert(w.id,w);
qDebug() << tr("Wave %1 prise=%2 timeout=%3").arg(w.id).arg(w.prise).arg(w.timeout);
//qDebug() << tr("Wave %1 prise=%2 timeout=%3").arg(w.id).arg(w.prise).arg(w.timeout);
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 waves").arg(waves.size());
qDebug("================");
//qDebug("================");
}
@@ -502,12 +502,12 @@ void Loader::readWaveParts()
if (OK)
{
waveParts.insert(wp.waveId,wp);
qDebug() << tr("Wave=%1 alien=%2 count=%3").arg(wp.waveId).arg(wp.alienId).arg(wp.count);
//qDebug() << tr("Wave=%1 alien=%2 count=%3").arg(wp.waveId).arg(wp.alienId).arg(wp.count);
}
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 waveParts").arg(waveParts.size());
qDebug("================");
//qDebug("================");
}
@@ -550,12 +550,12 @@ void Loader::readChains()
if (OK)
{
chains.insert(chain.towerId,chain);
qDebug() << tr("Tower=%1 parent=%2 child=%3 trigger=%4").arg(chain.towerId).arg(chain.parentSplashId).arg(chain.childSplashId).arg(chain.triggerId);
//qDebug() << tr("Tower=%1 parent=%2 child=%3 trigger=%4").arg(chain.towerId).arg(chain.parentSplashId).arg(chain.childSplashId).arg(chain.triggerId);
}
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 chains").arg(chains.size());
qDebug("================");
//qDebug("================");
}
@@ -583,12 +583,12 @@ void Loader::readLevWaves()
if (OK)
{
levWaves.insert(lw.levelId,lw);
qDebug() << tr("level=%1 wave=%2").arg(lw.levelId).arg(lw.waveId);
//qDebug() << tr("level=%1 wave=%2").arg(lw.levelId).arg(lw.waveId);
}
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 Waves On Level").arg(levWaves.size());
qDebug("================");
//qDebug("================");
}
@@ -616,12 +616,12 @@ void Loader::readLevTowers()
if (OK)
{
levTowers.insert(lt.levelId,lt);
qDebug() << tr("level=%1 tower=%2").arg(lt.levelId).arg(lt.towerId);
//qDebug() << tr("level=%1 tower=%2").arg(lt.levelId).arg(lt.towerId);
}
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 Towers On Level").arg(levTowers.size());
qDebug("================");
//qDebug("================");
}
@@ -646,12 +646,12 @@ void Loader::readLevels()
if (OK)
{
levels.insert(l.id,l);
qDebug() << tr("Level %1 id=%2 map=%3 ").arg(l.name).arg(l.id).arg(l.mapId);
//qDebug() << tr("Level %1 id=%2 map=%3 ").arg(l.name).arg(l.id).arg(l.mapId);
}
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 levels").arg(levels.size());
qDebug("================");
//qDebug("================");
}
@@ -692,12 +692,12 @@ void Loader::readTriggers()
if (str == "nearlestAlien")
trig.childAim = srcTriggerType::nearlestAlien;
triggers.insert(trig.id,trig);
qDebug() << tr("Trigger %1 id=%2 damage=%3 radius=%4 delParent=%5 timer=%6").arg(trig.name).arg(trig.id).arg(trig.damage).arg(trig.radius).arg(trig.delParent).arg(trig.timer)
<< tr("count=%1 chance=%2 randomPosRadius=%3 type=%4 childAim=%5").arg(trig.count).arg(trig.chance).arg(trig.randomPosRadius).arg(trig.type).arg(trig.childAim);
//qDebug() << tr("Trigger %1 id=%2 damage=%3 radius=%4 delParent=%5 timer=%6").arg(trig.name).arg(trig.id).arg(trig.damage).arg(trig.radius).arg(trig.delParent).arg(trig.timer)
// << tr("count=%1 chance=%2 randomPosRadius=%3 type=%4 childAim=%5").arg(trig.count).arg(trig.chance).arg(trig.randomPosRadius).arg(trig.type).arg(trig.childAim);
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 triggers").arg(triggers.size());
qDebug("================");
//qDebug("================");
}
@@ -719,11 +719,11 @@ void Loader::readSplashes()
str = nm.namedItem("autoControl").nodeValue();
s.autoControl = (str == "true");
splashes.insert(s.id,s);
qDebug() << tr("Splash %1 id=%2 speed=%3 imgType=%4 autoControl=%5 lifetime=%6").arg(s.name).arg(s.id).arg(s.speed).arg(s.imgType).arg(s.autoControl).arg(s.lifetime);
//qDebug() << tr("Splash %1 id=%2 speed=%3 imgType=%4 autoControl=%5 lifetime=%6").arg(s.name).arg(s.id).arg(s.speed).arg(s.imgType).arg(s.autoControl).arg(s.lifetime);
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 splashes").arg(splashes.size());
qDebug("================");
//qDebug("================");
}
@@ -756,13 +756,13 @@ void Loader::readTowers()
if (OK)
{
towers.insert(tw.id,tw);
qDebug() << tr("Tower %1 id=%2 radius=%3 cost=%4 reload=%5 buildTime=%6 splash=%7").arg(tw.name).arg(tw.id).arg(tw.radius).arg(tw.cost).arg(tw.reload).arg(tw.buildTime).arg(tw.splashId)
<< tr("imgType=%1 expByKill=%2 expByShot=%3 expByDamage=%4").arg(tw.imgType).arg(tw.expByKill).arg(tw.expByShot).arg(tw.expByDamage);
//qDebug() << tr("Tower %1 id=%2 radius=%3 cost=%4 reload=%5 buildTime=%6 splash=%7").arg(tw.name).arg(tw.id).arg(tw.radius).arg(tw.cost).arg(tw.reload).arg(tw.buildTime).arg(tw.splashId)
// << tr("imgType=%1 expByKill=%2 expByShot=%3 expByDamage=%4").arg(tw.imgType).arg(tw.expByKill).arg(tw.expByShot).arg(tw.expByDamage);
}
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 towers").arg(towers.size());
qDebug("================");
//qDebug("================");
}
@@ -783,11 +783,11 @@ void Loader::readMaps()
m.size.setWidth(mn.namedItem("width").nodeValue().toInt());
m.size.setHeight(mn.namedItem("height").nodeValue().toInt());
maps.insert(m.id,m);
qDebug() << tr("Map %1 id=%2 imgType=%3 maxPlayers=%5 data=%6 ").arg(m.name).arg(m.id).arg(m.imgType).arg(m.maxPlayers).arg(QString(m.data)) << m.size;
//qDebug() << tr("Map %1 id=%2 imgType=%3 maxPlayers=%5 data=%6 ").arg(m.name).arg(m.id).arg(m.imgType).arg(m.maxPlayers).arg(QString(m.data)) << m.size;
}
qDebug("================");
//qDebug("================");
qDebug() << tr("Found %1 maps").arg(maps.size());
qDebug("================");
//qDebug("================");
}