diff options
-rw-r--r-- | apps/plugins/SUBDIRS.app_build | 2 | ||||
-rw-r--r-- | apps/plugins/reversi/reversi-gui.c | 22 | ||||
-rw-r--r-- | apps/plugins/reversi/reversi-gui.h | 13 |
3 files changed, 23 insertions, 14 deletions
diff --git a/apps/plugins/SUBDIRS.app_build b/apps/plugins/SUBDIRS.app_build index e9f9253e82..934474a996 100644 --- a/apps/plugins/SUBDIRS.app_build +++ b/apps/plugins/SUBDIRS.app_build | |||
@@ -13,6 +13,8 @@ lua | |||
13 | fft | 13 | fft |
14 | #endif | 14 | #endif |
15 | 15 | ||
16 | reversi | ||
17 | |||
16 | #ifdef HAVE_TAGCACHE | 18 | #ifdef HAVE_TAGCACHE |
17 | pictureflow | 19 | pictureflow |
18 | #endif | 20 | #endif |
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index e6613d6a25..e59a91e341 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c | |||
@@ -167,14 +167,14 @@ static bool game_finished; | |||
167 | #define B_QUIT_H (LCD_HEIGHT/4) | 167 | #define B_QUIT_H (LCD_HEIGHT/4) |
168 | #else | 168 | #else |
169 | /* Define Menu button x, y, width, height */ | 169 | /* Define Menu button x, y, width, height */ |
170 | #define B_MENU_X (LCD_WIDTH/2) | 170 | #define B_MENU_X (LCD_WIDTH/2 - XOFS) |
171 | #define B_MENU_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) | 171 | #define B_MENU_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) |
172 | #define B_MENU_W (LCD_WIDTH/4) | 172 | #define B_MENU_W (LCD_WIDTH/4 - XOFS) |
173 | #define B_MENU_H (2*CELL_HEIGHT) | 173 | #define B_MENU_H (2*CELL_HEIGHT) |
174 | /* Define Quit Button x, y, width, height */ | 174 | /* Define Quit Button x, y, width, height */ |
175 | #define B_QUIT_X (LCD_WIDTH-LCD_WIDTH/4) | 175 | #define B_QUIT_X (B_MENU_X + B_MENU_W + 1) |
176 | #define B_QUIT_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) | 176 | #define B_QUIT_Y (CELL_HEIGHT*BOARD_SIZE+YOFS*2) |
177 | #define B_QUIT_W (LCD_WIDTH/4) | 177 | #define B_QUIT_W (LCD_WIDTH/4 - XOFS) |
178 | #define B_QUIT_H (2*CELL_HEIGHT) | 178 | #define B_QUIT_H (2*CELL_HEIGHT) |
179 | #endif | 179 | #endif |
180 | 180 | ||
@@ -316,22 +316,16 @@ static void reversi_gui_display_board(void) { | |||
316 | y = LEGEND_Y(0); | 316 | y = LEGEND_Y(0); |
317 | reversi_gui_draw_cell(x, y+(LEGEND_Y(1)-LEGEND_Y(0))/2-CELL_WIDTH/2, BLACK); | 317 | reversi_gui_draw_cell(x, y+(LEGEND_Y(1)-LEGEND_Y(0))/2-CELL_WIDTH/2, BLACK); |
318 | rb->snprintf(buf, sizeof(buf), "%01d", c); | 318 | rb->snprintf(buf, sizeof(buf), "%01d", c); |
319 | |||
320 | rb->viewport_set_defaults(&tempvp, SCREEN_MAIN); | ||
319 | 321 | ||
320 | tempvp.x=x+CELL_WIDTH+2; | 322 | tempvp.x=x+CELL_WIDTH+2; |
321 | tempvp.y=y; | 323 | tempvp.y=y; |
322 | tempvp.width=LCD_WIDTH-tempvp.x; | 324 | tempvp.width=LCD_WIDTH-tempvp.x; |
323 | tempvp.height=LEGEND_Y(1); | 325 | tempvp.height=LEGEND_Y(1); |
324 | |||
325 | tempvp.font=FONT_UI; | ||
326 | tempvp.drawmode=STYLE_DEFAULT; | ||
327 | #if LCD_DEPTH > 1 | 326 | #if LCD_DEPTH > 1 |
328 | tempvp.fg_pattern=0; | 327 | tempvp.fg_pattern = LCD_BLACK; |
329 | tempvp.bg_pattern=0xFFFF; | 328 | tempvp.bg_pattern = LCD_WHITE; |
330 | #ifdef HAVE_LCD_COLOR | ||
331 | tempvp.lss_pattern=0; | ||
332 | tempvp.lse_pattern=0; | ||
333 | tempvp.lst_pattern=0; | ||
334 | #endif | ||
335 | #endif | 329 | #endif |
336 | 330 | ||
337 | rb->screens[SCREEN_MAIN]->set_viewport(&tempvp); | 331 | rb->screens[SCREEN_MAIN]->set_viewport(&tempvp); |
diff --git a/apps/plugins/reversi/reversi-gui.h b/apps/plugins/reversi/reversi-gui.h index c0d6183c2f..60b35d94e2 100644 --- a/apps/plugins/reversi/reversi-gui.h +++ b/apps/plugins/reversi/reversi-gui.h | |||
@@ -208,6 +208,19 @@ | |||
208 | #elif CONFIG_KEYPAD == ONDAVX777_PAD | 208 | #elif CONFIG_KEYPAD == ONDAVX777_PAD |
209 | #define REVERSI_BUTTON_QUIT BUTTON_POWER | 209 | #define REVERSI_BUTTON_QUIT BUTTON_POWER |
210 | 210 | ||
211 | #elif CONFIG_KEYPAD == ANDROID_PAD | ||
212 | #define REVERSI_BUTTON_QUIT BUTTON_BACK | ||
213 | #define REVERSI_BUTTON_MENU BUTTON_MENU | ||
214 | |||
215 | #elif CONFIG_KEYPAD == SDL_PAD | ||
216 | #define REVERSI_BUTTON_QUIT BUTTON_BACK | ||
217 | #define REVERSI_BUTTON_UP BUTTON_UP | ||
218 | #define REVERSI_BUTTON_DOWN BUTTON_DOWN | ||
219 | #define REVERSI_BUTTON_LEFT BUTTON_LEFT | ||
220 | #define REVERSI_BUTTON_RIGHT BUTTON_RIGHT | ||
221 | #define REVERSI_BUTTON_MAKE_MOVE BUTTON_SELECT | ||
222 | #define REVERSI_BUTTON_MENU BUTTON_MENU | ||
223 | |||
211 | #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD | 224 | #elif CONFIG_KEYPAD == SAMSUNG_YH_PAD |
212 | #define REVERSI_BUTTON_QUIT BUTTON_REC | 225 | #define REVERSI_BUTTON_QUIT BUTTON_REC |
213 | #define REVERSI_BUTTON_UP BUTTON_UP | 226 | #define REVERSI_BUTTON_UP BUTTON_UP |