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.
 
 
 
 

27 lines
1.4 KiB

  1. #include <SDL/SDL_ttf.h>
  2. struct gui_resource_t {
  3. SDL_Surface *screen, *title_img, *bgnd_img, *board_img, *msgboard_img, *nameboard_img, *pawn_img[7];
  4. TTF_Font *font_big, *font_small;
  5. };
  6. /* ouvre la fenêtre */
  7. struct gui_resource_t display_start();
  8. /* ferme la fenêtre */
  9. void display_close(struct gui_resource_t *res);
  10. /* simple rendu interne du plateau, il faut SDL_Flip() pour l'afficher */
  11. void display_render_board(const struct gui_resource_t *res, const struct game_state_t *gamestate, enum hole_t currentplayer, const char *playername);
  12. /* les fonctions suivantes retournent 1 si l'utilisateur ferme l'application, sinon 0 */
  13. int display_animsg(const struct gui_resource_t *res, const struct game_state_t *gamestate, enum hole_t currentplayer, const char *playername, const char *msg, uint32_t duration);
  14. int display_anirotate_board(const struct gui_resource_t *res, const struct game_state_t *gamestate, enum hole_t currentplayer, const char *playername, enum hole_t nextplayer, const char *nextplayername);
  15. int display_animove_pawn(const struct gui_resource_t *res, struct game_state_t gamestate, enum hole_t currentplayer, const char *playername, int startpos, int endpos);
  16. int display_usermove_pawn(const struct gui_resource_t *res, const struct game_state_t *gamestate, enum hole_t currentplayer, const char *playername, struct move_t *move, int *moremoves);