action.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* $Id: action.h,v 1.7 2001/04/26 17:57:08 glop Exp $ */
  2. #ifndef __PROLO_ACTION_H__
  3. #define __PROLO_ACTION_H__
  4. /* gestion des actions */
  5. typedef enum _r4d2_action_type_e_
  6. {
  7. act_r4d2_move = 0,
  8. act_r4d2_take_r4d2 = 1,
  9. act_r4d2_take_akx = 2
  10. } r4d2_action_type_t;
  11. typedef enum _akx_action_type_e_
  12. {
  13. act_akx_move = 0,
  14. act_akx_pulse = 1,
  15. act_akx_link = 2
  16. } akx_action_type_t;
  17. /* actions R4D2 */
  18. typedef struct _r4d2_move_s_
  19. {
  20. float x, y;
  21. } r4d2_move_t;
  22. typedef struct _r4d2_take_r4d2_s_
  23. {
  24. int target_id;
  25. int turn_need;
  26. } r4d2_take_r4d2_t;
  27. typedef struct _r4d2_take_akx_s_
  28. {
  29. int target_id;
  30. int turn_need;
  31. } r4d2_take_akx_t;
  32. typedef struct _r4d2_act_s_
  33. {
  34. r4d2_action_type_t type;
  35. union
  36. {
  37. r4d2_move_t move;
  38. r4d2_take_r4d2_t take_r4d2;
  39. r4d2_take_akx_t take_akx;
  40. } act;
  41. } r4d2_act_t;
  42. /* actions ANAKRONOX */
  43. typedef struct _akx_move_s_
  44. {
  45. float x, y;
  46. } akx_move_t;
  47. typedef struct _akx_pulse_s_
  48. {
  49. float x, y;
  50. float angle; /* Radian */
  51. float new_x, new_y;
  52. float new_angle; /* Radian */
  53. } akx_pulse_t;
  54. typedef struct _akx_link_s_
  55. {
  56. int target_id;
  57. } akx_link_t;
  58. typedef struct _akx_act_s_
  59. {
  60. akx_action_type_t type;
  61. union
  62. {
  63. akx_move_t move;
  64. akx_pulse_t pulse;
  65. akx_link_t link;
  66. } act;
  67. } akx_act_t;
  68. #endif