Mercurial > mm7
comparison mm7_1.cpp @ 510:7c86030324a5
Слияние
author | Ritor1 |
---|---|
date | Fri, 01 Mar 2013 18:38:12 +0600 |
parents | 00ce82758c72 6fa3ff8ef729 |
children | cb0ad52d6a26 |
comparison
equal
deleted
inserted
replaced
509:dddedef7a98e | 510:7c86030324a5 |
---|---|
692 { | 692 { |
693 while ( 1 ) | 693 while ( 1 ) |
694 { | 694 { |
695 v5 = pStru179.field_0[v21]; | 695 v5 = pStru179.field_0[v21]; |
696 v20 = 8 * pStru179.field_0[v21]; | 696 v20 = 8 * pStru179.field_0[v21]; |
697 v6 = (char *)pAwards[v20/8-1].pText;//(char *)dword_723E80_award_related[v20 / 4]; | 697 v6 = (char *)pAwards[(v20-1)/8].pText;//(char *)dword_723E80_award_related[v20 / 4]; |
698 if ( v5 != 1 ) | 698 if ( v5 != 1 ) |
699 break; | 699 break; |
700 v17 = pParty->uFine; | 700 v17 = pParty->uFine; |
701 LABEL_42: | 701 LABEL_42: |
702 sprintf(pTmpBuf, v6, v17); | 702 sprintf(pTmpBuf, v6, v17); |
2924 } | 2924 } |
2925 if ( (signed int)v116 > (signed int)v106.uViewportZ ) | 2925 if ( (signed int)v116 > (signed int)v106.uViewportZ ) |
2926 v116 = v106.uViewportZ; | 2926 v116 = v106.uViewportZ; |
2927 if ( v119 > (signed int)v106.uViewportW ) | 2927 if ( v119 > (signed int)v106.uViewportW ) |
2928 v119 = v106.uViewportW; | 2928 v119 = v106.uViewportW; |
2929 pRenderer->FillRectFast( | 2929 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, |
2930 v106.uViewportX, | |
2931 v106.uViewportY, | |
2932 v106.uViewportZ - v106.uViewportX, | |
2933 v106.uViewportW - v106.uViewportY, | |
2934 pRenderer->uTargetBMask | pRenderer->uTargetGMask); | 2930 pRenderer->uTargetBMask | pRenderer->uTargetGMask); |
2935 pRenderer->FillRectFast( | 2931 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, |
2936 v106.uViewportX, | |
2937 v106.uViewportY, | |
2938 v106.uViewportZ - v106.uViewportX, | |
2939 v106.uViewportW - v106.uViewportY, | |
2940 pRenderer->uTargetBMask | pRenderer->uTargetGMask); | 2932 pRenderer->uTargetBMask | pRenderer->uTargetGMask); |
2941 v84.left = v106.uViewportX; | 2933 v84.left = v106.uViewportX; |
2942 v84.top = v106.uViewportY; | 2934 v84.top = v106.uViewportY; |
2943 v84.right = v106.uViewportZ; | 2935 v84.right = v106.uViewportZ; |
2944 v84.bottom = v106.uViewportW; | 2936 v84.bottom = v106.uViewportW; |
3018 v111 = (unsigned int)((char *)a2 + v31); | 3010 v111 = (unsigned int)((char *)a2 + v31); |
3019 for ( i = v107 - (int)a4; ; v32 = i ) | 3011 for ( i = v107 - (int)a4; ; v32 = i ) |
3020 { | 3012 { |
3021 v110 = (LPVOID)((pDesc.lPitch >> 1) * pDesc.dwHeight * v111 / v13->uAreaHeight); | 3013 v110 = (LPVOID)((pDesc.lPitch >> 1) * pDesc.dwHeight * v111 / v13->uAreaHeight); |
3022 v33 = v108[(int)((char *)v110 + pDesc.dwWidth * (v32 + v124) / v13->uAreaWidth)]; | 3014 v33 = v108[(int)((char *)v110 + pDesc.dwWidth * (v32 + v124) / v13->uAreaWidth)]; |
3023 v34 = v33 & 0x1F | 2 | 3015 v34 = v33 & 0x1F | 2 * (unsigned __int16)(v108[(int)((char *)v110 + pDesc.dwWidth * (v32 + v124++) / v13->uAreaWidth)] & 0xFFE0); |
3024 * (unsigned __int16)(v108[(int)((char *)v110 | |
3025 + pDesc.dwWidth * (v32 + v124++) / v13->uAreaWidth)] & 0xFFE0); | |
3026 v35 = v124; | 3016 v35 = v124; |
3027 *(short *)v30 = v34; | 3017 *(short *)v30 = v34; |
3028 v30 += 2; | 3018 v30 += 2; |
3029 if ( v35 >= (signed int)v116 ) | 3019 if ( v35 >= (signed int)v116 ) |
3030 break; | 3020 break; |
3090 else | 3080 else |
3091 { | 3081 { |
3092 LOBYTE(v40) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID); | 3082 LOBYTE(v40) = pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID); |
3093 v120 = v40; | 3083 v120 = v40; |
3094 if ( !v40 ) | 3084 if ( !v40 ) |
3095 v45 = 1; | 3085 v45 = 1; |
3096 else | 3086 else |
3097 { | 3087 { |
3098 v41 = (unsigned __int8)v40 & 0x3F; | 3088 v41 = (unsigned __int8)v40 & 0x3F; |
3099 v42 = SkillToMastery((unsigned __int16)v40) - 1; | 3089 v42 = SkillToMastery((unsigned __int16)v40) - 1; |
3100 if ( !v42 ) | 3090 if ( !v42 ) |
3103 { | 3093 { |
3104 v45 = 1; | 3094 v45 = 1; |
3105 v119 = 1; | 3095 v119 = 1; |
3106 } | 3096 } |
3107 else | 3097 else |
3108 v45 = 1; | 3098 v45 = 1; |
3109 } | 3099 } |
3110 else | 3100 else |
3111 { | 3101 { |
3112 v43 = v42 - 1; | 3102 v43 = v42 - 1; |
3113 if ( !v43 ) | 3103 if ( !v43 ) |
3367 sprintf(pTmpBuf, "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, v95[v121->pMonsterInfo.uAttack1Type]); | 3357 sprintf(pTmpBuf, "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, v95[v121->pMonsterInfo.uAttack1Type]); |
3368 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | 3358 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); |
3369 a4 = &a4[LOBYTE(v56->uFontHeight) - 3]; | 3359 a4 = &a4[LOBYTE(v56->uFontHeight) - 3]; |
3370 v57 = v121->pMonsterInfo.uAttack1DamageBonus; | 3360 v57 = v121->pMonsterInfo.uAttack1DamageBonus; |
3371 if ( v57 ) | 3361 if ( v57 ) |
3372 sprintf( | 3362 sprintf(pTmpBuf, "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53], |
3373 pTmpBuf, | 3363 0, v121->pMonsterInfo.uAttack1DamageDiceRolls, v121->pMonsterInfo.uAttack1DamageDiceSides, v57); |
3374 "%s\f%05u\t080%dd%d+%d\n", | |
3375 pGlobalTXT_LocalizationStrings[53], | |
3376 0, | |
3377 v121->pMonsterInfo.uAttack1DamageDiceRolls, | |
3378 v121->pMonsterInfo.uAttack1DamageDiceSides, | |
3379 v57); | |
3380 else | 3364 else |
3381 sprintf( | 3365 sprintf(pTmpBuf, "%s\f%05u\t080%dd%d\n", pGlobalTXT_LocalizationStrings[53], |
3382 pTmpBuf, | 3366 0, v121->pMonsterInfo.uAttack1DamageDiceRolls, v121->pMonsterInfo.uAttack1DamageDiceSides); |
3383 "%s\f%05u\t080%dd%d\n", | |
3384 pGlobalTXT_LocalizationStrings[53], | |
3385 0, | |
3386 v121->pMonsterInfo.uAttack1DamageDiceRolls, | |
3387 v121->pMonsterInfo.uAttack1DamageDiceSides); | |
3388 } | 3367 } |
3389 else | 3368 else |
3390 { | 3369 { |
3391 sprintf(pTmpBuf, "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]); | 3370 sprintf(pTmpBuf, "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]); |
3392 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); | 3371 a1->DrawText(v56, 150, (int)a4, a5, pTmpBuf, 0, 0, 0); |
3503 } | 3482 } |
3504 if ( (signed __int64)pParty->pPartyBuffs[3].uExpireTime > 0 ) | 3483 if ( (signed __int64)pParty->pPartyBuffs[3].uExpireTime > 0 ) |
3505 { | 3484 { |
3506 sprintf(pTmpBuf, "%s: %d", pGlobalTXT_LocalizationStrings[650], v121->sCurrentHP); | 3485 sprintf(pTmpBuf, "%s: %d", pGlobalTXT_LocalizationStrings[650], v121->sCurrentHP); |
3507 pFontSmallnum->GetLineWidth(pTmpBuf); | 3486 pFontSmallnum->GetLineWidth(pTmpBuf); |
3508 result = a1->DrawTitleText( | 3487 result = a1->DrawTitleText(pFontSmallnum, 0, a1->uFrameHeight - LOBYTE(pFontSmallnum->uFontHeight) - 12, 0, pTmpBuf, 3); |
3509 pFontSmallnum, | |
3510 0, | |
3511 a1->uFrameHeight - LOBYTE(pFontSmallnum->uFontHeight) - 12, | |
3512 0, | |
3513 pTmpBuf, | |
3514 3u); | |
3515 } | 3488 } |
3516 return result; | 3489 return result; |
3517 } | 3490 } |
3518 | 3491 |
3519 //----- (0041F54A) -------------------------------------------------------- | 3492 //----- (0041F54A) -------------------------------------------------------- |
5100 unsigned int pY; // [sp+3Ch] [bp-Ch]@2 | 5073 unsigned int pY; // [sp+3Ch] [bp-Ch]@2 |
5101 unsigned int pX; // [sp+40h] [bp-8h]@2 | 5074 unsigned int pX; // [sp+40h] [bp-8h]@2 |
5102 int a4; // [sp+44h] [bp-4h]@2 | 5075 int a4; // [sp+44h] [bp-4h]@2 |
5103 | 5076 |
5104 v0 = pPlayers[uActiveCharacter]; | 5077 v0 = pPlayers[uActiveCharacter]; |
5105 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] != 103 | 5078 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103 ) |
5106 || (pMouse->GetClickPos(&pX, &pY), | 5079 { |
5107 v1 = pY - 17, | 5080 pMouse->GetClickPos(&pX, &pY); |
5108 v2 = pX - 14, | 5081 pY = pY - 17; |
5109 pY = v1, | 5082 v2 =pX - 14; |
5110 pX = v2, | 5083 pX = v2; |
5111 v3 = 14 * (v1 >> 5), | 5084 v3 = 14 * (pY >> 5); |
5112 v2 >>= 5, | 5085 v2 >>= 5; |
5113 v4 = v2 + v3 < 0, | 5086 v4 = v2 + v3 < 0; |
5114 v5 = v2 + v3, | 5087 v5 = v2 + v3; |
5115 a4 = v5, | 5088 a4 = v5; |
5116 v4) | 5089 if ( !v4 ) |
5117 || v5 > 126 | 5090 { |
5118 || pMouse->GetCursorPos(&a2)->x >= 462 | 5091 if ( v5 <= 126 && pMouse->GetCursorPos(&a2)->x < 462 |
5119 || pMouse->GetCursorPos(&a2)->x < 14 ) | 5092 && pMouse->GetCursorPos(&a2)->x >= 14 ) |
5120 return; | 5093 { |
5121 if ( unk_50C9A0 ) | 5094 if ( unk_50C9A0 ) |
5122 { | 5095 { |
5123 v6 = v0->GetItemIDAtInventoryIndex(&a4); | 5096 v6 = v0->GetItemIDAtInventoryIndex(&a4); |
5124 if ( v6 ) | 5097 if ( v6 ) |
5125 { | 5098 { |
5126 *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu; | 5099 *((char *)pGUIWindow_Settings->ptr_1C + 8) &= 0x7Fu; |
5127 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; | 5100 *((short *)pGUIWindow_Settings->ptr_1C + 2) = uActiveCharacter - 1; |
5128 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v6 - 1; | 5101 *((int *)pGUIWindow_Settings->ptr_1C + 3) = v6 - 1; |
5129 *((short *)pGUIWindow_Settings->ptr_1C + 3) = a4; | 5102 *((short *)pGUIWindow_Settings->ptr_1C + 3) = a4; |
5130 ptr_50C9A4 = (ItemGen *)&v0->pInventoryItems[v6-1]; | 5103 ptr_50C9A4 = (ItemGen *)&v0->pInventoryItems[v6-1]; |
5131 unk_50C9A0 = 0; | 5104 unk_50C9A0 = 0; |
5132 if ( pMessageQueue_50CBD0->uNumMessages ) | 5105 if ( pMessageQueue_50CBD0->uNumMessages ) |
5133 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; | 5106 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; |
5134 pMouse->SetCursorBitmap("MICON1"); | 5107 pMouse->SetCursorBitmap("MICON1"); |
5135 dword_50C9D0 = 113; | 5108 dword_50C9D0 = 113; |
5136 dword_50C9D4 = 0; | 5109 dword_50C9D4 = 0; |
5137 dword_50C9D8 = 256; | 5110 dword_50C9D8 = 256; |
5138 } | 5111 } |
5139 return; | 5112 return; |
5140 } | 5113 } |
5141 if ( ptr_50C9A4 ) | 5114 if ( ptr_50C9A4 ) |
5142 return; | 5115 return; |
5143 v7 = pParty->pPickedItem.uItemID; | 5116 v7 = pParty->pPickedItem.uItemID; |
5144 v8 = v0->GetItemIDAtInventoryIndex(&a4); | 5117 v8 = v0->GetItemIDAtInventoryIndex(&a4); |
5145 if ( !v7 ) | 5118 if ( !v7 ) |
5146 { | 5119 { |
5147 if ( !v8 ) | 5120 if ( !v8 ) |
5148 return; | 5121 return; |
5149 memcpy(&pParty->pPickedItem, &v0->pInventoryItems[v8-1], sizeof(pParty->pPickedItem)); | 5122 memcpy(&pParty->pPickedItem, &v0->pInventoryItems[v8-1], sizeof(pParty->pPickedItem)); |
5150 v0->RemoveItemAtInventoryIndex(a4); | 5123 v0->RemoveItemAtInventoryIndex(a4); |
5151 v9 = pParty->pPickedItem.uItemID; | 5124 v9 = pParty->pPickedItem.uItemID; |
5152 goto LABEL_24; | 5125 goto LABEL_24; |
5153 } | 5126 } |
5154 v13 = v8; | 5127 v13 = v8; |
5155 if ( v8 ) | 5128 if ( v8 ) |
5156 { | 5129 { |
5157 a2.y = (LONG)&v0->pInventoryItems[v8-1]; | 5130 a2.y = (LONG)&v0->pInventoryItems[v8-1]; |
5158 memcpy(&this_, (const void *)a2.y, sizeof(this_)); | 5131 memcpy(&this_, (const void *)a2.y, sizeof(this_)); |
5159 v0->RemoveItemAtInventoryIndex(a4); | 5132 v0->RemoveItemAtInventoryIndex(a4); |
5160 pX = v0->AddItem2(a4, &pParty->pPickedItem); | 5133 pX = v0->AddItem2(a4, &pParty->pPickedItem); |
5161 if ( !pX ) | 5134 if ( !pX ) |
5162 { | 5135 { |
5163 pX = v0->AddItem2(0xFFFFFFFFu, &pParty->pPickedItem); | 5136 pX = v0->AddItem2(0xFFFFFFFFu, &pParty->pPickedItem); |
5164 if ( !pX ) | 5137 if ( !pX ) |
5165 { | 5138 { |
5166 v0->_49298B(&this_, v13 - 1, a4); | 5139 v0->_49298B(&this_, v13 - 1, a4); |
5167 memcpy((void *)a2.y, &this_, sizeof(ItemGen)); | 5140 memcpy((void *)a2.y, &this_, sizeof(ItemGen)); |
5168 return; | 5141 return; |
5169 } | 5142 } |
5170 } | 5143 } |
5171 v9 = this_.uItemID; | 5144 v9 = this_.uItemID; |
5172 memcpy(&pParty->pPickedItem, &this_, sizeof(pParty->pPickedItem)); | 5145 memcpy(&pParty->pPickedItem, &this_, sizeof(pParty->pPickedItem)); |
5173 LABEL_24: | 5146 LABEL_24: |
5174 pMouse->SetCursorBitmap(pItemsTable->pItems[v9].pIconName); | 5147 pMouse->SetCursorBitmap(pItemsTable->pItems[v9].pIconName); |
5175 return; | 5148 return; |
5176 } | 5149 } |
5177 v10 = v0->AddItem(a4, v7); | 5150 v10 = v0->AddItem(a4, v7); |
5178 pX = v10; | 5151 pX = v10; |
5179 if ( v10 || (v10 = v0->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID), (pX = v10) != 0) ) | 5152 if ( v10 || (v10 = v0->AddItem(0xFFFFFFFFu, pParty->pPickedItem.uItemID), (pX = v10) != 0) ) |
5180 { | 5153 { |
5181 memcpy(&v0->pInventoryItems[v10-1], &pParty->pPickedItem, 0x24u); | 5154 memcpy(&v0->pInventoryItems[v10-1], &pParty->pPickedItem, 0x24u); |
5182 pMouse->RemoveHoldingItem(); | 5155 pMouse->RemoveHoldingItem(); |
5156 } | |
5157 } | |
5158 } | |
5183 } | 5159 } |
5184 } | 5160 } |
5185 | |
5186 | 5161 |
5187 //----- (0042213C) -------------------------------------------------------- | 5162 //----- (0042213C) -------------------------------------------------------- |
5188 void __cdecl OnGameViewportClick() | 5163 void __cdecl OnGameViewportClick() |
5189 { | 5164 { |
5190 signed int v0; // ebx@2 | 5165 signed int v0; // ebx@2 |
5938 v12 = v10 - v11; | 5913 v12 = v10 - v11; |
5939 v13 = 0x80000 - v11; | 5914 v13 = 0x80000 - v11; |
5940 LODWORD(v14) = v13 << 16; | 5915 LODWORD(v14) = v13 << 16; |
5941 HIDWORD(v14) = v13 >> 16; | 5916 HIDWORD(v14) = v13 >> 16; |
5942 v15 = &_50B744_view_transformed_ys[i - 1]; | 5917 v15 = &_50B744_view_transformed_ys[i - 1]; |
5943 dword_50B828[v79] = ((unsigned __int64)((_50B834_view_transformed_zs[i] - _50B834_view_transformed_zs[i - 1]) | 5918 dword_50B828[v79] = ((unsigned __int64)((_50B834_view_transformed_zs[i] - _50B834_view_transformed_zs[i - 1]) * v14 / v12) >> 16) + _50B834_view_transformed_zs[i - 1]; |
5944 * v14 | |
5945 / v12) >> 16) | |
5946 + _50B834_view_transformed_zs[i - 1]; | |
5947 thisb = (unsigned __int64)((_50B744_view_transformed_ys[i] - _50B744_view_transformed_ys[i - 1]) * v14 / v12) >> 16; | 5919 thisb = (unsigned __int64)((_50B744_view_transformed_ys[i] - _50B744_view_transformed_ys[i - 1]) * v14 / v12) >> 16; |
5948 } | 5920 } |
5949 else | 5921 else |
5950 { | 5922 { |
5951 v16 = v11 - v10; | 5923 v16 = v11 - v10; |
6026 v31 = v30 - 1; | 5998 v31 = v30 - 1; |
6027 v32 = (v31 & 0x800000) - 0x400000; | 5999 v32 = (v31 & 0x800000) - 0x400000; |
6028 } | 6000 } |
6029 } | 6001 } |
6030 dword_50BA08[v22] = v32; | 6002 dword_50BA08[v22] = v32; |
6031 dword_50BAF4_xs[v22 + 1] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) | 6003 dword_50BAF4_xs[v22 + 1] = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BAF4_xs[v22 + 1]) >> 16; |
6032 * (signed __int64)dword_50BAF4_xs[v22 + 1]) >> 16; | |
6033 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BA08[v22]) >> 16; | 6004 v35 = (unsigned __int64)(SHIWORD(pBLVRenderParams->field_40) * (signed __int64)dword_50BA08[v22]) >> 16; |
6034 dword_50BAF4_xs[v22 + 1] = pBLVRenderParams->uViewportCenterX - dword_50BAF4_xs[v22 + 1]; | 6005 dword_50BAF4_xs[v22 + 1] = pBLVRenderParams->uViewportCenterX - dword_50BAF4_xs[v22 + 1]; |
6035 ++ia; | 6006 ++ia; |
6036 } | 6007 } |
6037 v36 = 0; | 6008 v36 = 0; |
6051 v82 = v41 >= (signed int)v37; | 6022 v82 = v41 >= (signed int)v37; |
6052 if ( v38 ^ v82 ) | 6023 if ( v38 ^ v82 ) |
6053 { | 6024 { |
6054 if ( v41 >= (signed int)v37 ) | 6025 if ( v41 >= (signed int)v37 ) |
6055 { | 6026 { |
6056 v67 = (signed int)(v37 - dword_50BAF4_xs[v40]) | 6027 v67 = (signed int)(v37 - dword_50BAF4_xs[v40]) * (signed __int64)(dword_50BA08[v40] - dword_50B9F8[v40 + 3]) / (v41 - dword_50BAF4_xs[v40]); |
6057 * (signed __int64)(dword_50BA08[v40] - dword_50B9F8[v40 + 3]) | |
6058 / (v41 - dword_50BAF4_xs[v40]); | |
6059 v42 = dword_50B9F8[v40 + 3]; | 6028 v42 = dword_50B9F8[v40 + 3]; |
6060 } | 6029 } |
6061 else | 6030 else |
6062 { | 6031 { |
6063 v67 = (signed int)(v37 - v41) | 6032 v67 = (signed int)(v37 - v41) * (signed __int64)(dword_50B9F8[v40 + 3] - dword_50BA08[v40]) / (dword_50BAF4_xs[v40] - v41); |
6064 * (signed __int64)(dword_50B9F8[v40 + 3] - dword_50BA08[v40]) | |
6065 / (dword_50BAF4_xs[v40] - v41); | |
6066 v42 = dword_50BA08[v40]; | 6033 v42 = dword_50BA08[v40]; |
6067 } | 6034 } |
6068 ++v36; | 6035 ++v36; |
6069 dword_50B9F8[v36] = v67 + v42; | 6036 dword_50B9F8[v36] = v67 + v42; |
6070 v37 = pBLVRenderParams->uViewportX; | 6037 v37 = pBLVRenderParams->uViewportX; |
6078 } | 6045 } |
6079 v39 = ib++ + 1; | 6046 v39 = ib++ + 1; |
6080 } | 6047 } |
6081 while ( ib <= v79 ); | 6048 while ( ib <= v79 ); |
6082 | 6049 |
6083 if ( !v36 | 6050 if (v36 < 1) |
6084 || (v43 = 0, | |
6085 dword_50BAE8_xs[v36 + 1] = dword_50BAE8_xs[1], | |
6086 dword_50B9F8[v36 + 1] = dword_50B9F8[1], | |
6087 v44 = pBLVRenderParams->uViewportZ, | |
6088 thisd = dword_50BAE8_xs[1] <= (signed int)pBLVRenderParams->uViewportZ, | |
6089 ic = 1, | |
6090 v36 < 1) ) | |
6091 return 0; | 6051 return 0; |
6052 | |
6053 v43 = 0; | |
6054 dword_50BAE8_xs[v36 + 1] = dword_50BAE8_xs[1]; | |
6055 dword_50B9F8[v36 + 1] = dword_50B9F8[1]; | |
6056 v44 = pBLVRenderParams->uViewportZ; | |
6057 thisd = dword_50BAE8_xs[1] <= (signed int)pBLVRenderParams->uViewportZ; | |
6058 ic = 1; | |
6092 | 6059 |
6093 do | 6060 do |
6094 { | 6061 { |
6095 v45 = ic; | 6062 v45 = ic; |
6096 v46 = dword_50BAE8_xs[ic + 1]; | 6063 v46 = dword_50BAE8_xs[ic + 1]; |
6097 v83 = v46 <= (signed int)v44; | 6064 v83 = v46 <= (signed int)v44; |
6098 if ( thisd ^ v83 ) | 6065 if ( thisd ^ v83 ) |
6099 { | 6066 { |
6100 if ( v46 <= (signed int)v44 ) | 6067 if ( v46 <= (signed int)v44 ) |
6101 { | 6068 { |
6102 v68 = (signed int)(v44 - dword_50BAE8_xs[v45]) | 6069 v68 = (signed int)(v44 - dword_50BAE8_xs[v45]) * (signed __int64)(dword_50B9F8[v45 + 1] - dword_50B9F8[v45]) / (v46 - dword_50BAE8_xs[v45]); |
6103 * (signed __int64)(dword_50B9F8[v45 + 1] - dword_50B9F8[v45]) | |
6104 / (v46 - dword_50BAE8_xs[v45]); | |
6105 v47 = dword_50B9F8[v45]; | 6070 v47 = dword_50B9F8[v45]; |
6106 } | 6071 } |
6107 else | 6072 else |
6108 { | 6073 { |
6109 v68 = (signed int)(v44 - v46) | 6074 v68 = (signed int)(v44 - v46) * (signed __int64)(dword_50B9F8[v45] - dword_50B9F8[v45 + 1]) / (dword_50BAE8_xs[v45] - v46); |
6110 * (signed __int64)(dword_50B9F8[v45] - dword_50B9F8[v45 + 1]) | |
6111 / (dword_50BAE8_xs[v45] - v46); | |
6112 v47 = dword_50B9F8[v45 + 1]; | 6075 v47 = dword_50B9F8[v45 + 1]; |
6113 } | 6076 } |
6114 ++v43; | 6077 ++v43; |
6115 dword_50B9EC[v43] = v68 + v47; | 6078 dword_50B9EC[v43] = v68 + v47; |
6116 v44 = pBLVRenderParams->uViewportZ; | 6079 v44 = pBLVRenderParams->uViewportZ; |
6123 } | 6086 } |
6124 ++ic; | 6087 ++ic; |
6125 thisd = v83; | 6088 thisd = v83; |
6126 } | 6089 } |
6127 while ( ic <= v36 ); | 6090 while ( ic <= v36 ); |
6128 if ( !v43 | 6091 |
6129 || (v48 = 0, | 6092 if (v43 < 1) |
6130 dword_50BAE0[v43] = dword_50BAE0[0], | |
6131 dword_50B9F0[v43] = dword_50B9F0[0], | |
6132 v49 = pBLVRenderParams->uViewportY, | |
6133 v50 = dword_50B9F0[0] < (signed int)pBLVRenderParams->uViewportY, | |
6134 LOBYTE(v50) = dword_50B9F0[0] >= (signed int)pBLVRenderParams->uViewportY, | |
6135 v51 = 1, | |
6136 id = 1, | |
6137 v43 < 1) ) | |
6138 return 0; | 6093 return 0; |
6094 | |
6095 v48 = 0; | |
6096 dword_50BAE0[v43] = dword_50BAE0[0]; | |
6097 dword_50B9F0[v43] = dword_50B9F0[0]; | |
6098 v49 = pBLVRenderParams->uViewportY; | |
6099 v50 = dword_50B9F0[0] < (signed int)pBLVRenderParams->uViewportY; | |
6100 LOBYTE(v50) = dword_50B9F0[0] >= (signed int)pBLVRenderParams->uViewportY; | |
6101 v51 = 1; | |
6102 id = 1; | |
6139 do | 6103 do |
6140 { | 6104 { |
6141 v52 = v51; | 6105 v52 = v51; |
6142 v53 = dword_50B9F0[v52]; | 6106 v53 = dword_50B9F0[v52]; |
6143 v84 = v53 >= (signed int)v49; | 6107 v84 = v53 >= (signed int)v49; |
6144 if ( v50 ^ v84 ) | 6108 if ( v50 ^ v84 ) |
6145 { | 6109 { |
6146 if ( v53 >= (signed int)v49 ) | 6110 if ( v53 >= (signed int)v49 ) |
6147 { | 6111 { |
6148 v69 = (signed int)(v49 - dword_50B9EC[v52]) | 6112 v69 = (signed int)(v49 - dword_50B9EC[v52]) * (signed __int64)(dword_50BAE0[v52] - dword_50BADC_xs[v52]) / (v53 - dword_50B9EC[v52]); |
6149 * (signed __int64)(dword_50BAE0[v52] - dword_50BADC_xs[v52]) | |
6150 / (v53 - dword_50B9EC[v52]); | |
6151 v54 = dword_50BADC_xs[v52]; | 6113 v54 = dword_50BADC_xs[v52]; |
6152 } | 6114 } |
6153 else | 6115 else |
6154 { | 6116 { |
6155 v69 = (signed int)(v49 - v53) | 6117 v69 = (signed int)(v49 - v53) * (signed __int64)(dword_50BADC_xs[v52] - dword_50BAE0[v52]) / (dword_50B9EC[v52] - v53); |
6156 * (signed __int64)(dword_50BADC_xs[v52] - dword_50BAE0[v52]) | |
6157 / (dword_50B9EC[v52] - v53); | |
6158 v54 = dword_50BAE0[v52]; | 6118 v54 = dword_50BAE0[v52]; |
6159 } | 6119 } |
6160 ++v48; | 6120 ++v48; |
6161 dword_50BAD0[v48] = v69 + v54; | 6121 dword_50BAD0[v48] = v69 + v54; |
6162 v49 = pBLVRenderParams->uViewportY; | 6122 v49 = pBLVRenderParams->uViewportY; |
6169 dword_50B9E0_ys[v48++ + 1] = dword_50B9F0[v52]; | 6129 dword_50B9E0_ys[v48++ + 1] = dword_50B9F0[v52]; |
6170 } | 6130 } |
6171 v51 = id++ + 1; | 6131 v51 = id++ + 1; |
6172 } | 6132 } |
6173 while ( id <= v43 ); | 6133 while ( id <= v43 ); |
6174 if ( !v48 | 6134 |
6175 || (v55 = 0, | 6135 if (v48 < 1) |
6176 dword_50BAD4[v48] = dword_50BAD4[0], | |
6177 dword_50B9E0_ys[v48 + 1] = dword_50B9E0_ys[1], | |
6178 v56 = pBLVRenderParams->uViewportW, | |
6179 thise = dword_50B9E0_ys[1] <= (signed int)pBLVRenderParams->uViewportW, | |
6180 ie = 1, | |
6181 v48 < 1) ) | |
6182 return 0; | 6136 return 0; |
6137 | |
6138 v55 = 0; | |
6139 dword_50BAD4[v48] = dword_50BAD4[0]; | |
6140 dword_50B9E0_ys[v48 + 1] = dword_50B9E0_ys[1]; | |
6141 v56 = pBLVRenderParams->uViewportW; | |
6142 thise = dword_50B9E0_ys[1] <= (signed int)pBLVRenderParams->uViewportW; | |
6143 ie = 1; | |
6183 do | 6144 do |
6184 { | 6145 { |
6185 v57 = ie; | 6146 v57 = ie; |
6186 v58 = dword_50B9E0_ys[ie + 1]; | 6147 v58 = dword_50B9E0_ys[ie + 1]; |
6187 v85 = v58 <= (signed int)v56; | 6148 v85 = v58 <= (signed int)v56; |
6188 if ( thise ^ v85 ) | 6149 if ( thise ^ v85 ) |
6189 { | 6150 { |
6190 if ( v58 <= (signed int)v56 ) | 6151 if ( v58 <= (signed int)v56 ) |
6191 { | 6152 { |
6192 v70 = (signed int)(v56 - dword_50B9E0_ys[v57]) | 6153 v70 = (signed int)(v56 - dword_50B9E0_ys[v57]) * (signed __int64)(dword_50BAD4[v57] - dword_50BAD0[v57]) / (v58 - dword_50B9E0_ys[v57]); |
6193 * (signed __int64)(dword_50BAD4[v57] - dword_50BAD0[v57]) | |
6194 / (v58 - dword_50B9E0_ys[v57]); | |
6195 v59 = dword_50BAD0[v57]; | 6154 v59 = dword_50BAD0[v57]; |
6196 } | 6155 } |
6197 else | 6156 else |
6198 { | 6157 { |
6199 v70 = (signed int)(v56 - v58) | 6158 v70 = (signed int)(v56 - v58) * (signed __int64)(dword_50BAD0[v57] - dword_50BAD4[v57]) / (dword_50B9E0_ys[v57] - v58); |
6200 * (signed __int64)(dword_50BAD0[v57] - dword_50BAD4[v57]) | |
6201 / (dword_50B9E0_ys[v57] - v58); | |
6202 v59 = dword_50BAD4[v57]; | 6159 v59 = dword_50BAD4[v57]; |
6203 } | 6160 } |
6204 ++v55; | 6161 ++v55; |
6205 dword_50BAC4[v55] = v70 + v59; | 6162 dword_50BAC4[v55] = v70 + v59; |
6206 v56 = pBLVRenderParams->uViewportW; | 6163 v56 = pBLVRenderParams->uViewportW; |
6213 } | 6170 } |
6214 ++ie; | 6171 ++ie; |
6215 thise = v85; | 6172 thise = v85; |
6216 } | 6173 } |
6217 while ( ie <= v48 ); | 6174 while ( ie <= v48 ); |
6175 | |
6218 if ( !v55 ) | 6176 if ( !v55 ) |
6219 return 0; | 6177 return 0; |
6220 v61 = pRenderer->pRenderD3D == 0; | 6178 v61 = pRenderer->pRenderD3D == 0; |
6221 dword_50BAC8[v55] = dword_50BAC8[0]; | 6179 dword_50BAC8[v55] = dword_50BAC8[0]; |
6222 dword_50B9D8_ys[v55] = dword_50B9D8_ys[0]; | 6180 dword_50B9D8_ys[v55] = dword_50B9D8_ys[0]; |