Mercurial > mm7
comparison mm7_4.cpp @ 718:a5ee769b02c6
Слияние
author | Ritor1 |
---|---|
date | Mon, 18 Mar 2013 01:51:31 +0600 |
parents | d5473972234d 2dfb67633b01 |
children | 05f7a11f4f20 |
comparison
equal
deleted
inserted
replaced
717:d5473972234d | 718:a5ee769b02c6 |
---|---|
1382 Edge *v26; // [sp+18h] [bp-8h]@8 | 1382 Edge *v26; // [sp+18h] [bp-8h]@8 |
1383 unsigned int v27; // [sp+1Ch] [bp-4h]@1 | 1383 unsigned int v27; // [sp+1Ch] [bp-4h]@1 |
1384 | 1384 |
1385 v0 = pSpans; | 1385 v0 = pSpans; |
1386 stru_80C9D8.pSurf = &stru_80C980; | 1386 stru_80C9D8.pSurf = &stru_80C980; |
1387 stru_80C9D8.field_0 = (double)(signed int)pViewport->uViewportX; | 1387 stru_80C9D8.field_0 = (double)(signed int)pViewport->uViewportTL_X; |
1388 stru_80C9A4.pSurf = &stru_80C980; | 1388 stru_80C9A4.pSurf = &stru_80C980; |
1389 stru_80C980.pPrev = &stru_80C980; | 1389 stru_80C980.pPrev = &stru_80C980; |
1390 stru_80C980.pNext = &stru_80C980; | 1390 stru_80C980.pNext = &stru_80C980; |
1391 stru_80C9A4.field_0 = (double)(signed int)pViewport->uViewportZ; | 1391 stru_80C9A4.field_0 = (double)(signed int)pViewport->uViewportBR_X; |
1392 stru_80C980.field_8 = 0.0; | 1392 stru_80C980.field_8 = 0.0; |
1393 stru_80C980.field_4 = 0.0; | 1393 stru_80C980.field_4 = 0.0; |
1394 stru_80C9D8.pNext = &stru_80C9A4; | 1394 stru_80C9D8.pNext = &stru_80C9A4; |
1395 stru_80C9D8.pPrev = 0; | 1395 stru_80C9D8.pPrev = 0; |
1396 stru_80C9D8.field_8 = 1; | 1396 stru_80C9D8.field_8 = 1; |
1397 stru_80C9A4.pNext = 0; | 1397 stru_80C9A4.pNext = 0; |
1398 stru_80C9A4.pPrev = &stru_80C9D8; | 1398 stru_80C9A4.pPrev = &stru_80C9D8; |
1399 stru_80C9A4.field_8 = 0; | 1399 stru_80C9A4.field_8 = 0; |
1400 LODWORD(stru_80C980.field_0) = 0xC97423F0u; | 1400 LODWORD(stru_80C980.field_0) = 0xC97423F0u; |
1401 v27 = pViewport->uViewportY; | 1401 v27 = pViewport->uViewportTL_Y; |
1402 if ( (signed int)pViewport->uViewportY > (signed int)pViewport->uViewportW ) | 1402 if ( (signed int)pViewport->uViewportTL_Y > (signed int)pViewport->uViewportBR_Y ) |
1403 { | 1403 { |
1404 LABEL_51: | 1404 LABEL_51: |
1405 v0->field_8 = -1; | 1405 v0->field_8 = -1; |
1406 } | 1406 } |
1407 else | 1407 else |
1408 { | 1408 { |
1409 v1 = 52 * pViewport->uViewportY; | 1409 v1 = 52 * pViewport->uViewportTL_Y; |
1410 v24 = 52 * pViewport->uViewportY; | 1410 v24 = 52 * pViewport->uViewportTL_Y; |
1411 while ( 1 ) | 1411 while ( 1 ) |
1412 { | 1412 { |
1413 v2 = *(Edge **)((char *)&pNewEdges->pNext + v1); | 1413 v2 = *(Edge **)((char *)&pNewEdges->pNext + v1); |
1414 v3 = &stru_80C9D8; | 1414 v3 = &stru_80C9D8; |
1415 v25 = (double)(signed int)v27; | 1415 v25 = (double)(signed int)v27; |
1562 break; | 1562 break; |
1563 LABEL_50: | 1563 LABEL_50: |
1564 ++v27; | 1564 ++v27; |
1565 v1 = v24 + 52; | 1565 v1 = v24 + 52; |
1566 v24 += 52; | 1566 v24 += 52; |
1567 if ( (signed int)v27 > (signed int)pViewport->uViewportW ) | 1567 if ( (signed int)v27 > (signed int)pViewport->uViewportBR_Y ) |
1568 goto LABEL_51; | 1568 goto LABEL_51; |
1569 } | 1569 } |
1570 while ( 1 ) | 1570 while ( 1 ) |
1571 { | 1571 { |
1572 v21 = v20->pNext; | 1572 v21 = v20->pNext; |
6504 signed int v23; // [sp+20h] [bp+Ch]@1 | 6504 signed int v23; // [sp+20h] [bp+Ch]@1 |
6505 | 6505 |
6506 v5 = a4; | 6506 v5 = a4; |
6507 v23 = _z >> 16; | 6507 v23 = _z >> 16; |
6508 z = x + v5; | 6508 z = x + v5; |
6509 if ( z >= (signed int)pViewport->uViewportX | 6509 if ( z >= (signed int)pViewport->uViewportTL_X |
6510 && (signed int)x <= (signed int)pViewport->uViewportZ | 6510 && (signed int)x <= (signed int)pViewport->uViewportBR_X |
6511 && y >= (signed int)pViewport->uViewportY | 6511 && y >= (signed int)pViewport->uViewportTL_Y |
6512 && y <= (signed int)pViewport->uViewportW ) | 6512 && y <= (signed int)pViewport->uViewportBR_Y ) |
6513 { | 6513 { |
6514 if ( (signed int)x < (signed int)pViewport->uViewportX ) | 6514 if ( (signed int)x < (signed int)pViewport->uViewportTL_X ) |
6515 x = pViewport->uViewportX; | 6515 x = pViewport->uViewportTL_X; |
6516 if ( z > (signed int)pViewport->uViewportZ ) | 6516 if ( z > (signed int)pViewport->uViewportBR_X ) |
6517 z = pViewport->uViewportZ; | 6517 z = pViewport->uViewportBR_X; |
6518 pTarget = &pRenderer->pTargetSurface[x + y * pRenderer->uTargetSurfacePitch]; | 6518 pTarget = &pRenderer->pTargetSurface[x + y * pRenderer->uTargetSurfacePitch]; |
6519 v22 = z - x; | 6519 v22 = z - x; |
6520 pTargetZ = &pRenderer->pActiveZBuffer[x + 640 * y]; | 6520 pTargetZ = &pRenderer->pActiveZBuffer[x + 640 * y]; |
6521 v7 = lightColor >> 3; | 6521 v7 = lightColor >> 3; |
6522 v8 = lightColor & 0xF0; | 6522 v8 = lightColor & 0xF0; |
6633 | 6633 |
6634 if ( !pRenderer->uNumSceneBegins ) | 6634 if ( !pRenderer->uNumSceneBegins ) |
6635 { | 6635 { |
6636 if ( pRenderer->field_40110 ) | 6636 if ( pRenderer->field_40110 ) |
6637 { | 6637 { |
6638 a2.bottom = pViewport->uViewportY; | 6638 a2.bottom = pViewport->uViewportTL_Y; |
6639 a2.left = 0; | 6639 a2.left = 0; |
6640 a2.top = 0; | 6640 a2.top = 0; |
6641 a2.right = 640; | 6641 a2.right = 640; |
6642 ErrD3D(pRenderer->pBackBuffer4->BltFast(0, 0, pRenderer->pColorKeySurface4, &a2, 16u)); | 6642 ErrD3D(pRenderer->pBackBuffer4->BltFast(0, 0, pRenderer->pColorKeySurface4, &a2, 16u)); |
6643 a2.right = 640; | 6643 a2.right = 640; |
6644 a2.left = 0; | 6644 a2.left = 0; |
6645 a2.top = pViewport->uViewportW + 1; | 6645 a2.top = pViewport->uViewportBR_Y + 1; |
6646 a2.bottom = 480; | 6646 a2.bottom = 480; |
6647 ErrD3D(pRenderer->pBackBuffer4->BltFast( | 6647 ErrD3D(pRenderer->pBackBuffer4->BltFast( |
6648 0, | 6648 0, |
6649 pViewport->uViewportW + 1, | 6649 pViewport->uViewportBR_Y + 1, |
6650 pRenderer->pColorKeySurface4, | 6650 pRenderer->pColorKeySurface4, |
6651 &a2, | 6651 &a2, |
6652 16u)); | 6652 16u)); |
6653 a2.right = pViewport->uViewportX; | 6653 a2.right = pViewport->uViewportTL_X; |
6654 a2.bottom = pViewport->uViewportW + 1; | 6654 a2.bottom = pViewport->uViewportBR_Y + 1; |
6655 a2.left = 0; | 6655 a2.left = 0; |
6656 a2.top = pViewport->uViewportY; | 6656 a2.top = pViewport->uViewportTL_Y; |
6657 ErrD3D(pRenderer->pBackBuffer4->BltFast( | 6657 ErrD3D(pRenderer->pBackBuffer4->BltFast( |
6658 0, | 6658 0, |
6659 pViewport->uViewportY, | 6659 pViewport->uViewportTL_Y, |
6660 pRenderer->pColorKeySurface4, | 6660 pRenderer->pColorKeySurface4, |
6661 &a2, | 6661 &a2, |
6662 16u)); | 6662 16u)); |
6663 a2.left = pViewport->uViewportZ; | 6663 a2.left = pViewport->uViewportBR_X; |
6664 a2.top = pViewport->uViewportY; | 6664 a2.top = pViewport->uViewportTL_Y; |
6665 a2.right = 640; | 6665 a2.right = 640; |
6666 a2.bottom = pViewport->uViewportW + 1; | 6666 a2.bottom = pViewport->uViewportBR_Y + 1; |
6667 ErrD3D(pRenderer->pBackBuffer4->BltFast( | 6667 ErrD3D(pRenderer->pBackBuffer4->BltFast( |
6668 pViewport->uViewportZ, | 6668 pViewport->uViewportBR_X, |
6669 pViewport->uViewportY, | 6669 pViewport->uViewportTL_Y, |
6670 pRenderer->pColorKeySurface4, | 6670 pRenderer->pColorKeySurface4, |
6671 &a2, | 6671 &a2, |
6672 16u)); | 6672 16u)); |
6673 a2.right = pViewport->uViewportZ; | 6673 a2.right = pViewport->uViewportBR_X; |
6674 a2.bottom = pViewport->uViewportW + 1; | 6674 a2.bottom = pViewport->uViewportBR_Y + 1; |
6675 a2.left = pViewport->uViewportX; | 6675 a2.left = pViewport->uViewportTL_X; |
6676 a2.top = pViewport->uViewportY; | 6676 a2.top = pViewport->uViewportTL_Y; |
6677 ErrD3D(pRenderer->pBackBuffer4->BltFast( | 6677 ErrD3D(pRenderer->pBackBuffer4->BltFast( |
6678 pViewport->uViewportX, | 6678 pViewport->uViewportTL_X, |
6679 pViewport->uViewportY, | 6679 pViewport->uViewportTL_Y, |
6680 pRenderer->pColorKeySurface4, | 6680 pRenderer->pColorKeySurface4, |
6681 &a2, | 6681 &a2, |
6682 17u)); | 6682 17u)); |
6683 } | 6683 } |
6684 } | 6684 } |
6758 for (uint y = 352; y < 480; ++y) | 6758 for (uint y = 352; y < 480; ++y) |
6759 memcpy(pDst + y * Dst.lPitch / 2, | 6759 memcpy(pDst + y * Dst.lPitch / 2, |
6760 pSrc + y * 640, 640 * sizeof(__int16)); | 6760 pSrc + y * 640, 640 * sizeof(__int16)); |
6761 | 6761 |
6762 | 6762 |
6763 auto pSrc_x1y1 = pSrc + 640 * pViewport->uViewportY + pViewport->uViewportX; | 6763 auto pSrc_x1y1 = pSrc + 640 * pViewport->uViewportTL_Y + pViewport->uViewportTL_X; |
6764 //_this = (unsigned int)&pSrc[2 * (((signed int)pViewport->uViewportX >> 1) + 320 * pViewport->uViewportY)]; | 6764 //_this = (unsigned int)&pSrc[2 * (((signed int)pViewport->uViewportX >> 1) + 320 * pViewport->uViewportY)]; |
6765 auto pDst_x1y1 = pDst + Dst.lPitch * pViewport->uViewportY + pViewport->uViewportX; | 6765 auto pDst_x1y1 = pDst + Dst.lPitch * pViewport->uViewportTL_Y + pViewport->uViewportTL_X; |
6766 //v23 = (unsigned __int32)((char *)v26 + 4 * (((signed int)pViewport->uViewportX >> 1) + (Dst.lPitch >> 2) * pViewport->uViewportY)); | 6766 //v23 = (unsigned __int32)((char *)v26 + 4 * (((signed int)pViewport->uViewportX >> 1) + (Dst.lPitch >> 2) * pViewport->uViewportY)); |
6767 v9 = ((signed int)pViewport->uViewportX >> 1) - ((signed int)pViewport->uViewportZ >> 1); | 6767 v9 = ((signed int)pViewport->uViewportTL_X >> 1) - ((signed int)pViewport->uViewportBR_X >> 1); |
6768 //v20 = ((signed int)pViewport->uViewportZ >> 1) - ((signed int)pViewport->uViewportX >> 1); | 6768 //v20 = ((signed int)pViewport->uViewportZ >> 1) - ((signed int)pViewport->uViewportX >> 1); |
6769 v22 = 4 * ((Dst.lPitch / 4) + v9); | 6769 v22 = 4 * ((Dst.lPitch / 4) + v9); |
6770 v21 = 4 * v9 + 1280; | 6770 v21 = 4 * v9 + 1280; |
6771 | 6771 |
6772 //auto uNumLines = pViewport->uViewportW - pViewport->uViewportY + 1; | 6772 //auto uNumLines = pViewport->uViewportW - pViewport->uViewportY + 1; |
6773 //v26 = (LPVOID)(pViewport->uViewportW - pViewport->uViewportY + 1); | 6773 //v26 = (LPVOID)(pViewport->uViewportW - pViewport->uViewportY + 1); |
6774 v10 = (int)pSrc_x1y1; | 6774 v10 = (int)pSrc_x1y1; |
6775 v11 = (int)pDst_x1y1; | 6775 v11 = (int)pDst_x1y1; |
6776 auto uHalfWidth = v20 = (pViewport->uViewportZ - pViewport->uViewportX) / 2; | 6776 auto uHalfWidth = v20 = (pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2; |
6777 v13 = v24; | 6777 v13 = v24; |
6778 | 6778 |
6779 for (uint y = pViewport->uViewportY; y < pViewport->uViewportW + 1; ++y) | 6779 for (uint y = pViewport->uViewportTL_Y; y < pViewport->uViewportBR_Y + 1; ++y) |
6780 { | 6780 { |
6781 //memcpy(pDst + pViewport->uViewportX + y * Dst.lPitch / 2, | 6781 //memcpy(pDst + pViewport->uViewportX + y * Dst.lPitch / 2, |
6782 // pSrc + pViewport->uViewportX + y * 640, (pViewport->uViewportZ - pViewport->uViewportX) * sizeof(__int16)); | 6782 // pSrc + pViewport->uViewportX + y * 640, (pViewport->uViewportZ - pViewport->uViewportX) * sizeof(__int16)); |
6783 for (uint x = pViewport->uViewportX; x < pViewport->uViewportZ; ++x) | 6783 for (uint x = pViewport->uViewportTL_X; x < pViewport->uViewportBR_X; ++x) |
6784 { | 6784 { |
6785 if (pSrc[y * 640 + x] != (pRenderer->uTargetGMask | pRenderer->uTargetBMask)) | 6785 if (pSrc[y * 640 + x] != (pRenderer->uTargetGMask | pRenderer->uTargetBMask)) |
6786 pDst[y * Dst.lPitch / 2 + x] = pSrc[y * 640 + x]; | 6786 pDst[y * Dst.lPitch / 2 + x] = pSrc[y * 640 + x]; |
6787 } | 6787 } |
6788 } | 6788 } |
10705 pDialogueWindow->Release(); | 10705 pDialogueWindow->Release(); |
10706 } | 10706 } |
10707 else | 10707 else |
10708 { | 10708 { |
10709 for ( i = 0; i < uNumDialogueNPCPortraits; ++i ) | 10709 for ( i = 0; i < uNumDialogueNPCPortraits; ++i ) |
10710 GUIButton::_41D0D8((GUIButton *)HouseNPCData[i + 7]); | 10710 ((GUIButton *)HouseNPCData[i + 7])->Release(); |
10711 } | 10711 } |
10712 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); | 10712 pDialogueWindow = GUIWindow::Create(0, 0, 640, 0x159u, WINDOW_MainMenu, 0, 0); |
10713 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, 0x71u, 0, 0, | 10713 pBtn_ExitCancel = pDialogueWindow->CreateButton( 471u, 445u, 169u, 35u, 1, 0, 0x71u, 0, 0, |
10714 pGlobalTXT_LocalizationStrings[74],// "End Conversation" | 10714 pGlobalTXT_LocalizationStrings[74],// "End Conversation" |
10715 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); | 10715 (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0), 0); |