summaryrefslogtreecommitdiffstats
path: root/apps/plugins/wavview.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-04-12 09:51:16 +0000
committerJens Arnold <amiconn@rockbox.org>2008-04-12 09:51:16 +0000
commitfef82552e19efd2f2a7c5918c650bbf39bfd454d (patch)
tree2f5676473bfc91b565b5825e053bacc93f8ad607 /apps/plugins/wavview.c
parentb6213bbf9889134c17065dc257c3cc08c7478490 (diff)
downloadrockbox-fef82552e19efd2f2a7c5918c650bbf39bfd454d.tar.gz
rockbox-fef82552e19efd2f2a7c5918c650bbf39bfd454d.tar.bz2
rockbox-fef82552e19efd2f2a7c5918c650bbf39bfd454d.zip
Optimise some more line drawing calls.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17083 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/wavview.c')
-rw-r--r--apps/plugins/wavview.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/apps/plugins/wavview.c b/apps/plugins/wavview.c
index fbf2e4383d..9ce873476f 100644
--- a/apps/plugins/wavview.c
+++ b/apps/plugins/wavview.c
@@ -289,26 +289,22 @@ int displaypeaks(void)
rb->lcd_clear_display();
- rb->lcd_drawline(0, LEFTZERO - (0x8000 / YSCALE), LCD_WIDTH-1,
- LEFTZERO - (0x8000 / YSCALE));
- rb->lcd_drawline(0, LEFTZERO, LCD_WIDTH-1, LEFTZERO);
- rb->lcd_drawline(0, LEFTZERO + (0x8000 / YSCALE), LCD_WIDTH-1,
- LEFTZERO + (0x8000 / YSCALE));
- rb->lcd_drawline(0, RIGHTZERO - (0x8000 / YSCALE), LCD_WIDTH-1,
- RIGHTZERO - (0x8000 / YSCALE));
- rb->lcd_drawline(0, RIGHTZERO, LCD_WIDTH-1, RIGHTZERO);
- rb->lcd_drawline(0, RIGHTZERO + (0x8000 / YSCALE), LCD_WIDTH-1,
- RIGHTZERO + (0x8000 / YSCALE));
+ rb->lcd_hline(0, LCD_WIDTH-1, LEFTZERO - (0x8000 / YSCALE));
+ rb->lcd_hline(0, LCD_WIDTH-1, LEFTZERO);
+ rb->lcd_hline(0, LCD_WIDTH-1, LEFTZERO + (0x8000 / YSCALE));
+ rb->lcd_hline(0, LCD_WIDTH-1, RIGHTZERO - (0x8000 / YSCALE));
+ rb->lcd_hline(0, LCD_WIDTH-1, RIGHTZERO);
+ rb->lcd_hline(0, LCD_WIDTH-1, RIGHTZERO + (0x8000 / YSCALE));
#if LCD_DEPTH > 1
rb->lcd_set_foreground(LCD_BLACK);
#endif
/* draw zoombar */
- rb->lcd_drawline(leftmargin / (mempeakcount / LCD_WIDTH), LCD_HEIGHT / 2,
- (leftmargin / (mempeakcount / LCD_WIDTH)) +
+ rb->lcd_hline(leftmargin / (mempeakcount / LCD_WIDTH),
+ (leftmargin / (mempeakcount / LCD_WIDTH)) +
(LCD_WIDTH / zoomlevel),
- LCD_HEIGHT / 2);
+ LCD_HEIGHT / 2);
while((x < LCD_WIDTH) && (peakcount < mempeakcount))
{
@@ -324,10 +320,10 @@ int displaypeaks(void)
if(0 == (peakcount % ppp))
{
/* drawing time */
- rb->lcd_drawline(x, LEFTZERO - (lymax / YSCALE), x,
- LEFTZERO - (lymin / YSCALE));
- rb->lcd_drawline(x, RIGHTZERO - (rymax / YSCALE), x,
- RIGHTZERO - (rymin / YSCALE));
+ rb->lcd_vline(x, LEFTZERO - (lymax / YSCALE),
+ LEFTZERO - (lymin / YSCALE));
+ rb->lcd_vline(x, RIGHTZERO - (rymax / YSCALE),
+ RIGHTZERO - (rymin / YSCALE));
lymin = INT_MAX;
lymax = INT_MIN;
rymin = INT_MAX;