diff options
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 dc33446527..c8ee93fef1 100644 --- a/apps/plugins/lib/gray_drawgraymap.c +++ b/apps/plugins/lib/gray_drawgraymap.c | |||
@@ -30,16 +30,16 @@ | |||
30 | #include "gray.h" | 30 | #include "gray.h" |
31 | 31 | ||
32 | /* Prototypes */ | 32 | /* Prototypes */ |
33 | static void _writearray(unsigned char *address, unsigned char *src, int stride, | 33 | static void _writearray(unsigned char *address, const unsigned char *src, |
34 | unsigned mask); | 34 | int stride, unsigned mask); |
35 | 35 | ||
36 | /* Write an 8-pixel block, defined by their brightnesses in a graymap. | 36 | /* Write an 8-pixel block, defined by their brightnesses in a graymap. |
37 | * Address is the byte in the first bitplane, src is the graymap start address, | 37 | * Address is the byte in the first bitplane, src is the graymap start address, |
38 | * stride is the increment for the graymap to get to the next pixel, mask | 38 | * stride is the increment for the graymap to get to the next pixel, mask |
39 | * determines which pixels of the destination block are changed. For "0" bits, | 39 | * determines which pixels of the destination block are changed. For "0" bits, |
40 | * the src address is not incremented! */ | 40 | * the src address is not incremented! */ |
41 | static void _writearray(unsigned char *address, unsigned char *src, int stride, | 41 | static void _writearray(unsigned char *address, const unsigned char *src, |
42 | unsigned mask) | 42 | int stride, unsigned mask) |
43 | { | 43 | { |
44 | unsigned long pat_stack[8]; | 44 | unsigned long pat_stack[8]; |
45 | register unsigned char *end_addr; | 45 | register unsigned char *end_addr; |
@@ -217,12 +217,13 @@ asm ( | |||
217 | 217 | ||
218 | This is the only drawing function NOT using the drawinfo. | 218 | This is the only drawing function NOT using the drawinfo. |
219 | */ | 219 | */ |
220 | void gray_drawgraymap(unsigned char *src, int x, int y, int nx, int ny, | 220 | void gray_drawgraymap(const unsigned char *src, int x, int y, int nx, int ny, |
221 | int stride) | 221 | int stride) |
222 | { | 222 | { |
223 | int shift; | 223 | int shift; |
224 | unsigned mask_top, mask_bottom; | 224 | unsigned mask_top, mask_bottom; |
225 | unsigned char *src_row, *dst, *dst_row; | 225 | const unsigned char *src_row; |
226 | unsigned char *dst, *dst_row; | ||
226 | 227 | ||
227 | if ((unsigned) x >= (unsigned) _graybuf->width | 228 | if ((unsigned) x >= (unsigned) _graybuf->width |
228 | || (unsigned) y >= (unsigned) _graybuf->height) | 229 | || (unsigned) y >= (unsigned) _graybuf->height) |