summaryrefslogtreecommitdiff
path: root/apps/games_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/games_menu.c')
-rw-r--r--apps/games_menu.c106
1 files changed, 0 insertions, 106 deletions
diff --git a/apps/games_menu.c b/apps/games_menu.c
deleted file mode 100644
index 16acd804ba..0000000000
--- a/apps/games_menu.c
+++ /dev/null
@@ -1,106 +0,0 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 Robert Hak
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include "config.h"
21#include "options.h"
22
23#ifdef HAVE_LCD_BITMAP
24#ifdef USE_GAMES
25
26#include <stdio.h>
27#include <stdbool.h>
28#include "menu.h"
29#include "games_menu.h"
30#include "lang.h"
31#include "plugin.h"
32
33static bool tetris(void)
34{
35 if (plugin_load("/.rockbox/rocks/tetris.rock",NULL)==PLUGIN_USB_CONNECTED)
36 return true;
37 return false;
38}
39
40static bool sokoban(void)
41{
42 if (plugin_load("/.rockbox/rocks/sokoban.rock",NULL)==PLUGIN_USB_CONNECTED)
43 return true;
44 return false;
45}
46
47static bool wormlet(void)
48{
49 if (plugin_load("/.rockbox/rocks/wormlet.rock",NULL)==PLUGIN_USB_CONNECTED)
50 return true;
51 return false;
52}
53
54static bool flipit(void)
55{
56 if (plugin_load("/.rockbox/rocks/flipit.rock",NULL)==PLUGIN_USB_CONNECTED)
57 return true;
58 return false;
59}
60
61static bool othelo(void)
62{
63 if (plugin_load("/.rockbox/rocks/othelo.rock",NULL)==PLUGIN_USB_CONNECTED)
64 return true;
65 return false;
66}
67
68static bool sliding_puzzle(void)
69{
70 if (plugin_load("/.rockbox/rocks/sliding_puzzle.rock",
71 NULL)==PLUGIN_USB_CONNECTED)
72 return true;
73 return false;
74}
75
76static bool star(void)
77{
78 if (plugin_load("/.rockbox/rocks/star.rock",NULL)==PLUGIN_USB_CONNECTED)
79 return true;
80 return false;
81}
82
83bool games_menu(void)
84{
85 int m;
86 bool result;
87
88 struct menu_items items[] = {
89 { str(LANG_TETRIS), tetris },
90 { str(LANG_SOKOBAN), sokoban },
91 { str(LANG_WORMLET), wormlet },
92 { str(LANG_FLIPIT), flipit },
93 { str(LANG_OTHELO), othelo },
94 { str(LANG_SLIDING_PUZZLE), sliding_puzzle },
95 { str(LANG_STAR), star },
96 };
97
98 m=menu_init( items, sizeof items / sizeof(struct menu_items) );
99 result = menu_run(m);
100 menu_exit(m);
101
102 return result;
103}
104
105#endif
106#endif