2016 ソフトウェア設計及び演習用の班Wiki
16::gr11::commondefs.h
#ifndef COMMONDEFS_H #define COMMONDEFS_H #include <limits.h> #ifndef DEBUG #define DEBUG 1 #endif #define YMAX 8 #define XMAX 8 #define TILE_WIDTH 40 #define TILE_HEIGHT 40 #define XOFFSET 30 #define YOFFSET 30 #define XBORDER (TILE_WIDTH/2) #define YBORDER (TILE_HEIGHT/2) #define BOARD_WIDTH (XMAX * TILE_WIDTH) #define BOARD_HEIGHT (YMAX * TILE_HEIGHT) #define GRID_WIDTH 1 #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) < (b) ? (a) : (b)) #define BLACK 0 #define WHITE 1 #define NO_COLOR 2 #define ILLEGAL_NUMBER INT_MAX #define BC_WEIGHT 3 #include <gtk/gtk.h> typedef struct point_t { int x, y; } point_t; typedef struct gtk_app_t { GtkWidget* window; GtkWidget* vbox; GtkWidget* hbox; GtkWidget* start_button; GtkWidget* draw_area; int board[YMAX][XMAX]; int placed_number; int player_score_val, computer_score_val; GtkWidget* player_score; GtkWidget* computer_score; GdkPixmap* pixmap; GdkPixmap* piece[5]; GdkPixmap* piece_mask[5]; } gtk_app_t; #endif
最終更新日:2016/08/02 16:49:19