Mercurial > mm7
comparison UI/UIHouses.cpp @ 1580:1264fce1a17f
m
author | Ritor1 |
---|---|
date | Tue, 10 Sep 2013 23:42:03 +0600 |
parents | 6d759814a817 |
children | 5792fdafe2f5 25f5c041f39b |
comparison
equal
deleted
inserted
replaced
1573:6d759814a817 | 1580:1264fce1a17f |
---|---|
3886 } | 3886 } |
3887 | 3887 |
3888 //----- (004B2A74) -------------------------------------------------------- | 3888 //----- (004B2A74) -------------------------------------------------------- |
3889 void SimpleHouseAndBoatsDialog() | 3889 void SimpleHouseAndBoatsDialog() |
3890 { | 3890 { |
3891 char *v0; // esi@3 | |
3892 char *v1; // ST1C_4@3 | |
3893 char *v2; // eax@3 | 3891 char *v2; // eax@3 |
3894 const char *v3; // ST1C_4@5 | |
3895 int v4; // eax@5 | |
3896 unsigned int i; // eax@5 | 3892 unsigned int i; // eax@5 |
3897 NPCData *v6; // esi@6 | 3893 NPCData *pNPC; // esi@6 |
3898 unsigned __int16 v7; // bx@6 | |
3899 unsigned int v8; // eax@6 | |
3900 int v9; // eax@11 | |
3901 unsigned int v10; // ecx@12 | |
3902 int v11; // eax@12 | |
3903 int v12; // esi@12 | |
3904 char *v13; // eax@12 | |
3905 GUIWindow *v14; // ebx@13 | |
3906 char *v15; // esi@14 | 3894 char *v15; // esi@14 |
3907 GUIButton *v16; // eax@15 | 3895 GUIButton *pButton; // eax@15 |
3908 unsigned int v17; // ecx@15 | |
3909 int v18; // ecx@17 | 3896 int v18; // ecx@17 |
3910 int v19; // ecx@18 | |
3911 int v20; // ecx@19 | |
3912 int v21; // ecx@20 | |
3913 int v22; // ecx@21 | |
3914 unsigned int v23; // ecx@23 | |
3915 int v24; // ecx@35 | |
3916 int v25; // ecx@36 | |
3917 int v26; // ecx@37 | |
3918 int v27; // ecx@38 | |
3919 int v28; // ecx@39 | |
3920 char *v29; // esi@42 | 3897 char *v29; // esi@42 |
3921 unsigned int v30; // ST20_4@42 | |
3922 int v31; // ST1C_4@42 | 3898 int v31; // ST1C_4@42 |
3923 unsigned int v32; // eax@42 | |
3924 char *v33; // eax@43 | |
3925 int v34; // esi@51 | 3899 int v34; // esi@51 |
3926 int v35; // eax@51 | |
3927 unsigned int v36; // edi@51 | 3900 unsigned int v36; // edi@51 |
3928 GUIButton *v37; // eax@52 | 3901 GUIButton *v37; // eax@52 |
3929 int v38; // eax@52 | 3902 int v38; // eax@52 |
3930 signed int v39; // ecx@54 | 3903 signed int v39; // ecx@54 |
3931 int v40; // edi@57 | 3904 int v40; // edi@57 |
3935 int v44; // eax@60 | 3908 int v44; // eax@60 |
3936 unsigned int v45; // ecx@60 | 3909 unsigned int v45; // ecx@60 |
3937 unsigned __int16 v46; // ax@60 | 3910 unsigned __int16 v46; // ax@60 |
3938 GUIFont *v47; // ebx@64 | 3911 GUIFont *v47; // ebx@64 |
3939 int v48; // esi@64 | 3912 int v48; // esi@64 |
3940 char *v49; // eax@66 | |
3941 GUIWindow w; // [sp+Ch] [bp-110h]@64 | 3913 GUIWindow w; // [sp+Ch] [bp-110h]@64 |
3942 GUIWindow v52; // [sp+60h] [bp-BCh]@13 | 3914 GUIWindow v52; // [sp+60h] [bp-BCh]@13 |
3943 GUIWindow a1; // [sp+B4h] [bp-68h]@1 | 3915 GUIWindow house_window; // [sp+B4h] [bp-68h]@1 |
3944 unsigned int v54; // [sp+108h] [bp-14h]@14 | |
3945 int v55; // [sp+10Ch] [bp-10h]@6 | |
3946 int v56; // [sp+110h] [bp-Ch]@13 | |
3947 char *pInString; // [sp+114h] [bp-8h]@12 | 3916 char *pInString; // [sp+114h] [bp-8h]@12 |
3948 NPCData *v58; // [sp+118h] [bp-4h]@6 | 3917 |
3949 | 3918 memcpy(&house_window, pDialogueWindow, sizeof(house_window)); |
3950 memcpy(&a1, pDialogueWindow, sizeof(a1)); | |
3951 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) | 3919 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) |
3952 { | 3920 { |
3953 v0 = pMapStats->pInfos[uHouse_ExitPic].pName; | 3921 house_window.uFrameX = 493; |
3954 v1 = pMapStats->pInfos[uHouse_ExitPic].pName; | 3922 house_window.uFrameWidth = 126; |
3955 a1.uFrameX = 493; | 3923 house_window.uFrameZ = 366; |
3956 a1.uFrameWidth = 126; | 3924 house_window.DrawTitleText(pFontCreate, 0, 2, 0, pMapStats->pInfos[uHouse_ExitPic].pName, 3); |
3957 a1.uFrameZ = 366; | 3925 house_window.uFrameX = 483; |
3958 a1.DrawTitleText(pFontCreate, 0, 2u, 0, v1, 3u); | 3926 house_window.uFrameWidth = 148; |
3959 a1.uFrameX = 483; | 3927 house_window.uFrameZ = 334; |
3960 a1.uFrameWidth = 148; | |
3961 a1.uFrameZ = 334; | |
3962 v2 = pTransitionStrings[uHouse_ExitPic]; | 3928 v2 = pTransitionStrings[uHouse_ExitPic]; |
3963 if ( !v2 ) | 3929 if ( !v2 ) |
3964 { | 3930 { |
3965 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[411], v0); | 3931 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[uHouse_ExitPic].pName);//Войти в ^Pv[%s] |
3966 v2 = pTmpBuf.data(); | 3932 v2 = pTmpBuf.data(); |
3967 } | 3933 } |
3968 v3 = v2; | 3934 house_window.DrawTitleText(pFontCreate, 0, (212 - pFontCreate->CalcTextHeight(v2, &house_window, 0, 0)) / 2 + 101, 0, v2, 3); |
3969 v4 = pFontCreate->CalcTextHeight(v2, &a1, 0, 0); | |
3970 a1.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, v3, 3u); | |
3971 return; | 3935 return; |
3972 } | 3936 } |
3973 a1.uFrameWidth -= 10; | 3937 house_window.uFrameWidth -= 10; |
3974 a1.uFrameZ -= 10; | 3938 house_window.uFrameZ -= 10; |
3975 v58 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 | 3939 pNPC = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 |
3976 v6 = v58; | 3940 if ( pNPC->uProfession ) |
3977 v55 = TargetColor(0xE1u, 0xCDu, 0x23u); | 3941 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s |
3978 v7 = TargetColor(0x15u, 0x99u, 0xE9u); | |
3979 v8 = v6->uProfession; | |
3980 if ( v8 ) | |
3981 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]); | |
3982 else | 3942 else |
3983 strcpy(pTmpBuf.data(), v6->pName); | 3943 strcpy(pTmpBuf.data(), pNPC->pName); |
3984 a1.DrawTitleText(pFontCreate, 0x1E3u, 0x71u, v7, pTmpBuf.data(), 3u); | 3944 house_window.DrawTitleText(pFontCreate, 483, 113, TargetColor(0x15u, 0x99u, 0xE9u), pTmpBuf.data(), 3); |
3985 if ( !dword_591080 ) | 3945 if ( !dword_591080 ) |
3986 { | 3946 { |
3987 if ( !uDialogueType ) | 3947 if ( !uDialogueType ) |
3988 { | 3948 { |
3989 v9 = v6->greet; | 3949 if ( pNPC->greet ) |
3990 if ( v9 ) | 3950 { |
3991 { | 3951 house_window.uFrameWidth = game_viewport_width; |
3992 v10 = v6->uFlags; | 3952 house_window.uFrameZ = 452; |
3993 a1.uFrameWidth = game_viewport_width; | 3953 pInString = (char *)*(&pNPCStats->field_17884 + ((pNPC->uFlags & 3) == 2) + 2 * pNPC->greet); |
3994 a1.uFrameZ = 452; | 3954 pRenderer->GetLeather(8, 352 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7), |
3995 pInString = (char *)*(&pNPCStats->field_17884 + ((v10 & 3) == 2) + 2 * v9); | 3955 pIcons_LOD->GetTexture(uTextureID_Leather), pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight |
3996 v11 = pFontArrus->CalcTextHeight(pInString, &a1, 13, 0); | 3956 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7)); |
3997 v12 = v11 + 7; | 3957 pRenderer->DrawTextureIndexed(8, 347 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7), pTexture_591428); |
3998 pRenderer->GetLeather(8, 352 - (v11 + 7), | 3958 pDialogueWindow->DrawText(pFontArrus, 13, 354 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7), |
3999 pIcons_LOD->GetTexture(uTextureID_Leather), | 3959 0, FitTextInAWindow(pInString, pFontArrus, &house_window, 0xDu, 0), 0, 0, 0); |
4000 pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight - (v11 + 7)); | 3960 } |
4001 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 3961 } |
4002 v13 = FitTextInAWindow(pInString, pFontArrus, &a1, 0xDu, 0); | 3962 } |
4003 pDialogueWindow->DrawText(pFontArrus, 13, 354 - v12, 0, v13, 0, 0, 0); | |
4004 } | |
4005 } | |
4006 } | |
4007 v14 = pDialogueWindow; | |
4008 memcpy(&v52, pDialogueWindow, sizeof(v52)); | 3963 memcpy(&v52, pDialogueWindow, sizeof(v52)); |
4009 v52.uFrameX = 483; | 3964 v52.uFrameX = 483; |
4010 v52.uFrameWidth = 148; | 3965 v52.uFrameWidth = 148; |
4011 v52.uFrameZ = 334; | 3966 v52.uFrameZ = 334; |
4012 v56 = v52.pStartingPosActiveItem; | 3967 |
4013 if ( v52.pStartingPosActiveItem < v52.pStartingPosActiveItem + v52.pNumPresenceButton ) | 3968 if ( v52.pStartingPosActiveItem < v52.pStartingPosActiveItem + v52.pNumPresenceButton ) |
4014 { | 3969 { |
4015 v15 = "";//(char *)v54; | 3970 v15 = ""; |
4016 while ( 1 ) | 3971 for ( int i = v52.pStartingPosActiveItem; i < v52.pStartingPosActiveItem + v52.pNumPresenceButton; ++i ) |
4017 { | 3972 { |
4018 v16 = v52.GetControl(v56); | 3973 pButton = v52.GetControl(i); |
4019 v17 = v16->msg_param; | 3974 if ( (signed int)pButton->msg_param > 24 ) |
4020 pInString = (char *)v16; | 3975 { |
4021 if ( (signed int)v17 > 24 ) | 3976 if ( pButton->msg_param == 76 ) |
4022 { | 3977 { |
4023 v24 = v17 - 76; | 3978 v15 = pGlobalTXT_LocalizationStrings[406];//Нанять |
4024 if ( !v24 ) | 3979 strcpy(pButton->pButtonName, v15); |
4025 { | 3980 continue; |
4026 v15 = pGlobalTXT_LocalizationStrings[406]; | 3981 } |
4027 goto LABEL_49; | 3982 if ( pButton->msg_param == 77 ) |
4028 } | 3983 { |
4029 v25 = v24 - 1; | 3984 strcpy(pButton->pButtonName, pGlobalTXT_LocalizationStrings[407]);//Подробнее |
4030 if ( !v25 ) | 3985 continue; |
4031 { | 3986 } |
4032 v15 = pGlobalTXT_LocalizationStrings[407]; | 3987 if ( pButton->msg_param == 79 ) |
4033 goto LABEL_49; | 3988 { |
4034 } | 3989 strcpy(pButton->pButtonName, _4B254D_SkillMasteryTeacher((int)v52.ptr_1C)); |
4035 v26 = v25 - 2; | 3990 continue; |
4036 if ( !v26 ) | 3991 } |
4037 { | 3992 if ( pButton->msg_param == 82 ) |
4038 v33 = _4B254D_SkillMasteryTeacher((int)v52.ptr_1C); | 3993 { |
4039 LABEL_44: | 3994 strcpy(pButton->pButtonName, ContractSelectText((int)v52.ptr_1C)); |
4040 v15 = v33; | 3995 continue; |
4041 v16 = (GUIButton *)pInString; | 3996 } |
4042 goto LABEL_49; | 3997 if ( pButton->msg_param == 83 ) |
4043 } | |
4044 v27 = v26 - 3; | |
4045 if ( !v27 ) | |
4046 { | |
4047 v33 = (char *)ContractSelectText((int)v52.ptr_1C); | |
4048 goto LABEL_44; | |
4049 } | |
4050 v28 = v27 - 1; | |
4051 if ( !v28 ) | |
4052 { | 3998 { |
4053 v29 = pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName; | 3999 v29 = pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName; |
4054 v30 = TargetColor(0xFFu, 0xFFu, 0xFFu); | |
4055 v31 = *(int *)v29; | 4000 v31 = *(int *)v29; |
4056 v32 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 4001 sprintfex(pTmpBuf.data(), "\f%05d%s\f%05d", TargetColor(0xFFu, 0xFFu, 0x9Bu), v31, TargetColor(0xFFu, 0xFFu, 0xFFu)); |
4057 sprintfex(pTmpBuf.data(), "\f%05d%s\f%05d", v32, v31, v30); | |
4058 sprintfex(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * (unsigned __int8)v29[8]); | 4002 sprintfex(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * (unsigned __int8)v29[8]); |
4059 current_npc_text = pTmpBuf2.data(); | 4003 current_npc_text = pTmpBuf2.data(); |
4060 v15 = ""; | 4004 strcpy(pButton->pButtonName, ""); |
4061 v16 = (GUIButton *)pInString; | 4005 continue; |
4062 goto LABEL_49; | 4006 } |
4063 } | 4007 if ( pButton->msg_param != 93 ) |
4064 if ( v28 != 10 ) | 4008 { |
4065 { | 4009 strcpy(pButton->pButtonName, ""); |
4066 v15 = ""; | 4010 continue; |
4067 goto LABEL_49; | |
4068 } | 4011 } |
4069 } | 4012 } |
4070 else | 4013 else |
4071 { | 4014 { |
4072 if ( v17 == 24 ) | 4015 if ( pButton->msg_param == 24 )//evt_F |
4073 { | 4016 { |
4074 v23 = v58->evt_F; | 4017 v15 = (char *)pNPCTopics[pNPC->evt_F-1].pTopic; |
4075 LABEL_33: | |
4076 v15 = (char *)pNPCTopics[v23-1].pTopic;//(&dword_721660)[8 * v23]; | |
4077 if ( !v15 ) | 4018 if ( !v15 ) |
4078 { | 4019 { |
4079 v16->msg_param = 0; | 4020 pButton->msg_param = 0; |
4080 v15 = ""; | 4021 v15 = ""; |
4081 } | 4022 } |
4082 goto LABEL_49; | 4023 strcpy(pButton->pButtonName, v15); |
4083 } | 4024 continue; |
4084 v18 = v17 - 13; | 4025 } |
4026 v18 = pButton->msg_param - 13; | |
4085 if ( v18 ) | 4027 if ( v18 ) |
4086 { | 4028 { |
4087 v19 = v18 - 6; | 4029 if ( pButton->msg_param == 19 )//evt_A |
4088 if ( !v19 ) | 4030 { |
4089 { | 4031 v15 = (char *)pNPCTopics[pNPC->evt_A-1].pTopic; |
4090 v23 = v58->evt_A; | |
4091 goto LABEL_33; | |
4092 } | |
4093 v20 = v19 - 1; | |
4094 if ( !v20 ) | |
4095 { | |
4096 v15 = (char *)pNPCTopics[v58->evt_B-1].pTopic;//(&dword_721660)[8 * v58->evtb]; | |
4097 if ( !v15 ) | 4032 if ( !v15 ) |
4098 { | 4033 { |
4099 v16->msg_param = 0; | 4034 pButton->msg_param = 0; |
4035 v15 = ""; | |
4036 } | |
4037 strcpy(pButton->pButtonName, v15); | |
4038 continue; | |
4039 } | |
4040 if ( pButton->msg_param == 20 )//evt_B | |
4041 { | |
4042 v15 = (char *)pNPCTopics[pNPC->evt_B-1].pTopic; | |
4043 if ( !v15 ) | |
4044 { | |
4045 pButton->msg_param = 0; | |
4100 v15 = ""; | 4046 v15 = ""; |
4101 } | 4047 } |
4102 if ( uDialogueType != 84 ) | 4048 if ( uDialogueType != 84 ) |
4103 goto LABEL_49; | 4049 { |
4104 sprintf(pTmpBuf.data(), format_4E2D80, v55, pItemsTable->pItems[contract_approved].pUnidentifiedName); | 4050 strcpy(pButton->pButtonName, v15); |
4051 continue; | |
4052 } | |
4053 sprintf(pTmpBuf.data(), format_4E2D80, TargetColor(0xE1u, 0xCDu, 0x23u), pItemsTable->pItems[contract_approved].pUnidentifiedName); | |
4105 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data()); | 4054 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data()); |
4106 current_npc_text = pTmpBuf2.data(); | 4055 current_npc_text = pTmpBuf2.data(); |
4107 v16 = (GUIButton *)pInString; | 4056 strcpy(pButton->pButtonName, v15); |
4108 goto LABEL_49; | 4057 continue; |
4109 } | 4058 } |
4110 v21 = v20 - 1; | 4059 if ( pButton->msg_param == 21 )//evt_C |
4111 if ( !v21 ) | 4060 { |
4112 { | 4061 v15 = (char *)pNPCTopics[pNPC->evt_C-1].pTopic; |
4113 v23 = v58->evt_C; | 4062 if ( !v15 ) |
4114 goto LABEL_33; | 4063 { |
4115 } | 4064 pButton->msg_param = 0; |
4116 v22 = v21 - 1; | 4065 v15 = ""; |
4117 if ( !v22 ) | 4066 } |
4118 { | 4067 strcpy(pButton->pButtonName, v15); |
4119 v23 = v58->evt_D; | 4068 continue; |
4120 goto LABEL_33; | 4069 } |
4121 } | 4070 if ( pButton->msg_param == 22 )//evt_D |
4122 if ( v22 == 1 ) | 4071 { |
4123 { | 4072 v15 = (char *)pNPCTopics[pNPC->evt_D-1].pTopic; |
4124 v23 = v58->evt_E; | 4073 if ( !v15 ) |
4125 goto LABEL_33; | 4074 { |
4126 } | 4075 pButton->msg_param = 0; |
4127 LABEL_41: | 4076 v15 = ""; |
4128 v15 = ""; | 4077 } |
4129 goto LABEL_49; | 4078 strcpy(pButton->pButtonName, v15); |
4130 } | 4079 continue; |
4131 v15 = pGlobalTXT_LocalizationStrings[122]; | 4080 } |
4132 } | 4081 if ( pButton->msg_param == 23 )//evt_E |
4133 LABEL_49: | 4082 { |
4134 strcpy(v16->pButtonName, v15); | 4083 v15 = (char *)pNPCTopics[pNPC->evt_E-1].pTopic; |
4135 ++v56; | 4084 if ( !v15 ) |
4136 if ( v56 >= v52.pStartingPosActiveItem + v52.pNumPresenceButton ) | 4085 { |
4137 { | 4086 pButton->msg_param = 0; |
4138 v14 = pDialogueWindow; | 4087 v15 = ""; |
4139 break; | 4088 } |
4089 strcpy(pButton->pButtonName, v15); | |
4090 continue; | |
4091 } | |
4092 strcpy(pButton->pButtonName, ""); | |
4093 continue; | |
4094 } | |
4095 strcpy(pButton->pButtonName, pGlobalTXT_LocalizationStrings[122]);//Вступить | |
4140 } | 4096 } |
4141 } | 4097 } |
4142 } | 4098 } |
4143 v34 = 0; | 4099 v34 = 0; |
4144 v54 = TargetColor(0xFFu, 0xFFu, 0xFFu); | 4100 v36 = pDialogueWindow->pStartingPosActiveItem; |
4145 v35 = TargetColor(0xE1u, 0xCDu, 0x23u); | 4101 for ( i = v36 + pDialogueWindow->pNumPresenceButton; (signed int)v36 < (signed int)i; i = pDialogueWindow->pNumPresenceButton |
4146 v36 = v14->pStartingPosActiveItem; | |
4147 v55 = v35; | |
4148 for ( i = v36 + v14->pNumPresenceButton; (signed int)v36 < (signed int)i; i = pDialogueWindow->pNumPresenceButton | |
4149 + pDialogueWindow->pStartingPosActiveItem ) | 4102 + pDialogueWindow->pStartingPosActiveItem ) |
4150 { | 4103 { |
4151 v37 = v14->GetControl(v36); | 4104 v37 = pDialogueWindow->GetControl(v36); |
4152 v38 = pFontArrus->CalcTextHeight(v37->pButtonName, &v52, 0, 0); | 4105 v38 = pFontArrus->CalcTextHeight(v37->pButtonName, &v52, 0, 0); |
4153 v14 = pDialogueWindow; | |
4154 v34 += v38; | 4106 v34 += v38; |
4155 ++v36; | 4107 ++v36; |
4156 } | 4108 } |
4157 v39 = v14->pNumPresenceButton; | 4109 v39 = pDialogueWindow->pNumPresenceButton; |
4158 if ( v39 ) | 4110 if ( v39 ) |
4159 { | 4111 { |
4160 v58 = (NPCData *)((174 - v34) / v39); | 4112 pNPC = (NPCData *)((174 - v34) / v39); |
4161 if ( (signed int)v58 > 32 ) | 4113 if ( (signed int)pNPC > 32 ) |
4162 v58 = (NPCData *)32; | 4114 pNPC = (NPCData *)32; |
4163 pInString = (char *)2; | 4115 pInString = (char *)2; |
4164 v40 = (174 - (signed int)v58 * v39 - v34) / 2 - (signed int)v58 / 2 + 138; | 4116 v40 = (174 - (signed int)pNPC * v39 - v34) / 2 - (signed int)pNPC / 2 + 138; |
4165 v56 = v14->pStartingPosActiveItem; | 4117 for ( i = pDialogueWindow->pStartingPosActiveItem; i < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem; ++i ) |
4166 i = v56; | 4118 { |
4167 if ( (signed int)i < (signed int)(i + v39) ) | 4119 v41 = pDialogueWindow->GetControl(i); |
4168 { | 4120 v42 = v41; |
4169 while ( 1 ) | 4121 v43 = v41->pButtonName; |
4170 { | 4122 v41->uY = (unsigned int)((char *)pNPC + v40); |
4171 v41 = v14->GetControl(i); | 4123 v44 = pFontArrus->CalcTextHeight(v41->pButtonName, &v52, 0, 0); |
4172 v42 = v41; | 4124 v45 = v42->uY; |
4173 v43 = v41->pButtonName; | 4125 v42->uHeight = v44; |
4174 v41->uY = (unsigned int)((char *)v58 + v40); | 4126 v40 = v45 + v44 - 1; |
4175 v44 = pFontArrus->CalcTextHeight(v41->pButtonName, &v52, 0, 0); | 4127 v42->uW = v40; |
4176 v45 = v42->uY; | 4128 v46 = TargetColor(0xE1u, 0xCDu, 0x23u); |
4177 v42->uHeight = v44; | 4129 if ( (char *)pDialogueWindow->pCurrentPosActiveItem != pInString ) |
4178 v40 = v45 + v44 - 1; | 4130 v46 = TargetColor(0xFFu, 0xFFu, 0xFFu); |
4179 v42->uW = v40; | 4131 v52.DrawTitleText(pFontArrus, 0, v45, v46, v43, 3); |
4180 v46 = v55; | 4132 ++pInString; |
4181 if ( (char *)pDialogueWindow->pCurrentPosActiveItem != pInString ) | |
4182 v46 = v54; | |
4183 v52.DrawTitleText(pFontArrus, 0, v45, v46, v43, 3u); | |
4184 v14 = pDialogueWindow; | |
4185 ++pInString; | |
4186 ++v56; | |
4187 i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem; | |
4188 if ( v56 >= (signed int)i ) | |
4189 break; | |
4190 i = v56; | |
4191 } | |
4192 } | 4133 } |
4193 } | 4134 } |
4194 if ( current_npc_text ) | 4135 if ( current_npc_text ) |
4195 { | 4136 { |
4196 w.uFrameWidth = 458; | 4137 w.uFrameWidth = 458; |
4201 { | 4142 { |
4202 v47 = pFontCreate; | 4143 v47 = pFontCreate; |
4203 v48 = pFontCreate->CalcTextHeight(current_npc_text, &w, 13, 0) + 7; | 4144 v48 = pFontCreate->CalcTextHeight(current_npc_text, &w, 13, 0) + 7; |
4204 } | 4145 } |
4205 pRenderer->GetLeather(8, 352 - v48, pIcons_LOD->GetTexture(uTextureID_Leather), pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight - v48); | 4146 pRenderer->GetLeather(8, 352 - v48, pIcons_LOD->GetTexture(uTextureID_Leather), pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight - v48); |
4206 pRenderer->DrawTextureIndexed(8u, 347 - v48, pTexture_591428); | 4147 pRenderer->DrawTextureIndexed(8, 347 - v48, pTexture_591428); |
4207 v49 = FitTextInAWindow(current_npc_text, v47, &w, 13, 0); | 4148 house_window.DrawText(v47, 13, 354 - v48, 0, FitTextInAWindow(current_npc_text, v47, &w, 13, 0), 0, 0, 0); |
4208 a1.DrawText(v47, 13, 354 - v48, 0, v49, 0, 0, 0); | |
4209 } | 4149 } |
4210 } | 4150 } |
4211 | 4151 |
4212 //----- (004B4F4F) -------------------------------------------------------- | 4152 //----- (004B4F4F) -------------------------------------------------------- |
4213 void JailDialog() | 4153 void JailDialog() |