summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-07-28 07:35:45 +0000
committerJens Arnold <amiconn@rockbox.org>2006-07-28 07:35:45 +0000
commit05ddd9a44eb565e936274b6f73fc76f7476113a7 (patch)
tree0c2a5a8db4c86196deb06615b246d66e920784b7 /tools
parentcb36fec3922cb1317bdb06a6497370f188694d4e (diff)
X5 remote LCD drawing. This will break target linking atm - lcd_remote_update[_rect]() are not yet implemented.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10347 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r--tools/bmp2rb.c22
-rwxr-xr-xtools/configure2
2 files changed, 21 insertions, 3 deletions
diff --git a/tools/bmp2rb.c b/tools/bmp2rb.c
index 0262473fc1..478badefd7 100644
--- a/tools/bmp2rb.c
+++ b/tools/bmp2rb.c
@@ -326,6 +326,12 @@ int transform_bitmap(const struct RGBQUAD *src, int width, int height,
dst_h = height;
dst_d = 8;
break;
+
+ case 7: /* greyscale X5 remote 4-grey */
+ dst_w = width;
+ dst_h = (height + 7) / 8;
+ dst_d = 16;
+ break;
default: /* unknown */
debugf("error - Undefined destination format\n");
@@ -405,6 +411,17 @@ int transform_bitmap(const struct RGBQUAD *src, int width, int height,
(~brightness(src[row * width + col]) & 0xC0) >> (2 * (col & 3));
}
break;
+
+ case 7: /* greyscale X5 remote 4-grey */
+ for (row = 0; row < height; row++)
+ for (col = 0; col < width; col++)
+ {
+ unsigned short data = (~brightness(src[row * width + col]) & 0xC0) >> 6;
+
+ data = (data | (data << 7)) & 0x0101;
+ (*dest)[(row/8) * dst_w + col] |= data << (row & 7);
+ }
+ break;
}
return 0;
@@ -514,10 +531,11 @@ void print_usage(void)
"\t 0 Archos recorder, Ondio, Gmini 120/SP, Iriver H1x0 mono\n"
"\t 1 Archos player graphics library\n"
"\t 2 Iriver H1x0 4-grey\n"
- "\t 3 Canonical 8-bit grayscale\n"
+ "\t 3 Canonical 8-bit greyscale\n"
"\t 4 16-bit packed 5-6-5 RGB (iriver H300)\n"
"\t 5 16-bit packed and byte-swapped 5-6-5 RGB (iPod)\n"
- "\t 6 Greayscale iPod 4-grey\n"
+ "\t 6 Greyscale iPod 4-grey\n"
+ "\t 7 Greyscale X5 remote 4-grey\n"
, APPLICATION_NAME);
printf("build date: " __DATE__ "\n\n");
}
diff --git a/tools/configure b/tools/configure
index 0962f41ce0..f155afd8db 100755
--- a/tools/configure
+++ b/tools/configure
@@ -705,7 +705,7 @@ toolsdir='\$(ROOTDIR)/tools'
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
bmp2rb_remotemono="$rootdir/tools/bmp2rb -f 0"
- bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 0"
+ bmp2rb_remotenative="$rootdir/tools/bmp2rb -f 7"
output="rockbox.iaudio"
appextra="recorder:gui"
archosrom=""