added morphs, fix some bugs, new images

added onAlienInRadius trigger
but it not work right((
This commit is contained in:
2011-08-21 22:22:02 +04:00
parent fa68b5a120
commit 894e55bb41
186 changed files with 4040 additions and 3022 deletions

View File

@@ -17,7 +17,9 @@ SOURCES += main.cpp \
triggermodel.cpp \
mapmodel.cpp \
animationmodel.cpp \
animlabel.cpp
animlabel.cpp \
../aliens.cpp \
../aditem.cpp
HEADERS += mainwindow.h \
../loader.h \
alienmodel.h \
@@ -30,9 +32,13 @@ HEADERS += mainwindow.h \
triggermodel.h \
mapmodel.h \
animationmodel.h \
animlabel.h
animlabel.h \
../aliens.h \
../aditem.h
FORMS += mainwindow.ui
TRANSLATIONS += adeditor_ru.ts
RESOURCES += ADeditor.qrc
OTHER_FILES += ../schema.xml \
../data2.xml

View File

@@ -1,287 +1,300 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by Qt Creator 2.2.84, 2011-08-21T21:34:49. -->
<qtcreator>
<data>
<variable>RunConfiguration0-BaseEnvironmentBase</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>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>activebuildconfiguration</variable>
<value type="QString">Debug</value>
</data>
<data>
<variable>buildConfiguration-Debug</variable>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
<value key="QtVersionId" type="int">0</value>
<value key="ToolChain" type="int">0</value>
<value key="addQDumper" type=""></value>
<value key="buildConfiguration" type="int">2</value>
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="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>
</data>
<data>
<variable>buildConfiguration-Release</variable>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
<value key="QtVersionId" type="int">0</value>
<value key="addQDumper" type=""></value>
<value key="buildConfiguration" type="int">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Mingw:D:/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>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep0</variable>
<valuemap type="QVariantMap">
<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>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep1</variable>
<valuemap type="QVariantMap">
<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>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{6c550070-c96c-41ad-865e-c5b9b5c3b79f}</value>
</data>
<data>
<variable>buildconfiguration-Debug-cleanstep0</variable>
<valuemap type="QVariantMap">
<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"/>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">10</value>
</data>
</qtcreator>

View File

@@ -34,11 +34,11 @@
</data>
<data>
<variable>RunConfiguration0-UserSetWorkingDirectory</variable>
<value type="bool">false</value>
<value type="bool">true</value>
</data>
<data>
<variable>RunConfiguration0-UserWorkingDirectory</variable>
<value type="QString"></value>
<value type="QString">/home/andrey/AD/aliendefender</value>
</data>
<data>
<variable>RunConfiguration0-type</variable>
@@ -76,7 +76,7 @@
<valuemap type="QVariantMap">
<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-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">DESKTOP_SESSION=gnome</value>
<value type="QString">DISPLAY=:0.0</value>
@@ -84,7 +84,7 @@
<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-U899U4</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>
@@ -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">PWD=/home/andrey</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">SPEECHD_PORT=6561</value>
<value type="QString">SSH_AGENT_PID=1270</value>
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-U899U4/ssh</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-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_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 key="abstractProcess.arguments" type="QVariantList">
<value type="QString">/home/andrey/AD/aliendefender/ADeditor/ADeditor.pro</value>
@@ -124,7 +124,7 @@
<valuemap type="QVariantMap">
<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-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">DESKTOP_SESSION=gnome</value>
<value type="QString">DISPLAY=:0.0</value>
@@ -132,7 +132,7 @@
<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-U899U4</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>
@@ -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">PWD=/home/andrey</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">SPEECHD_PORT=6561</value>
<value type="QString">SSH_AGENT_PID=1270</value>
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-U899U4/ssh</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-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_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>
<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>
@@ -169,7 +173,7 @@
<valuemap type="QVariantMap">
<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-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">DESKTOP_SESSION=gnome</value>
<value type="QString">DISPLAY=:0.0</value>
@@ -177,7 +181,7 @@
<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-U899U4</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>
@@ -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">PWD=/home/andrey</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">SPEECHD_PORT=6561</value>
<value type="QString">SSH_AGENT_PID=1270</value>
<value type="QString">SSH_AUTH_SOCK=/tmp/keyring-U899U4/ssh</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-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_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>
<value key="abstractProcess.IgnoreReturnValue" type="bool">true</value>
<valuelist key="abstractProcess.arguments" type="QVariantList">
@@ -274,7 +278,7 @@
</data>
<data>
<variable>defaultFileEncoding</variable>
<value type="QByteArray">System</value>
<value type="QByteArray">UTF-8</value>
</data>
<data>
<variable>project</variable>

View File

@@ -10,4 +10,7 @@
<file>icons/view-refresh.png</file>
<file>icons/edit.png</file>
</qresource>
<qresource prefix="/">
<file>../schema.xml</file>
</qresource>
</RCC>

View File

@@ -1,16 +1,16 @@
#include "animationmodel.h"
AnimationModel::AnimationModel(QList <tbAnimation> manims, QObject *parent) :
QAbstractListModel(parent)
AnimationModel::AnimationModel(QHash <int,tbAnimation> &manims, QObject *parent) :
QAbstractListModel(parent), anims(manims)
{
anims = manims;
// anims = manims;
}
void AnimationModel::refresh(QList<tbAnimation>manims)
{
anims = manims;
}
//void AnimationModel::refresh(QList<tbAnimation>manims)
//{
// anims = manims;
//}
int AnimationModel::rowCount(const QModelIndex &) const
@@ -21,15 +21,22 @@ int AnimationModel::rowCount(const QModelIndex &) const
QVariant AnimationModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
return QVariant();
if (index.row() >= anims.size())
return QVariant();
if (!index.isValid()) return QVariant();
if (index.row() >= anims.size()) return QVariant();
if (role == Qt::DisplayRole)
{
return anims.at(index.row()).id;
}
return tr("(%1) ").arg(anims.values().at(index.row()).id) + anims[anims.values().at(index.row()).id].name;
if (role == Qt::EditRole)
return anims[anims.values().at(index.row()).id].name;
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;
}

View File

@@ -8,17 +8,18 @@ class AnimationModel : public QAbstractListModel
{
Q_OBJECT
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;
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:
public slots:
private:
QList <tbAnimation> anims;
QHash <int,tbAnimation> &anims;
};
#endif // ANIMATIONMODEL_H

View File

@@ -31,7 +31,7 @@ MainWindow::MainWindow(QWidget *parent) :
adloader = new Loader(this);
adloader->load("data2.xml");
animModel = new AnimationModel(adloader->animations.values());
animModel = new AnimationModel(adloader->animations);
ui->lvAnimations->setModel((QAbstractItemModel * )animModel);
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);
@@ -71,7 +71,7 @@ MainWindow::MainWindow(QWidget *parent) :
ui->cbTrigChildAim->addItem(tr("no aim"),QVariant(srcTriggerType::noAim));
ui->cbTrigChildAim->addItem(tr("random side"),QVariant(srcTriggerType::allSide));
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 alien in radius"),QVariant(srcTriggerType::onAlienInRadius));
ui->cbTrigType->addItem(tr("on timer"),QVariant(srcTriggerType::onTimer));
@@ -242,9 +242,50 @@ void MainWindow::lvSplashes_select(QModelIndex index, QModelIndex)
ui->sbSplLifeTime->setValue(spl.lifetime);
ui->sbSplSpeed->setValue(spl.speed);
ui->cbSplAutoControl->setChecked(spl.autoControl);
ui->cbSplKeepOnAlien->setChecked(spl.keepOnAlien);
ui->leSplName->setText(spl.name);
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;
}
}
}
@@ -312,7 +353,7 @@ void MainWindow::lvTriggers_select(QModelIndex index, QModelIndex)
case srcTriggerType::parentAim :
ui->cbTrigChildAim->setCurrentIndex(2);
break;
case srcTriggerType::nearlestAlien :
case srcTriggerType::nearestAlien :
ui->cbTrigChildAim->setCurrentIndex(3);
break;
}
@@ -382,7 +423,7 @@ void MainWindow::on_pbReload_clicked()
twModel->refresh(adloader->towers.values());
splModel->refresh(adloader->splashes.values());
trigModel->refresh(adloader->triggers.values());
animModel->refresh(adloader->animations.values());
// animModel->refresh(adloader->animations.values());
mapModel->refresh(adloader->maps.values());
ui->lvAnimations->reset();
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
@@ -1008,6 +1049,14 @@ void MainWindow::on_cbTrigType_currentIndexChanged(int index)
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
srcTriggerType::triggerType lval = adloader->triggers[id].type;
adloader->triggers[id].type = (srcTriggerType::triggerType)ui->cbTrigType->itemData(index).toInt();
if (adloader->triggers[id].type == srcTriggerType::onAlienInRadius)
{
ui->lbTrigChildAim->hide();
ui->cbTrigChildAim->hide();
} else {
ui->lbTrigChildAim->show();
ui->cbTrigChildAim->show();
}
if (adloader->triggers[id].type != srcTriggerType::onTimer)
{
ui->lbTrigTimer->setVisible(false);
@@ -1033,14 +1082,15 @@ void MainWindow::on_cbTrigChildAim_currentIndexChanged(int index)
void MainWindow::on_pbImgAdd_clicked()
{
int id = adloader->animations.values().at(ui->lvAnimations->currentIndex().row()).id;
QFileDialog fd;
QStringList strl;
fd.setNameFilter(tr("Images (*.png)"));
fd.setFileMode(QFileDialog::ExistingFiles);
/*QFileDialog fd;
fd.setNameFilter(tr());
fd.setFileMode(QFileDialog::ExistingFiles);*/
QDir dir;
if (fd.exec())
strl = QFileDialog::getOpenFileNames(this, "Select images", QString()/*qApp->applicationDirPath()*/, "Images (*.png)");
/*if (fd.exec())
{
strl = fd.selectedFiles();
strl = fd.selectedFiles();*/
for (int i=0; i<strl.size(); ++i)
{
strl[i] = dir.relativeFilePath(strl[i]);
@@ -1048,7 +1098,7 @@ void MainWindow::on_pbImgAdd_clicked()
adloader->animations[id].pathes.append(strl);
refresh_lwImages(adloader->animations.value(id).pathes);
isSaved = false;
}
//}
}
@@ -1083,7 +1133,7 @@ void MainWindow::on_pbAnimAdd_clicked()
anim.id = i;
adloader->animations.insert(anim.id,anim);
int index = adloader->animations.keys().indexOf(i);
animModel->refresh(adloader->animations.values());
// animModel->refresh(adloader->animations.values());
ui->lvAnimations->reset();
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
isSaved = false;
@@ -1177,9 +1227,56 @@ void MainWindow::on_pbAnimDel_clicked()
if (ret == QMessageBox::Ok)
{
adloader->animations.remove(id);
animModel->refresh(adloader->animations.values());
// animModel->refresh(adloader->animations.values());
ui->lvAnimations->reset();
ui->lvAnimations->selectionModel()->setCurrentIndex(ui->lvAnimations->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
isSaved = false;
}
}
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;
}

