last changes

This commit is contained in:
2020-06-15 22:22:46 +03:00
parent 5f405ca403
commit 259f321df4
53 changed files with 3368 additions and 842 deletions

View File

@@ -19,7 +19,8 @@ SOURCES += main.cpp \
animationmodel.cpp \
animlabel.cpp \
../aliens.cpp \
../aditem.cpp
../aditem.cpp \
wavemodel.cpp
HEADERS += mainwindow.h \
../loader.h \
alienmodel.h \
@@ -34,7 +35,8 @@ HEADERS += mainwindow.h \
animationmodel.h \
animlabel.h \
../aliens.h \
../aditem.h
../aditem.h \
wavemodel.h
FORMS += mainwindow.ui
TRANSLATIONS += adeditor_ru.ts
RESOURCES += ADeditor.qrc
@@ -42,3 +44,5 @@ OTHER_FILES += ../schema.xml \
../data2.xml

View File

@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.2.84, 2011-08-27T23:06:35. -->
<!-- Written by QtCreator 3.2.1, 2016-03-31T12:05:55. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{948faa78-0b50-402e-a285-1bca3b08de64}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
@@ -11,66 +15,32 @@
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="bool" key="AlignAssignments">false</value>
<value type="QString" key="CurrentFallback">CppGlobal</value>
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">true</value>
<value type="bool" key="IndentAccessSpecifiers">false</value>
<value type="bool" key="IndentBlockBody">true</value>
<value type="bool" key="IndentBlockBraces">false</value>
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
<value type="bool" key="IndentClassBraces">false</value>
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">true</value>
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
<value type="bool" key="IndentEnumBraces">false</value>
<value type="bool" key="IndentFunctionBody">true</value>
<value type="bool" key="IndentFunctionBraces">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>
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">1</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="QString" key="EditorConfiguration.CurrentFallback">Global</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</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.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</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">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
@@ -81,19 +51,24 @@
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">DesktopBuild</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">DesktopBuild</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{3c749452-9483-442d-b011-933a1b5dac10}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<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>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/aliendefender/build-ADeditor-DesktopBuild-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
@@ -103,9 +78,11 @@
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@@ -117,9 +94,11 @@
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@@ -132,18 +111,17 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qt Отладка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Отладка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">C:/Users/Andrey/Desktop/aliendefender/ADeditor</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">7</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<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>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/aliendefender/build-ADeditor-DesktopBuild-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
@@ -153,9 +131,11 @@
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@@ -167,9 +147,11 @@
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
@@ -182,13 +164,11 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qt Релиз</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Выпуск</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">C:/Users/Andrey/Desktop/aliendefender/ADeditor</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">7</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
@@ -199,39 +179,29 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Без установки</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Локальная установка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">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.LeakCheckOnFinish">1</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="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">3</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<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>
@@ -250,37 +220,22 @@
<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="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">ADeditor</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/aliendefender/ADeditor/ADeditor.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">ADeditor.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">C:/Users/Andrey/Desktop/aliendefender</value>
<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.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
@@ -290,11 +245,11 @@
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{6c550070-c96c-41ad-865e-c5b9b5c3b79f}</value>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">16</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">10</value>
<variable>Version</variable>
<value type="int">16</value>
</data>
</qtcreator>

View File

@@ -9,7 +9,7 @@
<valuemap type="QVariantMap">
<value key="EditorConfiguration.AutoIndent" type="bool">true</value>
<value key="EditorConfiguration.AutoSpacesForTabs" type="bool">false</value>
<value key="EditorConfiguration.Codec" type="QByteArray">System</value>
<value key="EditorConfiguration.Codec" type="QByteArray">UTF-8</value>
<value key="EditorConfiguration.DoubleIndentBlocks" type="bool">false</value>
<value key="EditorConfiguration.IndentBraces" type="bool">false</value>
<value key="EditorConfiguration.IndentSize" type="int">4</value>
@@ -19,7 +19,7 @@
<value key="EditorConfiguration.SmartBackspace" type="bool">false</value>
<value key="EditorConfiguration.SpacesForTabs" type="bool">true</value>
<value key="EditorConfiguration.TabKeyBehavior" type="int">0</value>
<value key="EditorConfiguration.TabSize" type="int">8</value>
<value key="EditorConfiguration.TabSize" type="int">4</value>
<value key="EditorConfiguration.UseGlobal" type="bool">true</value>
<value key="EditorConfiguration.Utf8BomBehavior" type="int">1</value>
<value key="EditorConfiguration.addFinalNewLine" type="bool">true</value>
@@ -34,11 +34,11 @@
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Desktop</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
<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 key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.</value>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
@@ -78,63 +78,63 @@
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">4.6.3 (2) release Отладка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Dima/Desktop/aliendefender/ADeditor-build-desktop</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</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 key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
<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>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
<value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString">clean</value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Очистка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">4.6.3 (2) release Релиз</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt в PATH Релиз</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Dima/Desktop/aliendefender/ADeditor-build-desktop</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</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 key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/andrey/aliendefender/ADeditor</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
<value key="ProjectExplorer.BuildCOnfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.</value>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
<value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString">clean</value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Очистка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Qt в PATH Отладка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/andrey/aliendefender/ADeditor</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit.</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
</valuemap>
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
@@ -152,6 +152,29 @@
</valuemap>
<value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
<valuelist key="Analyzer.Valgrind.AddedSupressionFiles" type="QVariantList"/>
<value key="Analyzer.Valgrind.FilterExternalIssues" type="bool">true</value>
<value key="Analyzer.Valgrind.NumCallers" type="int">25</value>
<valuelist key="Analyzer.Valgrind.RemovedSupressionFiles" type="QVariantList"/>
<value key="Analyzer.Valgrind.TrackOrigins" type="bool">true</value>
<value key="Analyzer.Valgrind.ValgrindExecutable" type="QString">valgrind</value>
<valuelist key="Analyzer.Valgrind.VisibleErrorKinds" type="QVariantList">
<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 key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">ADeditor</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
@@ -161,7 +184,7 @@
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString">/home/andrey/aliendefender</value>
<value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
<value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
<value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
@@ -175,7 +198,7 @@
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{0f364aaa-5a2f-49c5-b7a5-6b296e2f6fd0}</value>
<value type="QString">{9fe7c56a-57b2-4b67-8b16-62cd8b54e5ea}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>

View File

@@ -31,5 +31,13 @@ QVariant AlienModel::data(const QModelIndex &index, int role) const
{
return aliens.at(index.row()).name;
}
if (role == Qt::DecorationRole)
{
return QIcon(":/icons/icons/list-add.png");
}
if (role == Qt::ToolTipRole)
{
return tr("id=%1").arg(aliens.at(index.row()).id);
}
return QVariant();
}

View File

@@ -2,6 +2,7 @@
#define ALIENMODEL_H
#include <QAbstractListModel>
#include <QIcon>
#include "../loader.h"
class AlienModel : public QAbstractListModel

View File

