diff options
Diffstat (limited to 'apps/plugins/lib/xlcd_scroll.c')
-rw-r--r-- | apps/plugins/lib/xlcd_scroll.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/apps/plugins/lib/xlcd_scroll.c b/apps/plugins/lib/xlcd_scroll.c index e0fead71be..ab9ee1c4cb 100644 --- a/apps/plugins/lib/xlcd_scroll.c +++ b/apps/plugins/lib/xlcd_scroll.c | |||
@@ -43,7 +43,7 @@ void xlcd_scroll_left(int count) | |||
43 | 43 | ||
44 | length = (LCD_WIDTH-count)*LCD_FBHEIGHT; | 44 | length = (LCD_WIDTH-count)*LCD_FBHEIGHT; |
45 | 45 | ||
46 | rb->memmove(rb->lcd_framebuffer, rb->lcd_framebuffer + LCD_HEIGHT*count, | 46 | rb->memmove(*rb->lcd_framebuffer, *rb->lcd_framebuffer + LCD_HEIGHT*count, |
47 | length * sizeof(fb_data)); | 47 | length * sizeof(fb_data)); |
48 | 48 | ||
49 | oldmode = rb->lcd_get_drawmode(); | 49 | oldmode = rb->lcd_get_drawmode(); |
@@ -65,8 +65,8 @@ void xlcd_scroll_right(int count) | |||
65 | 65 | ||
66 | length = (LCD_WIDTH-count)*LCD_FBHEIGHT; | 66 | length = (LCD_WIDTH-count)*LCD_FBHEIGHT; |
67 | 67 | ||
68 | rb->memmove(rb->lcd_framebuffer + LCD_HEIGHT*count, | 68 | rb->memmove(*rb->lcd_framebuffer + LCD_HEIGHT*count, |
69 | rb->lcd_framebuffer, length * sizeof(fb_data)); | 69 | *rb->lcd_framebuffer, length * sizeof(fb_data)); |
70 | 70 | ||
71 | oldmode = rb->lcd_get_drawmode(); | 71 | oldmode = rb->lcd_get_drawmode(); |
72 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 72 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
@@ -90,7 +90,7 @@ void xlcd_scroll_up(int count) | |||
90 | length = LCD_HEIGHT - count; | 90 | length = LCD_HEIGHT - count; |
91 | 91 | ||
92 | width = LCD_WIDTH-1; | 92 | width = LCD_WIDTH-1; |
93 | data = rb->lcd_framebuffer; | 93 | data = *rb->lcd_framebuffer; |
94 | 94 | ||
95 | do { | 95 | do { |
96 | rb->memmove(data,data + count,length * sizeof(fb_data)); | 96 | rb->memmove(data,data + count,length * sizeof(fb_data)); |
@@ -119,7 +119,7 @@ void xlcd_scroll_down(int count) | |||
119 | length = LCD_HEIGHT - count; | 119 | length = LCD_HEIGHT - count; |
120 | 120 | ||
121 | width = LCD_WIDTH-1; | 121 | width = LCD_WIDTH-1; |
122 | data = rb->lcd_framebuffer; | 122 | data = *rb->lcd_framebuffer; |
123 | 123 | ||
124 | do { | 124 | do { |
125 | rb->memmove(data + count, data, length * sizeof(fb_data)); | 125 | rb->memmove(data + count, data, length * sizeof(fb_data)); |
@@ -155,7 +155,7 @@ void xlcd_scroll_left(int count) | |||
155 | 155 | ||
156 | if (blockcount) | 156 | if (blockcount) |
157 | { | 157 | { |
158 | unsigned char *data = rb->lcd_framebuffer; | 158 | unsigned char *data = *rb->lcd_framebuffer; |
159 | unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT; | 159 | unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT; |
160 | 160 | ||
161 | do | 161 | do |
@@ -168,7 +168,7 @@ void xlcd_scroll_left(int count) | |||
168 | if (bitcount) | 168 | if (bitcount) |
169 | { | 169 | { |
170 | int bx, y; | 170 | int bx, y; |
171 | unsigned char *addr = rb->lcd_framebuffer + blocklen; | 171 | unsigned char *addr = *rb->lcd_framebuffer + blocklen; |
172 | #if LCD_DEPTH == 2 | 172 | #if LCD_DEPTH == 2 |
173 | unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount; | 173 | unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount; |
174 | #endif | 174 | #endif |
@@ -213,7 +213,7 @@ void xlcd_scroll_right(int count) | |||
213 | 213 | ||
214 | if (blockcount) | 214 | if (blockcount) |
215 | { | 215 | { |
216 | unsigned char *data = rb->lcd_framebuffer; | 216 | unsigned char *data = *rb->lcd_framebuffer; |
217 | unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT; | 217 | unsigned char *data_end = data + LCD_FBWIDTH*LCD_HEIGHT; |
218 | 218 | ||
219 | do | 219 | do |
@@ -226,7 +226,7 @@ void xlcd_scroll_right(int count) | |||
226 | if (bitcount) | 226 | if (bitcount) |
227 | { | 227 | { |
228 | int bx, y; | 228 | int bx, y; |
229 | unsigned char *addr = rb->lcd_framebuffer + blockcount; | 229 | unsigned char *addr = *rb->lcd_framebuffer + blockcount; |
230 | #if LCD_DEPTH == 2 | 230 | #if LCD_DEPTH == 2 |
231 | unsigned fill = 0x55 * (~rb->lcd_get_background() & 3); | 231 | unsigned fill = 0x55 * (~rb->lcd_get_background() & 3); |
232 | #endif | 232 | #endif |
@@ -265,7 +265,7 @@ void xlcd_scroll_left(int count) | |||
265 | return; | 265 | return; |
266 | } | 266 | } |
267 | 267 | ||
268 | data = rb->lcd_framebuffer; | 268 | data = *rb->lcd_framebuffer; |
269 | data_end = data + LCD_WIDTH*LCD_FBHEIGHT; | 269 | data_end = data + LCD_WIDTH*LCD_FBHEIGHT; |
270 | length = LCD_WIDTH - count; | 270 | length = LCD_WIDTH - count; |
271 | 271 | ||
@@ -294,7 +294,7 @@ void xlcd_scroll_right(int count) | |||
294 | return; | 294 | return; |
295 | } | 295 | } |
296 | 296 | ||
297 | data = rb->lcd_framebuffer; | 297 | data = *rb->lcd_framebuffer; |
298 | data_end = data + LCD_WIDTH*LCD_FBHEIGHT; | 298 | data_end = data + LCD_WIDTH*LCD_FBHEIGHT; |
299 | length = LCD_WIDTH - count; | 299 | length = LCD_WIDTH - count; |
300 | 300 | ||
@@ -328,8 +328,8 @@ void xlcd_scroll_up(int count) | |||
328 | 328 | ||
329 | length = LCD_HEIGHT - count; | 329 | length = LCD_HEIGHT - count; |
330 | 330 | ||
331 | rb->memmove(rb->lcd_framebuffer, | 331 | rb->memmove(*rb->lcd_framebuffer, |
332 | rb->lcd_framebuffer + count * LCD_FBWIDTH, | 332 | *rb->lcd_framebuffer + count * LCD_FBWIDTH, |
333 | length * LCD_FBWIDTH * sizeof(fb_data)); | 333 | length * LCD_FBWIDTH * sizeof(fb_data)); |
334 | 334 | ||
335 | oldmode = rb->lcd_get_drawmode(); | 335 | oldmode = rb->lcd_get_drawmode(); |
@@ -351,8 +351,8 @@ void xlcd_scroll_down(int count) | |||
351 | 351 | ||
352 | length = LCD_HEIGHT - count; | 352 | length = LCD_HEIGHT - count; |
353 | 353 | ||
354 | rb->memmove(rb->lcd_framebuffer + count * LCD_FBWIDTH, | 354 | rb->memmove(*rb->lcd_framebuffer + count * LCD_FBWIDTH, |
355 | rb->lcd_framebuffer, | 355 | *rb->lcd_framebuffer, |
356 | length * LCD_FBWIDTH * sizeof(fb_data)); | 356 | length * LCD_FBWIDTH * sizeof(fb_data)); |
357 | 357 | ||
358 | oldmode = rb->lcd_get_drawmode(); | 358 | oldmode = rb->lcd_get_drawmode(); |
@@ -388,8 +388,8 @@ void xlcd_scroll_up(int count) | |||
388 | 388 | ||
389 | if (blockcount) | 389 | if (blockcount) |
390 | { | 390 | { |
391 | rb->memmove(rb->lcd_framebuffer, | 391 | rb->memmove(*rb->lcd_framebuffer, |
392 | rb->lcd_framebuffer + blockcount * LCD_FBWIDTH, | 392 | *rb->lcd_framebuffer + blockcount * LCD_FBWIDTH, |
393 | blocklen * LCD_FBWIDTH * sizeof(fb_data)); | 393 | blocklen * LCD_FBWIDTH * sizeof(fb_data)); |
394 | } | 394 | } |
395 | if (bitcount) | 395 | if (bitcount) |
@@ -424,7 +424,7 @@ void xlcd_scroll_up(int count) | |||
424 | : /* inputs */ | 424 | : /* inputs */ |
425 | [wide]"r"(LCD_FBWIDTH), | 425 | [wide]"r"(LCD_FBWIDTH), |
426 | [rows]"r"(blocklen), | 426 | [rows]"r"(blocklen), |
427 | [addr]"a"(rb->lcd_framebuffer + blocklen * LCD_FBWIDTH), | 427 | [addr]"a"(*rb->lcd_framebuffer + blocklen * LCD_FBWIDTH), |
428 | [cnt] "d"(bitcount), | 428 | [cnt] "d"(bitcount), |
429 | [bkg] "d"(0x55 * (~rb->lcd_get_background() & 3)) | 429 | [bkg] "d"(0x55 * (~rb->lcd_get_background() & 3)) |
430 | : /* clobbers */ | 430 | : /* clobbers */ |
@@ -432,7 +432,7 @@ void xlcd_scroll_up(int count) | |||
432 | ); | 432 | ); |
433 | #else /* C version */ | 433 | #else /* C version */ |
434 | int x, by; | 434 | int x, by; |
435 | unsigned char *addr = rb->lcd_framebuffer + blocklen * LCD_FBWIDTH; | 435 | unsigned char *addr = *rb->lcd_framebuffer + blocklen * LCD_FBWIDTH; |
436 | #if LCD_DEPTH == 2 | 436 | #if LCD_DEPTH == 2 |
437 | unsigned fill = 0x55 * (~rb->lcd_get_background() & 3); | 437 | unsigned fill = 0x55 * (~rb->lcd_get_background() & 3); |
438 | #else | 438 | #else |
@@ -457,7 +457,7 @@ void xlcd_scroll_up(int count) | |||
457 | 457 | ||
458 | #if LCD_DEPTH == 2 | 458 | #if LCD_DEPTH == 2 |
459 | int x, by; | 459 | int x, by; |
460 | fb_data *addr = rb->lcd_framebuffer + blocklen * LCD_FBWIDTH; | 460 | fb_data *addr = *rb->lcd_framebuffer + blocklen * LCD_FBWIDTH; |
461 | unsigned fill, mask; | 461 | unsigned fill, mask; |
462 | 462 | ||
463 | fill = patterns[rb->lcd_get_background() & 3] << 8; | 463 | fill = patterns[rb->lcd_get_background() & 3] << 8; |
@@ -512,8 +512,8 @@ void xlcd_scroll_down(int count) | |||
512 | 512 | ||
513 | if (blockcount) | 513 | if (blockcount) |
514 | { | 514 | { |
515 | rb->memmove(rb->lcd_framebuffer + blockcount * LCD_FBWIDTH, | 515 | rb->memmove(*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH, |
516 | rb->lcd_framebuffer, | 516 | *rb->lcd_framebuffer, |
517 | blocklen * LCD_FBWIDTH * sizeof(fb_data)); | 517 | blocklen * LCD_FBWIDTH * sizeof(fb_data)); |
518 | } | 518 | } |
519 | if (bitcount) | 519 | if (bitcount) |
@@ -548,7 +548,7 @@ void xlcd_scroll_down(int count) | |||
548 | : /* inputs */ | 548 | : /* inputs */ |
549 | [wide]"r"(LCD_WIDTH), | 549 | [wide]"r"(LCD_WIDTH), |
550 | [rows]"r"(blocklen), | 550 | [rows]"r"(blocklen), |
551 | [addr]"a"(rb->lcd_framebuffer + blockcount * LCD_FBWIDTH), | 551 | [addr]"a"(*rb->lcd_framebuffer + blockcount * LCD_FBWIDTH), |
552 | [cnt] "d"(bitcount), | 552 | [cnt] "d"(bitcount), |
553 | [bkg] "d"((0x55 * (~rb->lcd_get_background() & 3)) << bitcount) | 553 | [bkg] "d"((0x55 * (~rb->lcd_get_background() & 3)) << bitcount) |
554 | : /* clobbers */ | 554 | : /* clobbers */ |
@@ -556,7 +556,7 @@ void xlcd_scroll_down(int count) | |||
556 | ); | 556 | ); |
557 | #else /* C version */ | 557 | #else /* C version */ |
558 | int x, by; | 558 | int x, by; |
559 | unsigned char *addr = rb->lcd_framebuffer + blockcount * LCD_FBWIDTH; | 559 | unsigned char *addr = *rb->lcd_framebuffer + blockcount * LCD_FBWIDTH; |
560 | #if LCD_DEPTH == 2 | 560 | #if LCD_DEPTH == 2 |
561 | unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount; | 561 | unsigned fill = (0x55 * (~rb->lcd_get_background() & 3)) << bitcount; |
562 | #else | 562 | #else |
@@ -581,7 +581,7 @@ void xlcd_scroll_down(int count) | |||
581 | 581 | ||
582 | #if LCD_DEPTH == 2 | 582 | #if LCD_DEPTH == 2 |
583 | int x, by; | 583 | int x, by; |
584 | fb_data *addr = rb->lcd_framebuffer + blockcount * LCD_FBWIDTH; | 584 | fb_data *addr = *rb->lcd_framebuffer + blockcount * LCD_FBWIDTH; |
585 | unsigned fill, mask; | 585 | unsigned fill, mask; |
586 | 586 | ||
587 | fill = patterns[rb->lcd_get_background() & 3] >> (8 - bitcount); | 587 | fill = patterns[rb->lcd_get_background() & 3] >> (8 - bitcount); |