diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2004-08-03 20:57:06 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2004-08-03 20:57:06 +0000 |
| commit | 85890b88df7d4cc315167409e6364418e5348324 (patch) | |
| tree | 636e2874c66355db15f2ef45231294ed504e039f /apps/plugins/lib/gray_drawgraymap.c | |
| parent | 0830339e2f5831575879a6194d43d2e958d8cf64 (diff) | |
| download | rockbox-85890b88df7d4cc315167409e6364418e5348324.zip rockbox-85890b88df7d4cc315167409e6364418e5348324.tar.gz rockbox-85890b88df7d4cc315167409e6364418e5348324.tar.bz2 rockbox-85890b88df7d4cc315167409e6364418e5348324.tar.xz | |
Const policed the grayscale lib & plugin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4985 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lib/gray_drawgraymap.c')
| -rw-r--r-- | apps/plugins/lib/gray_drawgraymap.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/plugins/lib/gray_drawgraymap.c b/apps/plugins/lib/gray_drawgraymap.c index dc33446..c8ee93f 100644 --- a/apps/plugins/lib/gray_drawgraymap.c +++ b/apps/plugins/lib/gray_drawgraymap.c @@ -30,16 +30,16 @@ #include "gray.h" /* Prototypes */ -static void _writearray(unsigned char *address, unsigned char *src, int stride, - unsigned mask); +static void _writearray(unsigned char *address, const unsigned char *src, + int stride, unsigned mask); /* Write an 8-pixel block, defined by their brightnesses in a graymap. * Address is the byte in the first bitplane, src is the graymap start address, * stride is the increment for the graymap to get to the next pixel, mask * determines which pixels of the destination block are changed. For "0" bits, * the src address is not incremented! */ -static void _writearray(unsigned char *address, unsigned char *src, int stride, - unsigned mask) +static void _writearray(unsigned char *address, const unsigned char *src, + int stride, unsigned mask) { unsigned long pat_stack[8]; register unsigned char *end_addr; @@ -217,12 +217,13 @@ asm ( This is the only drawing function NOT using the drawinfo. */ -void gray_drawgraymap(unsigned char *src, int x, int y, int nx, int ny, +void gray_drawgraymap(const unsigned char *src, int x, int y, int nx, int ny, int stride) { int shift; unsigned mask_top, mask_bottom; - unsigned char *src_row, *dst, *dst_row; + const unsigned char *src_row; + unsigned char *dst, *dst_row; if ((unsigned) x >= (unsigned) _graybuf->width || (unsigned) y >= (unsigned) _graybuf->height) |