@@ -24,6 +24,8 @@ MainWindow::MainWindow(QWidget *parent) :
ui->pbSlpDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
ui->pbAnimAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
ui->pbAnimDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
ui->pbWaveAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
ui->pbWaveDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
ui->pbImgAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
ui->pbImgDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
ui->pbTwSplashEdit->setIcon(QIcon::fromTheme("edit", QIcon(":/icons/icons/edit.png")));
@@ -31,6 +33,15 @@ MainWindow::MainWindow(QWidget *parent) :
adloader = new Loader();
adloader->load("data2.xml");
wavePartModel = new WavePartModel(adloader->waves);
waveModel = new WaveModel(adloader->waves);
// waveModel->setCurrentWave(0);
connect(waveModel,SIGNAL(needUpdateIndex()),wavePartModel,SLOT(updateIndex()));
ui->tableWaves->setModel((QAbstractItemModel * )waveModel);
ui->tableWaveParts->setModel((QAbstractItemModel * )wavePartModel);
connect(ui->tableWaves->selectionModel(),SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),wavePartModel,SLOT(setCurrentWave(QModelIndex,QModelIndex)));
connect(ui->tableWaveParts->selectionModel(),SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),this,SLOT(tbWavePartSelect(QModelIndex,QModelIndex)));
animModel = new AnimationModel(adloader->animations);
ui->lvAnimations->setModel((QAbstractItemModel * )animModel);
connect(ui->lvAnimations->selectionModel(),SIGNAL(currentChanged(QModelIndex,QModelIndex)),this,SLOT(lvAnimations_select(QModelIndex, QModelIndex)));
@@ -48,6 +59,7 @@ MainWindow::MainWindow(QWidget *parent) :
alModel = new AlienModel(adloader->aliens.values());
ui->lvAliens->setModel((QAbstractItemModel * )alModel);
ui->cbAlImage->setModel((QAbstractItemModel * )animModel);
ui->lvWaveAliens->setModel((QAbstractItemModel * )alModel);
connect(ui->lvAliens->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvAliens_select(QModelIndex, QModelIndex)));
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
@@ -246,6 +258,7 @@ void MainWindow::lvSplashes_select(QModelIndex index, QModelIndex)
ui->leSplName->setText(spl.name);
ui->cbSplImage->setCurrentIndex(adloader->animations.keys().indexOf(spl.imgType));
ui->lbSplAnim->setAnimation(adloader->animations.value(spl.imgType).pathes);
ui->sbSplZValue->setValue(spl.ZValue);
switch (spl.compositionMode)
{
case QPainter::RasterOp_NotSource :
@@ -423,7 +436,7 @@ void MainWindow::on_pbReload_clicked()
twModel->refresh(adloader->towers.values());
splModel->refresh(adloader->splashes.values());
trigModel->refresh(adloader->triggers.values());
// animModel->refresh(adloader->animations.values());
// animModel->refresh(adloader->animations.values());
mapModel->refresh(adloader->maps.values());
ui->lvAnimations->reset();
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
@@ -543,17 +556,20 @@ void MainWindow::on_pbAlDel_clicked()
if (adloader->aliens.size() < 2) return;
QMessageBox msgBox;
int id = adloader->aliens.keys().at(ui->lvAliens->currentIndex().row());
for (int i=0; i<adloader->waveParts.size(); i++)
for (int i=0; i<adloader->waves.size(); i++)
{
if (adloader->waveParts.values().at(i).alienId == id)
for (int j=0; j<adloader->waves[i].parts.size(); j++)
{
if (adloader->waves[i].parts[j].alienId == id)
{
msgBox.setText(tr("You can not delete alien %1 id=%2").arg(adloader->aliens.value(id).name).arg(id));
msgBox.setInformativeText(tr("It used in wawe %1").arg(adloader->waveParts.values().at(i).waveId));
msgBox.setInformativeText(tr("It used in wawe %1").arg(adloader->waves[i].id));
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.exec();
return;
}
}
}
msgBox.setText(tr("Delete alien %1 id=%2").arg(adloader->aliens.value(id).name).arg(id));
msgBox.setInformativeText(tr("Are you sure?"));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
@@ -1133,7 +1149,7 @@ void MainWindow::on_pbAnimAdd_clicked()
anim.id = i;
adloader->animations.insert(anim.id,anim);
int index = adloader->animations.keys().indexOf(i);
// animModel->refresh(adloader->animations.values());
// animModel->refresh(adloader->animations.values());
ui->lvAnimations->reset();
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
isSaved = false;
@@ -1227,7 +1243,7 @@ void MainWindow::on_pbAnimDel_clicked()
if (ret == QMessageBox::Ok)
{
adloader->animations.remove(id);
// animModel->refresh(adloader->animations.values());
// animModel->refresh(adloader->animations.values());
ui->lvAnimations->reset();
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
isSaved = false;
@@ -1280,3 +1296,81 @@ void MainWindow::on_cbSplKeepOnAlien_toggled(bool checked)
adloader->splashes[id].keepOnAlien = checked;
if (lval != adloader->splashes[id].keepOnAlien) isSaved = false;
}
void MainWindow::on_btWaveAddAlien_clicked()
{
if (ui->lvWaveAliens->currentIndex().isValid())
wavePartModel->insertAlien(adloader->aliens.values().at(ui->lvWaveAliens->currentIndex().row()).id);
waveModel->refreshData();
}
void MainWindow::tbWavePartSelect(QModelIndex a, QModelIndex)
{
ui->btWaveRemoveAlien->setEnabled(a.isValid());
}
void MainWindow::on_btWaveRemoveAlien_clicked()
{
wavePartModel->removeAlien(ui->tableWaveParts->selectionModel()->currentIndex());
waveModel->refreshData();
}
void MainWindow::on_btWaveClear_clicked()
{
wavePartModel->clearAliens();
waveModel->refreshData();
}
void MainWindow::on_pbWaveAdd_clicked()
{
// wavePartModel->setCurrentWave(QModelIndex());
QModelIndex a = ui->tableWaves->selectionModel()->currentIndex();
waveModel->addWave(a);
wavePartModel->setCurrentWave(waveModel->index(a.row()+1,a.column()));
//wavePartModel->setCurrentWave(a);
// ui->tableWaves->selectionModel()->setCurrentIndex(waveModel->index(a.row()+1,a.column()),QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}
void MainWindow::on_pbWaveDel_clicked()
{
// wavePartModel->setCurrentWave(QModelIndex());
QModelIndex a = ui->tableWaves->selectionModel()->currentIndex();
waveModel->removeWave(a);
wavePartModel->setCurrentWave(waveModel->index(a.row(),a.column()));
//wavePartModel->setCurrentWave(a);
//ui->tableWaves->selectionModel()->setCurrentIndex(waveModel->index(a.row(),a.column()),QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}
void MainWindow::on_pbWaveCopy_clicked()
{
// wavePartModel->setCurrentWave(QModelIndex());
QModelIndex a = ui->tableWaves->selectionModel()->currentIndex();
waveModel->copyWave(a);
wavePartModel->setCurrentWave(waveModel->index(a.row()+1,a.column()));
// ui->tableWaves->selectionModel()->setCurrentIndex(waveModel->index(a.row()+1,a.column()),QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}
void MainWindow::on_btWaveUp_clicked()
{
wavePartModel->setCurrentWave(QModelIndex());
QModelIndex a = ui->tableWaves->selectionModel()->currentIndex();
waveModel->upWave(a);
ui->tableWaves->selectionModel()->setCurrentIndex(waveModel->index(a.row()-1,a.column()),QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}
void MainWindow::on_btWaveDown_clicked()
{
wavePartModel->setCurrentWave(QModelIndex());
QModelIndex a = ui->tableWaves->selectionModel()->currentIndex();
waveModel->downWave(a);
ui->tableWaves->selectionModel()->setCurrentIndex(waveModel->index(a.row()+1,a.column()),QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}

View File

@@ -14,6 +14,7 @@
#include "mapmodel.h"
#include "animationmodel.h"
#include "animlabel.h"
#include "wavemodel.h"
namespace Ui {
class MainWindow;
@@ -37,6 +38,8 @@ private:
TriggerModel* trigModel;
MapModel * mapModel;
AnimationModel * animModel;
WavePartModel * wavePartModel;
WaveModel * waveModel;
QGraphicsScene * mapScene;
//AnimLabel * alb;
@@ -109,12 +112,21 @@ private slots:
void lvSplashes_select(QModelIndex, QModelIndex);
void lvTriggers_select(QModelIndex, QModelIndex);
void lvMaps_select(QModelIndex, QModelIndex);
void tbWavePartSelect(QModelIndex, QModelIndex);
void on_cbAlRegeneration_toggled(bool checked);
void on_cbAlArmor_toggled(bool checked);
void on_cbSplCompisitionMode_currentIndexChanged(const QString &arg1);
void on_sbSplZValue_valueChanged(double arg1);
void on_sbSplAnimSpeed_valueChanged(double arg1);
void on_cbSplKeepOnAlien_toggled(bool checked);
void on_btWaveAddAlien_clicked();
void on_btWaveRemoveAlien_clicked();
void on_btWaveClear_clicked();
void on_pbWaveAdd_clicked();
void on_pbWaveDel_clicked();
void on_pbWaveCopy_clicked();
void on_btWaveUp_clicked();
void on_btWaveDown_clicked();
};
#endif // MAINWINDOW_H

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>598</width>
<height>497</height>
<width>1170</width>
<height>651</height>
</rect>
</property>
<property name="windowTitle">
@@ -47,7 +47,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>2</number>
<number>6</number>
</property>
<property name="movable">
<bool>true</bool>
@@ -1899,6 +1899,244 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tabWaves">
<attribute name="title">
<string>Waves</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_21">
<item>
<widget class="QSplitter" name="splitter_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_19">
<item>
<widget class="QTableView" name="tableWaves">
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_49">
<property name="spacing">
<number>5</number>
</property>
<item>
<widget class="QPushButton" name="pbWaveAdd">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbWaveCopy">
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btWaveUp">
<property name="text">
<string>...</string>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="arrowType">
<enum>Qt::UpArrow</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btWaveDown">
<property name="text">
<string>...</string>
</property>
<property name="iconSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="arrowType">
<enum>Qt::DownArrow</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pbWaveDel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QTableView" name="tableWaveParts">
<property name="dragDropMode">
<enum>QAbstractItemView::DropOnly</enum>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="cornerButtonEnabled">
<bool>false</bool>
</property>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
</widget>
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_20">
<item>
<widget class="QToolButton" name="btWaveAddAlien">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>80</height>
</size>
</property>
<property name="text">
<string>add</string>
</property>
<property name="arrowType">
<enum>Qt::LeftArrow</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btWaveRemoveAlien">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>80</height>
</size>
</property>
<property name="text">
<string>remove</string>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btWaveClear">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>
<height>80</height>
</size>
</property>
<property name="text">
<string>clear</string>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QListView" name="lvWaveAliens">
<property name="dragEnabled">
<bool>true</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::DragDrop</enum>
</property>
<property name="movement">
<enum>QListView::Snap</enum>
</property>
<property name="isWrapping" stdset="0">
<bool>true</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="layoutMode">
<enum>QListView::Batched</enum>
</property>
<property name="viewMode">
<enum>QListView::ListMode</enum>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>

332
ADeditor/wavemodel.cpp Normal file
View File

@@ -0,0 +1,332 @@
#include "wavemodel.h"
WavePartModel::WavePartModel(QHash<int, tbWave> &mwaves, QObject *parent) :
QAbstractTableModel(parent), waves(mwaves)
{
curWave = -1;
// wavelist = waves.values();
}
int WavePartModel::rowCount(const QModelIndex &) const
{
if (curWave==-1) return 0;
return waves[curWave].parts.size();
}
QVariant WavePartModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || (role != Qt::DisplayRole && role != Qt::EditRole)) return QVariant();
if (curWave==-1) return QVariant();
if (index.row() >= waves[curWave].parts.size()) return QVariant();
if (index.column() == 0)
return QVariant(tr("alien %1").arg(waves[curWave].parts.at(index.row()).alienId));
if (index.column() == 1)
return QVariant(waves[curWave].parts.at(index.row()).count);
return QVariant();
}
bool WavePartModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (role != Qt::EditRole) return false;
if (curWave==-1) return false;
if (index.row() >= waves[curWave].parts.size()) return false;
if (index.column() == 1)
{
waves[curWave].parts[index.row()].count = value.toInt();
return true;
}
return false;
}
//bool WaveModel::insertRows(int row, int count, const QModelIndex &parent)
//{
// beginInsertRows(parent,row+1,row+count);
// waves[curWave].parts.insert(row,count,tbWavePart );
// endInsertRows();
// return true;
//}
bool WavePartModel::removeRows(int row, int count, const QModelIndex &parent)
{
beginRemoveRows(parent,row,row+count);
waves[curWave].parts.remove(row,count);
endRemoveRows();
return true;
}
void WavePartModel::insertAlien(int alId)
{
//qDebug() << curWave;
if (curWave == -1) return;
for (int i=0; i<waves[curWave].parts.size(); i++)
{
if (waves[curWave].parts.at(i).alienId == alId)
{
waves[curWave].parts[i].count++;
emit dataChanged(index(0,0),index(rowCount()-1,1));
return;
}
}
tbWavePart p;
p.alienId = alId;
p.count = 1;
beginInsertRows(QModelIndex(),rowCount(),rowCount());
waves[curWave].parts.append(p);
endInsertRows();
}
void WavePartModel::setCurrentWave(QModelIndex a, QModelIndex b)
{
//qDebug() << a << b;
if (!a.isValid())
{
if (rowCount()>0)
{
beginRemoveRows(QModelIndex(),0,rowCount()-1);
curWave = -1;
endRemoveRows();
return;
}
curWave = -1;
return;
}
int wave = a.row();
int id = waves.values().at(wave).id;
int lc = waves[id].parts.size();
if (lc > rowCount()) {
beginInsertRows(QModelIndex(),rowCount(),lc-1);
curWave = id;
endInsertRows();
emit dataChanged(index(0,0),index(rowCount()-1,1));
return;
}
if (lc < rowCount()) {
beginRemoveRows(QModelIndex(),lc,rowCount()-1);
curWave = id;
endRemoveRows();
emit dataChanged(index(0,0),index(rowCount()-1,1));
return;
}
curWave = id;
emit dataChanged(index(0,0),index(rowCount()-1,1));
}
//QStringList WavePartModel::waveList()
//{
// QStringList strwavelist;
// for(int i=0; i<wavelist.size(); i++)
// strwavelist.append(tr("wave %1").arg(wavelist.at(i).id));
// return strwavelist;
//}
QVariant WaveModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid() || (role != Qt::DisplayRole && role != Qt::EditRole)) return QVariant();
if (index.row() >= values.size()) return QVariant();
switch (index.column())
{
case 0:
return QVariant(tr("wave %1").arg(values.at(index.row()).id));
case 1:
return QVariant(values.at(index.row()).prise);
case 2:
return QVariant(values.at(index.row()).timeout);
case 3:
return QVariant(values.at(index.row()).parts.size());
default:
return QVariant();
}
return QVariant();
}
QVariant WaveModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (orientation == Qt::Vertical || (role != Qt::DisplayRole && role != Qt::EditRole)) return QVariant();
switch (section)
{
case 0:
return QVariant(tr("#"));
case 1:
return QVariant(tr("prise"));
case 2:
return QVariant(tr("timeout"));
case 3:
return QVariant(tr("parts"));
default:
return QVariant();
}
return QVariant();
}
QVariant WavePartModel::headerData(int section, Qt::Orientation orientation, int role) const
{
if (orientation == Qt::Vertical || (role != Qt::DisplayRole && role != Qt::EditRole)) return QVariant();
switch (section)
{
case 0:
return QVariant(tr("alien"));
case 1:
return QVariant(tr("count"));
default:
return QVariant();
}
return QVariant();
}
bool WaveModel::setData(const QModelIndex &index, const QVariant &value, int role)
{
if (role != Qt::EditRole) return false;
if (index.row() >= values.size()) return false;
if (index.column() == 1)
{
waves[values.at(index.row()).id].prise = value.toInt();
refreshData();
return true;
}
if (index.column() == 2)
{
waves[values.at(index.row()).id].timeout = value.toInt();
refreshData();
return true;
}
return false;
}
void WaveModel::refreshData(bool inverse)
{
if (inverse)
{
emit needUpdateIndex();
waves.clear();
for (int i=0; i<values.size(); i++)
{
values[i].id = i+1;
waves.insert(values[i].id,values[i]);
}
} else {
values.clear();
values = waves.values();
}
emit dataChanged(index(0,0),index(rowCount()-1,columnCount()-1));
}
WaveModel::WaveModel(QHash<int, tbWave> &mwaves, QObject *parent) :
QAbstractTableModel(parent), waves(mwaves)
{
refreshData();
}
void WavePartModel::removeAlien(QModelIndex index)
{
if (!index.isValid()) return;
// for (int i=0; i<waves[curWave].parts.size(); i++)
// {
// if (waves[curWave].parts.at(i).alienId == alId)
// {
// waves[curWave].parts[i].count++;
// emit dataChanged(index(0,0),index(rowCount()-1,1));
// return;
// }
// }
int i = index.row();
beginRemoveRows(QModelIndex(),i,i);
waves[curWave].parts.remove(i);
endRemoveRows();
}
void WavePartModel::clearAliens()
{
if (rowCount() == 0) return;
beginRemoveRows(QModelIndex(),0,rowCount()-1);
waves[curWave].parts.clear();
endRemoveRows();
}
void WaveModel::addWave(QModelIndex a)
{
tbWave w;
w.id = 0;
w.prise = 0;
w.timeout = 10;
if (a.isValid())
{
beginInsertRows(QModelIndex(),a.row(),a.row());
values.insert(a.row()+1,w);
endInsertRows();
} else {
beginInsertRows(QModelIndex(),rowCount()-1,rowCount()-1);
values.append(w);
endInsertRows();
}
refreshData(true);
}
void WaveModel::copyWave(QModelIndex a)
{
if (a.isValid())
{
tbWave w = values.at(a.row());
beginInsertRows(QModelIndex(),a.row(),a.row());
values.insert(a.row()+1,w);
endInsertRows();
refreshData(true);
}
}
void WaveModel::removeWave(QModelIndex a)
{
if (a.isValid())
{
beginRemoveRows(QModelIndex(),a.row(),a.row());
values.removeAt(a.row());
endRemoveRows();
refreshData(true);
}
}
void WaveModel::upWave(QModelIndex a)
{
if (a.isValid())
{
if (a.row() == 0) return;
values.move(a.row(),a.row()-1);
refreshData(true);
}
}
void WaveModel::downWave(QModelIndex a)
{
if (a.isValid())
{
if (a.row() == rowCount()-1) return;
values.move(a.row(),a.row()+1);
refreshData(true);
}
}
void WavePartModel::updateIndex()
{
setCurrentWave(index(-1,-1));
}

78
ADeditor/wavemodel.h Normal file
View File

@@ -0,0 +1,78 @@
#ifndef WAVEMODEL_H
#define WAVEMODEL_H
#include <QAbstractTableModel>
#include <QMultiHash>
#include "../loader.h"
class WavePartModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit WavePartModel(QHash <int,tbWave> &waves, QObject *parent = 0);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent) const {return 2;}
//bool insertRows(int row, int count, const QModelIndex &parent);
bool removeRows(int row, int count, const QModelIndex &parent);
QVariant data(const QModelIndex &index, int role) const;
// void refresh(QList <tbAnimation> &anims);
Qt::ItemFlags flags(const QModelIndex &index) const {Qt::ItemFlags f = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
if (index.column()==1) f = f | Qt::ItemIsEditable;
return f;}
bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
// QStringList waveList();
public slots:
//void setLevel(int level) {this->level = level; dataChanged(index(0,0),index(rowCount()-1,1));}
void setCurrentWave(QModelIndex = QModelIndex(), QModelIndex b = QModelIndex());
void insertAlien(int alId);
void removeAlien(QModelIndex index);
void clearAliens();
void addWave() {int i=0; while(waves.contains(i)) i++;
tbWave w; w.id=i; w.prise=0; w.timeout=10; waves.insert(w.id,w);
setCurrentWave(index(waves.size()-1,0));}
void updateIndex();
private:
QHash <int,tbWave> &waves;
int curWave;
//int level;
};
class WaveModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit WaveModel(QHash <int,tbWave> &waves, QObject *parent = 0);
int rowCount(const QModelIndex &parent = QModelIndex()) const {return waves.size();}
int columnCount(const QModelIndex &parent = QModelIndex()) const {return 4;}
//bool insertRows(int row, int count, const QModelIndex &parent);
//bool removeRows(int row, int count, const QModelIndex &parent);
QVariant data(const QModelIndex &index, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const {Qt::ItemFlags f = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
if (index.column()==1||index.column()==2) f = f | Qt::ItemIsEditable;
return f;}
bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
public slots:
void addWave(QModelIndex a);
void copyWave(QModelIndex a);
void removeWave(QModelIndex a);
void upWave(QModelIndex a);
void downWave(QModelIndex a);
void refreshData(bool inverse = false);
private:
QHash <int,tbWave> &waves;
QList<tbWave> values;
signals:
void needUpdateIndex();
};
#endif // WAVEMODEL_H

27
AdServer/AdServer.pro Normal file
View File

@@ -0,0 +1,27 @@
#-------------------------------------------------
#
# Project created by QtCreator 2012-07-14T18:11:58
#
#-------------------------------------------------
QT += core gui network
TARGET = AdServer
TEMPLATE = app
SOURCES += main.cpp\
widget.cpp \
server.cpp \
connection.cpp \
client.cpp \
clientbase.cpp
HEADERS += widget.h \
server.h \
connection.h \
client.h \
clientbase.h \
message.h
FORMS += widget.ui

16
AdServer/client.cpp Normal file
View File

@@ -0,0 +1,16 @@
#include "client.h"
Client::Client(QObject *parent) :
ClientBase(parent)
{
m_socket = new QTcpSocket();
connect(m_socket,SIGNAL(readyRead()),this,SLOT(readData()));
connect(m_socket,SIGNAL(disconnected()),this,SLOT(Disconnection()));
}
void Client::connectToServer(QHostAddress addr)
{
m_socket->connectToHost(addr,44461);
}

25
AdServer/client.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef CLIENT_H
#define CLIENT_H
#include <QObject>
#include "clientbase.h"
class Client : public ClientBase
{
Q_OBJECT
public:
explicit Client(QObject *parent = 0);
void connectToServer(QHostAddress addr);
private:
signals:
public slots:
private slots:
};
#endif // CLIENT_H

66
AdServer/clientbase.cpp Normal file
View File

@@ -0,0 +1,66 @@
#include "clientbase.h"
ClientBase::ClientBase(QObject *parent) :
QObject(parent)
{
}
ClientBase::~ClientBase()
{
closeConnection();
delete m_socket;
}
void ClientBase::closeConnection()
{
m_socket->disconnectFromHost();
}
QString ClientBase::getStatus()
{
QString s;
switch (m_socket->state())
{
case QAbstractSocket::UnconnectedState :
s = trUtf8("not connected");
break;
case QAbstractSocket::HostLookupState :
s = trUtf8("loking for server...");
break;
case QAbstractSocket::ConnectingState :
s = trUtf8("connecting...");
break;
case QAbstractSocket::ConnectedState :
s = trUtf8("connected!");
break;
case QAbstractSocket::ClosingState :
s = trUtf8("disconnecting....");
break;
default:
s = trUtf8("error");
}
s += trUtf8(" to %1:%2").arg(m_socket->peerAddress().toString()).arg(m_socket->peerPort());
return s;
}
void ClientBase::send(const QByteArray &ba)
{
m_socket->write(ba);
}
void ClientBase::readData()
{
QByteArray ba = m_socket->readAll();
if (!ba.isEmpty()) emit receive(ba);
}
void ClientBase::Disconnection()
{
emit disconnected();
}

