diff options
author | Robert Hak <adiamas@rockbox.org> | 2002-05-08 08:22:38 +0000 |
---|---|---|
committer | Robert Hak <adiamas@rockbox.org> | 2002-05-08 08:22:38 +0000 |
commit | d22a3fb11bee203ce36b57f5dc565830c5c3e9ac (patch) | |
tree | 4b66b7941f0bbb500e2d102ffd0d5386a5231b8a | |
parent | af5c607832b9c6b2a5a9ff34e6550c5cdb5cd8c9 (diff) | |
download | rockbox-d22a3fb11bee203ce36b57f5dc565830c5c3e9ac.tar.gz rockbox-d22a3fb11bee203ce36b57f5dc565830c5c3e9ac.zip |
added externs from icon.[ch]
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@505 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | uisimulator/tree.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/uisimulator/tree.c b/uisimulator/tree.c index 5dfafe1824..9a2228467a 100644 --- a/uisimulator/tree.c +++ b/uisimulator/tree.c @@ -28,6 +28,8 @@ #include "kernel.h" #include "tree.h" +#include "icons.h" + #include "play.h" #define TREE_MAX_FILENAMELEN 64 @@ -50,17 +52,15 @@ struct entry { #ifdef HAVE_LCD_BITMAP -static unsigned char fileimage[] = { - 0x60, 0x7f, 0x03, 0x63, 0x7f, 0x00 }; - -static unsigned char dirimage[] = { - 0x3e, 0x26, 0x26, 0x24, 0x3c, 0x00 }; +extern unsigned char bitmap_icons_6x8[LastIcon][6]; +extern icons_6x8; -int static -showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) +int static showdir(char *path, struct entry *buffer, int start, + int scrollpos, int* at_end) { int i; int j=0; + int icon_type = 0; DIR *dir = opendir(path); struct dirent *entry; @@ -89,8 +89,9 @@ showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) buffer[i].file = !(entry->attribute&ATTR_DIRECTORY); - lcd_bitmap(buffer[i].file? - fileimage:dirimage, 6, LINE_Y+i*LINE_HEIGTH, 6, 8, TRUE); + buffer[i].file?(icon_type=FileIcon):(icon_type=DirIcon); + lcd_bitmap(bitmap_icons_6x8[icon_type], 6, LINE_Y+i*LINE_HEIGTH, 6, + 8, TRUE); if(len < TREE_MAX_LEN_DISPLAY) lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0); |