~ubuntu-branches/ubuntu/raring/vice/raring

« back to all changes in this revision

Viewing changes to src/video/render2x2.c

  • Committer: Bazaar Package Importer
  • Author(s): Zed Pobre
  • Date: 2005-02-01 11:30:26 UTC
  • mto: (9.1.1 lenny) (1.1.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20050201113026-6gy97mcqlg2ykg4z
Tags: upstream-1.16
ImportĀ upstreamĀ versionĀ 1.16

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        wfast = 0;
57
57
        wend = 0;
58
58
    } else {
59
 
        wstart=8-((unsigned int)trg & 7); /* alignment: 8 pixels*/
 
59
        /* alignment: 8 pixels*/
 
60
        wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
60
61
        wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
61
62
        wend = (width - wstart) & 0x07; /* do not forget the rest*/
62
63
    }
146
147
        wfast = 0;
147
148
        wend = 0;
148
149
    } else {
149
 
        wstart = 8 - ((unsigned int)trg & 7); /* alignment: 8 pixels*/
 
150
        /* alignment: 8 pixels*/
 
151
        wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
150
152
        wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
151
153
        wend = (width - wstart) & 0x07; /* do not forget the rest*/
152
154
    }
237
239
        wfast = 0;
238
240
        wend = 0;
239
241
    } else {
240
 
        wstart = 4 - ((unsigned int)trg & 3); /* alignment: 4 pixels*/
 
242
        /* alignment: 4 pixels*/
 
243
        wstart = (unsigned int)(4 - ((unsigned long)trg & 3));
241
244
        wfast = (width - wstart) >> 2; /* fast loop for 4 pixel segments*/
242
245
        wend = (width - wstart) & 0x03; /* do not forget the rest*/
243
246
    }
430
433
        wfast = 0;
431
434
        wend = 0;
432
435
    } else {
433
 
        wstart = 8 - ((unsigned int)trg & 7); /* alignment: 8 pixels*/
 
436
        /* alignment: 8 pixels*/
 
437
        wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
434
438
        wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
435
439
        wend = (width - wstart) & 0x07; /* do not forget the rest*/
436
440
    }
555
559
        wfast = 0;
556
560
        wend = 0;
557
561
    } else {
558
 
        wstart = 8 - ((unsigned int)trg & 7); /* alignment: 8 pixels*/
 
562
        /* alignment: 8 pixels*/
 
563
        wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
559
564
        wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
560
565
        wend = (width - wstart) & 0x07; /* do not forget the rest*/
561
566
    }
566
571
        tmptrg = (WORD *)trg;
567
572
        if ((y & 1) || doublescan) {
568
573
            if (wfirst) {
569
 
                *((BYTE *)tmptrg) = (BYTE)colortab[*tmpsrc++ | (*tmppre++ << 4)];
 
574
                *((BYTE *)tmptrg) = (BYTE)colortab[*tmpsrc++
 
575
                                    | (*tmppre++ << 4)];
570
576
                tmptrg = (WORD *)(((BYTE *)tmptrg) + 1);
571
577
            }
572
578
            for (x = 0; x < wstart; x++) {
652
658
        wfast = 0;
653
659
        wend = 0;
654
660
    } else {
655
 
        wstart = 8 - ((unsigned int)trg & 7); /* alignment: 8 pixels*/
 
661
        /* alignment: 8 pixels*/
 
662
        wstart = (unsigned int)(8 - ((unsigned long)trg & 7));
656
663
        wfast = (width - wstart) >> 3; /* fast loop for 8 pixel segments*/
657
664
        wend = (width - wstart) & 0x07; /* do not forget the rest*/
658
665
    }
663
670
        tmptrg = (DWORD *)trg;
664
671
        if ((y & 1) || doublescan) {
665
672
            if (wfirst) {
666
 
                *((WORD *)tmptrg) = (WORD)colortab[*tmpsrc++ | (*tmppre++ << 4)];
 
673
                *((WORD *)tmptrg) = (WORD)colortab[*tmpsrc++
 
674
                                    | (*tmppre++ << 4)];
667
675
                tmptrg = (DWORD *)(((WORD *)tmptrg) + 1);
668
676
            }
669
677
            for (x = 0; x < wstart; x++) {
750
758
        wfast = 0;
751
759
        wend = 0;
752
760
    } else {
753
 
        wstart = 4 - ((unsigned int)trg & 3); /* alignment: 4 pixels*/
 
761
        /* alignment: 4 pixels*/
 
762
        wstart = (unsigned int)(4 - ((unsigned long)trg & 3));
754
763
        wfast = (width - wstart) >> 2; /* fast loop for 4 pixel segments*/
755
764
        wend = (width - wstart) & 0x03; /* do not forget the rest*/
756
765
    }
950
959
        wfast = 0;
951
960
        wend = 0;
952
961
   } else {
953
 
        wstart = 4 - ((unsigned int)trg & 3); /* alignment: 4 pixels*/
 
962
        /* alignment: 4 pixels*/
 
963
        wstart = (unsigned int)(4 - ((unsigned long)trg & 3));
954
964
        wfast = (width - wstart) >> 2; /* fast loop for 4 pixel segments*/
955
965
        wend = (width - wstart) & 0x03; /* do not forget the rest*/
956
966
    }