View File

@@ -111,6 +111,10 @@ private slots:
void lvMaps_select(QModelIndex, QModelIndex);
void on_cbAlRegeneration_toggled(bool checked);
void on_cbAlArmor_toggled(bool checked);
void on_cbSplCompisitionMode_currentIndexChanged(const QString &arg1);
void on_sbSplZValue_valueChanged(double arg1);
void on_sbSplAnimSpeed_valueChanged(double arg1);
void on_cbSplKeepOnAlien_toggled(bool checked);
};
#endif // MAINWINDOW_H

View File

@@ -47,7 +47,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>5</number>
<number>2</number>
</property>
<property name="movable">
<bool>true</bool>
@@ -875,19 +875,7 @@
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7" stretch="0,0,0,0,0,0">
<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>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_28">
<item>
@@ -964,7 +952,7 @@
</sizepolicy>
</property>
<property name="text">
<string>LifeTime</string>
<string>Life time</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@@ -986,6 +974,197 @@
</item>
</layout>
</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>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
@@ -1000,7 +1179,7 @@
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>AutoControl</string>
<string>Auto control</string>
</property>
</widget>
</item>
@@ -1258,7 +1437,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_40">
<item>
<widget class="QLabel" name="label_35">
<widget class="QLabel" name="lbTrigChildAim">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -1673,6 +1852,9 @@
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::InternalMove</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>

