mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
games and screensavers are now in submenus
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1142 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
bb5579e838
commit
3827d4764b
5 changed files with 161 additions and 12 deletions
52
apps/games_menu.c
Normal file
52
apps/games_menu.c
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* __________ __ ___.
|
||||||
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
* \/ \/ \/ \/ \/
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Hak
|
||||||
|
*
|
||||||
|
* All files in this archive are subject to the GNU General Public License.
|
||||||
|
* See the file COPYING in the source tree root for full license agreement.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "lcd.h"
|
||||||
|
#include "menu.h"
|
||||||
|
#include "games_menu.h"
|
||||||
|
#include "button.h"
|
||||||
|
#include "kernel.h"
|
||||||
|
#include "sprintf.h"
|
||||||
|
|
||||||
|
#include "sokoban.h"
|
||||||
|
extern void tetris(void);
|
||||||
|
|
||||||
|
enum { Tetris, Sokoban, numgames };
|
||||||
|
|
||||||
|
void games_menu(void)
|
||||||
|
{
|
||||||
|
int m;
|
||||||
|
|
||||||
|
struct menu_items items[] = {
|
||||||
|
{ Tetris, "Tetris", tetris },
|
||||||
|
{ Sokoban, "Sokoban", sokoban },
|
||||||
|
};
|
||||||
|
|
||||||
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
menu_run(m);
|
||||||
|
menu_exit(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
24
apps/games_menu.h
Normal file
24
apps/games_menu.h
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* __________ __ ___.
|
||||||
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
* \/ \/ \/ \/ \/
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Hak
|
||||||
|
*
|
||||||
|
* All files in this archive are subject to the GNU General Public License.
|
||||||
|
* See the file COPYING in the source tree root for full license agreement.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef _GAMES_MENU_H
|
||||||
|
#define _GAMES_MENU_H
|
||||||
|
|
||||||
|
void games_menu(void);
|
||||||
|
|
||||||
|
#endif
|
|
@ -32,12 +32,10 @@
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
|
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
#include "games_menu.h"
|
||||||
|
#include "screensavers_menu.h"
|
||||||
#include "bmp.h"
|
#include "bmp.h"
|
||||||
#include "icons.h"
|
#include "icons.h"
|
||||||
#include "boxes.h"
|
|
||||||
#include "sokoban.h"
|
|
||||||
extern void tetris(void);
|
|
||||||
extern void bounce(void);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int show_logo( void )
|
int show_logo( void )
|
||||||
|
@ -198,19 +196,17 @@ void main_menu(void)
|
||||||
{
|
{
|
||||||
int m;
|
int m;
|
||||||
enum {
|
enum {
|
||||||
Tetris, Boxes, Bounce, Sokoban, Version, Sound, Scroll, Shuffle
|
Games, Screensavers, Version, Sound, Scroll, Shuffle
|
||||||
};
|
};
|
||||||
|
|
||||||
/* main menu */
|
/* main menu */
|
||||||
struct menu_items items[] = {
|
struct menu_items items[] = {
|
||||||
{ Shuffle, "Shuffle", shuffle },
|
{ Shuffle, "Shuffle", shuffle },
|
||||||
{ Sound, "Sound", sound_menu },
|
{ Sound, "Sound", sound_menu },
|
||||||
{ Scroll, "Scroll speed", scroll_speed },
|
{ Scroll, "Scroll speed", scroll_speed },
|
||||||
#ifdef HAVE_LCD_BITMAP
|
#ifdef HAVE_LCD_BITMAP
|
||||||
{ Tetris, "Tetris", tetris },
|
{ Games, "Games", games_menu },
|
||||||
{ Boxes, "Boxes", boxes },
|
{ Screensavers, "Screensavers", screensavers_menu },
|
||||||
{ Bounce, "Bounce", bounce },
|
|
||||||
{ Sokoban, "Sokoban", sokoban },
|
|
||||||
#endif
|
#endif
|
||||||
{ Version, "Version", show_credits },
|
{ Version, "Version", show_credits },
|
||||||
};
|
};
|
||||||
|
|
52
apps/screensavers_menu.c
Normal file
52
apps/screensavers_menu.c
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* __________ __ ___.
|
||||||
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
* \/ \/ \/ \/ \/
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Hak
|
||||||
|
*
|
||||||
|
* All files in this archive are subject to the GNU General Public License.
|
||||||
|
* See the file COPYING in the source tree root for full license agreement.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
#ifdef HAVE_LCD_BITMAP
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include "lcd.h"
|
||||||
|
#include "menu.h"
|
||||||
|
#include "screensavers_menu.h"
|
||||||
|
#include "button.h"
|
||||||
|
#include "kernel.h"
|
||||||
|
#include "sprintf.h"
|
||||||
|
|
||||||
|
#include "boxes.h"
|
||||||
|
extern void bounce(void);
|
||||||
|
|
||||||
|
enum { Boxes, Bounce, numsavers };
|
||||||
|
|
||||||
|
void screensavers_menu(void)
|
||||||
|
{
|
||||||
|
int m;
|
||||||
|
|
||||||
|
struct menu_items items[] = {
|
||||||
|
{ Boxes, "Boxes", boxes },
|
||||||
|
{ Bounce, "Bounce", bounce },
|
||||||
|
};
|
||||||
|
|
||||||
|
m=menu_init( items, sizeof items / sizeof(struct menu_items) );
|
||||||
|
menu_run(m);
|
||||||
|
menu_exit(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
25
apps/screensavers_menu.h
Normal file
25
apps/screensavers_menu.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
/***************************************************************************
|
||||||
|
* __________ __ ___.
|
||||||
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||||
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||||
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||||
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||||
|
* \/ \/ \/ \/ \/
|
||||||
|
* $Id$
|
||||||
|
*
|
||||||
|
* Copyright (C) 2002 Robert Hak
|
||||||
|
*
|
||||||
|
* All files in this archive are subject to the GNU General Public License.
|
||||||
|
* See the file COPYING in the source tree root for full license agreement.
|
||||||
|
*
|
||||||
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||||
|
* KIND, either express or implied.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
#ifndef _SCREENSAVERS_MENU_H
|
||||||
|
#define _SCREENSAVERS_MENU_H
|
||||||
|
|
||||||
|
void screensavers_menu(void);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue