ref: a3bc56d5bd49d953282fa352bfffefe08ce1368e
dir: /dat.h/
typedef struct Attack Attack; typedef struct Pic Pic; typedef struct Pics Pics; typedef struct Obj Obj; typedef struct Mobj Mobj; typedef struct Lobj Lobj; typedef struct Terrain Terrain; typedef struct Map Map; typedef struct Resource Resource; typedef struct Team Team; typedef struct Path Path; enum{ Nresource = 3, Nteam = 8, Nselect = 12, Nrot = 32, Npath = 64, Tlwidth = 32, Tlheight = Tlwidth, Tlshift = 16, Tlmask = ((1 << Tlshift) - 1) << Tlshift, Tlsubshift = 2, Tlsubwidth = Tlwidth >> Tlsubshift, Tlsubheight = Tlheight >> Tlsubshift, Tlsubmask = Tlsubwidth - 1, }; struct Attack{ char *name; int dmg; int range; int cool; }; enum{ PFterrain = 0, PFidle = 1<<0, PFmove = 2<<0, PFshadow = 1<<15, }; struct Pic{ u32int *p; int w; int h; int dx; int dy; }; struct Pics{ Pic **p; Pic **shadow; int nf; }; enum{ Fbio = 1<<0, Fmech = 1<<1, Fair = 1<<2, Fbuild = 1<<3, }; struct Obj{ char *name; Pics pidle; Pics pmove; int nr; Attack *atk[2]; int f; int w; int h; int hp; int def; int speed; int vis; int cost[Nresource]; int time; Obj **spawn; int nspawn; }; struct Mobj{ Obj *o; Pics *pics; Point; Point p; Point subp; int θ; double vx; double vy; double vv; int Δθ; Point *path; Point *pathp; Point *pathe; int f; int team; int hp; int xp; Lobj *blk; Lobj *zl; Lobj *vl; }; struct Lobj{ Mobj *mo; Lobj *lo; Lobj *lp; }; extern Lobj zlist; struct Terrain{ Pic *p; }; struct Map{ Point; int tx; int ty; Terrain *t; Lobj lo; }; extern Map *map; extern int mapwidth, mapheight; struct Resource{ char *name; int init; }; extern Resource resource[Nresource]; struct Team{ int r[Nresource]; int nunit; int nbuild; }; extern Team team[Nteam], *curteam; extern int nteam; struct Path{ Point; Lobj lo; Mobj *blk; int closed; int open; Path *from; double g; double h; }; extern Path *path; extern int pathwidth, pathheight; extern int lport; extern char *netmtpt; extern int scale; enum{ Tquit, }; extern char *progname, *prefix, *dbname, *mapname; extern int clon; extern vlong tc;