diff options
author | William Wilgus <wilgus.william@gmail.com> | 2020-10-26 12:38:22 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2020-10-26 12:38:22 -0400 |
commit | 40e98a2e4915464b9306ab7b0f6feb173de095c5 (patch) | |
tree | 4e987640ae4ad201f029c4e26e51ebc61a4549b1 /apps/plugins/lib | |
parent | 3237ae4a4ff9296a377ff9194a11038da161208f (diff) | |
download | rockbox-40e98a2e4915464b9306ab7b0f6feb173de095c5.tar.gz rockbox-40e98a2e4915464b9306ab7b0f6feb173de095c5.zip |
Whitespace cleanup on fb_viewport Rewrite
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r-- | apps/plugins/lib/xlcd_draw.c | 8 | ||||
-rw-r--r-- | apps/plugins/lib/xlcd_scroll.c | 20 |
2 files changed, 14 insertions, 14 deletions
diff --git a/apps/plugins/lib/xlcd_draw.c b/apps/plugins/lib/xlcd_draw.c index 0bd1c7a9e2..debdff6f04 100644 --- a/apps/plugins/lib/xlcd_draw.c +++ b/apps/plugins/lib/xlcd_draw.c | |||
@@ -356,10 +356,10 @@ void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
356 | fb_data *dst; | 356 | fb_data *dst; |
357 | 357 | ||
358 | /* nothing to draw? */ | 358 | /* nothing to draw? */ |
359 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | 359 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) |
360 | || (x + width <= 0) || (y + height <= 0)) | 360 | || (x + width <= 0) || (y + height <= 0)) |
361 | return; | 361 | return; |
362 | 362 | ||
363 | /* clipping */ | 363 | /* clipping */ |
364 | if (x < 0) | 364 | if (x < 0) |
365 | { | 365 | { |
@@ -426,10 +426,10 @@ void xlcd_color_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
426 | fb_data *dst; | 426 | fb_data *dst; |
427 | 427 | ||
428 | /* nothing to draw? */ | 428 | /* nothing to draw? */ |
429 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) | 429 | if ((width <= 0) || (height <= 0) || (x >= LCD_WIDTH) || (y >= LCD_HEIGHT) |
430 | || (x + width <= 0) || (y + height <= 0)) | 430 | || (x + width <= 0) || (y + height <= 0)) |
431 | return; | 431 | return; |
432 | 432 | ||
433 | /* clipping */ | 433 | /* clipping */ |
434 | if (x < 0) | 434 | if (x < 0) |
435 | { | 435 | { |
diff --git a/apps/plugins/lib/xlcd_scroll.c b/apps/plugins/lib/xlcd_scroll.c index 89427b6118..5ac4a366e8 100644 --- a/apps/plugins/lib/xlcd_scroll.c +++ b/apps/plugins/lib/xlcd_scroll.c | |||
@@ -74,7 +74,7 @@ void xlcd_scroll_right(int count) | |||
74 | 74 | ||
75 | length = (LCD_WIDTH-count)*LCD_FBHEIGHT; | 75 | length = (LCD_WIDTH-count)*LCD_FBHEIGHT; |
76 | 76 | ||
77 | rb->memmove(lcd_fb + LCD_HEIGHT*count, | 77 | rb->memmove(lcd_fb + LCD_HEIGHT*count, |
78 | lcd_fb, length * sizeof(fb_data)); | 78 | lcd_fb, length * sizeof(fb_data)); |
79 | 79 | ||
80 | oldmode = rb->lcd_get_drawmode(); | 80 | oldmode = rb->lcd_get_drawmode(); |
@@ -92,7 +92,7 @@ void xlcd_scroll_up(int count) | |||
92 | 92 | ||
93 | 93 | ||
94 | int width, length, oldmode; | 94 | int width, length, oldmode; |
95 | 95 | ||
96 | fb_data *data; | 96 | fb_data *data; |
97 | 97 | ||
98 | if ((unsigned)count >= LCD_HEIGHT) | 98 | if ((unsigned)count >= LCD_HEIGHT) |
@@ -102,10 +102,10 @@ void xlcd_scroll_up(int count) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | length = LCD_HEIGHT - count; | 104 | length = LCD_HEIGHT - count; |
105 | 105 | ||
106 | width = LCD_WIDTH-1; | 106 | width = LCD_WIDTH-1; |
107 | data = lcd_fb; | 107 | data = lcd_fb; |
108 | 108 | ||
109 | do { | 109 | do { |
110 | rb->memmove(data,data + count,length * sizeof(fb_data)); | 110 | rb->memmove(data,data + count,length * sizeof(fb_data)); |
111 | data += LCD_HEIGHT; | 111 | data += LCD_HEIGHT; |
@@ -126,7 +126,7 @@ void xlcd_scroll_down(int count) | |||
126 | 126 | ||
127 | 127 | ||
128 | int width, length, oldmode; | 128 | int width, length, oldmode; |
129 | 129 | ||
130 | fb_data *data; | 130 | fb_data *data; |
131 | 131 | ||
132 | if ((unsigned)count >= LCD_HEIGHT) | 132 | if ((unsigned)count >= LCD_HEIGHT) |
@@ -139,7 +139,7 @@ void xlcd_scroll_down(int count) | |||
139 | 139 | ||
140 | width = LCD_WIDTH-1; | 140 | width = LCD_WIDTH-1; |
141 | data = lcd_fb; | 141 | data = lcd_fb; |
142 | 142 | ||
143 | do { | 143 | do { |
144 | rb->memmove(data + count, data, length * sizeof(fb_data)); | 144 | rb->memmove(data + count, data, length * sizeof(fb_data)); |
145 | data += LCD_HEIGHT; | 145 | data += LCD_HEIGHT; |
@@ -408,7 +408,7 @@ void xlcd_scroll_down(int count) | |||
408 | rb->lcd_set_drawmode(oldmode); | 408 | rb->lcd_set_drawmode(oldmode); |
409 | } | 409 | } |
410 | 410 | ||
411 | #else /* LCD_PIXELFORMAT == VERTICAL_PACKING, | 411 | #else /* LCD_PIXELFORMAT == VERTICAL_PACKING, |
412 | LCD_PIXELFORMAT == VERTICAL_INTERLEAVED */ | 412 | LCD_PIXELFORMAT == VERTICAL_INTERLEAVED */ |
413 | 413 | ||
414 | /* Scroll up */ | 414 | /* Scroll up */ |
@@ -426,7 +426,7 @@ void xlcd_scroll_up(int count) | |||
426 | rb->lcd_clear_display(); | 426 | rb->lcd_clear_display(); |
427 | return; | 427 | return; |
428 | } | 428 | } |
429 | 429 | ||
430 | #if (LCD_DEPTH == 1) \ | 430 | #if (LCD_DEPTH == 1) \ |
431 | || (LCD_DEPTH == 2) && (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | 431 | || (LCD_DEPTH == 2) && (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) |
432 | blockcount = count >> 3; | 432 | blockcount = count >> 3; |
@@ -554,7 +554,7 @@ void xlcd_scroll_down(int count) | |||
554 | rb->lcd_clear_display(); | 554 | rb->lcd_clear_display(); |
555 | return; | 555 | return; |
556 | } | 556 | } |
557 | 557 | ||
558 | #if (LCD_DEPTH == 1) \ | 558 | #if (LCD_DEPTH == 1) \ |
559 | || (LCD_DEPTH == 2) && (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | 559 | || (LCD_DEPTH == 2) && (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) |
560 | blockcount = count >> 3; | 560 | blockcount = count >> 3; |
@@ -638,7 +638,7 @@ void xlcd_scroll_down(int count) | |||
638 | int x, by; | 638 | int x, by; |
639 | fb_data *addr = lcd_fb + blockcount * LCD_FBWIDTH; | 639 | fb_data *addr = lcd_fb + blockcount * LCD_FBWIDTH; |
640 | unsigned fill, mask; | 640 | unsigned fill, mask; |
641 | 641 | ||
642 | fill = patterns[rb->lcd_get_background() & 3] >> (8 - bitcount); | 642 | fill = patterns[rb->lcd_get_background() & 3] >> (8 - bitcount); |
643 | mask = (0xFFu >> bitcount) << bitcount; | 643 | mask = (0xFFu >> bitcount) << bitcount; |
644 | mask |= mask << 8; | 644 | mask |= mask << 8; |