| Previous | 199869 Revisions | Next |
| r33930 Tuesday 16th December, 2014 at 22:13:52 UTC by Alex W. Jackson |
|---|
| k053936.c: fix potential out-of-bounds memory access; remove some dead code [Alex Jackson] |
| [src/mame/video] | k053936.c konamigx.c |
| r242441 | r242442 | |
|---|---|---|
| 496 | 496 | |
| 497 | 497 | if (blend > 0) |
| 498 | 498 | { |
| 499 | dst_ | |
| 499 | dst_ptr += dst_pitch; // draw blended | |
| 500 | 500 | starty += incyy; |
| 501 | 501 | startx += incyx; |
| 502 | 502 | |
| r242441 | r242442 | |
| 539 | 539 | } |
| 540 | 540 | else // draw solid |
| 541 | 541 | { |
| 542 | if (blend == 0) | |
| 543 | { | |
| 544 | dst_ptr += dst_pitch; | |
| 545 | starty += incyy; | |
| 546 | startx += incyx; | |
| 547 | } | |
| 548 | else | |
| 549 | { | |
| 550 | if ((sy & 1) ^ (blend & 1)) | |
| 551 | { | |
| 552 | if (ty <= 1) return; | |
| 542 | dst_ptr += dst_pitch; | |
| 543 | starty += incyy; | |
| 544 | startx += incyx; | |
| 553 | 545 | |
| 554 | dst_ptr += dst_pitch; | |
| 555 | cy += incyy; | |
| 556 | cx += incyx; | |
| 557 | } | |
| 558 | ||
| 559 | if (ty > 1) | |
| 560 | { | |
| 561 | ty >>= 1; | |
| 562 | dst_pitch <<= 1; | |
| 563 | incyy <<= 1; | |
| 564 | incyx <<= 1; | |
| 565 | ||
| 566 | dst_ptr += dst_pitch; | |
| 567 | starty = cy + incyy; | |
| 568 | startx = cx + incyx; | |
| 569 | } | |
| 570 | } | |
| 571 | ||
| 572 | 546 | do { |
| 573 | 547 | do { |
| 574 | 548 | int srcx = (cx >> 16) & 0x1fff; |
| r242441 | r242442 | |
|---|---|---|
| 695 | 695 | int i = code<<1; |
| 696 | 696 | int j = mixerflags>>i & 3; |
| 697 | 697 | int k = 0; |
| 698 | static int parity = 0; | |
| 699 | parity ^= 1; | |
| 700 | 698 | |
| 701 | 699 | int disp = m_k055555->K055555_read_register(K55_INPUT_ENABLES); |
| 702 | 700 | if ((disp & K55_INP_SUB1) || (rushingheroes_hack)) |
| r242441 | r242442 | |
| 717 | 715 | alpha = temp4 = m_k054338->set_alpha_level(temp2); |
| 718 | 716 | |
| 719 | 717 | if (temp4 <= 0) return; |
| 720 | if (temp4 < 255) k = | |
| 718 | if (temp4 < 255) k = 1; | |
| 721 | 719 | } |
| 722 | 720 | |
| 723 | 721 | int l = sub1flags & 0xf; |
| r242441 | r242442 | |
| 745 | 743 | int temp1,temp2,temp3,temp4; |
| 746 | 744 | int i = code<<1; |
| 747 | 745 | int j = mixerflags>>i & 3; |
| 748 | // int k = 0; | |
| 749 | // static int parity = 0; | |
| 750 | // parity ^= 1; | |
| 751 | 746 | |
| 752 | 747 | int disp = m_k055555->K055555_read_register(K55_INPUT_ENABLES); |
| 753 | 748 | if (disp & K55_INP_SUB2) |
| r242441 | r242442 | |
| 768 | 763 | temp4 = m_k054338->set_alpha_level(temp2); |
| 769 | 764 | |
| 770 | 765 | if (temp4 <= 0) return; |
| 771 | //if (temp4 < 255) k = | |
| 766 | //if (temp4 < 255) k = 1; | |
| 772 | 767 | } |
| 773 | 768 | |
| 774 | 769 | int l = sub2flags & 0xf; |
| https://github.com/mamedev/mame/commit/447822e40dc401218f27af90341e434aeb82e097 |
| Previous | 199869 Revisions | Next |