You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.1 KiB

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