summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/gray_scroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/gray_scroll.c')
-rw-r--r--apps/plugins/lib/gray_scroll.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/apps/plugins/lib/gray_scroll.c b/apps/plugins/lib/gray_scroll.c
index 8f60e7cef1..b366e8db5d 100644
--- a/apps/plugins/lib/gray_scroll.c
+++ b/apps/plugins/lib/gray_scroll.c
@@ -43,7 +43,7 @@ void gray_scroll_left(int count)
43 return; 43 return;
44 44
45 data = _gray_info.cur_buffer; 45 data = _gray_info.cur_buffer;
46 data_end = data + MULU16(_gray_info.width, _gray_info.height); 46 data_end = data + _GRAY_MULUQ(_gray_info.width, _gray_info.height);
47 length = _gray_info.width - count; 47 length = _gray_info.width - count;
48 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 48 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
49 _gray_info.fg_index : _gray_info.bg_index; 49 _gray_info.fg_index : _gray_info.bg_index;
@@ -67,7 +67,7 @@ void gray_scroll_right(int count)
67 return; 67 return;
68 68
69 data = _gray_info.cur_buffer; 69 data = _gray_info.cur_buffer;
70 data_end = data + MULU16(_gray_info.width, _gray_info.height); 70 data_end = data + _GRAY_MULUQ(_gray_info.width, _gray_info.height);
71 length = _gray_info.width - count; 71 length = _gray_info.width - count;
72 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 72 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
73 _gray_info.fg_index : _gray_info.bg_index; 73 _gray_info.fg_index : _gray_info.bg_index;
@@ -90,8 +90,8 @@ void gray_scroll_up(int count)
90 if ((unsigned)count >= (unsigned)_gray_info.height) 90 if ((unsigned)count >= (unsigned)_gray_info.height)
91 return; 91 return;
92 92
93 shift = MULU16(_gray_info.width, count); 93 shift = _GRAY_MULUQ(_gray_info.width, count);
94 length = MULU16(_gray_info.width, _gray_info.height - count); 94 length = _GRAY_MULUQ(_gray_info.width, _gray_info.height - count);
95 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 95 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
96 _gray_info.fg_index : _gray_info.bg_index; 96 _gray_info.fg_index : _gray_info.bg_index;
97 97
@@ -109,8 +109,8 @@ void gray_scroll_down(int count)
109 if ((unsigned)count >= (unsigned)_gray_info.height) 109 if ((unsigned)count >= (unsigned)_gray_info.height)
110 return; 110 return;
111 111
112 shift = MULU16(_gray_info.width, count); 112 shift = _GRAY_MULUQ(_gray_info.width, count);
113 length = MULU16(_gray_info.width, _gray_info.height - count); 113 length = _GRAY_MULUQ(_gray_info.width, _gray_info.height - count);
114 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 114 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
115 _gray_info.fg_index : _gray_info.bg_index; 115 _gray_info.fg_index : _gray_info.bg_index;
116 116
@@ -130,8 +130,8 @@ void gray_scroll_left(int count)
130 if ((unsigned)count >= (unsigned)_gray_info.width) 130 if ((unsigned)count >= (unsigned)_gray_info.width)
131 return; 131 return;
132 132
133 shift = MULU16(_gray_info.height, count); 133 shift = _GRAY_MULUQ(_gray_info.height, count);
134 length = MULU16(_gray_info.height, _gray_info.width - count); 134 length = _GRAY_MULUQ(_gray_info.height, _gray_info.width - count);
135 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 135 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
136 _gray_info.fg_index : _gray_info.bg_index; 136 _gray_info.fg_index : _gray_info.bg_index;
137 137
@@ -149,8 +149,8 @@ void gray_scroll_right(int count)
149 if ((unsigned)count >= (unsigned)_gray_info.width) 149 if ((unsigned)count >= (unsigned)_gray_info.width)
150 return; 150 return;
151 151
152 shift = MULU16(_gray_info.height, count); 152 shift = _GRAY_MULUQ(_gray_info.height, count);
153 length = MULU16(_gray_info.height, _gray_info.width - count); 153 length = _GRAY_MULUQ(_gray_info.height, _gray_info.width - count);
154 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 154 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
155 _gray_info.fg_index : _gray_info.bg_index; 155 _gray_info.fg_index : _gray_info.bg_index;
156 156
@@ -169,7 +169,7 @@ void gray_scroll_up(int count)
169 return; 169 return;
170 170
171 data = _gray_info.cur_buffer; 171 data = _gray_info.cur_buffer;
172 data_end = data + MULU16(_gray_info.width, _gray_info.height); 172 data_end = data + _GRAY_MULUQ(_gray_info.width, _gray_info.height);
173 length = _gray_info.height - count; 173 length = _gray_info.height - count;
174 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 174 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
175 _gray_info.fg_index : _gray_info.bg_index; 175 _gray_info.fg_index : _gray_info.bg_index;
@@ -193,7 +193,7 @@ void gray_scroll_down(int count)
193 return; 193 return;
194 194
195 data = _gray_info.cur_buffer; 195 data = _gray_info.cur_buffer;
196 data_end = data + MULU16(_gray_info.width, _gray_info.height); 196 data_end = data + _GRAY_MULUQ(_gray_info.width, _gray_info.height);
197 length = _gray_info.height - count; 197 length = _gray_info.height - count;
198 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ? 198 blank = (_gray_info.drawmode & DRMODE_INVERSEVID) ?
199 _gray_info.fg_index : _gray_info.bg_index; 199 _gray_info.fg_index : _gray_info.bg_index;
@@ -267,7 +267,7 @@ void gray_ub_scroll_left(int count)
267 { 267 {
268 unsigned char *ptr_row = ptr; 268 unsigned char *ptr_row = ptr;
269 unsigned char *row_end = ptr_row 269 unsigned char *row_end = ptr_row
270 + MULU16(_gray_info.plane_size, _gray_info.depth); 270 + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
271 do 271 do
272 { 272 {
273 _gray_rb->memmove(ptr_row, ptr_row + shift, length); 273 _gray_rb->memmove(ptr_row, ptr_row + shift, length);
@@ -348,7 +348,7 @@ void gray_ub_scroll_right(int count)
348 { 348 {
349 unsigned char *ptr_row = ptr; 349 unsigned char *ptr_row = ptr;
350 unsigned char *row_end = ptr_row 350 unsigned char *row_end = ptr_row
351 + MULU16(_gray_info.plane_size, _gray_info.depth); 351 + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
352 do 352 do
353 { 353 {
354 _gray_rb->memmove(ptr_row + shift, ptr_row, length); 354 _gray_rb->memmove(ptr_row + shift, ptr_row, length);
@@ -415,7 +415,7 @@ void gray_ub_scroll_up(int count)
415 if ((unsigned) count >= (unsigned) _gray_info.height) 415 if ((unsigned) count >= (unsigned) _gray_info.height)
416 return; 416 return;
417 417
418 blockshift = MULU16(_gray_info.bwidth, count); 418 blockshift = _GRAY_MULUQ(_gray_info.bwidth, count);
419 ptr = _gray_info.plane_data; 419 ptr = _gray_info.plane_data;
420 ptr_end2 = ptr + _gray_info.plane_size; 420 ptr_end2 = ptr + _gray_info.plane_size;
421 ptr_end1 = ptr_end2 - blockshift; 421 ptr_end1 = ptr_end2 - blockshift;
@@ -424,7 +424,7 @@ void gray_ub_scroll_up(int count)
424 { 424 {
425 unsigned char *ptr_row = ptr; 425 unsigned char *ptr_row = ptr;
426 unsigned char *row_end = ptr_row 426 unsigned char *row_end = ptr_row
427 + MULU16(_gray_info.plane_size, _gray_info.depth); 427 + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
428 if (ptr < ptr_end1) 428 if (ptr < ptr_end1)
429 { 429 {
430 do 430 do
@@ -459,7 +459,7 @@ void gray_ub_scroll_down(int count)
459 if ((unsigned) count >= (unsigned) _gray_info.height) 459 if ((unsigned) count >= (unsigned) _gray_info.height)
460 return; 460 return;
461 461
462 blockshift = MULU16(_gray_info.bwidth, count); 462 blockshift = _GRAY_MULUQ(_gray_info.bwidth, count);
463 ptr_end2 = _gray_info.plane_data; 463 ptr_end2 = _gray_info.plane_data;
464 ptr_end1 = ptr_end2 + blockshift; 464 ptr_end1 = ptr_end2 + blockshift;
465 ptr = ptr_end2 + _gray_info.plane_size; 465 ptr = ptr_end2 + _gray_info.plane_size;
@@ -470,7 +470,7 @@ void gray_ub_scroll_down(int count)
470 470
471 ptr -= _gray_info.bwidth; 471 ptr -= _gray_info.bwidth;
472 ptr_row = ptr; 472 ptr_row = ptr;
473 row_end = ptr_row + MULU16(_gray_info.plane_size, _gray_info.depth); 473 row_end = ptr_row + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
474 474
475 if (ptr >= ptr_end1) 475 if (ptr >= ptr_end1)
476 { 476 {
@@ -514,7 +514,7 @@ void gray_ub_scroll_left(int count)
514 { 514 {
515 unsigned char *ptr_row = ptr; 515 unsigned char *ptr_row = ptr;
516 unsigned char *row_end = ptr_row 516 unsigned char *row_end = ptr_row
517 + MULU16(_gray_info.plane_size, _gray_info.depth); 517 + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
518 do 518 do
519 { 519 {
520 _gray_rb->memmove(ptr_row, ptr_row + count, length); 520 _gray_rb->memmove(ptr_row, ptr_row + count, length);
@@ -546,7 +546,7 @@ void gray_ub_scroll_right(int count)
546 { 546 {
547 unsigned char *ptr_row = ptr; 547 unsigned char *ptr_row = ptr;
548 unsigned char *row_end = ptr_row 548 unsigned char *row_end = ptr_row
549 + MULU16(_gray_info.plane_size, _gray_info.depth); 549 + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
550 do 550 do
551 { 551 {
552 _gray_rb->memmove(ptr_row + count, ptr_row, length); 552 _gray_rb->memmove(ptr_row + count, ptr_row, length);
@@ -575,7 +575,7 @@ void gray_ub_scroll_up(int count)
575 575
576 if (shift) 576 if (shift)
577 { 577 {
578 blockshift = MULU16(_gray_info.width, shift); 578 blockshift = _GRAY_MULUQ(_gray_info.width, shift);
579 ptr = _gray_info.plane_data; 579 ptr = _gray_info.plane_data;
580 ptr_end2 = ptr + _gray_info.plane_size; 580 ptr_end2 = ptr + _gray_info.plane_size;
581 ptr_end1 = ptr_end2 - blockshift; 581 ptr_end1 = ptr_end2 - blockshift;
@@ -584,7 +584,7 @@ void gray_ub_scroll_up(int count)
584 { 584 {
585 unsigned char *ptr_row = ptr; 585 unsigned char *ptr_row = ptr;
586 unsigned char *row_end = ptr_row 586 unsigned char *row_end = ptr_row
587 + MULU16(_gray_info.plane_size, _gray_info.depth); 587 + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
588 if (ptr < ptr_end1) 588 if (ptr < ptr_end1)
589 { 589 {
590 do 590 do
@@ -758,7 +758,7 @@ void gray_ub_scroll_down(int count)
758 758
759 if (shift) 759 if (shift)
760 { 760 {
761 blockshift = MULU16(_gray_info.width, shift); 761 blockshift = _GRAY_MULUQ(_gray_info.width, shift);
762 ptr_end2 = _gray_info.plane_data; 762 ptr_end2 = _gray_info.plane_data;
763 ptr_end1 = ptr_end2 + blockshift; 763 ptr_end1 = ptr_end2 + blockshift;
764 ptr = ptr_end2 + _gray_info.plane_size; 764 ptr = ptr_end2 + _gray_info.plane_size;
@@ -769,7 +769,7 @@ void gray_ub_scroll_down(int count)
769 769
770 ptr -= _gray_info.width; 770 ptr -= _gray_info.width;
771 ptr_row = ptr; 771 ptr_row = ptr;
772 row_end = ptr_row + MULU16(_gray_info.plane_size, _gray_info.depth); 772 row_end = ptr_row + _GRAY_MULUQ(_gray_info.plane_size, _gray_info.depth);
773 773
774 if (ptr >= ptr_end1) 774 if (ptr >= ptr_end1)
775 { 775 {