1 #ifndef BILL_H
2 #define BILL_H
3 
4 /* Bill's states */
5 #define BILL_STATE_IN 1
6 #define BILL_STATE_AT 2
7 #define BILL_STATE_OUT 3
8 #define BILL_STATE_DYING 4
9 #define BILL_STATE_STRAY 5
10 
11 /* Offsets from upper right of computer */
12 #define BILL_OFFSET_X 20
13 #define BILL_OFFSET_Y 3
14 
15 struct Bill {
16 	int state;		/* what is it doing? */
17 	int index;		/* index of animation frame */
18 	Picture **cels;		/* array of animation frames */
19 	int x, y;		/* location */
20 	int target_x;		/* target x position */
21 	int target_y;		/* target y position */
22 	int target_c;		/* target computer */
23 	int cargo;		/* which OS carried */
24 	int x_offset;		/* accounts for width differences */
25 	int y_offset;		/* 'bounce' factor for OS carried */
26 	int sx, sy;		/* used for drawing extra OS during switch */
27 	Bill *prev, *next;
28 };
29 
30 void Bill_enter(Bill **billp);
31 void Bill_draw(Bill *bill);
32 void Bill_update(Bill *bill);
33 void Bill_set_dying(Bill *bill);
34 int Bill_clicked(Bill *bill, int locx, int locy);
35 int Bill_clickedstray(Bill *bill, int locx, int locy);
36 void Bill_load_pix(void);
37 int Bill_width(void);
38 int Bill_height(void);
39 int Bill_get_state(Bill *bill);
40 
41 #endif
42