comparison mm7_5.cpp @ 146:30e731fc0f7a

Слияние
author Ritor1
date Mon, 11 Feb 2013 09:08:00 +0600
parents bd185c7cbd09 bf7ea4c330b3
children c70fea5013aa
comparison
equal deleted inserted replaced
145:bd185c7cbd09 146:30e731fc0f7a
66 signed int v0; // edi@6 66 signed int v0; // edi@6
67 char *v1; // esi@6 67 char *v1; // esi@6
68 unsigned int v2; // edx@7 68 unsigned int v2; // edx@7
69 Actor *pActor; // ecx@13 69 Actor *pActor; // ecx@13
70 int v4; // ecx@18 70 int v4; // ecx@18
71 NPCData *pNPCData; // eax@18 71 NPCData *pNPCData0; // eax@18
72 int v6; // edx@20 72 int v6; // edx@20
73 int v7; // ecx@29 73 int v7; // ecx@29
74 unsigned int v8; // edx@59 74 unsigned int v8; // edx@59
75 unsigned int v9; // ecx@60 75 unsigned int v9; // ecx@60
76 unsigned int v10; // ecx@73 76 unsigned int v10; // ecx@73
339 if ( pMessageQueue_50CBD0->uNumMessages ) 339 if ( pMessageQueue_50CBD0->uNumMessages )
340 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0; 340 pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
341 uAction = 0; 341 uAction = 0;
342 uNumSeconds = uMessage - 134; 342 uNumSeconds = uMessage - 134;
343 v4 = 0; 343 v4 = 0;
344 pNPCData = pParty->pHirelings; 344 pNPCData0 = pParty->pHirelings;
345 do 345 do
346 { 346 {
347 if ( pNPCData->pName ) 347 if ( pNPCData0->pName )
348 { 348 {
349 v6 = uAction++; 349 v6 = uAction++;
350 pTmpBuf[v6] = v4; 350 pTmpBuf[v6] = v4;
351 } 351 }
352 ++pNPCData; 352 ++pNPCData0;
353 ++v4; 353 ++v4;
354 } 354 }
355 while ( (signed int)pNPCData < (signed int)&pParty->pPickedItem ); 355 while ( (signed int)pNPCData0 < (signed int)&pParty->pPickedItem );
356 _this = 0; 356 _this = 0;
357 if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) 357 if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
358 { 358 {
359 pNPCData4 = pNPCStats->pNewNPCData; 359 pNPCData4 = pNPCStats->pNewNPCData;
360 do 360 do
1775 back_to_game(); 1775 back_to_game();
1776 continue; 1776 continue;
1777 } 1777 }
1778 sub_41426F(); 1778 sub_41426F();
1779 continue; 1779 continue;
1780 case UIMSG_BC: 1780 case UIMSG_ScrollNPCPanel://Right and Left button for NPCPanel
1781 if ( uMessageParam ) 1781 if ( uMessageParam )
1782 { 1782 {
1783 GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)pBtn_NPCRight, 0); 1783 GUIWindow::Create(626, 179, 0, 0, (enum WindowType)90, (int)pBtn_NPCRight, 0);
1784 v37 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + (unsigned __int8)pParty->field_70A - 2; 1784 v37 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + (unsigned __int8)pParty->field_70A - 2;
1785 if ( (unsigned __int8)pParty->field_709 < v37 ) 1785 if ( (unsigned __int8)pParty->field_709 < v37 )
1786 { 1786 {
1787 ++pParty->field_709; 1787 ++pParty->field_709;//??? maybe number of the first cell???
1788 if ( (unsigned __int8)pParty->field_709 >= v37 ) 1788 if ( (unsigned __int8)pParty->field_709 >= v37 )
1789 pParty->field_709 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + pParty->field_70A - 2; 1789 pParty->field_709 = (pParty->pHirelings[0].pName != 0) + (pParty->pHirelings[1].pName != 0) + pParty->field_70A - 2;
1790 } 1790 }
1791 } 1791 }
1792 else 1792 else
1793 { 1793 {
1794 GUIWindow::Create(0x1D5u, 0xB3u, 0, 0, (enum WindowType)90, (int)pBtn_NPCLeft, 0); 1794 GUIWindow::Create(469, 179, 0, 0, (enum WindowType)90, (int)pBtn_NPCLeft, 0);
1795 if ( pParty->field_709 ) 1795 if ( pParty->field_709 )
1796 { 1796 {
1797 --pParty->field_709; 1797 --pParty->field_709;
1798 if ( pParty->field_709 < 1 ) 1798 if ( pParty->field_709 < 1 )
1799 pParty->field_709 = 0; 1799 pParty->field_709 = 0;
15997 } 15997 }
15998 } 15998 }
15999 15999
16000 16000
16001 //----- (00416B01) -------------------------------------------------------- 16001 //----- (00416B01) --------------------------------------------------------
16002 void __thiscall sub_416B01(void *_this) 16002 void __thiscall sub_416B01(void *_this)//PopupWindowForBenefitAndJoinText
16003 { 16003 {
16004 int v1; // edi@2 16004 int v1; // edi@2
16005 int v2; // ecx@2 16005 int v2; // ecx@2
16006 NPCData *v3; // eax@2 16006 NPCData *v3; // eax@2
16007 NPCData *v4; // esi@7 16007 NPCData *v4; // esi@7
16024 if ( bNoNPCHiring != 1 ) 16024 if ( bNoNPCHiring != 1 )
16025 { 16025 {
16026 v1 = 0; 16026 v1 = 0;
16027 v2 = 0; 16027 v2 = 0;
16028 v3 = pParty->pHirelings; 16028 v3 = pParty->pHirelings;
16029 do 16029 /*do
16030 { 16030 {
16031 if ( v3->pName ) 16031 if ( v3->pName )
16032 pTmpBuf[v1++] = v2; 16032 pTmpBuf[v1++] = v2;
16033 ++v3; 16033 ++v3;
16034 ++v2; 16034 ++v2;
16035 } 16035 }
16036 while ( (signed int)v3 < (signed int)&pParty->pPickedItem ); 16036 while ( (signed int)v3 < (signed int)&pParty->pPickedItem );*/
16037 for (int i = 0; i < 2; ++i)
16038 {
16039 if (pParty->pHirelings[i].pName)
16040 pTmpBuf[v1++] = i;
16041 }
16037 lpsz = 0; 16042 lpsz = 0;
16038 if ( (signed int)pNPCStats->uNumNewNPCs > 0 ) 16043 if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
16039 { 16044 {
16040 v4 = pNPCStats->pNewNPCData; 16045 /*v4 = pNPCStats->pNewNPCData;
16041 do 16046 do
16042 { 16047 {
16043 if ( v4->uFlags & 0x80 16048 if ( v4->uFlags & 0x80
16044 && (!pParty->pHirelings[0].pName || strcmp(v4->pName, pParty->pHirelings[0].pName)) 16049 && (!pParty->pHirelings[0].pName || strcmp(v4->pName, pParty->pHirelings[0].pName))
16045 && (!pParty->pHirelings[1].pName || strcmp(v4->pName, pParty->pHirelings[1].pName)) ) 16050 && (!pParty->pHirelings[1].pName || strcmp(v4->pName, pParty->pHirelings[1].pName)) )
16046 pTmpBuf[v1++] = (char)lpsz + 2; 16051 pTmpBuf[v1++] = (char)lpsz + 2;
16047 ++lpsz; 16052 ++lpsz;
16048 ++v4; 16053 ++v4;
16049 } 16054 }
16050 while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs ); 16055 while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );*/
16056 for (int i = 0; i < pNPCStats->uNumNewNPCs; ++i)
16057 {
16058 if (pNPCStats->pNewNPCData[i].uFlags & 0x80)
16059 {
16060 if (!pParty->pHirelings[0].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[0].pName))
16061 {
16062 if (!pParty->pHirelings[1].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[1].pName))
16063 pTmpBuf[v1++] = i + 2;
16064 }
16065 }
16066 }
16051 } 16067 }
16052 if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 ) 16068 if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 )
16053 { 16069 {
16054 uDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17; 16070 uDialogue_SpeakingActorNPC_ID = -1 - (unsigned __int8)pParty->field_709 - (int)v17;
16055 v5 = GetNewNPCData(uDialogue_SpeakingActorNPC_ID, (int)&a2); 16071 v5 = GetNewNPCData(uDialogue_SpeakingActorNPC_ID, (int)&a2);
16057 if ( v5 ) 16073 if ( v5 )
16058 { 16074 {
16059 if ( a2 == 57 ) 16075 if ( a2 == 57 )
16060 v7 = pNPCTopics[512].pText; 16076 v7 = pNPCTopics[512].pText;
16061 else 16077 else
16062 v7 = (const CHAR *)*(&pNPCStats->field_13A5C + 5 * v5->uProfession); 16078 v7 = (const CHAR *)pNPCStats->pProfessions[v5->uProfession].pBenefits;
16063 lpsz = v7; 16079 lpsz = v7;
16064 if ( !v7 ) 16080 if ( !v7 )
16065 { 16081 {
16066 lpsz = (LPCSTR)*(&pNPCStats->field_13A64 + 5 * v6->uProfession); 16082 lpsz = (LPCSTR)pNPCStats->pProfessions[v5->uProfession].pJoinText;
16067 if ( !lpsz ) 16083 if ( !lpsz )
16068 lpsz = ""; 16084 lpsz = "";
16069 } 16085 }
16070 a1.Hint = 0; 16086 a1.Hint = 0;
16071 a1.uFrameX = 38; 16087 a1.uFrameX = 38;