summaryrefslogtreecommitdiff
path: root/apps/plugins/plasma.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-01-04 23:42:38 +0000
committerJens Arnold <amiconn@rockbox.org>2008-01-04 23:42:38 +0000
commitfeb5b15e9bf9292e3d4d82ea1e01ab3557fb1240 (patch)
treed854c9a6fbbb3263537071fb02df349fdfa62361 /apps/plugins/plasma.c
parentd3586837fa9221a7ef104550b4c0aadc1a6ea77c (diff)
downloadrockbox-feb5b15e9bf9292e3d4d82ea1e01ab3557fb1240.zip
rockbox-feb5b15e9bf9292e3d4d82ea1e01ab3557fb1240.tar.gz
rockbox-feb5b15e9bf9292e3d4d82ea1e01ab3557fb1240.tar.bz2
rockbox-feb5b15e9bf9292e3d4d82ea1e01ab3557fb1240.tar.xz
All-new greyscale library, replacing the old one. Features: (1) Drawing/updating is faster than the old grayscale lib at full depth. (2) Always 129 shades instead of 2..33 shades. (3) No graininess caused by frequent updates (mpegplayer, doom, ...). (4) Needs less memory than the old grayscale lib at full depth. * The tradeoff is slightly higher CPU load in the ISR (frames are calculated 'live') and an extra function in the core. * Ported all plugins which used the graylib to use the new one. * Some slight optimisations for archos and H1x0 LCD update.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15998 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/plasma.c')
-rw-r--r--apps/plugins/plasma.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c
index 76c5412..4f5fc39 100644
--- a/apps/plugins/plasma.c
+++ b/apps/plugins/plasma.c
@@ -28,7 +28,7 @@
#ifdef HAVE_LCD_BITMAP
#ifndef HAVE_LCD_COLOR
-#include "gray.h"
+#include "grey.h"
#endif
#include "fixedpoint.h"
@@ -45,7 +45,7 @@ static int redphase = 0, greenphase = 50, bluephase = 100;
/* lower chance of gray at regular intervals */
#else
static unsigned char colours[256]; /* Smooth transition of shades */
-static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */
+static unsigned char greybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */
static unsigned char *gbuf;
static size_t gbuf_size = 0;
#endif
@@ -171,7 +171,7 @@ void cleanup(void *parameter)
(void)parameter;
#ifndef HAVE_LCD_COLOR
- gray_release();
+ grey_release();
#endif
/* Turn on backlight timeout (revert to settings) */
backlight_use_settings(rb); /* backlight control in lib/helper.c */
@@ -203,9 +203,9 @@ int main(void)
/* get the remainder of the plugin buffer */
gbuf = (unsigned char *) rb->plugin_get_buffer(&gbuf_size);
- gray_init(rb, gbuf, gbuf_size, false, LCD_WIDTH, LCD_HEIGHT, 32, 2<<8, NULL);
- /* switch on grayscale overlay */
- gray_show(true);
+ grey_init(rb, gbuf, gbuf_size, false, LCD_WIDTH, LCD_HEIGHT, NULL);
+ /* switch on greyscale overlay */
+ grey_show(true);
#endif
sp1 = 4;
sp2 = 2;
@@ -218,7 +218,7 @@ int main(void)
shades_generate(time++); /* dynamically */
ptr = rb->lcd_framebuffer;
#else
- ptr = graybuffer;
+ ptr = greybuffer;
#endif
t1=p1;
t2=p2;
@@ -245,7 +245,7 @@ int main(void)
#ifdef HAVE_LCD_COLOR
rb->lcd_update();
#else
- gray_ub_gray_bitmap(graybuffer, 0, 0, LCD_WIDTH, LCD_HEIGHT);
+ grey_ub_gray_bitmap(greybuffer, 0, 0, LCD_WIDTH, LCD_HEIGHT);
#endif
button = rb->button_get(false);