summaryrefslogtreecommitdiff
path: root/apps/plugins/pacbox
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/pacbox
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/pacbox')
-rw-r--r--apps/plugins/pacbox/arcade.c2
-rw-r--r--apps/plugins/pacbox/hardware.c2
-rw-r--r--apps/plugins/pacbox/pacbox.c11
3 files changed, 3 insertions, 12 deletions
diff --git a/apps/plugins/pacbox/arcade.c b/apps/plugins/pacbox/arcade.c
index d5c7399..d4fa0ad 100644
--- a/apps/plugins/pacbox/arcade.c
+++ b/apps/plugins/pacbox/arcade.c
@@ -29,8 +29,6 @@
#include <string.h>
#include "plugin.h"
-extern const struct plugin_api* rb;
-
#ifndef HAVE_LCD_COLOR
/* Convert RGB888 to 2-bit greyscale - logic taken from bmp2rb.c */
static fb_data rgb_to_gray(unsigned int r, unsigned int g, unsigned int b)
diff --git a/apps/plugins/pacbox/hardware.c b/apps/plugins/pacbox/hardware.c
index 919eb89..f5a7184 100644
--- a/apps/plugins/pacbox/hardware.c
+++ b/apps/plugins/pacbox/hardware.c
@@ -27,8 +27,6 @@
#include "plugin.h"
#include "hardware.h"
-extern const struct plugin_api* rb;
-
/* The main data for Pacman */
unsigned char ram_[20*1024] IBSS_ATTR; // ROM (16K) and RAM (4K)
diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c
index c4ee037..ef5d4f5 100644
--- a/apps/plugins/pacbox/pacbox.c
+++ b/apps/plugins/pacbox/pacbox.c
@@ -34,8 +34,6 @@
PLUGIN_HEADER
PLUGIN_IRAM_DECLARE
-const struct plugin_api* rb;
-
struct pacman_settings {
int difficulty;
int numlives;
@@ -181,7 +179,7 @@ static bool pacbox_menu(void)
{ "Quit", NULL },
};
- m = menu_init(rb, items, sizeof(items) / sizeof(*items),
+ m = menu_init(items, sizeof(items) / sizeof(*items),
NULL, NULL, NULL, NULL);
rb->button_clear_queue();
@@ -363,12 +361,11 @@ static int gameProc( void )
return 0;
}
-enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter)
+enum plugin_status plugin_start(const void* parameter)
{
(void)parameter;
- PLUGIN_IRAM_INIT(api)
- rb = api;
+ PLUGIN_IRAM_INIT(rb)
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
rb->cpu_boost(true);
@@ -386,8 +383,6 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
settings.ghostnames = 0; /* Normal names */
settings.showfps = 0; /* Do not show FPS */
- configfile_init(rb);
-
if (configfile_load(SETTINGS_FILENAME, config,
sizeof(config)/sizeof(*config),
SETTINGS_MIN_VERSION