View File

@@ -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})

View File

@@ -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;
core = adcore;
setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
setAlignment(Qt::AlignLeft | Qt::AlignTop);
setMouseTracking(true);
scene = new QGraphicsScene();
scene->setItemIndexMethod(QGraphicsScene::NoIndex);
core->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();
//setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
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->setBackgroundBrush(*mapimg);
setCacheMode(QGraphicsView::CacheBackground);
setRenderHints(QPainter::SmoothPixmapTransform | QPainter::HighQualityAntialiasing);
resize(mapimg->size());
startTimer(50);
}
@@ -53,13 +62,15 @@ AD_Graphics::AD_Graphics(AD_Core *adcore, QWidget *parent) : QGraphicsView(paren
AD_Graphics::~AD_Graphics()
{
delete selection_tow;
delete selection_al;
delete scene;
}
void AD_Graphics::mousePressEvent(QMouseEvent *event)
{
scene->clearSelection();
// scene->clearSelection();
if (event->button() == Qt::LeftButton)
{
if (m_building) emit add_tow((QPointF(event->pos())/cellSize).toPoint());
@@ -72,8 +83,9 @@ void AD_Graphics::mousePressEvent(QMouseEvent *event)
ADItem * i = qgraphicsitem_cast<ADItem*>(x);
if (i->itemType() == ADItem::Tower)
{
i->setSelected(true);
emit tower_select(i->tid());
// i->setSelected(true);
select_tow = i;
emit selected_tower_changed(i->tid());
return;
}
if (i->itemType() == ADItem::Alien)
@@ -83,19 +95,37 @@ void AD_Graphics::mousePressEvent(QMouseEvent *event)
}
if (al != 0)
{
al->setSelected(true);
emit alien_select(al->id());
// al->setSelected(true);
select_al = al;
core->addata->players.at(0)->selectAlienId = select_al->id();
return;
}
}
}
if (event->button() == Qt::RightButton)
{
select_al = 0;
select_tow = 0;
emit selected_tower_changed(QPoint());
emit cancel();
}
}
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())
scene->update();
}
@@ -116,9 +146,38 @@ void AD_Graphics::drawForeground(QPainter *p, const QRectF &rect)
if (i->isBarVisible())
{
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);
}
}
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;
}

