summaryrefslogtreecommitdiff
path: root/apps/plugins/doom
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/doom
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/doom')
-rw-r--r--apps/plugins/doom/i_video.c2
-rw-r--r--apps/plugins/doom/rockdoom.c18
-rw-r--r--apps/plugins/doom/rockmacros.h1
3 files changed, 9 insertions, 12 deletions
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 1d533d4..23872c2 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -772,7 +772,7 @@ void I_InitGraphics(void)
#ifndef HAVE_LCD_COLOR
gbuf=malloc(GREYBUFSIZE);
- grey_init(rb, gbuf, GREYBUFSIZE, GREY_ON_COP, LCD_WIDTH, LCD_HEIGHT, NULL);
+ grey_init(gbuf, GREYBUFSIZE, GREY_ON_COP, LCD_WIDTH, LCD_HEIGHT, NULL);
/* switch on greyscale overlay */
grey_show(true);
#endif
diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c
index 763e9d5..1e7c9fa 100644
--- a/apps/plugins/doom/rockdoom.c
+++ b/apps/plugins/doom/rockdoom.c
@@ -101,7 +101,6 @@ int my_close(int id)
return 0;
}
#endif
-const struct plugin_api* rb;
#define MAXARGVS 100
bool noprintf=0; // Variable disables printf lcd updates to protect grayscale lib/direct lcd updates
@@ -496,7 +495,7 @@ int Oset_keys()
{ "Game Automap", NULL },
};
- m = menu_init(rb, items, sizeof(items) / sizeof(*items),
+ m = menu_init(items, sizeof(items) / sizeof(*items),
NULL, NULL, NULL, NULL);
while(!menuquit)
@@ -560,7 +559,7 @@ static bool Doptions()
#endif
};
- m = menu_init(rb, items, sizeof(items) / sizeof(*items),
+ m = menu_init(items, sizeof(items) / sizeof(*items),
NULL, NULL, NULL, NULL);
while(!menuquit)
@@ -583,7 +582,7 @@ int menuchoice(struct menu_item *menu, int items)
{
int m, result;
- m = menu_init(rb, menu, items,NULL, NULL, NULL, NULL);
+ m = menu_init(menu, items,NULL, NULL, NULL, NULL);
result= menu_show(m);
menu_exit(m);
@@ -633,7 +632,7 @@ int doom_menu()
while (rb->button_get(false) != BUTTON_NONE)
rb->yield();
- m = menu_init(rb, items, sizeof(items) / sizeof(*items),
+ m = menu_init(items, sizeof(items) / sizeof(*items),
NULL, NULL, NULL, NULL);
while(!menuquit)
@@ -677,11 +676,10 @@ int doom_menu()
extern int systemvol;
/* 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)
{
- PLUGIN_IRAM_INIT(api)
+ PLUGIN_IRAM_INIT(rb)
- rb = api;
(void)parameter;
doomexit=0;
@@ -741,7 +739,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
systemvol= rb->global_settings->volume-rb->global_settings->volume%((rb->sound_max(SOUND_VOLUME)-rb->sound_min(SOUND_VOLUME))/15);
general_translucency = default_translucency; // phares
- backlight_force_on(rb);
+ backlight_force_on();
#ifdef RB_PROFILE
rb->profile_thread();
#endif
@@ -755,7 +753,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
#ifdef RB_PROFILE
rb->profstop();
#endif
- backlight_use_settings(rb);
+ backlight_use_settings();
M_SaveDefaults ();
diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h
index 6abf025..73cd902 100644
--- a/apps/plugins/doom/rockmacros.h
+++ b/apps/plugins/doom/rockmacros.h
@@ -26,7 +26,6 @@
#include "autoconf.h"
#include "z_zone.h"
-extern const struct plugin_api* rb;
extern bool noprintf;
extern bool doomexit;