X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsystem.h;h=4ef22022c95a4e2d1dde0325742dce733695c09b;hb=87627cd206d108069804a37f7c7694f672f67479;hp=480ef0d426820e4719effd45d914d909fa171c49;hpb=dc76e42346b67941a3e3300974c39fc169cda2f3;p=rocksndiamonds.git diff --git a/src/libgame/system.h b/src/libgame/system.h index 480ef0d4..4ef22022 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -456,10 +456,10 @@ #define MIN_GRID_YSIZE 3 #define MAX_GRID_XSIZE 32 #define MAX_GRID_YSIZE 32 -#define GRID_REAL_WIDTH MAX(video.screen_width, \ - video.screen_height) -#define GRID_REAL_HEIGHT MIN(video.screen_width, \ - video.screen_height) +#define GRID_REAL_WIDTH MAX(1, MAX(video.screen_width, \ + video.screen_height)) +#define GRID_REAL_HEIGHT MAX(1, MIN(video.screen_width, \ + video.screen_height)) #define DEFAULT_GRID_XSIZE_0 18 #define DEFAULT_GRID_YSIZE_0 MIN(MAX(MIN_GRID_YSIZE, \ DEFAULT_GRID_XSIZE_0 * \ @@ -1017,12 +1017,9 @@ struct OverlayInfo boolean show_grid; - int grid_xsize_all[2]; - int grid_ysize_all[2]; int grid_xsize; int grid_ysize; - char grid_button_all[2][MAX_GRID_XSIZE][MAX_GRID_YSIZE]; char grid_button[MAX_GRID_XSIZE][MAX_GRID_YSIZE]; char grid_button_highlight; }; @@ -1053,6 +1050,13 @@ struct SetupTouchInfo char *control_type; int move_distance; int drop_distance; + + int grid_xsize[2]; + int grid_ysize[2]; + + char grid_button[2][MAX_GRID_XSIZE][MAX_GRID_YSIZE]; + + boolean grid_initialized; }; struct SetupInputInfo