plugins.h 928 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* $Id: plugins.h,v 1.12 2001/05/05 17:58:10 kilobug Exp $ */
  2. #ifndef __PROLO_PLUGINS_H__
  3. #define __PROLO_PLUGINS_H__
  4. #include "conf.h"
  5. typedef void (prolo_callback_t)(int);
  6. typedef void (prolo_callback2_t)(int, int);
  7. typedef struct _player_t
  8. {
  9. const char *name;
  10. prolo_callback2_t *init;
  11. prolo_callback_t *new_turn, *turn_akx, *turn_r4d2;
  12. float score;
  13. int team_id;
  14. int time_turn;
  15. int last_time;
  16. boolean_t on;
  17. GModule *handle;
  18. int error;
  19. int new;
  20. pid_t pid;
  21. int pipe_read;
  22. int pipe_write;
  23. boolean_t alive;
  24. } player_t;
  25. player_t *new_player(const char *libname, const char *name, int id,
  26. conf_t *conf);
  27. void destroy_player(player_t *player);
  28. void player_init(player_t *p, int team_id);
  29. void player_new_turn(player_t *p, int turn_num);
  30. void player_turn_akx(player_t *p, int akx_id);
  31. void player_turn_r4d2(player_t *p, int r4d2_id);
  32. #endif