diff options
Diffstat (limited to 'apps/plugins/robotfindskitten.c')
-rw-r--r-- | apps/plugins/robotfindskitten.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/plugins/robotfindskitten.c b/apps/plugins/robotfindskitten.c index 58d9d12665..056b799a52 100644 --- a/apps/plugins/robotfindskitten.c +++ b/apps/plugins/robotfindskitten.c | |||
@@ -620,18 +620,13 @@ bool exit_rfk; | |||
620 | offset function and using that everywhere. So not right now. */ | 620 | offset function and using that everywhere. So not right now. */ |
621 | int screen[X_MAX + 1][Y_MAX + 1]; | 621 | int screen[X_MAX + 1][Y_MAX + 1]; |
622 | 622 | ||
623 | /* here is a global api struct pointer. while not strictly necessary, | ||
624 | it's nice not to have to pass the api pointer in all function calls | ||
625 | in the plugin */ | ||
626 | static const struct plugin_api* rb; | ||
627 | |||
628 | /****************************************************************************** | 623 | /****************************************************************************** |
629 | * | 624 | * |
630 | * Begin meaty routines that do the dirty work. | 625 | * Begin meaty routines that do the dirty work. |
631 | * | 626 | * |
632 | *****************************************************************************/ | 627 | *****************************************************************************/ |
633 | 628 | ||
634 | MEM_FUNCTION_WRAPPERS(rb) | 629 | MEM_FUNCTION_WRAPPERS |
635 | 630 | ||
636 | static void drawchar(int x, int y, char c) | 631 | static void drawchar(int x, int y, char c) |
637 | { | 632 | { |
@@ -695,7 +690,7 @@ static void play_game() | |||
695 | old_y = robot.y; | 690 | old_y = robot.y; |
696 | } | 691 | } |
697 | #ifdef __PLUGINLIB_ACTIONS_H__ | 692 | #ifdef __PLUGINLIB_ACTIONS_H__ |
698 | input = pluginlib_getaction(rb, TIMEOUT_BLOCK, plugin_contexts, 2); | 693 | input = pluginlib_getaction(TIMEOUT_BLOCK, plugin_contexts, 2); |
699 | #else | 694 | #else |
700 | input = rb->button_get(true); | 695 | input = rb->button_get(true); |
701 | #endif | 696 | #endif |
@@ -1037,10 +1032,9 @@ static void initialize_screen() | |||
1037 | } | 1032 | } |
1038 | 1033 | ||
1039 | /* this is the plugin entry point */ | 1034 | /* this is the plugin entry point */ |
1040 | enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) | 1035 | enum plugin_status plugin_start(const void* parameter) |
1041 | { | 1036 | { |
1042 | (void)parameter; | 1037 | (void)parameter; |
1043 | rb = api; | ||
1044 | 1038 | ||
1045 | exit_rfk = false; | 1039 | exit_rfk = false; |
1046 | 1040 | ||