Mercurial > mm7
comparison mm7_4.cpp @ 1205:8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 00:30:48 +0200 |
parents | 0dbf6c4dd029 |
children | ab6560001f5b |
comparison
equal
deleted
inserted
replaced
1204:832f09144726 | 1205:8c02e6f74b29 |
---|---|
793 goto LABEL_54; | 793 goto LABEL_54; |
794 v23 = 0; | 794 v23 = 0; |
795 do | 795 do |
796 { | 796 { |
797 v24 = dword_720F20[v5 / 4]; | 797 v24 = dword_720F20[v5 / 4]; |
798 v25 = *(int *)((char *)dword_720F20 + v23); | 798 v25 = *(int *)((char *)dword_720F20.data() + v23); |
799 if ( v24 == v25 ) | 799 if ( v24 == v25 ) |
800 goto LABEL_50; | 800 goto LABEL_50; |
801 if ( v25 > a3 + 15 ) | 801 if ( v25 > a3 + 15 ) |
802 { | 802 { |
803 if ( v24 >= v25 ) | 803 if ( v24 >= v25 ) |
1474 int v0; // ecx@1 | 1474 int v0; // ecx@1 |
1475 Edge **v1; // eax@1 | 1475 Edge **v1; // eax@1 |
1476 signed int v2; // eax@3 | 1476 signed int v2; // eax@3 |
1477 | 1477 |
1478 v0 = 0; | 1478 v0 = 0; |
1479 v1 = ptr_80CA10; | 1479 v1 = ptr_80CA10.data(); |
1480 do | 1480 do |
1481 { | 1481 { |
1482 ++v0; | 1482 ++v0; |
1483 *((int *)&pNewEdges[v0] - 9) = (int)&defaultEdge; | 1483 *((int *)&pNewEdges[v0] - 9) = (int)&defaultEdge; |
1484 *v1 = 0; | 1484 *v1 = 0; |
2400 v14 = pPlayers[v12]; | 2400 v14 = pPlayers[v12]; |
2401 v15 = (double)pPlayers[v12]->GetMaxHealth() * 0.1; | 2401 v15 = (double)pPlayers[v12]->GetMaxHealth() * 0.1; |
2402 v14->ReceiveDamage((signed __int64)v15, DMGT_FIRE); | 2402 v14->ReceiveDamage((signed __int64)v15, DMGT_FIRE); |
2403 if ( pParty->uFlags & 4 ) | 2403 if ( pParty->uFlags & 4 ) |
2404 { | 2404 { |
2405 strcpy(GameUI_Footer_TimedString, pGlobalTXT_LocalizationStrings[660]); | 2405 strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[660]); |
2406 GameUI_Footer_TimeLeft = 128; | 2406 GameUI_Footer_TimeLeft = 128; |
2407 } | 2407 } |
2408 goto LABEL_39; | 2408 goto LABEL_39; |
2409 } | 2409 } |
2410 v13 = pPlayers[v12]; | 2410 v13 = pPlayers[v12]; |
2429 v17 = *v16; | 2429 v17 = *v16; |
2430 v18 = (double)(*v16)->GetMaxHealth() * 0.1; | 2430 v18 = (double)(*v16)->GetMaxHealth() * 0.1; |
2431 v17->ReceiveDamage((signed __int64)v18, DMGT_FIRE); | 2431 v17->ReceiveDamage((signed __int64)v18, DMGT_FIRE); |
2432 if ( pParty->uFlags & 0x200 ) | 2432 if ( pParty->uFlags & 0x200 ) |
2433 { | 2433 { |
2434 strcpy(GameUI_Footer_TimedString, pGlobalTXT_LocalizationStrings[661]); | 2434 strcpy(GameUI_Footer_TimedString.data(), pGlobalTXT_LocalizationStrings[661]); |
2435 GameUI_Footer_TimeLeft = 128; | 2435 GameUI_Footer_TimeLeft = 128; |
2436 } | 2436 } |
2437 ++v16; | 2437 ++v16; |
2438 } | 2438 } |
2439 while ( (signed int)v16 <= (signed int)&pPlayers[4] ); | 2439 while ( (signed int)v16 <= (signed int)&pPlayers[4] ); |
3365 | 3365 |
3366 a1[0] = 0; | 3366 a1[0] = 0; |
3367 pPlayer = &pParty->pPlayers[v6]; | 3367 pPlayer = &pParty->pPlayers[v6]; |
3368 v59 = TargetColor(255, 255, 155); | 3368 v59 = TargetColor(255, 255, 155); |
3369 //v61 = pPlayer; | 3369 //v61 = pPlayer; |
3370 memset(pTmpBuf2, 0, sizeof(pTmpBuf2)); | 3370 memset(pTmpBuf2.data(), 0, sizeof(pTmpBuf2)); |
3371 | 3371 |
3372 NPCData *npc = nullptr; | 3372 NPCData *npc = nullptr; |
3373 if ( dword_5C35D4 ) | 3373 if ( dword_5C35D4 ) |
3374 { | 3374 { |
3375 //__debugbreak(); // fix | 3375 //__debugbreak(); // fix |
3535 | 3535 |
3536 case 15: | 3536 case 15: |
3537 { | 3537 { |
3538 v11 = pGlobalTXT_LocalizationStrings[393];// "daughter" | 3538 v11 = pGlobalTXT_LocalizationStrings[393];// "daughter" |
3539 _continue_strcat: | 3539 _continue_strcat: |
3540 strcat(pTmpBuf2, v11); | 3540 strcat(pTmpBuf2.data(), v11); |
3541 dst = strlen(pTmpBuf2); | 3541 dst = strlen(pTmpBuf2.data()); |
3542 //v64 += 2; | 3542 //v64 += 2; |
3543 i += 2; | 3543 i += 2; |
3544 } | 3544 } |
3545 break; | 3545 break; |
3546 | 3546 |
3576 v11 = a1; | 3576 v11 = a1; |
3577 goto _continue_strcat; | 3577 goto _continue_strcat; |
3578 | 3578 |
3579 case 23: | 3579 case 23: |
3580 { | 3580 { |
3581 v47 = pMapStats->GetMapInfo(pCurrentMapName); | 3581 v47 = pMapStats->GetMapInfo(pCurrentMapName.data()); |
3582 if ( v47 ) | 3582 if ( v47 ) |
3583 v11 = pMapStats->pInfos[v47].pName; | 3583 v11 = pMapStats->pInfos[v47].pName; |
3584 else | 3584 else |
3585 v11 = pGlobalTXT_LocalizationStrings[394];// "Unknown" | 3585 v11 = pGlobalTXT_LocalizationStrings[394];// "Unknown" |
3586 goto _continue_strcat; | 3586 goto _continue_strcat; |
3725 v11 = a1; | 3725 v11 = a1; |
3726 goto _continue_strcat; | 3726 goto _continue_strcat; |
3727 } | 3727 } |
3728 } | 3728 } |
3729 } | 3729 } |
3730 return pTmpBuf2; | 3730 return pTmpBuf2.data(); |
3731 } | 3731 } |
3732 | 3732 |
3733 //----- (0049B04D) -------------------------------------------------------- | 3733 //----- (0049B04D) -------------------------------------------------------- |
3734 void stru154::GetFacePlaneAndClassify(ODMFace *a2, BSPVertexBuffer *a3) | 3734 void stru154::GetFacePlaneAndClassify(ODMFace *a2, BSPVertexBuffer *a3) |
3735 { | 3735 { |
6056 int v14; // [sp+70h] [bp-4h]@4 | 6056 int v14; // [sp+70h] [bp-4h]@4 |
6057 | 6057 |
6058 v1 = *_this - 399; | 6058 v1 = *_this - 399; |
6059 v2 = (*_this - 400) % 11 + 1; | 6059 v2 = (*_this - 400) % 11 + 1; |
6060 v11 = 4 * (*_this - 400) / 11; | 6060 v11 = 4 * (*_this - 400) / 11; |
6061 sprintf(pTmpBuf, "%s%03d", spellbook_texture_filename_suffices[v11 / 4], v2); | 6061 sprintf(pTmpBuf.data(), "%s%03d", spellbook_texture_filename_suffices[v11 / 4], v2); |
6062 if ( pMouse->GetCursorPos(&a2)->y <= 320 ) | 6062 if ( pMouse->GetCursorPos(&a2)->y <= 320 ) |
6063 v3 = pMouse->GetCursorPos(&a2)->y + 30; | 6063 v3 = pMouse->GetCursorPos(&a2)->y + 30; |
6064 else | 6064 else |
6065 v3 = 30; | 6065 v3 = 30; |
6066 a1.Hint = 0; | 6066 a1.Hint = 0; |
6079 v5 = v14; | 6079 v5 = v14; |
6080 if ( v13 > v5 ) | 6080 if ( v13 > v5 ) |
6081 v5 = v13; | 6081 v5 = v13; |
6082 if ( v4 > v5 ) | 6082 if ( v4 > v5 ) |
6083 v5 = v4; | 6083 v5 = v4; |
6084 sprintf(pTmpBuf2, "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s", | 6084 sprintf(pTmpBuf2.data(), "%s\n\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s\t000\n%s\t%03d:\t%03d%s", |
6085 pSpellStats->pInfos[v1].pDescription, pGlobalTXT_LocalizationStrings[431], // "Normal" | 6085 pSpellStats->pInfos[v1].pDescription, pGlobalTXT_LocalizationStrings[431], // "Normal" |
6086 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pBasicSkillDesc, pGlobalTXT_LocalizationStrings[433], // "Expert" | 6086 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pBasicSkillDesc, pGlobalTXT_LocalizationStrings[433], // "Expert" |
6087 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pExpertSkillDesc, pGlobalTXT_LocalizationStrings[432], // "Master" | 6087 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pExpertSkillDesc, pGlobalTXT_LocalizationStrings[432], // "Master" |
6088 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pMasterSkillDesc, pGlobalTXT_LocalizationStrings[96], // "Grand" | 6088 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pMasterSkillDesc, pGlobalTXT_LocalizationStrings[96], // "Grand" |
6089 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pGrandmasterSkillDesc); | 6089 v5 + 3, v5 + 10, pSpellStats->pInfos[v1].pGrandmasterSkillDesc); |
6090 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2, &a1, 0, 0); | 6090 v6 = pFontSmallnum->CalcTextHeight(pTmpBuf2.data(), &a1, 0, 0); |
6091 a1.uFrameHeight += v6; | 6091 a1.uFrameHeight += v6; |
6092 if ( (signed int)a1.uFrameHeight < 150 ) | 6092 if ( (signed int)a1.uFrameHeight < 150 ) |
6093 a1.uFrameHeight = 150; | 6093 a1.uFrameHeight = 150; |
6094 a1.uFrameWidth = game_viewport_width; | 6094 a1.uFrameWidth = game_viewport_width; |
6095 a1.DrawMessageBox(0); | 6095 a1.DrawMessageBox(0); |
6098 v7 = pSpellStats->pInfos[v1].pName; | 6098 v7 = pSpellStats->pInfos[v1].pName; |
6099 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; | 6099 a1.uFrameZ = a1.uFrameX + a1.uFrameWidth - 1; |
6100 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; | 6100 a1.uFrameW = a1.uFrameHeight + a1.uFrameY - 1; |
6101 v8 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 6101 v8 = TargetColor(0xFFu, 0xFFu, 0x9Bu); |
6102 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); | 6102 a1.DrawTitleText(pFontArrus, 0x78u, 0xCu, v8, v7, 3u); |
6103 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2, 0, 0, 0); | 6103 a1.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0); |
6104 a1.uFrameZ = a1.uFrameX + 107; | 6104 a1.uFrameZ = a1.uFrameX + 107; |
6105 a1.uFrameWidth = 108; | 6105 a1.uFrameWidth = 108; |
6106 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v11 / 4 + 12], 3u); | 6106 a1.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[v11 / 4 + 12], 3u); |
6107 sprintf(pTmpBuf, "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * v1)); | 6107 sprintf(pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[522], *(&pSpellDatas[0].uNormalLevelMana + 10 * v1)); |
6108 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf, 3); | 6108 a1.DrawTitleText(pFontComic, 0xCu, a1.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf.data(), 3); |
6109 } | 6109 } |
6110 | 6110 |
6111 //----- (004B1784) -------------------------------------------------------- | 6111 //----- (004B1784) -------------------------------------------------------- |
6112 bool __cdecl sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() | 6112 bool __cdecl sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() |
6113 { | 6113 { |
6128 pDialogueWindow->pNumPresenceButton = 0; | 6128 pDialogueWindow->pNumPresenceButton = 0; |
6129 memcpy(&v4, pPrimaryWindow, sizeof(v4)); | 6129 memcpy(&v4, pPrimaryWindow, sizeof(v4)); |
6130 v4.uFrameX = 483; | 6130 v4.uFrameX = 483; |
6131 v4.uFrameWidth = 148; | 6131 v4.uFrameWidth = 148; |
6132 v4.uFrameZ = 334; | 6132 v4.uFrameZ = 334; |
6133 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[427], pPlayer->pName, pGlobalTXT_LocalizationStrings[562]);// | 6133 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[427], pPlayer->pName, pGlobalTXT_LocalizationStrings[562]);// |
6134 // "%s is in no condition to %s" | 6134 // "%s is in no condition to %s" |
6135 // "do anything" | 6135 // "do anything" |
6136 v2 = TargetColor(255, 255, 0x9Bu); | 6136 v2 = TargetColor(255, 255, 0x9Bu); |
6137 v3 = pFontArrus->CalcTextHeight(pTmpBuf, &v4, 0, 0); | 6137 v3 = pFontArrus->CalcTextHeight(pTmpBuf.data(), &v4, 0, 0); |
6138 v4.DrawTitleText(pFontArrus, 0, (212 - v3) / 2 + 101, v2, pTmpBuf, 3u); | 6138 v4.DrawTitleText(pFontArrus, 0, (212 - v3) / 2 + 101, v2, pTmpBuf.data(), 3u); |
6139 result = 0; | 6139 result = 0; |
6140 } | 6140 } |
6141 return result; | 6141 return result; |
6142 } | 6142 } |
6143 // F8B1E0: using guessed type int dword_F8B1E0; | 6143 // F8B1E0: using guessed type int dword_F8B1E0; |
6357 | 6357 |
6358 contract_approved = 0; | 6358 contract_approved = 0; |
6359 v11 = 0; | 6359 v11 = 0; |
6360 uDialogueType = 84; | 6360 uDialogueType = 84; |
6361 current_npc_text = (char *)pNPCTopics[667].pText; | 6361 current_npc_text = (char *)pNPCTopics[667].pText; |
6362 v0 = _4F0882_evt_VAR_PlayerItemInHands_vals; | 6362 v0 = _4F0882_evt_VAR_PlayerItemInHands_vals.data(); |
6363 while ( 1 ) | 6363 while ( 1 ) |
6364 { | 6364 { |
6365 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, *v0) ) | 6365 if ( (unsigned __int16)_449B57_test_bit(pParty->_quest_bits, *v0) ) |
6366 { | 6366 { |
6367 v1 = 0; | 6367 v1 = 0; |
6820 { | 6820 { |
6821 if ( v30 == v14 )//crash | 6821 if ( v30 == v14 )//crash |
6822 { | 6822 { |
6823 if ( v31 == v14 ) | 6823 if ( v31 == v14 ) |
6824 { | 6824 { |
6825 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[634], pClassNames[v10 + 2], pClassNames[v10 + 3]);//Вы должны достичь звания %s или %s для обучения этому уровню навыка. | 6825 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[634], pClassNames[v10 + 2], pClassNames[v10 + 3]);//Вы должны достичь звания %s или %s для обучения этому уровню навыка. |
6826 return pTmpBuf; | 6826 return pTmpBuf.data(); |
6827 } | 6827 } |
6828 v25 = pClassNames[v10 + 2]; | 6828 v25 = pClassNames[v10 + 2]; |
6829 } | 6829 } |
6830 else | 6830 else |
6831 { | 6831 { |
6832 if ( v31 != v14 ) | 6832 if ( v31 != v14 ) |
6833 { | 6833 { |
6834 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[632], pClassNames[pClassType]);//Этот уровень навыка не может быть постигнут классом %s. | 6834 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[632], pClassNames[pClassType]);//Этот уровень навыка не может быть постигнут классом %s. |
6835 return pTmpBuf; | 6835 return pTmpBuf.data(); |
6836 } | 6836 } |
6837 v25 = pClassNames[v10 + 3]; | 6837 v25 = pClassNames[v10 + 3]; |
6838 } | 6838 } |
6839 } | 6839 } |
6840 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[633], v25);//Вы должны достичь звания %s для обучения этому уровню навыка. | 6840 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[633], v25);//Вы должны достичь звания %s для обучения этому уровню навыка. |
6841 return pTmpBuf; | 6841 return pTmpBuf.data(); |
6842 } | 6842 } |
6843 if ( !pPlayers[uActiveCharacter]->CanAct() ) | 6843 if ( !pPlayers[uActiveCharacter]->CanAct() ) |
6844 return (char *)pNPCTopics[122].pText; | 6844 return (char *)pNPCTopics[122].pText; |
6845 if ( !v7 ) | 6845 if ( !v7 ) |
6846 return (char *)pNPCTopics[131].pText; | 6846 return (char *)pNPCTopics[131].pText; |
7072 return (char *)pNPCTopics[124].pText; | 7072 return (char *)pNPCTopics[124].pText; |
7073 LABEL_79: | 7073 LABEL_79: |
7074 contract_approved = 1; | 7074 contract_approved = 1; |
7075 if ( v34 == 2 ) | 7075 if ( v34 == 2 ) |
7076 { | 7076 { |
7077 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[534],//Получить степень ^Pr[%s] в навыке ^Pr[%s] за ^I[%lu] золот^L[ой;ых;ых] | 7077 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[534],//Получить степень ^Pr[%s] в навыке ^Pr[%s] за ^I[%lu] золот^L[ой;ых;ых] |
7078 pGlobalTXT_LocalizationStrings[433], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Эксперт | 7078 pGlobalTXT_LocalizationStrings[433], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Эксперт |
7079 return pTmpBuf2; | 7079 return pTmpBuf2.data(); |
7080 } | 7080 } |
7081 if ( v34 == 3 ) | 7081 if ( v34 == 3 ) |
7082 { | 7082 { |
7083 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], | 7083 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[534], |
7084 pGlobalTXT_LocalizationStrings[432], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Мастер | 7084 pGlobalTXT_LocalizationStrings[432], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Мастер |
7085 return pTmpBuf2; | 7085 return pTmpBuf2.data(); |
7086 } | 7086 } |
7087 if ( v34 == 4 ) | 7087 if ( v34 == 4 ) |
7088 sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[534], | 7088 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[534], |
7089 pGlobalTXT_LocalizationStrings[225], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Великий Магистр | 7089 pGlobalTXT_LocalizationStrings[225], pSkillNames[dword_F8B1AC_award_bit_number], gold_transaction_amount);//Великий Магистр |
7090 return pTmpBuf2; | 7090 return pTmpBuf2.data(); |
7091 } | 7091 } |
7092 | 7092 |
7093 //----- (004B29F2) -------------------------------------------------------- | 7093 //----- (004B29F2) -------------------------------------------------------- |
7094 const char * ContractSelectText( int pEventCode ) | 7094 const char * ContractSelectText( int pEventCode ) |
7095 { | 7095 { |
7197 a1.uFrameWidth = 148; | 7197 a1.uFrameWidth = 148; |
7198 a1.uFrameZ = 334; | 7198 a1.uFrameZ = 334; |
7199 v2 = pTransitionStrings[uHouse_ExitPic]; | 7199 v2 = pTransitionStrings[uHouse_ExitPic]; |
7200 if ( !v2 ) | 7200 if ( !v2 ) |
7201 { | 7201 { |
7202 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[411], v0); | 7202 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[411], v0); |
7203 v2 = pTmpBuf; | 7203 v2 = pTmpBuf.data(); |
7204 } | 7204 } |
7205 v3 = v2; | 7205 v3 = v2; |
7206 v4 = pFontCreate->CalcTextHeight(v2, &a1, 0, 0); | 7206 v4 = pFontCreate->CalcTextHeight(v2, &a1, 0, 0); |
7207 a1.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, v3, 3u); | 7207 a1.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, v3, 3u); |
7208 return; | 7208 return; |
7213 v6 = v58; | 7213 v6 = v58; |
7214 v55 = TargetColor(0xE1u, 0xCDu, 0x23u); | 7214 v55 = TargetColor(0xE1u, 0xCDu, 0x23u); |
7215 v7 = TargetColor(0x15u, 0x99u, 0xE9u); | 7215 v7 = TargetColor(0x15u, 0x99u, 0xE9u); |
7216 v8 = v6->uProfession; | 7216 v8 = v6->uProfession; |
7217 if ( v8 ) | 7217 if ( v8 ) |
7218 sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]); | 7218 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]); |
7219 else | 7219 else |
7220 strcpy(pTmpBuf, v6->pName); | 7220 strcpy(pTmpBuf.data(), v6->pName); |
7221 a1.DrawTitleText(pFontCreate, 0x1E3u, 0x71u, v7, pTmpBuf, 3u); | 7221 a1.DrawTitleText(pFontCreate, 0x1E3u, 0x71u, v7, pTmpBuf.data(), 3u); |
7222 if ( !dword_591080 ) | 7222 if ( !dword_591080 ) |
7223 { | 7223 { |
7224 if ( !uDialogueType ) | 7224 if ( !uDialogueType ) |
7225 { | 7225 { |
7226 v9 = v6->greet; | 7226 v9 = v6->greet; |
7290 { | 7290 { |
7291 v29 = (char *)&pMonsterStats + 88 * word_F8B1A0; | 7291 v29 = (char *)&pMonsterStats + 88 * word_F8B1A0; |
7292 v30 = TargetColor(0xFFu, 0xFFu, 0xFFu); | 7292 v30 = TargetColor(0xFFu, 0xFFu, 0xFFu); |
7293 v31 = *(int *)v29; | 7293 v31 = *(int *)v29; |
7294 v32 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 7294 v32 = TargetColor(0xFFu, 0xFFu, 0x9Bu); |
7295 sprintfex(pTmpBuf, "\f%05d%s\f%05d", v32, v31, v30); | 7295 sprintfex(pTmpBuf.data(), "\f%05d%s\f%05d", v32, v31, v30); |
7296 sprintfex(pTmpBuf2, dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]); | 7296 sprintfex(pTmpBuf2.data(), dword_F8B1A4, pTmpBuf, 100 * (unsigned __int8)v29[8]); |
7297 current_npc_text = pTmpBuf2; | 7297 current_npc_text = pTmpBuf2.data(); |
7298 v15 = ""; | 7298 v15 = ""; |
7299 goto LABEL_45; | 7299 goto LABEL_45; |
7300 } | 7300 } |
7301 if ( v28 != 10 ) | 7301 if ( v28 != 10 ) |
7302 goto LABEL_41; | 7302 goto LABEL_41; |
7333 v16->msg_param = 0; | 7333 v16->msg_param = 0; |
7334 v15 = ""; | 7334 v15 = ""; |
7335 } | 7335 } |
7336 if ( uDialogueType != 84 ) | 7336 if ( uDialogueType != 84 ) |
7337 goto LABEL_49; | 7337 goto LABEL_49; |
7338 sprintf(pTmpBuf, format_4E2D80, v55, pItemsTable->pItems[contract_approved].pUnidentifiedName); | 7338 sprintf(pTmpBuf.data(), format_4E2D80, v55, pItemsTable->pItems[contract_approved].pUnidentifiedName); |
7339 sprintf(pTmpBuf2, current_npc_text, pTmpBuf); | 7339 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf); |
7340 current_npc_text = pTmpBuf2; | 7340 current_npc_text = pTmpBuf2.data(); |
7341 goto LABEL_45; | 7341 goto LABEL_45; |
7342 } | 7342 } |
7343 v21 = v20 - 1; | 7343 v21 = v20 - 1; |
7344 if ( !v21 ) | 7344 if ( !v21 ) |
7345 { | 7345 { |
7801 pDialogueNPCCount = (_this + 1); | 7801 pDialogueNPCCount = (_this + 1); |
7802 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) | 7802 if ( _this + 1 == uNumDialogueNPCPortraits && uHouse_ExitPic ) |
7803 { | 7803 { |
7804 pDialogueWindow->Release(); | 7804 pDialogueWindow->Release(); |
7805 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); | 7805 pDialogueWindow = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0); |
7806 sprintfex(sHouseName, pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); | 7806 sprintfex(sHouseName.data(), pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S], pMapStats->pInfos[uHouse_ExitPic].pName); |
7807 pBtn_ExitCancel = pDialogueWindow->CreateButton(566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// "Cancel" | 7807 pBtn_ExitCancel = pDialogueWindow->CreateButton(566, 445, 75, 33, 1, 0, UIMSG_Escape, 0, 'N', pGlobalTXT_LocalizationStrings[34], pIcons_LOD->GetTexture(uTextureID_BUTTDESC2), 0);// "Cancel" |
7808 pBtn_YES = pDialogueWindow->CreateButton(486, 445, 75, 33, 1, 0, UIMSG_BF, 1, 'Y', sHouseName, pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); | 7808 pBtn_YES = pDialogueWindow->CreateButton(486, 445, 75, 33, 1, 0, UIMSG_BF, 1, 'Y', sHouseName.data(), pIcons_LOD->GetTexture(uTextureID_BUTTYES2), 0); |
7809 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName, 0); | 7809 pDialogueWindow->CreateButton( pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 63u, 73u, 1, 0, UIMSG_BF, 1u, 0x20u, sHouseName.data(), 0); |
7810 pDialogueWindow->CreateButton(8, 8, 460, 344, 1, 0, UIMSG_BF, 1, 0x59u, sHouseName, 0); | 7810 pDialogueWindow->CreateButton(8, 8, 460, 344, 1, 0, UIMSG_BF, 1, 0x59u, sHouseName.data(), 0); |
7811 } | 7811 } |
7812 else | 7812 else |
7813 { | 7813 { |
7814 v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) + 1)]; | 7814 v17 = HouseNPCData[_this + 1 - ((dword_591080 != 0) + 1)]; |
7815 if ( dialog_menu_id == HOUSE_DIALOGUE_OTHER ) | 7815 if ( dialog_menu_id == HOUSE_DIALOGUE_OTHER ) |
8386 } | 8386 } |
8387 while ( v35 < v8->pNumPresenceButton + v13 ); | 8387 while ( v35 < v8->pNumPresenceButton + v13 ); |
8388 if ( !v34 ) | 8388 if ( !v34 ) |
8389 { | 8389 { |
8390 LABEL_40: | 8390 LABEL_40: |
8391 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->classType]); | 8391 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->classType]); |
8392 strcat(pTmpBuf, "\n \n"); | 8392 strcat(pTmpBuf.data(), "\n \n"); |
8393 strcat(pTmpBuf, pGlobalTXT_LocalizationStrings[528]); | 8393 strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]); |
8394 v22 = v31; | 8394 v22 = v31; |
8395 v23 = pFontArrus->CalcTextHeight(pTmpBuf, &v28, 0, 0); | 8395 v23 = pFontArrus->CalcTextHeight(pTmpBuf.data(), &v28, 0, 0); |
8396 v28.DrawTitleText(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf, 3u); | 8396 v28.DrawTitleText(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf.data(), 3u); |
8397 return; | 8397 return; |
8398 } | 8398 } |
8399 sprintf(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v32); | 8399 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[401], v32); |
8400 v28.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf, 3u); | 8400 v28.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf.data(), 3u); |
8401 v32 = (149 - v33) / v34; | 8401 v32 = (149 - v33) / v34; |
8402 if ( (149 - v33) / v34 > 32 ) | 8402 if ( (149 - v33) / v34 > 32 ) |
8403 v32 = 32; | 8403 v32 = 32; |
8404 | 8404 |
8405 v35 = v8->pStartingPosActiveItem; | 8405 v35 = v8->pStartingPosActiveItem; |