View File

@@ -4,6 +4,7 @@
#include <QGraphicsWidget>
#include <QPushButton>
#include <QMouseEvent>
#include <QEasingCurve>
#include "adcore.h"
@@ -14,42 +15,43 @@ class AD_Graphics: public QGraphicsView
Q_PROPERTY(bool building READ building WRITE setBuilding)
public:
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();
bool building() const
{
return m_building;
}
bool building() const {return m_building;}
public slots:
void setBuilding(bool arg)
{
m_building = arg;
}
void selectTower(ADItem * item) {select_tow = item;}
void setBuilding(bool 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:
void drawBackground(QPainter * p, const QRectF &);
void drawForeground(QPainter *painter, const QRectF &rect);
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
QGraphicsScene * scene;
AD_Core * core;
QImage * mapimg;
Game_Data * data;
ADItem * focus_item;
ADItem * select_al;
ADItem * select_tow;
ADItem * selection_tow;
ADItem * selection_al;
QEasingCurve color_curve;
bool m_building;
private slots:
protected:
void timerEvent(QTimerEvent * );
signals:
signals:
void cancel();
void add_tow(QPoint pnt);
void tower_select(QPoint id);
void alien_select(int id);
void selected_tower_changed(QPoint id);
};
#endif // AD_GRAPHICS_H

View File

@@ -8,7 +8,7 @@ AD_Core::AD_Core(QObject *parent) :
adloader->load("data2.xml");
addata = adloader->loadlevel(1);
delete adloader;
if (addata != 0) qDebug("Sucsess");
if (addata != 0) qDebug("Success");
else qFatal("Error");
adtowers = new Towers(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)));
waveInProgress = false;
waveEnd = false;
startTimer(50);
timer = startTimer(40);
}
@@ -26,6 +26,10 @@ void AD_Core::next()
adtowers->update();
adsplashes->update();
addata->aliens->update();
foreach(Player * p, addata->players)
{
if (!addata->aliens->curAliens.contains(p->selectAlienId)) p->selectAlienId = -1;
}
waveProcessing();
step++;
}
@@ -81,7 +85,7 @@ void AD_Core::waveProcessing()
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);
}
@@ -92,3 +96,10 @@ void AD_Core::setScene(QGraphicsScene *scene)
adtowers->setScene(scene);
adsplashes->setScene(scene);
}
void AD_Core::setSpeed(float x)
{
killTimer(timer);
timer = startTimer(qRound(40.f/x));
}

View File

@@ -20,6 +20,7 @@ public:
void setScene(QGraphicsScene * scene);
bool isWaveEnd() {return waveEnd;}
void setSpeed(float x);
public slots:
void next();
@@ -32,11 +33,13 @@ private:
bool waveInProgress;
bool waveEnd;
int wavetime;
int timer;
private slots:
void killAlien(int playerId, int alienId);
signals:
};
#endif // ADCORE_H

View File

@@ -16,17 +16,25 @@ ADItem::ADItem(int id, adType type, QList<QImage *> *images_, QRectF geometry, Q
if (animcount == 1) staticImage = true;
if (geometry.isNull()) br = QRect(QPoint(-(size.width()/2), -(size.height()/2)), size);
else br = geometry;
if (type == Alien)
hasBar = false;
switch (type)
{
case Alien :
setFlag(QGraphicsItem::ItemIsSelectable);
barValue = 1.f;
hasBar = true;
} else hasBar = false;
setZValue(-1.f);
break;
case Other :
default:
setZValue(3.f);
}
if (staticImage)
{
setCacheMode(QGraphicsItem::ItemCoordinateCache);
img = (*images)[0];
}
cmode = QPainter::CompositionMode_SourceOver;
}
@@ -36,26 +44,29 @@ ADItem::ADItem(QPoint id, QImage *image, QRectF geometry, QGraphicsItem *parent)
hasBar = true;
barValue = 0.f;
m_type = Tower;
setZValue(-2.f);
m_tid = id;
img = image;
QSize size = img->size();
if (geometry.isNull()) br = QRect(QPoint(-(size.width()/2),-(size.height()/2)),size);
if (geometry.isNull()) br = QRectF(QPoint(-(size.width()/2),-(size.height()/2)),size);
else br = geometry;
staticImage = true;
setFlag(QGraphicsItem::ItemIsSelectable);
cmode = QPainter::CompositionMode_SourceOver;
}
void ADItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
{
painter->setCompositionMode(cmode);
if (staticImage)
painter->drawImage(br,*img);
else painter->drawImage(br, *(images->at(qRound(anim))));
if (isSelected())
{
painter->setPen(Qt::red);
painter->drawRect(br);
}
// if (isSelected())
// {
// painter->setPen(Qt::red);
// painter->drawRect(br);
// }
}

View File

@@ -2,26 +2,28 @@
#define ADITEM_H
#include <QGraphicsItem>
#include <QPainter>
class ADItem : public QGraphicsItem
{
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(QPoint id, QImage * image, QRectF geometry = QRectF(), QGraphicsItem *parent = 0);
void setBarValue(float val) {barValue = val;}
void setBarVisible(bool visible = true) {hasBar = visible;}
void setCompositionMode(QPainter::CompositionMode mode) {cmode = mode;}
void hideBar() {hasBar = false; setCacheMode(QGraphicsItem::ItemCoordinateCache);}
float value() {return barValue;}
bool isBarVisible() {return hasBar;}
void next(float step);
void next(float step = 1.f);
QPoint tid() {return m_tid;}
int id() {return m_id;}
adType itemType() {return m_type;}
QRectF boundingRect() const;
private:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect() const;
QList<QImage *> * images;
QImage * img;
float anim;
@@ -33,6 +35,7 @@ private:
bool hasBar;
float barValue;
QRectF br;
QPainter::CompositionMode cmode;
};
#endif // ADITEM_H

View File

@@ -1,3 +0,0 @@
[Project]
Manager=KDevCMakeManager
Name=aliendefender

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
@@ -87,7 +87,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
<value type="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.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
@@ -132,7 +132,7 @@
<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">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.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
@@ -141,7 +141,7 @@
<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">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.BuildStepList.Step.0">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
@@ -182,12 +182,12 @@
<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">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.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">D:/Dropbox/My Dropbox/projects/aliendefender-build-desktop</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">-1</value>
<value type="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>

View 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>

View File

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

View File

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

View File

@@ -15,10 +15,15 @@
#include <QRectF>
#include <QImage>
#include <QStringList>
#include <QPainter>
#include "aditem.h"
const float cellSize = 20.f;
struct srcAlienType;
struct srcTowerType;
struct srcSplashType;
struct srcTriggerType;
struct srcAlienType
{
@@ -64,7 +69,7 @@ struct srcTriggerType
noAim,
parentAim,
allSide,
nearlestAlien
nearestAlien
};
int childId; // =-1 for none birth splash (e.q. only damage)
aimType childAim;
@@ -98,7 +103,13 @@ struct TriggerOnAlien
};
struct srcSplashType;
struct MorphType
{
srcTowerType * morph;
float expRequired;
unsigned int cost;
};
struct srcTowerType
{
@@ -113,8 +124,10 @@ struct srcTowerType
float expByShot;
float expByKill;
float expByDamage;
bool isRoot;
QList <srcTriggerType> triggers;
QList <srcSplashType> splashes;
QList<MorphType> morphs;
};
@@ -140,6 +153,10 @@ struct srcSplashType
float speed; // in cells
int lifetime;
bool autoControl;
bool keepOnAlien;
float animSpeed;
float ZValue;
QPainter::CompositionMode compositionMode;
QList <int> triggerIndexes;
QList<QImage *> * images;
};
@@ -163,12 +180,11 @@ struct SplashType
ADItem * item;
};
/// DEPRECATED !!!
struct AnimationType
{
QList<QImage * > * images;
};
/// DEPRECATED !!!
struct WaveType
@@ -191,4 +207,38 @@ 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());
}
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

14
clean
View File

@@ -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
View File

@@ -1,8 +1,8 @@
<!DOCTYPE data>
<ADdata>
<aliens>
<alien speed="0.03" 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.05" imageType="1" prise="1" id="1" score="12" name="Monstr 1" health="15"/>
<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 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"/>
@@ -13,105 +13,106 @@
<map width="25" imageType="20" height="11" id="3" data="AAAEtHicY2BgkGRgYOD+//+PBDpmYFDnxy4OUQ+kGQnhUfWj6kfVj6onRj1mOaO0A5s4ADeqzbA=" name="map" maxPlayers="1"/>
</maps>
<waves>
<wave prise="5" timeout="50" id="1"/>
<wave prise="7" timeout="50" id="2"/>
<wave prise="10" timeout="50" id="3"/>
<wave prise="20" timeout="50" id="4"/>
<wave prise="220" timeout="20" id="5"/>
<wave prise="220" timeout="200" id="6"/>
<!--<wave prise="220" timeout="250" id="7"/>
<wave prise="220" timeout="500" id="8"/>
<wave prise="220" timeout="100" id="9"/>
<wave prise="220" timeout="1" id="10"/>
<wave prise="220" timeout="5" id="11"/>-->
<wave prise="5" timeout="30" id="1"/>
<wave prise="7" timeout="30" id="2"/>
<wave prise="10" timeout="30" id="3"/>
<wave prise="20" timeout="30" id="4"/>
<wave prise="50" timeout="10" id="5"/>
<wave prise="100" timeout="20" id="6"/>
<wave prise="200" timeout="5" id="7"/>
<wave prise="1000" timeout="50" id="8"/>
</waves>
<levels>
<level map="3" id="1" score="138887032" name="First Level"/>
<level map="3" id="1" score="286154272" name="First Level"/>
</levels>
<waveParts>
<wavePart alien="1" count="1" wave="1"/>
<wavePart alien="1" count="2" wave="2"/>
<wavePart alien="1" count="3" wave="3"/>
<wavePart alien="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="60" wave="4"/>
<wavePart alien="2" count="20" wave="4"/>
<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"/>-->
<wavePart alien="4" count="10" wave="7"/>
<wavePart alien="4" count="100" wave="8"/>
</waveParts>
<wavesOnLevels>
<waveOnLevel wave="1" level="1"/>
<waveOnLevel wave="2" level="1"/>
<waveOnLevel wave="3" level="1"/>
<waveOnLevel wave="4" level="1"/>
<waveOnLevel wave="5" level="1"/>
<waveOnLevel wave="8" level="1"/>
<waveOnLevel wave="7" 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>
<splashes>
<splash speed="0.2" imageType="5" lifetime="9999" id="1" name="rocket"/>
<splash speed="0.2" imageType="5" lifetime="9999" autoControl="true" id="2" name="smart rocket"/>
<splash speed="0.5" imageType="7" lifetime="9999" autoControl="true" 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" id="4" name="bum"/>
<splash speed="0" imageType="6" lifetime="10" id="5" name="smoke"/>
<splash speed="0.1" imageType="5" lifetime="50" autoControl="true" id="6" name="Снаряд"/>
<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" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="2" name="smart rocket"/>
<splash speed="1" imageType="7" lifetime="9999" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="3" name="bullet"/>
<splash speed="0" imageType="4" lifetime="16" ZValue="0" compositionMode="Plus" animSpeed="1" id="4" name="bum"/>
<splash speed="0" imageType="6" lifetime="29" ZValue="0" compositionMode="Source" animSpeed="1" id="5" name="smoke"/>
<splash speed="0.1" imageType="5" lifetime="50" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="6" name="Снаряд"/>
<splash speed="0" imageType="9" lifetime="10" ZValue="0" autoControl="true" compositionMode="Source" animSpeed="1" id="7" name="blood"/>
<splash speed="0.1" imageType="15" lifetime="32" ZValue="1.4013e-45" compositionMode="Source" animSpeed="0.5" id="8" name="fire"/>
<splash speed="0.5" imageType="16" lifetime="100" ZValue="1.4013e-45" autoControl="true" compositionMode="Source" animSpeed="9.30575e-29" id="9" name="burn" keepOnAlien="true"/>
</splashes>
<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="35" id="4" name="tower 1-2" cost="15" expByDamage="0.1"/>
<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="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="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="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="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>
<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 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>
<chains>
<chain tower="1" trigger="4" child="5" parent="2"/>
<chain tower="1" trigger="3" child="4" parent="2"/>
<chain tower="2" trigger="2" parent="3"/>
<chain tower="4" trigger="2" parent="7"/>
<chain tower="3" trigger="4" child="5" parent="1"/>
<chain tower="1" trigger="4" child="5" parent="2"/>
<chain tower="2" trigger="2" child="7" parent="3"/>
<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>
<towersOnLevels>
<towerOnLevel tower="6" level="1"/>
<towerOnLevel tower="5" level="1"/>
<towerOnLevel tower="4" level="1"/>
<towerOnLevel tower="3" level="1"/>
<towerOnLevel tower="2" level="1"/>
<towerOnLevel tower="1" level="1"/>
</towersOnLevels>
<morphs>
<morph from="2" expRequired="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>
<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/Towers/00_0.png" id="2"/>
<animation pathes="images/Towers/01_0.png" id="3"/>
<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/Rocket.png" id="5"/>
<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/Shot_0.png;images/Splashes/Shot_1.png;images/Splashes/Shot_2.png;images/Splashes/Shot_3.png" id="7"/>
<animation pathes="images/Towers/01_6.png" id="8"/>
<animation pathes="images/Aliens/Al_00_0.png;images/Aliens/Al_00_1.png;images/Aliens/Al_00_2.png;images/Aliens/Al_00_3.png;images/Aliens/Al_00_4.png;images/Aliens/Al_00_5.png;images/Aliens/Al_00_6.png;images/Aliens/Al_00_7.png;images/Aliens/Al_00_8.png;images/Aliens/Al_00_9.png;images/Aliens/Al_00_10.png;images/Aliens/Al_00_11.png;images/Aliens/Al_00_12.png;images/Aliens/Al_00_13.png;images/Aliens/Al_00_14.png;images/Aliens/Al_00_15.png;images/Aliens/Al_00_16.png;images/Aliens/Al_00_17.png;images/Aliens/Al_00_18.png;images/Aliens/Al_00_19.png" id="1" name="alien"/>
<animation pathes="images/Towers/00_0.png" id="2" name="tower 1"/>
<animation pathes="images/Towers/01_0.png" id="3" name="rocket tower 1"/>
<animation pathes="images/Splashes/expl_00.png;images/Splashes/expl_01.png;images/Splashes/expl_02.png;images/Splashes/expl_03.png;images/Splashes/expl_04.png;images/Splashes/expl_05.png;images/Splashes/expl_06.png;images/Splashes/expl_07.png;images/Splashes/expl_08.png;images/Splashes/expl_09.png;images/Splashes/expl_10.png;images/Splashes/expl_11.png;images/Splashes/expl_12.png;images/Splashes/expl_13.png;images/Splashes/expl_14.png;images/Splashes/expl_15.png;images/Splashes/expl_16.png" id="4" name="explosion"/>
<animation pathes="images/Splashes/Rocket.png" id="5" name="rocket"/>
<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" id="7" name="shot"/>
<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>
</ADdata>

View File

@@ -1,6 +1,5 @@
#include "form.h"
#include "ui_form.h"
#include "touchbuttframe.h"
Form::Form(QWidget *parent) :
@@ -8,12 +7,13 @@ Form::Form(QWidget *parent) :
ui(new Ui::Form)
{
buildTowerId = -1;
cur_tow = QPoint();
cur_al = -1;
ui->setupUi(this);
graphics = new AD_Graphics(&core);
ui->widget->layout()->addWidget(graphics);
TouchButtFrame * tbf = new TouchButtFrame();
tbf->setOrientation(Qt::Vertical);
morphtbf = new TouchButtFrame();
morphtbf->setOrientation(Qt::Vertical);
tbf->addButton(tr("delete"));
foreach (srcTowerType i, core.addata->players.at(0)->srcTowers)
{
@@ -25,12 +25,15 @@ Form::Form(QWidget *parent) :
//butt->setCheckable(true);
}
ui->gbTowers->layout()->addWidget(tbf);
ui->verticalLayout_2->addWidget(morphtbf);
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(graphics,SIGNAL(tower_select(QPoint)),this,SLOT(towerSelected(QPoint)));
connect(graphics,SIGNAL(alien_select(int)),this,SLOT(alienSelected(int)));
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(selected_tower_changed(QPoint)),this,SLOT(selectedTowerChanged(QPoint)));
this->startTimer(50);
}
@@ -59,17 +62,16 @@ void Form::towerBuild(int index)
void Form::add_tow(QPoint pnt)
{
if (buildTowerId == -1) return;
if (buildTowerId == -9) {core.adtowers->delTower(pnt); return;}
if (buildTowerId == -9)
{
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()
{
buildTowerId = -1;
@@ -82,25 +84,20 @@ void Form::timerEvent(QTimerEvent *)
{
QString twstr;
QString alstr;
if (!cur_tow.isNull())
if (!graphics->selectedTower().isNull())
{
if (core.addata->curTowers.contains(cur_tow))
{
TowerType tw = core.addata->curTowers.value(cur_tow);
TowerType &tw = core.addata->curTowers[graphics->selectedTower()];
twstr = "\n\n " + tw.src->name;
if (tw.isBilding) twstr += tr("\n build %1/%2").arg(tw.build).arg(tw.src->buildTime);
twstr += tr("\n player %1\n exp %2").arg(tw.PlayerId).arg(tw.experience);
twstr += tr("\n reload %1/%2\n alien %3").arg(tw.reload).arg(tw.src->reload).arg(tw.aim);
twstr += tr("\n cost %1\n radius %2").arg(tw.src->cost).arg(tw.src->radius);
} else {
cur_tow = QPoint();
twstr += tr("\n cost %1\n radius %2").arg(tw.src->cost).arg(tw.src->radius-1);
for (int i=0; i<tw.src->morphs.size(); ++i)
morphtbf->Button(i)->setEnabled(core.adtowers->canMorph(tw.pos,i));
}
}
if (cur_al != -1)
if (graphics->selectedAlien() != -1)
{
if (core.addata->aliens->curAliens.contains(cur_al))
{
AlienType al = core.addata->aliens->curAliens.value(cur_al);
AlienType al = core.addata->aliens->curAliens.value(graphics->selectedAlien());
alstr = "\n\n " + al.src->name;
if (al.src->isFlying) alstr += tr("\n flying");
else alstr += tr("\n ground");
@@ -108,11 +105,7 @@ void Form::timerEvent(QTimerEvent *)
alstr += tr("\n speed %1/%2").arg(al.speed).arg(al.src->speed);
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())
+ tr("\n aliens %1").arg(core.addata->aliens->curAliens.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());
}

17
form.h
View File

@@ -4,6 +4,8 @@
#include <QWidget>
#include "adcore.h"
#include "ad_graphics.h"
#include "touchbuttframe.h"
namespace Ui {
class Form;
@@ -20,22 +22,23 @@ public:
private slots:
void on_pbNextWave_clicked();
void towerBuild(int index);
void towerMorph(int index);
void add_tow(QPoint pnt);
//void del_tow(QPoint pnt);
void selectedTowerChanged(QPoint id);
void cancel();
void towerSelected(QPoint id);
void alienSelected(int id);
void on_sbSpeed_valueChanged(double arg1);
private:
void timerEvent(QTimerEvent *);
Ui::Form *ui;
int buildTowerId;
AD_Core core;
AD_Graphics * graphics;
QPoint cur_tow;
int cur_al;
//QList <QPushButton *> towerButtons;
TouchButtFrame * morphtbf;
signals:
void tower_killed();
};
#endif // FORM_H

27
form.ui
View File

@@ -52,7 +52,7 @@
<x>0</x>
<y>0</y>
<width>135</width>
<height>194</height>
<height>324</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
@@ -85,11 +85,36 @@
</property>
</widget>
</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>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>

View File

@@ -5,5 +5,6 @@ Game_Data::Game_Data(Map *mapp, QObject *parent) :
{
map = mapp;
curWave = 0;
// alienSelect.images = towerSelect.images = 0;
aliens = new Aliens(map);
}

View File

@@ -19,6 +19,8 @@ public:
QList <WaveType> waves;
QList <Player *> players;
QList <AnimationType> curAnimations;
AnimationType towerSelect;
AnimationType alienSelect;
Map * map;
Aliens * aliens;
int curWave;

View File

@@ -1,30 +1,6 @@
<RCC>
<qresource prefix="/images">
<file>images/Aliens/Al_00_0.png</file>
<file>images/Aliens/Al_00_1.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 prefix="/">
<file>schema.xml</file>
<file>images/select.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Some files were not shown because too many files have changed in this diff Show More