Mercurial > mm7
comparison mm7_4.cpp @ 726:9d13d2ec35a6
Слияние
author | Ritor1 |
---|---|
date | Fri, 22 Mar 2013 01:29:46 +0600 |
parents | 7037f22cd716 e7c86528a2b3 |
children | 9f596a163257 |
comparison
equal
deleted
inserted
replaced
725:7037f22cd716 | 726:9d13d2ec35a6 |
---|---|
5756 } | 5756 } |
5757 | 5757 |
5758 | 5758 |
5759 | 5759 |
5760 //----- (004AD504) -------------------------------------------------------- | 5760 //----- (004AD504) -------------------------------------------------------- |
5761 int __fastcall sub_4AD504(unsigned int uFaceID) | 5761 int __fastcall sub_4AD504(signed int sFaceID) |
5762 { | 5762 { |
5763 int result; // eax@1 | 5763 int result; // eax@1 |
5764 unsigned int v2; // ebx@1 | 5764 signed int v2; // ebx@1 |
5765 BLVFace *v3; // esi@3 | 5765 BLVFace *v3; // esi@3 |
5766 Texture *v4; // edi@6 | 5766 Texture *v4; // edi@6 |
5767 int v5; // eax@7 | 5767 int v5; // eax@7 |
5768 int v6; // edx@7 | 5768 int v6; // edx@7 |
5769 int v7; // ecx@7 | 5769 int v7; // ecx@7 |
5883 unsigned int v121; // [sp+98h] [bp-Ch]@15 | 5883 unsigned int v121; // [sp+98h] [bp-Ch]@15 |
5884 unsigned __int16 *v122; // [sp+9Ch] [bp-8h]@15 | 5884 unsigned __int16 *v122; // [sp+9Ch] [bp-8h]@15 |
5885 unsigned int v123; // [sp+A0h] [bp-4h]@13 | 5885 unsigned int v123; // [sp+A0h] [bp-4h]@13 |
5886 | 5886 |
5887 result = pRenderer->uTargetSurfacePitch; | 5887 result = pRenderer->uTargetSurfacePitch; |
5888 v2 = uFaceID; | 5888 v2 = sFaceID; |
5889 v95 = pRenderer->uTargetSurfacePitch; | 5889 v95 = pRenderer->uTargetSurfacePitch; |
5890 if ( (uFaceID & 0x80000000u) == 0 ) | 5890 if ( sFaceID >= 0 ) |
5891 { | 5891 { |
5892 if ( (signed int)uFaceID < (signed int)pIndoor->uNumFaces ) | 5892 if ( sFaceID < (signed int)pIndoor->uNumFaces ) |
5893 { | 5893 { |
5894 v3 = &pIndoor->pFaces[uFaceID]; | 5894 v3 = &pIndoor->pFaces[sFaceID]; |
5895 v91 = &pIndoor->pFaces[uFaceID]; | 5895 v91 = &pIndoor->pFaces[sFaceID]; |
5896 if ( !pRenderer->pRenderD3D ) | 5896 if ( !pRenderer->pRenderD3D ) |
5897 { | 5897 { |
5898 result = sub_423B5D(uFaceID); | 5898 result = sub_423B5D(sFaceID); |
5899 if ( result ) | 5899 if ( result ) |
5900 { | 5900 { |
5901 result = sub_424829(result, &stru_F8A590, pBLVRenderParams->field_7C, v2); | 5901 result = sub_424829(result, &stru_F8A590, pBLVRenderParams->field_7C, v2); |
5902 if ( result ) | 5902 if ( result ) |
5903 { | 5903 { |
5924 v94 = sr_sub_47C24C_get_palette(v3, v92, 0, 1); | 5924 v94 = sr_sub_47C24C_get_palette(v3, v92, 0, 1); |
5925 result = stru_F8A590._viewport_space_y; | 5925 result = stru_F8A590._viewport_space_y; |
5926 a2 = stru_F8A590._viewport_space_y; | 5926 a2 = stru_F8A590._viewport_space_y; |
5927 v11 = stru_F8A590._viewport_space_y * pRenderer->uTargetSurfacePitch; | 5927 v11 = stru_F8A590._viewport_space_y * pRenderer->uTargetSurfacePitch; |
5928 v99 = 640 * stru_F8A590._viewport_space_y; | 5928 v99 = 640 * stru_F8A590._viewport_space_y; |
5929 v86 = v4->pLevelOfDetail0; | 5929 v86 = v4->pLevelOfDetail0_prolly_alpha_mask; |
5930 v87 = v4->pLevelOfDetail1; | 5930 v87 = v4->pLevelOfDetail1; |
5931 v88 = v4->pLevelOfDetail2; | 5931 v88 = v4->pLevelOfDetail2; |
5932 v89 = v4->pLevelOfDetail3; | 5932 v89 = v4->pLevelOfDetail3; |
5933 v98 = stru_F8A590._viewport_space_y * pRenderer->uTargetSurfacePitch; | 5933 v98 = stru_F8A590._viewport_space_y * pRenderer->uTargetSurfacePitch; |
5934 v104 = 2 * pBLVRenderParams->field_0_timer_; | 5934 v104 = 2 * pBLVRenderParams->field_0_timer_; |
6406 else | 6406 else |
6407 { | 6407 { |
6408 v49 = v4->uWidthMinus1; | 6408 v49 = v4->uWidthMinus1; |
6409 v47 = v4->uHeightMinus1 << 16; | 6409 v47 = v4->uHeightMinus1 << 16; |
6410 v9 = 16 - v4->uWidthLn2; | 6410 v9 = 16 - v4->uWidthLn2; |
6411 v10 = v4->pLevelOfDetail0; | 6411 v10 = v4->pLevelOfDetail0_prolly_alpha_mask; |
6412 LOBYTE(v2->uAttributes) |= 0x80u; | 6412 LOBYTE(v2->uAttributes) |= 0x80u; |
6413 v48 = v9; | 6413 v48 = v9; |
6414 v50 = v10; | 6414 v50 = v10; |
6415 sub_4AF412(); | 6415 sub_4AF412(); |
6416 ++pBLVRenderParams->uNumFacesRenderedThisFrame; | 6416 ++pBLVRenderParams->uNumFacesRenderedThisFrame; |
9456 pParty->field_709 = 0; | 9456 pParty->field_709 = 0; |
9457 Party__CountHirelings(); | 9457 Party__CountHirelings(); |
9458 | 9458 |
9459 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); | 9459 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); |
9460 | 9460 |
9461 if ( (sDialogue_SpeakingActorNPC_ID & 0x80000000u) == 0 ) | 9461 if ( sDialogue_SpeakingActorNPC_ID >= 0 ) |
9462 pDialogue_SpeakingActor->uAIState = Removed; | 9462 pDialogue_SpeakingActor->uAIState = Removed; |
9463 if ( uActiveCharacter ) | 9463 if ( uActiveCharacter ) |
9464 pPlayers[uActiveCharacter]->PlaySound(SPEECH_61, 0); | 9464 pPlayers[uActiveCharacter]->PlaySound(SPEECH_61, 0); |
9465 } | 9465 } |
9466 } | 9466 } |
9677 | 9677 |
9678 | 9678 |
9679 | 9679 |
9680 | 9680 |
9681 //----- (004B6478) -------------------------------------------------------- | 9681 //----- (004B6478) -------------------------------------------------------- |
9682 int __cdecl sub_4B6478() | 9682 void sub_4B6478() |
9683 { | 9683 { |
9684 GUIWindow *v0; // ebx@1 | 9684 GUIWindow *v0; // ebx@1 |
9685 Player *v1; // edi@1 | 9685 Player *v1; // edi@1 |
9686 unsigned int v2; // eax@1 | 9686 unsigned int v2; // eax@1 |
9687 signed int v3; // esi@1 | 9687 signed int v3; // esi@1 |
9688 int v4; // ebx@1 | 9688 int v4; // ebx@1 |
9785 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3; | 9785 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3; |
9786 *(&pMessageQueue_50CBD0->uNumMessages + result) = v5; | 9786 *(&pMessageQueue_50CBD0->uNumMessages + result) = v5; |
9787 ++pMessageQueue_50CBD0->uNumMessages; | 9787 ++pMessageQueue_50CBD0->uNumMessages; |
9788 }*/ | 9788 }*/ |
9789 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5); | 9789 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5); |
9790 return result; // void func | 9790 return; // void func |
9791 } | 9791 } |
9792 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v1->_guilds_member_bits, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) ) | 9792 if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v1->_guilds_member_bits, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) ) |
9793 { | 9793 { |
9794 v24 = pNPCTopics[171].pText; | 9794 v24 = pNPCTopics[171].pText; |
9795 v25 = v31; | 9795 v25 = v31; |
9796 v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0); | 9796 v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0); |
9797 v28.DrawTitleText(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u); | 9797 v28.DrawTitleText(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u); |
9798 result = (int)pDialogueWindow; | |
9799 pDialogueWindow->pNumPresenceButton = 0; | 9798 pDialogueWindow->pNumPresenceButton = 0; |
9800 return result; | 9799 return ; |
9801 } | 9800 } |
9802 result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win(); | 9801 |
9803 if ( !result ) | 9802 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) |
9804 return result; | 9803 return; |
9805 v8 = pDialogueWindow; | 9804 v8 = pDialogueWindow; |
9806 v33 = 0; | 9805 v33 = 0; |
9807 v34 = 0; | 9806 v34 = 0; |
9808 v29 = pDialogueWindow; | 9807 v29 = pDialogueWindow; |
9809 v9 = pDialogueWindow->pStartingPosActiveItem; | 9808 v9 = pDialogueWindow->pStartingPosActiveItem; |
9830 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->classType]); | 9829 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->classType]); |
9831 strcat(pTmpBuf, "\n \n"); | 9830 strcat(pTmpBuf, "\n \n"); |
9832 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); | 9831 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); |
9833 v22 = v31; | 9832 v22 = v31; |
9834 v23 = pFontArrus->CalcTextHeight(pTmpBuf, &v28, 0, 0); | 9833 v23 = pFontArrus->CalcTextHeight(pTmpBuf, &v28, 0, 0); |
9835 return (int)v28.DrawTitleText(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf, 3u); | 9834 v28.DrawTitleText(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf, 3u); |
9835 return; | |
9836 } | 9836 } |
9837 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v32); | 9837 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v32); |
9838 v28.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); | 9838 v28.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); |
9839 v32 = (149 - v33) / v34; | 9839 v32 = (149 - v33) / v34; |
9840 if ( (149 - v33) / v34 > 32 ) | 9840 if ( (149 - v33) / v34 > 32 ) |
9841 v32 = 32; | 9841 v32 = 32; |
9842 result = v8->pStartingPosActiveItem; | 9842 |
9843 v35 = result; | 9843 v35 = v8->pStartingPosActiveItem; |
9844 v34 = (149 - v34 * v32 - v33) / 2 - v32 / 2 + 162; | 9844 v34 = (149 - v34 * v32 - v33) / 2 - v32 / 2 + 162; |
9845 if ( result < result + v8->pNumPresenceButton ) | 9845 if ( v8->pStartingPosActiveItem < v8->pStartingPosActiveItem+ v8->pNumPresenceButton ) |
9846 { | 9846 { |
9847 v33 = 2; | 9847 v33 = 2; |
9848 do | 9848 do |
9849 { | 9849 { |
9850 v14 = v8->GetControl(v35); | 9850 v14 = v8->GetControl(v35); |
9878 v14->uY = v16; | 9878 v14->uY = v16; |
9879 LABEL_34: | 9879 LABEL_34: |
9880 v8 = v29; | 9880 v8 = v29; |
9881 ++v35; | 9881 ++v35; |
9882 ++v33; | 9882 ++v33; |
9883 result = v29->pNumPresenceButton + v29->pStartingPosActiveItem; | 9883 } |
9884 } | 9884 while ( v35 <v29->pNumPresenceButton + v29->pStartingPosActiveItem ); |
9885 while ( v35 < result ); | 9885 } |
9886 } | 9886 return; |
9887 return result; | |
9888 } | 9887 } |
9889 | 9888 |
9890 | 9889 |
9891 | 9890 |
9892 //----- (004B6943) -------------------------------------------------------- | 9891 //----- (004B6943) -------------------------------------------------------- |
10829 } | 10828 } |
10830 v21 = pGlobalTXT_LocalizationStrings[73]; | 10829 v21 = pGlobalTXT_LocalizationStrings[73]; |
10831 LABEL_19: | 10830 LABEL_19: |
10832 strcpy(sHouseName, v21); | 10831 strcpy(sHouseName, v21); |
10833 LABEL_20: | 10832 LABEL_20: |
10834 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)26, 0, (int)sHouseName); | 10833 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_Transition, 0, (int)sHouseName); |
10835 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) | 10834 //if ( BYTE1(pAnimatedRooms[p2DEvents_minus1___02[26 * v9]].field_C) ) |
10836 if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].uRoomSoundId ) | 10835 if ( pAnimatedRooms[p2DEvents[v9 - 1].uAnimationID].uRoomSoundId ) |
10837 HousePlaySomeSound(v9, 1); | 10836 HousePlaySomeSound(v9, 1); |
10838 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) | 10837 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor && uActiveCharacter && pParty->uFlags & 0x30 ) |
10839 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); | 10838 pPlayers[uActiveCharacter]->PlaySound(SPEECH_47, 0); |