summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-25 00:28:09 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-25 00:28:09 +0000
commit934941294b27b3e9a9012be1abe86f4e05db2204 (patch)
treeb704b66f0c8936ba78bdc6a69c2126cf0dba3314 /uisimulator
parent24a1f94cd7cc50fbda6689d33c5d2dbcf123dab5 (diff)
downloadrockbox-934941294b27b3e9a9012be1abe86f4e05db2204.tar.gz
rockbox-934941294b27b3e9a9012be1abe86f4e05db2204.zip
Core functions taking advantage of the new, optimised lcd_hline() and lcd_vline() functions. Some cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6859 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/battery.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/uisimulator/battery.c b/uisimulator/battery.c
index d8580b42d1..acb0835e9f 100644
--- a/uisimulator/battery.c
+++ b/uisimulator/battery.c
@@ -62,18 +62,16 @@ void draw_battery(int xbase, int ybase, int len, int wid, int percent)
}
/* top batt. edge */
- lcd_drawline(xbase, ybase, xbase+len-2, ybase);
+ lcd_hline(xbase, xbase+len-2, ybase);
/* bot batt. edge */
- lcd_drawline(xbase, ybase+wid,
- xbase+len-2, ybase+wid);
+ lcd_hine(xbase, xbase+len-2, ybase+wid);
/* left batt. edge */
- lcd_drawline(xbase, ybase, xbase, ybase+wid);
+ lcd_vline(xbase, ybase, ybase+wid);
/* right batt. edge */
- lcd_drawline(xbase+len, ybase+1,
- xbase+len, ybase+wid-1);
+ lcd_vline(xbase+len, ybase+1, ybase+wid-1);
/* 2 dots that account for the nub on the right side of the battery */
lcd_drawpixel(xbase+len-1, ybase+1);
@@ -85,8 +83,8 @@ void draw_battery(int xbase, int ybase, int len, int wid, int percent)
bar_len = capacity;
for(i = 0; i < bar_wid+1; i++) {
- lcd_drawline(xbase+bar_xoffset, ybase+bar_yoffset+i,
- xbase+bar_xoffset+bar_len, ybase+bar_yoffset+i);
+ lcd_hline(xbase+bar_xoffset,
+ xbase+bar_xoffset+bar_len, ybase+bar_yoffset+i);
}
}
lcd_update();