added morphs, fix some bugs, new images
added onAlienInRadius trigger but it not work right((
@@ -17,7 +17,9 @@ SOURCES += main.cpp \
|
|||||||
triggermodel.cpp \
|
triggermodel.cpp \
|
||||||
mapmodel.cpp \
|
mapmodel.cpp \
|
||||||
animationmodel.cpp \
|
animationmodel.cpp \
|
||||||
animlabel.cpp
|
animlabel.cpp \
|
||||||
|
../aliens.cpp \
|
||||||
|
../aditem.cpp
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
../loader.h \
|
../loader.h \
|
||||||
alienmodel.h \
|
alienmodel.h \
|
||||||
@@ -30,9 +32,13 @@ HEADERS += mainwindow.h \
|
|||||||
triggermodel.h \
|
triggermodel.h \
|
||||||
mapmodel.h \
|
mapmodel.h \
|
||||||
animationmodel.h \
|
animationmodel.h \
|
||||||
animlabel.h
|
animlabel.h \
|
||||||
|
../aliens.h \
|
||||||
|
../aditem.h
|
||||||
FORMS += mainwindow.ui
|
FORMS += mainwindow.ui
|
||||||
TRANSLATIONS += adeditor_ru.ts
|
TRANSLATIONS += adeditor_ru.ts
|
||||||
RESOURCES += ADeditor.qrc
|
RESOURCES += ADeditor.qrc
|
||||||
OTHER_FILES += ../schema.xml \
|
OTHER_FILES += ../schema.xml \
|
||||||
../data2.xml
|
../data2.xml
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,287 +1,300 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by Qt Creator 2.2.84, 2011-08-21T21:34:49. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>RunConfiguration0-BaseEnvironmentBase</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
<value type="int">2</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-CommandLineArguments</variable>
|
|
||||||
<valuelist type="QVariantList"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-ProFile</variable>
|
|
||||||
<value type="QString">ADeditor.pro</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-RunConfiguration.name</variable>
|
|
||||||
<value type="QString">ADeditor</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-UseDyldImageSuffix</variable>
|
|
||||||
<value type="bool">false</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-UseTerminal</variable>
|
|
||||||
<value type="bool">false</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-UserEnvironmentChanges</variable>
|
|
||||||
<valuelist type="QVariantList"/>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-UserSetName</variable>
|
|
||||||
<value type="bool">false</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-UserSetWorkingDirectory</variable>
|
|
||||||
<value type="bool">true</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-UserWorkingDirectory</variable>
|
|
||||||
<value type="QString">/home/andrey/AD/aliendefender</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>RunConfiguration0-type</variable>
|
|
||||||
<value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>activeRunConfiguration</variable>
|
|
||||||
<value type="int">0</value>
|
<value type="int">0</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>activebuildconfiguration</variable>
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
<value type="QString">Debug</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildConfiguration-Debug</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
<value key="QtVersionId" type="int">0</value>
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
<value key="ToolChain" type="int">0</value>
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
<value key="addQDumper" type=""></value>
|
<value type="QString" key="language">Cpp</value>
|
||||||
<value key="buildConfiguration" type="int">2</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>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.CodeStyle.Count">1</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="QString" key="EditorConfiguration.CurrentFallback">Global</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SmartBackspace">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.Tab.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="bool" key="AutoIndent">true</value>
|
||||||
|
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||||
|
<value type="QString" key="CurrentFallback">CppGlobal</value>
|
||||||
|
<value type="int" key="IndentSize">4</value>
|
||||||
|
<value type="int" key="PaddingMode">1</value>
|
||||||
|
<value type="bool" key="SmartBackspace">false</value>
|
||||||
|
<value type="bool" key="SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="TabSize">8</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.Tab.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="bool" key="AutoIndent">true</value>
|
||||||
|
<value type="bool" key="AutoSpacesForTabs">false</value>
|
||||||
|
<value type="QString" key="CurrentFallback">QmlJSGlobal</value>
|
||||||
|
<value type="int" key="IndentSize">4</value>
|
||||||
|
<value type="int" key="PaddingMode">1</value>
|
||||||
|
<value type="bool" key="SmartBackspace">false</value>
|
||||||
|
<value type="bool" key="SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="TabSize">8</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="EditorConfiguration.Tab.Count">2</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">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">false</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>buildConfiguration-Release</variable>
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
|
||||||
<value key="QtVersionId" type="int">0</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
|
||||||
<value key="addQDumper" type=""></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
|
||||||
<value key="buildConfiguration" type="int">0</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:/Qt/qtcreator-2.2.84/mingw/bin/gcc.exe.x86-windows-msys-pe-32bit.D:/Qt/qtcreator-2.2.84/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
||||||
|
<valuemap 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">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="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 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 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 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 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.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>
|
||||||
|
</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>
|
||||||
|
<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">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="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 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 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 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 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.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>
|
||||||
|
</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"></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.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<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">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="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="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 type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>buildconfiguration-Debug-buildstep0</variable>
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
<valuemap type="QVariantMap">
|
<value type="int">1</value>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
|
||||||
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
|
||||||
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-2HAd2azpnh,guid=fd81c6d6610b4c57717ec20c4c90d3de</value>
|
|
||||||
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
|
||||||
<value type="QString">DESKTOP_SESSION=gnome</value>
|
|
||||||
<value type="QString">DISPLAY=:0.0</value>
|
|
||||||
<value type="QString">GDMSESSION=gnome</value>
|
|
||||||
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
|
||||||
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
|
||||||
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
|
||||||
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-vNW3fv</value>
|
|
||||||
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
|
||||||
<value type="QString">HOME=/home/andrey</value>
|
|
||||||
<value type="QString">LANG=ru_RU.UTF-8</value>
|
|
||||||
<value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
|
|
||||||
<value type="QString">LOGNAME=andrey</value>
|
|
||||||
<value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
|
|
||||||
<value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
|
|
||||||
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
|
||||||
<value type="QString">PWD=/home/andrey</value>
|
|
||||||
<value type="QString">QTDIR=/usr/share/qt4</value>
|
|
||||||
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1158,unix/buull-eeePC:/tmp/.ICE-unix/1158</value>
|
|
||||||
<value type="QString">SHELL=/bin/bash</value>
|
|
||||||
<value type="QString">SPEECHD_PORT=6561</value>
|
|
||||||
<value type="QString">SSH_AGENT_PID=1195</value>
|
|
||||||
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-vNW3fv/ssh</value>
|
|
||||||
<value type="QString">USER=andrey</value>
|
|
||||||
<value type="QString">USERNAME=andrey</value>
|
|
||||||
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-Len9P0/database</value>
|
|
||||||
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
|
||||||
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
|
||||||
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1284559837.801731-819619931</value>
|
|
||||||
</valuelist>
|
|
||||||
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
|
||||||
<value type="QString">/home/andrey/AD/aliendefender/ADeditor/ADeditor.pro</value>
|
|
||||||
<value type="QString">-spec</value>
|
|
||||||
<value type="QString">linux-g++</value>
|
|
||||||
<value type="QString">-r</value>
|
|
||||||
<value type="QString">CONFIG+=debug</value>
|
|
||||||
</valuelist>
|
|
||||||
<value key="abstractProcess.command" type="QString">/usr/bin/qmake-qt4</value>
|
|
||||||
<value key="abstractProcess.enabled" type="bool">false</value>
|
|
||||||
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>buildconfiguration-Debug-buildstep1</variable>
|
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||||
<valuemap type="QVariantMap">
|
<value type="QString">{6c550070-c96c-41ad-865e-c5b9b5c3b79f}</value>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
|
||||||
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
|
||||||
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-2HAd2azpnh,guid=fd81c6d6610b4c57717ec20c4c90d3de</value>
|
|
||||||
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
|
||||||
<value type="QString">DESKTOP_SESSION=gnome</value>
|
|
||||||
<value type="QString">DISPLAY=:0.0</value>
|
|
||||||
<value type="QString">GDMSESSION=gnome</value>
|
|
||||||
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
|
||||||
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
|
||||||
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
|
||||||
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-vNW3fv</value>
|
|
||||||
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
|
||||||
<value type="QString">HOME=/home/andrey</value>
|
|
||||||
<value type="QString">LANG=ru_RU.UTF-8</value>
|
|
||||||
<value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
|
|
||||||
<value type="QString">LOGNAME=andrey</value>
|
|
||||||
<value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
|
|
||||||
<value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
|
|
||||||
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
|
||||||
<value type="QString">PWD=/home/andrey</value>
|
|
||||||
<value type="QString">QTDIR=/usr/share/qt4</value>
|
|
||||||
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1158,unix/buull-eeePC:/tmp/.ICE-unix/1158</value>
|
|
||||||
<value type="QString">SHELL=/bin/bash</value>
|
|
||||||
<value type="QString">SPEECHD_PORT=6561</value>
|
|
||||||
<value type="QString">SSH_AGENT_PID=1195</value>
|
|
||||||
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-vNW3fv/ssh</value>
|
|
||||||
<value type="QString">USER=andrey</value>
|
|
||||||
<value type="QString">USERNAME=andrey</value>
|
|
||||||
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-Len9P0/database</value>
|
|
||||||
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
|
||||||
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
|
||||||
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1284559837.801731-819619931</value>
|
|
||||||
</valuelist>
|
|
||||||
<value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
|
|
||||||
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
|
||||||
<value type="QString">-j2</value>
|
|
||||||
<value type="QString">-w</value>
|
|
||||||
</valuelist>
|
|
||||||
<value key="abstractProcess.command" type="QString">/usr/bin/make</value>
|
|
||||||
<value key="abstractProcess.enabled" type="bool">true</value>
|
|
||||||
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
|
||||||
<valuelist key="makeargs" type="QVariantList">
|
|
||||||
<value type="QString">-j2</value>
|
|
||||||
</valuelist>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>buildconfiguration-Debug-cleanstep0</variable>
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
<valuemap type="QVariantMap">
|
<value type="int">10</value>
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
|
||||||
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
|
||||||
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-wExeabp7q4,guid=18815993df3603fdc64a3f6d4c7b5822</value>
|
|
||||||
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
|
||||||
<value type="QString">DESKTOP_SESSION=gnome</value>
|
|
||||||
<value type="QString">DISPLAY=:0.0</value>
|
|
||||||
<value type="QString">GDMSESSION=gnome</value>
|
|
||||||
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
|
||||||
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
|
||||||
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
|
||||||
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-4vN5uf</value>
|
|
||||||
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
|
||||||
<value type="QString">HOME=/home/andrey</value>
|
|
||||||
<value type="QString">LANG=ru_RU.UTF-8</value>
|
|
||||||
<value type="QString">LD_LIBRARY_PATH=/usr/lib/qtcreator:</value>
|
|
||||||
<value type="QString">LOGNAME=andrey</value>
|
|
||||||
<value type="QString">MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path</value>
|
|
||||||
<value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
|
|
||||||
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
|
||||||
<value type="QString">PWD=/home/andrey</value>
|
|
||||||
<value type="QString">QTDIR=/usr/share/qt4</value>
|
|
||||||
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1205,unix/buull-eeePC:/tmp/.ICE-unix/1205</value>
|
|
||||||
<value type="QString">SHELL=/bin/bash</value>
|
|
||||||
<value type="QString">SPEECHD_PORT=6561</value>
|
|
||||||
<value type="QString">SSH_AGENT_PID=1239</value>
|
|
||||||
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-4vN5uf/ssh</value>
|
|
||||||
<value type="QString">USER=andrey</value>
|
|
||||||
<value type="QString">USERNAME=andrey</value>
|
|
||||||
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-x9URui/database</value>
|
|
||||||
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
|
||||||
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
|
||||||
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1283151906.338331-318132279</value>
|
|
||||||
</valuelist>
|
|
||||||
<value key="abstractProcess.IgnoreReturnValue" type="bool">true</value>
|
|
||||||
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
|
||||||
<value type="QString">clean</value>
|
|
||||||
<value type="QString">-w</value>
|
|
||||||
</valuelist>
|
|
||||||
<value key="abstractProcess.command" type="QString">/usr/bin/make</value>
|
|
||||||
<value key="abstractProcess.enabled" type="bool">true</value>
|
|
||||||
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
|
||||||
<value key="cleanConfig" type="bool">true</value>
|
|
||||||
<valuelist key="makeargs" type="QVariantList">
|
|
||||||
<value type="QString">clean</value>
|
|
||||||
</valuelist>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildconfiguration-Release-buildstep0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildconfiguration-Release-buildstep1</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildconfiguration-Release-cleanstep0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildconfigurations</variable>
|
|
||||||
<valuelist type="QVariantList">
|
|
||||||
<value type="QString">Debug</value>
|
|
||||||
<value type="QString">Release</value>
|
|
||||||
</valuelist>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildstep0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
|
|
||||||
<value key="mkspec" type="QString"></value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildstep1</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>buildsteps</variable>
|
|
||||||
<valuelist type="QVariantList">
|
|
||||||
<value type="QString">trolltech.qt4projectmanager.qmake</value>
|
|
||||||
<value type="QString">trolltech.qt4projectmanager.make</value>
|
|
||||||
</valuelist>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>cleanstep0</variable>
|
|
||||||
<valuemap type="QVariantMap">
|
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
|
|
||||||
<value key="clean" type="bool">true</value>
|
|
||||||
</valuemap>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>cleansteps</variable>
|
|
||||||
<valuelist type="QVariantList">
|
|
||||||
<value type="QString">trolltech.qt4projectmanager.make</value>
|
|
||||||
</valuelist>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>defaultFileEncoding</variable>
|
|
||||||
<value type="QByteArray">UTF-8</value>
|
|
||||||
</data>
|
|
||||||
<data>
|
|
||||||
<variable>project</variable>
|
|
||||||
<valuemap type="QVariantMap"/>
|
|
||||||
</data>
|
</data>
|
||||||
</qtcreator>
|
</qtcreator>
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>RunConfiguration0-UserSetWorkingDirectory</variable>
|
<variable>RunConfiguration0-UserSetWorkingDirectory</variable>
|
||||||
<value type="bool">false</value>
|
<value type="bool">true</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>RunConfiguration0-UserWorkingDirectory</variable>
|
<variable>RunConfiguration0-UserWorkingDirectory</variable>
|
||||||
<value type="QString"></value>
|
<value type="QString">/home/andrey/AD/aliendefender</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>RunConfiguration0-type</variable>
|
<variable>RunConfiguration0-type</variable>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
||||||
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-7vJZaf9AwI,guid=f26a2301f932cefdec6dd3bc4c79669f</value>
|
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-2HAd2azpnh,guid=fd81c6d6610b4c57717ec20c4c90d3de</value>
|
||||||
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
||||||
<value type="QString">DESKTOP_SESSION=gnome</value>
|
<value type="QString">DESKTOP_SESSION=gnome</value>
|
||||||
<value type="QString">DISPLAY=:0.0</value>
|
<value type="QString">DISPLAY=:0.0</value>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
||||||
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
||||||
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
||||||
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-U899U4</value>
|
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-vNW3fv</value>
|
||||||
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
||||||
<value type="QString">HOME=/home/andrey</value>
|
<value type="QString">HOME=/home/andrey</value>
|
||||||
<value type="QString">LANG=ru_RU.UTF-8</value>
|
<value type="QString">LANG=ru_RU.UTF-8</value>
|
||||||
@@ -95,17 +95,17 @@
|
|||||||
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
||||||
<value type="QString">PWD=/home/andrey</value>
|
<value type="QString">PWD=/home/andrey</value>
|
||||||
<value type="QString">QTDIR=/usr/share/qt4</value>
|
<value type="QString">QTDIR=/usr/share/qt4</value>
|
||||||
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1236,unix/buull-eeePC:/tmp/.ICE-unix/1236</value>
|
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1158,unix/buull-eeePC:/tmp/.ICE-unix/1158</value>
|
||||||
<value type="QString">SHELL=/bin/bash</value>
|
<value type="QString">SHELL=/bin/bash</value>
|
||||||
<value type="QString">SPEECHD_PORT=6561</value>
|
<value type="QString">SPEECHD_PORT=6561</value>
|
||||||
<value type="QString">SSH_AGENT_PID=1270</value>
|
<value type="QString">SSH_AGENT_PID=1195</value>
|
||||||
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-U899U4/ssh</value>
|
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-vNW3fv/ssh</value>
|
||||||
<value type="QString">USER=andrey</value>
|
<value type="QString">USER=andrey</value>
|
||||||
<value type="QString">USERNAME=andrey</value>
|
<value type="QString">USERNAME=andrey</value>
|
||||||
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-6T6AjI/database</value>
|
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-Len9P0/database</value>
|
||||||
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
||||||
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
||||||
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1283024543.354844-1194058895</value>
|
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1284559837.801731-819619931</value>
|
||||||
</valuelist>
|
</valuelist>
|
||||||
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
||||||
<value type="QString">/home/andrey/AD/aliendefender/ADeditor/ADeditor.pro</value>
|
<value type="QString">/home/andrey/AD/aliendefender/ADeditor/ADeditor.pro</value>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
||||||
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-7vJZaf9AwI,guid=f26a2301f932cefdec6dd3bc4c79669f</value>
|
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-2HAd2azpnh,guid=fd81c6d6610b4c57717ec20c4c90d3de</value>
|
||||||
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
||||||
<value type="QString">DESKTOP_SESSION=gnome</value>
|
<value type="QString">DESKTOP_SESSION=gnome</value>
|
||||||
<value type="QString">DISPLAY=:0.0</value>
|
<value type="QString">DISPLAY=:0.0</value>
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
||||||
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
||||||
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
||||||
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-U899U4</value>
|
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-vNW3fv</value>
|
||||||
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
||||||
<value type="QString">HOME=/home/andrey</value>
|
<value type="QString">HOME=/home/andrey</value>
|
||||||
<value type="QString">LANG=ru_RU.UTF-8</value>
|
<value type="QString">LANG=ru_RU.UTF-8</value>
|
||||||
@@ -143,25 +143,29 @@
|
|||||||
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
||||||
<value type="QString">PWD=/home/andrey</value>
|
<value type="QString">PWD=/home/andrey</value>
|
||||||
<value type="QString">QTDIR=/usr/share/qt4</value>
|
<value type="QString">QTDIR=/usr/share/qt4</value>
|
||||||
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1236,unix/buull-eeePC:/tmp/.ICE-unix/1236</value>
|
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1158,unix/buull-eeePC:/tmp/.ICE-unix/1158</value>
|
||||||
<value type="QString">SHELL=/bin/bash</value>
|
<value type="QString">SHELL=/bin/bash</value>
|
||||||
<value type="QString">SPEECHD_PORT=6561</value>
|
<value type="QString">SPEECHD_PORT=6561</value>
|
||||||
<value type="QString">SSH_AGENT_PID=1270</value>
|
<value type="QString">SSH_AGENT_PID=1195</value>
|
||||||
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-U899U4/ssh</value>
|
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-vNW3fv/ssh</value>
|
||||||
<value type="QString">USER=andrey</value>
|
<value type="QString">USER=andrey</value>
|
||||||
<value type="QString">USERNAME=andrey</value>
|
<value type="QString">USERNAME=andrey</value>
|
||||||
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-6T6AjI/database</value>
|
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-Len9P0/database</value>
|
||||||
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
||||||
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
||||||
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1283024543.354844-1194058895</value>
|
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1284559837.801731-819619931</value>
|
||||||
</valuelist>
|
</valuelist>
|
||||||
<value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
|
<value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
|
||||||
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
||||||
|
<value type="QString">-j2</value>
|
||||||
<value type="QString">-w</value>
|
<value type="QString">-w</value>
|
||||||
</valuelist>
|
</valuelist>
|
||||||
<value key="abstractProcess.command" type="QString">/usr/bin/make</value>
|
<value key="abstractProcess.command" type="QString">/usr/bin/make</value>
|
||||||
<value key="abstractProcess.enabled" type="bool">true</value>
|
<value key="abstractProcess.enabled" type="bool">true</value>
|
||||||
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
<value key="abstractProcess.workingDirectory" type="QString">/home/andrey/AD/aliendefender/ADeditor</value>
|
||||||
|
<valuelist key="makeargs" type="QVariantList">
|
||||||
|
<value type="QString">-j2</value>
|
||||||
|
</valuelist>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
@@ -169,7 +173,7 @@
|
|||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
|
||||||
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
<valuelist key="abstractProcess.Environment" type="QVariantList">
|
||||||
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-7vJZaf9AwI,guid=f26a2301f932cefdec6dd3bc4c79669f</value>
|
<value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-wExeabp7q4,guid=18815993df3603fdc64a3f6d4c7b5822</value>
|
||||||
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
<value type="QString">DEFAULTS_PATH=/usr/share/gconf/gnome.default.path</value>
|
||||||
<value type="QString">DESKTOP_SESSION=gnome</value>
|
<value type="QString">DESKTOP_SESSION=gnome</value>
|
||||||
<value type="QString">DISPLAY=:0.0</value>
|
<value type="QString">DISPLAY=:0.0</value>
|
||||||
@@ -177,7 +181,7 @@
|
|||||||
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
<value type="QString">GDM_KEYBOARD_LAYOUT=us</value>
|
||||||
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
<value type="QString">GDM_LANG=ru_RU.UTF-8</value>
|
||||||
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
<value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
|
||||||
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-U899U4</value>
|
<value type="QString">GNOME_KEYRING_CONTROL=/tmp/keyring-4vN5uf</value>
|
||||||
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
<value type="QString">GTK_MODULES=canberra-gtk-module</value>
|
||||||
<value type="QString">HOME=/home/andrey</value>
|
<value type="QString">HOME=/home/andrey</value>
|
||||||
<value type="QString">LANG=ru_RU.UTF-8</value>
|
<value type="QString">LANG=ru_RU.UTF-8</value>
|
||||||
@@ -188,17 +192,17 @@
|
|||||||
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
<value type="QString">PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
|
||||||
<value type="QString">PWD=/home/andrey</value>
|
<value type="QString">PWD=/home/andrey</value>
|
||||||
<value type="QString">QTDIR=/usr/share/qt4</value>
|
<value type="QString">QTDIR=/usr/share/qt4</value>
|
||||||
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1236,unix/buull-eeePC:/tmp/.ICE-unix/1236</value>
|
<value type="QString">SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1205,unix/buull-eeePC:/tmp/.ICE-unix/1205</value>
|
||||||
<value type="QString">SHELL=/bin/bash</value>
|
<value type="QString">SHELL=/bin/bash</value>
|
||||||
<value type="QString">SPEECHD_PORT=6561</value>
|
<value type="QString">SPEECHD_PORT=6561</value>
|
||||||
<value type="QString">SSH_AGENT_PID=1270</value>
|
<value type="QString">SSH_AGENT_PID=1239</value>
|
||||||
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-U899U4/ssh</value>
|
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-4vN5uf/ssh</value>
|
||||||
<value type="QString">USER=andrey</value>
|
<value type="QString">USER=andrey</value>
|
||||||
<value type="QString">USERNAME=andrey</value>
|
<value type="QString">USERNAME=andrey</value>
|
||||||
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-6T6AjI/database</value>
|
<value type="QString">XAUTHORITY=/var/run/gdm/auth-for-andrey-x9URui/database</value>
|
||||||
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
<value type="QString">XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg</value>
|
||||||
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
<value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
|
||||||
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1283024543.354844-1194058895</value>
|
<value type="QString">XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1283151906.338331-318132279</value>
|
||||||
</valuelist>
|
</valuelist>
|
||||||
<value key="abstractProcess.IgnoreReturnValue" type="bool">true</value>
|
<value key="abstractProcess.IgnoreReturnValue" type="bool">true</value>
|
||||||
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
<valuelist key="abstractProcess.arguments" type="QVariantList">
|
||||||
@@ -274,7 +278,7 @@
|
|||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>defaultFileEncoding</variable>
|
<variable>defaultFileEncoding</variable>
|
||||||
<value type="QByteArray">System</value>
|
<value type="QByteArray">UTF-8</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>project</variable>
|
<variable>project</variable>
|
||||||
|
|||||||
@@ -10,4 +10,7 @@
|
|||||||
<file>icons/view-refresh.png</file>
|
<file>icons/view-refresh.png</file>
|
||||||
<file>icons/edit.png</file>
|
<file>icons/edit.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>../schema.xml</file>
|
||||||
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -1,35 +1,42 @@
|
|||||||
#include "animationmodel.h"
|
#include "animationmodel.h"
|
||||||
|
|
||||||
AnimationModel::AnimationModel(QList <tbAnimation> manims, QObject *parent) :
|
AnimationModel::AnimationModel(QHash <int,tbAnimation> &manims, QObject *parent) :
|
||||||
QAbstractListModel(parent)
|
QAbstractListModel(parent), anims(manims)
|
||||||
{
|
{
|
||||||
anims = manims;
|
// anims = manims;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AnimationModel::refresh(QList<tbAnimation>manims)
|
//void AnimationModel::refresh(QList<tbAnimation>manims)
|
||||||
{
|
//{
|
||||||
anims = manims;
|
// anims = manims;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
int AnimationModel::rowCount(const QModelIndex &) const
|
int AnimationModel::rowCount(const QModelIndex &) const
|
||||||
{
|
{
|
||||||
return anims.count();
|
return anims.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QVariant AnimationModel::data(const QModelIndex &index, int role) const
|
QVariant AnimationModel::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
if (!index.isValid())
|
if (!index.isValid()) return QVariant();
|
||||||
return QVariant();
|
if (index.row() >= anims.size()) return QVariant();
|
||||||
|
if (role == Qt::DisplayRole)
|
||||||
if (index.row() >= anims.size())
|
return tr("(%1) ").arg(anims.values().at(index.row()).id) + anims[anims.values().at(index.row()).id].name;
|
||||||
return QVariant();
|
if (role == Qt::EditRole)
|
||||||
|
return anims[anims.values().at(index.row()).id].name;
|
||||||
if (role == Qt::DisplayRole)
|
return QVariant();
|
||||||
{
|
}
|
||||||
return anims.at(index.row()).id;
|
|
||||||
}
|
|
||||||
return QVariant();
|
bool AnimationModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||||
|
{
|
||||||
|
if (role != Qt::EditRole) return false;
|
||||||
|
if (!index.isValid()) return false;
|
||||||
|
if (index.row() >= anims.size()) return false;
|
||||||
|
anims[anims.values().at(index.row()).id].name = value.toString();
|
||||||
|
emit dataChanged(index, index);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,17 +8,18 @@ class AnimationModel : public QAbstractListModel
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit AnimationModel(QList <tbAnimation> anims, QObject *parent = 0);
|
explicit AnimationModel(QHash <int,tbAnimation> &anims, QObject *parent = 0);
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||||
QVariant data(const QModelIndex &index, int role) const;
|
QVariant data(const QModelIndex &index, int role) const;
|
||||||
void refresh(QList <tbAnimation> anims);
|
// void refresh(QList <tbAnimation> &anims);
|
||||||
|
Qt::ItemFlags flags(const QModelIndex &) const {return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;}
|
||||||
|
bool setData(const QModelIndex &index, const QVariant &value, int role);
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList <tbAnimation> anims;
|
QHash <int,tbAnimation> &anims;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ANIMATIONMODEL_H
|
#endif // ANIMATIONMODEL_H
|
||||||
|
|||||||
@@ -6,1180 +6,1277 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
ui(new Ui::MainWindow)
|
ui(new Ui::MainWindow)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->pbSave->setIcon(QIcon::fromTheme("document-save", QIcon(":/icons/icons/document-save.png")));
|
ui->pbSave->setIcon(QIcon::fromTheme("document-save", QIcon(":/icons/icons/document-save.png")));
|
||||||
ui->pbReload->setIcon(QIcon::fromTheme("edit-undo", QIcon(":/icons/icons/edit-undo.png")));
|
ui->pbReload->setIcon(QIcon::fromTheme("edit-undo", QIcon(":/icons/icons/edit-undo.png")));
|
||||||
ui->pbAlAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
ui->pbAlAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
||||||
ui->pbAlDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
ui->pbAlDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
||||||
ui->pbTrigAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
ui->pbTrigAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
||||||
ui->pbTrigDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
ui->pbTrigDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
||||||
ui->pbTwAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
ui->pbTwAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
||||||
ui->pbTwDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
ui->pbTwDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
||||||
ui->pbMapAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
ui->pbMapAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
||||||
ui->pbMapDelete->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
ui->pbMapDelete->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
||||||
ui->pbSplAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
ui->pbSplAdd->setIcon(QIcon::fromTheme("list-add", QIcon(":/icons/icons/list-add.png")));
|
||||||
ui->pbSlpDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
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->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->pbAnimDel->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->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->pbImgDel->setIcon(QIcon::fromTheme("list-remove", QIcon(":/icons/icons/list-remove.png")));
|
||||||
ui->pbTwSplashEdit->setIcon(QIcon::fromTheme("edit", QIcon(":/icons/icons/edit.png")));
|
ui->pbTwSplashEdit->setIcon(QIcon::fromTheme("edit", QIcon(":/icons/icons/edit.png")));
|
||||||
ui->pbMapEdit->setIcon(QIcon::fromTheme("edit", QIcon(":/icons/icons/edit.png")));
|
ui->pbMapEdit->setIcon(QIcon::fromTheme("edit", QIcon(":/icons/icons/edit.png")));
|
||||||
adloader = new Loader(this);
|
adloader = new Loader(this);
|
||||||
adloader->load("data2.xml");
|
adloader->load("data2.xml");
|
||||||
|
|
||||||
animModel = new AnimationModel(adloader->animations.values());
|
animModel = new AnimationModel(adloader->animations);
|
||||||
ui->lvAnimations->setModel((QAbstractItemModel * )animModel);
|
ui->lvAnimations->setModel((QAbstractItemModel * )animModel);
|
||||||
connect(ui->lvAnimations->selectionModel(),SIGNAL(currentChanged(QModelIndex,QModelIndex)),this,SLOT(lvAnimations_select(QModelIndex, QModelIndex)));
|
connect(ui->lvAnimations->selectionModel(),SIGNAL(currentChanged(QModelIndex,QModelIndex)),this,SLOT(lvAnimations_select(QModelIndex, QModelIndex)));
|
||||||
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
|
|
||||||
mapScene = new QGraphicsScene();
|
mapScene = new QGraphicsScene();
|
||||||
ui->gvMap->setScene(mapScene);
|
ui->gvMap->setScene(mapScene);
|
||||||
ui->gvMap->scale(10,10);
|
ui->gvMap->scale(10,10);
|
||||||
|
|
||||||
mapModel = new MapModel(adloader->maps.values());
|
mapModel = new MapModel(adloader->maps.values());
|
||||||
ui->lvMaps->setModel((QAbstractItemModel * )mapModel);
|
ui->lvMaps->setModel((QAbstractItemModel * )mapModel);
|
||||||
connect(ui->lvMaps->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvMaps_select(QModelIndex, QModelIndex)));
|
connect(ui->lvMaps->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvMaps_select(QModelIndex, QModelIndex)));
|
||||||
ui->lvMaps->selectionModel()->setCurrentIndex(ui->lvMaps->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvMaps->selectionModel()->setCurrentIndex(ui->lvMaps->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
|
|
||||||
alModel = new AlienModel(adloader->aliens.values());
|
alModel = new AlienModel(adloader->aliens.values());
|
||||||
ui->lvAliens->setModel((QAbstractItemModel * )alModel);
|
ui->lvAliens->setModel((QAbstractItemModel * )alModel);
|
||||||
ui->cbAlImage->setModel((QAbstractItemModel * )animModel);
|
ui->cbAlImage->setModel((QAbstractItemModel * )animModel);
|
||||||
connect(ui->lvAliens->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvAliens_select(QModelIndex, QModelIndex)));
|
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);
|
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
|
|
||||||
splModel = new SplashModel(adloader->splashes.values());
|
splModel = new SplashModel(adloader->splashes.values());
|
||||||
ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
||||||
ui->cbSplImage->setModel((QAbstractItemModel * )animModel);
|
ui->cbSplImage->setModel((QAbstractItemModel * )animModel);
|
||||||
connect(ui->lvSplashes->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvSplashes_select(QModelIndex, QModelIndex)));
|
connect(ui->lvSplashes->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvSplashes_select(QModelIndex, QModelIndex)));
|
||||||
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
|
|
||||||
twModel = new TowerModel(adloader->towers.values());
|
twModel = new TowerModel(adloader->towers.values());
|
||||||
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
ui->lvTowers->setModel((QAbstractItemModel * )twModel);
|
||||||
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
||||||
ui->cbTwImage->setModel((QAbstractItemModel * )animModel);
|
ui->cbTwImage->setModel((QAbstractItemModel * )animModel);
|
||||||
connect(ui->lvTowers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTowers_select(QModelIndex, QModelIndex)));
|
connect(ui->lvTowers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTowers_select(QModelIndex, QModelIndex)));
|
||||||
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
|
|
||||||
trigModel = new TriggerModel(adloader->triggers.values());
|
trigModel = new TriggerModel(adloader->triggers.values());
|
||||||
ui->lvTriggers->setModel((QAbstractItemModel * )trigModel);
|
ui->lvTriggers->setModel((QAbstractItemModel * )trigModel);
|
||||||
connect(ui->lvTriggers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTriggers_select(QModelIndex,QModelIndex)));
|
connect(ui->lvTriggers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTriggers_select(QModelIndex,QModelIndex)));
|
||||||
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
ui->cbTrigChildAim->addItem(tr("no aim"),QVariant(srcTriggerType::noAim));
|
ui->cbTrigChildAim->addItem(tr("no aim"),QVariant(srcTriggerType::noAim));
|
||||||
ui->cbTrigChildAim->addItem(tr("random side"),QVariant(srcTriggerType::allSide));
|
ui->cbTrigChildAim->addItem(tr("random side"),QVariant(srcTriggerType::allSide));
|
||||||
ui->cbTrigChildAim->addItem(tr("parent aim"),QVariant(srcTriggerType::parentAim));
|
ui->cbTrigChildAim->addItem(tr("parent aim"),QVariant(srcTriggerType::parentAim));
|
||||||
ui->cbTrigChildAim->addItem(tr("nearlest alien"),QVariant(srcTriggerType::nearlestAlien));
|
ui->cbTrigChildAim->addItem(tr("nearest alien"),QVariant(srcTriggerType::nearestAlien));
|
||||||
ui->cbTrigType->addItem(tr("on destination"),QVariant(srcTriggerType::onDestination));
|
ui->cbTrigType->addItem(tr("on destination"),QVariant(srcTriggerType::onDestination));
|
||||||
ui->cbTrigType->addItem(tr("on alien in radius"),QVariant(srcTriggerType::onAlienInRadius));
|
ui->cbTrigType->addItem(tr("on alien in radius"),QVariant(srcTriggerType::onAlienInRadius));
|
||||||
ui->cbTrigType->addItem(tr("on timer"),QVariant(srcTriggerType::onTimer));
|
ui->cbTrigType->addItem(tr("on timer"),QVariant(srcTriggerType::onTimer));
|
||||||
isSaved = true;
|
isSaved = true;
|
||||||
QSettings sett("Alien_Defender","aliendefender");
|
QSettings sett("Alien_Defender","aliendefender");
|
||||||
this->restoreGeometry(sett.value("session/geometry").toByteArray());
|
this->restoreGeometry(sett.value("session/geometry").toByteArray());
|
||||||
this->restoreState(sett.value("session/mainwindow").toByteArray());
|
this->restoreState(sett.value("session/mainwindow").toByteArray());
|
||||||
ui->splitter->restoreState(sett.value("session/split1").toByteArray());
|
ui->splitter->restoreState(sett.value("session/split1").toByteArray());
|
||||||
ui->splitter_2->restoreState(sett.value("session/split2").toByteArray());
|
ui->splitter_2->restoreState(sett.value("session/split2").toByteArray());
|
||||||
ui->splitter_3->restoreState(sett.value("session/split3").toByteArray());
|
ui->splitter_3->restoreState(sett.value("session/split3").toByteArray());
|
||||||
ui->splitter_4->restoreState(sett.value("session/split4").toByteArray());
|
ui->splitter_4->restoreState(sett.value("session/split4").toByteArray());
|
||||||
ui->splitter_5->restoreState(sett.value("session/split5").toByteArray());
|
ui->splitter_5->restoreState(sett.value("session/split5").toByteArray());
|
||||||
ui->splitter_6->restoreState(sett.value("session/split6").toByteArray());
|
ui->splitter_6->restoreState(sett.value("session/split6").toByteArray());
|
||||||
ui->tabWidget->setCurrentIndex(sett.value("session/tab").toInt());
|
ui->tabWidget->setCurrentIndex(sett.value("session/tab").toInt());
|
||||||
//alb = new AnimLabel();
|
//alb = new AnimLabel();
|
||||||
//ui->verticalLayout->addWidget(alb);
|
//ui->verticalLayout->addWidget(alb);
|
||||||
//alb->setAnimation(adloader->animations.value(1).pathes);
|
//alb->setAnimation(adloader->animations.value(1).pathes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::changeEvent(QEvent *e)
|
void MainWindow::changeEvent(QEvent *e)
|
||||||
{
|
{
|
||||||
QMainWindow::changeEvent(e);
|
QMainWindow::changeEvent(e);
|
||||||
switch (e->type()) {
|
switch (e->type()) {
|
||||||
case QEvent::LanguageChange:
|
case QEvent::LanguageChange:
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbAlArmor_toggled(bool checked)
|
void MainWindow::on_cbAlArmor_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
float lval = adloader->aliens[id].armor;
|
float lval = adloader->aliens[id].armor;
|
||||||
ui->sbAlArmor->setEnabled(checked);
|
ui->sbAlArmor->setEnabled(checked);
|
||||||
if (checked) adloader->aliens[id].armor = ui->sbAlArmor->value();
|
if (checked) adloader->aliens[id].armor = ui->sbAlArmor->value();
|
||||||
else adloader->aliens[id].armor = 0;
|
else adloader->aliens[id].armor = 0;
|
||||||
if (lval != adloader->aliens[id].armor) isSaved = false;
|
if (lval != adloader->aliens[id].armor) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbAlRegeneration_toggled(bool checked)
|
void MainWindow::on_cbAlRegeneration_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
float lval = adloader->aliens[id].regeneration;
|
float lval = adloader->aliens[id].regeneration;
|
||||||
ui->sbAlregeneration->setEnabled(checked);
|
ui->sbAlregeneration->setEnabled(checked);
|
||||||
if (checked) adloader->aliens[id].regeneration = ui->sbAlregeneration->value();
|
if (checked) adloader->aliens[id].regeneration = ui->sbAlregeneration->value();
|
||||||
else adloader->aliens[id].regeneration = 0;
|
else adloader->aliens[id].regeneration = 0;
|
||||||
if (lval != adloader->aliens[id].regeneration) isSaved = false;
|
if (lval != adloader->aliens[id].regeneration) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::lvAnimations_select(QModelIndex index, QModelIndex)
|
void MainWindow::lvAnimations_select(QModelIndex index, QModelIndex)
|
||||||
{
|
{
|
||||||
if (index.isValid())
|
if (index.isValid())
|
||||||
{
|
{
|
||||||
ui->lwImages->clear();
|
ui->lwImages->clear();
|
||||||
refresh_lwImages(adloader->animations.values().at(index.row()).pathes);
|
refresh_lwImages(adloader->animations.values().at(index.row()).pathes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::lvAliens_select(QModelIndex index, QModelIndex)
|
void MainWindow::lvAliens_select(QModelIndex index, QModelIndex)
|
||||||
{
|
{
|
||||||
if (index.isValid())
|
if (index.isValid())
|
||||||
{
|
{
|
||||||
tbAlien al = adloader->aliens.values().at(index.row());
|
tbAlien al = adloader->aliens.values().at(index.row());
|
||||||
ui->leAlName->setText(al.name);
|
ui->leAlName->setText(al.name);
|
||||||
ui->sbAlHealth->setValue(al.health);
|
ui->sbAlHealth->setValue(al.health);
|
||||||
ui->sbAlArmor->setValue(al.armor);
|
ui->sbAlArmor->setValue(al.armor);
|
||||||
if (al.armor > 0) ui->cbAlArmor->setChecked(true);
|
if (al.armor > 0) ui->cbAlArmor->setChecked(true);
|
||||||
else ui->cbAlArmor->setChecked(false);
|
else ui->cbAlArmor->setChecked(false);
|
||||||
ui->sbAlSpeed->setValue(al.speed);
|
ui->sbAlSpeed->setValue(al.speed);
|
||||||
ui->sbAlPrise->setValue(al.prise);
|
ui->sbAlPrise->setValue(al.prise);
|
||||||
ui->sbAlregeneration->setValue(al.regeneration);
|
ui->sbAlregeneration->setValue(al.regeneration);
|
||||||
if (al.regeneration > 0) ui->cbAlRegeneration->setChecked(true);
|
if (al.regeneration > 0) ui->cbAlRegeneration->setChecked(true);
|
||||||
else ui->cbAlRegeneration->setChecked(false);
|
else ui->cbAlRegeneration->setChecked(false);
|
||||||
ui->sbAlScore->setValue(al.score);
|
ui->sbAlScore->setValue(al.score);
|
||||||
ui->cbAlIsFly->setChecked(al.isFlying);
|
ui->cbAlIsFly->setChecked(al.isFlying);
|
||||||
ui->cbAlImage->setCurrentIndex(adloader->animations.keys().indexOf(al.imgType));
|
ui->cbAlImage->setCurrentIndex(adloader->animations.keys().indexOf(al.imgType));
|
||||||
ui->lbAlAnim->setAnimation(adloader->animations.value(al.imgType).pathes);
|
ui->lbAlAnim->setAnimation(adloader->animations.value(al.imgType).pathes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::lvMaps_select(QModelIndex index, QModelIndex)
|
void MainWindow::lvMaps_select(QModelIndex index, QModelIndex)
|
||||||
{
|
{
|
||||||
if (index.isValid())
|
if (index.isValid())
|
||||||
{
|
{
|
||||||
tbMap map = adloader->maps.values().at(index.row());
|
tbMap map = adloader->maps.values().at(index.row());
|
||||||
ui->leMapName->setText(map.name);
|
ui->leMapName->setText(map.name);
|
||||||
ui->sbMapHei->setValue(map.size.height());
|
ui->sbMapHei->setValue(map.size.height());
|
||||||
ui->sbMapWid->setValue(map.size.width());
|
ui->sbMapWid->setValue(map.size.width());
|
||||||
ui->sbMapPlayers->setValue(map.maxPlayers);
|
ui->sbMapPlayers->setValue(map.maxPlayers);
|
||||||
Map m(map.data,map.size,map.name,map.maxPlayers,map.imgType);
|
Map m(map.data,map.size,map.name,map.maxPlayers,map.imgType);
|
||||||
QPixmap pix(map.size);
|
QPixmap pix(map.size);
|
||||||
QPainter p(&pix);
|
QPainter p(&pix);
|
||||||
p.fillRect(m.rect(),Qt::white);
|
p.fillRect(m.rect(),Qt::white);
|
||||||
for (int i=0; i<m.cells().size(); i++) {
|
for (int i=0; i<m.cells().size(); i++) {
|
||||||
for (int j=0; j<m.cells().at(i).size(); j++) {
|
for (int j=0; j<m.cells().at(i).size(); j++) {
|
||||||
QPen pen;
|
QPen pen;
|
||||||
pen.setColor(Qt::white);
|
pen.setColor(Qt::white);
|
||||||
int cel = m.cells().at(i).at(j);
|
int cel = m.cells().at(i).at(j);
|
||||||
if (cel == Map::Wall)
|
if (cel == Map::Wall)
|
||||||
pen.setColor(Qt::black);
|
pen.setColor(Qt::black);
|
||||||
if (cel >= Map::Free || (cel <= Map::PlayerTower && cel !=Map::Wall))
|
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,200));
|
pen.setColor(QColor(qAbs(cel+2)*345%255,(qAbs(cel+2)*721)%255,(qAbs(cel+2)*75)%255,200));
|
||||||
p.setPen(pen);
|
p.setPen(pen);
|
||||||
p.drawPoint(i,j);
|
p.drawPoint(i,j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p.end();
|
p.end();
|
||||||
mapScene->clear();
|
mapScene->clear();
|
||||||
mapScene->addPixmap(pix);
|
mapScene->addPixmap(pix);
|
||||||
ui->gvMap->centerOn(0,0);
|
ui->gvMap->centerOn(0,0);
|
||||||
//ui->gvMap->resetCachedContent();
|
//ui->gvMap->resetCachedContent();
|
||||||
//ui->pbMapEdit->setIcon(QIcon(pix));
|
//ui->pbMapEdit->setIcon(QIcon(pix));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::lvTowers_select(QModelIndex index, QModelIndex)
|
void MainWindow::lvTowers_select(QModelIndex index, QModelIndex)
|
||||||
{
|
{
|
||||||
if (index.isValid())
|
if (index.isValid())
|
||||||
{
|
{
|
||||||
tbTower tw = adloader->towers.values().at(index.row());
|
tbTower tw = adloader->towers.values().at(index.row());
|
||||||
ui->sbTwBuildTime->setValue(tw.buildTime);
|
ui->sbTwBuildTime->setValue(tw.buildTime);
|
||||||
ui->sbTwCost->setValue(tw.cost);
|
ui->sbTwCost->setValue(tw.cost);
|
||||||
ui->sbTwExpByDam->setValue(tw.expByDamage);
|
ui->sbTwExpByDam->setValue(tw.expByDamage);
|
||||||
if (tw.expByDamage > 0)
|
if (tw.expByDamage > 0)
|
||||||
ui->cbTwExpByDam->setChecked(true);
|
ui->cbTwExpByDam->setChecked(true);
|
||||||
else
|
else
|
||||||
ui->cbTwExpByDam->setChecked(false);
|
ui->cbTwExpByDam->setChecked(false);
|
||||||
ui->sbTwExpByKill->setValue(tw.expByKill);
|
ui->sbTwExpByKill->setValue(tw.expByKill);
|
||||||
if (tw.expByKill > 0)
|
if (tw.expByKill > 0)
|
||||||
ui->cbTwExpByKill->setChecked(true);
|
ui->cbTwExpByKill->setChecked(true);
|
||||||
else
|
else
|
||||||
ui->cbTwExpByKill->setChecked(false);
|
ui->cbTwExpByKill->setChecked(false);
|
||||||
ui->sbTwExpByShot->setValue(tw.expByShot);
|
ui->sbTwExpByShot->setValue(tw.expByShot);
|
||||||
if (tw.expByShot > 0)
|
if (tw.expByShot > 0)
|
||||||
ui->cbTwExpByShot->setChecked(true);
|
ui->cbTwExpByShot->setChecked(true);
|
||||||
else
|
else
|
||||||
ui->cbTwExpByShot->setChecked(false);
|
ui->cbTwExpByShot->setChecked(false);
|
||||||
ui->leTwName->setText(tw.name);
|
ui->leTwName->setText(tw.name);
|
||||||
ui->sbTwRadius->setValue(tw.radius);
|
ui->sbTwRadius->setValue(tw.radius);
|
||||||
ui->sbTwReload->setValue(tw.reload);
|
ui->sbTwReload->setValue(tw.reload);
|
||||||
ui->cbTwSplash->setCurrentIndex(adloader->splashes.keys().indexOf(tw.splashId));
|
ui->cbTwSplash->setCurrentIndex(adloader->splashes.keys().indexOf(tw.splashId));
|
||||||
ui->cbTwImage->setCurrentIndex(adloader->animations.keys().indexOf(tw.imgType));
|
ui->cbTwImage->setCurrentIndex(adloader->animations.keys().indexOf(tw.imgType));
|
||||||
ui->lbTwAnim->setAnimation(adloader->animations.value(tw.imgType).pathes);
|
ui->lbTwAnim->setAnimation(adloader->animations.value(tw.imgType).pathes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::lvSplashes_select(QModelIndex index, QModelIndex)
|
void MainWindow::lvSplashes_select(QModelIndex index, QModelIndex)
|
||||||
{
|
{
|
||||||
if (index.isValid())
|
if (index.isValid())
|
||||||
{
|
{
|
||||||
tbSplash spl = adloader->splashes.values().at(index.row());
|
tbSplash spl = adloader->splashes.values().at(index.row());
|
||||||
ui->sbSplLifeTime->setValue(spl.lifetime);
|
ui->sbSplLifeTime->setValue(spl.lifetime);
|
||||||
ui->sbSplSpeed->setValue(spl.speed);
|
ui->sbSplSpeed->setValue(spl.speed);
|
||||||
ui->cbSplAutoControl->setChecked(spl.autoControl);
|
ui->cbSplAutoControl->setChecked(spl.autoControl);
|
||||||
ui->leSplName->setText(spl.name);
|
ui->cbSplKeepOnAlien->setChecked(spl.keepOnAlien);
|
||||||
ui->cbSplImage->setCurrentIndex(adloader->animations.keys().indexOf(spl.imgType));
|
ui->leSplName->setText(spl.name);
|
||||||
ui->lbSplAnim->setAnimation(adloader->animations.value(spl.imgType).pathes);
|
ui->cbSplImage->setCurrentIndex(adloader->animations.keys().indexOf(spl.imgType));
|
||||||
}
|
ui->lbSplAnim->setAnimation(adloader->animations.value(spl.imgType).pathes);
|
||||||
|
switch (spl.compositionMode)
|
||||||
|
{
|
||||||
|
case QPainter::RasterOp_NotSource :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(1);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_Plus :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(2);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_Multiply :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(3);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_Screen :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(4);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_Darken :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(5);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_Lighten :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(6);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_ColorDodge :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(7);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_ColorBurn :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(8);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_HardLight :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(9);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_SoftLight :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(10);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_Difference :
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(11);
|
||||||
|
break;
|
||||||
|
case QPainter::CompositionMode_SourceOver :
|
||||||
|
default:
|
||||||
|
ui->cbSplCompisitionMode->setCurrentIndex(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::lvTriggers_select(QModelIndex index, QModelIndex)
|
void MainWindow::lvTriggers_select(QModelIndex index, QModelIndex)
|
||||||
{
|
{
|
||||||
if (index.isValid())
|
if (index.isValid())
|
||||||
{
|
{
|
||||||
tbTrigger trig = adloader->triggers.values().at(index.row());
|
tbTrigger trig = adloader->triggers.values().at(index.row());
|
||||||
ui->sbTrigCount->setValue(trig.count);
|
ui->sbTrigCount->setValue(trig.count);
|
||||||
if (trig.count > 0)
|
if (trig.count > 0)
|
||||||
ui->cbTrigCount->setChecked(true);
|
ui->cbTrigCount->setChecked(true);
|
||||||
else
|
else
|
||||||
ui->cbTrigCount->setChecked(false);
|
ui->cbTrigCount->setChecked(false);
|
||||||
ui->sbTrigDamage->setValue(trig.damage);
|
ui->sbTrigDamage->setValue(trig.damage);
|
||||||
if (trig.damage > 0)
|
if (trig.damage > 0)
|
||||||
ui->cbTrigDamage->setChecked(true);
|
ui->cbTrigDamage->setChecked(true);
|
||||||
else
|
else
|
||||||
ui->cbTrigDamage->setChecked(false);
|
ui->cbTrigDamage->setChecked(false);
|
||||||
ui->sbTrigDamRadius->setValue(trig.radius);
|
ui->sbTrigDamRadius->setValue(trig.radius);
|
||||||
if (trig.radius > 0)
|
if (trig.radius > 0)
|
||||||
ui->cbTrigDamRad->setChecked(true);
|
ui->cbTrigDamRad->setChecked(true);
|
||||||
else
|
else
|
||||||
ui->cbTrigDamRad->setChecked(false);
|
ui->cbTrigDamRad->setChecked(false);
|
||||||
ui->sbTrigChance->setValue(trig.chance);
|
ui->sbTrigChance->setValue(trig.chance);
|
||||||
if (trig.chance == 100)
|
if (trig.chance == 100)
|
||||||
ui->cbTrigChance->setChecked(false);
|
ui->cbTrigChance->setChecked(false);
|
||||||
else
|
else
|
||||||
ui->cbTrigChance->setChecked(true);
|
ui->cbTrigChance->setChecked(true);
|
||||||
ui->sbTrigRandomRadius->setValue(trig.randomPosRadius);
|
ui->sbTrigRandomRadius->setValue(trig.randomPosRadius);
|
||||||
if (trig.randomPosRadius > 0)
|
if (trig.randomPosRadius > 0)
|
||||||
ui->cbTrigRandRadius->setChecked(true);
|
ui->cbTrigRandRadius->setChecked(true);
|
||||||
else
|
else
|
||||||
ui->cbTrigRandRadius->setChecked(false);
|
ui->cbTrigRandRadius->setChecked(false);
|
||||||
|
|
||||||
ui->sbTrigTimer->setValue(trig.timer);
|
ui->sbTrigTimer->setValue(trig.timer);
|
||||||
switch (trig.type)
|
switch (trig.type)
|
||||||
{
|
{
|
||||||
case srcTriggerType::onDestination :
|
case srcTriggerType::onDestination :
|
||||||
ui->cbTrigType->setCurrentIndex(0);
|
ui->cbTrigType->setCurrentIndex(0);
|
||||||
break;
|
break;
|
||||||
case srcTriggerType::onAlienInRadius :
|
case srcTriggerType::onAlienInRadius :
|
||||||
ui->cbTrigType->setCurrentIndex(1);
|
ui->cbTrigType->setCurrentIndex(1);
|
||||||
break;
|
break;
|
||||||
case srcTriggerType::onTimer :
|
case srcTriggerType::onTimer :
|
||||||
ui->cbTrigType->setCurrentIndex(2);
|
ui->cbTrigType->setCurrentIndex(2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (trig.type != srcTriggerType::onTimer)
|
if (trig.type != srcTriggerType::onTimer)
|
||||||
{
|
{
|
||||||
ui->lbTrigTimer->setVisible(false);
|
ui->lbTrigTimer->setVisible(false);
|
||||||
ui->sbTrigTimer->setVisible(false);
|
ui->sbTrigTimer->setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
ui->lbTrigTimer->setVisible(true);
|
ui->lbTrigTimer->setVisible(true);
|
||||||
ui->sbTrigTimer->setVisible(true);
|
ui->sbTrigTimer->setVisible(true);
|
||||||
}
|
}
|
||||||
switch (trig.childAim)
|
switch (trig.childAim)
|
||||||
{
|
{
|
||||||
case srcTriggerType::noAim :
|
case srcTriggerType::noAim :
|
||||||
ui->cbTrigChildAim->setCurrentIndex(0);
|
ui->cbTrigChildAim->setCurrentIndex(0);
|
||||||
break;
|
break;
|
||||||
case srcTriggerType::allSide :
|
case srcTriggerType::allSide :
|
||||||
ui->cbTrigChildAim->setCurrentIndex(1);
|
ui->cbTrigChildAim->setCurrentIndex(1);
|
||||||
break;
|
break;
|
||||||
case srcTriggerType::parentAim :
|
case srcTriggerType::parentAim :
|
||||||
ui->cbTrigChildAim->setCurrentIndex(2);
|
ui->cbTrigChildAim->setCurrentIndex(2);
|
||||||
break;
|
break;
|
||||||
case srcTriggerType::nearlestAlien :
|
case srcTriggerType::nearestAlien :
|
||||||
ui->cbTrigChildAim->setCurrentIndex(3);
|
ui->cbTrigChildAim->setCurrentIndex(3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ui->leTrigName->setText(trig.name);
|
ui->leTrigName->setText(trig.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *event)
|
void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
QSettings sett("Alien_Defender","aliendefender");
|
QSettings sett("Alien_Defender","aliendefender");
|
||||||
sett.setValue("session/geometry",this->saveGeometry());
|
sett.setValue("session/geometry",this->saveGeometry());
|
||||||
sett.setValue("session/mainwindow",this->saveState());
|
sett.setValue("session/mainwindow",this->saveState());
|
||||||
sett.setValue("session/split1",ui->splitter->saveState());
|
sett.setValue("session/split1",ui->splitter->saveState());
|
||||||
sett.setValue("session/split2",ui->splitter_2->saveState());
|
sett.setValue("session/split2",ui->splitter_2->saveState());
|
||||||
sett.setValue("session/split3",ui->splitter_3->saveState());
|
sett.setValue("session/split3",ui->splitter_3->saveState());
|
||||||
sett.setValue("session/split4",ui->splitter_4->saveState());
|
sett.setValue("session/split4",ui->splitter_4->saveState());
|
||||||
sett.setValue("session/split5",ui->splitter_5->saveState());
|
sett.setValue("session/split5",ui->splitter_5->saveState());
|
||||||
sett.setValue("session/split6",ui->splitter_6->saveState());
|
sett.setValue("session/split6",ui->splitter_6->saveState());
|
||||||
sett.setValue("session/tab",ui->tabWidget->currentIndex());
|
sett.setValue("session/tab",ui->tabWidget->currentIndex());
|
||||||
if (!isSaved)
|
if (!isSaved)
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText(tr("Save changes?"));
|
msgBox.setText(tr("Save changes?"));
|
||||||
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Save);
|
msgBox.setDefaultButton(QMessageBox::Save);
|
||||||
msgBox.setEscapeButton(QMessageBox::Discard);
|
msgBox.setEscapeButton(QMessageBox::Discard);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
switch (ret)
|
switch (ret)
|
||||||
{
|
{
|
||||||
case QMessageBox::Save :
|
case QMessageBox::Save :
|
||||||
adloader->save("data2.xml");
|
adloader->save("data2.xml");
|
||||||
adloader->load("data2.xml");
|
adloader->load("data2.xml");
|
||||||
adloader->save("data2.xml");
|
adloader->save("data2.xml");
|
||||||
event->accept();
|
event->accept();
|
||||||
break;
|
break;
|
||||||
case QMessageBox::Cancel :
|
case QMessageBox::Cancel :
|
||||||
event->ignore();
|
event->ignore();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
event->accept();
|
event->accept();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_pbSave_clicked()
|
void MainWindow::on_pbSave_clicked()
|
||||||
{
|
{
|
||||||
adloader->save("data2.xml");
|
adloader->save("data2.xml");
|
||||||
adloader->load("data2.xml");
|
adloader->load("data2.xml");
|
||||||
adloader->save("data2.xml");
|
adloader->save("data2.xml");
|
||||||
isSaved = true;
|
isSaved = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbReload_clicked()
|
void MainWindow::on_pbReload_clicked()
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
msgBox.setText(tr("All unsaved changes will be lost"));
|
msgBox.setText(tr("All unsaved changes will be lost"));
|
||||||
msgBox.setInformativeText(tr("Are you sure?"));
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
if (ret == QMessageBox::Ok)
|
if (ret == QMessageBox::Ok)
|
||||||
{
|
{
|
||||||
adloader->load("data2.xml");
|
adloader->load("data2.xml");
|
||||||
alModel->refresh(adloader->aliens.values());
|
alModel->refresh(adloader->aliens.values());
|
||||||
twModel->refresh(adloader->towers.values());
|
twModel->refresh(adloader->towers.values());
|
||||||
splModel->refresh(adloader->splashes.values());
|
splModel->refresh(adloader->splashes.values());
|
||||||
trigModel->refresh(adloader->triggers.values());
|
trigModel->refresh(adloader->triggers.values());
|
||||||
animModel->refresh(adloader->animations.values());
|
// animModel->refresh(adloader->animations.values());
|
||||||
mapModel->refresh(adloader->maps.values());
|
mapModel->refresh(adloader->maps.values());
|
||||||
ui->lvAnimations->reset();
|
ui->lvAnimations->reset();
|
||||||
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
ui->lvMaps->reset();
|
ui->lvMaps->reset();
|
||||||
ui->lvMaps->selectionModel()->setCurrentIndex(ui->lvMaps->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvMaps->selectionModel()->setCurrentIndex(ui->lvMaps->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
ui->lvAliens->reset();
|
ui->lvAliens->reset();
|
||||||
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
ui->lvSplashes->reset();
|
ui->lvSplashes->reset();
|
||||||
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
ui->lvTowers->reset();
|
ui->lvTowers->reset();
|
||||||
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
ui->lvTriggers->reset();
|
ui->lvTriggers->reset();
|
||||||
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = true;
|
isSaved = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlHealth_valueChanged(double value)
|
void MainWindow::on_sbAlHealth_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
float lval = adloader->aliens[id].health;
|
float lval = adloader->aliens[id].health;
|
||||||
adloader->aliens[id].health = value;
|
adloader->aliens[id].health = value;
|
||||||
if (lval != adloader->aliens[id].health) isSaved = false;
|
if (lval != adloader->aliens[id].health) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlArmor_valueChanged(double value)
|
void MainWindow::on_sbAlArmor_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
float lval = adloader->aliens[id].armor;
|
float lval = adloader->aliens[id].armor;
|
||||||
adloader->aliens[id].armor = value;
|
adloader->aliens[id].armor = value;
|
||||||
if (lval != adloader->aliens[id].armor) isSaved = false;
|
if (lval != adloader->aliens[id].armor) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlregeneration_valueChanged(double value)
|
void MainWindow::on_sbAlregeneration_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
float lval = adloader->aliens[id].regeneration;
|
float lval = adloader->aliens[id].regeneration;
|
||||||
adloader->aliens[id].regeneration = value;
|
adloader->aliens[id].regeneration = value;
|
||||||
if (lval != adloader->aliens[id].regeneration) isSaved = false;
|
if (lval != adloader->aliens[id].regeneration) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlSpeed_valueChanged(double value)
|
void MainWindow::on_sbAlSpeed_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
float lval = adloader->aliens[id].speed;
|
float lval = adloader->aliens[id].speed;
|
||||||
adloader->aliens[id].speed = value;
|
adloader->aliens[id].speed = value;
|
||||||
if (lval != adloader->aliens[id].speed) isSaved = false;
|
if (lval != adloader->aliens[id].speed) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlPrise_valueChanged(int val)
|
void MainWindow::on_sbAlPrise_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
unsigned int lval = adloader->aliens[id].prise;
|
unsigned int lval = adloader->aliens[id].prise;
|
||||||
adloader->aliens[id].prise = val;
|
adloader->aliens[id].prise = val;
|
||||||
if (lval != adloader->aliens[id].prise) isSaved = false;
|
if (lval != adloader->aliens[id].prise) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbAlScore_valueChanged(int val)
|
void MainWindow::on_sbAlScore_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
unsigned int lval = adloader->aliens[id].score;
|
unsigned int lval = adloader->aliens[id].score;
|
||||||
adloader->aliens[id].score = val;
|
adloader->aliens[id].score = val;
|
||||||
if (lval != adloader->aliens[id].score) isSaved = false;
|
if (lval != adloader->aliens[id].score) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbAlIsFly_toggled(bool checked)
|
void MainWindow::on_cbAlIsFly_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
bool lval = adloader->aliens[id].isFlying;
|
bool lval = adloader->aliens[id].isFlying;
|
||||||
adloader->aliens[id].isFlying = checked;
|
adloader->aliens[id].isFlying = checked;
|
||||||
if (lval != adloader->aliens[id].isFlying) isSaved = false;
|
if (lval != adloader->aliens[id].isFlying) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_leAlName_editingFinished()
|
void MainWindow::on_leAlName_editingFinished()
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
QString lval = adloader->aliens[id].name;
|
QString lval = adloader->aliens[id].name;
|
||||||
adloader->aliens[id].name = ui->leAlName->text();
|
adloader->aliens[id].name = ui->leAlName->text();
|
||||||
alModel->refresh(adloader->aliens.values());
|
alModel->refresh(adloader->aliens.values());
|
||||||
QModelIndex mindex = ui->lvAliens->currentIndex();
|
QModelIndex mindex = ui->lvAliens->currentIndex();
|
||||||
ui->lvAliens->reset();
|
ui->lvAliens->reset();
|
||||||
ui->lvAliens->setCurrentIndex(mindex);
|
ui->lvAliens->setCurrentIndex(mindex);
|
||||||
if (lval != adloader->aliens[id].name) isSaved = false;
|
if (lval != adloader->aliens[id].name) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbAlAdd_clicked()
|
void MainWindow::on_pbAlAdd_clicked()
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (adloader->aliens.contains(i)) i++;
|
while (adloader->aliens.contains(i)) i++;
|
||||||
tbAlien al;
|
tbAlien al;
|
||||||
al.id = i;
|
al.id = i;
|
||||||
al.name = tr("Alien");
|
al.name = tr("Alien");
|
||||||
al.health = 1;
|
al.health = 1;
|
||||||
al.prise = 0;
|
al.prise = 0;
|
||||||
al.score = 1;
|
al.score = 1;
|
||||||
al.speed = 1;
|
al.speed = 1;
|
||||||
adloader->aliens.insert(al.id,al);
|
adloader->aliens.insert(al.id,al);
|
||||||
int index = adloader->aliens.keys().indexOf(i);
|
int index = adloader->aliens.keys().indexOf(i);
|
||||||
alModel->refresh(adloader->aliens.values());
|
alModel->refresh(adloader->aliens.values());
|
||||||
ui->lvAliens->reset();
|
ui->lvAliens->reset();
|
||||||
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbAlDel_clicked()
|
void MainWindow::on_pbAlDel_clicked()
|
||||||
{
|
{
|
||||||
if (adloader->aliens.size() < 2) return;
|
if (adloader->aliens.size() < 2) return;
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
int id = adloader->aliens.keys().at(ui->lvAliens->currentIndex().row());
|
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->waveParts.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->waveParts.values().at(i).alienId == id)
|
if (adloader->waveParts.values().at(i).alienId == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete alien %1 id=%2").arg(adloader->aliens.value(id).name).arg(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->waveParts.values().at(i).waveId));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msgBox.setText(tr("Delete alien %1 id=%2").arg(adloader->aliens.value(id).name).arg(id));
|
msgBox.setText(tr("Delete alien %1 id=%2").arg(adloader->aliens.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("Are you sure?"));
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
if (ret == QMessageBox::Ok)
|
if (ret == QMessageBox::Ok)
|
||||||
{
|
{
|
||||||
adloader->aliens.remove(id);
|
adloader->aliens.remove(id);
|
||||||
alModel->refresh(adloader->aliens.values());
|
alModel->refresh(adloader->aliens.values());
|
||||||
ui->lvAliens->reset();
|
ui->lvAliens->reset();
|
||||||
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_leTwName_editingFinished()
|
void MainWindow::on_leTwName_editingFinished()
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
QString lval = adloader->towers[id].name;
|
QString lval = adloader->towers[id].name;
|
||||||
adloader->towers[id].name = ui->leTwName->text();
|
adloader->towers[id].name = ui->leTwName->text();
|
||||||
twModel->refresh(adloader->towers.values());
|
twModel->refresh(adloader->towers.values());
|
||||||
QModelIndex mindex = ui->lvTowers->currentIndex();
|
QModelIndex mindex = ui->lvTowers->currentIndex();
|
||||||
ui->lvTowers->reset();
|
ui->lvTowers->reset();
|
||||||
ui->lvTowers->setCurrentIndex(mindex);
|
ui->lvTowers->setCurrentIndex(mindex);
|
||||||
if (lval != adloader->towers[id].name) isSaved = false;
|
if (lval != adloader->towers[id].name) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTwBuildTime_valueChanged(int val)
|
void MainWindow::on_sbTwBuildTime_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
unsigned int lval = adloader->towers[id].buildTime;
|
unsigned int lval = adloader->towers[id].buildTime;
|
||||||
adloader->towers[id].buildTime = val;
|
adloader->towers[id].buildTime = val;
|
||||||
if (lval != adloader->towers[id].buildTime) isSaved = false;
|
if (lval != adloader->towers[id].buildTime) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTwCost_valueChanged(int val)
|
void MainWindow::on_sbTwCost_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
unsigned int lval = adloader->towers[id].cost;
|
unsigned int lval = adloader->towers[id].cost;
|
||||||
adloader->towers[id].cost = val;
|
adloader->towers[id].cost = val;
|
||||||
if (lval != adloader->towers[id].cost) isSaved = false;
|
if (lval != adloader->towers[id].cost) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTwSplash_currentIndexChanged(int index)
|
void MainWindow::on_cbTwSplash_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
if (!ui->lvTowers->currentIndex().isValid()) return;
|
if (!ui->lvTowers->currentIndex().isValid()) return;
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
int lval = adloader->towers[id].splashId;
|
int lval = adloader->towers[id].splashId;
|
||||||
adloader->towers[id].splashId = adloader->splashes.values().at(index).id;
|
adloader->towers[id].splashId = adloader->splashes.values().at(index).id;
|
||||||
if (lval != adloader->towers[id].splashId) isSaved = false;
|
if (lval != adloader->towers[id].splashId) isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_sbTwReload_valueChanged(int val)
|
void MainWindow::on_sbTwReload_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
unsigned int lval = adloader->towers[id].reload;
|
unsigned int lval = adloader->towers[id].reload;
|
||||||
adloader->towers[id].reload = val;
|
adloader->towers[id].reload = val;
|
||||||
if (lval != adloader->towers[id].reload) isSaved = false;
|
if (lval != adloader->towers[id].reload) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTwRadius_valueChanged(double val)
|
void MainWindow::on_sbTwRadius_valueChanged(double val)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
float lval = adloader->towers[id].radius;
|
float lval = adloader->towers[id].radius;
|
||||||
adloader->towers[id].radius = val;
|
adloader->towers[id].radius = val;
|
||||||
if (lval != adloader->towers[id].radius) isSaved = false;
|
if (lval != adloader->towers[id].radius) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTwExpByShot_valueChanged(double val)
|
void MainWindow::on_sbTwExpByShot_valueChanged(double val)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
float lval = adloader->towers[id].expByShot;
|
float lval = adloader->towers[id].expByShot;
|
||||||
adloader->towers[id].expByShot = val;
|
adloader->towers[id].expByShot = val;
|
||||||
if (lval != adloader->towers[id].expByShot) isSaved = false;
|
if (lval != adloader->towers[id].expByShot) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTwExpByShot_toggled(bool checked)
|
void MainWindow::on_cbTwExpByShot_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
float lval = adloader->towers[id].expByShot;
|
float lval = adloader->towers[id].expByShot;
|
||||||
ui->sbTwExpByShot->setEnabled(checked);
|
ui->sbTwExpByShot->setEnabled(checked);
|
||||||
if (checked) adloader->towers[id].expByShot = ui->sbTwExpByShot->value();
|
if (checked) adloader->towers[id].expByShot = ui->sbTwExpByShot->value();
|
||||||
else adloader->towers[id].expByShot = 0;
|
else adloader->towers[id].expByShot = 0;
|
||||||
if (lval != adloader->towers[id].expByShot) isSaved = false;
|
if (lval != adloader->towers[id].expByShot) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTwExpByDam_valueChanged(double val)
|
void MainWindow::on_sbTwExpByDam_valueChanged(double val)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
float lval = adloader->towers[id].expByDamage;
|
float lval = adloader->towers[id].expByDamage;
|
||||||
adloader->towers[id].expByDamage = val;
|
adloader->towers[id].expByDamage = val;
|
||||||
if (lval != adloader->towers[id].expByDamage) isSaved = false;
|
if (lval != adloader->towers[id].expByDamage) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTwExpByDam_toggled(bool checked)
|
void MainWindow::on_cbTwExpByDam_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
float lval = adloader->towers[id].expByDamage;
|
float lval = adloader->towers[id].expByDamage;
|
||||||
ui->sbTwExpByDam->setEnabled(checked);
|
ui->sbTwExpByDam->setEnabled(checked);
|
||||||
if (checked) adloader->towers[id].expByDamage = ui->sbTwExpByDam->value();
|
if (checked) adloader->towers[id].expByDamage = ui->sbTwExpByDam->value();
|
||||||
else adloader->towers[id].expByDamage = 0;
|
else adloader->towers[id].expByDamage = 0;
|
||||||
if (lval != adloader->towers[id].expByDamage) isSaved = false;
|
if (lval != adloader->towers[id].expByDamage) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTwExpByKill_valueChanged(double val)
|
void MainWindow::on_sbTwExpByKill_valueChanged(double val)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
float lval = adloader->towers[id].expByKill;
|
float lval = adloader->towers[id].expByKill;
|
||||||
adloader->towers[id].expByKill = val;
|
adloader->towers[id].expByKill = val;
|
||||||
if (lval != adloader->towers[id].expByKill) isSaved = false;
|
if (lval != adloader->towers[id].expByKill) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTwExpByKill_toggled(bool checked)
|
void MainWindow::on_cbTwExpByKill_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
float lval = adloader->towers[id].expByKill;
|
float lval = adloader->towers[id].expByKill;
|
||||||
ui->sbTwExpByKill->setEnabled(checked);
|
ui->sbTwExpByKill->setEnabled(checked);
|
||||||
if (checked) adloader->towers[id].expByKill = ui->sbTwExpByKill->value();
|
if (checked) adloader->towers[id].expByKill = ui->sbTwExpByKill->value();
|
||||||
else adloader->towers[id].expByKill = 0;
|
else adloader->towers[id].expByKill = 0;
|
||||||
if (lval != adloader->towers[id].expByKill) isSaved = false;
|
if (lval != adloader->towers[id].expByKill) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbTwAdd_clicked()
|
void MainWindow::on_pbTwAdd_clicked()
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (adloader->towers.contains(i)) i++;
|
while (adloader->towers.contains(i)) i++;
|
||||||
tbTower tw;
|
tbTower tw;
|
||||||
tw.id = i;
|
tw.id = i;
|
||||||
tw.name = tr("Tower");
|
tw.name = tr("Tower");
|
||||||
tw.splashId = adloader->splashes.keys().at(0);
|
tw.splashId = adloader->splashes.keys().at(0);
|
||||||
tw.buildTime = 1;
|
tw.buildTime = 1;
|
||||||
tw.cost = 1;
|
tw.cost = 1;
|
||||||
tw.radius = 1;
|
tw.radius = 1;
|
||||||
tw.reload = 1;
|
tw.reload = 1;
|
||||||
adloader->towers.insert(tw.id,tw);
|
adloader->towers.insert(tw.id,tw);
|
||||||
int index = adloader->towers.keys().indexOf(i);
|
int index = adloader->towers.keys().indexOf(i);
|
||||||
twModel->refresh(adloader->towers.values());
|
twModel->refresh(adloader->towers.values());
|
||||||
ui->lvTowers->reset();
|
ui->lvTowers->reset();
|
||||||
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbTwDel_clicked()
|
void MainWindow::on_pbTwDel_clicked()
|
||||||
{
|
{
|
||||||
if (adloader->towers.size() < 2) return;
|
if (adloader->towers.size() < 2) return;
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
int id = adloader->towers.keys().at(ui->lvTowers->currentIndex().row());
|
int id = adloader->towers.keys().at(ui->lvTowers->currentIndex().row());
|
||||||
for (int i=0; i<adloader->levTowers.size(); i++)
|
for (int i=0; i<adloader->levTowers.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->levTowers.values().at(i).towerId == id)
|
if (adloader->levTowers.values().at(i).towerId == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete tower %1 id=%2").arg(adloader->towers.value(id).name).arg(id));
|
msgBox.setText(tr("You can not delete tower %1 id=%2").arg(adloader->towers.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("It used in level %1").arg(adloader->levTowers.values().at(i).levelId));
|
msgBox.setInformativeText(tr("It used in level %1").arg(adloader->levTowers.values().at(i).levelId));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msgBox.setText(tr("Delete tower %1 id=%2").arg(adloader->towers.value(id).name).arg(id));
|
msgBox.setText(tr("Delete tower %1 id=%2").arg(adloader->towers.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("Are you sure?"));
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
if (ret == QMessageBox::Ok)
|
if (ret == QMessageBox::Ok)
|
||||||
{
|
{
|
||||||
adloader->towers.remove(id);
|
adloader->towers.remove(id);
|
||||||
twModel->refresh(adloader->towers.values());
|
twModel->refresh(adloader->towers.values());
|
||||||
ui->lvTowers->reset();
|
ui->lvTowers->reset();
|
||||||
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_leSplName_editingFinished()
|
void MainWindow::on_leSplName_editingFinished()
|
||||||
{
|
{
|
||||||
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
QString lval = adloader->splashes[id].name;
|
QString lval = adloader->splashes[id].name;
|
||||||
adloader->splashes[id].name = ui->leSplName->text();
|
adloader->splashes[id].name = ui->leSplName->text();
|
||||||
splModel->refresh(adloader->splashes.values());
|
splModel->refresh(adloader->splashes.values());
|
||||||
//ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
//ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
|
||||||
//ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
//ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
|
||||||
QModelIndex mindex = ui->lvSplashes->currentIndex();
|
QModelIndex mindex = ui->lvSplashes->currentIndex();
|
||||||
ui->lvSplashes->reset();
|
ui->lvSplashes->reset();
|
||||||
ui->lvSplashes->setCurrentIndex(mindex);
|
ui->lvSplashes->setCurrentIndex(mindex);
|
||||||
if (lval != adloader->splashes[id].name) isSaved = false;
|
if (lval != adloader->splashes[id].name) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbSplSpeed_valueChanged(double val)
|
void MainWindow::on_sbSplSpeed_valueChanged(double val)
|
||||||
{
|
{
|
||||||
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
float lval = adloader->splashes[id].speed;
|
float lval = adloader->splashes[id].speed;
|
||||||
adloader->splashes[id].speed = val;
|
adloader->splashes[id].speed = val;
|
||||||
if (lval != adloader->splashes[id].speed) isSaved = false;
|
if (lval != adloader->splashes[id].speed) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbSplAutoControl_toggled(bool checked)
|
void MainWindow::on_cbSplAutoControl_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
bool lval = adloader->splashes[id].autoControl;
|
bool lval = adloader->splashes[id].autoControl;
|
||||||
adloader->splashes[id].autoControl = checked;
|
adloader->splashes[id].autoControl = checked;
|
||||||
if (lval != adloader->splashes[id].autoControl) isSaved = false;
|
if (lval != adloader->splashes[id].autoControl) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbSplLifeTime_valueChanged(int val)
|
void MainWindow::on_sbSplLifeTime_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
unsigned int lval = adloader->splashes[id].lifetime;
|
unsigned int lval = adloader->splashes[id].lifetime;
|
||||||
adloader->splashes[id].lifetime = val;
|
adloader->splashes[id].lifetime = val;
|
||||||
if (lval != adloader->splashes[id].lifetime) isSaved = false;
|
if (lval != adloader->splashes[id].lifetime) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbSplAdd_clicked()
|
void MainWindow::on_pbSplAdd_clicked()
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (adloader->splashes.contains(i)) i++;
|
while (adloader->splashes.contains(i)) i++;
|
||||||
tbSplash spl;
|
tbSplash spl;
|
||||||
spl.id = i;
|
spl.id = i;
|
||||||
spl.name = tr("Splash");
|
spl.name = tr("Splash");
|
||||||
spl.lifetime = 1;
|
spl.lifetime = 1;
|
||||||
spl.speed = 1;
|
spl.speed = 1;
|
||||||
adloader->splashes.insert(spl.id,spl);
|
adloader->splashes.insert(spl.id,spl);
|
||||||
int index = adloader->splashes.keys().indexOf(i);
|
int index = adloader->splashes.keys().indexOf(i);
|
||||||
splModel->refresh(adloader->splashes.values());
|
splModel->refresh(adloader->splashes.values());
|
||||||
ui->lvSplashes->reset();
|
ui->lvSplashes->reset();
|
||||||
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbSlpDel_clicked()
|
void MainWindow::on_pbSlpDel_clicked()
|
||||||
{
|
{
|
||||||
if (adloader->splashes.size() < 2) return;
|
if (adloader->splashes.size() < 2) return;
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
int id = adloader->splashes.keys().at(ui->lvSplashes->currentIndex().row());
|
int id = adloader->splashes.keys().at(ui->lvSplashes->currentIndex().row());
|
||||||
for (int i=0; i<adloader->towers.size(); i++)
|
for (int i=0; i<adloader->towers.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->towers.values().at(i).splashId == id)
|
if (adloader->towers.values().at(i).splashId == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
|
msgBox.setText(tr("You can not delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("It used by tower %1 id=%2").arg(adloader->towers.values().at(i).name).arg(adloader->towers.values().at(i).id));
|
msgBox.setInformativeText(tr("It used by tower %1 id=%2").arg(adloader->towers.values().at(i).name).arg(adloader->towers.values().at(i).id));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<adloader->chains.size(); i++)
|
for (int i=0; i<adloader->chains.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->chains.values().at(i).childSplashId == id
|
if (adloader->chains.values().at(i).childSplashId == id
|
||||||
|| adloader->chains.values().at(i).parentSplashId == id)
|
|| adloader->chains.values().at(i).parentSplashId == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
|
msgBox.setText(tr("You can not delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("It used by chain in tower %1 id=%2").arg(adloader->towers.value(adloader->chains.values().at(i).towerId).name).arg(adloader->chains.values().at(i).towerId));
|
msgBox.setInformativeText(tr("It used by chain in tower %1 id=%2").arg(adloader->towers.value(adloader->chains.values().at(i).towerId).name).arg(adloader->chains.values().at(i).towerId));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msgBox.setText(tr("Delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
|
msgBox.setText(tr("Delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("Are you sure?"));
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
if (ret == QMessageBox::Ok)
|
if (ret == QMessageBox::Ok)
|
||||||
{
|
{
|
||||||
adloader->splashes.remove(id);
|
adloader->splashes.remove(id);
|
||||||
splModel->refresh(adloader->splashes.values());
|
splModel->refresh(adloader->splashes.values());
|
||||||
ui->lvSplashes->reset();
|
ui->lvSplashes->reset();
|
||||||
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbTwSplashEdit_clicked()
|
void MainWindow::on_pbTwSplashEdit_clicked()
|
||||||
{
|
{
|
||||||
int splIndex = adloader->splashes.keys().indexOf(adloader->towers.values().at(ui->lvTowers->currentIndex().row()).splashId);
|
int splIndex = adloader->splashes.keys().indexOf(adloader->towers.values().at(ui->lvTowers->currentIndex().row()).splashId);
|
||||||
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(splIndex,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(splIndex,0),QItemSelectionModel::ClearAndSelect);
|
||||||
ui->tabWidget->setCurrentWidget(ui->tabSplashes);
|
ui->tabWidget->setCurrentWidget(ui->tabSplashes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigChance_toggled(bool checked)
|
void MainWindow::on_cbTrigChance_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
int lval = adloader->triggers[id].chance;
|
int lval = adloader->triggers[id].chance;
|
||||||
ui->sbTrigChance->setEnabled(checked);
|
ui->sbTrigChance->setEnabled(checked);
|
||||||
if (checked) adloader->triggers[id].chance = ui->sbTrigChance->value();
|
if (checked) adloader->triggers[id].chance = ui->sbTrigChance->value();
|
||||||
else adloader->triggers[id].chance = 100;
|
else adloader->triggers[id].chance = 100;
|
||||||
if (lval != adloader->triggers[id].chance) isSaved = false;
|
if (lval != adloader->triggers[id].chance) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTrigChance_valueChanged(int val)
|
void MainWindow::on_sbTrigChance_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
int lval = adloader->triggers[id].chance;
|
int lval = adloader->triggers[id].chance;
|
||||||
adloader->triggers[id].chance = val;
|
adloader->triggers[id].chance = val;
|
||||||
if (lval != adloader->triggers[id].chance) isSaved = false;
|
if (lval != adloader->triggers[id].chance) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_leTrigName_editingFinished()
|
void MainWindow::on_leTrigName_editingFinished()
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
QString lval = adloader->triggers[id].name;
|
QString lval = adloader->triggers[id].name;
|
||||||
adloader->triggers[id].name = ui->leTrigName->text();
|
adloader->triggers[id].name = ui->leTrigName->text();
|
||||||
trigModel->refresh(adloader->triggers.values());
|
trigModel->refresh(adloader->triggers.values());
|
||||||
QModelIndex mindex = ui->lvTriggers->currentIndex();
|
QModelIndex mindex = ui->lvTriggers->currentIndex();
|
||||||
ui->lvTriggers->reset();
|
ui->lvTriggers->reset();
|
||||||
ui->lvTriggers->setCurrentIndex(mindex);
|
ui->lvTriggers->setCurrentIndex(mindex);
|
||||||
if (lval != adloader->triggers[id].name) isSaved = false;
|
if (lval != adloader->triggers[id].name) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTrigCount_valueChanged(int val)
|
void MainWindow::on_sbTrigCount_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
int lval = adloader->triggers[id].count;
|
int lval = adloader->triggers[id].count;
|
||||||
adloader->triggers[id].count = val;
|
adloader->triggers[id].count = val;
|
||||||
if (lval != adloader->triggers[id].count) isSaved = false;
|
if (lval != adloader->triggers[id].count) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTrigRandomRadius_valueChanged(double value)
|
void MainWindow::on_sbTrigRandomRadius_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
float lval = adloader->triggers[id].randomPosRadius;
|
float lval = adloader->triggers[id].randomPosRadius;
|
||||||
adloader->triggers[id].randomPosRadius = value;
|
adloader->triggers[id].randomPosRadius = value;
|
||||||
if (lval != adloader->triggers[id].randomPosRadius) isSaved = false;
|
if (lval != adloader->triggers[id].randomPosRadius) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigDelPar_toggled(bool checked)
|
void MainWindow::on_cbTrigDelPar_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
bool lval = adloader->triggers[id].delParent;
|
bool lval = adloader->triggers[id].delParent;
|
||||||
adloader->triggers[id].delParent = checked;
|
adloader->triggers[id].delParent = checked;
|
||||||
if (lval != adloader->triggers[id].delParent) isSaved = false;
|
if (lval != adloader->triggers[id].delParent) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTrigTimer_valueChanged(int val)
|
void MainWindow::on_sbTrigTimer_valueChanged(int val)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
unsigned int lval = adloader->triggers[id].timer;
|
unsigned int lval = adloader->triggers[id].timer;
|
||||||
adloader->triggers[id].timer = val;
|
adloader->triggers[id].timer = val;
|
||||||
if (lval != adloader->triggers[id].timer) isSaved = false;
|
if (lval != adloader->triggers[id].timer) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTrigDamage_valueChanged(double value)
|
void MainWindow::on_sbTrigDamage_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
float lval = adloader->triggers[id].damage;
|
float lval = adloader->triggers[id].damage;
|
||||||
adloader->triggers[id].damage = value;
|
adloader->triggers[id].damage = value;
|
||||||
if (lval != adloader->triggers[id].damage) isSaved = false;
|
if (lval != adloader->triggers[id].damage) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_sbTrigDamRadius_valueChanged(double value)
|
void MainWindow::on_sbTrigDamRadius_valueChanged(double value)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
float lval = adloader->triggers[id].radius;
|
float lval = adloader->triggers[id].radius;
|
||||||
adloader->triggers[id].radius = value;
|
adloader->triggers[id].radius = value;
|
||||||
if (lval != adloader->triggers[id].radius) isSaved = false;
|
if (lval != adloader->triggers[id].radius) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigDamRad_toggled(bool checked)
|
void MainWindow::on_cbTrigDamRad_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
float lval = adloader->triggers[id].radius;
|
float lval = adloader->triggers[id].radius;
|
||||||
ui->sbTrigDamRadius->setEnabled(checked);
|
ui->sbTrigDamRadius->setEnabled(checked);
|
||||||
if (checked) adloader->triggers[id].radius = ui->sbTrigDamRadius->value();
|
if (checked) adloader->triggers[id].radius = ui->sbTrigDamRadius->value();
|
||||||
else adloader->triggers[id].radius = 0;
|
else adloader->triggers[id].radius = 0;
|
||||||
if (lval != adloader->triggers[id].radius) isSaved = false;
|
if (lval != adloader->triggers[id].radius) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigDamage_toggled(bool checked)
|
void MainWindow::on_cbTrigDamage_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
float lval = adloader->triggers[id].damage;
|
float lval = adloader->triggers[id].damage;
|
||||||
ui->sbTrigDamage->setEnabled(checked);
|
ui->sbTrigDamage->setEnabled(checked);
|
||||||
if (checked) adloader->triggers[id].damage = ui->sbTrigDamage->value();
|
if (checked) adloader->triggers[id].damage = ui->sbTrigDamage->value();
|
||||||
else adloader->triggers[id].damage = 0;
|
else adloader->triggers[id].damage = 0;
|
||||||
if (lval != adloader->triggers[id].damage) isSaved = false;
|
if (lval != adloader->triggers[id].damage) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigRandRadius_toggled(bool checked)
|
void MainWindow::on_cbTrigRandRadius_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
float lval = adloader->triggers[id].randomPosRadius;
|
float lval = adloader->triggers[id].randomPosRadius;
|
||||||
ui->sbTrigRandomRadius->setEnabled(checked);
|
ui->sbTrigRandomRadius->setEnabled(checked);
|
||||||
if (checked) adloader->triggers[id].randomPosRadius = ui->sbTrigRandomRadius->value();
|
if (checked) adloader->triggers[id].randomPosRadius = ui->sbTrigRandomRadius->value();
|
||||||
else adloader->triggers[id].randomPosRadius = 0;
|
else adloader->triggers[id].randomPosRadius = 0;
|
||||||
if (lval != adloader->triggers[id].randomPosRadius) isSaved = false;
|
if (lval != adloader->triggers[id].randomPosRadius) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigCount_toggled(bool checked)
|
void MainWindow::on_cbTrigCount_toggled(bool checked)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
int lval = adloader->triggers[id].count;
|
int lval = adloader->triggers[id].count;
|
||||||
ui->sbTrigCount->setEnabled(checked);
|
ui->sbTrigCount->setEnabled(checked);
|
||||||
if (checked) adloader->triggers[id].count = ui->sbTrigCount->value();
|
if (checked) adloader->triggers[id].count = ui->sbTrigCount->value();
|
||||||
else adloader->triggers[id].count = 0;
|
else adloader->triggers[id].count = 0;
|
||||||
if (lval != adloader->triggers[id].count) isSaved = false;
|
if (lval != adloader->triggers[id].count) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbTrigAdd_clicked()
|
void MainWindow::on_pbTrigAdd_clicked()
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (adloader->triggers.contains(i)) i++;
|
while (adloader->triggers.contains(i)) i++;
|
||||||
tbTrigger trig;
|
tbTrigger trig;
|
||||||
trig.id = i;
|
trig.id = i;
|
||||||
trig.name = tr("Trigger");
|
trig.name = tr("Trigger");
|
||||||
trig.count = 0;
|
trig.count = 0;
|
||||||
trig.damage = 0;
|
trig.damage = 0;
|
||||||
trig.radius = 0;
|
trig.radius = 0;
|
||||||
trig.timer = 10;
|
trig.timer = 10;
|
||||||
trig.chance = 100;
|
trig.chance = 100;
|
||||||
trig.delParent =true ;
|
trig.delParent =true ;
|
||||||
trig.childAim = srcTriggerType::noAim;
|
trig.childAim = srcTriggerType::noAim;
|
||||||
trig.randomPosRadius = 0;
|
trig.randomPosRadius = 0;
|
||||||
trig.type = srcTriggerType::onDestination;
|
trig.type = srcTriggerType::onDestination;
|
||||||
adloader->triggers.insert(trig.id,trig);
|
adloader->triggers.insert(trig.id,trig);
|
||||||
int index = adloader->triggers.keys().indexOf(i);
|
int index = adloader->triggers.keys().indexOf(i);
|
||||||
trigModel->refresh(adloader->triggers.values());
|
trigModel->refresh(adloader->triggers.values());
|
||||||
ui->lvTriggers->reset();
|
ui->lvTriggers->reset();
|
||||||
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbTrigDel_clicked()
|
void MainWindow::on_pbTrigDel_clicked()
|
||||||
{
|
{
|
||||||
if (adloader->triggers.size() < 2) return;
|
if (adloader->triggers.size() < 2) return;
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
int id = adloader->triggers.keys().at(ui->lvTriggers->currentIndex().row());
|
int id = adloader->triggers.keys().at(ui->lvTriggers->currentIndex().row());
|
||||||
for (int i=0; i<adloader->chains.size(); i++)
|
for (int i=0; i<adloader->chains.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->chains.values().at(i).triggerId == id)
|
if (adloader->chains.values().at(i).triggerId == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete trigger %1 id=%2").arg(adloader->triggers.value(id).name).arg(id));
|
msgBox.setText(tr("You can not delete trigger %1 id=%2").arg(adloader->triggers.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("It used by chain in tower %1 id=%2").arg(adloader->towers.value(adloader->chains.values().at(i).towerId).name).arg(adloader->chains.values().at(i).towerId));
|
msgBox.setInformativeText(tr("It used by chain in tower %1 id=%2").arg(adloader->towers.value(adloader->chains.values().at(i).towerId).name).arg(adloader->chains.values().at(i).towerId));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msgBox.setText(tr("Delete trigger %1 id=%2").arg(adloader->triggers.value(id).name).arg(id));
|
msgBox.setText(tr("Delete trigger %1 id=%2").arg(adloader->triggers.value(id).name).arg(id));
|
||||||
msgBox.setInformativeText(tr("Are you sure?"));
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
if (ret == QMessageBox::Ok)
|
if (ret == QMessageBox::Ok)
|
||||||
{
|
{
|
||||||
adloader->triggers.remove(id);
|
adloader->triggers.remove(id);
|
||||||
trigModel->refresh(adloader->triggers.values());
|
trigModel->refresh(adloader->triggers.values());
|
||||||
ui->lvTriggers->reset();
|
ui->lvTriggers->reset();
|
||||||
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigType_currentIndexChanged(int index)
|
void MainWindow::on_cbTrigType_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
srcTriggerType::triggerType lval = adloader->triggers[id].type;
|
srcTriggerType::triggerType lval = adloader->triggers[id].type;
|
||||||
adloader->triggers[id].type = (srcTriggerType::triggerType)ui->cbTrigType->itemData(index).toInt();
|
adloader->triggers[id].type = (srcTriggerType::triggerType)ui->cbTrigType->itemData(index).toInt();
|
||||||
if (adloader->triggers[id].type != srcTriggerType::onTimer)
|
if (adloader->triggers[id].type == srcTriggerType::onAlienInRadius)
|
||||||
{
|
{
|
||||||
ui->lbTrigTimer->setVisible(false);
|
ui->lbTrigChildAim->hide();
|
||||||
ui->sbTrigTimer->setVisible(false);
|
ui->cbTrigChildAim->hide();
|
||||||
} else {
|
} else {
|
||||||
ui->lbTrigTimer->setVisible(true);
|
ui->lbTrigChildAim->show();
|
||||||
ui->sbTrigTimer->setVisible(true);
|
ui->cbTrigChildAim->show();
|
||||||
ui->sbTrigTimer->setValue(adloader->triggers[id].timer);
|
}
|
||||||
}
|
if (adloader->triggers[id].type != srcTriggerType::onTimer)
|
||||||
if (lval != adloader->triggers[id].type) isSaved = false;
|
{
|
||||||
|
ui->lbTrigTimer->setVisible(false);
|
||||||
|
ui->sbTrigTimer->setVisible(false);
|
||||||
|
} else {
|
||||||
|
ui->lbTrigTimer->setVisible(true);
|
||||||
|
ui->sbTrigTimer->setVisible(true);
|
||||||
|
ui->sbTrigTimer->setValue(adloader->triggers[id].timer);
|
||||||
|
}
|
||||||
|
if (lval != adloader->triggers[id].type) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTrigChildAim_currentIndexChanged(int index)
|
void MainWindow::on_cbTrigChildAim_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
|
||||||
srcTriggerType::aimType lval = adloader->triggers[id].childAim;
|
srcTriggerType::aimType lval = adloader->triggers[id].childAim;
|
||||||
adloader->triggers[id].childAim = (srcTriggerType::aimType)ui->cbTrigChildAim->itemData(index).toInt();
|
adloader->triggers[id].childAim = (srcTriggerType::aimType)ui->cbTrigChildAim->itemData(index).toInt();
|
||||||
if (lval != adloader->triggers[id].childAim)isSaved = false;
|
if (lval != adloader->triggers[id].childAim)isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbImgAdd_clicked()
|
void MainWindow::on_pbImgAdd_clicked()
|
||||||
{
|
{
|
||||||
int id = adloader->animations.values().at(ui->lvAnimations->currentIndex().row()).id;
|
int id = adloader->animations.values().at(ui->lvAnimations->currentIndex().row()).id;
|
||||||
QFileDialog fd;
|
QStringList strl;
|
||||||
QStringList strl;
|
/*QFileDialog fd;
|
||||||
fd.setNameFilter(tr("Images (*.png)"));
|
fd.setNameFilter(tr());
|
||||||
fd.setFileMode(QFileDialog::ExistingFiles);
|
fd.setFileMode(QFileDialog::ExistingFiles);*/
|
||||||
QDir dir;
|
QDir dir;
|
||||||
if (fd.exec())
|
strl = QFileDialog::getOpenFileNames(this, "Select images", QString()/*qApp->applicationDirPath()*/, "Images (*.png)");
|
||||||
{
|
/*if (fd.exec())
|
||||||
strl = fd.selectedFiles();
|
{
|
||||||
for (int i=0; i<strl.size(); ++i)
|
strl = fd.selectedFiles();*/
|
||||||
{
|
for (int i=0; i<strl.size(); ++i)
|
||||||
strl[i] = dir.relativeFilePath(strl[i]);
|
{
|
||||||
}
|
strl[i] = dir.relativeFilePath(strl[i]);
|
||||||
adloader->animations[id].pathes.append(strl);
|
}
|
||||||
refresh_lwImages(adloader->animations.value(id).pathes);
|
adloader->animations[id].pathes.append(strl);
|
||||||
isSaved = false;
|
refresh_lwImages(adloader->animations.value(id).pathes);
|
||||||
}
|
isSaved = false;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::refresh_lwImages(QStringList pathes)
|
void MainWindow::refresh_lwImages(QStringList pathes)
|
||||||
{
|
{
|
||||||
ui->lwImages->clear();
|
ui->lwImages->clear();
|
||||||
for (int i=0; i<pathes.size(); ++i)
|
for (int i=0; i<pathes.size(); ++i)
|
||||||
{
|
{
|
||||||
ui->lwImages->addItem(new QListWidgetItem(QIcon(pathes.at(i)),pathes.at(i)));
|
ui->lwImages->addItem(new QListWidgetItem(QIcon(pathes.at(i)),pathes.at(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbImgDel_clicked()
|
void MainWindow::on_pbImgDel_clicked()
|
||||||
{
|
{
|
||||||
if (!ui->lwImages->selectedItems().isEmpty())
|
if (!ui->lwImages->selectedItems().isEmpty())
|
||||||
{
|
{
|
||||||
int id = adloader->animations.values().at(ui->lvAnimations->currentIndex().row()).id;
|
int id = adloader->animations.values().at(ui->lvAnimations->currentIndex().row()).id;
|
||||||
for (int i=0; i<ui->lwImages->selectedItems().size(); ++i)
|
for (int i=0; i<ui->lwImages->selectedItems().size(); ++i)
|
||||||
adloader->animations[id].pathes.removeOne(ui->lwImages->selectedItems().at(i)->text());
|
adloader->animations[id].pathes.removeOne(ui->lwImages->selectedItems().at(i)->text());
|
||||||
refresh_lwImages(adloader->animations.value(id).pathes);
|
refresh_lwImages(adloader->animations.value(id).pathes);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_pbAnimAdd_clicked()
|
void MainWindow::on_pbAnimAdd_clicked()
|
||||||
{
|
{
|
||||||
int i = 1;
|
int i = 1;
|
||||||
while (adloader->animations.contains(i)) i++;
|
while (adloader->animations.contains(i)) i++;
|
||||||
tbAnimation anim;
|
tbAnimation anim;
|
||||||
anim.id = i;
|
anim.id = i;
|
||||||
adloader->animations.insert(anim.id,anim);
|
adloader->animations.insert(anim.id,anim);
|
||||||
int index = adloader->animations.keys().indexOf(i);
|
int index = adloader->animations.keys().indexOf(i);
|
||||||
animModel->refresh(adloader->animations.values());
|
// animModel->refresh(adloader->animations.values());
|
||||||
ui->lvAnimations->reset();
|
ui->lvAnimations->reset();
|
||||||
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbAlImage_currentIndexChanged(int index)
|
void MainWindow::on_cbAlImage_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
if (!ui->lvAliens->currentIndex().isValid()) return;
|
if (!ui->lvAliens->currentIndex().isValid()) return;
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
|
||||||
int lval = adloader->aliens[id].imgType;
|
int lval = adloader->aliens[id].imgType;
|
||||||
adloader->aliens[id].imgType = adloader->animations.values().at(index).id;
|
adloader->aliens[id].imgType = adloader->animations.values().at(index).id;
|
||||||
ui->lbAlAnim->setAnimation(adloader->animations.value(adloader->aliens[id].imgType).pathes);
|
ui->lbAlAnim->setAnimation(adloader->animations.value(adloader->aliens[id].imgType).pathes);
|
||||||
if (lval != adloader->aliens[id].imgType) isSaved = false;
|
if (lval != adloader->aliens[id].imgType) isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbTwImage_currentIndexChanged(int index)
|
void MainWindow::on_cbTwImage_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
if (!ui->lvTowers->currentIndex().isValid()) return;
|
if (!ui->lvTowers->currentIndex().isValid()) return;
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
|
||||||
int lval = adloader->towers[id].imgType;
|
int lval = adloader->towers[id].imgType;
|
||||||
adloader->towers[id].imgType = adloader->animations.values().at(index).id;
|
adloader->towers[id].imgType = adloader->animations.values().at(index).id;
|
||||||
ui->lbTwAnim->setAnimation(adloader->animations.value(adloader->towers[id].imgType).pathes);
|
ui->lbTwAnim->setAnimation(adloader->animations.value(adloader->towers[id].imgType).pathes);
|
||||||
if (lval != adloader->towers[id].imgType) isSaved = false;
|
if (lval != adloader->towers[id].imgType) isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_cbSplImage_currentIndexChanged(int index)
|
void MainWindow::on_cbSplImage_currentIndexChanged(int index)
|
||||||
{
|
{
|
||||||
if (!ui->lvSplashes->currentIndex().isValid()) return;
|
if (!ui->lvSplashes->currentIndex().isValid()) return;
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
int lval = adloader->splashes[id].imgType;
|
int lval = adloader->splashes[id].imgType;
|
||||||
adloader->splashes[id].imgType = adloader->animations.values().at(index).id;
|
adloader->splashes[id].imgType = adloader->animations.values().at(index).id;
|
||||||
ui->lbSplAnim->setAnimation(adloader->animations.value(adloader->splashes[id].imgType).pathes);
|
ui->lbSplAnim->setAnimation(adloader->animations.value(adloader->splashes[id].imgType).pathes);
|
||||||
if (lval != adloader->splashes[id].imgType) isSaved = false;
|
if (lval != adloader->splashes[id].imgType) isSaved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_pbAnimDel_clicked()
|
void MainWindow::on_pbAnimDel_clicked()
|
||||||
{
|
{
|
||||||
if (adloader->animations.size() < 2) return;
|
if (adloader->animations.size() < 2) return;
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
int id = adloader->animations.keys().at(ui->lvAnimations->currentIndex().row());
|
int id = adloader->animations.keys().at(ui->lvAnimations->currentIndex().row());
|
||||||
for (int i=0; i<adloader->towers.size(); i++)
|
for (int i=0; i<adloader->towers.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->towers.values().at(i).imgType == id)
|
if (adloader->towers.values().at(i).imgType == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete anim %1").arg(id));
|
msgBox.setText(tr("You can not delete anim %1").arg(id));
|
||||||
msgBox.setInformativeText(tr("It used by tower %1 id=%2").arg(adloader->towers.values().at(i).name).arg(adloader->towers.values().at(i).id));
|
msgBox.setInformativeText(tr("It used by tower %1 id=%2").arg(adloader->towers.values().at(i).name).arg(adloader->towers.values().at(i).id));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<adloader->aliens.size(); i++)
|
for (int i=0; i<adloader->aliens.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->aliens.values().at(i).imgType == id)
|
if (adloader->aliens.values().at(i).imgType == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete anim %1").arg(id));
|
msgBox.setText(tr("You can not delete anim %1").arg(id));
|
||||||
msgBox.setInformativeText(tr("It used by alien %1 id=%2").arg(adloader->aliens.values().at(i).name).arg(adloader->aliens.values().at(i).id));
|
msgBox.setInformativeText(tr("It used by alien %1 id=%2").arg(adloader->aliens.values().at(i).name).arg(adloader->aliens.values().at(i).id));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i=0; i<adloader->splashes.size(); i++)
|
for (int i=0; i<adloader->splashes.size(); i++)
|
||||||
{
|
{
|
||||||
if (adloader->splashes.values().at(i).imgType == id)
|
if (adloader->splashes.values().at(i).imgType == id)
|
||||||
{
|
{
|
||||||
msgBox.setText(tr("You can not delete anim %1").arg(id));
|
msgBox.setText(tr("You can not delete anim %1").arg(id));
|
||||||
msgBox.setInformativeText(tr("It used by splash %1 id=%2").arg(adloader->splashes.values().at(i).name).arg(adloader->splashes.values().at(i).id));
|
msgBox.setInformativeText(tr("It used by splash %1 id=%2").arg(adloader->splashes.values().at(i).name).arg(adloader->splashes.values().at(i).id));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
msgBox.setText(tr("Delete anim %1").arg(id));
|
msgBox.setText(tr("Delete anim %1").arg(id));
|
||||||
msgBox.setInformativeText(tr("Are you sure?"));
|
msgBox.setInformativeText(tr("Are you sure?"));
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
|
||||||
msgBox.setDefaultButton(QMessageBox::Ok);
|
msgBox.setDefaultButton(QMessageBox::Ok);
|
||||||
int ret = msgBox.exec();
|
int ret = msgBox.exec();
|
||||||
if (ret == QMessageBox::Ok)
|
if (ret == QMessageBox::Ok)
|
||||||
{
|
{
|
||||||
adloader->animations.remove(id);
|
adloader->animations.remove(id);
|
||||||
animModel->refresh(adloader->animations.values());
|
// animModel->refresh(adloader->animations.values());
|
||||||
ui->lvAnimations->reset();
|
ui->lvAnimations->reset();
|
||||||
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
|
||||||
isSaved = false;
|
isSaved = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_cbSplCompisitionMode_currentIndexChanged(const QString &str)
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
QPainter::CompositionMode lval = adloader->splashes[id].compositionMode;
|
||||||
|
if (str == "NotSource") adloader->splashes[id].compositionMode = QPainter::RasterOp_NotSource;
|
||||||
|
if (str == "Plus") adloader->splashes[id].compositionMode = QPainter::CompositionMode_Plus;
|
||||||
|
if (str == "Multiply") adloader->splashes[id].compositionMode = QPainter::CompositionMode_Multiply;
|
||||||
|
if (str == "Screen") adloader->splashes[id].compositionMode = QPainter::CompositionMode_Screen;
|
||||||
|
if (str == "Overlay") adloader->splashes[id].compositionMode = QPainter::CompositionMode_Overlay;
|
||||||
|
if (str == "Darken") adloader->splashes[id].compositionMode = QPainter::CompositionMode_Darken;
|
||||||
|
if (str == "Lighten") adloader->splashes[id].compositionMode = QPainter::CompositionMode_Lighten;
|
||||||
|
if (str == "ColorDodge") adloader->splashes[id].compositionMode = QPainter::CompositionMode_ColorDodge;
|
||||||
|
if (str == "ColorBurn") adloader->splashes[id].compositionMode = QPainter::CompositionMode_ColorBurn;
|
||||||
|
if (str == "HardLight") adloader->splashes[id].compositionMode = QPainter::CompositionMode_HardLight;
|
||||||
|
if (str == "SoftLight") adloader->splashes[id].compositionMode = QPainter::CompositionMode_SoftLight;
|
||||||
|
if (str == "Difference") adloader->splashes[id].compositionMode = QPainter::CompositionMode_Difference;
|
||||||
|
if (lval != adloader->splashes[id].compositionMode) isSaved = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbSplZValue_valueChanged(double val)
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
float lval = adloader->splashes[id].ZValue;
|
||||||
|
adloader->splashes[id].ZValue = val;
|
||||||
|
if (lval != adloader->splashes[id].ZValue) isSaved = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_sbSplAnimSpeed_valueChanged(double val)
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
float lval = adloader->splashes[id].animSpeed;
|
||||||
|
adloader->splashes[id].animSpeed = val;
|
||||||
|
if (lval != adloader->splashes[id].animSpeed) isSaved = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_cbSplKeepOnAlien_toggled(bool checked)
|
||||||
|
{
|
||||||
|
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
|
||||||
|
bool lval = adloader->splashes[id].keepOnAlien;
|
||||||
|
adloader->splashes[id].keepOnAlien = checked;
|
||||||
|
if (lval != adloader->splashes[id].keepOnAlien) isSaved = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,101 +16,105 @@
|
|||||||
#include "animlabel.h"
|
#include "animlabel.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainWindow : public QMainWindow {
|
class MainWindow : public QMainWindow {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
MainWindow(QWidget *parent = 0);
|
MainWindow(QWidget *parent = 0);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent *e);
|
void changeEvent(QEvent *e);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
Loader * adloader;
|
Loader * adloader;
|
||||||
AlienModel * alModel;
|
AlienModel * alModel;
|
||||||
TowerModel * twModel;
|
TowerModel * twModel;
|
||||||
SplashModel * splModel;
|
SplashModel * splModel;
|
||||||
TriggerModel* trigModel;
|
TriggerModel* trigModel;
|
||||||
MapModel * mapModel;
|
MapModel * mapModel;
|
||||||
AnimationModel * animModel;
|
AnimationModel * animModel;
|
||||||
QGraphicsScene * mapScene;
|
QGraphicsScene * mapScene;
|
||||||
|
|
||||||
//AnimLabel * alb;
|
//AnimLabel * alb;
|
||||||
|
|
||||||
bool isSaved;
|
bool isSaved;
|
||||||
|
|
||||||
void refresh_lwImages(QStringList pathes);
|
void refresh_lwImages(QStringList pathes);
|
||||||
void closeEvent(QCloseEvent *);
|
void closeEvent(QCloseEvent *);
|
||||||
private slots:
|
private slots:
|
||||||
void on_pbAnimDel_clicked();
|
void on_pbAnimDel_clicked();
|
||||||
void on_cbSplImage_currentIndexChanged(int index);
|
void on_cbSplImage_currentIndexChanged(int index);
|
||||||
void on_cbTwImage_currentIndexChanged(int index);
|
void on_cbTwImage_currentIndexChanged(int index);
|
||||||
void on_cbAlImage_currentIndexChanged(int index);
|
void on_cbAlImage_currentIndexChanged(int index);
|
||||||
void on_pbAnimAdd_clicked();
|
void on_pbAnimAdd_clicked();
|
||||||
void on_pbImgDel_clicked();
|
void on_pbImgDel_clicked();
|
||||||
void on_pbImgAdd_clicked();
|
void on_pbImgAdd_clicked();
|
||||||
void on_cbTrigChildAim_currentIndexChanged(int index);
|
void on_cbTrigChildAim_currentIndexChanged(int index);
|
||||||
void on_cbTrigType_currentIndexChanged(int index);
|
void on_cbTrigType_currentIndexChanged(int index);
|
||||||
void on_cbTrigCount_toggled(bool checked);
|
void on_cbTrigCount_toggled(bool checked);
|
||||||
void on_leTrigName_editingFinished();
|
void on_leTrigName_editingFinished();
|
||||||
void on_pbTwSplashEdit_clicked();
|
void on_pbTwSplashEdit_clicked();
|
||||||
void on_cbTrigDamRad_toggled(bool checked);
|
void on_cbTrigDamRad_toggled(bool checked);
|
||||||
void on_cbTrigDamage_toggled(bool checked);
|
void on_cbTrigDamage_toggled(bool checked);
|
||||||
void on_cbTrigDelPar_toggled(bool checked);
|
void on_cbTrigDelPar_toggled(bool checked);
|
||||||
void on_cbTrigChance_toggled(bool checked);
|
void on_cbTrigChance_toggled(bool checked);
|
||||||
void on_cbTrigRandRadius_toggled(bool checked);
|
void on_cbTrigRandRadius_toggled(bool checked);
|
||||||
void on_cbTwExpByKill_toggled(bool checked);
|
void on_cbTwExpByKill_toggled(bool checked);
|
||||||
void on_cbTwExpByDam_toggled(bool checked);
|
void on_cbTwExpByDam_toggled(bool checked);
|
||||||
void on_cbTwExpByShot_toggled(bool checked);
|
void on_cbTwExpByShot_toggled(bool checked);
|
||||||
void on_cbAlIsFly_toggled(bool checked);
|
void on_cbAlIsFly_toggled(bool checked);
|
||||||
void on_pbTrigDel_clicked();
|
void on_pbTrigDel_clicked();
|
||||||
void on_pbTrigAdd_clicked();
|
void on_pbTrigAdd_clicked();
|
||||||
void on_sbTrigChance_valueChanged(int );
|
void on_sbTrigChance_valueChanged(int );
|
||||||
void on_sbTrigDamRadius_valueChanged(double );
|
void on_sbTrigDamRadius_valueChanged(double );
|
||||||
void on_sbTrigDamage_valueChanged(double );
|
void on_sbTrigDamage_valueChanged(double );
|
||||||
void on_sbTrigTimer_valueChanged(int );
|
void on_sbTrigTimer_valueChanged(int );
|
||||||
void on_sbTrigRandomRadius_valueChanged(double );
|
void on_sbTrigRandomRadius_valueChanged(double );
|
||||||
void on_sbTrigCount_valueChanged(int );
|
void on_sbTrigCount_valueChanged(int );
|
||||||
void on_pbReload_clicked();
|
void on_pbReload_clicked();
|
||||||
void on_pbSlpDel_clicked();
|
void on_pbSlpDel_clicked();
|
||||||
void on_pbSplAdd_clicked();
|
void on_pbSplAdd_clicked();
|
||||||
void on_sbSplLifeTime_valueChanged(int );
|
void on_sbSplLifeTime_valueChanged(int );
|
||||||
void on_cbSplAutoControl_toggled(bool checked);
|
void on_cbSplAutoControl_toggled(bool checked);
|
||||||
void on_sbSplSpeed_valueChanged(double );
|
void on_sbSplSpeed_valueChanged(double );
|
||||||
void on_leSplName_editingFinished();
|
void on_leSplName_editingFinished();
|
||||||
void on_pbTwDel_clicked();
|
void on_pbTwDel_clicked();
|
||||||
void on_sbTwExpByKill_valueChanged(double );
|
void on_sbTwExpByKill_valueChanged(double );
|
||||||
void on_sbTwExpByDam_valueChanged(double );
|
void on_sbTwExpByDam_valueChanged(double );
|
||||||
void on_sbTwExpByShot_valueChanged(double );
|
void on_sbTwExpByShot_valueChanged(double );
|
||||||
void on_sbTwRadius_valueChanged(double );
|
void on_sbTwRadius_valueChanged(double );
|
||||||
void on_sbTwReload_valueChanged(int );
|
void on_sbTwReload_valueChanged(int );
|
||||||
void on_cbTwSplash_currentIndexChanged(int index);
|
void on_cbTwSplash_currentIndexChanged(int index);
|
||||||
void on_sbTwCost_valueChanged(int );
|
void on_sbTwCost_valueChanged(int );
|
||||||
void on_sbTwBuildTime_valueChanged(int );
|
void on_sbTwBuildTime_valueChanged(int );
|
||||||
void on_pbTwAdd_clicked();
|
void on_pbTwAdd_clicked();
|
||||||
void on_leTwName_editingFinished();
|
void on_leTwName_editingFinished();
|
||||||
void on_pbAlDel_clicked();
|
void on_pbAlDel_clicked();
|
||||||
void on_pbAlAdd_clicked();
|
void on_pbAlAdd_clicked();
|
||||||
void on_leAlName_editingFinished();
|
void on_leAlName_editingFinished();
|
||||||
void on_sbAlScore_valueChanged(int );
|
void on_sbAlScore_valueChanged(int );
|
||||||
void on_sbAlPrise_valueChanged(int );
|
void on_sbAlPrise_valueChanged(int );
|
||||||
void on_sbAlSpeed_valueChanged(double );
|
void on_sbAlSpeed_valueChanged(double );
|
||||||
void on_sbAlregeneration_valueChanged(double );
|
void on_sbAlregeneration_valueChanged(double );
|
||||||
void on_sbAlArmor_valueChanged(double );
|
void on_sbAlArmor_valueChanged(double );
|
||||||
void on_sbAlHealth_valueChanged(double );
|
void on_sbAlHealth_valueChanged(double );
|
||||||
void on_pbSave_clicked();
|
void on_pbSave_clicked();
|
||||||
void lvAliens_select(QModelIndex, QModelIndex);
|
void lvAliens_select(QModelIndex, QModelIndex);
|
||||||
void lvAnimations_select(QModelIndex, QModelIndex);
|
void lvAnimations_select(QModelIndex, QModelIndex);
|
||||||
void lvTowers_select(QModelIndex, QModelIndex);
|
void lvTowers_select(QModelIndex, QModelIndex);
|
||||||
void lvSplashes_select(QModelIndex, QModelIndex);
|
void lvSplashes_select(QModelIndex, QModelIndex);
|
||||||
void lvTriggers_select(QModelIndex, QModelIndex);
|
void lvTriggers_select(QModelIndex, QModelIndex);
|
||||||
void lvMaps_select(QModelIndex, QModelIndex);
|
void lvMaps_select(QModelIndex, QModelIndex);
|
||||||
void on_cbAlRegeneration_toggled(bool checked);
|
void on_cbAlRegeneration_toggled(bool checked);
|
||||||
void on_cbAlArmor_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);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>5</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="movable">
|
<property name="movable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -875,19 +875,7 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7" stretch="0,0,0,0,0,0">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetDefaultConstraint</enum>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
<layout class="QHBoxLayout" name="horizontalLayout_28">
|
||||||
<item>
|
<item>
|
||||||
@@ -964,7 +952,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>LifeTime</string>
|
<string>Life time</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
@@ -986,6 +974,197 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_24">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_38">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Animation speed</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSpinBox" name="sbSplAnimSpeed">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.010000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>999999999.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_41">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_39">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Z value</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSpinBox" name="sbSplZValue">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_47">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_36">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Composition mode</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="cbSplCompisitionMode">
|
||||||
|
<property name="duplicatesEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Source</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>NotSource</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Plus</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Multiply</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Screen</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Overlay</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Darken</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Lighten</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>ColorDodge</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>ColorBurn</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>HardLight</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>SoftLight</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Difference</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_48">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="cbSplKeepOnAlien">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Keep on alien</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||||
<item>
|
<item>
|
||||||
@@ -1000,7 +1179,7 @@
|
|||||||
<enum>Qt::LeftToRight</enum>
|
<enum>Qt::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>AutoControl</string>
|
<string>Auto control</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -1258,7 +1437,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_40">
|
<layout class="QHBoxLayout" name="horizontalLayout_40">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_35">
|
<widget class="QLabel" name="lbTrigChildAim">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -1673,6 +1852,9 @@
|
|||||||
<property name="editTriggers">
|
<property name="editTriggers">
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="dragDropMode">
|
||||||
|
<enum>QAbstractItemView::InternalMove</enum>
|
||||||
|
</property>
|
||||||
<property name="selectionMode">
|
<property name="selectionMode">
|
||||||
<enum>QAbstractItemView::ExtendedSelection</enum>
|
<enum>QAbstractItemView::ExtendedSelection</enum>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 2.6)
|
|
||||||
project(Alien_Defender)
|
|
||||||
find_package(Qt4 REQUIRED)
|
|
||||||
include_directories(${QT_INCLUDES})
|
|
||||||
file(GLOB MOCS "./*.h")
|
|
||||||
file(GLOB CPPS "./*.cpp")
|
|
||||||
file(GLOB UIS "./*.ui")
|
|
||||||
file(GLOB RES "./*.qrc")
|
|
||||||
add_definitions(-Wall -O2 -g3 -ggdb)
|
|
||||||
qt4_wrap_ui(CUIS ${UIS})
|
|
||||||
qt4_wrap_cpp(CMOCS ${MOCS})
|
|
||||||
qt4_add_resources(CRES ${RES})
|
|
||||||
add_executable(AlienDefender ${CMOCS} ${CUIS} ${CPPS} ${CRES})
|
|
||||||
target_link_libraries(AlienDefender ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTXMLPATTERNS_LIBRARY})
|
|
||||||
@@ -4,16 +4,24 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(parent)
|
AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(parent) , color_curve(QEasingCurve::InQuad)
|
||||||
{
|
{
|
||||||
|
focus_item = select_tow = select_al = 0;
|
||||||
data = adcore->addata;
|
data = adcore->addata;
|
||||||
core = adcore;
|
core = adcore;
|
||||||
setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
|
setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
|
||||||
setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||||
|
setMouseTracking(true);
|
||||||
scene = new QGraphicsScene();
|
scene = new QGraphicsScene();
|
||||||
scene->setItemIndexMethod(QGraphicsScene::NoIndex);
|
scene->setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||||
core->setScene(scene);
|
core->setScene(scene);
|
||||||
setScene(scene);
|
setScene(scene);
|
||||||
|
selection_al = new ADItem(-1, ADItem::Other, core->addata->alienSelect.images);
|
||||||
|
selection_al->hide();
|
||||||
|
selection_tow = new ADItem(-1, ADItem::Other, core->addata->towerSelect.images);
|
||||||
|
selection_tow->hide();
|
||||||
|
scene->addItem(selection_al);
|
||||||
|
scene->addItem(selection_tow);
|
||||||
//setCacheMode();
|
//setCacheMode();
|
||||||
//setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
//setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||||
mapimg = new QImage(data->map->rect().size()*cellSize,QImage::Format_ARGB32);
|
mapimg = new QImage(data->map->rect().size()*cellSize,QImage::Format_ARGB32);
|
||||||
@@ -46,6 +54,7 @@ AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(paren
|
|||||||
scene->setSceneRect(mapimg->rect());
|
scene->setSceneRect(mapimg->rect());
|
||||||
scene->setBackgroundBrush(*mapimg);
|
scene->setBackgroundBrush(*mapimg);
|
||||||
setCacheMode(QGraphicsView::CacheBackground);
|
setCacheMode(QGraphicsView::CacheBackground);
|
||||||
|
setRenderHints(QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
|
||||||
resize(mapimg->size());
|
resize(mapimg->size());
|
||||||
startTimer(50);
|
startTimer(50);
|
||||||
}
|
}
|
||||||
@@ -53,13 +62,15 @@ AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(paren
|
|||||||
|
|
||||||
AD_Graphics::~AD_Graphics()
|
AD_Graphics::~AD_Graphics()
|
||||||
{
|
{
|
||||||
|
delete selection_tow;
|
||||||
|
delete selection_al;
|
||||||
delete scene;
|
delete scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AD_Graphics::mousePressEvent(QMouseEvent *event)
|
void AD_Graphics::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
scene->clearSelection();
|
// scene->clearSelection();
|
||||||
if (event->button() == Qt::LeftButton)
|
if (event->button() == Qt::LeftButton)
|
||||||
{
|
{
|
||||||
if (m_building) emit add_tow((QPointF(event->pos())/cellSize).toPoint());
|
if (m_building) emit add_tow((QPointF(event->pos())/cellSize).toPoint());
|
||||||
@@ -72,8 +83,9 @@ void AD_Graphics::mousePressEvent(QMouseEvent *event)
|
|||||||
ADItem * i = qgraphicsitem_cast<ADItem*>(x);
|
ADItem * i = qgraphicsitem_cast<ADItem*>(x);
|
||||||
if (i->itemType() == ADItem::Tower)
|
if (i->itemType() == ADItem::Tower)
|
||||||
{
|
{
|
||||||
i->setSelected(true);
|
// i->setSelected(true);
|
||||||
emit tower_select(i->tid());
|
select_tow = i;
|
||||||
|
emit selected_tower_changed(i->tid());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (i->itemType() == ADItem::Alien)
|
if (i->itemType() == ADItem::Alien)
|
||||||
@@ -83,19 +95,37 @@ void AD_Graphics::mousePressEvent(QMouseEvent *event)
|
|||||||
}
|
}
|
||||||
if (al != 0)
|
if (al != 0)
|
||||||
{
|
{
|
||||||
al->setSelected(true);
|
// al->setSelected(true);
|
||||||
emit alien_select(al->id());
|
select_al = al;
|
||||||
|
core->addata->players.at(0)->selectAlienId = select_al->id();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (event->button() == Qt::RightButton)
|
if (event->button() == Qt::RightButton)
|
||||||
|
{
|
||||||
|
select_al = 0;
|
||||||
|
select_tow = 0;
|
||||||
|
emit selected_tower_changed(QPoint());
|
||||||
emit cancel();
|
emit cancel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AD_Graphics::timerEvent(QTimerEvent * )
|
void AD_Graphics::timerEvent(QTimerEvent * )
|
||||||
{
|
{
|
||||||
|
if (select_al != 0)
|
||||||
|
{
|
||||||
|
selection_al->setPos(select_al->pos());
|
||||||
|
selection_al->show();
|
||||||
|
} else selection_al->hide();
|
||||||
|
if (select_tow != 0)
|
||||||
|
{
|
||||||
|
selection_tow->setPos(select_tow->pos());
|
||||||
|
selection_tow->show();
|
||||||
|
} else selection_tow->hide();
|
||||||
|
selection_tow->next();
|
||||||
|
selection_al->next();
|
||||||
if (!core->isWaveEnd())
|
if (!core->isWaveEnd())
|
||||||
scene->update();
|
scene->update();
|
||||||
}
|
}
|
||||||
@@ -116,9 +146,38 @@ void AD_Graphics::drawForeground(QPainter *p, const QRectF &rect)
|
|||||||
if (i->isBarVisible())
|
if (i->isBarVisible())
|
||||||
{
|
{
|
||||||
p->setPen(Qt::black);
|
p->setPen(Qt::black);
|
||||||
p->setBrush(QBrush(QColor(qRound(255*(1-i->value())),qRound(255*i->value()),0)));
|
p->setBrush(Qt::NoBrush);
|
||||||
|
p->drawRect(i->pos().x()-cellSize-1,i->pos().y()-cellSize*1.25-1,cellSize*2+2,cellSize/4+2);
|
||||||
|
p->setPen(Qt::NoPen);
|
||||||
|
p->setBrush(QBrush(QColor::fromHsv(120*color_curve.valueForProgress(i->value()),230,230)));
|
||||||
p->drawRect(i->pos().x()-cellSize,i->pos().y()-cellSize*1.25,cellSize*2*i->value(),cellSize/4);
|
p->drawRect(i->pos().x()-cellSize,i->pos().y()-cellSize*1.25,cellSize*2*i->value(),cellSize/4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (focus_item != 0)
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
p->drawEllipse(focus_item->pos(), r, r);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AD_Graphics::mouseMoveEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
QList<QGraphicsItem * > li = scene->items(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();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// selection_tow->hide();
|
||||||
|
focus_item = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <QGraphicsWidget>
|
#include <QGraphicsWidget>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
#include <QEasingCurve>
|
||||||
|
|
||||||
#include "adcore.h"
|
#include "adcore.h"
|
||||||
|
|
||||||
@@ -14,42 +15,43 @@ class AD_Graphics: public QGraphicsView
|
|||||||
Q_PROPERTY(bool building READ building WRITE setBuilding)
|
Q_PROPERTY(bool building READ building WRITE setBuilding)
|
||||||
public:
|
public:
|
||||||
explicit AD_Graphics(AD_Core * core, QWidget * parent = 0);
|
explicit AD_Graphics(AD_Core * core, QWidget * parent = 0);
|
||||||
|
QPoint selectedTower() {if (select_tow != 0) return select_tow->tid(); else return QPoint();}
|
||||||
|
int selectedAlien() {if (select_al != 0) return select_al->id(); else return -1;}
|
||||||
~AD_Graphics();
|
~AD_Graphics();
|
||||||
|
bool building() const {return m_building;}
|
||||||
bool building() const
|
|
||||||
{
|
|
||||||
return m_building;
|
|
||||||
}
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setBuilding(bool arg)
|
void selectTower(ADItem * item) {select_tow = item;}
|
||||||
{
|
void setBuilding(bool arg) {m_building = arg;}
|
||||||
m_building = arg;
|
void alienKilled(int id) {if (select_al != 0) if (select_al->id() == id) select_al = 0;}
|
||||||
}
|
void towerKilled(QPoint id) {if (select_tow != 0) if (select_tow->tid() == id) {select_tow = 0; emit selected_tower_changed(QPoint());}}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void drawBackground(QPainter * p, const QRectF &);
|
void drawBackground(QPainter * p, const QRectF &);
|
||||||
void drawForeground(QPainter *painter, const QRectF &rect);
|
void drawForeground(QPainter *painter, const QRectF &rect);
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event);
|
||||||
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
|
|
||||||
QGraphicsScene * scene;
|
QGraphicsScene * scene;
|
||||||
AD_Core * core;
|
AD_Core * core;
|
||||||
QImage * mapimg;
|
QImage * mapimg;
|
||||||
Game_Data * data;
|
Game_Data * data;
|
||||||
|
ADItem * focus_item;
|
||||||
|
ADItem * select_al;
|
||||||
|
ADItem * select_tow;
|
||||||
|
ADItem * selection_tow;
|
||||||
|
ADItem * selection_al;
|
||||||
|
QEasingCurve color_curve;
|
||||||
|
|
||||||
bool m_building;
|
bool m_building;
|
||||||
|
|
||||||
private slots:
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void timerEvent(QTimerEvent * );
|
void timerEvent(QTimerEvent * );
|
||||||
signals:
|
|
||||||
|
|
||||||
|
signals:
|
||||||
void cancel();
|
void cancel();
|
||||||
void add_tow(QPoint pnt);
|
void add_tow(QPoint pnt);
|
||||||
void tower_select(QPoint id);
|
void selected_tower_changed(QPoint id);
|
||||||
void alien_select(int id);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AD_GRAPHICS_H
|
#endif // AD_GRAPHICS_H
|
||||||
|
|||||||
17
adcore.cpp
@@ -8,7 +8,7 @@ AD_Core::AD_Core(QObject *parent) :
|
|||||||
adloader->load("data2.xml");
|
adloader->load("data2.xml");
|
||||||
addata = adloader->loadlevel(1);
|
addata = adloader->loadlevel(1);
|
||||||
delete adloader;
|
delete adloader;
|
||||||
if (addata != 0) qDebug("Sucsess");
|
if (addata != 0) qDebug("Success");
|
||||||
else qFatal("Error");
|
else qFatal("Error");
|
||||||
adtowers = new Towers(addata);
|
adtowers = new Towers(addata);
|
||||||
adsplashes = new Splashes(addata);
|
adsplashes = new Splashes(addata);
|
||||||
@@ -17,7 +17,7 @@ AD_Core::AD_Core(QObject *parent) :
|
|||||||
connect(adsplashes,SIGNAL(killAlien(int,int)),this,SLOT(killAlien(int,int)));
|
connect(adsplashes,SIGNAL(killAlien(int,int)),this,SLOT(killAlien(int,int)));
|
||||||
waveInProgress = false;
|
waveInProgress = false;
|
||||||
waveEnd = false;
|
waveEnd = false;
|
||||||
startTimer(50);
|
timer = startTimer(40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -26,6 +26,10 @@ void AD_Core::next()
|
|||||||
adtowers->update();
|
adtowers->update();
|
||||||
adsplashes->update();
|
adsplashes->update();
|
||||||
addata->aliens->update();
|
addata->aliens->update();
|
||||||
|
foreach(Player * p, addata->players)
|
||||||
|
{
|
||||||
|
if (!addata->aliens->curAliens.contains(p->selectAlienId)) p->selectAlienId = -1;
|
||||||
|
}
|
||||||
waveProcessing();
|
waveProcessing();
|
||||||
step++;
|
step++;
|
||||||
}
|
}
|
||||||
@@ -81,7 +85,7 @@ void AD_Core::waveProcessing()
|
|||||||
|
|
||||||
void AD_Core::killAlien(int playerId, int alienId)
|
void AD_Core::killAlien(int playerId, int alienId)
|
||||||
{
|
{
|
||||||
addata->players.at(playerId)->money += addata->aliens->curAliens[alienId].src->prise;
|
addata->players[playerId]->money += addata->aliens->curAliens[alienId].src->prise;
|
||||||
addata->aliens->delAlien(alienId);
|
addata->aliens->delAlien(alienId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,3 +96,10 @@ void AD_Core::setScene(QGraphicsScene *scene)
|
|||||||
adtowers->setScene(scene);
|
adtowers->setScene(scene);
|
||||||
adsplashes->setScene(scene);
|
adsplashes->setScene(scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void AD_Core::setSpeed(float x)
|
||||||
|
{
|
||||||
|
killTimer(timer);
|
||||||
|
timer = startTimer(qRound(40.f/x));
|
||||||
|
}
|
||||||
|
|||||||
35
adcore.h
@@ -10,33 +10,36 @@
|
|||||||
|
|
||||||
class AD_Core : public QThread
|
class AD_Core : public QThread
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit AD_Core(QObject *parent = 0);
|
explicit AD_Core(QObject *parent = 0);
|
||||||
Game_Data * addata;
|
Game_Data * addata;
|
||||||
Towers * adtowers;
|
Towers * adtowers;
|
||||||
Splashes * adsplashes;
|
Splashes * adsplashes;
|
||||||
long int step;
|
long int step;
|
||||||
|
|
||||||
void setScene(QGraphicsScene * scene);
|
void setScene(QGraphicsScene * scene);
|
||||||
bool isWaveEnd() {return waveEnd;}
|
bool isWaveEnd() {return waveEnd;}
|
||||||
|
void setSpeed(float x);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void next();
|
void next();
|
||||||
void nextWave();
|
void nextWave();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void timerEvent(QTimerEvent * );
|
void timerEvent(QTimerEvent * );
|
||||||
void waveProcessing();
|
void waveProcessing();
|
||||||
|
|
||||||
bool waveInProgress;
|
bool waveInProgress;
|
||||||
bool waveEnd;
|
bool waveEnd;
|
||||||
int wavetime;
|
int wavetime;
|
||||||
|
int timer;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void killAlien(int playerId, int alienId);
|
void killAlien(int playerId, int alienId);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ADCORE_H
|
#endif // ADCORE_H
|
||||||
|
|||||||
101
aditem.cpp
@@ -6,69 +6,80 @@
|
|||||||
ADItem::ADItem(int id, adType type, QList<QImage *> *images_, QRectF geometry, QGraphicsItem *parent) :
|
ADItem::ADItem(int id, adType type, QList<QImage *> *images_, QRectF geometry, QGraphicsItem *parent) :
|
||||||
QGraphicsItem(parent)
|
QGraphicsItem(parent)
|
||||||
{
|
{
|
||||||
m_id = id;
|
m_id = id;
|
||||||
m_type = type;
|
m_type = type;
|
||||||
anim = 0;
|
anim = 0;
|
||||||
images = images_;
|
images = images_;
|
||||||
animcount = images->size();
|
animcount = images->size();
|
||||||
QSize size = images->at(0)->size();
|
QSize size = images->at(0)->size();
|
||||||
staticImage = false;
|
staticImage = false;
|
||||||
if (animcount == 1) staticImage = true;
|
if (animcount == 1) staticImage = true;
|
||||||
if (geometry.isNull()) br = QRect(QPoint(-(size.width()/2), -(size.height()/2)), size);
|
if (geometry.isNull()) br = QRect(QPoint(-(size.width()/2), -(size.height()/2)), size);
|
||||||
else br = geometry;
|
else br = geometry;
|
||||||
if (type == Alien)
|
hasBar = false;
|
||||||
{
|
switch (type)
|
||||||
setFlag(QGraphicsItem::ItemIsSelectable);
|
{
|
||||||
barValue = 1.f;
|
case Alien :
|
||||||
hasBar = true;
|
setFlag(QGraphicsItem::ItemIsSelectable);
|
||||||
} else hasBar = false;
|
barValue = 1.f;
|
||||||
if (staticImage)
|
hasBar = true;
|
||||||
{
|
setZValue(-1.f);
|
||||||
setCacheMode(QGraphicsItem::ItemCoordinateCache);
|
break;
|
||||||
img = (*images)[0];
|
case Other :
|
||||||
}
|
default:
|
||||||
|
setZValue(3.f);
|
||||||
|
}
|
||||||
|
if (staticImage)
|
||||||
|
{
|
||||||
|
setCacheMode(QGraphicsItem::ItemCoordinateCache);
|
||||||
|
img = (*images)[0];
|
||||||
|
}
|
||||||
|
cmode = QPainter::CompositionMode_SourceOver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ADItem::ADItem(QPoint id, QImage *image, QRectF geometry, QGraphicsItem *parent) :
|
ADItem::ADItem(QPoint id, QImage *image, QRectF geometry, QGraphicsItem *parent) :
|
||||||
QGraphicsItem(parent)
|
QGraphicsItem(parent)
|
||||||
{
|
{
|
||||||
hasBar = true;
|
hasBar = true;
|
||||||
barValue = 0.f;
|
barValue = 0.f;
|
||||||
m_type = Tower;
|
m_type = Tower;
|
||||||
m_tid = id;
|
setZValue(-2.f);
|
||||||
img = image;
|
m_tid = id;
|
||||||
QSize size = img->size();
|
img = image;
|
||||||
if (geometry.isNull()) br = QRect(QPoint(-(size.width()/2),-(size.height()/2)),size);
|
QSize size = img->size();
|
||||||
else br = geometry;
|
if (geometry.isNull()) br = QRectF(QPoint(-(size.width()/2),-(size.height()/2)),size);
|
||||||
staticImage = true;
|
else br = geometry;
|
||||||
setFlag(QGraphicsItem::ItemIsSelectable);
|
staticImage = true;
|
||||||
|
setFlag(QGraphicsItem::ItemIsSelectable);
|
||||||
|
cmode = QPainter::CompositionMode_SourceOver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ADItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
|
void ADItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
|
||||||
{
|
{
|
||||||
if (staticImage)
|
painter->setCompositionMode(cmode);
|
||||||
painter->drawImage(br,*img);
|
if (staticImage)
|
||||||
else painter->drawImage(br, *(images->at(qRound(anim))));
|
painter->drawImage(br,*img);
|
||||||
if (isSelected())
|
else painter->drawImage(br, *(images->at(qRound(anim))));
|
||||||
{
|
// if (isSelected())
|
||||||
painter->setPen(Qt::red);
|
// {
|
||||||
painter->drawRect(br);
|
// painter->setPen(Qt::red);
|
||||||
}
|
// painter->drawRect(br);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QRectF ADItem::boundingRect() const
|
QRectF ADItem::boundingRect() const
|
||||||
{
|
{
|
||||||
return br;
|
return br;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADItem::next(float step)
|
void ADItem::next(float step)
|
||||||
{
|
{
|
||||||
if (staticImage) return;
|
if (staticImage) return;
|
||||||
anim+=step;
|
anim+=step;
|
||||||
if (qRound(anim) >= animcount)
|
if (qRound(anim) >= animcount)
|
||||||
anim = 0;
|
anim = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
53
aditem.h
@@ -2,37 +2,40 @@
|
|||||||
#define ADITEM_H
|
#define ADITEM_H
|
||||||
|
|
||||||
#include <QGraphicsItem>
|
#include <QGraphicsItem>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
class ADItem : public QGraphicsItem
|
class ADItem : public QGraphicsItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum adType {Alien, Tower, Splash};
|
enum adType {Alien, Tower, Splash, Other};
|
||||||
explicit ADItem(int id, adType type, QList<QImage *> *images, QRectF geometry = QRectF(), QGraphicsItem *parent = 0);
|
explicit ADItem(int id, adType type, QList<QImage *> *images, QRectF geometry = QRectF(), QGraphicsItem *parent = 0);
|
||||||
explicit ADItem(QPoint id, QImage * image, QRectF geometry = QRectF(), QGraphicsItem *parent = 0);
|
explicit ADItem(QPoint id, QImage * image, QRectF geometry = QRectF(), QGraphicsItem *parent = 0);
|
||||||
void setBarValue(float val) {barValue = val;}
|
void setBarValue(float val) {barValue = val;}
|
||||||
void setBarVisible(bool visible = true) {hasBar = visible;}
|
void setBarVisible(bool visible = true) {hasBar = visible;}
|
||||||
void hideBar() {hasBar = false; setCacheMode(QGraphicsItem::ItemCoordinateCache);}
|
void setCompositionMode(QPainter::CompositionMode mode) {cmode = mode;}
|
||||||
float value() {return barValue;}
|
void hideBar() {hasBar = false; setCacheMode(QGraphicsItem::ItemCoordinateCache);}
|
||||||
bool isBarVisible() {return hasBar;}
|
float value() {return barValue;}
|
||||||
void next(float step);
|
bool isBarVisible() {return hasBar;}
|
||||||
QPoint tid() {return m_tid;}
|
void next(float step = 1.f);
|
||||||
int id() {return m_id;}
|
QPoint tid() {return m_tid;}
|
||||||
adType itemType() {return m_type;}
|
int id() {return m_id;}
|
||||||
|
adType itemType() {return m_type;}
|
||||||
|
QRectF boundingRect() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||||
QRectF boundingRect() const;
|
QList<QImage *> * images;
|
||||||
QList<QImage *> * images;
|
QImage * img;
|
||||||
QImage * img;
|
float anim;
|
||||||
float anim;
|
adType m_type;
|
||||||
adType m_type;
|
int m_id;
|
||||||
int m_id;
|
QPoint m_tid;
|
||||||
QPoint m_tid;
|
int animcount;
|
||||||
int animcount;
|
bool staticImage;
|
||||||
bool staticImage;
|
bool hasBar;
|
||||||
bool hasBar;
|
float barValue;
|
||||||
float barValue;
|
QRectF br;
|
||||||
QRectF br;
|
QPainter::CompositionMode cmode;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ADITEM_H
|
#endif // ADITEM_H
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[Project]
|
|
||||||
Manager=KDevCMakeManager
|
|
||||||
Name=aliendefender
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by Qt Creator 2.2.84, 2011-08-20T10:11:41. -->
|
<!-- Written by Qt Creator 2.2.84, 2011-08-21T21:34:49. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
<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.DisplayName"></value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</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.ActiveDeployConfiguration">0</value>
|
||||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
@@ -132,7 +132,7 @@
|
|||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qt Отладка</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">INVALID</value>
|
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Mingw:D:/Qt/qtcreator-2.2.84/mingw/bin/gcc.exe.x86-windows-msys-pe-32bit.D:/Qt/qtcreator-2.2.84/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
|
||||||
@@ -182,12 +182,12 @@
|
|||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qt Релиз</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</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="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="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">7</value>
|
||||||
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
|
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||||
|
|||||||
184
aliendefender.pro.user.2.3pre1
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="int">0</value>
|
||||||
|
</data>
|
||||||
|
<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>
|
||||||
|
</valuemap>
|
||||||
|
</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">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: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>
|
||||||
|
</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">Build</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</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">Clean</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</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">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">7</value>
|
||||||
|
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="QString">ProjectExplorer.ToolChain.Mingw:D:/Qt/2010.04/mingw/bin/g++.exe.x86-windows-msys-pe-32bit.C:/Qt/qtcreator-2.2.0/pythongdb/gdb-i686-pc-mingw32.exe</value>
|
||||||
|
<value 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">Build</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</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"></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">Clean</value>
|
||||||
|
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</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">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">2</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>
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
|
</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>
|
||||||
|
</valuemap>
|
||||||
|
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="int">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
|
||||||
|
<value type="QString">{00000000-0000-0000-0000-000000000000}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">9</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
@@ -60,6 +60,7 @@ void Aliens::retrace(bool * OK)
|
|||||||
|
|
||||||
void Aliens::delAlien(int id, bool missed)
|
void Aliens::delAlien(int id, bool missed)
|
||||||
{
|
{
|
||||||
|
emit alien_killed(id);
|
||||||
if (missed)
|
if (missed)
|
||||||
{
|
{
|
||||||
m_missingAliens++;
|
m_missingAliens++;
|
||||||
|
|||||||
31
aliens.h
@@ -11,28 +11,29 @@ class Aliens : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit Aliens(Map * map, QObject *parent = 0);
|
explicit Aliens(Map * map, QObject *parent = 0);
|
||||||
void addAlien(int srcId);
|
void addAlien(int srcId);
|
||||||
void update();
|
void update();
|
||||||
void setScene(QGraphicsScene * scene_) {scene = scene_;}
|
void setScene(QGraphicsScene * scene_) {scene = scene_;}
|
||||||
QList <srcAlienType> srcAliens;
|
QList <srcAlienType> srcAliens;
|
||||||
QHash <int,AlienType> curAliens;
|
QHash <int,AlienType> curAliens;
|
||||||
int missingAliens() {return m_missingAliens;}
|
int missingAliens() {return m_missingAliens;}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void alien_killed(int id);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void delAlien(int id, bool missed = false);
|
void delAlien(int id, bool missed = false);
|
||||||
void retrace(bool * OK);
|
void retrace(bool * OK);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Map * map;
|
Map * map;
|
||||||
QGraphicsScene * scene;
|
QGraphicsScene * scene;
|
||||||
|
|
||||||
QPointF globStart;
|
QPointF globStart;
|
||||||
QPointF globFinish;
|
QPointF globFinish;
|
||||||
int nextId;
|
int nextId;
|
||||||
int m_missingAliens;
|
int m_missingAliens;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
250
base_types.h
@@ -15,180 +15,230 @@
|
|||||||
#include <QRectF>
|
#include <QRectF>
|
||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
#include <QPainter>
|
||||||
#include "aditem.h"
|
#include "aditem.h"
|
||||||
|
|
||||||
const float cellSize = 20.f;
|
const float cellSize = 20.f;
|
||||||
|
|
||||||
|
struct srcAlienType;
|
||||||
|
struct srcTowerType;
|
||||||
|
struct srcSplashType;
|
||||||
|
struct srcTriggerType;
|
||||||
|
|
||||||
struct srcAlienType
|
struct srcAlienType
|
||||||
{
|
{
|
||||||
QString name;
|
QString name;
|
||||||
float speed;
|
float speed;
|
||||||
float health;
|
float health;
|
||||||
float armor;
|
float armor;
|
||||||
float regeneration;
|
float regeneration;
|
||||||
bool isFlying;
|
bool isFlying;
|
||||||
unsigned int score;
|
unsigned int score;
|
||||||
int imgType;
|
int imgType;
|
||||||
QList<QImage *> * images;
|
QList<QImage *> * images;
|
||||||
unsigned int prise;
|
unsigned int prise;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct AlienType
|
struct AlienType
|
||||||
{
|
{
|
||||||
int id; // uses for QHash
|
int id; // uses for QHash
|
||||||
srcAlienType * src;
|
srcAlienType * src;
|
||||||
QPointF pos;
|
QPointF pos;
|
||||||
float angle; // -180 .. 180
|
float angle; // -180 .. 180
|
||||||
float speed; // cells per tick (speed=1 is 60cells by 1 sec for 60fps e.g.)
|
float speed; // cells per tick (speed=1 is 60cells by 1 sec for 60fps e.g.)
|
||||||
float health;
|
float health;
|
||||||
QPoint finish;
|
QPoint finish;
|
||||||
QVector <QPointF> path;
|
QVector <QPointF> path;
|
||||||
int pathIndex;
|
int pathIndex;
|
||||||
ADItem * item;
|
ADItem * item;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct srcTriggerType
|
struct srcTriggerType
|
||||||
{
|
{
|
||||||
enum triggerType
|
enum triggerType
|
||||||
{
|
{
|
||||||
onDestination,
|
onDestination,
|
||||||
onTimer,
|
onTimer,
|
||||||
onAlienInRadius
|
onAlienInRadius
|
||||||
};
|
};
|
||||||
|
|
||||||
enum aimType
|
enum aimType
|
||||||
{
|
{
|
||||||
noAim,
|
noAim,
|
||||||
parentAim,
|
parentAim,
|
||||||
allSide,
|
allSide,
|
||||||
nearlestAlien
|
nearestAlien
|
||||||
};
|
};
|
||||||
int childId; // =-1 for none birth splash (e.q. only damage)
|
int childId; // =-1 for none birth splash (e.q. only damage)
|
||||||
aimType childAim;
|
aimType childAim;
|
||||||
bool delParent;
|
bool delParent;
|
||||||
float damage;
|
float damage;
|
||||||
float radius;
|
float radius;
|
||||||
triggerType type;
|
triggerType type;
|
||||||
unsigned int timer;
|
unsigned int timer;
|
||||||
int count;
|
int count;
|
||||||
float randomPosRadius;
|
float randomPosRadius;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct TriggerOnDest
|
struct TriggerOnDest
|
||||||
{
|
{
|
||||||
srcTriggerType * src;
|
srcTriggerType * src;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct TriggerOnTimer
|
struct TriggerOnTimer
|
||||||
{
|
{
|
||||||
srcTriggerType * src;
|
srcTriggerType * src;
|
||||||
unsigned int timer;
|
unsigned int timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct TriggerOnAlien
|
struct TriggerOnAlien
|
||||||
{
|
{
|
||||||
srcTriggerType * src;
|
srcTriggerType * src;
|
||||||
QList <int> triggerAliens;
|
QList <int> triggerAliens;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct srcSplashType;
|
struct MorphType
|
||||||
|
{
|
||||||
|
srcTowerType * morph;
|
||||||
|
float expRequired;
|
||||||
|
unsigned int cost;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct srcTowerType
|
struct srcTowerType
|
||||||
{
|
{
|
||||||
QString name;
|
QString name;
|
||||||
QImage * image;
|
QImage * image;
|
||||||
int imgType;
|
int imgType;
|
||||||
int PlayerId; // tower's owner
|
int PlayerId; // tower's owner
|
||||||
unsigned int cost;
|
unsigned int cost;
|
||||||
unsigned int reload;
|
unsigned int reload;
|
||||||
unsigned int buildTime;
|
unsigned int buildTime;
|
||||||
float radius; // in cells
|
float radius; // in cells
|
||||||
float expByShot;
|
float expByShot;
|
||||||
float expByKill;
|
float expByKill;
|
||||||
float expByDamage;
|
float expByDamage;
|
||||||
QList <srcTriggerType> triggers;
|
bool isRoot;
|
||||||
QList <srcSplashType> splashes;
|
QList <srcTriggerType> triggers;
|
||||||
|
QList <srcSplashType> splashes;
|
||||||
|
QList<MorphType> morphs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct TowerType
|
struct TowerType
|
||||||
{
|
{
|
||||||
srcTowerType * src;
|
srcTowerType * src;
|
||||||
int aim; // aim alien Id
|
int aim; // aim alien Id
|
||||||
int PlayerId; // tower's owner
|
int PlayerId; // tower's owner
|
||||||
QPoint pos; // same as Id; not QPointF because tower fixed on grid
|
QPoint pos; // same as Id; not QPointF because tower fixed on grid
|
||||||
float angle; // -180 .. 180
|
float angle; // -180 .. 180
|
||||||
unsigned int reload; // time for reload in ticks
|
unsigned int reload; // time for reload in ticks
|
||||||
unsigned int build;
|
unsigned int build;
|
||||||
float experience;
|
float experience;
|
||||||
ADItem * item;
|
ADItem * item;
|
||||||
bool isBilding;
|
bool isBilding;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct srcSplashType
|
struct srcSplashType
|
||||||
{
|
{
|
||||||
QString name;
|
QString name;
|
||||||
int imgType;
|
int imgType;
|
||||||
float speed; // in cells
|
float speed; // in cells
|
||||||
int lifetime;
|
int lifetime;
|
||||||
bool autoControl;
|
bool autoControl;
|
||||||
QList <int> triggerIndexes;
|
bool keepOnAlien;
|
||||||
QList<QImage *> * images;
|
float animSpeed;
|
||||||
|
float ZValue;
|
||||||
|
QPainter::CompositionMode compositionMode;
|
||||||
|
QList <int> triggerIndexes;
|
||||||
|
QList<QImage *> * images;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct SplashType
|
struct SplashType
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
srcSplashType * src;
|
srcSplashType * src;
|
||||||
srcTowerType * srcTow;
|
srcTowerType * srcTow;
|
||||||
QPoint towerId; // parent tower, (0,0) or null for non parent
|
QPoint towerId; // parent tower, (0,0) or null for non parent
|
||||||
int PlayerId;
|
int PlayerId;
|
||||||
int AlienId; // aim alien (different from tower.AlienId)
|
int AlienId; // aim alien (different from tower.AlienId)
|
||||||
QPointF destination;
|
QPointF destination;
|
||||||
int life; // in ticks
|
int life; // in ticks
|
||||||
float angle; // -180 .. 180
|
float angle; // -180 .. 180
|
||||||
QPointF pos;
|
QPointF pos;
|
||||||
QList <TriggerOnAlien> trigsOnAlien;
|
QList <TriggerOnAlien> trigsOnAlien;
|
||||||
QList <TriggerOnDest> trigsOnDest;
|
QList <TriggerOnDest> trigsOnDest;
|
||||||
QList <TriggerOnTimer> trigsOnTimer;
|
QList <TriggerOnTimer> trigsOnTimer;
|
||||||
ADItem * item;
|
ADItem * item;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DEPRECATED !!!
|
|
||||||
struct AnimationType
|
struct AnimationType
|
||||||
{
|
{
|
||||||
QList<QImage * > * images;
|
QList<QImage * > * images;
|
||||||
};
|
};
|
||||||
/// DEPRECATED !!!
|
|
||||||
|
|
||||||
|
|
||||||
struct WaveType
|
struct WaveType
|
||||||
{
|
{
|
||||||
QList <int> types; // some types of aliens (e.g. 2 fly and 3 grount in one wave)
|
QList <int> types; // some types of aliens (e.g. 2 fly and 3 grount in one wave)
|
||||||
QList <unsigned int> counts; // count aliens of each type
|
QList <unsigned int> counts; // count aliens of each type
|
||||||
unsigned int timeout; // time in ticks
|
unsigned int timeout; // time in ticks
|
||||||
unsigned int prise;
|
unsigned int prise;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
inline uint qHash(const QPoint &pos)
|
inline uint qHash(const QPoint &pos)
|
||||||
{
|
{
|
||||||
return qHash(pos.x() + (pos.y() << 16));
|
return qHash(pos.x() + (pos.y() << 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline float distance2(const QPointF &p1, const QPointF &p2)
|
inline float distance2(const QPointF &p1, const QPointF &p2)
|
||||||
{
|
{
|
||||||
return (p1.x()-p2.x())*(p1.x()-p2.x())+(p1.y()-p2.y())*(p1.y()-p2.y());
|
return (p1.x()-p2.x())*(p1.x()-p2.x())+(p1.y()-p2.y())*(p1.y()-p2.y());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<typename Type>
|
||||||
|
class _PIForeachC {
|
||||||
|
public:
|
||||||
|
_PIForeachC(const Type & t): _t(t) {_it = _t.begin(); _break = false;}
|
||||||
|
typename Type::value_type _var;
|
||||||
|
typename Type::const_iterator _it;
|
||||||
|
const Type & _t;
|
||||||
|
bool _break, _inv;
|
||||||
|
inline bool isEnd() {return _it == _t.end();}
|
||||||
|
inline void operator ++() {_it++; _break = false;}
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename Type>
|
||||||
|
class _PIForeach {
|
||||||
|
public:
|
||||||
|
_PIForeach(Type & t): _t(t) {_it = _t.begin(); _break = false;}
|
||||||
|
typename Type::value_type _var;
|
||||||
|
typename Type::iterator _it;
|
||||||
|
Type & _t;
|
||||||
|
bool _break, _inv;
|
||||||
|
inline bool isEnd() {return _it == _t.end();}
|
||||||
|
inline void operator ++() {_it++; _break = false;}
|
||||||
|
};
|
||||||
|
|
||||||
|
#define piForTimes(c) for(int i = 0; i < c; ++i)
|
||||||
|
|
||||||
|
#define piForeach(i,c) for(_PIForeach<typeof(c)> _for(c); !_for.isEnd(); ++_for) for(i = *_for._it; !_for._break; _for._break = true)
|
||||||
|
#define piForeachA(i,c) for(_PIForeach<typeof(c)> _for(c); !_for.isEnd(); ++_for) for(typeof(_for._var) & i(*_for._it); !_for._break; _for._break = true)
|
||||||
|
#define piForeachC(i,c) for(_PIForeachC<typeof(c)> _for(c); !_for.isEnd(); ++_for) for(const i = *_for._it; !_for._break; _for._break = true)
|
||||||
|
#define piForeachCA(i,c) for(_PIForeachC<typeof(c)> _for(c); !_for.isEnd(); ++_for) for(const typeof(_for._var) & i(*_for._it); !_for._break; _for._break = true)
|
||||||
|
|
||||||
|
#define piForeachAC piForeachCA
|
||||||
|
|
||||||
#endif // BASE_TYPES_H
|
#endif // BASE_TYPES_H
|
||||||
|
|||||||
14
clean
@@ -1,14 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
VERBOSE=1 make clean
|
|
||||||
for i in $( ls -1 ); do
|
|
||||||
if [ "`ls -1 --file-type | grep $i | grep -o /`" = "/" ]; then
|
|
||||||
cd $i
|
|
||||||
rm -rvf ./CMakeFiles
|
|
||||||
rm -vf ./CMakeCache.txt ./Makefile ./cmake_install.cmake ./install_manifest.txt ./*~
|
|
||||||
cd ../
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
rm -rvf ./CMakeFiles
|
|
||||||
rm -vf ./CMakeCache.txt ./Makefile ./cmake_install.cmake ./install_manifest.txt ./*~ ./*cxx ./moc_* ./*.o
|
|
||||||
cd ADeditor
|
|
||||||
make clean
|
|
||||||
143
data2.xml
@@ -1,8 +1,8 @@
|
|||||||
<!DOCTYPE data>
|
<!DOCTYPE data>
|
||||||
<ADdata>
|
<ADdata>
|
||||||
<aliens>
|
<aliens>
|
||||||
<alien speed="0.03" imageType="1" prise="1" id="1" score="12" name="Monstr 1" health="15"/>
|
<alien speed="0.05" imageType="1" prise="1" id="1" score="12" name="Monstr 1" health="15"/>
|
||||||
<alien speed="0.01" imageType="1" prise="100" id="4" score="10" name="test" health="1000"/>
|
<alien speed="0.02" imageType="1" prise="100" id="4" score="10" name="test" health="1000"/>
|
||||||
<alien speed="0.03" imageType="1" prise="4" id="10" score="99" name="first" health="50"/>
|
<alien speed="0.03" imageType="1" prise="4" id="10" score="99" name="first" health="50"/>
|
||||||
<alien regeneration="3" speed="0.01" imageType="1" prise="10" armor="1.5" id="12" score="99" name="MMMM" health="200"/>
|
<alien regeneration="3" speed="0.01" imageType="1" prise="10" armor="1.5" id="12" score="99" name="MMMM" health="200"/>
|
||||||
<alien speed="0.05" imageType="1" prise="10" id="33" score="99" name="Mega Alien" health="888"/>
|
<alien speed="0.05" imageType="1" prise="10" id="33" score="99" name="Mega Alien" health="888"/>
|
||||||
@@ -13,105 +13,106 @@
|
|||||||
<map width="25" imageType="20" height="11" id="3" data="AAAEtHicY2BgkGRgYOD+//+PBDpmYFDnxy4OUQ+kGQnhUfWj6kfVj6onRj1mOaO0A5s4ADeqzbA=" name="map" maxPlayers="1"/>
|
<map width="25" imageType="20" height="11" id="3" data="AAAEtHicY2BgkGRgYOD+//+PBDpmYFDnxy4OUQ+kGQnhUfWj6kfVj6onRj1mOaO0A5s4ADeqzbA=" name="map" maxPlayers="1"/>
|
||||||
</maps>
|
</maps>
|
||||||
<waves>
|
<waves>
|
||||||
<wave prise="5" timeout="50" id="1"/>
|
<wave prise="5" timeout="30" id="1"/>
|
||||||
<wave prise="7" timeout="50" id="2"/>
|
<wave prise="7" timeout="30" id="2"/>
|
||||||
<wave prise="10" timeout="50" id="3"/>
|
<wave prise="10" timeout="30" id="3"/>
|
||||||
<wave prise="20" timeout="50" id="4"/>
|
<wave prise="20" timeout="30" id="4"/>
|
||||||
<wave prise="220" timeout="20" id="5"/>
|
<wave prise="50" timeout="10" id="5"/>
|
||||||
<wave prise="220" timeout="200" id="6"/>
|
<wave prise="100" timeout="20" id="6"/>
|
||||||
<!--<wave prise="220" timeout="250" id="7"/>
|
<wave prise="200" timeout="5" id="7"/>
|
||||||
<wave prise="220" timeout="500" id="8"/>
|
<wave prise="1000" timeout="50" id="8"/>
|
||||||
<wave prise="220" timeout="100" id="9"/>
|
|
||||||
<wave prise="220" timeout="1" id="10"/>
|
|
||||||
<wave prise="220" timeout="5" id="11"/>-->
|
|
||||||
</waves>
|
</waves>
|
||||||
<levels>
|
<levels>
|
||||||
<level map="3" id="1" score="138887032" name="First Level"/>
|
<level map="3" id="1" score="286154272" name="First Level"/>
|
||||||
</levels>
|
</levels>
|
||||||
<waveParts>
|
<waveParts>
|
||||||
<wavePart alien="1" count="1" wave="1"/>
|
<wavePart alien="1" count="1" wave="1"/>
|
||||||
<wavePart alien="1" count="2" wave="2"/>
|
<wavePart alien="1" count="2" wave="2"/>
|
||||||
<wavePart alien="1" count="3" wave="3"/>
|
<wavePart alien="1" count="3" wave="3"/>
|
||||||
<wavePart alien="1" count="5" wave="4"/>
|
<wavePart alien="1" count="5" wave="4"/>
|
||||||
<wavePart alien="1" count="200" wave="5"/>
|
<wavePart alien="1" count="20" wave="5"/>
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
<wavePart alien="4" count="1" wave="6"/>
|
||||||
<!--<wavePart alien="4" count="60" wave="4"/>
|
<wavePart alien="4" count="10" wave="7"/>
|
||||||
<wavePart alien="2" count="20" wave="4"/>
|
<wavePart alien="4" count="100" wave="8"/>
|
||||||
<wavePart alien="4" count="26" wave="5"/>
|
|
||||||
<wavePart alien="10" count="26" wave="5"/>
|
|
||||||
<wavePart alien="12" count="26" wave="5"/>
|
|
||||||
<wavePart alien="4" count="16" wave="5"/>
|
|
||||||
<wavePart alien="10" count="16" wave="5"/>
|
|
||||||
<wavePart alien="12" count="16" wave="5"/>
|
|
||||||
<wavePart alien="4" count="6" wave="5"/>
|
|
||||||
<wavePart alien="10" count="1" wave="6"/>
|
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
|
||||||
<wavePart alien="10" count="1" wave="6"/>
|
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
|
||||||
<wavePart alien="10" count="1" wave="6"/>
|
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
|
||||||
<wavePart alien="10" count="1" wave="6"/>
|
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
|
||||||
<wavePart alien="10" count="1" wave="6"/>
|
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
|
||||||
<wavePart alien="12" count="1" wave="6"/>
|
|
||||||
<wavePart alien="10" count="1" wave="6"/>
|
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
|
||||||
<wavePart alien="10" count="1" wave="6"/>
|
|
||||||
<wavePart alien="4" count="1" wave="6"/>
|
|
||||||
<wavePart alien="33" count="2" wave="7"/>
|
|
||||||
<wavePart alien="33" count="50" wave="8"/>-->
|
|
||||||
</waveParts>
|
</waveParts>
|
||||||
<wavesOnLevels>
|
<wavesOnLevels>
|
||||||
<waveOnLevel wave="1" level="1"/>
|
<waveOnLevel wave="8" level="1"/>
|
||||||
<waveOnLevel wave="2" level="1"/>
|
<waveOnLevel wave="7" level="1"/>
|
||||||
<waveOnLevel wave="3" level="1"/>
|
|
||||||
<waveOnLevel wave="4" level="1"/>
|
|
||||||
<waveOnLevel wave="5" level="1"/>
|
|
||||||
<waveOnLevel wave="6" level="1"/>
|
<waveOnLevel wave="6" level="1"/>
|
||||||
|
<waveOnLevel wave="5" level="1"/>
|
||||||
|
<waveOnLevel wave="4" level="1"/>
|
||||||
|
<waveOnLevel wave="3" level="1"/>
|
||||||
|
<waveOnLevel wave="2" level="1"/>
|
||||||
|
<waveOnLevel wave="1" level="1"/>
|
||||||
</wavesOnLevels>
|
</wavesOnLevels>
|
||||||
<splashes>
|
<splashes>
|
||||||
<splash speed="0.2" imageType="5" lifetime="9999" id="1" name="rocket"/>
|
<splash speed="0.2" imageType="5" lifetime="9999" ZValue="0" compositionMode="Source" animSpeed="1" id="1" name="rocket"/>
|
||||||
<splash speed="0.2" imageType="5" lifetime="9999" autoControl="true" id="2" name="smart rocket"/>
|
<splash speed="0.2" imageType="5" lifetime="9999" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="2" name="smart rocket"/>
|
||||||
<splash speed="0.5" imageType="7" lifetime="9999" autoControl="true" id="3" name="bullet"/>
|
<splash speed="1" imageType="7" lifetime="9999" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="3" name="bullet"/>
|
||||||
<splash speed="0.5" imageType="7" lifetime="9999" autoControl="true" id="7" name="bullet"/>
|
<splash speed="0" imageType="4" lifetime="16" ZValue="0" compositionMode="Plus" animSpeed="1" id="4" name="bum"/>
|
||||||
<splash speed="0" imageType="4" lifetime="16" id="4" name="bum"/>
|
<splash speed="0" imageType="6" lifetime="29" ZValue="0" compositionMode="Source" animSpeed="1" id="5" name="smoke"/>
|
||||||
<splash speed="0" imageType="6" lifetime="10" 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.1" imageType="5" lifetime="50" autoControl="true" 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"/>
|
||||||
</splashes>
|
</splashes>
|
||||||
<towers>
|
<towers>
|
||||||
<tower imageType="8" radius="12" expByKill="0.1" expByShot="0.15" buildTime="150" splash="2" reload="15" id="1" name="rocket launcher 2" cost="5" expByDamage="0.04"/>
|
<tower imageType="8" radius="12" expByKill="0.1" expByShot="0.15" buildTime="50" splash="2" reload="15" id="1" name="rocket launcher 2" cost="5" 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="7" expByDamage="0.1"/>
|
<tower imageType="2" radius="3" expByKill="0.2" expByShot="0.1" buildTime="25" splash="3" reload="50" id="2" name="tower 1" cost="7" expByDamage="0.1"/>
|
||||||
<tower imageType="2" radius="3" expByKill="0.2" expByShot="0.1" buildTime="25" splash="3" reload="35" id="4" name="tower 1-2" cost="15" expByDamage="0.1"/>
|
<tower imageType="3" radius="5" expByKill="0.1" expByShot="0.15" buildTime="20" splash="1" reload="50" id="3" name="rocket launcher" cost="3" expByDamage="0.04"/>
|
||||||
<tower imageType="2" radius="2" expByKill="0.2" expByShot="0.1" buildTime="25" splash="3" reload="15" id="5" name="tower 1-3" cost="25" expByDamage="0.1"/>
|
<tower imageType="12" radius="3" expByKill="0.2" expByShot="0.1" buildTime="25" splash="3" reload="35" id="4" name="tower 1-2" cost="15" 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="3" expByDamage="0.04"/>
|
<tower imageType="13" radius="4" expByKill="0.2" expByShot="0.1" buildTime="25" splash="3" reload="15" id="5" name="tower 1-3" cost="25" 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="10" expByDamage="0.1"/>
|
||||||
</towers>
|
</towers>
|
||||||
<triggers>
|
<triggers>
|
||||||
<trigger damage="5" childAim="noAim" delParent="true" type="onDestination" id="2" name="shot"/>
|
<trigger damage="2" childAim="noAim" radius="2" count="1" type="onAlienInRadius" id="1" name="fire shot"/>
|
||||||
|
<trigger damage="5" childAim="noAim" delParent="true" count="1" type="onDestination" id="2" name="shot"/>
|
||||||
<trigger damage="1" childAim="noAim" radius="2.5" delParent="true" count="1" type="onDestination" id="3" name="explosion"/>
|
<trigger damage="1" 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="2"/>
|
<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"/>
|
||||||
</triggers>
|
</triggers>
|
||||||
<chains>
|
<chains>
|
||||||
<chain tower="1" trigger="4" child="5" parent="2"/>
|
|
||||||
<chain tower="1" trigger="3" child="4" parent="2"/>
|
<chain tower="1" trigger="3" child="4" parent="2"/>
|
||||||
<chain tower="2" trigger="2" parent="3"/>
|
<chain tower="1" trigger="4" child="5" parent="2"/>
|
||||||
<chain tower="4" trigger="2" parent="7"/>
|
<chain tower="2" trigger="2" child="7" parent="3"/>
|
||||||
<chain tower="3" trigger="4" child="5" parent="1"/>
|
|
||||||
<chain tower="3" trigger="3" child="4" parent="1"/>
|
<chain tower="3" trigger="3" child="4" parent="1"/>
|
||||||
|
<chain tower="3" trigger="4" child="5" parent="1"/>
|
||||||
|
<chain tower="4" trigger="2" child="7" parent="3"/>
|
||||||
|
<chain tower="5" trigger="5" parent="3"/>
|
||||||
|
<chain tower="6" trigger="6" parent="9"/>
|
||||||
|
<chain tower="6" trigger="1" child="9" parent="8"/>
|
||||||
</chains>
|
</chains>
|
||||||
<towersOnLevels>
|
<towersOnLevels>
|
||||||
|
<towerOnLevel tower="6" level="1"/>
|
||||||
|
<towerOnLevel tower="5" level="1"/>
|
||||||
|
<towerOnLevel tower="4" level="1"/>
|
||||||
<towerOnLevel tower="3" level="1"/>
|
<towerOnLevel tower="3" level="1"/>
|
||||||
<towerOnLevel tower="2" level="1"/>
|
<towerOnLevel tower="2" level="1"/>
|
||||||
<towerOnLevel tower="1" level="1"/>
|
<towerOnLevel tower="1" level="1"/>
|
||||||
</towersOnLevels>
|
</towersOnLevels>
|
||||||
|
<morphs>
|
||||||
|
<morph from="2" expRequired="0" to="4" cost="10"/>
|
||||||
|
<morph from="4" expRequired="0.5" to="5" cost="40"/>
|
||||||
|
<morph from="5" expRequired="10" to="3" cost="100"/>
|
||||||
|
<morph from="5" expRequired="10" to="1" cost="200"/>
|
||||||
|
</morphs>
|
||||||
<animations>
|
<animations>
|
||||||
<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"/>
|
<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"/>
|
<animation pathes="images/Towers/00_0.png" id="2" name="tower 1"/>
|
||||||
<animation pathes="images/Towers/01_0.png" id="3"/>
|
<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"/>
|
<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"/>
|
<animation pathes="images/Splashes/Rocket.png" id="5" name="rocket"/>
|
||||||
<animation pathes="images/Splashes/Smoke_00.png;images/Splashes/Smoke_01.png;images/Splashes/Smoke_02.png;images/Splashes/Smoke_03.png;images/Splashes/Smoke_04.png;images/Splashes/Smoke_05.png;images/Splashes/Smoke_06.png;images/Splashes/Smoke_07.png;images/Splashes/Smoke_08.png;images/Splashes/Smoke_09.png;images/Splashes/Smoke_10.png" id="6"/>
|
<animation pathes="images/Splashes/smoke_0001.png;images/Splashes/smoke_0002.png;images/Splashes/smoke_0003.png;images/Splashes/smoke_0004.png;images/Splashes/smoke_0005.png;images/Splashes/smoke_0006.png;images/Splashes/smoke_0007.png;images/Splashes/smoke_0008.png;images/Splashes/smoke_0009.png;images/Splashes/smoke_0010.png;images/Splashes/smoke_0011.png;images/Splashes/smoke_0012.png;images/Splashes/smoke_0013.png;images/Splashes/smoke_0014.png;images/Splashes/smoke_0015.png;images/Splashes/smoke_0016.png;images/Splashes/smoke_0017.png;images/Splashes/smoke_0018.png;images/Splashes/smoke_0019.png;images/Splashes/smoke_0020.png;images/Splashes/smoke_0021.png;images/Splashes/smoke_0022.png;images/Splashes/smoke_0023.png;images/Splashes/smoke_0024.png;images/Splashes/smoke_0025.png;images/Splashes/smoke_0026.png;images/Splashes/smoke_0027.png;images/Splashes/smoke_0028.png;images/Splashes/smoke_0029.png" id="6" name="smoke"/>
|
||||||
<animation pathes="images/Splashes/Shot_0.png;images/Splashes/Shot_1.png;images/Splashes/Shot_2.png;images/Splashes/Shot_3.png" id="7"/>
|
<animation pathes="images/Splashes/Shot_0.png" id="7" name="shot"/>
|
||||||
<animation pathes="images/Towers/01_6.png" id="8"/>
|
<animation pathes="images/Towers/01_6.png" id="8" name="rocket tower 2"/>
|
||||||
|
<animation pathes="images/Splashes/expl_blood_00.png;images/Splashes/expl_blood_01.png;images/Splashes/expl_blood_02.png;images/Splashes/expl_blood_03.png;images/Splashes/expl_blood_04.png;images/Splashes/expl_blood_05.png;images/Splashes/expl_blood_06.png;images/Splashes/expl_blood_07.png;images/Splashes/expl_blood_08.png;images/Splashes/expl_blood_09.png" id="9" name="blood"/>
|
||||||
|
<animation pathes="images/Interface/select_tower_0000.png;images/Interface/select_tower_0001.png;images/Interface/select_tower_0002.png;images/Interface/select_tower_0003.png;images/Interface/select_tower_0004.png;images/Interface/select_tower_0005.png;images/Interface/select_tower_0006.png;images/Interface/select_tower_0007.png;images/Interface/select_tower_0008.png;images/Interface/select_tower_0009.png;images/Interface/select_tower_0010.png;images/Interface/select_tower_0011.png;images/Interface/select_tower_0012.png;images/Interface/select_tower_0013.png;images/Interface/select_tower_0014.png;images/Interface/select_tower_0015.png;images/Interface/select_tower_0016.png;images/Interface/select_tower_0017.png;images/Interface/select_tower_0018.png;images/Interface/select_tower_0019.png;images/Interface/select_tower_0020.png;images/Interface/select_tower_0021.png;images/Interface/select_tower_0022.png;images/Interface/select_tower_0023.png;images/Interface/select_tower_0024.png;images/Interface/select_tower_0025.png;images/Interface/select_tower_0026.png;images/Interface/select_tower_0027.png;images/Interface/select_tower_0028.png;images/Interface/select_tower_0029.png;images/Interface/select_tower_0030.png;images/Interface/select_tower_0031.png;images/Interface/select_tower_0032.png;images/Interface/select_tower_0033.png;images/Interface/select_tower_0034.png;images/Interface/select_tower_0035.png;images/Interface/select_tower_0036.png;images/Interface/select_tower_0037.png;images/Interface/select_tower_0038.png;images/Interface/select_tower_0039.png;images/Interface/select_tower_0040.png;images/Interface/select_tower_0041.png;images/Interface/select_tower_0042.png;images/Interface/select_tower_0043.png;images/Interface/select_tower_0044.png;images/Interface/select_tower_0045.png;images/Interface/select_tower_0046.png;images/Interface/select_tower_0047.png;images/Interface/select_tower_0048.png;images/Interface/select_tower_0049.png;images/Interface/select_tower_0050.png" id="10" name="tower select"/>
|
||||||
|
<animation pathes="images/Interface/select_alien_0000.png;images/Interface/select_alien_0001.png;images/Interface/select_alien_0002.png;images/Interface/select_alien_0003.png;images/Interface/select_alien_0004.png;images/Interface/select_alien_0005.png;images/Interface/select_alien_0006.png;images/Interface/select_alien_0007.png;images/Interface/select_alien_0008.png;images/Interface/select_alien_0009.png;images/Interface/select_alien_0010.png;images/Interface/select_alien_0011.png;images/Interface/select_alien_0012.png;images/Interface/select_alien_0013.png;images/Interface/select_alien_0014.png;images/Interface/select_alien_0015.png;images/Interface/select_alien_0016.png;images/Interface/select_alien_0017.png;images/Interface/select_alien_0018.png;images/Interface/select_alien_0019.png;images/Interface/select_alien_0020.png;images/Interface/select_alien_0021.png;images/Interface/select_alien_0022.png;images/Interface/select_alien_0023.png;images/Interface/select_alien_0024.png;images/Interface/select_alien_0025.png;images/Interface/select_alien_0026.png;images/Interface/select_alien_0027.png;images/Interface/select_alien_0028.png;images/Interface/select_alien_0029.png;images/Interface/select_alien_0030.png;images/Interface/select_alien_0031.png;images/Interface/select_alien_0032.png;images/Interface/select_alien_0033.png;images/Interface/select_alien_0034.png;images/Interface/select_alien_0035.png;images/Interface/select_alien_0036.png;images/Interface/select_alien_0037.png;images/Interface/select_alien_0038.png;images/Interface/select_alien_0039.png;images/Interface/select_alien_0040.png;images/Interface/select_alien_0041.png;images/Interface/select_alien_0042.png;images/Interface/select_alien_0043.png;images/Interface/select_alien_0044.png;images/Interface/select_alien_0045.png;images/Interface/select_alien_0046.png;images/Interface/select_alien_0047.png;images/Interface/select_alien_0048.png;images/Interface/select_alien_0049.png;images/Interface/select_alien_0050.png" id="11" name="alien select"/>
|
||||||
|
<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"/>
|
||||||
</animations>
|
</animations>
|
||||||
</ADdata>
|
</ADdata>
|
||||||
|
|||||||
149
form.cpp
@@ -1,37 +1,40 @@
|
|||||||
#include "form.h"
|
#include "form.h"
|
||||||
#include "ui_form.h"
|
#include "ui_form.h"
|
||||||
#include "touchbuttframe.h"
|
|
||||||
|
|
||||||
|
|
||||||
Form::Form(QWidget *parent) :
|
Form::Form(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::Form)
|
ui(new Ui::Form)
|
||||||
{
|
{
|
||||||
buildTowerId = -1;
|
buildTowerId = -1;
|
||||||
cur_tow = QPoint();
|
|
||||||
cur_al = -1;
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
graphics = new AD_Graphics(&core);
|
graphics = new AD_Graphics(&core);
|
||||||
ui->widget->layout()->addWidget(graphics);
|
ui->widget->layout()->addWidget(graphics);
|
||||||
TouchButtFrame * tbf = new TouchButtFrame();
|
TouchButtFrame * tbf = new TouchButtFrame();
|
||||||
tbf->addButton(tr("delete"));
|
tbf->setOrientation(Qt::Vertical);
|
||||||
foreach (srcTowerType i, core.addata->players.at(0)->srcTowers)
|
morphtbf = new TouchButtFrame();
|
||||||
{
|
morphtbf->setOrientation(Qt::Vertical);
|
||||||
tbf->addButton(i.name);
|
tbf->addButton(tr("delete"));
|
||||||
//QPushButton * butt = new QPushButton(i.name);
|
foreach (srcTowerType i, core.addata->players.at(0)->srcTowers)
|
||||||
//towerButtons << butt;
|
{
|
||||||
//butt->setAutoDefault(true);
|
tbf->addButton(i.name);
|
||||||
//butt->setAutoExclusive(true);
|
//QPushButton * butt = new QPushButton(i.name);
|
||||||
//butt->setCheckable(true);
|
//towerButtons << butt;
|
||||||
}
|
//butt->setAutoDefault(true);
|
||||||
ui->gbTowers->layout()->addWidget(tbf);
|
//butt->setAutoExclusive(true);
|
||||||
connect(tbf,SIGNAL(click(int)),this,SLOT(towerBuild(int)));
|
//butt->setCheckable(true);
|
||||||
connect(tbf,SIGNAL(click(int)),tbf,SLOT(set_green(int)));
|
}
|
||||||
connect(graphics,SIGNAL(add_tow(QPoint)),this,SLOT(add_tow(QPoint)));
|
ui->gbTowers->layout()->addWidget(tbf);
|
||||||
connect(graphics,SIGNAL(tower_select(QPoint)),this,SLOT(towerSelected(QPoint)));
|
ui->verticalLayout_2->addWidget(morphtbf);
|
||||||
connect(graphics,SIGNAL(alien_select(int)),this,SLOT(alienSelected(int)));
|
connect(tbf,SIGNAL(click(int)),this,SLOT(towerBuild(int)));
|
||||||
|
connect(tbf,SIGNAL(click(int)),tbf,SLOT(set_green(int)));
|
||||||
|
connect(morphtbf,SIGNAL(click(int)),this,SLOT(towerMorph(int)));
|
||||||
|
connect(graphics,SIGNAL(add_tow(QPoint)),this,SLOT(add_tow(QPoint)));
|
||||||
|
connect(core.adtowers,SIGNAL(tower_killed(QPoint)),graphics,SLOT(towerKilled(QPoint)));
|
||||||
|
connect(core.addata->aliens,SIGNAL(alien_killed(int)),graphics,SLOT(alienKilled(int)));
|
||||||
connect(graphics,SIGNAL(cancel()),this,SLOT(cancel()));
|
connect(graphics,SIGNAL(cancel()),this,SLOT(cancel()));
|
||||||
this->startTimer(50);
|
connect(graphics,SIGNAL(selected_tower_changed(QPoint)),this,SLOT(selectedTowerChanged(QPoint)));
|
||||||
|
this->startTimer(50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -43,38 +46,37 @@ Form::~Form()
|
|||||||
|
|
||||||
void Form::on_pbNextWave_clicked()
|
void Form::on_pbNextWave_clicked()
|
||||||
{
|
{
|
||||||
core.nextWave();
|
core.nextWave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Form::towerBuild(int index)
|
void Form::towerBuild(int index)
|
||||||
{
|
{
|
||||||
buildTowerId = index-1;
|
buildTowerId = index-1;
|
||||||
if (index == 0) buildTowerId = -9;
|
if (index == 0) buildTowerId = -9;
|
||||||
graphics->setBuilding(true);
|
graphics->setBuilding(true);
|
||||||
setCursor(Qt::CrossCursor);
|
setCursor(Qt::CrossCursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Form::add_tow(QPoint pnt)
|
void Form::add_tow(QPoint pnt)
|
||||||
{
|
{
|
||||||
if (buildTowerId == -1) return;
|
if (buildTowerId == -1) return;
|
||||||
if (buildTowerId == -9) {core.adtowers->delTower(pnt); return;}
|
if (buildTowerId == -9)
|
||||||
core.adtowers->addTower(0,buildTowerId,pnt);
|
{
|
||||||
|
core.adtowers->delTower(pnt);
|
||||||
|
emit tower_killed();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
core.adtowers->addTower(0,buildTowerId,pnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//void Form::del_tow(QPoint pnt)
|
|
||||||
//{
|
|
||||||
// core.adtowers->delTower(pnt);
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
void Form::cancel()
|
void Form::cancel()
|
||||||
{
|
{
|
||||||
buildTowerId = -1;
|
buildTowerId = -1;
|
||||||
graphics->setBuilding(false);
|
graphics->setBuilding(false);
|
||||||
setCursor(Qt::ArrowCursor);
|
setCursor(Qt::ArrowCursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -82,37 +84,28 @@ void Form::timerEvent(QTimerEvent *)
|
|||||||
{
|
{
|
||||||
QString twstr;
|
QString twstr;
|
||||||
QString alstr;
|
QString alstr;
|
||||||
if (!cur_tow.isNull())
|
if (!graphics->selectedTower().isNull())
|
||||||
{
|
{
|
||||||
if (core.addata->curTowers.contains(cur_tow))
|
TowerType &tw = core.addata->curTowers[graphics->selectedTower()];
|
||||||
{
|
twstr = "\n\n " + tw.src->name;
|
||||||
TowerType tw = core.addata->curTowers.value(cur_tow);
|
if (tw.isBilding) twstr += tr("\n build %1/%2").arg(tw.build).arg(tw.src->buildTime);
|
||||||
twstr = "\n\n " + tw.src->name;
|
twstr += tr("\n player %1\n exp %2").arg(tw.PlayerId).arg(tw.experience);
|
||||||
if (tw.isBilding) twstr += tr("\n build %1/%2").arg(tw.build).arg(tw.src->buildTime);
|
twstr += tr("\n reload %1/%2\n alien %3").arg(tw.reload).arg(tw.src->reload).arg(tw.aim);
|
||||||
twstr += tr("\n player %1\n exp %2").arg(tw.PlayerId).arg(tw.experience);
|
twstr += tr("\n cost %1\n radius %2").arg(tw.src->cost).arg(tw.src->radius-1);
|
||||||
twstr += tr("\n reload %1/%2\n alien %3").arg(tw.reload).arg(tw.src->reload).arg(tw.aim);
|
for (int i=0; i<tw.src->morphs.size(); ++i)
|
||||||
twstr += tr("\n cost %1\n radius %2").arg(tw.src->cost).arg(tw.src->radius);
|
morphtbf->Button(i)->setEnabled(core.adtowers->canMorph(tw.pos,i));
|
||||||
} else {
|
|
||||||
cur_tow = QPoint();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (cur_al != -1)
|
if (graphics->selectedAlien() != -1)
|
||||||
{
|
{
|
||||||
if (core.addata->aliens->curAliens.contains(cur_al))
|
AlienType al = core.addata->aliens->curAliens.value(graphics->selectedAlien());
|
||||||
{
|
alstr = "\n\n " + al.src->name;
|
||||||
AlienType al = core.addata->aliens->curAliens.value(cur_al);
|
if (al.src->isFlying) alstr += tr("\n flying");
|
||||||
alstr = "\n\n " + al.src->name;
|
else alstr += tr("\n ground");
|
||||||
if (al.src->isFlying) alstr += tr("\n flying");
|
alstr += tr("\n health %1/%2").arg(al.health).arg(al.src->health);
|
||||||
else alstr += tr("\n ground");
|
alstr += tr("\n speed %1/%2").arg(al.speed).arg(al.src->speed);
|
||||||
alstr += tr("\n health %1/%2").arg(al.health).arg(al.src->health);
|
alstr += tr("\n armor %1\n regeneration %2").arg(al.src->armor).arg(al.src->regeneration);
|
||||||
alstr += tr("\n speed %1/%2").arg(al.speed).arg(al.src->speed);
|
alstr += tr("\n prise %1").arg(al.src->prise);
|
||||||
alstr += tr("\n armor %1\n regeneration %2").arg(al.src->armor).arg(al.src->regeneration);
|
|
||||||
alstr += tr("\n prise %1").arg(al.src->prise);
|
|
||||||
} else {
|
|
||||||
cur_al = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (!core.addata->aliens->curAliens.contains(cur_al)) cur_al = -1;
|
|
||||||
ui->lbInfo->setText(tr(" money %1 \n missing %2").arg(core.addata->players.at(0)->money).arg(core.addata->aliens->missingAliens())
|
ui->lbInfo->setText(tr(" money %1 \n missing %2").arg(core.addata->players.at(0)->money).arg(core.addata->aliens->missingAliens())
|
||||||
+ tr("\n aliens %1").arg(core.addata->aliens->curAliens.size())
|
+ tr("\n aliens %1").arg(core.addata->aliens->curAliens.size())
|
||||||
+ tr("\n towers %1").arg(core.addata->curTowers.size())
|
+ tr("\n towers %1").arg(core.addata->curTowers.size())
|
||||||
@@ -121,15 +114,27 @@ void Form::timerEvent(QTimerEvent *)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Form::towerSelected(QPoint id)
|
void Form::on_sbSpeed_valueChanged(double val)
|
||||||
{
|
{
|
||||||
cur_tow = id;
|
core.setSpeed(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Form::alienSelected(int id)
|
void Form::selectedTowerChanged(QPoint id)
|
||||||
{
|
{
|
||||||
cur_al = id;
|
morphtbf->deleteButtons();
|
||||||
|
if (id.isNull()) return;
|
||||||
|
srcTowerType * t = core.addata->curTowers[id].src;
|
||||||
|
piForeachCA(i, t->morphs)
|
||||||
|
morphtbf->addButton(i.morph->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Form::towerMorph(int index)
|
||||||
|
{
|
||||||
|
QPoint id(graphics->selectedTower());
|
||||||
|
graphics->towerKilled(id);
|
||||||
|
core.adtowers->morphTower(id,index);
|
||||||
|
graphics->selectTower(core.addata->curTowers[id].item);
|
||||||
|
selectedTowerChanged(graphics->selectedTower());
|
||||||
|
}
|
||||||
|
|||||||
33
form.h
@@ -4,6 +4,8 @@
|
|||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include "adcore.h"
|
#include "adcore.h"
|
||||||
#include "ad_graphics.h"
|
#include "ad_graphics.h"
|
||||||
|
#include "touchbuttframe.h"
|
||||||
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class Form;
|
class Form;
|
||||||
@@ -18,24 +20,25 @@ public:
|
|||||||
~Form();
|
~Form();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_pbNextWave_clicked();
|
void on_pbNextWave_clicked();
|
||||||
void towerBuild(int index);
|
void towerBuild(int index);
|
||||||
void add_tow(QPoint pnt);
|
void towerMorph(int index);
|
||||||
//void del_tow(QPoint pnt);
|
void add_tow(QPoint pnt);
|
||||||
void cancel();
|
void selectedTowerChanged(QPoint id);
|
||||||
void towerSelected(QPoint id);
|
void cancel();
|
||||||
void alienSelected(int id);
|
|
||||||
|
void on_sbSpeed_valueChanged(double arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void timerEvent(QTimerEvent *);
|
void timerEvent(QTimerEvent *);
|
||||||
|
Ui::Form *ui;
|
||||||
|
int buildTowerId;
|
||||||
|
AD_Core core;
|
||||||
|
AD_Graphics * graphics;
|
||||||
|
TouchButtFrame * morphtbf;
|
||||||
|
|
||||||
Ui::Form *ui;
|
signals:
|
||||||
int buildTowerId;
|
void tower_killed();
|
||||||
AD_Core core;
|
|
||||||
AD_Graphics * graphics;
|
|
||||||
QPoint cur_tow;
|
|
||||||
int cur_al;
|
|
||||||
//QList <QPushButton *> towerButtons;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FORM_H
|
#endif // FORM_H
|
||||||
|
|||||||
27
form.ui
@@ -52,7 +52,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>135</width>
|
<width>135</width>
|
||||||
<height>194</height>
|
<height>324</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||||
@@ -85,11 +85,36 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSpinBox" name="sbSpeed">
|
||||||
|
<property name="prefix">
|
||||||
|
<string>speed </string>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string> x</string>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>0.100000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="singleStep">
|
||||||
|
<double>0.500000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Preferred</enum>
|
||||||
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
Game_Data::Game_Data(Map *mapp, QObject *parent) :
|
Game_Data::Game_Data(Map *mapp, QObject *parent) :
|
||||||
QObject(parent)
|
QObject(parent)
|
||||||
{
|
{
|
||||||
map = mapp;
|
map = mapp;
|
||||||
curWave = 0;
|
curWave = 0;
|
||||||
aliens = new Aliens(map);
|
// alienSelect.images = towerSelect.images = 0;
|
||||||
|
aliens = new Aliens(map);
|
||||||
}
|
}
|
||||||
|
|||||||
26
game_data.h
@@ -11,18 +11,20 @@ class Game_Data : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit Game_Data(Map * map, QObject *parent = 0);
|
explicit Game_Data(Map * map, QObject *parent = 0);
|
||||||
QList <srcSplashType> srcSplashes;
|
QList <srcSplashType> srcSplashes;
|
||||||
QList <srcTriggerType> srcTriggers;
|
QList <srcTriggerType> srcTriggers;
|
||||||
QHash <int,SplashType> curSplashes;
|
QHash <int,SplashType> curSplashes;
|
||||||
QHash <QPoint,TowerType> curTowers;
|
QHash <QPoint,TowerType> curTowers;
|
||||||
QList <WaveType> waves;
|
QList <WaveType> waves;
|
||||||
QList <Player *> players;
|
QList <Player *> players;
|
||||||
QList <AnimationType> curAnimations;
|
QList <AnimationType> curAnimations;
|
||||||
Map * map;
|
AnimationType towerSelect;
|
||||||
Aliens * aliens;
|
AnimationType alienSelect;
|
||||||
int curWave;
|
Map * map;
|
||||||
int missingAliens;
|
Aliens * aliens;
|
||||||
|
int curWave;
|
||||||
|
int missingAliens;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|||||||
30
images.qrc
@@ -1,30 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/images">
|
<qresource prefix="/">
|
||||||
<file>images/Aliens/Al_00_0.png</file>
|
<file>schema.xml</file>
|
||||||
<file>images/Aliens/Al_00_1.png</file>
|
<file>images/select.png</file>
|
||||||
<file>images/Aliens/Al_00_2.png</file>
|
|
||||||
<file>images/Aliens/Al_00_3.png</file>
|
|
||||||
<file>images/Aliens/Al_00_4.png</file>
|
|
||||||
<file>images/Aliens/Al_00_5.png</file>
|
|
||||||
<file>images/Aliens/Al_00_6.png</file>
|
|
||||||
<file>images/Aliens/Al_00_7.png</file>
|
|
||||||
<file>images/Aliens/Al_00_8.png</file>
|
|
||||||
<file>images/Aliens/Al_00_9.png</file>
|
|
||||||
<file>images/Aliens/Al_00_10.png</file>
|
|
||||||
<file>images/Aliens/Al_00_11.png</file>
|
|
||||||
<file>images/Aliens/Al_00_12.png</file>
|
|
||||||
<file>images/Aliens/Al_00_13.png</file>
|
|
||||||
<file>images/Aliens/Al_00_14.png</file>
|
|
||||||
<file>images/Aliens/Al_00_15.png</file>
|
|
||||||
<file>images/Aliens/Al_00_16.png</file>
|
|
||||||
<file>images/Aliens/Al_00_17.png</file>
|
|
||||||
<file>images/Aliens/Al_00_18.png</file>
|
|
||||||
<file>images/Aliens/Al_00_19.png</file>
|
|
||||||
<file>images/Towers/00_0.png</file>
|
|
||||||
<file>images/Splashes/Rocket.png</file>
|
|
||||||
<file>images/Towers/01_6.png</file>
|
|
||||||
<file>images/Splashes/Shot_0.png</file>
|
|
||||||
<file>images/Splashes/Smoke_01.png</file>
|
|
||||||
<file>images/Splashes/expl.png</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
BIN
images/Interface/select_alien_0000.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0001.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0002.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
images/Interface/select_alien_0003.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0004.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0005.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0006.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
images/Interface/select_alien_0007.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
images/Interface/select_alien_0008.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
images/Interface/select_alien_0009.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
images/Interface/select_alien_0010.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
images/Interface/select_alien_0011.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
images/Interface/select_alien_0012.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0013.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
images/Interface/select_alien_0014.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0015.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0016.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0017.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0018.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0019.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0020.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0021.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0022.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
images/Interface/select_alien_0023.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0024.png
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
images/Interface/select_alien_0025.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0026.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0027.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0028.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0029.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0030.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0031.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0032.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0033.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
images/Interface/select_alien_0034.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
images/Interface/select_alien_0035.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
images/Interface/select_alien_0036.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
images/Interface/select_alien_0037.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
images/Interface/select_alien_0038.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
images/Interface/select_alien_0039.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
images/Interface/select_alien_0040.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0041.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0042.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0043.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0044.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0045.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0046.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
images/Interface/select_alien_0047.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0048.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
images/Interface/select_alien_0049.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_alien_0050.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
images/Interface/select_tower_0000.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0001.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0002.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0003.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0004.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0005.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0006.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
images/Interface/select_tower_0007.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0008.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0009.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0010.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
images/Interface/select_tower_0011.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0012.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0013.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0014.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
images/Interface/select_tower_0015.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
images/Interface/select_tower_0016.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
images/Interface/select_tower_0017.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
images/Interface/select_tower_0018.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |