diff --git a/aliendefender.pro.user b/aliendefender.pro.user index f344427..2f63b65 100644 --- a/aliendefender.pro.user +++ b/aliendefender.pro.user @@ -1,241 +1,111 @@ - RunConfiguration0-BaseEnvironmentBase - 2 - - - RunConfiguration0-CommandLineArguments - - - - RunConfiguration0-ProFile - aliendefender.pro - - - RunConfiguration0-RunConfiguration.name - aliendefender - - - RunConfiguration0-UseDyldImageSuffix - false - - - RunConfiguration0-UseTerminal - false - - - RunConfiguration0-UserEnvironmentChanges - - - - RunConfiguration0-UserSetName - false - - - RunConfiguration0-UserSetWorkingDirectory - false - - - RunConfiguration0-UserWorkingDirectory - - - - RunConfiguration0-type - Qt4ProjectManager.Qt4RunConfiguration - - - activeRunConfiguration + ProjectExplorer.Project.ActiveTarget 0 - activebuildconfiguration - Debug - - - buildConfiguration-Debug + ProjectExplorer.Project.EditorSettings - Debug - 0 - 0 - 2 + System - buildConfiguration-Release + ProjectExplorer.Project.Target.0 - Release - 0 - 0 + Настольный компьютер + Qt4ProjectManager.Target.DesktopTarget + 0 + 0 + + + + QtProjectManager.QMakeBuildStep + + + + + Qt4ProjectManager.MakeStep + false + + + + 2 + + + Qt4ProjectManager.MakeStep + true + + clean + + + + 1 + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + /home/peri4/pprojects/aliendefender-build-desktop + 2 + 0 + true + + + + + QtProjectManager.QMakeBuildStep + + + + + Qt4ProjectManager.MakeStep + false + + + + 2 + + + Qt4ProjectManager.MakeStep + true + + + + 1 + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + /home/peri4/pprojects/aliendefender-build-desktop + 2 + 0 + true + + 2 + + aliendefender + Qt4ProjectManager.Qt4RunConfiguration + 2 + + aliendefender.pro + false + false + + false + false + + + 1 - buildconfiguration-Debug-buildstep0 - - Debug - - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-p5HnkClUWv,guid=600e78a10ff64ffb1ced7c414c4c6498 - DEFAULTS_PATH=/usr/share/gconf/gnome.default.path - DESKTOP_SESSION=gnome - DISPLAY=:0.0 - GDMSESSION=gnome - GDM_KEYBOARD_LAYOUT=us - GDM_LANG=ru_RU.UTF-8 - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-wgH6gj - GTK_MODULES=canberra-gtk-module - HOME=/home/andrey - LANG=ru_RU.UTF-8 - LD_LIBRARY_PATH=/usr/lib/qtcreator: - LOGNAME=andrey - MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path - ORBIT_SOCKETDIR=/tmp/orbit-andrey - PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - PWD=/home/andrey - QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1203,unix/buull-eeePC:/tmp/.ICE-unix/1203 - SHELL=/bin/bash - SPEECHD_PORT=6561 - SSH_AGENT_PID=1245 - SSH_AUTH_SOCK=/tmp/keyring-wgH6gj/ssh - USER=andrey - USERNAME=andrey - XAUTHORITY=/var/run/gdm/auth-for-andrey-MPPKxH/database - XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg - XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1280074903.597291-1238668786 - - - /home/andrey/aliendefender/aliendefender.pro - -spec - linux-g++ - -r - CONFIG+=debug - - /usr/bin/qmake-qt4 - false - /home/andrey/aliendefender - + ProjectExplorer.Project.TargetCount + 1 - buildconfiguration-Debug-buildstep1 - - Debug - - DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-p5HnkClUWv,guid=600e78a10ff64ffb1ced7c414c4c6498 - DEFAULTS_PATH=/usr/share/gconf/gnome.default.path - DESKTOP_SESSION=gnome - DISPLAY=:0.0 - GDMSESSION=gnome - GDM_KEYBOARD_LAYOUT=us - GDM_LANG=ru_RU.UTF-8 - GNOME_DESKTOP_SESSION_ID=this-is-deprecated - GNOME_KEYRING_CONTROL=/tmp/keyring-wgH6gj - GTK_MODULES=canberra-gtk-module - HOME=/home/andrey - LANG=ru_RU.UTF-8 - LD_LIBRARY_PATH=/usr/lib/qtcreator: - LOGNAME=andrey - MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path - ORBIT_SOCKETDIR=/tmp/orbit-andrey - PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games - PWD=/home/andrey - QTDIR=/usr/share/qt4 - SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1203,unix/buull-eeePC:/tmp/.ICE-unix/1203 - SHELL=/bin/bash - SPEECHD_PORT=6561 - SSH_AGENT_PID=1245 - SSH_AUTH_SOCK=/tmp/keyring-wgH6gj/ssh - USER=andrey - USERNAME=andrey - XAUTHORITY=/var/run/gdm/auth-for-andrey-MPPKxH/database - XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg - XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ - XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1280074903.597291-1238668786 - - false - - -w - - /usr/bin/make - true - /home/andrey/aliendefender - - - - buildconfiguration-Debug-cleanstep0 - - Debug - true - - clean - - - - - buildconfiguration-Release-buildstep0 - - Release - - - - buildconfiguration-Release-buildstep1 - - Release - - - - buildconfiguration-Release-cleanstep0 - - Release - - - - buildconfigurations - - Debug - Release - - - - buildstep0 - - - - - - - buildstep1 - - - - - - buildsteps - - trolltech.qt4projectmanager.qmake - trolltech.qt4projectmanager.make - - - - cleanstep0 - - - true - - - - cleansteps - - trolltech.qt4projectmanager.make - - - - defaultFileEncoding - System - - - project - + ProjectExplorer.Project.Updater.FileVersion + 4 diff --git a/aliendefender.pro.user.1.3 b/aliendefender.pro.user.1.3 new file mode 100644 index 0000000..f344427 --- /dev/null +++ b/aliendefender.pro.user.1.3 @@ -0,0 +1,241 @@ + + + + RunConfiguration0-BaseEnvironmentBase + 2 + + + RunConfiguration0-CommandLineArguments + + + + RunConfiguration0-ProFile + aliendefender.pro + + + RunConfiguration0-RunConfiguration.name + aliendefender + + + RunConfiguration0-UseDyldImageSuffix + false + + + RunConfiguration0-UseTerminal + false + + + RunConfiguration0-UserEnvironmentChanges + + + + RunConfiguration0-UserSetName + false + + + RunConfiguration0-UserSetWorkingDirectory + false + + + RunConfiguration0-UserWorkingDirectory + + + + RunConfiguration0-type + Qt4ProjectManager.Qt4RunConfiguration + + + activeRunConfiguration + 0 + + + activebuildconfiguration + Debug + + + buildConfiguration-Debug + + Debug + 0 + 0 + 2 + + + + buildConfiguration-Release + + Release + 0 + 0 + + + + buildconfiguration-Debug-buildstep0 + + Debug + + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-p5HnkClUWv,guid=600e78a10ff64ffb1ced7c414c4c6498 + DEFAULTS_PATH=/usr/share/gconf/gnome.default.path + DESKTOP_SESSION=gnome + DISPLAY=:0.0 + GDMSESSION=gnome + GDM_KEYBOARD_LAYOUT=us + GDM_LANG=ru_RU.UTF-8 + GNOME_DESKTOP_SESSION_ID=this-is-deprecated + GNOME_KEYRING_CONTROL=/tmp/keyring-wgH6gj + GTK_MODULES=canberra-gtk-module + HOME=/home/andrey + LANG=ru_RU.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LOGNAME=andrey + MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path + ORBIT_SOCKETDIR=/tmp/orbit-andrey + PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PWD=/home/andrey + QTDIR=/usr/share/qt4 + SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1203,unix/buull-eeePC:/tmp/.ICE-unix/1203 + SHELL=/bin/bash + SPEECHD_PORT=6561 + SSH_AGENT_PID=1245 + SSH_AUTH_SOCK=/tmp/keyring-wgH6gj/ssh + USER=andrey + USERNAME=andrey + XAUTHORITY=/var/run/gdm/auth-for-andrey-MPPKxH/database + XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg + XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ + XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1280074903.597291-1238668786 + + + /home/andrey/aliendefender/aliendefender.pro + -spec + linux-g++ + -r + CONFIG+=debug + + /usr/bin/qmake-qt4 + false + /home/andrey/aliendefender + + + + buildconfiguration-Debug-buildstep1 + + Debug + + DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-p5HnkClUWv,guid=600e78a10ff64ffb1ced7c414c4c6498 + DEFAULTS_PATH=/usr/share/gconf/gnome.default.path + DESKTOP_SESSION=gnome + DISPLAY=:0.0 + GDMSESSION=gnome + GDM_KEYBOARD_LAYOUT=us + GDM_LANG=ru_RU.UTF-8 + GNOME_DESKTOP_SESSION_ID=this-is-deprecated + GNOME_KEYRING_CONTROL=/tmp/keyring-wgH6gj + GTK_MODULES=canberra-gtk-module + HOME=/home/andrey + LANG=ru_RU.UTF-8 + LD_LIBRARY_PATH=/usr/lib/qtcreator: + LOGNAME=andrey + MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path + ORBIT_SOCKETDIR=/tmp/orbit-andrey + PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games + PWD=/home/andrey + QTDIR=/usr/share/qt4 + SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/1203,unix/buull-eeePC:/tmp/.ICE-unix/1203 + SHELL=/bin/bash + SPEECHD_PORT=6561 + SSH_AGENT_PID=1245 + SSH_AUTH_SOCK=/tmp/keyring-wgH6gj/ssh + USER=andrey + USERNAME=andrey + XAUTHORITY=/var/run/gdm/auth-for-andrey-MPPKxH/database + XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg + XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/ + XDG_SESSION_COOKIE=f0649decca52f2beb55c9ea74ad1d028-1280074903.597291-1238668786 + + false + + -w + + /usr/bin/make + true + /home/andrey/aliendefender + + + + buildconfiguration-Debug-cleanstep0 + + Debug + true + + clean + + + + + buildconfiguration-Release-buildstep0 + + Release + + + + buildconfiguration-Release-buildstep1 + + Release + + + + buildconfiguration-Release-cleanstep0 + + Release + + + + buildconfigurations + + Debug + Release + + + + buildstep0 + + + + + + + buildstep1 + + + + + + buildsteps + + trolltech.qt4projectmanager.qmake + trolltech.qt4projectmanager.make + + + + cleanstep0 + + + true + + + + cleansteps + + trolltech.qt4projectmanager.make + + + + defaultFileEncoding + System + + + project + + + diff --git a/aliens.cpp b/aliens.cpp index 0ae0353..4259690 100644 --- a/aliens.cpp +++ b/aliens.cpp @@ -1,9 +1,9 @@ #include "aliens.h" -Aliens::Aliens(Game_Data *gamedata, QObject *parent) : +Aliens::Aliens(Game_Data *gd, QObject *parent) : QObject(parent) { - GameData = gamedata; + gameData = gd; } diff --git a/aliens.h b/aliens.h index 1c433fa..7113ac5 100644 --- a/aliens.h +++ b/aliens.h @@ -10,20 +10,20 @@ class Aliens : public QObject { Q_OBJECT public: - explicit Aliens(Game_Data * gamedata, QObject *parent = 0); + explicit Aliens(Game_Data * gd, QObject *parent = 0); void AddAlien(int srcId); void DelAlienById(int Id); void DelAlien(int index); void retrace(); void nextWave(); void update(); - int size() const {return GameData->curAliens.size();} + int size() const {return gameData->curAliens.size();} signals: void AlienFinish(); public slots: //void getDamage(float dmg); private: - Game_Data * GameData; + Game_Data * gameData; QPointF globStart; QPointF globFinish; }; diff --git a/base_types.h b/base_types.h index e586c15..514ef60 100644 --- a/base_types.h +++ b/base_types.h @@ -10,7 +10,7 @@ struct Alien int type; QPointF pos; float angle; // -180 .. 180 - float speed; // cells per thick (speed=1 is 60cells by 1 sec for 60fps e.g.) + float speed; // cells per tick (speed=1 is 60cells by 1 sec for 60fps e.g.) float health; QPoint finish; QVector path; @@ -26,7 +26,7 @@ struct Tower QPoint pos; // not QPointF because tower fixed on grid float angle; // -180 .. 180 float range; - float speed; // shots per thick (e.g. speed=1 is 60 shots by 1sec for 60fps e.g. ) + float speed; // shots per tick (e.g. speed=1 is 60 shots by 1sec for 60fps e.g. ) }; @@ -36,18 +36,19 @@ struct Splash int type; int TowerId; // parent tower int AlienId; // aim alien (different from tower.AlienId) - int lifetime; // in msec + int lifetime; // in ticks float radius; + float angle; // -180 .. 180 QPointF pos; }; -struct wave +struct Wave { int Id; QVector types; // some types of aliens (e.g. 2 fly and 3 grount in one wave) QVector counts; // count aliens of each type - int wait_time; // time in sec + int wait_time; // time in ticks unsigned int gold; }; diff --git a/game_data.h b/game_data.h index d8e44e1..53d99f2 100644 --- a/game_data.h +++ b/game_data.h @@ -16,10 +16,10 @@ public: QVector curTowers; QVector srcSplashes; QVector curSplashes; - QVector waves; + QVector waves; + QVector adMoney; // vector because of many players + QVector selectAlienId; // same reason Map * map; - unsigned long int adMoney; - int selectAlienId; int curWave; signals: diff --git a/splashes.cpp b/splashes.cpp index 7931c61..0aa90d5 100644 --- a/splashes.cpp +++ b/splashes.cpp @@ -1,9 +1,9 @@ #include "splashes.h" -Splashes::Splashes(Game_Data *gamedata, QObject *parent) : +Splashes::Splashes(Game_Data *gd, QObject *parent) : QObject(parent) { - GameData = gamedata; + gameData = gd; } diff --git a/splashes.h b/splashes.h index b24a2e3..174b017 100644 --- a/splashes.h +++ b/splashes.h @@ -9,19 +9,19 @@ class Splashes : public QObject { Q_OBJECT public: - explicit Splashes(Game_Data * gamedata, QObject *parent = 0); + explicit Splashes(Game_Data * gd, QObject *parent = 0); void AddSplash(int srcId); void DelSplashById(int Id); void DelSplash(int index); void update(); - int size() const {return GameData->curSplashes.size();} + int size() const {return gameData->curSplashes.size();} signals: public slots: private: - Game_Data *GameData; + Game_Data *gameData; }; #endif // SPLASHES_H diff --git a/towers.cpp b/towers.cpp index d2212a0..bc5d340 100644 --- a/towers.cpp +++ b/towers.cpp @@ -1,9 +1,9 @@ #include "towers.h" -Towers::Towers(Game_Data *gamedata, QObject *parent) : +Towers::Towers(Game_Data *gd, QObject *parent) : QObject(parent) { - GameData = gamedata; + gameData = gd; } diff --git a/towers.h b/towers.h index a85e71c..00e0593 100644 --- a/towers.h +++ b/towers.h @@ -9,18 +9,18 @@ class Towers : public QObject { Q_OBJECT public: - explicit Towers(Game_Data * gamedata, QObject *parent = 0); + explicit Towers(Game_Data * gd, QObject *parent = 0); void AddTower(int srcId); void DelTowerById(int Id); void DelTower(int index); void update(); - int size() const {return GameData->curTowers.size();} + int size() const {return gameData->curTowers.size();} signals: //void Shot(); public slots: private: - Game_Data * GameData; + Game_Data * gameData; }; #endif // TOWERS_H