fixed few critical bugs
This commit is contained in:
+6
-5
@@ -47,7 +47,7 @@ AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(paren
|
|||||||
scene->setBackgroundBrush(*mapimg);
|
scene->setBackgroundBrush(*mapimg);
|
||||||
setCacheMode(QGraphicsView::CacheBackground);
|
setCacheMode(QGraphicsView::CacheBackground);
|
||||||
resize(mapimg->size());
|
resize(mapimg->size());
|
||||||
// startTimer(50);
|
startTimer(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -94,10 +94,11 @@ void AD_Graphics::mousePressEvent(QMouseEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//void AD_Graphics::timerEvent(QTimerEvent * )
|
void AD_Graphics::timerEvent(QTimerEvent * )
|
||||||
//{
|
{
|
||||||
// scene->update();
|
if (!core->isWaveEnd())
|
||||||
//}
|
scene->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void AD_Graphics::drawBackground(QPainter * p, const QRectF & )
|
void AD_Graphics::drawBackground(QPainter * p, const QRectF & )
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ private slots:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// void timerEvent(QTimerEvent * );
|
void timerEvent(QTimerEvent * );
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void cancel();
|
void cancel();
|
||||||
|
|||||||
+2
-1
@@ -54,9 +54,10 @@ void AD_Core::nextWave()
|
|||||||
|
|
||||||
void AD_Core::waveProcessing()
|
void AD_Core::waveProcessing()
|
||||||
{
|
{
|
||||||
|
/// FIXME : resolve problem with prise for finish wave, it is calculated wrong!
|
||||||
if (addata->aliens->curAliens.isEmpty() && waveEnd)
|
if (addata->aliens->curAliens.isEmpty() && waveEnd)
|
||||||
{
|
{
|
||||||
addata->players.at(0)->money += addata->waves.at(addata->curWave-1).prise;
|
if(addata->curWave > 0) addata->players.at(0)->money += addata->waves.at(addata->curWave-1).prise;
|
||||||
waveEnd = false;
|
waveEnd = false;
|
||||||
}
|
}
|
||||||
if (!waveInProgress) return;
|
if (!waveInProgress) return;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public:
|
|||||||
long int step;
|
long int step;
|
||||||
|
|
||||||
void setScene(QGraphicsScene * scene);
|
void setScene(QGraphicsScene * scene);
|
||||||
|
bool isWaveEnd() {return waveEnd;}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void next();
|
void next();
|
||||||
|
|||||||
+258
-142
@@ -1,4 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by Qt Creator 2.2.84, 2011-08-20T10:11:41. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
@@ -7,166 +9,280 @@
|
|||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value key="EditorConfiguration.AutoIndent" type="bool">true</value>
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
<value key="EditorConfiguration.AutoSpacesForTabs" type="bool">false</value>
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
<value key="EditorConfiguration.Codec" type="QByteArray">System</value>
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
<value key="EditorConfiguration.DoubleIndentBlocks" type="bool">false</value>
|
<value type="QString" key="language">Cpp</value>
|
||||||
<value key="EditorConfiguration.IndentBraces" type="bool">false</value>
|
<valuemap type="QVariantMap" key="value">
|
||||||
<value key="EditorConfiguration.IndentSize" type="int">4</value>
|
<value type="bool" key="AlignAssignments">true</value>
|
||||||
<value key="EditorConfiguration.MouseNavigation" type="bool">true</value>
|
<value type="QString" key="CurrentFallback">CppProject</value>
|
||||||
<value key="EditorConfiguration.PaddingMode" type="int">1</value>
|
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">false</value>
|
||||||
<value key="EditorConfiguration.ScrollWheelZooming" type="bool">true</value>
|
<value type="bool" key="IndentAccessSpecifiers">false</value>
|
||||||
<value key="EditorConfiguration.SmartBackspace" type="bool">false</value>
|
<value type="bool" key="IndentBlockBody">true</value>
|
||||||
<value key="EditorConfiguration.SpacesForTabs" type="bool">false</value>
|
<value type="bool" key="IndentBlockBraces">false</value>
|
||||||
<value key="EditorConfiguration.TabKeyBehavior" type="int">0</value>
|
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
|
||||||
<value key="EditorConfiguration.TabSize" type="int">4</value>
|
<value type="bool" key="IndentClassBraces">false</value>
|
||||||
<value key="EditorConfiguration.UseGlobal" type="bool">true</value>
|
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">false</value>
|
||||||
<value key="EditorConfiguration.Utf8BomBehavior" type="int">1</value>
|
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
|
||||||
<value key="EditorConfiguration.addFinalNewLine" type="bool">true</value>
|
<value type="bool" key="IndentEnumBraces">false</value>
|
||||||
<value key="EditorConfiguration.cleanIndentation" type="bool">true</value>
|
<value type="bool" key="IndentFunctionBody">true</value>
|
||||||
<value key="EditorConfiguration.cleanWhitespace" type="bool">true</value>
|
<value type="bool" key="IndentFunctionBraces">false</value>
|
||||||
<value key="EditorConfiguration.inEntireDocument" type="bool">false</value>
|
<value type="bool" key="IndentNamespaceBody">false</value>
|
||||||
|
<value type="bool" key="IndentNamespaceBraces">false</value>
|
||||||
|
<value type="bool" key="IndentStatementsRelativeToSwitchLabels">true</value>
|
||||||
|
<value type="bool" key="IndentSwitchLabels">false</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.CodeStyle.Count">1</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="QString" key="EditorConfiguration.CurrentFallback">Project</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SmartBackspace">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.Tab.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="bool" key="AutoIndent">true</value>
|
||||||
|
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||||
|
<value type="QString" key="CurrentFallback">CppGlobal</value>
|
||||||
|
<value type="int" key="IndentSize">4</value>
|
||||||
|
<value type="int" key="PaddingMode">1</value>
|
||||||
|
<value type="bool" key="SmartBackspace">false</value>
|
||||||
|
<value type="bool" key="SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="TabSize">8</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.Tab.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="bool" key="AutoIndent">true</value>
|
||||||
|
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||||
|
<value type="QString" key="CurrentFallback">QmlJSGlobal</value>
|
||||||
|
<value type="int" key="IndentSize">4</value>
|
||||||
|
<value type="int" key="PaddingMode">1</value>
|
||||||
|
<value type="bool" key="SmartBackspace">false</value>
|
||||||
|
<value type="bool" key="SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="TabSize">8</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.Tab.Count">2</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">true</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
|
||||||
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
<value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Mingw:D:/Qt/2010.04/mingw/bin/g++.exe.x86-windows-msys-pe-32bit.C:/Qt/qtcreator-2.2.0/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Mingw:D:/Qt/qtcreator-2.2.84/mingw/bin/gcc.exe.x86-windows-msys-pe-32bit.D:/Qt/qtcreator-2.2.84/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
||||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
<value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||||
<value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
|
||||||
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString">clean</value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Debug</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
|
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">7</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">7</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Mingw:D:/Qt/2010.04/mingw/bin/g++.exe.x86-windows-msys-pe-32bit.C:/Qt/qtcreator-2.2.0/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
|
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
<value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Mingw:C:/Qt/qtcreator-2.2.0/mingw/bin/gcc.exe.x86-windows-msys-pe-32bit.C:/Qt/qtcreator-2.2.0/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
|
||||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
<value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
|
||||||
<value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
|
||||||
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
|
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
|
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
|
||||||
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Release</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
|
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Mingw:C:/Qt/qtcreator-2.2.0/mingw/bin/gcc.exe.x86-windows-msys-pe-32bit.C:/Qt/qtcreator-2.2.0/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
|
||||||
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
|
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
|
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||||
<valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
|
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Установка</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Установка</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Deploy</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Без установки</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Без установки</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Без установки</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Без установки</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
|
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Конфигурация запуска Qt4</value>
|
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">aliendefender</value>
|
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
|
||||||
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
|
||||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QString"></value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">aliendefender.pro</value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
|
||||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
|
||||||
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||||
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
|
||||||
<value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||||
<value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
|
||||||
<value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||||
|
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
|
||||||
|
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||||
|
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||||
|
<value type="int">0</value>
|
||||||
|
<value type="int">1</value>
|
||||||
|
<value type="int">2</value>
|
||||||
|
<value type="int">3</value>
|
||||||
|
<value type="int">4</value>
|
||||||
|
<value type="int">5</value>
|
||||||
|
<value type="int">6</value>
|
||||||
|
<value type="int">7</value>
|
||||||
|
<value type="int">8</value>
|
||||||
|
<value type="int">9</value>
|
||||||
|
<value type="int">10</value>
|
||||||
|
<value type="int">11</value>
|
||||||
|
<value type="int">12</value>
|
||||||
|
<value type="int">13</value>
|
||||||
|
<value type="int">14</value>
|
||||||
|
</valuelist>
|
||||||
|
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
|
||||||
|
<value type="int">0</value>
|
||||||
|
<value type="int">1</value>
|
||||||
|
<value type="int">2</value>
|
||||||
|
<value type="int">3</value>
|
||||||
|
<value type="int">4</value>
|
||||||
|
<value type="int">5</value>
|
||||||
|
<value type="int">6</value>
|
||||||
|
<value type="int">7</value>
|
||||||
|
<value type="int">8</value>
|
||||||
|
<value type="int">9</value>
|
||||||
|
<value type="int">10</value>
|
||||||
|
<value type="int">11</value>
|
||||||
|
<value type="int">12</value>
|
||||||
|
<value type="int">13</value>
|
||||||
|
<value type="int">14</value>
|
||||||
|
</valuelist>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Конфигурация запуска Qt4</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">aliendefender</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">aliendefender.pro</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
|
||||||
|
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
|
||||||
|
<valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
|
||||||
|
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
|
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
@@ -175,10 +291,10 @@
|
|||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||||
<value type="QString">{00000000-0000-0000-0000-000000000000}</value>
|
<value type="QString">{6c550070-c96c-41ad-865e-c5b9b5c3b79f}</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
<value type="int">9</value>
|
<value type="int">10</value>
|
||||||
</data>
|
</data>
|
||||||
</qtcreator>
|
</qtcreator>
|
||||||
|
|||||||
@@ -110,13 +110,13 @@ bool Map::addTowerOnMap(int playerId, QPoint pos)
|
|||||||
bool * pathOK;
|
bool * pathOK;
|
||||||
pathOK = new bool(true);
|
pathOK = new bool(true);
|
||||||
emit recreateAlienPath(pathOK);
|
emit recreateAlienPath(pathOK);
|
||||||
qDebug() << *pathOK;
|
// qDebug() << *pathOK;
|
||||||
if (*pathOK)
|
if (*pathOK)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
delTowerOnMap(playerId,pos);
|
delTowerOnMap(playerId,pos);
|
||||||
}
|
}
|
||||||
qDebug()<<"Dont buid here" << pos;
|
qWarning("Dont buid here");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,12 +129,12 @@ QVector<QPointF> Map::createPath(QPoint start, QPoint finish)
|
|||||||
QVector<QPointF> path;
|
QVector<QPointF> path;
|
||||||
if (Cells[start.x()][start.y()] < 0)
|
if (Cells[start.x()][start.y()] < 0)
|
||||||
{
|
{
|
||||||
qDebug("ERROR invalid start");
|
qCritical("ERROR invalid start");
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
if (Cells[finish.x()][finish.y()] < 0)
|
if (Cells[finish.x()][finish.y()] < 0)
|
||||||
{
|
{
|
||||||
qDebug("ERROR invalid finish");
|
qCritical("ERROR invalid finish");
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
srcPath = invWaveTrace(finish,waveTrace(start,finish));
|
srcPath = invWaveTrace(finish,waveTrace(start,finish));
|
||||||
|
|||||||
+11
-10
@@ -105,14 +105,14 @@ void Splashes::addSplash(SplashType * spl)
|
|||||||
|
|
||||||
void Splashes::update()
|
void Splashes::update()
|
||||||
{
|
{
|
||||||
QList <int> deadIndexes;
|
QHash<int,int> deadIndexes;
|
||||||
for (QHash<int, SplashType>::iterator
|
for (QHash<int, SplashType>::iterator
|
||||||
spl = gameData->curSplashes.begin();
|
spl = gameData->curSplashes.begin();
|
||||||
spl != gameData->curSplashes.end(); ++spl)
|
spl != gameData->curSplashes.end(); ++spl)
|
||||||
{
|
{
|
||||||
spl->life++;
|
spl->life++;
|
||||||
if (spl->life > spl->src->lifetime)
|
if (spl->life > spl->src->lifetime)
|
||||||
deadIndexes.append(spl->id);
|
deadIndexes.insert(spl->id,spl->id);
|
||||||
if (!spl->trigsOnTimer.isEmpty())
|
if (!spl->trigsOnTimer.isEmpty())
|
||||||
doTriggerOnTimer(spl,&deadIndexes);
|
doTriggerOnTimer(spl,&deadIndexes);
|
||||||
float arctg;
|
float arctg;
|
||||||
@@ -130,7 +130,7 @@ void Splashes::update()
|
|||||||
if (distance2(spl->pos, spl->destination) < speed2)
|
if (distance2(spl->pos, spl->destination) < speed2)
|
||||||
{
|
{
|
||||||
if (badAl)
|
if (badAl)
|
||||||
deadIndexes.push_back(spl->id);
|
deadIndexes.insert(spl->id,spl->id);
|
||||||
spl->pos = spl->destination;
|
spl->pos = spl->destination;
|
||||||
doTriggerOnDest(spl,&deadIndexes,badAl);
|
doTriggerOnDest(spl,&deadIndexes,badAl);
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ void Splashes::update()
|
|||||||
spl->angle = 180.0f*(-arctg)/M_PI;
|
spl->angle = 180.0f*(-arctg)/M_PI;
|
||||||
} else {
|
} else {
|
||||||
if (!gameData->map->rect().contains(spl->pos.toPoint()))
|
if (!gameData->map->rect().contains(spl->pos.toPoint()))
|
||||||
deadIndexes.push_back(spl->id);
|
deadIndexes.insert(spl->id,spl->id);
|
||||||
if (!spl->trigsOnDest.isEmpty())
|
if (!spl->trigsOnDest.isEmpty())
|
||||||
{
|
{
|
||||||
if (distance2(spl->pos, spl->destination) < speed2)
|
if (distance2(spl->pos, spl->destination) < speed2)
|
||||||
@@ -157,8 +157,9 @@ void Splashes::update()
|
|||||||
if (speed == 0) spl->item->next(1.f);
|
if (speed == 0) spl->item->next(1.f);
|
||||||
else spl->item->next(speed*cellSize);
|
else spl->item->next(speed*cellSize);
|
||||||
}
|
}
|
||||||
for (int j=0; j<deadIndexes.size(); j++)
|
for (QHash<int,int>::iterator j = deadIndexes.begin();
|
||||||
delSplash(deadIndexes.at(j));
|
j != deadIndexes.end(); ++j)
|
||||||
|
delSplash(*j);
|
||||||
for (QHash<int,DeadAlienIndex>::iterator j = dead.begin();
|
for (QHash<int,DeadAlienIndex>::iterator j = dead.begin();
|
||||||
j != dead.end(); ++j)
|
j != dead.end(); ++j)
|
||||||
emit killAlien(j->player,j->id);
|
emit killAlien(j->player,j->id);
|
||||||
@@ -176,7 +177,7 @@ void Splashes::delSplash(int Id)
|
|||||||
|
|
||||||
/// FIXME : correct onTrigTimer()
|
/// FIXME : correct onTrigTimer()
|
||||||
void Splashes::doTriggerOnTimer(QHash<int, SplashType>::iterator
|
void Splashes::doTriggerOnTimer(QHash<int, SplashType>::iterator
|
||||||
spl, QList<int> *deadIndexes)
|
spl, QHash<int,int> *deadIndexes)
|
||||||
{
|
{
|
||||||
for(QList<TriggerOnTimer>::iterator i = spl->trigsOnTimer.begin();
|
for(QList<TriggerOnTimer>::iterator i = spl->trigsOnTimer.begin();
|
||||||
i != spl->trigsOnTimer.end(); ++i)
|
i != spl->trigsOnTimer.end(); ++i)
|
||||||
@@ -187,7 +188,7 @@ void Splashes::doTriggerOnTimer(QHash<int, SplashType>::iterator
|
|||||||
{
|
{
|
||||||
/// TODO : add damage and other effects
|
/// TODO : add damage and other effects
|
||||||
i->timer = 0;
|
i->timer = 0;
|
||||||
if (strig->delParent) deadIndexes->append(spl->id);
|
if (strig->delParent) deadIndexes->insert(spl->id,spl->id);
|
||||||
if (strig->count > 0 && strig->childId > 0)
|
if (strig->count > 0 && strig->childId > 0)
|
||||||
{
|
{
|
||||||
int aim;
|
int aim;
|
||||||
@@ -210,13 +211,13 @@ void Splashes::doTriggerOnTimer(QHash<int, SplashType>::iterator
|
|||||||
|
|
||||||
|
|
||||||
void Splashes::doTriggerOnDest(QHash<int, SplashType>::iterator
|
void Splashes::doTriggerOnDest(QHash<int, SplashType>::iterator
|
||||||
spl, QList<int> *deadIndexes,
|
spl, QHash<int,int> *deadIndexes,
|
||||||
bool badAl)
|
bool badAl)
|
||||||
{
|
{
|
||||||
foreach(TriggerOnDest t, spl->trigsOnDest)
|
foreach(TriggerOnDest t, spl->trigsOnDest)
|
||||||
{
|
{
|
||||||
/// TODO: different aims for childs
|
/// TODO: different aims for childs
|
||||||
if (t.src->delParent) deadIndexes->append(spl->id);
|
if (t.src->delParent) deadIndexes->insert(spl->id,spl->id);
|
||||||
int aim;
|
int aim;
|
||||||
switch(t.src->childAim)
|
switch(t.src->childAim)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -36,10 +36,10 @@ private:
|
|||||||
QHash <int, DeadAlienIndex> dead;
|
QHash <int, DeadAlienIndex> dead;
|
||||||
|
|
||||||
void doTriggerOnDest(QHash<int, SplashType>::iterator
|
void doTriggerOnDest(QHash<int, SplashType>::iterator
|
||||||
spl, QList <int> * deadIndexes,
|
spl, QHash<int,int> * deadIndexes,
|
||||||
bool badAl);
|
bool badAl);
|
||||||
void doTriggerOnTimer(QHash<int, SplashType>::iterator
|
void doTriggerOnTimer(QHash<int, SplashType>::iterator
|
||||||
spl, QList <int> * deadIndexes);
|
spl, QHash<int,int> * deadIndexes);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SPLASHES_H
|
#endif // SPLASHES_H
|
||||||
|
|||||||
Reference in New Issue
Block a user