Mercurial > mm7
diff mm7_4.cpp @ 1209:decc0dd6e4ba
more on arcomage
author | Gloval |
---|---|
date | Sun, 09 Jun 2013 13:20:34 +0400 |
parents | ab6560001f5b |
children | fd3bea473c0c be76a797780e |
line wrap: on
line diff
--- a/mm7_4.cpp Sun Jun 09 01:41:55 2013 +0200 +++ b/mm7_4.cpp Sun Jun 09 13:20:34 2013 +0400 @@ -8240,213 +8240,7 @@ */ } -//----- (004B6478) -------------------------------------------------------- -void sub_4B6478() - { - GUIWindow *v0; // ebx@1 - Player *v1; // edi@1 - unsigned int v2; // eax@1 - signed int v3; // esi@1 - int v4; // ebx@1 - unsigned int v5; // esi@5 - int v6; // edi@6 - int result; // eax@13 - GUIWindow *v8; // ebx@17 - int v9; // eax@17 - int v10; // ecx@17 - unsigned int v11; // ecx@18 - int v12; // eax@20 - int v13; // eax@21 - GUIButton *v14; // esi@27 - int v15; // ecx@27 - unsigned int v16; // eax@28 - const char *v17; // ebx@29 - int v18; // eax@29 - unsigned int v19; // ecx@29 - int v20; // eax@29 - unsigned __int16 v21; // ax@29 - unsigned __int16 v22; // ST14_2@36 - int v23; // eax@36 - const char *v24; // ST18_4@37 - unsigned __int16 v25; // ST14_2@37 - int v26; // eax@37 - int v27; // [sp-4h] [bp-80h]@8 - GUIWindow v28; // [sp+Ch] [bp-70h]@1 - GUIWindow *v29; // [sp+60h] [bp-1Ch]@17 - unsigned int v30; // [sp+64h] [bp-18h]@1 - int v31; // [sp+68h] [bp-14h]@1 - int v32; // [sp+6Ch] [bp-10h]@1 - int v33; // [sp+70h] [bp-Ch]@17 - int v34; // [sp+74h] [bp-8h]@17 - int v35; // [sp+78h] [bp-4h]@17 - - v0 = window_SpeakInHouse; - memcpy(&v28, window_SpeakInHouse, sizeof(v28)); - v1 = pPlayers[uActiveCharacter]; - v28.uFrameX = 483; - v28.uFrameWidth = 148; - v28.uFrameZ = 334; - v30 = TargetColor(0xFFu, 0xFFu, 0xFFu); - v31 = TargetColor(0xFFu, 0xFFu, 0x9Bu); - v2 = 52 * (unsigned int)v0->ptr_1C; - //v32 = (unsigned __int8)(((p2DEvents_minus1___00[v2 / 2] != 18) - 1) & 0x96) + 100; - v32 = (unsigned __int8)(((p2DEvents[(unsigned int)v0->ptr_1C - 1].uType != 18) - 1) & 0x96) + 100; - //v3 = (signed __int64)((double)v32 * p2DEvents_minus1__20[v2 / 4]); - v3 = (signed __int64)((double)v32 * p2DEvents[(unsigned int)v0->ptr_1C - 1].fPriceMultiplier); - v4 = v3 * (100 - v1->GetMerchant()) / 100; - v32 = v4; - if ( v4 < v3 / 3 ) - { - v4 = v3 / 3; - v32 = v3 / 3; - } - if ( dialog_menu_id != HOUSE_DIALOGUE_MAIN) - { - if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) - { - v5 = 0; - - __debugbreak(); - //pSkillAvailabilityPerClass[8 + v58->uClass][4 + v23] - // or - //byte_4ED970_skill_learn_ability_by_class_table[v58->uClass][v23 - 36] - // or - //byte_4ED970_skill_learn_ability_by_class_table[v58->uClass - 1][v23 + 1] - __debugbreak(); // whacky condition - fix - if (false - //if ( !*(&byte_4ED94C[37 * v1->uClass / 3] + dword_F8B19C) - || (v6 = (int)(&v1->uIntelligence + dialog_menu_id), *(short *)v6) ) - { - pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0); - } - else - { - if ( pParty->uNumGold < v4 ) - { - ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); - v27 = 4; - } - else - { - Party::TakeGold(v4); - *(short *)v6 = 1; - v27 = 2; - } - PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v27); - } - } - else - { - v5 = 0; - } - /*result = pMessageQueue_50CBD0->uNumMessages; - if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 ) - { - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_Escape; - pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 1; - result = 3 * pMessageQueue_50CBD0->uNumMessages + 3; - *(&pMessageQueue_50CBD0->uNumMessages + result) = v5; - ++pMessageQueue_50CBD0->uNumMessages; - }*/ - pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, v5); - return; // void func - } - if ( !(unsigned __int16)_449B57_test_bit((unsigned __int8 *)v1->_guilds_member_bits, word_4F0754[2 * (unsigned int)window_SpeakInHouse->ptr_1C]) ) - { - v24 = pNPCTopics[171].pText; - v25 = v31; - v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0); - v28.DrawTitleText(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u); - pDialogueWindow->pNumPresenceButton = 0; - return ; - } - - if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) - return; - v8 = pDialogueWindow; - v33 = 0; - v34 = 0; - v29 = pDialogueWindow; - v9 = pDialogueWindow->pStartingPosActiveItem; - v10 = v9 + pDialogueWindow->pNumPresenceButton; - v35 = pDialogueWindow->pStartingPosActiveItem; - if ( v9 >= v10 ) - goto LABEL_40; - do - { - v11 = v8->GetControl(v35)->msg_param - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v11] && !v1->pActiveSkills[v11] ) - { - v12 = pFontArrus->CalcTextHeight(pSkillNames[v11], &v28, 0, 0); - v33 += v12; - ++v34; - } - v13 = v8->pStartingPosActiveItem; - ++v35; - } - while ( v35 < v8->pNumPresenceButton + v13 ); - if ( !v34 ) - { -LABEL_40: - sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[544], v1->pName, pClassNames[v1->classType]); - strcat(pTmpBuf.data(), "\n \n"); - strcat(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[528]); - v22 = v31; - v23 = pFontArrus->CalcTextHeight(pTmpBuf.data(), &v28, 0, 0); - v28.DrawTitleText(pFontArrus, 0, (174 - v23) / 2 + 138, v22, pTmpBuf.data(), 3u); - return; - } - sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[401], v32); - v28.DrawTitleText(pFontArrus, 0, 0x92u, 0, pTmpBuf.data(), 3u); - v32 = (149 - v33) / v34; - if ( (149 - v33) / v34 > 32 ) - v32 = 32; - - v35 = v8->pStartingPosActiveItem; - v34 = (149 - v34 * v32 - v33) / 2 - v32 / 2 + 162; - if ( v8->pStartingPosActiveItem < v8->pStartingPosActiveItem+ v8->pNumPresenceButton ) - { - v33 = 2; - do - { - v14 = v8->GetControl(v35); - v15 = v14->msg_param - 36; - if ( byte_4ED970_skill_learn_ability_by_class_table[v1->classType / 3][v15] ) - { - v16 = 0; - if ( !v1->pActiveSkills[v15] ) - { - v17 = pSkillNames[v15]; - v14->uY = v32 + v34; - v18 = pFontArrus->CalcTextHeight(v17, &v28, 0, 0); - v19 = v14->uY; - v14->uHeight = v18; - v20 = v19 + v18 - 1; - v14->uW = v20; - v34 = v20; - v21 = v31; - if ( pDialogueWindow->pCurrentPosActiveItem != v33 ) - v21 = v30; - v28.DrawTitleText(pFontArrus, 0, v19, v21, v17, 3u); - goto LABEL_34; - } - } - else - { - v16 = 0; - } - v14->uW = v16; - v14->uHeight = v16; - v14->uY = v16; -LABEL_34: - v8 = v29; - ++v35; - ++v33; - } - while ( v35 <v29->pNumPresenceButton + v29->pStartingPosActiveItem ); - } - return; -} + //----- (00405CFF) -------------------------------------------------------- void stru262_TurnBased::End(bool bPlaySound)