diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-07-15 01:06:04 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-07-15 01:06:04 +0000 |
commit | d219491e58159c237f2dcbf60b255dc3c49c159d (patch) | |
tree | 30e93d23174341c7057f80f10d448ed66baeca27 /firmware/target/arm/s3c2440/gigabeat-fx | |
parent | 6c21dc5e62ec2fa136f826fd95d145a4ec7b7f17 (diff) |
Gigabeat: Add the funky foreground color support for transparent bitmaps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13898 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c index bc391632ad..b680b15d25 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c @@ -227,7 +227,9 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, ".nextpixel: \r\n" "ldrh %[px], [%[s]], #2 \r\n" /* Load src pixel */ "add %[d], %[d], #2 \r\n" /* Uncoditionally increment dst */ - "cmp %[px], %[transcolor] \r\n" /* Compare to transparent color */ + "cmp %[px], %[fgcolor] \r\n" /* Compare to foreground color */ + "streqh %[fgpat], [%[d], #-2] \r\n" /* Store foregroud if match */ + "cmpne %[px], %[transcolor] \r\n" /* Compare to transparent color */ "strneh %[px], [%[d], #-2] \r\n" /* Store dst if not transparent */ "subs %[w], %[w], #1 \r\n" /* Width counter has run down? */ "bgt .nextpixel \r\n" /* More in this row? */ @@ -240,7 +242,9 @@ void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, : [width]"r"(width), [sstp]"r"(stride - width), [dstp]"r"(LCD_WIDTH - width), - [transcolor]"r"(TRANSPARENT_COLOR) + [transcolor]"r"(TRANSPARENT_COLOR), + [fgcolor]"r"(REPLACEWITHFG_COLOR), + [fgpat]"r"(fg_pattern) ); } |