some work...

read all, but missing morphs and upgrades
new in-game types (src and cur)
This commit is contained in:
2010-08-22 19:05:25 +03:00
parent 7099e17901
commit f6125014dd
5 changed files with 168 additions and 36 deletions

View File

@@ -5,11 +5,10 @@
#include <QList>
#include <QVector>
struct Alien
struct AlienType
{
int Id; // uses for QHash
QString name;
int type;
int src;
QPointF pos;
float angle; // -180 .. 180
float speed; // cells per tick (speed=1 is 60cells by 1 sec for 60fps e.g.)
@@ -17,24 +16,38 @@ struct Alien
QPoint finish;
QVector <QPointF> path;
int pathIndex;
int imgType;
};
struct srcAlienType
{
QString name;
float speed;
float health;
float armor;
float regeneration;
bool isFlying;
unsigned int score;
int imgType;
unsigned int prise;
};
struct Tower
struct TowerType
{
QString name;
int type;
int src;
int AlienId; // aim alien
int PlayerId; // tower's owner
int imgType;
QPoint pos; // not QPointF because tower fixed on grid
float angle; // -180 .. 180
float range; // in cells
float reload; // time for reload in ticks
unsigned int reload; // time for reload in ticks
unsigned int build;
};
struct srcTrigger
struct srcTriggerType
{
enum triggerType
{
@@ -53,36 +66,44 @@ struct srcTrigger
};
struct srcSplash
struct srcSplashType
{
QString name;
int imgType;
float speed; // in cells
int lifetime;
bool autoControl;
QList <int> triggerIndexes;
};
struct srcTower
struct srcTowerType
{
QString name;
int type;
int imgType;
int PlayerId; // tower's owner
float range; // in cells
float reload; // time for reload in ticks
QList <srcTrigger> triggers;
QList <srcSplash> splashes;
unsigned int cost;
unsigned int reload;
unsigned int buildTime;
float radius; // in cells
float expByShot;
float expByKill;
float expByDamage;
QList <srcTriggerType> triggers;
QList <srcSplashType> splashes;
};
struct Splash
struct SplashType
{
int Id;
QString name;
int type;
int imgType;
int src;
QPoint TowerId; // parent tower (-1;-1) for null parent
int PlayerId;
int AlienId; // aim alien (different from tower.AlienId)
int lifetime; // in ticks
float radius; // in cells
QPointF destination;
int life; // in ticks
float angle; // -180 .. 180
QPointF pos;
};