summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-1bit-vert.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-1bit-vert.c')
-rw-r--r--firmware/drivers/lcd-1bit-vert.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c
index dcf5e49504..ff95eacdbc 100644
--- a/firmware/drivers/lcd-1bit-vert.c
+++ b/firmware/drivers/lcd-1bit-vert.c
@@ -274,10 +274,6 @@ void LCDFN(drawpixel)(int x, int y)
274{ 274{
275 if ( ((unsigned)x < (unsigned)CURRENT_VP->width) 275 if ( ((unsigned)x < (unsigned)CURRENT_VP->width)
276 && ((unsigned)y < (unsigned)CURRENT_VP->height) 276 && ((unsigned)y < (unsigned)CURRENT_VP->height)
277#if defined(HAVE_VIEWPORT_CLIP)
278 && ((unsigned)x < (unsigned)LCDM(WIDTH))
279 && ((unsigned)y < (unsigned)LCDM(HEIGHT))
280#endif
281 ) 277 )
282 LCDFN(pixelfuncs)[CURRENT_VP->drawmode](CURRENT_VP->x + x, CURRENT_VP->y + y); 278 LCDFN(pixelfuncs)[CURRENT_VP->drawmode](CURRENT_VP->x + x, CURRENT_VP->y + y);
283} 279}
@@ -349,10 +345,6 @@ void LCDFN(drawline)(int x1, int y1, int x2, int y2)
349 { 345 {
350 if ( ((unsigned)x < (unsigned)CURRENT_VP->width) 346 if ( ((unsigned)x < (unsigned)CURRENT_VP->width)
351 && ((unsigned)y < (unsigned)CURRENT_VP->height) 347 && ((unsigned)y < (unsigned)CURRENT_VP->height)
352#if defined(HAVE_VIEWPORT_CLIP)
353 && ((unsigned)x < (unsigned)LCDM(WIDTH))
354 && ((unsigned)y < (unsigned)LCDM(HEIGHT))
355#endif
356 ) 348 )
357 pfunc(CURRENT_VP->x + x, CURRENT_VP->y + y); 349 pfunc(CURRENT_VP->x + x, CURRENT_VP->y + y);
358 350
@@ -403,20 +395,6 @@ void LCDFN(hline)(int x1, int x2, int y)
403 x2 += CURRENT_VP->x; 395 x2 += CURRENT_VP->x;
404 y += CURRENT_VP->y; 396 y += CURRENT_VP->y;
405 397
406#if defined(HAVE_VIEWPORT_CLIP)
407 /********************* Viewport on screen clipping ********************/
408 /* nothing to draw? */
409 if (((unsigned)y >= (unsigned) LCDM(HEIGHT)) || (x1 >= LCDM(WIDTH))
410 || (x2 < 0))
411 return;
412
413 /* clipping */
414 if (x1 < 0)
415 x1 = 0;
416 if (x2 >= LCDM(WIDTH))
417 x2 = LCDM(WIDTH)-1;
418#endif
419
420 width = x2 - x1 + 1; 398 width = x2 - x1 + 1;
421 399
422 bfunc = LCDFN(blockfuncs)[CURRENT_VP->drawmode]; 400 bfunc = LCDFN(blockfuncs)[CURRENT_VP->drawmode];
@@ -462,20 +440,6 @@ void LCDFN(vline)(int x, int y1, int y2)
462 y2 += CURRENT_VP->y; 440 y2 += CURRENT_VP->y;
463 x += CURRENT_VP->x; 441 x += CURRENT_VP->x;
464 442
465#if defined(HAVE_VIEWPORT_CLIP)
466 /********************* Viewport on screen clipping ********************/
467 /* nothing to draw? */
468 if (( (unsigned) x >= (unsigned)LCDM(WIDTH)) || (y1 >= LCDM(HEIGHT))
469 || (y2 < 0))
470 return;
471
472 /* clipping */
473 if (y1 < 0)
474 y1 = 0;
475 if (y2 >= LCDM(HEIGHT))
476 y2 = LCDM(HEIGHT)-1;
477#endif
478
479 bfunc = LCDFN(blockfuncs)[CURRENT_VP->drawmode]; 443 bfunc = LCDFN(blockfuncs)[CURRENT_VP->drawmode];
480 dst = LCDFB(x,y1>>3); 444 dst = LCDFB(x,y1>>3);
481 ny = y2 - (y1 & ~7); 445 ny = y2 - (y1 & ~7);
@@ -544,30 +508,6 @@ void LCDFN(fillrect)(int x, int y, int width, int height)
544 x += CURRENT_VP->x; 508 x += CURRENT_VP->x;
545 y += CURRENT_VP->y; 509 y += CURRENT_VP->y;
546 510
547#if defined(HAVE_VIEWPORT_CLIP)
548 /********************* Viewport on screen clipping ********************/
549 /* nothing to draw? */
550 if ((x >= LCDM(WIDTH)) || (y >= LCDM(HEIGHT))
551 || (x + width <= 0) || (y + height <= 0))
552 return;
553
554 /* clip image in viewport in screen */
555 if (x < 0)
556 {
557 width += x;
558 x = 0;
559 }
560 if (y < 0)
561 {
562 height += y;
563 y = 0;
564 }
565 if (x + width > LCDM(WIDTH))
566 width = LCDM(WIDTH) - x;
567 if (y + height > LCDM(HEIGHT))
568 height = LCDM(HEIGHT) - y;
569#endif
570
571 if (CURRENT_VP->drawmode & DRMODE_INVERSEVID) 511 if (CURRENT_VP->drawmode & DRMODE_INVERSEVID)
572 { 512 {
573 if (CURRENT_VP->drawmode & DRMODE_BG) 513 if (CURRENT_VP->drawmode & DRMODE_BG)
@@ -670,32 +610,6 @@ void ICODE_ATTR LCDFN(bitmap_part)(const unsigned char *src, int src_x,
670 x += CURRENT_VP->x; 610 x += CURRENT_VP->x;
671 y += CURRENT_VP->y; 611 y += CURRENT_VP->y;
672 612
673#if defined(HAVE_VIEWPORT_CLIP)
674 /********************* Viewport on screen clipping ********************/
675 /* nothing to draw? */
676 if ((x >= LCDM(WIDTH)) || (y >= LCDM(HEIGHT))
677 || (x + width <= 0) || (y + height <= 0))
678 return;
679
680 /* clip image in viewport in screen */
681 if (x < 0)
682 {
683 width += x;
684 src_x -= x;
685 x = 0;
686 }
687 if (y < 0)
688 {
689 height += y;
690 src_y -= y;
691 y = 0;
692 }
693 if (x + width > LCDM(WIDTH))
694 width = LCDM(WIDTH) - x;
695 if (y + height > LCDM(HEIGHT))
696 height = LCDM(HEIGHT) - y;
697#endif
698
699 src += stride * (src_y >> 3) + src_x; /* move starting point */ 613 src += stride * (src_y >> 3) + src_x; /* move starting point */
700 src_y &= 7; 614 src_y &= 7;
701 y -= src_y; 615 y -= src_y;