Mercurial > mm7
comparison Render.cpp @ 2332:defd2526c94c
m
author | Ritor1 |
---|---|
date | Wed, 02 Apr 2014 20:53:35 +0600 |
parents | a59892f99d31 |
children | 82851980e3d8 |
comparison
equal
deleted
inserted
replaced
2322:a59892f99d31 | 2332:defd2526c94c |
---|---|
6607 { | 6607 { |
6608 int v4; // edi@3 | 6608 int v4; // edi@3 |
6609 //unsigned __int16 *v5; // edx@3 | 6609 //unsigned __int16 *v5; // edx@3 |
6610 unsigned __int16 *v6; // esi@3 | 6610 unsigned __int16 *v6; // esi@3 |
6611 unsigned int v8; // eax@5 | 6611 unsigned int v8; // eax@5 |
6612 unsigned int v9; // ebx@5 | 6612 //unsigned int v9; // ebx@5 |
6613 unsigned int v11; // eax@7 | 6613 unsigned int v11; // eax@7 |
6614 unsigned int v12; // ebx@8 | 6614 unsigned int v12; // ebx@8 |
6615 unsigned int v15; // eax@14 | 6615 unsigned int v15; // eax@14 |
6616 int v19; // [sp+10h] [bp-8h]@3 | 6616 //int v19; // [sp+10h] [bp-8h]@3 |
6617 unsigned int uOutXa; // [sp+20h] [bp+8h]@16 | 6617 unsigned int uOutXa; // [sp+20h] [bp+8h]@16 |
6618 int v23; // [sp+28h] [bp+10h]@3 | 6618 int v23; // [sp+28h] [bp+10h]@3 |
6619 | 6619 |
6620 if ( this->uNumSceneBegins && a4 ) | 6620 if ( this->uNumSceneBegins && a4 ) |
6621 { | 6621 { |
6622 v4 = a4->uWidth; | 6622 v4 = a4->uWidth; |
6623 //v5 = &this->pTargetSurface[uOutX + uOutY * this->uTargetSurfacePitch]; | 6623 //v5 = &this->pTargetSurface[uOutX + uOutY * this->uTargetSurfacePitch]; |
6624 v6 = a4->pPixels; | 6624 v6 = a4->pPixels; |
6625 v23 = a4->uHeight; | 6625 v23 = a4->uHeight; |
6626 v19 = v4; | 6626 ///v19 = v4; |
6627 if ( this->bClip ) | 6627 if ( this->bClip ) |
6628 { | 6628 { |
6629 if ( (signed int)uOutX < (signed int)this->uClipX ) | 6629 if ( (signed int)uOutX < (signed int)this->uClipX ) |
6630 { | 6630 { |
6631 v8 = this->uClipX - uOutX; | 6631 v8 = this->uClipX - uOutX; |
6632 v9 = uOutX - this->uClipX; | 6632 //v9 = uOutX - this->uClipX; |
6633 v8 *= 2; | 6633 v8 *= 2; |
6634 v4 += v9; | 6634 v4 += uOutX - this->uClipX; |
6635 v6 = (unsigned __int16 *)((char *)v6 + v8); | 6635 v6 = (unsigned __int16 *)((char *)v6 + v8); |
6636 //v5 = (unsigned __int16 *)((char *)v5 + v8); | 6636 //v5 = (unsigned __int16 *)((char *)v5 + v8); |
6637 } | 6637 } |
6638 if ( (signed int)uOutY < (signed int)this->uClipY ) | 6638 if ( (signed int)uOutY < (signed int)this->uClipY ) |
6639 { | 6639 { |
6640 v11 = this->uClipY - uOutY; | 6640 v11 = this->uClipY - uOutY; |
6641 v6 += v19 * v11; | 6641 v6 += a4->uWidth * v11; |
6642 v23 += uOutY - this->uClipY; | 6642 v23 += uOutY - this->uClipY; |
6643 //v5 += this->uTargetSurfacePitch * v11; | 6643 //v5 += this->uTargetSurfacePitch * v11; |
6644 } | 6644 } |
6645 v12 = max(this->uClipX, uOutX); | 6645 v12 = max(this->uClipX, uOutX); |
6646 if ( (signed int)(v4 + v12) > (signed int)this->uClipZ ) | 6646 if ( (signed int)(v4 + v12) > (signed int)this->uClipZ ) |
6647 { | |
6648 v4 = this->uClipZ - max(this->uClipX, uOutX); | 6647 v4 = this->uClipZ - max(this->uClipX, uOutX); |
6649 } | |
6650 v15 = max(this->uClipY, uOutY); | 6648 v15 = max(this->uClipY, uOutY); |
6651 if ( (signed int)(v15 + v23) > (signed int)this->uClipW ) | 6649 if ( (signed int)(v15 + v23) > (signed int)this->uClipW ) |
6652 { | |
6653 v23 = this->uClipW - max(this->uClipY, uOutY); | 6650 v23 = this->uClipW - max(this->uClipY, uOutY); |
6654 } | |
6655 } | 6651 } |
6656 | 6652 |
6657 for (int y = 0; y < v23; y++) | 6653 for (int y = 0; y < v23; y++) |
6658 { | 6654 { |
6659 for (int x = 0; x < v4; x++) | 6655 for (int x = 0; x < v4; x++) |
6661 WritePixel16(uOutX + x, uOutY + y, *v6); | 6657 WritePixel16(uOutX + x, uOutY + y, *v6); |
6662 //*v5 = *v6; | 6658 //*v5 = *v6; |
6663 //++v5; | 6659 //++v5; |
6664 ++v6; | 6660 ++v6; |
6665 } | 6661 } |
6666 v6 += v19 - v4; | 6662 v6 += a4->uWidth - v4; |
6667 //v5 += this->uTargetSurfacePitch - v4; | 6663 //v5 += this->uTargetSurfacePitch - v4; |
6668 } | 6664 } |
6669 } | 6665 } |
6670 } | 6666 } |
6671 | 6667 |