@@ -484,10 +484,6 @@ void k053247_device::zdrawgfxzoom32GP(
484
484
485
485
u32 *dst_ptr = &bitmap.pix (0 );
486
486
const int dst_pitch = bitmap.rowpixels ();
487
- const int dst_minx = cliprect.min_x ;
488
- const int dst_maxx = cliprect.max_x ;
489
- const int dst_miny = cliprect.min_y ;
490
- const int dst_maxy = cliprect.max_y ;
491
487
int dst_x = sx;
492
488
int dst_y = sy;
493
489
@@ -512,28 +508,29 @@ void k053247_device::zdrawgfxzoom32GP(
512
508
src_fdx = src_fw / dst_w;
513
509
src_fdy = src_fh / dst_h;
514
510
}
511
+
515
512
const int dst_lastx = dst_x + dst_w - 1 ;
516
513
const int dst_lasty = dst_y + dst_h - 1 ;
517
- if (dst_lastx < dst_minx || dst_lasty < dst_miny ) return ;
514
+ if (dst_lastx < cliprect. min_x || dst_lasty < cliprect. min_y ) return ;
518
515
519
516
// clip destination
520
517
int dst_skipx = 0 ;
521
- if (int eax = dst_minx - dst_x; eax > 0 )
518
+ if (int delta_min_x = cliprect. min_x - dst_x; delta_min_x > 0 )
522
519
{
523
- dst_skipx = eax ;
524
- dst_w -= eax ;
525
- dst_x = dst_minx ;
520
+ dst_skipx = delta_min_x ;
521
+ dst_w -= delta_min_x ;
522
+ dst_x = cliprect. min_x ;
526
523
}
527
- if (int eax = dst_lastx - dst_maxx; eax > 0 ) dst_w -= eax ;
524
+ if (int delta_max_x = dst_lastx - cliprect. max_x ; delta_max_x > 0 ) dst_w -= delta_max_x ;
528
525
529
526
int dst_skipy = 0 ;
530
- if (int eax = dst_miny - dst_y; eax > 0 )
527
+ if (int delta_min_y = cliprect. min_y - dst_y; delta_min_y > 0 )
531
528
{
532
- dst_skipy = eax ;
533
- dst_h -= eax ;
534
- dst_y = dst_miny ;
529
+ dst_skipy = delta_min_y ;
530
+ dst_h -= delta_min_y ;
531
+ dst_y = cliprect. min_y ;
535
532
}
536
- if (int eax = dst_lasty - dst_maxy; eax > 0 ) dst_h -= eax ;
533
+ if (int delta_max_y = dst_lasty - cliprect. max_y ; delta_max_y > 0 ) dst_h -= delta_max_y ;
537
534
538
535
int src_fby, src_fbx;
539
536
@@ -552,9 +549,9 @@ void k053247_device::zdrawgfxzoom32GP(
552
549
src_fby += dst_skipy * src_fdy;
553
550
554
551
// adjust insertion points and pre-entry constants
555
- const int eax = (dst_y - dst_miny ) * GX_ZBUFW + (dst_x - dst_minx ) + dst_w;
556
- ozbuf_ptr += eax ;
557
- szbuf_ptr += eax << 1 ;
552
+ const int offset = (dst_y - cliprect. min_y ) * GX_ZBUFW + (dst_x - cliprect. min_x ) + dst_w;
553
+ ozbuf_ptr += offset ;
554
+ szbuf_ptr += offset << 1 ;
558
555
const u8 z8 = (u8 )zcode;
559
556
const u8 p8 = (u8 )pri;
560
557
dst_ptr += dst_y * dst_pitch + dst_x + dst_w;
@@ -576,11 +573,11 @@ void k053247_device::zdrawgfxzoom32GP(
576
573
{
577
574
do {
578
575
do {
579
- const u8 eax = src_ptr[src_x];
576
+ const u8 pal_idx = src_ptr[src_x];
580
577
src_x = src_fx >> FP;
581
578
src_fx += src_fdx;
582
- if (!eax || eax >= shdpen) continue ;
583
- dst_ptr [ecx] = pal_base[eax ];
579
+ if (!pal_idx || pal_idx >= shdpen) continue ;
580
+ dst_ptr[ecx] = pal_base[pal_idx ];
584
581
}
585
582
while (++ecx);
586
583
@@ -601,12 +598,12 @@ void k053247_device::zdrawgfxzoom32GP(
601
598
case 0 : // all pens solid
602
599
do {
603
600
do {
604
- const u8 eax = src_ptr[src_x];
601
+ const u8 pal_idx = src_ptr[src_x];
605
602
src_x = src_fx >> FP;
606
603
src_fx += src_fdx;
607
- if (!eax || ozbuf_ptr[ecx] < z8) continue ;
604
+ if (!pal_idx || ozbuf_ptr[ecx] < z8) continue ;
608
605
ozbuf_ptr[ecx] = z8;
609
- dst_ptr[ecx] = pal_base[eax ];
606
+ dst_ptr[ecx] = pal_base[pal_idx ];
610
607
}
611
608
while (++ecx);
612
609
@@ -625,12 +622,12 @@ void k053247_device::zdrawgfxzoom32GP(
625
622
case 1 : // solid pens only
626
623
do {
627
624
do {
628
- const u8 eax = src_ptr[src_x];
625
+ const u8 pal_idx = src_ptr[src_x];
629
626
src_x = src_fx >> FP;
630
627
src_fx += src_fdx;
631
- if (!eax || eax >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
628
+ if (!pal_idx || pal_idx >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
632
629
ozbuf_ptr[ecx] = z8;
633
- dst_ptr[ecx] = pal_base[eax ];
630
+ dst_ptr[ecx] = pal_base[pal_idx ];
634
631
}
635
632
while (++ecx);
636
633
@@ -649,12 +646,12 @@ void k053247_device::zdrawgfxzoom32GP(
649
646
case 2 : // all pens solid with alpha blending
650
647
do {
651
648
do {
652
- const u8 eax = src_ptr[src_x];
649
+ const u8 pal_idx = src_ptr[src_x];
653
650
src_x = src_fx >> FP;
654
651
src_fx += src_fdx;
655
- if (!eax || ozbuf_ptr[ecx] < z8) continue ;
652
+ if (!pal_idx || ozbuf_ptr[ecx] < z8) continue ;
656
653
ozbuf_ptr[ecx] = z8;
657
- dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[eax ], alpha);
654
+ dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[pal_idx ], alpha);
658
655
}
659
656
while (++ecx);
660
657
@@ -673,12 +670,12 @@ void k053247_device::zdrawgfxzoom32GP(
673
670
case 3 : // solid pens only with alpha blending
674
671
do {
675
672
do {
676
- const u8 eax = src_ptr[src_x];
673
+ const u8 pal_idx = src_ptr[src_x];
677
674
src_x = src_fx >> FP;
678
675
src_fx += src_fdx;
679
- if (!eax || eax >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
676
+ if (!pal_idx || pal_idx >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
680
677
ozbuf_ptr[ecx] = z8;
681
- dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[eax ], alpha);
678
+ dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[pal_idx ], alpha);
682
679
}
683
680
while (++ecx);
684
681
@@ -697,10 +694,10 @@ void k053247_device::zdrawgfxzoom32GP(
697
694
case 4 : // shadow pens only
698
695
do {
699
696
do {
700
- const u8 eax = src_ptr[src_x];
697
+ const u8 pal_idx = src_ptr[src_x];
701
698
src_x = src_fx >> FP;
702
699
src_fx += src_fdx;
703
- if (eax < shdpen || szbuf_ptr[ecx*2 ] < z8 || szbuf_ptr[ecx*2 +1 ] <= p8) continue ;
700
+ if (pal_idx < shdpen || szbuf_ptr[ecx*2 ] < z8 || szbuf_ptr[ecx*2 +1 ] <= p8) continue ;
704
701
rgb_t pix = dst_ptr[ecx];
705
702
szbuf_ptr[ecx*2 ] = z8;
706
703
szbuf_ptr[ecx*2 +1 ] = p8;
@@ -735,10 +732,10 @@ void k053247_device::zdrawgfxzoom32GP(
735
732
{
736
733
do {
737
734
do {
738
- const u8 eax = *src_ptr;
735
+ const u8 pal_idx = *src_ptr;
739
736
src_ptr += src_fdx;
740
- if (!eax || eax >= shdpen) continue ;
741
- dst_ptr[ecx] = pal_base[eax ];
737
+ if (!pal_idx || pal_idx >= shdpen) continue ;
738
+ dst_ptr[ecx] = pal_base[pal_idx ];
742
739
}
743
740
while (++ecx);
744
741
@@ -755,11 +752,11 @@ void k053247_device::zdrawgfxzoom32GP(
755
752
case 0 : // all pens solid
756
753
do {
757
754
do {
758
- const u8 eax = *src_ptr;
755
+ const u8 pal_idx = *src_ptr;
759
756
src_ptr += src_fdx;
760
- if (!eax || ozbuf_ptr[ecx] < z8) continue ;
757
+ if (!pal_idx || ozbuf_ptr[ecx] < z8) continue ;
761
758
ozbuf_ptr[ecx] = z8;
762
- dst_ptr[ecx] = pal_base[eax ];
759
+ dst_ptr[ecx] = pal_base[pal_idx ];
763
760
}
764
761
while (++ecx);
765
762
@@ -774,11 +771,11 @@ void k053247_device::zdrawgfxzoom32GP(
774
771
case 1 : // solid pens only
775
772
do {
776
773
do {
777
- const u8 eax = *src_ptr;
774
+ const u8 pal_idx = *src_ptr;
778
775
src_ptr += src_fdx;
779
- if (!eax || eax >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
776
+ if (!pal_idx || pal_idx >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
780
777
ozbuf_ptr[ecx] = z8;
781
- dst_ptr[ecx] = pal_base[eax ];
778
+ dst_ptr[ecx] = pal_base[pal_idx ];
782
779
}
783
780
while (++ecx);
784
781
@@ -793,11 +790,11 @@ void k053247_device::zdrawgfxzoom32GP(
793
790
case 2 : // all pens solid with alpha blending
794
791
do {
795
792
do {
796
- const u8 eax = *src_ptr;
793
+ const u8 pal_idx = *src_ptr;
797
794
src_ptr += src_fdx;
798
- if (!eax || ozbuf_ptr[ecx] < z8) continue ;
795
+ if (!pal_idx || ozbuf_ptr[ecx] < z8) continue ;
799
796
ozbuf_ptr[ecx] = z8;
800
- dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[eax ], alpha);
797
+ dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[pal_idx ], alpha);
801
798
}
802
799
while (++ecx);
803
800
@@ -812,11 +809,11 @@ void k053247_device::zdrawgfxzoom32GP(
812
809
case 3 : // solid pens only with alpha blending
813
810
do {
814
811
do {
815
- const u8 eax = *src_ptr;
812
+ const u8 pal_idx = *src_ptr;
816
813
src_ptr += src_fdx;
817
- if (!eax || eax >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
814
+ if (!pal_idx || pal_idx >= shdpen || ozbuf_ptr[ecx] < z8) continue ;
818
815
ozbuf_ptr[ecx] = z8;
819
- dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[eax ], alpha);
816
+ dst_ptr[ecx] = alpha_blend_r32 (dst_ptr[ecx], pal_base[pal_idx ], alpha);
820
817
}
821
818
while (++ecx);
822
819
@@ -831,9 +828,9 @@ void k053247_device::zdrawgfxzoom32GP(
831
828
case 4 : // shadow pens only
832
829
do {
833
830
do {
834
- const u8 eax = *src_ptr;
831
+ const u8 pal_idx = *src_ptr;
835
832
src_ptr += src_fdx;
836
- if (eax < shdpen || szbuf_ptr[ecx*2 ] < z8 || szbuf_ptr[ecx*2 +1 ] <= p8) continue ;
833
+ if (pal_idx < shdpen || szbuf_ptr[ecx*2 ] < z8 || szbuf_ptr[ecx*2 +1 ] <= p8) continue ;
837
834
rgb_t pix = dst_ptr[ecx];
838
835
szbuf_ptr[ecx*2 ] = z8;
839
836
szbuf_ptr[ecx*2 +1 ] = p8;
0 commit comments