summaryrefslogtreecommitdiff
path: root/apps/plugins/robotfindskitten.c
diff options
context:
space:
mode:
authorAndrew Mahone <andrew.mahone@gmail.com>2009-01-16 10:34:40 +0000
committerAndrew Mahone <andrew.mahone@gmail.com>2009-01-16 10:34:40 +0000
commit23d9812273d9c74af72ccdc3aa4cfea971f220a4 (patch)
tree8e60c3a2a41879f8b2a52516fa416b3ab906e239 /apps/plugins/robotfindskitten.c
parent35677cbc54bbe400ebbff59b489dda7ca7f04916 (diff)
downloadrockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.zip
rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.gz
rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.bz2
rockbox-23d9812273d9c74af72ccdc3aa4cfea971f220a4.tar.xz
loader-initialized global plugin API:
struct plugin_api *rb is declared in PLUGIN_HEADER, and pointed to by __header.api the loader uses this pointer to initialize rb before calling entry_point entry_point is no longer passed a pointer to the plugin API all plugins, and pluginlib functions, are modified to refer to the global rb pluginlib functions which only served to copy the API pointer are removed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19776 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/robotfindskitten.c')
-rw-r--r--apps/plugins/robotfindskitten.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/apps/plugins/robotfindskitten.c b/apps/plugins/robotfindskitten.c
index 58d9d12..056b799 100644
--- a/apps/plugins/robotfindskitten.c
+++ b/apps/plugins/robotfindskitten.c
@@ -620,18 +620,13 @@ bool exit_rfk;
offset function and using that everywhere. So not right now. */
int screen[X_MAX + 1][Y_MAX + 1];
-/* here is a global api struct pointer. while not strictly necessary,
- it's nice not to have to pass the api pointer in all function calls
- in the plugin */
-static const struct plugin_api* rb;
-
/******************************************************************************
*
* Begin meaty routines that do the dirty work.
*
*****************************************************************************/
-MEM_FUNCTION_WRAPPERS(rb)
+MEM_FUNCTION_WRAPPERS
static void drawchar(int x, int y, char c)
{
@@ -695,7 +690,7 @@ static void play_game()
old_y = robot.y;
}
#ifdef __PLUGINLIB_ACTIONS_H__
- input = pluginlib_getaction(rb, TIMEOUT_BLOCK, plugin_contexts, 2);
+ input = pluginlib_getaction(TIMEOUT_BLOCK, plugin_contexts, 2);
#else
input = rb->button_get(true);
#endif
@@ -1037,10 +1032,9 @@ static void initialize_screen()
}
/* this is the plugin entry point */
-enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
+enum plugin_status plugin_start(const void* parameter)
{
(void)parameter;
- rb = api;
exit_rfk = false;