Je kunt niet meer dan 25 onderwerpen selecteren Onderwerpen moeten beginnen met een letter of nummer, kunnen streepjes bevatten ('-') en kunnen maximaal 35 tekens lang zijn.
 
 
 
 

26 regels
1.4 KiB

#include <SDL/SDL_ttf.h>
struct gui_resource_t {
SDL_Surface *screen, *title_img, *bgnd_img, *board_img, *msgboard_img, *nameboard_img, *pawn_img[7];
TTF_Font *font_big, *font_small;
};
/* ouvre la fenêtre */
struct gui_resource_t display_start();
/* ferme la fenêtre */
void display_close(struct gui_resource_t *res);
/* simple rendu interne du plateau, il faut SDL_Flip() pour l'afficher */
void display_render_board(const struct gui_resource_t *res, const struct game_state_t *gamestate, enum hole_t currentplayer, const char *playername);
/* les fonctions suivantes retournent 1 si l'utilisateur ferme l'application, sinon 0 */
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);
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);
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);
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);