1
0
Fork 0
forked from len0rd/rockbox

play .ch8 files with the Chip-8 emulator

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3997 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jörg Hohensohn 2003-10-30 23:48:36 +00:00
parent 0860a4d6d1
commit 1694847103
2 changed files with 13 additions and 2 deletions

View file

@ -310,7 +310,12 @@ struct entry* load_and_sort_directory(char *dirname, int *dirfilter,
else if (!strcasecmp(&entry->d_name[len-5], ".rock"))
dptr->attr |= TREE_ATTR_ROCK;
else if (!strcasecmp(&entry->d_name[len-4], ".ucl"))
dptr->attr |= TREE_ATTR_UCL; }
dptr->attr |= TREE_ATTR_UCL;
#ifdef HAVE_LCD_BITMAP
else if (!strcasecmp(&entry->d_name[len-4], ".ch8"))
dptr->attr |= TREE_ATTR_CH8;
#endif
}
/* memorize/compare details about the boot file */
if ((currdir[1] == 0) && !strcmp(entry->d_name, BOOTFILE)) {
@ -1025,6 +1030,11 @@ static bool dirbrowse(char *root, int *dirfilter)
break;
#ifdef HAVE_LCD_BITMAP
/* chip-8 game */
case TREE_ATTR_CH8:
plugin_load("/.rockbox/rocks/chip8.rock",buf);
break;
case TREE_ATTR_FONT:
font_load(buf);
set_file(buf, global_settings.font_file,

View file

@ -37,6 +37,7 @@ struct entry {
#define TREE_ATTR_LNG 0x1000 /* binary lang file */
#define TREE_ATTR_ROCK 0x2000 /* binary rockbox plugin */
#define TREE_ATTR_UCL 0x4000 /* rockbox flash image */
#define TREE_ATTR_CH8 0x8000 /* chip-8 game */
#define TREE_ATTR_MASK 0xffd0 /* which bits tree.c uses (above + DIR) */
void tree_init(void);