summaryrefslogtreecommitdiff
path: root/firmware/export/lcd.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-29 01:39:50 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-29 01:39:50 +0000
commit576908d36a58d51ee880791418a32cef25b49aba (patch)
treeda2e34886085ca15de28d1b7226064be2906232b /firmware/export/lcd.h
parent7e11acbce9b9a63c28ded055d02301175391e027 (diff)
downloadrockbox-576908d36a58d51ee880791418a32cef25b49aba.zip
rockbox-576908d36a58d51ee880791418a32cef25b49aba.tar.gz
rockbox-576908d36a58d51ee880791418a32cef25b49aba.tar.bz2
rockbox-576908d36a58d51ee880791418a32cef25b49aba.tar.xz
Third part of graphics api rework. Some small but effective optimisations. Ported remote lcd driver to new api. Preparations for including the low-level functions in the plugin api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6907 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/lcd.h')
-rw-r--r--firmware/export/lcd.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 6a6a8e8..77e7979 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -122,9 +122,9 @@ extern void lcd_jump_scroll_delay(int ms);
#define DRMODE_SOLID 3
#define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */
-#define DRAW_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] |= (1<<((y)&7))
-#define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] &= ~(1<<((y)&7))
-#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] ^= (1<<((y)&7))
+#define DRAW_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] |= (1<<((y)&7))
+#define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] &= ~(1<<((y)&7))
+#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)>>3][(x)] ^= (1<<((y)&7))
typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */
typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits);
@@ -144,6 +144,10 @@ extern int lcd_getymargin(void);
extern void lcd_setfont(int font);
extern int lcd_getstringsize(const unsigned char *str, int *w, int *h);
+/* low level drawing function pointer arrays */
+extern lcd_pixelfunc_type* lcd_pixelfuncs[8];
+extern lcd_blockfunc_type* lcd_blockfuncs[8];
+
extern void lcd_drawpixel(int x, int y);
extern void lcd_drawline(int x1, int y1, int x2, int y2);
extern void lcd_hline(int x1, int x2, int y);