diff options
Diffstat (limited to 'apps/plugins/reversi/reversi-gui.c')
-rw-r--r-- | apps/plugins/reversi/reversi-gui.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/apps/plugins/reversi/reversi-gui.c b/apps/plugins/reversi/reversi-gui.c index d8cdc0a952..5249a93efd 100644 --- a/apps/plugins/reversi/reversi-gui.c +++ b/apps/plugins/reversi/reversi-gui.c | |||
@@ -51,11 +51,6 @@ further options: | |||
51 | 51 | ||
52 | PLUGIN_HEADER | 52 | PLUGIN_HEADER |
53 | 53 | ||
54 | /* The global api struct pointer. While not strictly necessary, | ||
55 | it's nice not to have to pass the api pointer in all function | ||
56 | calls in the plugin */ | ||
57 | static const struct plugin_api* rb; | ||
58 | |||
59 | /* Thickness of the grid lines */ | 54 | /* Thickness of the grid lines */ |
60 | #define LINE_THCK 1 | 55 | #define LINE_THCK 1 |
61 | 56 | ||
@@ -391,7 +386,7 @@ static bool reversi_gui_menu(void) { | |||
391 | { "Quit", NULL }, | 386 | { "Quit", NULL }, |
392 | }; | 387 | }; |
393 | 388 | ||
394 | m = menu_init(rb, items, sizeof(items) / sizeof(*items), | 389 | m = menu_init(items, sizeof(items) / sizeof(*items), |
395 | NULL, NULL, NULL, NULL); | 390 | NULL, NULL, NULL, NULL); |
396 | 391 | ||
397 | result = menu_show(m); | 392 | result = menu_show(m); |
@@ -553,7 +548,7 @@ static void reversi_gui_move_cursor(int new_row, int new_col) { | |||
553 | 548 | ||
554 | 549 | ||
555 | /* plugin entry point */ | 550 | /* plugin entry point */ |
556 | enum plugin_status plugin_start(const struct plugin_api *api, const void *parameter) { | 551 | enum plugin_status plugin_start(const void *parameter) { |
557 | bool exit, draw_screen; | 552 | bool exit, draw_screen; |
558 | int button; | 553 | int button; |
559 | int lastbutton = BUTTON_NONE; | 554 | int lastbutton = BUTTON_NONE; |
@@ -561,10 +556,6 @@ enum plugin_status plugin_start(const struct plugin_api *api, const void *parame | |||
561 | int w_cnt, b_cnt; | 556 | int w_cnt, b_cnt; |
562 | char msg_buf[30]; | 557 | char msg_buf[30]; |
563 | 558 | ||
564 | /* plugin init */ | ||
565 | rb = api; | ||
566 | /* end of plugin init */ | ||
567 | |||
568 | #if LCD_DEPTH > 1 | 559 | #if LCD_DEPTH > 1 |
569 | rb->lcd_set_backdrop(NULL); | 560 | rb->lcd_set_backdrop(NULL); |
570 | rb->lcd_set_foreground(LCD_BLACK); | 561 | rb->lcd_set_foreground(LCD_BLACK); |
@@ -574,7 +565,6 @@ enum plugin_status plugin_start(const struct plugin_api *api, const void *parame | |||
574 | /* Avoid compiler warnings */ | 565 | /* Avoid compiler warnings */ |
575 | (void)parameter; | 566 | (void)parameter; |
576 | 567 | ||
577 | game.rb = rb; | ||
578 | rb->srand(*rb->current_tick); /* Some AIs use rand() */ | 568 | rb->srand(*rb->current_tick); /* Some AIs use rand() */ |
579 | white_strategy = &strategy_human; | 569 | white_strategy = &strategy_human; |
580 | black_strategy = &strategy_human; | 570 | black_strategy = &strategy_human; |