summaryrefslogtreecommitdiff
path: root/apps/plugins/invadrox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/invadrox.c')
-rw-r--r--apps/plugins/invadrox.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 0d50c67e73..718cb032cc 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -611,8 +611,6 @@ unsigned char fire_sprite[FIRE_HEIGHT] = {
611#define CYCLETIME 40 611#define CYCLETIME 40
612 612
613 613
614static const struct plugin_api* rb;
615
616/* Physical x is at PLAYFIELD_X + LIVES_X + x * ALIEN_SPEED 614/* Physical x is at PLAYFIELD_X + LIVES_X + x * ALIEN_SPEED
617 * Physical y is at y * ALIEN_HEIGHT 615 * Physical y is at y * ALIEN_HEIGHT
618 */ 616 */
@@ -1600,7 +1598,6 @@ void init_invadrox(void)
1600 rb->lcd_set_background(LCD_BLACK); 1598 rb->lcd_set_background(LCD_BLACK);
1601 rb->lcd_set_foreground(LCD_BLACK); 1599 rb->lcd_set_foreground(LCD_BLACK);
1602 1600
1603 highscore_init(rb);
1604 if (highscore_load(HISCOREFILE, &hiscore, 1) < 0) { 1601 if (highscore_load(HISCOREFILE, &hiscore, 1) < 0) {
1605 /* Init hiscore to 0 */ 1602 /* Init hiscore to 0 */
1606 rb->strncpy(hiscore.name, "Invader", sizeof(hiscore.name)); 1603 rb->strncpy(hiscore.name, "Invader", sizeof(hiscore.name));
@@ -1801,13 +1798,11 @@ void game_loop(void)
1801 1798
1802 1799
1803/* this is the plugin entry point */ 1800/* this is the plugin entry point */
1804enum plugin_status plugin_start(const struct plugin_api* api, UNUSED const void* parameter) 1801enum plugin_status plugin_start(UNUSED const void* parameter)
1805{ 1802{
1806 rb = api;
1807
1808 rb->lcd_setfont(FONT_SYSFIXED); 1803 rb->lcd_setfont(FONT_SYSFIXED);
1809 /* Turn off backlight timeout */ 1804 /* Turn off backlight timeout */
1810 backlight_force_on(rb); /* backlight control in lib/helper.c */ 1805 backlight_force_on(); /* backlight control in lib/helper.c */
1811 1806
1812 /* now go ahead and have fun! */ 1807 /* now go ahead and have fun! */
1813 game_loop(); 1808 game_loop();
@@ -1825,7 +1820,7 @@ enum plugin_status plugin_start(const struct plugin_api* api, UNUSED const void*
1825 /* Restore user's original backlight setting */ 1820 /* Restore user's original backlight setting */
1826 rb->lcd_setfont(FONT_UI); 1821 rb->lcd_setfont(FONT_UI);
1827 /* Turn on backlight timeout (revert to settings) */ 1822 /* Turn on backlight timeout (revert to settings) */
1828 backlight_use_settings(rb); /* backlight control in lib/helper.c */ 1823 backlight_use_settings(); /* backlight control in lib/helper.c */
1829 1824
1830 return PLUGIN_OK; 1825 return PLUGIN_OK;
1831} 1826}