summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
authorRobert Hak <adiamas@rockbox.org>2002-05-08 08:22:38 +0000
committerRobert Hak <adiamas@rockbox.org>2002-05-08 08:22:38 +0000
commitd22a3fb11bee203ce36b57f5dc565830c5c3e9ac (patch)
tree4b66b7941f0bbb500e2d102ffd0d5386a5231b8a /uisimulator
parentaf5c607832b9c6b2a5a9ff34e6550c5cdb5cd8c9 (diff)
downloadrockbox-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
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/tree.c19
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 @@
28#include "kernel.h" 28#include "kernel.h"
29#include "tree.h" 29#include "tree.h"
30 30
31#include "icons.h"
32
31#include "play.h" 33#include "play.h"
32 34
33#define TREE_MAX_FILENAMELEN 64 35#define TREE_MAX_FILENAMELEN 64
@@ -50,17 +52,15 @@ struct entry {
50 52
51#ifdef HAVE_LCD_BITMAP 53#ifdef HAVE_LCD_BITMAP
52 54
53static unsigned char fileimage[] = { 55extern unsigned char bitmap_icons_6x8[LastIcon][6];
54 0x60, 0x7f, 0x03, 0x63, 0x7f, 0x00 }; 56extern icons_6x8;
55
56static unsigned char dirimage[] = {
57 0x3e, 0x26, 0x26, 0x24, 0x3c, 0x00 };
58 57
59int static 58int static showdir(char *path, struct entry *buffer, int start,
60showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end) 59 int scrollpos, int* at_end)
61{ 60{
62 int i; 61 int i;
63 int j=0; 62 int j=0;
63 int icon_type = 0;
64 DIR *dir = opendir(path); 64 DIR *dir = opendir(path);
65 struct dirent *entry; 65 struct dirent *entry;
66 66
@@ -89,8 +89,9 @@ showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end)
89 89
90 buffer[i].file = !(entry->attribute&ATTR_DIRECTORY); 90 buffer[i].file = !(entry->attribute&ATTR_DIRECTORY);
91 91
92 lcd_bitmap(buffer[i].file? 92 buffer[i].file?(icon_type=FileIcon):(icon_type=DirIcon);
93 fileimage:dirimage, 6, LINE_Y+i*LINE_HEIGTH, 6, 8, TRUE); 93 lcd_bitmap(bitmap_icons_6x8[icon_type], 6, LINE_Y+i*LINE_HEIGTH, 6,
94 8, TRUE);
94 95
95 if(len < TREE_MAX_LEN_DISPLAY) 96 if(len < TREE_MAX_LEN_DISPLAY)
96 lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0); 97 lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0);