1
0
Fork 0
forked from len0rd/rockbox

added externs from icon.[ch]

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@505 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Hak 2002-05-08 08:22:38 +00:00
parent af5c607832
commit d22a3fb11b

View file

@ -28,6 +28,8 @@
#include "kernel.h" #include "kernel.h"
#include "tree.h" #include "tree.h"
#include "icons.h"
#include "play.h" #include "play.h"
#define TREE_MAX_FILENAMELEN 64 #define TREE_MAX_FILENAMELEN 64
@ -50,17 +52,15 @@ struct entry {
#ifdef HAVE_LCD_BITMAP #ifdef HAVE_LCD_BITMAP
static unsigned char fileimage[] = { extern unsigned char bitmap_icons_6x8[LastIcon][6];
0x60, 0x7f, 0x03, 0x63, 0x7f, 0x00 }; extern icons_6x8;
static unsigned char dirimage[] = { int static showdir(char *path, struct entry *buffer, int start,
0x3e, 0x26, 0x26, 0x24, 0x3c, 0x00 }; int scrollpos, int* at_end)
int static
showdir(char *path, struct entry *buffer, int start, int scrollpos, int* at_end)
{ {
int i; int i;
int j=0; int j=0;
int icon_type = 0;
DIR *dir = opendir(path); DIR *dir = opendir(path);
struct dirent *entry; 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); buffer[i].file = !(entry->attribute&ATTR_DIRECTORY);
lcd_bitmap(buffer[i].file? buffer[i].file?(icon_type=FileIcon):(icon_type=DirIcon);
fileimage:dirimage, 6, LINE_Y+i*LINE_HEIGTH, 6, 8, TRUE); lcd_bitmap(bitmap_icons_6x8[icon_type], 6, LINE_Y+i*LINE_HEIGTH, 6,
8, TRUE);
if(len < TREE_MAX_LEN_DISPLAY) if(len < TREE_MAX_LEN_DISPLAY)
lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0); lcd_puts(LINE_X, LINE_Y+i*LINE_HEIGTH, buffer[i].name, 0);