diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-01-13 00:11:43 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-01-13 00:11:43 +0000 |
commit | a72499a12541fa0348e92f88662d1efe15b0ea47 (patch) | |
tree | 32a874c093616649f49f4392207b738a6f7abed7 /apps/plugins/lib/grey_draw.c | |
parent | 43cc03457d2bda7eb3057f242ff7b23a9856408c (diff) | |
download | rockbox-a72499a12541fa0348e92f88662d1efe15b0ea47.tar.gz rockbox-a72499a12541fa0348e92f88662d1efe15b0ea47.zip |
Greyscale library: Plugins can now put the management structure in IRAM for higher update speed. Use this in doom, mpegplayer, and zxbox. Made the api pointer part of the struct.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16066 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/grey_draw.c')
-rw-r--r-- | apps/plugins/lib/grey_draw.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index 683793129e..9b8acd4c37 100644 --- a/apps/plugins/lib/grey_draw.c +++ b/apps/plugins/lib/grey_draw.c | |||
@@ -61,8 +61,8 @@ void grey_clear_display(void) | |||
61 | int value = (_grey_info.drawmode & DRMODE_INVERSEVID) ? | 61 | int value = (_grey_info.drawmode & DRMODE_INVERSEVID) ? |
62 | _grey_info.fg_val : _grey_info.bg_val; | 62 | _grey_info.fg_val : _grey_info.bg_val; |
63 | 63 | ||
64 | _grey_rb->memset(_grey_info.buffer, value, | 64 | _grey_info.rb->memset(_grey_info.buffer, value, |
65 | _GREY_MULUQ(_grey_info.width, _grey_info.height)); | 65 | _GREY_MULUQ(_grey_info.width, _grey_info.height)); |
66 | } | 66 | } |
67 | 67 | ||
68 | /* Set a single pixel */ | 68 | /* Set a single pixel */ |
@@ -194,7 +194,7 @@ void grey_hline(int x1, int x2, int y) | |||
194 | dst = &_grey_info.buffer[_GREY_MULUQ(_grey_info.width, y) + x1]; | 194 | dst = &_grey_info.buffer[_GREY_MULUQ(_grey_info.width, y) + x1]; |
195 | 195 | ||
196 | if (fillopt) | 196 | if (fillopt) |
197 | _grey_rb->memset(dst, value, x2 - x1 + 1); | 197 | _grey_info.rb->memset(dst, value, x2 - x1 + 1); |
198 | else | 198 | else |
199 | { | 199 | { |
200 | unsigned char *dst_end = dst + x2 - x1; | 200 | unsigned char *dst_end = dst + x2 - x1; |
@@ -379,7 +379,7 @@ void grey_fillrect(int x, int y, int width, int height) | |||
379 | do | 379 | do |
380 | { | 380 | { |
381 | if (fillopt) | 381 | if (fillopt) |
382 | _grey_rb->memset(dst, value, width); | 382 | _grey_info.rb->memset(dst, value, width); |
383 | else | 383 | else |
384 | { | 384 | { |
385 | unsigned char *dst_row = dst; | 385 | unsigned char *dst_row = dst; |
@@ -539,7 +539,7 @@ void grey_gray_bitmap(const unsigned char *src, int x, int y, int width, | |||
539 | void grey_putsxyofs(int x, int y, int ofs, const unsigned char *str) | 539 | void grey_putsxyofs(int x, int y, int ofs, const unsigned char *str) |
540 | { | 540 | { |
541 | int ch; | 541 | int ch; |
542 | struct font* pf = _grey_rb->font_get(_grey_info.curfont); | 542 | struct font* pf = _grey_info.rb->font_get(_grey_info.curfont); |
543 | 543 | ||
544 | while ((ch = *str++) != '\0' && x < _grey_info.width) | 544 | while ((ch = *str++) != '\0' && x < _grey_info.width) |
545 | { | 545 | { |
@@ -603,8 +603,8 @@ void grey_ub_clear_display(void) | |||
603 | int value = (_grey_info.drawmode & DRMODE_INVERSEVID) ? | 603 | int value = (_grey_info.drawmode & DRMODE_INVERSEVID) ? |
604 | _grey_info.fg_val : _grey_info.bg_val; | 604 | _grey_info.fg_val : _grey_info.bg_val; |
605 | 605 | ||
606 | _grey_rb->memset(_grey_info.values, value, | 606 | _grey_info.rb->memset(_grey_info.values, value, |
607 | _GREY_MULUQ(_grey_info.width, _grey_info.height)); | 607 | _GREY_MULUQ(_grey_info.width, _grey_info.height)); |
608 | } | 608 | } |
609 | 609 | ||
610 | /* Draw a partial greyscale bitmap, canonical format */ | 610 | /* Draw a partial greyscale bitmap, canonical format */ |