36
AdServer/clientbase.h Normal file
View File

@@ -0,0 +1,36 @@
#ifndef CLIENTBASE_H
#define CLIENTBASE_H
#include <QObject>
#include <QTcpSocket>
#include <QHostAddress>
#include <QByteArray>
#include "message.h"
class ClientBase : public QObject
{
Q_OBJECT
public:
explicit ClientBase(QObject *parent = 0);
~ClientBase();
void closeConnection();
QString getStatus();
void send(const QByteArray &ba);
public slots:
protected:
QTcpSocket * m_socket;
protected slots:
virtual void readData();
virtual void Disconnection();
signals:
void disconnected();
void receive(QByteArray ba);
};
#endif // CLIENTBASE_H

11
AdServer/connection.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include "connection.h"
Connection::Connection(int id, QTcpSocket *socket, QObject *parent) :
ClientBase(parent)
{
m_socket = socket;
m_id = id;
connect(m_socket,SIGNAL(readyRead()),this,SLOT(readData()));
connect(m_socket,SIGNAL(disconnected()),this,SLOT(Disconnection()));
}

24
AdServer/connection.h Normal file
View File

@@ -0,0 +1,24 @@
#ifndef CONNECTION_H
#define CONNECTION_H
#include <QObject>
#include "clientbase.h"
class Connection : public ClientBase
{
Q_OBJECT
public:
explicit Connection(int id, QTcpSocket * socket, QObject *parent = 0);
int Id() const {return m_id;}
private:
int m_id;
signals:
private slots:
};
#endif // CONNECTION_H

33
AdServer/main.cpp Normal file
View File

@@ -0,0 +1,33 @@
#include <QtGui/QApplication>
#include "widget.h"
//#include "stdafx.h"
#include "windows.h"
//#include "iostream.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Widget w;
w.show();
WCHAR NameBuffer[MAX_PATH];
WCHAR SysNameBuffer[MAX_PATH];
DWORD VSNumber;
DWORD MCLength;
DWORD FileSF;
char *x="D:\\";
WCHAR b[10];
swprintf(b, L"%S", x);
if (GetVolumeInformation(b,NameBuffer, sizeof(NameBuffer),
&VSNumber,&MCLength,&FileSF,SysNameBuffer,sizeof(SysNameBuffer)))
{
qDebug() << QString::fromWCharArray(NameBuffer);
qDebug() << QString::fromWCharArray(SysNameBuffer);
qDebug() << VSNumber;
}
return a.exec();
}

37
AdServer/message.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef MESSAGE_H
#define MESSAGE_H
#pragma pack (push, 1)
struct adMessageHeader
{
int type;
int player;
};
struct adMessagePing // type = 1
{
adMessageHeader header;
char name[32];
};
struct adMessagePong // type = 2
{
adMessageHeader header;
int playerId;
unsigned int seed;
};
struct adMessageText // type = 3
{
adMessageHeader header;
char text[256];
};
#pragma pack (pop)
#endif // MESSAGE_H

View File

