]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - warp/object.h
a5d4673149fcb4a0c4c44ce3e251f2e2f4fe06d9
[bsdgames-darwin.git] / warp / object.h
1 /* Header: object.h,v 7.0.1.2 86/12/12 17:01:38 lwall Exp */
2
3 /* Log: object.h,v
4 * Revision 7.0.1.2 86/12/12 17:01:38 lwall
5 * Baseline for net release.
6 *
7 * Revision 7.0.1.1 86/10/16 10:52:30 lwall
8 * Added Damage. Fixed random bugs.
9 *
10 * Revision 7.0 86/10/08 15:13:04 lwall
11 * Split into separate files. Added amoebas and pirates.
12 *
13 */
14
15 #define Root 0
16 #define Base 1
17 #define Enterprise 2
18 #define Star 3
19 #define Torp 4
20 #define Enemy 5
21 #define Web 6
22 #define Crusher 7
23
24 typedef struct object {
25 char posx, posy;
26 #ifdef SIGNEDCHAR
27 char velx, vely;
28 #else
29 short velx, vely;
30 #endif
31 struct object *next, *prev, *contend;
32 long energy;
33 long mass;
34 char type;
35 char image;
36 char strategy;
37 char flags;
38 } OBJECT;
39
40 #define PIRATE 1 /* we may mutiny */
41 #define FRIENDLY 2 /* we aren't really an enemy, for now */
42 #define STATIC 4 /* we are not in the movers list at the moment */
43 #define COUNTDOWN 8 /* we are counting down for something */
44 #define CLOAKS 16 /* we can cloak */
45
46 #ifdef DOINIT
47 OBJECT root = {0, 0, 0, 0, &root, &root, 0, 0, 0, Root, '?', 0, 0};
48 #else
49 EXT OBJECT root;
50 #endif
51
52 #ifdef DOINIT
53 OBJECT free_root = {0, 0, 0, 0, &free_root, &free_root, 0, 0, 0, Root, '?', 0, 0};
54 #else
55 EXT OBJECT free_root;
56 #endif
57
58 EXT OBJECT *ent;
59 EXT OBJECT *base;
60 EXT OBJECT *enemies;
61 EXT OBJECT *movers;
62 EXT OBJECT *realapollo;
63 EXT OBJECT *nuke;
64
65 EXT OBJECT *occupant[YSIZE][XSIZE];
66
67 OBJECT *make_object();
68
69 void unmake_object();
70 void free_object();
71 void object_init();