comparison UIHouses.cpp @ 893:4676774b225c

GuildDialogue fix
author Ritor1
date Wed, 03 Apr 2013 14:27:43 +0600
parents b6573b99ca40
children 10fa7dad1391 addae461eeb4
comparison
equal deleted inserted replaced
892:18f785019d36 893:4676774b225c
664 void *v30; // esi@208 664 void *v30; // esi@208
665 unsigned __int64 v31; // qax@208 665 unsigned __int64 v31; // qax@208
666 signed int v32; // edi@209 666 signed int v32; // edi@209
667 int v33; // eax@210 667 int v33; // eax@210
668 unsigned int v34; // eax@211 668 unsigned int v34; // eax@211
669 Player *v35; // edi@227 669 //Player *v35; // edi@227
670 signed int v36; // esi@227 670 signed int v36; // esi@227
671 int v37; // ecx@227 671 int v37; // ecx@227
672 int v38; // esi@230 672 int v38; // esi@230
673 int v39; // edx@235 673 int v39; // edx@235
674 int v40; // edi@243 674 int v40; // edi@243
781 case 13: 781 case 13:
782 case 14: 782 case 14:
783 case 15: 783 case 15:
784 case 16: 784 case 16:
785 { 785 {
786 if ( (signed __int64)__PAIR__( 786 if ( *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44472] >= (signed __int64)pParty->uTimePlayed &&
787 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44472], 787 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44468] >= (signed __int64)pParty->uTimePlayed )
788 *(int *)&stru_AA1058[3].pSounds[8 * (unsigned int)v8->ptr_1C + 44468]) >= (signed __int64)pParty->uTimePlayed )
789 { 788 {
790 v32 = 0; 789 v32 = 0;
791 do 790 do
792 { 791 {
793 //v33 = *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v32 + 12 * (unsigned int)v8->ptr_1C)); 792 //v33 = *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v32 + 12 * (unsigned int)v8->ptr_1C));
812 * (signed int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].field_1C) 811 * (signed int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].field_1C)
813 * 0.033333335); 812 * 0.033333335);
814 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44468] = v31; 813 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44468] = v31;
815 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44472] = HIDWORD(v31); 814 *(int *)&stru_AA1058[3].pSounds[8 * (int)v30 + 44472] = HIDWORD(v31);
816 } 815 }
817 return; 816 //return;
818 break; 817 break;
819 } 818 }
820 case 17: 819 case 17:
821 { 820 {
822 if ( uMessageParam == 99 ) 821 if ( uMessageParam == 99 )
823 { 822 {
824 v10 = (int)((char *)v8->ptr_1C - 102); 823 v10 = (int)((char *)v8->ptr_1C - 102);
825 v56 = v10; 824 v56 = v10;
826 v11 = 8 * v10 + 11325428; 825 v11 = 8 * v10 + 11325428;
827 if ( (signed __int64)__PAIR__(pParty->field_3C.field_0[2 * v10 + 1], pParty->field_3C.field_0[2 * v10]) >= (signed __int64)pParty->uTimePlayed ) 826 if ( pParty->field_3C.field_0[2 * v10 + 1] >= (signed __int64)pParty->uTimePlayed
827 && pParty->field_3C.field_0[2 * v10] >= (signed __int64)pParty->uTimePlayed )
828 { 828 {
829 v13 = 0; 829 v13 = 0;
830 } 830 }
831 else 831 else
832 { 832 {
1475 } 1475 }
1476 default: 1476 default:
1477 { 1477 {
1478 if( uMessageParam >= 36 && uMessageParam <= 72 ) 1478 if( uMessageParam >= 36 && uMessageParam <= 72 )
1479 { 1479 {
1480 v35 = pPlayers[uActiveCharacter]; 1480 //v35 = pPlayers[uActiveCharacter];
1481 //v36 = (signed __int64)(*(float *)&p2DEvents_minus1__24[13 * (unsigned int)v8->ptr_1C] * 500.0); 1481 //v36 = (signed __int64)(*(float *)&p2DEvents_minus1__24[13 * (unsigned int)v8->ptr_1C] * 500.0);
1482 v36 = (signed __int64)(p2DEvents[(unsigned int)v8->ptr_1C - 1].flt_24 * 500.0); 1482 v36 = (signed __int64)(p2DEvents[(unsigned int)v8->ptr_1C - 1].flt_24 * 500.0);
1483 v37 = v36 * (100 - pPlayers[uActiveCharacter]->GetMerchant()) / 100; 1483 v37 = v36 * (100 - pPlayers[uActiveCharacter]->GetMerchant()) / 100;
1484 if ( v37 < v36 / 3 ) 1484 if ( v37 < v36 / 3 )
1485 v37 = v36 / 3; 1485 v37 = v36 / 3;
1486 1486
1487 //if (false) 1487 //if (false)
1488 if(byte_4ED970_skill_learn_ability_by_class_table[v35->classType][uMessageParam-36]) 1488 if(byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][uMessageParam-36])
1489 //if ( *(&byte_4ED94C[37 * v35->uClass] + v55) ) 1489 //if ( *(&byte_4ED94C[37 * v35->uClass] + v55) )
1490 { 1490 {
1491 v38 = (int)(&v35->uIntelligence + uMessageParam); 1491 //v38 = (int)(&pPlayers[uActiveCharacter]->uIntelligence + uMessageParam);
1492 if ( !*(short *)v38 ) 1492 if ( !pPlayers[uActiveCharacter]->pActiveSkills[uMessageParam - 36] )
1493 { 1493 {
1494 if ( pParty->uNumGold < v37 ) 1494 if ( pParty->uNumGold < v37 )
1495 { 1495 {
1496 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u); 1496 ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);
1497 if ( in_current_building_type == BildingType_Training || in_current_building_type == BildingType_Tavern ) 1497 if ( in_current_building_type == BildingType_Training || in_current_building_type == BildingType_Tavern )
1498 v39 = 4; 1498 v39 = 4;
1499 else 1499 else
1500 v39 = 2; 1500 v39 = 2;
1501 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v39); 1501 PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, (HouseSoundID)v39);
1502 } 1502 }
1503 else 1503 else
1504 { 1504 {
1505 Party::TakeGold(v37); 1505 Party::TakeGold(v37);
1506 dword_F8B1E4 = 1; 1506 dword_F8B1E4 = 1;
1507 *(short *)v38 = 1; 1507 pPlayers[uActiveCharacter]->pActiveSkills[uMessageParam - 36] = 1;
1508 v35->PlaySound(SPEECH_78, 0); 1508 pPlayers[uActiveCharacter]->PlaySound(SPEECH_78, 0);
1509 } 1509 }
1510 } 1510 }
1511 } 1511 }
1512 } 1512 }
1513 break; 1513 break;
4592 4592
4593 4593
4594 //----- (004B5D7C) -------------------------------------------------------- 4594 //----- (004B5D7C) --------------------------------------------------------
4595 void GuildDialog() 4595 void GuildDialog()
4596 { 4596 {
4597 //GUIWindow *pWindow; // ebx@1 4597 signed int base_teach_price; // ebx@1
4598 //Player *currPlayer; // edi@1 4598 int v3; // edi@6
4599 signed int base_teach_price; // ebx@1 4599 int result; // eax@11
4600 int v3; // edi@6 4600 int v6; // esi@13
4601 int result; // eax@11 4601 signed int v7; // esi@17
4602 //unsigned int v5; // ebx@13 4602 int v8; // esi@22
4603 int v6; // esi@13 4603 signed int v9; // ecx@22
4604 signed int v7; // esi@17 4604 char *v10; // eax@22
4605 int v8; // esi@22 4605 const char *statusbar_string; // ecx@26
4606 signed int v9; // ecx@22 4606 POINT *v12; // esi@30
4607 char *v10; // eax@22 4607 int v13; // ecx@30
4608 const char *statusbar_string; // ecx@26 4608 void *v14; // ST1C_4@31
4609 POINT *v12; // esi@30 4609 ItemGen *v15; // ST18_4@31
4610 int v13; // ecx@30 4610 int v16; // ST10_4@31
4611 void *v14; // ST1C_4@31 4611 int v17; // eax@31
4612 ItemGen *v15; // ST18_4@31 4612 char *v18; // edx@31
4613 int v16; // ST10_4@31 4613 int v19; // eax@32
4614 int v17; // eax@31 4614 int pActiveItem; // esi@35
4615 char *v18; // edx@31 4615 int v22; // eax@35
4616 int v19; // eax@32 4616 unsigned int v23; // eax@36
4617 //GUIWindow *v20; // edi@35 4617 int v24; // eax@39
4618 int pActiveItem; // esi@35 4618 int v25; // eax@40
4619 int v22; // eax@35 4619 int v26; // ecx@47
4620 unsigned int v23; // eax@36 4620 GUIButton *pButton; // eax@49
4621 int v24; // eax@39 4621 unsigned int v29; // eax@49
4622 int v25; // eax@40 4622 char *pText; // eax@52
4623 int v26; // ecx@47 4623 int pTextHeight; // eax@55
4624 GUIButton *pButton; // eax@49 4624 unsigned int v32; // ecx@55
4625 //GUIButton *v28; // esi@49 4625 int v33; // eax@55
4626 unsigned int v29; // eax@49 4626 unsigned __int16 pTextColor; // ax@55
4627 char *pText; // eax@52 4627 int v35; // eax@58
4628 int pTextHeight; // eax@55 4628 const char *v36; // ST20_4@61
4629 unsigned int v32; // ecx@55 4629 unsigned __int16 v37; // ST1C_2@61
4630 int v33; // eax@55 4630 int v38; // eax@61
4631 unsigned __int16 pTextColor; // ax@55 4631 int v40; // [sp-14h] [bp-300h]@31
4632 int v35; // eax@58 4632 int v41; // [sp-10h] [bp-2FCh]@31
4633 const char *v36; // ST20_4@61 4633 unsigned __int16 v42; // [sp-Ch] [bp-2F8h]@31
4634 unsigned __int16 v37; // ST1C_2@61 4634 char *v43; // [sp-8h] [bp-2F4h]@31
4635 int v38; // eax@61 4635 unsigned int v44; // [sp-4h] [bp-2F0h]@31
4636 GUIWindow *v39; // [sp-18h] [bp-304h]@31 4636 char Dest[100]; // [sp+Ch] [bp-2E0h]@3
4637 int v40; // [sp-14h] [bp-300h]@31 4637 char v46[100]; // [sp+70h] [bp-27Ch]@3
4638 int v41; // [sp-10h] [bp-2FCh]@31 4638 char v47[100]; // [sp+D4h] [bp-218h]@3
4639 unsigned __int16 v42; // [sp-Ch] [bp-2F8h]@31 4639 char v48[100]; // [sp+138h] [bp-1B4h]@3
4640 char *v43; // [sp-8h] [bp-2F4h]@31 4640 char v49[100]; // [sp+19Ch] [bp-150h]@3
4641 unsigned int v44; // [sp-4h] [bp-2F0h]@31 4641 POINT v50; // [sp+264h] [bp-88h]@30
4642 char Dest[100]; // [sp+Ch] [bp-2E0h]@3 4642 POINT v51; // [sp+26Ch] [bp-80h]@30
4643 char v46[100]; // [sp+70h] [bp-27Ch]@3 4643 GUIWindow working_window; // [sp+274h] [bp-78h]@1
4644 char v47[100]; // [sp+D4h] [bp-218h]@3 4644 signed int v53; // [sp+27Ch] [bp-70h]@1
4645 char v48[100]; // [sp+138h] [bp-1B4h]@3 4645 signed int v54; // [sp+284h] [bp-68h]@1
4646 char v49[100]; // [sp+19Ch] [bp-150h]@3 4646 int pColorWhite; // [sp+2CCh] [bp-20h]@1
4647 POINT v50; // [sp+264h] [bp-88h]@30 4647 int pColorYellow; // [sp+2D0h] [bp-1Ch]@1
4648 POINT v51; // [sp+26Ch] [bp-80h]@30 4648 int v58; // [sp+2D4h] [bp-18h]@1
4649 GUIWindow working_window; // [sp+274h] [bp-78h]@1 4649 unsigned __int8 uPlayerID; // [sp+2DBh] [bp-11h]@31
4650 signed int v53; // [sp+27Ch] [bp-70h]@1
4651 signed int v54; // [sp+284h] [bp-68h]@1
4652 //int v55; // [sp+2C8h] [bp-24h]@47
4653 int pColorWhite; // [sp+2CCh] [bp-20h]@1
4654 int pColorYellow; // [sp+2D0h] [bp-1Ch]@1
4655 int v58; // [sp+2D4h] [bp-18h]@1
4656 unsigned __int8 uPlayerID; // [sp+2DBh] [bp-11h]@31
4657 bool pSkillFlag; // [sp+2DCh] [bp-10h]@35 4650 bool pSkillFlag; // [sp+2DCh] [bp-10h]@35
4658 int v61; // [sp+2E0h] [bp-Ch]@35 4651 int v61; // [sp+2E0h] [bp-Ch]@35
4659 int pItemNum; 4652 int pItemNum;
4660 unsigned int v62; // [sp+2E4h] [bp-8h]@13 4653 unsigned int v62; // [sp+2E4h] [bp-8h]@13
4661 int v63; // [sp+2E8h] [bp-4h]@1 4654 int v63; // [sp+2E8h] [bp-4h]@1
4662 int pNumActivItem; 4655 int pNumActivItem;
4663 int all_text_height; 4656 int all_text_height;
4664 4657
4665 //pWindow = window_SpeakInHouse;//Ritor1: in process
4666 memcpy(&working_window, window_SpeakInHouse, sizeof(GUIWindow)); 4658 memcpy(&working_window, window_SpeakInHouse, sizeof(GUIWindow));
4667 //v58 = pPlayers[uActiveCharacter];
4668 //currPlayer = pPlayers[uActiveCharacter];
4669 working_window.uFrameX = 483; 4659 working_window.uFrameX = 483;
4670 working_window.uFrameWidth = 148; 4660 working_window.uFrameWidth = 148;
4671 working_window.uFrameZ = 334; 4661 working_window.uFrameZ = 334;
4672 pColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 4662 pColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
4673 pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu); 4663 pColorYellow = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
4674 //v2 = (signed __int64)(p2DEvents_minus1__20[13 * (unsigned int)v0->ptr_1C] * 500.0);
4675 base_teach_price = (signed __int64)(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier * 500.0); 4664 base_teach_price = (signed __int64)(p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].fPriceMultiplier * 500.0);
4676 v63 = base_teach_price * (100 - pPlayers[uActiveCharacter]->GetMerchant()) / 100; 4665 v63 = base_teach_price * (100 - pPlayers[uActiveCharacter]->GetMerchant()) / 100;
4677 if ( v63 < base_teach_price / 3 ) 4666 if ( v63 < base_teach_price / 3 )
4678 v63 = base_teach_price / 3; 4667 v63 = base_teach_price / 3;
4679 strcpy(Dest, ""); 4668 strcpy(Dest, "");
4710 } 4699 }
4711 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0); 4700 pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
4712 return; 4701 return;
4713 } 4702 }
4714 pRenderer->DrawTextureIndexed(8, 8, ShopTexture); 4703 pRenderer->DrawTextureIndexed(8, 8, ShopTexture);
4715 //v5 = 0;
4716 v6 = 0; 4704 v6 = 0;
4717 v62 = 0; 4705 v62 = 0;
4718 v63 = 32; 4706 v63 = 32;
4719 do 4707 do
4720 { 4708 {
4734 v7 = 6; 4722 v7 = 6;
4735 v63 = 32; 4723 v63 = 32;
4736 do 4724 do
4737 { 4725 {
4738 if (pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][v7].uItemID) 4726 if (pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][v7].uItemID)
4739 // if ( *(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 9 * (v7 + 12 * (unsigned int)window_SpeakInHouse->ptr_1C)) )
4740 { 4727 {
4741 pRenderer->DrawTextureTransparent(v63, 0xFAu, ItemsInShopTexture[v7]); 4728 pRenderer->DrawTextureTransparent(v63, 0xFAu, ItemsInShopTexture[v7]);
4742 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), ItemsInShopTexture[v7], v7 + 1); 4729 ZBuffer_DoFill((int *)((char *)pRenderer->pActiveZBuffer + v62 + 638448), ItemsInShopTexture[v7], v7 + 1);
4743 //currPlayer = v58;
4744 } 4730 }
4745 v63 += 70; 4731 v63 += 70;
4746 v62 += 280; 4732 v62 += 280;
4747 ++v7; 4733 ++v7;
4748 } 4734 }
4749 while ( v63 < 452 ); 4735 while ( v63 < 452 );
4750 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) 4736 if ( sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
4751 { 4737 {
4752 v8 = 0; 4738 v8 = 0;
4753 v9 = 12; 4739 v9 = 12;
4754 // v10 = (char *)(&pParty->pPlayers[1].pInstalledBeacons[0].field_18 + 108 * (unsigned int)window_SpeakInHouse->ptr_1C);
4755 // v10 =
4756 do 4740 do
4757 { 4741 {
4758 if (pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][v9].uItemID ) 4742 if (pParty->SpellBooksInGuilds[window_SpeakInHouse->par1C-139][v9].uItemID )
4759 ++v8; 4743 ++v8;
4760 // v10 += 36;
4761 --v9; 4744 --v9;
4762 } 4745 }
4763 while ( v9 ); 4746 while ( v9 );
4764 GetAsyncKeyState(17); 4747 GetAsyncKeyState(17);
4765 statusbar_string = pGlobalTXT_LocalizationStrings[195]; //"Select the Item to Buy" 4748 statusbar_string = pGlobalTXT_LocalizationStrings[195]; //"Select the Item to Buy"
4798 pDialogueWindow->pNumPresenceButton = 0; 4781 pDialogueWindow->pNumPresenceButton = 0;
4799 return; 4782 return;
4800 } 4783 }
4801 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() ) 4784 if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
4802 return; 4785 return;
4803 //v20 = pDialogueWindow;
4804 //v5 = 0;
4805 v61 = 0; 4786 v61 = 0;
4806 pSkillFlag = false; 4787 pSkillFlag = false;
4807 pActiveItem = pDialogueWindow->pStartingPosActiveItem; 4788 pActiveItem = pDialogueWindow->pStartingPosActiveItem;
4808 v22 = pActiveItem + pDialogueWindow->pNumPresenceButton; 4789 v22 = pActiveItem + pDialogueWindow->pNumPresenceButton;
4809 pItemNum = 0; 4790 pItemNum = 0;
4825 all_text_height += pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[400], &working_window, 0, 0); //"Buy Spells" 4806 all_text_height += pFontArrus->CalcTextHeight(pGlobalTXT_LocalizationStrings[400], &working_window, 0, 0); //"Buy Spells"
4826 v61++; 4807 v61++;
4827 } 4808 }
4828 else 4809 else
4829 { 4810 {
4830 if( byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][v23-36] && pPlayers[uActiveCharacter]->pActiveSkills[v23-36] ) 4811 if( byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][v23 - 36]
4831 { 4812 && !pPlayers[uActiveCharacter]->pActiveSkills[v23 - 36] )
4832 all_text_height += pFontArrus->CalcTextHeight(pSkillNames[v23 - 36], &working_window, 0, 0);
4833 v61++;
4834 pSkillFlag = true;
4835 }
4836 if( byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][v23 - 36] && !pPlayers[uActiveCharacter]->pActiveSkills[v23 - 36] )
4837 { 4813 {
4838 all_text_height += pFontArrus->CalcTextHeight(pSkillNames[v23 - 36], &working_window, 0, 0); 4814 all_text_height += pFontArrus->CalcTextHeight(pSkillNames[v23 - 36], &working_window, 0, 0);
4839 v61++; 4815 v61++;
4840 pSkillFlag = true; 4816 pSkillFlag = true;
4841 } 4817 }
4860 v58 = (149 - all_text_height) / v61; 4836 v58 = (149 - all_text_height) / v61;
4861 if ( v58 > 32 ) 4837 if ( v58 > 32 )
4862 v58 = 32; 4838 v58 = 32;
4863 v26 = (149 - v61 * v58 - all_text_height) / 2 - v58 / 2 + 162; 4839 v26 = (149 - v61 * v58 - all_text_height) / 2 - v58 / 2 + 162;
4864 pNumActivItem = pDialogueWindow->pStartingPosActiveItem; 4840 pNumActivItem = pDialogueWindow->pStartingPosActiveItem;
4865 //v55 = v26;
4866 if (pDialogueWindow->pStartingPosActiveItem < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton ) 4841 if (pDialogueWindow->pStartingPosActiveItem < pDialogueWindow->pStartingPosActiveItem + pDialogueWindow->pNumPresenceButton )
4867 { 4842 {
4868 pItemNum = 2; 4843 pItemNum = 2;
4869 do 4844 do
4870 { 4845 {
4871 pButton = pDialogueWindow->GetControl(pItemNum); 4846 pButton = pDialogueWindow->GetControl(pItemNum);
4872 //v28 = v27;
4873 v29 = pButton->msg_param; 4847 v29 = pButton->msg_param;
4874 if ( v29 == 18 ) 4848 if ( v29 == 18 )
4875 { 4849 {
4876 pText = pGlobalTXT_LocalizationStrings[400]; //"Buy Spells" 4850 pText = pGlobalTXT_LocalizationStrings[400]; //"Buy Spells"
4877 pButton->uY = v58 + v26; 4851 pButton->uY = v58 + v26;
4886 pTextColor = pColorWhite; 4860 pTextColor = pColorWhite;
4887 working_window.DrawTitleText(pFontArrus, 0, v32, pTextColor, pText, 3); 4861 working_window.DrawTitleText(pFontArrus, 0, v32, pTextColor, pText, 3);
4888 } 4862 }
4889 else 4863 else
4890 { 4864 {
4891 if ( byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][v29 - 36] && !pPlayers[uActiveCharacter]->pActiveSkills[v23-36] ) 4865 if ( byte_4ED970_skill_learn_ability_by_class_table[pPlayers[uActiveCharacter]->classType][v29 - 36]
4866 && !pPlayers[uActiveCharacter]->pActiveSkills[v29 - 36] )
4892 { 4867 {
4893 pButton->uY = v58 + v26; 4868 pButton->uY = v58 + v26;
4894 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[v29 - 36], &working_window, 0, 0); 4869 pTextHeight = pFontArrus->CalcTextHeight(pSkillNames[v29 - 36], &working_window, 0, 0);
4895 v32 = pButton->uY; 4870 v32 = pButton->uY;
4896 pButton->uHeight = pTextHeight; 4871 pButton->uHeight = pTextHeight;
4900 pTextColor = pColorYellow; 4875 pTextColor = pColorYellow;
4901 if ( pDialogueWindow->pCurrentPosActiveItem != pItemNum ) 4876 if ( pDialogueWindow->pCurrentPosActiveItem != pItemNum )
4902 pTextColor = pColorWhite; 4877 pTextColor = pColorWhite;
4903 working_window.DrawTitleText(pFontArrus, 0, v32, pTextColor, pSkillNames[v29 - 36], 3); 4878 working_window.DrawTitleText(pFontArrus, 0, v32, pTextColor, pSkillNames[v29 - 36], 3);
4904 } 4879 }
4905 else 4880 else
4906 { 4881 {
4907 pButton->uW = 0; 4882 pButton->uW = 0;
4908 pButton->uHeight = 0; 4883 pButton->uHeight = 0;
4909 pButton->uY = 0; 4884 pButton->uY = 0;
4910 } 4885 }
4911 } 4886 }
4912 ++pItemNum; 4887 ++pItemNum;
4913 } 4888 }
4914 while ( pItemNum < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem ); 4889 while ( pItemNum < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem );
4915 } 4890 }
4916 return; 4891 return;