action.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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_ { act_r4d2_move = 0, act_r4d2_take_r4d2 = 1,
  6. act_r4d2_take_akx = 2} r4d2_action_type_t;
  7. typedef enum _akx_action_type_e_ { act_akx_move = 0, act_akx_pulse = 1,
  8. act_akx_link = 2 } akx_action_type_t;
  9. /* actions R4D2 */
  10. typedef struct _r4d2_move_s_
  11. {
  12. float x, y;
  13. } r4d2_move_t;
  14. typedef struct _r4d2_take_r4d2_s_
  15. {
  16. int target_id;
  17. int turn_need;
  18. } r4d2_take_r4d2_t;
  19. typedef struct _r4d2_take_akx_s_
  20. {
  21. int target_id;
  22. int turn_need;
  23. } r4d2_take_akx_t;
  24. typedef struct _r4d2_act_s_
  25. {
  26. r4d2_action_type_t type;
  27. union
  28. {
  29. r4d2_move_t move;
  30. r4d2_take_r4d2_t take_r4d2;
  31. r4d2_take_akx_t take_akx;
  32. } act;
  33. } r4d2_act_t;
  34. /* actions ANAKRONOX */
  35. typedef struct _akx_move_s_
  36. {
  37. float x, y;
  38. } akx_move_t;
  39. typedef struct _akx_pulse_s_
  40. {
  41. float x, y;
  42. float angle; /* Radian */
  43. float new_x, new_y;
  44. float new_angle; /* Radian */
  45. } akx_pulse_t;
  46. typedef struct _akx_link_s_
  47. {
  48. int target_id;
  49. } akx_link_t;
  50. typedef struct _akx_act_s_
  51. {
  52. akx_action_type_t type;
  53. union
  54. {
  55. akx_move_t move;
  56. akx_pulse_t pulse;
  57. akx_link_t link;
  58. } act;
  59. } akx_act_t;
  60. #endif