@@ -0,0 +1,81 @@
/****************************************************************************
** Meta object code from reading C++ file 'client.h'
**
** Created: Tue 8. Jan 13:24:46 2013
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../client.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'client.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_Client[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
static const char qt_meta_stringdata_Client[] = {
"Client\0"
};
void Client::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
const QMetaObjectExtraData Client::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject Client::staticMetaObject = {
{ &ClientBase::staticMetaObject, qt_meta_stringdata_Client,
qt_meta_data_Client, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &Client::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *Client::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *Client::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_Client))
return static_cast<void*>(const_cast< Client*>(this));
return ClientBase::qt_metacast(_clname);
}
int Client::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = ClientBase::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE

View File

@@ -0,0 +1,116 @@
/****************************************************************************
** Meta object code from reading C++ file 'clientbase.h'
**
** Created: Tue 8. Jan 13:24:47 2013
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../clientbase.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'clientbase.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_ClientBase[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
2, // signalCount
// signals: signature, parameters, type, tag, flags
12, 11, 11, 11, 0x05,
30, 27, 11, 11, 0x05,
// slots: signature, parameters, type, tag, flags
50, 11, 11, 11, 0x09,
61, 11, 11, 11, 0x09,
0 // eod
};
static const char qt_meta_stringdata_ClientBase[] = {
"ClientBase\0\0disconnected()\0ba\0"
"receive(QByteArray)\0readData()\0"
"Disconnection()\0"
};
void ClientBase::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
ClientBase *_t = static_cast<ClientBase *>(_o);
switch (_id) {
case 0: _t->disconnected(); break;
case 1: _t->receive((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
case 2: _t->readData(); break;
case 3: _t->Disconnection(); break;
default: ;
}
}
}
const QMetaObjectExtraData ClientBase::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject ClientBase::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_ClientBase,
qt_meta_data_ClientBase, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &ClientBase::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *ClientBase::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *ClientBase::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_ClientBase))
return static_cast<void*>(const_cast< ClientBase*>(this));
return QObject::qt_metacast(_clname);
}
int ClientBase::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
}
return _id;
}
// SIGNAL 0
void ClientBase::disconnected()
{
QMetaObject::activate(this, &staticMetaObject, 0, 0);
}
// SIGNAL 1
void ClientBase::receive(QByteArray _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 1, _a);
}
QT_END_MOC_NAMESPACE

View File

@@ -0,0 +1,81 @@
/****************************************************************************
** Meta object code from reading C++ file 'connection.h'
**
** Created: Tue 8. Jan 13:24:45 2013
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../connection.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'connection.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_Connection[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
0, 0, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
0 // eod
};
static const char qt_meta_stringdata_Connection[] = {
"Connection\0"
};
void Connection::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
Q_UNUSED(_o);
Q_UNUSED(_id);
Q_UNUSED(_c);
Q_UNUSED(_a);
}
const QMetaObjectExtraData Connection::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject Connection::staticMetaObject = {
{ &ClientBase::staticMetaObject, qt_meta_stringdata_Connection,
qt_meta_data_Connection, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &Connection::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *Connection::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *Connection::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_Connection))
return static_cast<void*>(const_cast< Connection*>(this));
return ClientBase::qt_metacast(_clname);
}
int Connection::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = ClientBase::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
return _id;
}
QT_END_MOC_NAMESPACE

View File

@@ -0,0 +1,110 @@
/****************************************************************************
** Meta object code from reading C++ file 'server.h'
**
** Created: Tue 8. Jan 13:24:44 2013
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../server.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'server.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_Server[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
4, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
1, // signalCount
// signals: signature, parameters, type, tag, flags
11, 8, 7, 7, 0x05,
// slots: signature, parameters, type, tag, flags
35, 7, 7, 7, 0x08,
51, 7, 7, 7, 0x08,
70, 8, 7, 7, 0x08,
0 // eod
};
static const char qt_meta_stringdata_Server[] = {
"Server\0\0ba\0receiveData(QByteArray)\0"
"newConnection()\0connectionClosed()\0"
"received(QByteArray)\0"
};
void Server::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
Server *_t = static_cast<Server *>(_o);
switch (_id) {
case 0: _t->receiveData((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
case 1: _t->newConnection(); break;
case 2: _t->connectionClosed(); break;
case 3: _t->received((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
default: ;
}
}
}
const QMetaObjectExtraData Server::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject Server::staticMetaObject = {
{ &QObject::staticMetaObject, qt_meta_stringdata_Server,
qt_meta_data_Server, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &Server::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *Server::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *Server::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_Server))
return static_cast<void*>(const_cast< Server*>(this));
return QObject::qt_metacast(_clname);
}
int Server::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QObject::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 4)
qt_static_metacall(this, _c, _id, _a);
_id -= 4;
}
return _id;
}
// SIGNAL 0
void Server::receiveData(QByteArray _t1)
{
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
QMetaObject::activate(this, &staticMetaObject, 0, _a);
}
QT_END_MOC_NAMESPACE

View File

@@ -0,0 +1,115 @@
/****************************************************************************
** Meta object code from reading C++ file 'widget.h'
**
** Created: Tue 8. Jan 13:24:43 2013
** by: The Qt Meta Object Compiler version 63 (Qt 4.8.1)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "../widget.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'widget.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 63
#error "This file was generated using the moc from 4.8.1. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_Widget[] = {
// content:
6, // revision
0, // classname
0, 0, // classinfo
9, 14, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
0, // flags
0, // signalCount
// slots: signature, parameters, type, tag, flags
8, 7, 7, 7, 0x08,
33, 7, 7, 7, 0x08,
60, 7, 7, 7, 0x08,
86, 7, 7, 7, 0x08,
111, 7, 7, 7, 0x08,
134, 7, 7, 7, 0x08,
163, 160, 7, 7, 0x08,
185, 7, 7, 7, 0x08,
205, 7, 7, 7, 0x08,
0 // eod
};
static const char qt_meta_stringdata_Widget[] = {
"Widget\0\0on_bpSetServer_clicked()\0"
"on_bpStartServer_clicked()\0"
"on_pbStopServer_clicked()\0"
"on_pbSetClient_clicked()\0"
"on_pbConnect_clicked()\0on_pbDisconnect_clicked()\0"
"ba\0onReceive(QByteArray)\0on_bpSend_clicked()\0"
"on_leText_returnPressed()\0"
};
void Widget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
{
if (_c == QMetaObject::InvokeMetaMethod) {
Q_ASSERT(staticMetaObject.cast(_o));
Widget *_t = static_cast<Widget *>(_o);
switch (_id) {
case 0: _t->on_bpSetServer_clicked(); break;
case 1: _t->on_bpStartServer_clicked(); break;
case 2: _t->on_pbStopServer_clicked(); break;
case 3: _t->on_pbSetClient_clicked(); break;
case 4: _t->on_pbConnect_clicked(); break;
case 5: _t->on_pbDisconnect_clicked(); break;
case 6: _t->onReceive((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
case 7: _t->on_bpSend_clicked(); break;
case 8: _t->on_leText_returnPressed(); break;
default: ;
}
}
}
const QMetaObjectExtraData Widget::staticMetaObjectExtraData = {
0, qt_static_metacall
};
const QMetaObject Widget::staticMetaObject = {
{ &QWidget::staticMetaObject, qt_meta_stringdata_Widget,
qt_meta_data_Widget, &staticMetaObjectExtraData }
};
#ifdef Q_NO_DATA_RELOCATION
const QMetaObject &Widget::getStaticMetaObject() { return staticMetaObject; }
#endif //Q_NO_DATA_RELOCATION
const QMetaObject *Widget::metaObject() const
{
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
}
void *Widget::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_Widget))
return static_cast<void*>(const_cast< Widget*>(this));
return QWidget::qt_metacast(_clname);
}
int Widget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QWidget::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
if (_id < 9)
qt_static_metacall(this, _c, _id, _a);
_id -= 9;
}
return _id;
}
QT_END_MOC_NAMESPACE

80
AdServer/server.cpp Normal file
View File

@@ -0,0 +1,80 @@
#include "server.h"
Server::Server(QObject *parent) :
QObject(parent)
{
m_server = new QTcpServer(this);
next_conn_id = 1;
connect(m_server,SIGNAL(newConnection()),this,SLOT(newConnection()));
}
QStringList Server::getIpList()
{
QList<QHostAddress> list;
list = QNetworkInterface::allAddresses();
QStringList strl;
foreach(QHostAddress adr,list) {
if (adr.protocol() == QAbstractSocket::IPv4Protocol)
strl.append(adr.toString());
}
return strl;
}
void Server::startServer(QHostAddress a)
{
m_server->listen(a,44461);
}
void Server::stopServer()
{
m_server->close();
foreach (Connection * c, clients)
c->closeConnection();
}
QString Server::getStatus()
{
QString s;
if (m_server->isListening())
s = trUtf8("Running");
else
s = trUtf8("Stopped");
s += "\n";
foreach (Connection * c, clients)
s += "\n" + c->getStatus();
//s += trUtf8("Connections %1").arg(clients.size());
return s;
}
void Server::send(const QByteArray &ba)
{
foreach (Connection * c, clients)
c->send(ba);
}
void Server::newConnection()
{
clients.append(new Connection(next_conn_id, m_server->nextPendingConnection()));
connect(clients.last(),SIGNAL(disconnected()),this,SLOT(connectionClosed()));
connect(clients.last(),SIGNAL(receive(QByteArray)),this,SLOT(received(QByteArray)));
next_conn_id++;
}
void Server::connectionClosed()
{
sender()->deleteLater();
clients.removeOne((qobject_cast<Connection*>(sender())));
}
void Server::received(QByteArray ba)
{
emit receiveData(ba);
send(ba);
}

37
AdServer/server.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef SERVER_H
#define SERVER_H
#include <QObject>
#include <QTcpServer>
#include <QNetworkInterface>
#include <QStringList>
#include "connection.h"
class Server : public QObject
{
Q_OBJECT
public:
explicit Server(QObject *parent = 0);
QStringList getIpList();
void startServer(QHostAddress);
void stopServer();
QString getStatus();
void send(const QByteArray &ba);
private:
QTcpServer * m_server;
QList <Connection*> clients;
int next_conn_id;
private slots:
void newConnection();
void connectionClosed();
void received(QByteArray ba);
signals:
void receiveData(QByteArray ba);
};
#endif // SERVER_H

213
AdServer/ui_widget.h Normal file
View File

@@ -0,0 +1,213 @@
/********************************************************************************
** Form generated from reading UI file 'widget.ui'
**
** Created: Tue 8. Jan 13:24:36 2013
** by: Qt User Interface Compiler version 4.8.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_WIDGET_H
#define UI_WIDGET_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QComboBox>
#include <QtGui/QFrame>
#include <QtGui/QGridLayout>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QLineEdit>
#include <QtGui/QListWidget>
#include <QtGui/QPushButton>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_Widget
{
public:
QGridLayout *gridLayout;
QFrame *frameClient;
QVBoxLayout *verticalLayout_3;
QLineEdit *leIP;
QPushButton *pbConnect;
QPushButton *pbDisconnect;
QLabel *clienStatus;
QFrame *frameServer;
QVBoxLayout *verticalLayout;
QComboBox *cbIPList;
QPushButton *bpStartServer;
QPushButton *pbStopServer;
QLabel *serverStatus;
QListWidget *lwText;
QFrame *frameMain;
QVBoxLayout *verticalLayout_2;
QPushButton *bpSetServer;
QPushButton *pbSetClient;
QFrame *frameSend;
QHBoxLayout *horizontalLayout;
QLineEdit *leText;
QPushButton *bpSend;
void setupUi(QWidget *Widget)
{
if (Widget->objectName().isEmpty())
Widget->setObjectName(QString::fromUtf8("Widget"));
Widget->resize(474, 354);
gridLayout = new QGridLayout(Widget);
gridLayout->setSpacing(6);
gridLayout->setContentsMargins(11, 11, 11, 11);
gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
frameClient = new QFrame(Widget);
frameClient->setObjectName(QString::fromUtf8("frameClient"));
frameClient->setFrameShape(QFrame::StyledPanel);
frameClient->setFrameShadow(QFrame::Raised);
verticalLayout_3 = new QVBoxLayout(frameClient);
verticalLayout_3->setSpacing(6);
verticalLayout_3->setContentsMargins(11, 11, 11, 11);
verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
leIP = new QLineEdit(frameClient);
leIP->setObjectName(QString::fromUtf8("leIP"));
verticalLayout_3->addWidget(leIP);
pbConnect = new QPushButton(frameClient);
pbConnect->setObjectName(QString::fromUtf8("pbConnect"));
verticalLayout_3->addWidget(pbConnect);
pbDisconnect = new QPushButton(frameClient);
pbDisconnect->setObjectName(QString::fromUtf8("pbDisconnect"));
verticalLayout_3->addWidget(pbDisconnect);
clienStatus = new QLabel(frameClient);
clienStatus->setObjectName(QString::fromUtf8("clienStatus"));
verticalLayout_3->addWidget(clienStatus);
gridLayout->addWidget(frameClient, 1, 0, 1, 1);
frameServer = new QFrame(Widget);
frameServer->setObjectName(QString::fromUtf8("frameServer"));
frameServer->setFrameShape(QFrame::StyledPanel);
frameServer->setFrameShadow(QFrame::Raised);
verticalLayout = new QVBoxLayout(frameServer);
verticalLayout->setSpacing(6);
verticalLayout->setContentsMargins(11, 11, 11, 11);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
cbIPList = new QComboBox(frameServer);
cbIPList->setObjectName(QString::fromUtf8("cbIPList"));
verticalLayout->addWidget(cbIPList);
bpStartServer = new QPushButton(frameServer);
bpStartServer->setObjectName(QString::fromUtf8("bpStartServer"));
verticalLayout->addWidget(bpStartServer);
pbStopServer = new QPushButton(frameServer);
pbStopServer->setObjectName(QString::fromUtf8("pbStopServer"));
verticalLayout->addWidget(pbStopServer);
serverStatus = new QLabel(frameServer);
serverStatus->setObjectName(QString::fromUtf8("serverStatus"));
verticalLayout->addWidget(serverStatus);
gridLayout->addWidget(frameServer, 0, 0, 1, 1);
lwText = new QListWidget(Widget);
lwText->setObjectName(QString::fromUtf8("lwText"));
lwText->setProperty("isWrapping", QVariant(true));
lwText->setResizeMode(QListView::Adjust);
gridLayout->addWidget(lwText, 0, 2, 3, 1);
frameMain = new QFrame(Widget);
frameMain->setObjectName(QString::fromUtf8("frameMain"));
frameMain->setFrameShape(QFrame::StyledPanel);
frameMain->setFrameShadow(QFrame::Raised);
verticalLayout_2 = new QVBoxLayout(frameMain);
verticalLayout_2->setSpacing(6);
verticalLayout_2->setContentsMargins(11, 11, 11, 11);
verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
bpSetServer = new QPushButton(frameMain);
bpSetServer->setObjectName(QString::fromUtf8("bpSetServer"));
QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(bpSetServer->sizePolicy().hasHeightForWidth());
bpSetServer->setSizePolicy(sizePolicy);
verticalLayout_2->addWidget(bpSetServer);
pbSetClient = new QPushButton(frameMain);
pbSetClient->setObjectName(QString::fromUtf8("pbSetClient"));
sizePolicy.setHeightForWidth(pbSetClient->sizePolicy().hasHeightForWidth());
pbSetClient->setSizePolicy(sizePolicy);
verticalLayout_2->addWidget(pbSetClient);
gridLayout->addWidget(frameMain, 0, 1, 2, 1);
frameSend = new QFrame(Widget);
frameSend->setObjectName(QString::fromUtf8("frameSend"));
frameSend->setFrameShape(QFrame::StyledPanel);
frameSend->setFrameShadow(QFrame::Raised);
horizontalLayout = new QHBoxLayout(frameSend);
horizontalLayout->setSpacing(6);
horizontalLayout->setContentsMargins(11, 11, 11, 11);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
leText = new QLineEdit(frameSend);
leText->setObjectName(QString::fromUtf8("leText"));
horizontalLayout->addWidget(leText);
bpSend = new QPushButton(frameSend);
bpSend->setObjectName(QString::fromUtf8("bpSend"));
horizontalLayout->addWidget(bpSend);
gridLayout->addWidget(frameSend, 2, 0, 1, 2);
retranslateUi(Widget);
QMetaObject::connectSlotsByName(Widget);
} // setupUi
void retranslateUi(QWidget *Widget)
{
Widget->setWindowTitle(QApplication::translate("Widget", "Widget", 0, QApplication::UnicodeUTF8));
leIP->setText(QApplication::translate("Widget", "127.0.0.1", 0, QApplication::UnicodeUTF8));
pbConnect->setText(QApplication::translate("Widget", "Connect", 0, QApplication::UnicodeUTF8));
pbDisconnect->setText(QApplication::translate("Widget", "Disconnect", 0, QApplication::UnicodeUTF8));
clienStatus->setText(QApplication::translate("Widget", "TextLabel", 0, QApplication::UnicodeUTF8));
bpStartServer->setText(QApplication::translate("Widget", "Start server", 0, QApplication::UnicodeUTF8));
pbStopServer->setText(QApplication::translate("Widget", "Stop server", 0, QApplication::UnicodeUTF8));
serverStatus->setText(QApplication::translate("Widget", "TextLabel", 0, QApplication::UnicodeUTF8));
bpSetServer->setText(QApplication::translate("Widget", "Server", 0, QApplication::UnicodeUTF8));
pbSetClient->setText(QApplication::translate("Widget", "client", 0, QApplication::UnicodeUTF8));
bpSend->setText(QApplication::translate("Widget", "Send", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class Widget: public Ui_Widget {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_WIDGET_H

93
AdServer/widget.cpp Normal file
View File

@@ -0,0 +1,93 @@
#include "widget.h"
#include "ui_widget.h"
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
ui->setupUi(this);
ui->frameClient->setVisible(false);
ui->frameServer->setVisible(false);
ui->frameSend->setVisible(false);
ui->lwText->setVisible(false);
server = new Server();
client = new Client();
ui->cbIPList->addItems(server->getIpList());
startTimer(40);
}
Widget::~Widget()
{
delete ui;
}
void Widget::timerEvent(QTimerEvent *)
{
ui->serverStatus->setText(server->getStatus());
ui->clienStatus->setText(client->getStatus());
}
void Widget::on_bpSetServer_clicked()
{
ui->frameServer->setVisible(true);
ui->lwText->setVisible(true);
ui->frameMain->setVisible(false);
// ui->frameSend->setVisible(true);
connect(server,SIGNAL(receiveData(QByteArray)),this,SLOT(onReceive(QByteArray)));
}
void Widget::on_bpStartServer_clicked()
{
server->startServer(QHostAddress(ui->cbIPList->currentText()));
}
void Widget::on_pbStopServer_clicked()
{
server->stopServer();
}
void Widget::on_pbSetClient_clicked()
{
ui->frameClient->setVisible(true);
ui->lwText->setVisible(true);
ui->frameMain->setVisible(false);
ui->frameSend->setVisible(true);
connect(client,SIGNAL(receive(QByteArray)),this,SLOT(onReceive(QByteArray)));
}
void Widget::on_pbConnect_clicked()
{
client->connectToServer(QHostAddress(ui->leIP->text()));
}
void Widget::on_pbDisconnect_clicked()
{
client->closeConnection();
}
void Widget::onReceive(QByteArray ba)
{
ui->lwText->addItem(QString::fromUtf8(ba.data(),ba.size()));
}
void Widget::on_bpSend_clicked()
{
QByteArray ba = ui->leText->text().toUtf8();
client->send(ba);
}
void Widget::on_leText_returnPressed()
{
on_bpSend_clicked();
}

48
AdServer/widget.h Normal file
View File

@@ -0,0 +1,48 @@
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include "server.h"
#include "client.h"
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
~Widget();
private slots:
void on_bpSetServer_clicked();
void on_bpStartServer_clicked();
void on_pbStopServer_clicked();
void on_pbSetClient_clicked();
void on_pbConnect_clicked();
void on_pbDisconnect_clicked();
void onReceive(QByteArray ba);
void on_bpSend_clicked();
void on_leText_returnPressed();
private:
Ui::Widget *ui;
Server * server;
Client * client;
void timerEvent(QTimerEvent *);
};
#endif // WIDGET_H

168
AdServer/widget.ui Normal file
View File

@@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Widget</class>
<widget class="QWidget" name="Widget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>474</width>
<height>354</height>
</rect>
</property>
<property name="windowTitle">
<string>Widget</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<widget class="QFrame" name="frameClient">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLineEdit" name="leIP">
<property name="text">
<string>127.0.0.1</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbConnect">
<property name="text">
<string>Connect</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbDisconnect">
<property name="text">
<string>Disconnect</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="clienStatus">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QFrame" name="frameServer">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QComboBox" name="cbIPList"/>
</item>
<item>
<widget class="QPushButton" name="bpStartServer">
<property name="text">
<string>Start server</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbStopServer">
<property name="text">
<string>Stop server</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="serverStatus">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="2" rowspan="3">
<widget class="QListWidget" name="lwText">
<property name="isWrapping" stdset="0">
<bool>true</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
</widget>
</item>
<item row="0" column="1" rowspan="2">
<widget class="QFrame" name="frameMain">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="bpSetServer">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Server</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbSetClient">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>client</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QFrame" name="frameSend">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="leText"/>
</item>
<item>
<widget class="QPushButton" name="bpSend">
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>

View File

@@ -27,6 +27,7 @@ AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(paren
mapimg = new QImage(data->map->rect().size()*cellSize,QImage::Format_ARGB32);
//setDragMode(RubberBandDrag);
QPainter p(mapimg);
p.setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing);
for (int i=0; i<data->map->cells().size(); i++) {
for (int j=0; j<data->map->cells().at(i).size(); j++) {
QPen pen;
@@ -42,8 +43,8 @@ AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(paren
}
if (cel >= Map::Free || (cel <= Map::PlayerTower && cel !=Map::Wall))
{
pen.setColor(QColor(qAbs(cel+2)*345%255,(qAbs(cel+2)*721)%255,(qAbs(cel+2)*75)%255,150));
brush.setColor(QColor(qAbs(cel+2)*345%255,(qAbs(cel+2)*721)%255,(qAbs(cel+2)*75)%255,80));
pen.setColor(QColor(qAbs(cel+2)*345%100,(qAbs(cel+2)*721)%100,(qAbs(cel+2)*75)%100).lighter());
brush.setColor(QColor(qAbs(cel+2)*345%255,(qAbs(cel+2)*721)%255,(qAbs(cel+2)*75)%255).lighter());
}
p.setPen(pen);
p.setBrush(brush);
@@ -52,10 +53,11 @@ AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(paren
}
p.end();
scene->setSceneRect(mapimg->rect());
scene->setBackgroundBrush(*mapimg);
//scene->setBackgroundBrush(*mapimg);
setCacheMode(QGraphicsView::CacheBackground);
setRenderHints(QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing);
resize(mapimg->size());
m_scale.reset();
startTimer(50);
}
@@ -70,22 +72,22 @@ AD_Graphics::~AD_Graphics()
void AD_Graphics::mousePressEvent(QMouseEvent *event)
{
// scene->clearSelection();
// scene->clearSelection();
if (event->button() == Qt::LeftButton)
{
if (m_building)
emit add_tow((QPointF(event->pos())/cellSize).toPoint(),
emit add_tow((QPointF(mapToScene(event->pos())/cellSize).toPoint()),
event->modifiers().testFlag(Qt::ShiftModifier));
else
{
QList<QGraphicsItem*> list = scene->items(event->pos(), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder);
QList<QGraphicsItem*> list = scene->items(mapToScene(event->pos()), Qt::IntersectsItemBoundingRect, Qt::AscendingOrder);
ADItem * al = 0;
foreach(QGraphicsItem* x, list)
{
ADItem * i = qgraphicsitem_cast<ADItem*>(x);
if (i->itemType() == ADItem::Tower)
{
// i->setSelected(true);
// i->setSelected(true);
select_tow = i;
emit selected_tower_changed(i->tid());
return;
@@ -97,7 +99,7 @@ void AD_Graphics::mousePressEvent(QMouseEvent *event)
}
if (al != 0)
{
// al->setSelected(true);
// al->setSelected(true);
select_al = al;
core->addata->players.at(0)->selectAlienId = select_al->id();
return;
@@ -130,17 +132,38 @@ void AD_Graphics::timerEvent(QTimerEvent * )
selection_al->next();
if (core->isWaveEnd())
scene->update();
QList<int> moneyitemsdeads;
for(int i=0; i<moneyitems.size(); i++)
{
float op = moneyitems[i]->opacity();
moneyitems[i]->setOpacity(op - (1-op*0.999));
moneyitems[i]->moveBy(0.2,-0.4);
moneyitems[i]->setScale(moneyitems[i]->scale()+0.1);
if (op < 0.1)
{
moneyitemsdeads.append(i);
}
}
for (int i=0; i<moneyitemsdeads.size(); i++)
{
//scene->removeItem(moneyitems[i]);
delete moneyitems[moneyitemsdeads.at(i)];
//moneyitems.removeAt(moneyitemsdeads.at(i));
}
}
void AD_Graphics::drawBackground(QPainter * p, const QRectF & )
void AD_Graphics::drawBackground(QPainter * p, const QRectF & r)
{
p->setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing);
p->fillRect(r,Qt::black);
p->drawImage(0,0,*mapimg);
}
void AD_Graphics::drawForeground(QPainter *p, const QRectF &rect)
{
p->setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing);
QList <QGraphicsItem *> l = scene->items();
foreach(QGraphicsItem * g,l)
{
@@ -160,8 +183,15 @@ void AD_Graphics::drawForeground(QPainter *p, const QRectF &rect)
if (focus_item->itemType() == ADItem::Tower)
{
float r = core->addata->curTowers[focus_item->tid()].src->radius*cellSize;
p->setPen(Qt::black);
p->setBrush(Qt::NoBrush);
QPen pen;
QBrush b;
b.setStyle(Qt::SolidPattern);
b.setColor(QColor(100,240,100,80));
pen.setColor(QColor(240,50,50,100));
pen.setStyle(Qt::DashDotLine);
pen.setWidthF(2.5);
p->setPen(pen);
p->setBrush(b);
p->drawEllipse(focus_item->pos(), r, r);
}
}
@@ -170,27 +200,55 @@ void AD_Graphics::drawForeground(QPainter *p, const QRectF &rect)
void AD_Graphics::mouseMoveEvent(QMouseEvent *event)
{
QList<QGraphicsItem * > li = scene->items(event->pos(), Qt::IntersectsItemBoundingRect, Qt::DescendingOrder);
QList<QGraphicsItem * > li = scene->items(mapToScene(event->pos()), Qt::IntersectsItemBoundingRect, Qt::DescendingOrder);
foreach (QGraphicsItem * i, li) {
if (qgraphicsitem_cast<ADItem *>(i)->itemType() == ADItem::Tower) {
focus_item = qgraphicsitem_cast<ADItem *>(i);
// selection_tow->setPos(focus_item->pos());
// selection_tow->show();
// selection_tow->setPos(focus_item->pos());
// selection_tow->show();
return;
}
}
// selection_tow->hide();
// selection_tow->hide();
focus_item = 0;
}
void AD_Graphics::alienKilled(int id)
void AD_Graphics::alienKilled(int id, bool missed)
{
if (select_al != 0) if (select_al->id() == id) select_al = 0;
QPointF alpos = core->addata->aliens->curAliens[id].pos;
if (missed)
{
MoneyItem * lm = new MoneyItem();
lm->setPos(QPointF(mapimg->width()/2+qrand()%20,mapimg->height()/2+qrand()%20));
lm->setText("missed");
lm->setColor(Qt::red);
lm->setScale(5);
moneyitems.append(lm);
scene->addItem(lm);
return;
}
QPainter p(mapimg);
p.setCompositionMode(QPainter::CompositionMode_Plus);
p.translate((core->addata->aliens->curAliens[id].pos+QPointF(0.5,0.5))*cellSize);
//p.setCompositionMode(QPainter::CompositionMode_Plus);
p.translate((alpos+QPointF(0.5,0.5))*cellSize);
p.rotate(qrand()%90);
p.drawImage(core->addata->bloodrect, *(core->addata->blood));
p.end();
resetCachedContent();
MoneyItem * m = new MoneyItem();
m->setPos(alpos*cellSize);
m->setMoney(core->addata->aliens->curAliens[id].src->prise);
moneyitems.append(m);
scene->addItem(m);
}
void AD_Graphics::resizeEvent(QResizeEvent *event)
{
m_scale.reset();
float f = static_cast<float>(qMin(event->size().width(),event->size().height()))/mapimg->size().width();
m_scale.scale(f,f);
setTransform(m_scale);
repaint();
}

View File

@@ -7,6 +7,7 @@
#include <QEasingCurve>
#include "adcore.h"
#include "moneyitem.h"
class AD_Graphics: public QGraphicsView
@@ -23,7 +24,7 @@ public:
public slots:
void selectTower(ADItem * item) {select_tow = item;}
void setBuilding(bool arg) {m_building = arg;}
void alienKilled(int id);
void alienKilled(int id, bool missed);
void towerKilled(QPoint id) {focus_item = 0; if (select_tow != 0) if (select_tow->tid() == id) {select_tow = 0; emit selected_tower_changed(QPoint());}}
private:
@@ -31,6 +32,7 @@ private:
void drawForeground(QPainter *painter, const QRectF &rect);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void resizeEvent(QResizeEvent *event);
QGraphicsScene * scene;
AD_Core * core;
@@ -42,7 +44,9 @@ private:
ADItem * selection_tow;
ADItem * selection_al;
QEasingCurve color_curve;
// QList<MoneyItem*> moneyitems;
QTransform m_scale;
bool m_building;
protected:

View File

@@ -88,7 +88,10 @@ void AD_Core::waveProcessing()
void AD_Core::killAlien(int playerId, int alienId)
{
addata->players[playerId]->money += addata->aliens->curAliens[alienId].src->prise;
// qDebug() << playerId << alienId;
Player * pl = addata->players[playerId];
pl->money += addata->aliens->curAliens[alienId].src->prise;
pl->stats.killed_aliens++;
addata->aliens->delAlien(alienId);
}

View File

@@ -11,7 +11,9 @@ HEADERS += base_types.h \
form.h \
aditem.h \
touchbuttframe.h \
touch_butt.h
touch_butt.h \
statuswidget.h \
moneyitem.h
SOURCES += map.cpp \
game_data.cpp \
aliens.cpp \
@@ -25,7 +27,9 @@ SOURCES += map.cpp \
form.cpp \
aditem.cpp \
touchbuttframe.cpp \
touch_butt.cpp
touch_butt.cpp \
statuswidget.cpp \
moneyitem.cpp
RESOURCES += images.qrc
OTHER_FILES += schema.xml \
data2.xml
@@ -38,3 +42,7 @@ QT += core \
FORMS += \
form.ui

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.3.0, 2011-09-11T13:14:34. -->
<!-- Written by QtCreator 3.0.1, 2014-05-06T13:57:25. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -11,139 +11,110 @@
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">false</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="bool" key="AlignAssignments">true</value>
<value type="QString" key="CurrentFallback">CppProject</value>
<value type="bool" key="ExtraPaddingForConditionsIfConfusingAlign">false</value>
<value type="bool" key="IndentAccessSpecifiers">false</value>
<value type="bool" key="IndentBlockBody">true</value>
<value type="bool" key="IndentBlockBraces">false</value>
<value type="bool" key="IndentBlocksRelativeToSwitchLabels">false</value>
<value type="bool" key="IndentClassBraces">false</value>
<value type="bool" key="IndentControlFlowRelativeToSwitchLabels">false</value>
<value type="bool" key="IndentDeclarationsRelativeToAccessSpecifiers">true</value>
<value type="bool" key="IndentEnumBraces">false</value>
<value type="bool" key="IndentFunctionBody">true</value>
<value type="bool" key="IndentFunctionBraces">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>
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">1</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="QString" key="EditorConfiguration.CurrentFallback">Project</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</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="int" key="EditorConfiguration.SmartBackspaceBehavior">0</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.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</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>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{3afe59ac-faaf-4693-8ea4-2d027b7a8039}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Mingw:D:/QtSDK/mingw/bin/mingw32-g++.exe.x86-windows-msys-pe-32bit.D:/QtSDK/pythongdb/python_2.7based/gdb-i686-pc-mingw32.exe</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/build-aliendefender-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.7.4 for Desktop - MinGW 4.4 (Qt SDK) Отладка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Выпуск</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Mingw:D:/QtSDK/mingw/bin/mingw32-g++.exe.x86-windows-msys-pe-32bit.D:/QtSDK/pythongdb/python_2.7based/gdb-i686-pc-mingw32.exe</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">D:/build-aliendefender-Desktop-d</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
@@ -153,134 +124,77 @@
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.7.4 for Desktop - MinGW 4.4 (Qt SDK) Релиз</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">d</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Установка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Без установки</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Без установки</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Локальная установка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">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="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">aliendefender</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:D:/aliendefender/aliendefender.pro</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.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
@@ -291,10 +205,10 @@
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{4b0390db-ed56-4643-8092-f257ef99d7b5}</value>
<value type="QByteArray">{d4869220-1aa4-4b0e-aa71-93573ae12656}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">10</value>
<value type="int">15</value>
</data>
</qtcreator>

View File

@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.4.1, 2012-12-15T21:33:18. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -7,166 +9,245 @@
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value key="EditorConfiguration.AutoIndent" type="bool">true</value>
<value key="EditorConfiguration.AutoSpacesForTabs" type="bool">false</value>
<value key="EditorConfiguration.Codec" type="QByteArray">System</value>
<value key="EditorConfiguration.DoubleIndentBlocks" type="bool">false</value>
<value key="EditorConfiguration.IndentBraces" type="bool">false</value>
<value key="EditorConfiguration.IndentSize" type="int">4</value>
<value key="EditorConfiguration.MouseNavigation" type="bool">true</value>
<value key="EditorConfiguration.PaddingMode" type="int">1</value>
<value key="EditorConfiguration.ScrollWheelZooming" type="bool">true</value>
<value key="EditorConfiguration.SmartBackspace" type="bool">false</value>
<value key="EditorConfiguration.SpacesForTabs" type="bool">false</value>
<value key="EditorConfiguration.TabKeyBehavior" type="int">0</value>
<value key="EditorConfiguration.TabSize" type="int">4</value>
<value key="EditorConfiguration.UseGlobal" type="bool">true</value>
<value key="EditorConfiguration.Utf8BomBehavior" type="int">1</value>
<value key="EditorConfiguration.addFinalNewLine" type="bool">true</value>
<value key="EditorConfiguration.cleanIndentation" type="bool">true</value>
<value key="EditorConfiguration.cleanWhitespace" type="bool">true</value>
<value key="EditorConfiguration.inEntireDocument" type="bool">false</value>
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QString" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">System</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</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="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">false</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">4</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</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">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
<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>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
<value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Mingw:D:/QtSDK/mingw/bin/mingw32-g++.exe.x86-windows-msys-pe-32bit.D:/QtSDK/pythongdb/python_2.7based/gdb-i686-pc-mingw32.exe</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString">clean</value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Debug</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</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 key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.1 for Desktop - MinGW (Qt SDK) Релиз</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/andrey/aliendefender</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">3</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
<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>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<value key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary" type="bool">false</value>
<value key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QString"></value>
<value key="QtProjectManager.QMakeBuildStep.QMakeForced" type="bool">false</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Mingw:D:/QtSDK/mingw/bin/mingw32-make.exe.x86-windows-msys-pe-32bit.D:/QtSDK/pythongdb/python_2.7based/gdb-i686-pc-mingw32.exe</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Build</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<value key="Qt4ProjectManager.MakeStep.MakeArguments" type="QString"></value>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Сборка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Clean</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Очистка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Release</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</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 key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.1 for Desktop - MinGW (Qt SDK) Отладка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/andrey/aliendefender</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">3</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
</valuemap>
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
<valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Установка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Deploy</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Установка</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Без установки</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Без установки</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Без установки</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName" type="QString">Конфигурация запуска Qt4</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">aliendefender</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QString"></value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">aliendefender.pro</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
<value key="RunConfiguration.QmlDebugServerPort" type="uint">3768</value>
<value key="RunConfiguration.UseCppDebugger" type="bool">true</value>
<value key="RunConfiguration.UseQmlDebugger" type="bool">false</value>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">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">aliendefender</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></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>
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
@@ -175,10 +256,10 @@
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{0f364aaa-5a2f-49c5-b7a5-6b296e2f6fd0}</value>
<value type="QString">{8144fe46-f732-4d02-8f44-6da2f1f5dd44}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">9</value>
<value type="int">10</value>
</data>
</qtcreator>

View File

@@ -60,7 +60,7 @@ void Aliens::retrace(bool * OK)
void Aliens::delAlien(int id, bool missed)
{
emit alien_killed(id);
emit alien_killed(id,missed);
if (missed)
{
m_missingAliens++;

View File

@@ -20,7 +20,7 @@ public:
int missingAliens() {return m_missingAliens;}
signals:
void alien_killed(int id);
void alien_killed(int id, bool missed);
public slots:
void delAlien(int id, bool missed = false);

View File

@@ -42,6 +42,15 @@ struct srcAlienType
struct AlienType
{
AlienType ()
{
id = -1;
src = 0;
pos = QPointF();
wave = -1;
item = 0;
}
int id; // uses for QHash
int wave;
srcAlienType * src;
@@ -117,7 +126,7 @@ struct srcTowerType
QString name;
QImage * image;
int imgType;
int PlayerId; // tower's owner
//int PlayerId; // tower's owner
unsigned int cost;
unsigned int reload;
unsigned int buildTime;

317
data2.xml
View File

@@ -1,88 +1,161 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data>
<ADdata>
<aliens>
<alien speed="0.05" imageType="1" prise="2" id="1" score="12" name="Monstr 1" health="15"/>
<alien speed="0.1" imageType="1" prise="5" id="2" score="99" name="monstr 2" health="30"/>
<alien speed="0.05" imageType="1" prise="15" id="3" score="99" name="monstr 3" health="100"/>
<alien speed="0.02" imageType="1" prise="100" id="4" score="10" name="test" health="1000"/>
<alien speed="0.15" imageType="1" prise="25" armor="9" id="5" score="99" name="super monstr" health="400"/>
<alien regeneration="20" speed="0.07" imageType="1" prise="100" id="6" score="10" name="test" health="4000"/>
<alien speed="0.05" imageType="1" prise="1" id="1" score="12" name="Monstr 1" health="15"/>
<alien speed="0.08" imageType="1" prise="2" id="2" score="99" name="monstr 2" health="30"/>
<alien speed="0.05" imageType="1" prise="3" id="3" score="99" name="monstr 3" health="100"/>
<alien speed="0.04" imageType="1" prise="25" id="4" score="10" name="boss 1" health="1000"/>
<alien speed="0.15" imageType="1" prise="10" armor="9" id="5" score="99" name="super monstr 400" health="400"/>
<alien speed="0.07" imageType="1" prise="5" id="6" score="10" name="test 10k" health="10000"/>
<alien flying="true" speed="0.1" imageType="1" prise="4" id="7" score="1" name="monstr 4" health="160"/>
<alien flying="true" speed="0.2" imageType="12" prise="0" id="8" score="1" name="Монстр 2 fast" health="30"/>
<alien flying="true" speed="0.06" imageType="12" prise="0" id="9" score="1" name="Монстр 4" health="300"/>
<alien flying="true" speed="0.6" imageType="12" prise="0" id="10" score="1" name="Монстр 5" health="500"/>
<alien flying="true" speed="0.15" imageType="12" prise="0" id="11" score="1" name="Монстр 5 fast" health="200"/>
</aliens>
<maps>
<map width="16" imageType="10" height="16" id="1" data="AAAERHicY2BgEGAA4v///0hQgmFmAGlGcjCxZuCTHzUDuxkMDOr85JrBwKC0A8kMJlwYagYOeYgZ+NXgNwMtPEbNINIMIsynOO8DAG0r1Q0=" name="My Map" maxPlayers="2"/>
<map width="30" imageType="20" height="20" id="2" data="AAAJ3HicY2BgkGNgYBD5//+PBDGYgUGdnzh1EDOBNCM1MKlmEqNu1MxRM0fNHNxmgsobapnJwKC0Yyj5fdTMUTNHzRzaZpJgLwltMKUdxKgDADpycNA=" name="map2" maxPlayers="1"/>
<map width="25" imageType="20" height="11" id="3" data="AAAEtHicY2BgkGRgYOD+//+PBDpmYFDnxy4OUQ+kGQnhUfWj6kfVj6onRj1mOaO0A5s4ADeqzbA=" name="map" maxPlayers="1"/>
<map width="32" imageType="20" height="32" id="4" data="AAAQhHic7dc7CsAgFETRyQpsLYON++9cnOCHEDCWAfUVt7gIrzowlZJutUrJfkyKrjffV/Ua2nudCMPX8OyPwcIWGDBgwIABAwYMGDD8KyQMNrawZtjzx+/bhzTfK5A1cBw=" name="FirstMap" maxPlayers="1"/>
</maps>
<waves>
<wave prise="0" timeout="30" id="1"/>
<wave prise="0" timeout="30" id="2"/>
<wave prise="0" timeout="20" id="3"/>
<wave prise="0" timeout="30" id="4"/>
<wave prise="0" timeout="10" id="5"/>
<wave prise="0" timeout="20" id="6"/>
<wave prise="0" timeout="5" id="7"/>
<wave prise="0" timeout="20" id="8"/>
<wave prise="0" timeout="10" id="9"/>
<wave prise="0" timeout="10" id="10"/>
<wave prise="0" timeout="10" id="11"/>
<wave prise="0" timeout="10" id="12"/>
<wave prise="0" timeout="10" id="13"/>
<wave prise="0" timeout="10" id="14"/>
<wave prise="0" timeout="10" id="16"/>
<wave prise="0" timeout="10" id="17"/>
<wave prise="0" timeout="10" id="18"/>
<wave prise="0" timeout="10" id="19"/>
<wave prise="0" timeout="10" id="20"/>
<wave prise="0" timeout="10" id="21"/>
<wave prise="0" timeout="10" id="22"/>
<wave prise="0" timeout="10" id="23"/>
<wave prise="0" timeout="10" id="24"/>
<wave prise="0" timeout="10" id="25"/>
<wave prise="0" timeout="10" id="26"/>
<wave prise="0" timeout="10" id="27"/>
<wave prise="0" timeout="3" id="28"/>
<wave prise="0" timeout="5" id="29"/>
<wave prise="0" timeout="1" id="30"/>
<wave prise="0" timeout="10" id="1">
<wavePart alien="1" count="5"/>
</wave>
<wave prise="0" timeout="10" id="2">
<wavePart alien="1" count="8"/>
</wave>
<wave prise="0" timeout="8" id="3">
<wavePart alien="1" count="10"/>
</wave>
<wave prise="0" timeout="10" id="4">
<wavePart alien="2" count="10"/>
</wave>
<wave prise="0" timeout="4" id="5">
<wavePart alien="1" count="25"/>
</wave>
<wave prise="0" timeout="10" id="6">
<wavePart alien="2" count="10"/>
<wavePart alien="1" count="10"/>
</wave>
<wave prise="0" timeout="10" id="7">
<wavePart alien="3" count="3"/>
</wave>
<wave prise="0" timeout="20" id="8">
<wavePart alien="7" count="4"/>
</wave>
<wave prise="0" timeout="15" id="9">
<wavePart alien="2" count="10"/>
<wavePart alien="8" count="10"/>
</wave>
<wave prise="0" timeout="10" id="10">
<wavePart alien="2" count="5"/>
<wavePart alien="3" count="5"/>
</wave>
<wave prise="0" timeout="15" id="11">
<wavePart alien="7" count="3"/>
</wave>
<wave prise="0" timeout="10" id="12">
<wavePart alien="7" count="10"/>
</wave>
<wave prise="0" timeout="10" id="13">
<wavePart alien="4" count="1"/>
</wave>
<wave prise="0" timeout="4" id="14">
<wavePart alien="3" count="10"/>
<wavePart alien="2" count="10"/>
<wavePart alien="10" count="11"/>
</wave>
<wave prise="0" timeout="4" id="15">
<wavePart alien="10" count="10"/>
<wavePart alien="11" count="5"/>
</wave>
<wave prise="0" timeout="10" id="16">
<wavePart alien="4" count="5"/>
</wave>
<wave prise="0" timeout="10" id="17">
<wavePart alien="4" count="10"/>
<wavePart alien="11" count="3"/>
</wave>
<wave prise="0" timeout="10" id="18">
<wavePart alien="5" count="1"/>
<wavePart alien="11" count="1"/>
</wave>
<wave prise="0" timeout="5" id="19">
<wavePart alien="7" count="20"/>
</wave>
<wave prise="0" timeout="10" id="20">
<wavePart alien="5" count="3"/>
</wave>
<wave prise="0" timeout="10" id="21">
<wavePart alien="5" count="10"/>
</wave>
<wave prise="0" timeout="4" id="22">
<wavePart alien="1" count="10"/>
<wavePart alien="2" count="10"/>
<wavePart alien="3" count="10"/>
<wavePart alien="8" count="9"/>
<wavePart alien="7" count="4"/>
<wavePart alien="9" count="5"/>
<wavePart alien="10" count="5"/>
<wavePart alien="11" count="5"/>
</wave>
<wave prise="0" timeout="10" id="23">
<wavePart alien="6" count="1"/>
</wave>
<wave prise="0" timeout="10" id="24">
<wavePart alien="5" count="7"/>
</wave>
<wave prise="0" timeout="10" id="25">
<wavePart alien="5" count="5"/>
</wave>
<wave prise="0" timeout="3" id="26">
<wavePart alien="5" count="30"/>
</wave>
<wave prise="0" timeout="5" id="27">
<wavePart alien="10" count="100"/>
</wave>
<wave prise="0" timeout="1" id="28">
<wavePart alien="11" count="100"/>
</wave>
<wave prise="0" timeout="2" id="29">
<wavePart alien="5" count="6"/>
<wavePart alien="6" count="6"/>
</wave>
<wave prise="0" timeout="1" id="30">
<wavePart alien="6" count="33"/>
</wave>
<wave prise="0" timeout="10" id="31">
<wavePart alien="2" count="90"/>
<wavePart alien="3" count="90"/>
<wavePart alien="6" count="1"/>
</wave>
<wave prise="0" timeout="10" id="32">
<wavePart alien="2" count="90"/>
<wavePart alien="3" count="90"/>
<wavePart alien="6" count="1"/>
</wave>
<wave prise="0" timeout="10" id="33">
<wavePart alien="2" count="90"/>
<wavePart alien="3" count="90"/>
<wavePart alien="6" count="1"/>
</wave>
<wave prise="0" timeout="10" id="34">
<wavePart alien="2" count="90"/>
<wavePart alien="3" count="90"/>
<wavePart alien="6" count="1"/>
</wave>
<wave prise="0" timeout="10" id="35">
<wavePart alien="2" count="90"/>
<wavePart alien="3" count="90"/>
<wavePart alien="6" count="1"/>
</wave>
</waves>
<levels>
<level map="3" id="1" score="270836024" name="First Level"/>
<level map="4" startMoney="280" id="1" score="62057848" name="First Level"/>
</levels>
<waveParts>
<wavePart alien="1" count="1" wave="1"/>
<wavePart alien="1" count="2" wave="2"/>
<wavePart alien="1" count="3" wave="3"/>
<wavePart alien="2" count="2" wave="4"/>
<wavePart alien="1" count="5" wave="5"/>
<wavePart alien="2" count="4" wave="6"/>
<wavePart alien="2" count="6" wave="7"/>
<wavePart alien="1" count="30" wave="8"/>
<wavePart alien="4" count="1" wave="9"/>
<wavePart alien="3" count="3" wave="10"/>
<wavePart alien="3" count="5" wave="11"/>
<wavePart alien="3" count="10" wave="12"/>
<wavePart alien="3" count="10" wave="13"/>
<wavePart alien="2" count="10" wave="13"/>
<wavePart alien="4" count="3" wave="14"/>
<wavePart alien="3" count="50" wave="16"/>
<wavePart alien="4" count="5" wave="17"/>
<wavePart alien="4" count="10" wave="18"/>
<wavePart alien="4" count="30" wave="19"/>
<wavePart alien="5" count="1" wave="20"/>
<wavePart alien="4" count="50" wave="21"/>
<wavePart alien="5" count="3" wave="22"/>
<wavePart alien="5" count="10" wave="23"/>
<wavePart alien="1" count="10" wave="24"/>
<wavePart alien="2" count="10" wave="24"/>
<wavePart alien="3" count="10" wave="24"/>
<wavePart alien="4" count="10" wave="24"/>
<wavePart alien="5" count="10" wave="24"/>
<wavePart alien="6" count="1" wave="25"/>
<wavePart alien="6" count="3" wave="26"/>
<wavePart alien="6" count="10" wave="27"/>
<wavePart alien="5" count="300" wave="28"/>
<wavePart alien="6" count="100" wave="29"/>
<wavePart alien="6" count="1000" wave="30"/>
</waveParts>
<wavesOnLevels>
<waveOnLevel wave="1" level="1"/>
<waveOnLevel wave="2" level="1"/>
@@ -110,9 +183,6 @@
<waveOnLevel wave="25" level="1"/>
<waveOnLevel wave="26" level="1"/>
<waveOnLevel wave="27" level="1"/>
<waveOnLevel wave="28" level="1"/>
<waveOnLevel wave="29" level="1"/>
<waveOnLevel wave="30" level="1"/>
</wavesOnLevels>
<splashes>
<splash speed="0.2" imageType="5" lifetime="9999" ZValue="0" compositionMode="Source" animSpeed="1" id="1" name="rocket"/>
@@ -122,24 +192,45 @@
<splash speed="0" imageType="6" lifetime="29" ZValue="0" compositionMode="Source" animSpeed="1" id="5" name="smoke"/>
<splash speed="0.1" imageType="5" lifetime="50" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="6" name="Снаряд"/>
<splash speed="0" imageType="9" lifetime="10" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="7" name="blood"/>
<splash speed="0.1" imageType="15" lifetime="32" ZValue="1.4013e-45" compositionMode="Source" animSpeed="0.5" id="8" name="fire"/>
<splash speed="0.5" imageType="16" lifetime="100" ZValue="1.4013e-45" autoControl="true" compositionMode="Source" animSpeed="9.30575e-29" id="9" name="burn" keepOnAlien="true"/>
<splash speed="0.2" imageType="15" lifetime="32" ZValue="0" compositionMode="Source" animSpeed="0.2" id="8" name="fire"/>
<splash speed="0.5" imageType="16" lifetime="100" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="9" name="burn" keepOnAlien="true"/>
<splash speed="0.2" imageType="21" lifetime="30" ZValue="0" compositionMode="Source" animSpeed="1" id="10" name="test"/>
<splash speed="1" imageType="15" lifetime="100" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="0.4" id="11" name="test3c" keepOnAlien="true"/>
</splashes>
<towers>
<tower imageType="8" radius="12" expByKill="0.1" expByShot="0.15" buildTime="500" splash="2" reload="10" id="1" name="rocket launcher 2" cost="4000" expByDamage="0.04"/>
<tower imageType="8" radius="12" expByKill="0.1" expByShot="0.15" buildTime="500" splash="2" reload="150" id="1" name="rocket launcher 2" cost="4000" expByDamage="0.04"/>
<tower imageType="2" radius="3" expByKill="0.2" expByShot="0.1" buildTime="25" splash="3" reload="50" id="2" name="tower 1" cost="10" expByDamage="0.1"/>
<tower imageType="3" radius="5" expByKill="0.1" expByShot="0.15" buildTime="200" splash="1" reload="50" id="3" name="rocket launcher" cost="1000" expByDamage="0.04"/>
<tower imageType="3" radius="5" expByKill="0.1" expByShot="0.15" buildTime="200" splash="1" reload="200" id="3" name="rocket launcher" cost="10" expByDamage="0.04"/>
<tower imageType="12" radius="3" expByKill="0.2" expByShot="0.1" buildTime="50" splash="3" reload="35" id="4" name="tower 1-2" cost="150" expByDamage="0.1"/>
<tower imageType="13" radius="4" expByKill="0.2" expByShot="0.1" buildTime="100" splash="3" reload="15" id="5" name="tower 1-3" cost="250" expByDamage="0.1"/>
<tower imageType="14" radius="3" expByKill="0.2" expByShot="0.1" buildTime="20" splash="8" reload="20" id="6" name="firethrower" cost="90000" expByDamage="0.1"/>
<tower imageType="14" radius="4" expByKill="0.2" expByShot="0.1" buildTime="20" splash="8" reload="4" id="6" name="firethrower" cost="90" expByDamage="0.1"/>
<tower imageType="2" radius="2.5" expByKill="0.3" expByShot="0.1" buildTime="20" splash="3" reload="50" id="7" name="vulcan turret 1" cost="5"/>
<tower imageType="12" radius="2.5" expByKill="0.3" expByShot="0.1" buildTime="50" splash="3" reload="50" id="8" name="vulcan turret 2" cost="15"/>
<tower imageType="13" radius="2.5" expByKill="0.3" expByShot="0.1" buildTime="100" splash="3" reload="50" id="9" name="vulcan turret 3" cost="10"/>
<tower imageType="18" radius="2.5" expByKill="0.3" expByShot="0.1" buildTime="200" splash="3" reload="50" id="10" name="vulcan turret 4" cost="20"/>
<tower imageType="19" radius="2.5" expByKill="0.3" expByShot="0.1" buildTime="300" splash="3" reload="50" id="11" name="vulcan turret 5" cost="50"/>
<tower imageType="20" radius="10" expByKill="0.3" expByShot="0.1" buildTime="500" splash="3" reload="50" id="12" name="vulcan turret 6" cost="100"/>
<tower imageType="23" radius="6" buildTime="100" splash="10" reload="100" id="13" name="test" cost="10"/>
<tower imageType="24" radius="6" buildTime="100" splash="10" reload="100" id="14" name="test2" cost="20"/>
<tower imageType="25" radius="6" buildTime="100" splash="10" reload="100" id="15" name="test3" cost="30"/>
</towers>
<triggers>
<trigger damage="2" childAim="noAim" radius="2" count="1" type="onDestination" id="1" name="fire shot"/>
<trigger damage="2" childAim="noAim" radius="1" type="onDestination" id="1" name="fire shot"/>
<trigger damage="5" childAim="noAim" delParent="true" count="1" type="onDestination" id="2" name="shot"/>
<trigger damage="25" childAim="noAim" radius="2.5" delParent="true" count="1" type="onDestination" id="3" name="explosion"/>
<trigger childAim="noAim" count="1" type="onTimer" id="4" name="smoke" timer="3"/>
<trigger damage="20" childAim="noAim" delParent="true" type="onDestination" id="5" name="shot"/>
<trigger damage="0.2" childAim="parentAim" type="onTimer" id="6" name="burn" timer="2"/>
<trigger damage="2" childAim="noAim" radius="0.5" count="1" type="onTimer" id="6" name="burn" timer="5"/>
<trigger damage="10" childAim="noAim" delParent="true" count="1" type="onDestination" id="7" name="vulcan turret 1"/>
<trigger damage="20" childAim="noAim" delParent="true" count="1" type="onDestination" id="8" name="vulcan turret 2"/>
<trigger damage="40" childAim="noAim" delParent="true" count="1" type="onDestination" id="9" name="vulcan turret 3"/>
<trigger damage="80" childAim="noAim" delParent="true" count="1" type="onDestination" id="10" name="vulcan turret 4"/>
<trigger damage="160" childAim="noAim" delParent="true" count="1" type="onDestination" id="11" name="vulcan turret 5"/>
<trigger damage="400" childAim="noAim" delParent="true" count="1" type="onDestination" id="12" name="vulcan turret 6"/>
<trigger damage="5" childAim="noAim" radius="1.5" delParent="true" type="onAlienInRadius" id="13" name="test"/>
<trigger damage="5" childAim="noAim" radius="1.5" type="onAlienInRadius" id="14" name="test2"/>
<trigger damage="5" childAim="noAim" radius="1.5" count="1" type="onAlienInRadius" id="15" name="test3a"/>
<trigger damage="1" childAim="parentAim" type="onTimer" id="16" name="test3b" timer="5"/>
</triggers>
<chains>
<chain tower="1" trigger="4" child="5" parent="2"/>
@@ -149,27 +240,50 @@
<chain tower="3" trigger="3" child="4" parent="1"/>
<chain tower="4" trigger="2" child="7" parent="3"/>
<chain tower="5" trigger="5" parent="3"/>
<chain tower="6" trigger="1" child="9" parent="8"/>
<chain tower="6" trigger="6" parent="9"/>
<chain tower="6" trigger="1" parent="8"/>
<chain tower="7" trigger="7" child="7" parent="3"/>
<chain tower="8" trigger="8" child="7" parent="3"/>
<chain tower="9" trigger="9" child="7" parent="3"/>
<chain tower="10" trigger="10" child="7" parent="3"/>
<chain tower="11" trigger="11" child="7" parent="3"/>
<chain tower="12" trigger="12" child="7" parent="3"/>
<chain tower="13" trigger="13" parent="10"/>
<chain tower="14" trigger="14" parent="10"/>
<chain tower="15" trigger="16" parent="11"/>
<chain tower="15" trigger="15" child="11" parent="10"/>
</chains>
<towersOnLevels>
<towerOnLevel tower="1" level="1"/>
<towerOnLevel tower="2" level="1"/>
<towerOnLevel tower="3" level="1"/>
<towerOnLevel tower="4" level="1"/>
<towerOnLevel tower="5" level="1"/>
<towerOnLevel tower="15" level="1"/>
<towerOnLevel tower="14" level="1"/>
<towerOnLevel tower="13" level="1"/>
<towerOnLevel tower="12" level="1"/>
<towerOnLevel tower="11" level="1"/>
<towerOnLevel tower="10" level="1"/>
<towerOnLevel tower="9" level="1"/>
<towerOnLevel tower="8" level="1"/>
<towerOnLevel tower="7" level="1"/>
<towerOnLevel tower="6" level="1"/>
<towerOnLevel tower="5" level="1"/>
<towerOnLevel tower="4" level="1"/>
<towerOnLevel tower="3" level="1"/>
<towerOnLevel tower="2" level="1"/>
<towerOnLevel tower="1" level="1"/>
</towersOnLevels>
<morphs>
<morph from="2" expRequired="1" to="4" cost="10"/>
<morph from="3" expRequired="15" to="1" cost="500"/>
<morph from="4" expRequired="3" to="5" cost="40"/>
<morph from="5" expRequired="10" to="3" cost="150"/>
<morph from="3" expRequired="15" to="1" cost="50"/>
<morph from="4" expRequired="10" to="5" cost="150"/>
<morph from="7" expRequired="1" to="8" cost="15"/>
<morph from="8" expRequired="3" to="9" cost="10"/>
<morph from="9" expRequired="5" to="10" cost="20"/>
<morph from="10" expRequired="10" to="11" cost="50"/>
<morph from="11" expRequired="25" to="12" cost="100"/>
<morph from="13" expRequired="0" to="14" cost="40"/>
<morph from="14" expRequired="0" to="15" cost="80"/>
</morphs>
<animations>
<animation pathes="images/Splashes/Blood.png" id="17" name="blood"/>
<animation pathes="images/Aliens/Al_00_0.png;images/Aliens/Al_00_1.png;images/Aliens/Al_00_2.png;images/Aliens/Al_00_3.png;images/Aliens/Al_00_4.png;images/Aliens/Al_00_5.png;images/Aliens/Al_00_6.png;images/Aliens/Al_00_7.png;images/Aliens/Al_00_8.png;images/Aliens/Al_00_9.png;images/Aliens/Al_00_10.png;images/Aliens/Al_00_11.png;images/Aliens/Al_00_12.png;images/Aliens/Al_00_13.png;images/Aliens/Al_00_14.png;images/Aliens/Al_00_15.png;images/Aliens/Al_00_16.png;images/Aliens/Al_00_17.png;images/Aliens/Al_00_18.png;images/Aliens/Al_00_19.png" id="1" name="alien"/>
<animation pathes="images/Towers/00_0.png" id="2" name="tower 1"/>
<animation pathes="images/Towers/00_0.png" id="2" name="tower 1-1"/>
<animation pathes="images/Towers/01_0.png" id="3" name="rocket tower 1"/>
<animation pathes="images/Splashes/expl_00.png;images/Splashes/expl_01.png;images/Splashes/expl_02.png;images/Splashes/expl_03.png;images/Splashes/expl_04.png;images/Splashes/expl_05.png;images/Splashes/expl_06.png;images/Splashes/expl_07.png;images/Splashes/expl_08.png;images/Splashes/expl_09.png;images/Splashes/expl_10.png;images/Splashes/expl_11.png;images/Splashes/expl_12.png;images/Splashes/expl_13.png;images/Splashes/expl_14.png;images/Splashes/expl_15.png;images/Splashes/expl_16.png" id="4" name="explosion"/>
<animation pathes="images/Splashes/Rocket.png" id="5" name="rocket"/>
@@ -182,7 +296,18 @@
<animation pathes="images/Towers/00_1.png" id="12" name="tower 1-2"/>
<animation pathes="images/Towers/00_2.png" id="13" name="tower 1-3"/>
<animation pathes="images/Towers/04_0.png" id="14" name="firethrower 1"/>
<animation pathes="images/Splashes/part_fire_0.png;images/Splashes/part_fire_1.png;images/Splashes/part_fire_2.png;images/Splashes/part_fire_3.png;images/Splashes/part_fire_4.png;images/Splashes/part_fire_5.png;images/Splashes/part_fire_6.png;images/Splashes/part_fire_1.png;images/Splashes/part_fire_2.png;images/Splashes/part_fire_3.png;images/Splashes/part_fire_4.png;images/Splashes/part_fire_5.png;images/Splashes/part_fire_6.png;images/Splashes/part_fire_7.png" id="15" name="fire"/>
<animation pathes="images/Splashes/expl_plasma_14.png" id="16" name="burn"/>
<animation pathes="images/Splashes/part_fire_0.png;images/Splashes/part_fire_1.png;images/Splashes/part_fire_2.png;images/Splashes/part_fire_3.png;images/Splashes/part_fire_4.png;images/Splashes/part_fire_5.png;images/Splashes/part_fire_6.png;images/Splashes/part_fire_7.png;images/Splashes/part_fire_0.png;images/Splashes/part_fire_1.png;images/Splashes/part_fire_2.png;images/Splashes/part_fire_3.png;images/Splashes/part_fire_4.png;images/Splashes/part_fire_5.png;images/Splashes/part_fire_6.png;images/Splashes/part_fire_7.png" id="15" name="fire"/>
<animation pathes="images/Splashes/part_fire_0.png" id="16" name="burn"/>
<animation pathes="images/Splashes/Blood.png" id="17" name="blood"/>
<animation pathes="images/Towers/00_3.png" id="18" name="tower 1-4"/>
<animation pathes="images/Towers/00_4.png" id="19" name="tower 1-5"/>
<animation pathes="images/Towers/00_5.png" id="20" name="tower 1-6"/>
<animation pathes="images/Splashes/plasma.png" id="21" name="test"/>
<animation pathes="images/Towers/04_1.png" id="22" name="firethrower 2"/>
<animation pathes="images/Towers/02_0.png" id="23" name="plasma 1"/>
<animation pathes="images/Towers/02_1.png" id="24" name="plasma 2"/>
<animation pathes="images/Towers/02_2.png" id="25" name="plasma 3"/>
<animation pathes="images/Towers/02_3.png" id="26" name="plasma 4"/>
<animation pathes="images/Towers/02_4.png" id="27" name="plasma 5"/>
</animations>
</ADdata>

View File

@@ -42,7 +42,7 @@ Form::Form(QWidget *parent) :
connect(morphtbf,SIGNAL(click(int)),this,SLOT(towerMorph(int)));
connect(graphics,SIGNAL(add_tow(QPoint,bool)),this,SLOT(add_tow(QPoint,bool)));
// connect(core.adtowers,SIGNAL(tower_killed(QPoint)),graphics,SLOT(towerKilled(QPoint)));
connect(core.addata->aliens,SIGNAL(alien_killed(int)),graphics,SLOT(alienKilled(int)));
connect(core.addata->aliens,SIGNAL(alien_killed(int,bool)),graphics,SLOT(alienKilled(int,bool)));
connect(graphics,SIGNAL(cancel()),this,SLOT(cancel()));
connect(graphics,SIGNAL(selected_tower_changed(QPoint)),this,SLOT(selectedTowerChanged(QPoint)));
this->startTimer(50);

35
form.ui
View File

@@ -13,11 +13,12 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="4,0,1">
<property name="margin">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="widget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="margin">
@@ -25,8 +26,6 @@
</property>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gbTowers">
<property name="title">
<string>Towers</string>
@@ -38,10 +37,22 @@
<property name="margin">
<number>0</number>
</property>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QLabel" name="lbInfo">
@@ -90,9 +101,6 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
@@ -113,9 +121,6 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
@@ -125,6 +130,8 @@
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>

View File

@@ -1,5 +1,7 @@
#include "loader.h"
bool tbWaveOnLevel_lessThan(const tbWaveOnLevel &a, const tbWaveOnLevel &b) {return a.waveId < b.waveId;}
Loader::Loader()
{
doc = new QDomDocument("data");
@@ -30,7 +32,7 @@ void Loader::load(QString filename)
readLevTowers();
readMorphs();
readWaves();
readWaveParts();
// readWaveParts();
readLevWaves();
file->close();
@@ -93,6 +95,15 @@ void Loader::save(QString filename)
elem.setAttribute("id",w.id);
elem.setAttribute("prise",w.prise);
elem.setAttribute("timeout",w.timeout);
QDomElement cc;
for (int k=0; k<w.parts.size(); k++)
{
tbWavePart wp = w.parts.at(k);
cc = data.createElement("wavePart");
elem.appendChild(cc);
cc.setAttribute("alien",wp.alienId);
cc.setAttribute("count",wp.count);
}
}
child = data.createElement("levels");
root.appendChild(child);
@@ -105,18 +116,19 @@ void Loader::save(QString filename)
elem.setAttribute("map",lev.mapId);
elem.setAttribute("name",lev.name);
elem.setAttribute("score",lev.score);
elem.setAttribute("startMoney",lev.money);
}
child = data.createElement("waveParts");
root.appendChild(child);
for (int i=0; i<waveParts.size(); i++)
{
tbWavePart wp = waveParts.values().at(i);
elem = data.createElement("wavePart");
child.appendChild(elem);
elem.setAttribute("wave",wp.waveId);
elem.setAttribute("alien",wp.alienId);
elem.setAttribute("count",wp.count);
}
// child = data.createElement("waveParts");
// root.appendChild(child);
// for (int i=0; i<waveParts.size(); i++)
// {
// tbWavePart wp = waveParts.values().at(i);
// elem = data.createElement("wavePart");
// child.appendChild(elem);
// elem.setAttribute("wave",wp.waveId);
// elem.setAttribute("alien",wp.alienId);
// elem.setAttribute("count",wp.count);
// }
child = data.createElement("wavesOnLevels");
root.appendChild(child);
for (int i=0; i<levWaves.size(); i++)
@@ -325,6 +337,7 @@ Game_Data * Loader::loadlevel(int id)
{
Player * pl = new Player(i);
gd->players.append(pl);
gd->players.at(i)->money = levels.value(id).money/tbm.maxPlayers;
}
qDebug() << gd->players.size();
for (int i=0; i<map->maxPlayers(); ++i)
@@ -332,41 +345,42 @@ Game_Data * Loader::loadlevel(int id)
QList <tbWaveOnLevel> wollist = levWaves.values(id);
if (wollist.isEmpty())
{
qCritical() << tr("Error no waves on level!");
qCritical() << tr("Error: no waves on level!");
return 0;
}
tbWave tbw;
tbWavePart tbwpt;
QList <tbWavePart> wplist;
//QList <tbWavePart> wplist;
QList <int> alienIds;
QList <int> animIds;
qSort(wollist.begin(),wollist.end(),tbWaveOnLevel_lessThan);
for (int i=0; i<wollist.size(); ++i)
{
WaveType wt;
tbw = waves.value(wollist.at(i).waveId);
wt.prise = tbw.prise;
wt.timeout = tbw.timeout;
wplist = waveParts.values(tbw.id);
if (wplist.isEmpty())
//wplist = waveParts.values(tbw.id);
if (tbw.parts.isEmpty())
{
qCritical() << tr("Error wave %1 is empty!").arg(tbw.id);
qCritical() << tr("Error: wave %1 is empty!").arg(tbw.id);
//return 0;
}
for (int j=0; j<wplist.size(); j++)
for (int j=0; j<tbw.parts.size(); j++)
{
tbwpt = wplist.at(j);
tbwpt = tbw.parts.at(j);
if (alienIds.contains(tbwpt.alienId))
{
wt.types.prepend(alienIds.indexOf(tbwpt.alienId));
wt.types.append(alienIds.indexOf(tbwpt.alienId));
} else {
alienIds.append(tbwpt.alienId);
wt.types.prepend(alienIds.size()-1);
wt.types.append(alienIds.size()-1);
}
wt.counts.prepend(tbwpt.count);
wt.counts.append(tbwpt.count);
}
gd->waves.prepend(wt);
gd->waves.append(wt);
qDebug() << tr("load wave #%1 prise=%2 timeout=%3").arg(i+1).arg(wt.prise).arg(wt.timeout) << wt.types << wt.counts;
wplist.clear();
//wplist.clear();
}
wollist.clear();
for (int i=0; i<alienIds.size(); ++i)
@@ -385,7 +399,7 @@ Game_Data * Loader::loadlevel(int id)
salt.score = tbal.score;
salt.speed = tbal.speed;
gd->aliens->srcAliens.append(salt);
qDebug() << tr("Alien %1 #%2 ").arg(salt.name).arg(i);
//qDebug() << tr("Alien %1 #%2 ").arg(salt.name).arg(i);
}
QList <tbTowerOnLevel> tollist = levTowers.values(id);
tbTower tbt;
@@ -462,7 +476,7 @@ Game_Data * Loader::loadlevel(int id)
{
piForeachA (j, morph_indexes[i])
{
int index = (int)j.morph;
long int index = (long int)j.morph;
for (int k=0; k<map->maxPlayers(); ++k)
{
j.morph = &(gd->players[k]->srcTowers[index]);
@@ -607,10 +621,10 @@ void Loader::fillTowerChains(QList <int> * animIds, QList <tbChain> * chlist,
QString Loader::createMapExample()
{
QVector < QVector < int > > Cells;
Cells.resize(25);
Cells.resize(32);
for (int i=0; i<Cells.size(); i++)
{
Cells[i].resize(11);
Cells[i].resize(32);
Cells[i][0]=Map::Wall;
Cells[i][Cells[i].size()-1]=Map::Wall;
}
@@ -627,10 +641,20 @@ QString Loader::createMapExample()
Cells[i][j]=Map::Player;
//for (int i=2; i<Cells.size()-2; i++)
//Cells[i][Cells[i].size()/2] = Map::Wall;
Cells[0][Cells[0].size()/2]=Map::Start;
//Cells[0][Cells[0].size()/2]=Map::Start;
//Cells[Cells.size()/2-1][0]=Map::Start;
Cells[Cells.size()-1][Cells[Cells.size()-1].size()/2]=Map::Finish;
//Cells[Cells.size()-1][Cells[Cells.size()-1].size()/2]=Map::Finish;
//Cells[Cells.size()/2-1][Cells[Cells.size()/2].size()-1]=Map::Finish;
for (int i=4; i<6; i++)
{
Cells[0][i]=Map::Start;
Cells[Cells.size()-1][Cells.size()-1-i]=Map::Finish;
}
for (int i=4; i<6; i++)
{
Cells[i][0]=Map::Start;
Cells[Cells.size()-1-i][Cells.size()-1]=Map::Finish;
}
QByteArray ba;
QDataStream tmps(&ba,QIODevice::ReadWrite);
tmps << Cells;
@@ -690,30 +714,14 @@ void Loader::readWaves()
if (waves.contains(w.id)) qCritical("Same wave ID detected, replacing...");
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("================");
qDebug() << tr("Found %1 waves").arg(waves.size());
//qDebug("================");
}
void Loader::readWaveParts()
{
waveParts.clear();
QDomNodeList wpelems = doc->elementsByTagName("wavePart");
for (int i=0; i<wpelems.size(); i++)
QDomNodeList wpelems = welems.at(i).childNodes();
for (int j=0; j<wpelems.size(); j++)
{
if (wpelems.at(j).nodeName() == "wavePart")
{
bool OK = true;
tbWavePart wp;
QDomNamedNodeMap nm = wpelems.at(i).attributes();
wp.waveId = nm.namedItem("wave").nodeValue().toInt();
if (!waves.contains(wp.waveId))
{
qCritical("invalid wave Id");
OK = false;
}
QDomNamedNodeMap nm = wpelems.at(j).attributes();
wp.alienId = nm.namedItem("alien").nodeValue().toInt();
if (!aliens.contains(wp.alienId))
{
@@ -723,16 +731,54 @@ void Loader::readWaveParts()
wp.count = nm.namedItem("count").nodeValue().toInt();
if (OK)
{
waveParts.insert(wp.waveId,wp);
w.parts.append(wp);
//qDebug() << tr("Wave=%1 alien=%2 count=%3").arg(wp.waveId).arg(wp.alienId).arg(wp.count);
}
}
}
waves.insert(w.id,w);
//qDebug() << tr("Wave %1 prise=%2 timeout=%3").arg(w.id).arg(w.prise).arg(w.timeout);
}
//qDebug("================");
qDebug() << tr("Found %1 waveParts").arg(waveParts.size());
qDebug() << tr("Found %1 waves").arg(waves.size());
//qDebug("================");
}
//void Loader::readWaveParts()
//{
// //waveParts.clear();
// QDomNodeList wpelems = doc->elementsByTagName("wavePart");
// for (int i=0; i<wpelems.size(); i++)
// {
// bool OK = true;
// tbWavePart wp;
// QDomNamedNodeMap nm = wpelems.at(i).attributes();
// wp.waveId = nm.namedItem("wave").nodeValue().toInt();
// if (!waves.contains(wp.waveId))
// {
// qCritical("invalid wave Id");
// OK = false;
// }
// wp.alienId = nm.namedItem("alien").nodeValue().toInt();
// if (!aliens.contains(wp.alienId))
// {
// qCritical("invalid alien Id");
// OK = false;
// }
// wp.count = nm.namedItem("count").nodeValue().toInt();
// if (OK)
// {
// waves[wp.waveId].parts.append(wp);
// //qDebug() << tr("Wave=%1 alien=%2 count=%3").arg(wp.waveId).arg(wp.alienId).arg(wp.count);
// }
// }
// //qDebug("================");
// //qDebug() << tr("Found %1 waveParts").arg(waveParts.size());
// //qDebug("================");
//}
void Loader::readChains()
{
chains.clear();
@@ -895,6 +941,7 @@ void Loader::readLevels()
l.name = nm.namedItem("name").nodeValue();
if (levels.contains(l.id)) qCritical("Same wave ID detected, replacing...");
l.mapId = nm.namedItem("map").nodeValue().toInt();
l.money = nm.namedItem("startMoney").nodeValue().toUInt();
if (!maps.contains(l.mapId))
{
qCritical("invalid map Id");

View File

@@ -94,9 +94,9 @@ struct tbMorph
struct tbWavePart
{
int waveId;
int alienId;
unsigned int count;
// int waveId;
};
struct tbWave
@@ -105,6 +105,7 @@ struct tbWave
unsigned int timeout;
unsigned int prise;
//int type;
QVector<tbWavePart> parts;
};
struct tbWaveOnLevel
@@ -134,6 +135,7 @@ struct tbLevel : tbHeader
{
int mapId;
unsigned int score;
unsigned int money;
};
struct tbAnimation : tbHeader
@@ -159,7 +161,7 @@ public:
QHash <int,tbWave> waves;
QHash <int,tbAnimation> animations;
QMultiHash <int,tbWaveOnLevel> levWaves;
QMultiHash <int,tbWavePart> waveParts;
// QMultiHash <int,tbWavePart> waveParts;
QMultiHash <int,tbChain> chains;
QMultiHash <int,tbMorph> morphs;
QMultiHash <int,tbTowerOnLevel> levTowers;
@@ -180,7 +182,7 @@ private:
void readChains();
void readWaves();
void readLevWaves();
void readWaveParts();
// void readWaveParts();
void readUpgrades();
void readAnimations();

25
moneyitem.cpp Normal file
View File

@@ -0,0 +1,25 @@
#include "moneyitem.h"
#include <QPainter>
#include <QString>
MoneyItem::MoneyItem(QGraphicsItem *parent) : QGraphicsItem(parent)
{
money = 0;
br = QRectF(0,0,100,50);
pen.setColor(Qt::yellow);
pen.setWidthF(2.5);
}
void MoneyItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
painter->setPen(pen);
if (str.isEmpty()) painter->drawText(br,Qt::AlignLeft, "+" + QString::number(money) + "$");
else painter->drawText(br,Qt::AlignLeft, str);
}
QRectF MoneyItem::boundingRect() const
{
return br;
}

25
moneyitem.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef MONEYITEM_H
#define MONEYITEM_H
#include <QGraphicsItem>
#include <QPen>
class MoneyItem : public QGraphicsItem
{
public:
explicit MoneyItem(QGraphicsItem *parent = 0);
QRectF boundingRect() const;
void setMoney(unsigned long long int val) {money = val;}
void setText(const QString &text) {str = text;}
void setColor(const QColor &color) {pen.setColor(color);}
private:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
unsigned long long int money;
QString str;
QRectF br;
QPen pen;
};
#endif // MONEYITEM_H

View File

@@ -4,6 +4,6 @@ Player::Player(int Id, QObject *parent) :
QObject(parent)
{
playerId = Id;
money = 100;
money = 0;
selectAlienId = -1;
}

View File

@@ -5,14 +5,26 @@
class Player : public QObject
{
Q_OBJECT
Q_OBJECT
public:
struct PlayerStats
{
int killed_aliens;
int builded_towers;
int spend_money;
double all_damage;
double player_experience;
};
explicit Player(int Id, QObject *parent = 0);
long long int money;
unsigned long int score;
int selectAlienId;
QList <srcTowerType> srcTowers;
int playerId;
QString name;
PlayerStats stats;
signals:
public slots:

View File

@@ -32,13 +32,13 @@
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="waveParts">
<!-- <xsd:element name="waveParts">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="wavePart" type="wavePartType" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:element>-->
<xsd:element name="wavesOnLevels">
<xsd:complexType>
<xsd:sequence>
@@ -217,7 +217,7 @@
<xsd:complexType name="wavePartType">
<xsd:attribute name="alien" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="wave" type="xsd:positiveInteger" use="required"/>
<!-- <xsd:attribute name="wave" type="xsd:positiveInteger" use="required"/>-->
<xsd:attribute name="count" type="xsd:positiveInteger" use="required"/>
</xsd:complexType>
@@ -229,6 +229,9 @@
</xsd:complexType>
<xsd:complexType name="waveType">
<xsd:sequence>
<xsd:element name="wavePart" type="wavePartType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="timeout" type="xsd:nonNegativeInteger" use="required"/>
<xsd:attribute name="prise" type="xsd:nonNegativeInteger" use="required"/>
@@ -251,6 +254,7 @@
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="map" type="xsd:nonNegativeInteger" use="required"/>
<xsd:attribute name="score" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="startMoney" type="xsd:positiveInteger" use="required"/>
</xsd:complexType>
<xsd:complexType name="animationType">

View File

@@ -54,7 +54,8 @@ void Splashes::addSplash(srcTowerType *srctower, int id, QPointF pos, QPointF de
else spl.src = &(gameData->srcSplashes[id]);
spl.id = nextId;
spl.towerId = towerId;
spl.PlayerId = srctower->PlayerId;
//qDebug() << "player"<< srctower->PlayerId;
spl.PlayerId = gameData->curTowers[towerId].PlayerId;
spl.AlienId = aim;
spl.pos = pos;
spl.destination = dest;
@@ -125,11 +126,13 @@ void Splashes::update()
bool keep = spl->src->keepOnAlien;
if (spl->src->keepOnAlien)
{
// qDebug() << "keep on alien start";
if (gameData->aliens->curAliens.contains(spl->AlienId))
{
spl->pos = gameData->aliens->curAliens[spl->AlienId].pos;
spl->angle = gameData->aliens->curAliens[spl->AlienId].angle;
} else deadIndexes.insert(spl->id,spl->id);
// qDebug() << "keep on alien done";
} else {
if (spl->src->autoControl && spl->AlienId != -1)
{
@@ -178,10 +181,14 @@ void Splashes::update()
for (QHash<int,DeadAlienIndex>::iterator j = dead.begin();
j != dead.end(); ++j)
{
// qDebug() << j->tower;
gameData->curTowers[j->tower].experience += gameData->curTowers[j->tower].src->expByKill;
// qDebug() << "emit1";
emit killAlien(j->player,j->id);
// qDebug() << "emit2";
}
dead.clear();
// qDebug() << "finish";
}
@@ -200,6 +207,7 @@ void Splashes::doTriggerOnTimer(QHash<int, SplashType>::iterator
for(QList<TriggerOnTimer>::iterator i = spl->trigsOnTimer.begin();
i != spl->trigsOnTimer.end(); ++i)
{
// qDebug() << "timer trigger start";
srcTriggerType * strig = i->src;
i->timer++;
if (i->timer >= strig->timer)
@@ -215,8 +223,11 @@ void Splashes::doTriggerOnTimer(QHash<int, SplashType>::iterator
if (gameData->aliens->curAliens.contains(spl->AlienId))
{
hh = gameData->aliens->curAliens[spl->AlienId].health -= dmg;
// qDebug() << "shot from" << spl->towerId << spl->AlienId;
if (hh <= 0) dead.insert(spl->AlienId, DeadAlienIndex(spl->AlienId, spl->PlayerId, spl->towerId));
else gameData->curTowers[spl->towerId].experience += hh * gameData->curTowers[spl->towerId].src->expByDamage;
} else {
deadIndexes->insert(spl->id,spl->id);
}
} else {
for (QHash<int, AlienType>::iterator
@@ -251,6 +262,7 @@ void Splashes::doTriggerOnTimer(QHash<int, SplashType>::iterator
}
}
}
// qDebug() << "timer trigger stop";
}
}
@@ -317,12 +329,12 @@ void Splashes::doTriggerOnDest(QHash<int, SplashType>::iterator
void Splashes::doTriggerOnAlien(QHash<int, SplashType>::iterator spl, QHash<int, int> *deadIndexes)
{
foreach(TriggerOnAlien t, spl->trigsOnAlien)
for (int n=0; n<spl->trigsOnAlien.size(); n++)
{
TriggerOnAlien * t = &spl->trigsOnAlien[n];
/// TODO: different aims for childs
if (t.src->delParent) deadIndexes->insert(spl->id,spl->id);
float dmg = t.src->damage;
float rad = t.src->radius;
float dmg = t->src->damage;
float rad = t->src->radius;
if (dmg > 0 && rad > 0)
{
float hh;
@@ -330,24 +342,25 @@ void Splashes::doTriggerOnAlien(QHash<int, SplashType>::iterator spl, QHash<int,
i = gameData->aliens->curAliens.begin();
i != gameData->aliens->curAliens.end(); ++i)
{
if (distance2(spl->pos, i->pos) < rad*rad)
if (distance2(spl->pos, i->pos) < rad*rad && !t->triggerAliens.contains(i->id))
{
if (t->src->delParent) deadIndexes->insert(spl->id,spl->id);
hh = i->health -= dmg;
if (hh <= 0) dead.insert(i->id, DeadAlienIndex(i->id, spl->PlayerId, spl->towerId));
else gameData->curTowers[spl->towerId].experience += hh * gameData->curTowers[spl->towerId].src->expByDamage;
if (t.src->count > 0 && t.src->childId > 0)
if (t->src->count > 0 && t->src->childId > 0)
{
if (!t.triggerAliens.contains(i->id))
{
for (int j=0; j<t.src->count; ++j)
// if (!t.triggerAliens.contains(i->id))
// {
for (int j=0; j<t->src->count; ++j)
{
/// TODO: randomRadiusPos
addSplash(spl->srcTow,t.src->childId,
addSplash(spl->srcTow,t->src->childId,
spl->pos,i->pos,i->id,spl->towerId);
}
t.triggerAliens.append(i->id);
}
// }
}
t->triggerAliens.append(i->id);
}
}
}

5
statuswidget.cpp Normal file
View File

@@ -0,0 +1,5 @@
#include "statuswidget.h"
Statuswidget::Statuswidget()
{
}

12
statuswidget.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef STATUSWIDGET_H
#define STATUSWIDGET_H
#include <QGraphicsWidget>
class Statuswidget : public QGraphicsWidget
{
public:
Statuswidget();
};
#endif // STATUSWIDGET_H

View File

@@ -48,6 +48,8 @@ bool Towers::addTower(int playerId, int srcId, QPoint pos)
scene->addItem(tw.item);
gameData->curTowers.insert(tw.pos,tw);
p->money -= tw.src->cost;
p->stats.spend_money += tw.src->cost;
p->stats.builded_towers++;
return true;
}
return false;
@@ -106,13 +108,20 @@ void Towers::update()
{
AlienType al = gameData->aliens->curAliens.value(gameData->players.at(i->PlayerId)->selectAlienId);
if (distance2(al.pos+QPointF(0.5f,0.5f), i->pos) < rad2) i->aim = al.id;
else i->aim = -1;
}
if (i->aim == 0)
{
qDebug() << tr("err tower") << i->pos << gameData->players.at(i->PlayerId)->selectAlienId;
qFatal("tower has incorrect aim = 0");
return;
}
if (i->aim < 0)
{
for (QHash<int, AlienType>::iterator j = gameData->aliens->curAliens.begin(); j != gameData->aliens->curAliens.end(); ++j)
{
float dist = distance2(i->pos, (*j).pos+QPointF(0.5f,0.5f));
if (dist < rad2) i->aim = (*j).id;
float dist = distance2(i->pos, j->pos+QPointF(0.5f,0.5f));
if (dist < rad2) i->aim = j->id;
}
}
if (i->aim > 0)
@@ -144,6 +153,7 @@ bool Towers::morphTower(QPoint id, int index)
// tower_killed(id);
TowerType & t(gameData->curTowers[id]);
gameData->players[t.PlayerId]->money -= t.src->morphs[index].cost;
gameData->players[t.PlayerId]->stats.spend_money += t.src->morphs[index].cost;
t.src = t.src->morphs[index].morph;
t.build = 0;
t.reload = 0;