Mercurial > mm7
comparison UI/UIHouses.cpp @ 1590:5792fdafe2f5
Слияние
author | Ritor1 |
---|---|
date | Wed, 11 Sep 2013 09:39:09 +0600 |
parents | f408fbf3d9cc 1264fce1a17f |
children | d687f6e7c610 |
comparison
equal
deleted
inserted
replaced
1589:f408fbf3d9cc | 1590:5792fdafe2f5 |
---|---|
3795 } | 3795 } |
3796 | 3796 |
3797 //----- (004B2A74) -------------------------------------------------------- | 3797 //----- (004B2A74) -------------------------------------------------------- |
3798 void SimpleHouseAndBoatsDialog() | 3798 void SimpleHouseAndBoatsDialog() |
3799 { | 3799 { |
3800 char *v0; // esi@3 | |
3801 char *v1; // ST1C_4@3 | |
3802 char *v2; // eax@3 | 3800 char *v2; // eax@3 |
3803 const char *v3; // ST1C_4@5 | |
3804 int v4; // eax@5 | |
3805 unsigned int i; // eax@5 | 3801 unsigned int i; // eax@5 |
3806 NPCData *v6; // esi@6 | 3802 NPCData *pNPC; // esi@6 |
3807 unsigned __int16 v7; // bx@6 | |
3808 unsigned int v8; // eax@6 | |
3809 int v9; // eax@11 | |
3810 unsigned int v10; // ecx@12 | |
3811 int v11; // eax@12 | |
3812 int v12; // esi@12 | |
3813 char *v13; // eax@12 | |
3814 GUIWindow *v14; // ebx@13 | |
3815 char *v15; // esi@14 | 3803 char *v15; // esi@14 |
3816 GUIButton *v16; // eax@15 | 3804 GUIButton *pButton; // eax@15 |
3817 unsigned int v17; // ecx@15 | |
3818 int v18; // ecx@17 | 3805 int v18; // ecx@17 |
3819 int v19; // ecx@18 | |
3820 int v20; // ecx@19 | |
3821 int v21; // ecx@20 | |
3822 int v22; // ecx@21 | |
3823 unsigned int v23; // ecx@23 | |
3824 int v24; // ecx@35 | |
3825 int v25; // ecx@36 | |
3826 int v26; // ecx@37 | |
3827 int v27; // ecx@38 | |
3828 int v28; // ecx@39 | |
3829 char *v29; // esi@42 | 3806 char *v29; // esi@42 |
3830 unsigned int v30; // ST20_4@42 | |
3831 int v31; // ST1C_4@42 | 3807 int v31; // ST1C_4@42 |
3832 unsigned int v32; // eax@42 | |
3833 char *v33; // eax@43 | |
3834 int v34; // esi@51 | 3808 int v34; // esi@51 |
3835 int v35; // eax@51 | |
3836 unsigned int v36; // edi@51 | 3809 unsigned int v36; // edi@51 |
3837 GUIButton *v37; // eax@52 | 3810 GUIButton *v37; // eax@52 |
3838 int v38; // eax@52 | 3811 int v38; // eax@52 |
3839 signed int v39; // ecx@54 | 3812 signed int v39; // ecx@54 |
3840 int v40; // edi@57 | 3813 int v40; // edi@57 |
3844 int v44; // eax@60 | 3817 int v44; // eax@60 |
3845 unsigned int v45; // ecx@60 | 3818 unsigned int v45; // ecx@60 |
3846 unsigned __int16 v46; // ax@60 | 3819 unsigned __int16 v46; // ax@60 |
3847 GUIFont *v47; // ebx@64 | 3820 GUIFont *v47; // ebx@64 |
3848 int v48; // esi@64 | 3821 int v48; // esi@64 |
3849 char *v49; // eax@66 | |
3850 GUIWindow w; // [sp+Ch] [bp-110h]@64 | 3822 GUIWindow w; // [sp+Ch] [bp-110h]@64 |
3851 GUIWindow v52; // [sp+60h] [bp-BCh]@13 | 3823 GUIWindow v52; // [sp+60h] [bp-BCh]@13 |
3852 GUIWindow a1; // [sp+B4h] [bp-68h]@1 | 3824 GUIWindow house_window; // [sp+B4h] [bp-68h]@1 |
3853 unsigned int v54; // [sp+108h] [bp-14h]@14 | |
3854 int v55; // [sp+10Ch] [bp-10h]@6 | |
3855 int v56; // [sp+110h] [bp-Ch]@13 | |
3856 char *pInString; // [sp+114h] [bp-8h]@12 | 3825 char *pInString; // [sp+114h] [bp-8h]@12 |
3857 NPCData *v58; // [sp+118h] [bp-4h]@6 | 3826 |
3858 | 3827 memcpy(&house_window, pDialogueWindow, sizeof(house_window)); |
3859 memcpy(&a1, pDialogueWindow, sizeof(a1)); | |
3860 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) | 3828 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) |
3861 { | 3829 { |
3862 v0 = pMapStats->pInfos[uHouse_ExitPic].pName; | 3830 house_window.uFrameX = 493; |
3863 v1 = pMapStats->pInfos[uHouse_ExitPic].pName; | 3831 house_window.uFrameWidth = 126; |
3864 a1.uFrameX = 493; | 3832 house_window.uFrameZ = 366; |
3865 a1.uFrameWidth = 126; | 3833 house_window.DrawTitleText(pFontCreate, 0, 2, 0, pMapStats->pInfos[uHouse_ExitPic].pName, 3); |
3866 a1.uFrameZ = 366; | 3834 house_window.uFrameX = 483; |
3867 a1.DrawTitleText(pFontCreate, 0, 2u, 0, v1, 3u); | 3835 house_window.uFrameWidth = 148; |
3868 a1.uFrameX = 483; | 3836 house_window.uFrameZ = 334; |
3869 a1.uFrameWidth = 148; | |
3870 a1.uFrameZ = 334; | |
3871 v2 = pTransitionStrings[uHouse_ExitPic]; | 3837 v2 = pTransitionStrings[uHouse_ExitPic]; |
3872 if ( !v2 ) | 3838 if ( !v2 ) |
3873 { | 3839 { |
3874 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[411], v0); | 3840 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[411], pMapStats->pInfos[uHouse_ExitPic].pName);// ^Pv[%s] |
3875 v2 = pTmpBuf.data(); | 3841 v2 = pTmpBuf.data(); |
3876 } | 3842 } |
3877 v3 = v2; | 3843 house_window.DrawTitleText(pFontCreate, 0, (212 - pFontCreate->CalcTextHeight(v2, &house_window, 0, 0)) / 2 + 101, 0, v2, 3); |
3878 v4 = pFontCreate->CalcTextHeight(v2, &a1, 0, 0); | |
3879 a1.DrawTitleText(pFontCreate, 0, (212 - v4) / 2 + 101, 0, v3, 3u); | |
3880 return; | 3844 return; |
3881 } | 3845 } |
3882 a1.uFrameWidth -= 10; | 3846 house_window.uFrameWidth -= 10; |
3883 a1.uFrameZ -= 10; | 3847 house_window.uFrameZ -= 10; |
3884 v58 = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 | 3848 pNPC = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) )];//- 1 |
3885 v6 = v58; | 3849 if ( pNPC->uProfession ) |
3886 v55 = TargetColor(0xE1u, 0xCDu, 0x23u); | 3850 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s |
3887 v7 = TargetColor(0x15u, 0x99u, 0xE9u); | |
3888 v8 = v6->uProfession; | |
3889 if ( v8 ) | |
3890 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], v6->pName, aNPCProfessionNames[v8]); | |
3891 else | 3851 else |
3892 strcpy(pTmpBuf.data(), v6->pName); | 3852 strcpy(pTmpBuf.data(), pNPC->pName); |
3893 a1.DrawTitleText(pFontCreate, 0x1E3u, 0x71u, v7, pTmpBuf.data(), 3u); | 3853 house_window.DrawTitleText(pFontCreate, 483, 113, TargetColor(0x15u, 0x99u, 0xE9u), pTmpBuf.data(), 3); |
3894 if ( !dword_591080 ) | 3854 if ( !dword_591080 ) |
3895 { | 3855 { |
3896 if ( !uDialogueType ) | 3856 if ( !uDialogueType ) |
3897 { | 3857 { |
3898 v9 = v6->greet; | 3858 if ( pNPC->greet ) |
3899 if ( v9 ) | 3859 { |
3900 { | 3860 house_window.uFrameWidth = game_viewport_width; |
3901 v10 = v6->uFlags; | 3861 house_window.uFrameZ = 452; |
3902 a1.uFrameWidth = game_viewport_width; | 3862 pInString = (char *)*(&pNPCStats->field_17884 + ((pNPC->uFlags & 3) == 2) + 2 * pNPC->greet); |
3903 a1.uFrameZ = 452; | 3863 pRenderer->GetLeather(8, 352 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7), |
3904 pInString = (char *)*(&pNPCStats->field_17884 + ((v10 & 3) == 2) + 2 * v9); | 3864 pIcons_LOD->GetTexture(uTextureID_Leather), pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight |
3905 v11 = pFontArrus->CalcTextHeight(pInString, &a1, 13, 0); | 3865 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7)); |
3906 v12 = v11 + 7; | 3866 pRenderer->DrawTextureIndexed(8, 347 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7), pTexture_591428); |
3907 pRenderer->GetLeather(8, 352 - (v11 + 7), | 3867 pDialogueWindow->DrawText(pFontArrus, 13, 354 - (pFontArrus->CalcTextHeight(pInString, &house_window, 13, 0) + 7), |
3908 pIcons_LOD->GetTexture(uTextureID_Leather), | 3868 0, FitTextInAWindow(pInString, pFontArrus, &house_window, 0xDu, 0), 0, 0, 0); |
3909 pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight - (v11 + 7)); | 3869 } |
3910 pRenderer->DrawTextureIndexed(8u, 347 - v12, pTexture_591428); | 3870 } |
3911 v13 = FitTextInAWindow(pInString, pFontArrus, &a1, 0xDu, 0); | 3871 } |
3912 pDialogueWindow->DrawText(pFontArrus, 13, 354 - v12, 0, v13, 0, 0, 0); | |
3913 } | |
3914 } | |
3915 } | |
3916 v14 = pDialogueWindow; | |
3917 memcpy(&v52, pDialogueWindow, sizeof(v52)); | 3872 memcpy(&v52, pDialogueWindow, sizeof(v52)); |
3918 v52.uFrameX = 483; | 3873 v52.uFrameX = 483; |
3919 v52.uFrameWidth = 148; | 3874 v52.uFrameWidth = 148; |
3920 v52.uFrameZ = 334; | 3875 v52.uFrameZ = 334; |
3921 v56 = v52.pStartingPosActiveItem; | 3876 |
3922 if ( v52.pStartingPosActiveItem < v52.pStartingPosActiveItem + v52.pNumPresenceButton ) | 3877 if ( v52.pStartingPosActiveItem < v52.pStartingPosActiveItem + v52.pNumPresenceButton ) |
3923 { | 3878 { |
3924 v15 = "";//(char *)v54; | 3879 v15 = ""; |
3925 while ( 1 ) | 3880 for ( int i = v52.pStartingPosActiveItem; i < v52.pStartingPosActiveItem + v52.pNumPresenceButton; ++i ) |
3926 { | 3881 { |
3927 v16 = v52.GetControl(v56); | 3882 pButton = v52.GetControl(i); |
3928 v17 = v16->msg_param; | 3883 if ( (signed int)pButton->msg_param > 24 ) |
3929 pInString = (char *)v16; | 3884 { |
3930 if ( (signed int)v17 > 24 ) | 3885 if ( pButton->msg_param == 76 ) |
3931 { | 3886 { |
3932 v24 = v17 - 76; | 3887 v15 = pGlobalTXT_LocalizationStrings[406];// |
3933 if ( !v24 ) | 3888 strcpy(pButton->pButtonName, v15); |
3934 { | 3889 continue; |
3935 v15 = pGlobalTXT_LocalizationStrings[406]; | 3890 } |
3936 goto LABEL_49; | 3891 if ( pButton->msg_param == 77 ) |
3937 } | 3892 { |
3938 v25 = v24 - 1; | 3893 strcpy(pButton->pButtonName, pGlobalTXT_LocalizationStrings[407]);// |
3939 if ( !v25 ) | 3894 continue; |
3940 { | 3895 } |
3941 v15 = pGlobalTXT_LocalizationStrings[407]; | 3896 if ( pButton->msg_param == 79 ) |
3942 goto LABEL_49; | 3897 { |
3943 } | 3898 strcpy(pButton->pButtonName, _4B254D_SkillMasteryTeacher((int)v52.ptr_1C)); |
3944 v26 = v25 - 2; | 3899 continue; |
3945 if ( !v26 ) | 3900 } |
3946 { | 3901 if ( pButton->msg_param == 82 ) |
3947 v33 = _4B254D_SkillMasteryTeacher((int)v52.ptr_1C); | 3902 { |
3948 LABEL_44: | 3903 strcpy(pButton->pButtonName, ContractSelectText((int)v52.ptr_1C)); |
3949 v15 = v33; | 3904 continue; |
3950 v16 = (GUIButton *)pInString; | 3905 } |
3951 goto LABEL_49; | 3906 if ( pButton->msg_param == 83 ) |
3952 } | |
3953 v27 = v26 - 3; | |
3954 if ( !v27 ) | |
3955 { | |
3956 v33 = (char *)ContractSelectText((int)v52.ptr_1C); | |
3957 goto LABEL_44; | |
3958 } | |
3959 v28 = v27 - 1; | |
3960 if ( !v28 ) | |
3961 { | 3907 { |
3962 v29 = pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName; | 3908 v29 = pMonsterStats->pInfos[bountyHunting_monster_id_for_hunting].pName; |
3963 v30 = TargetColor(0xFFu, 0xFFu, 0xFFu); | |
3964 v31 = *(int *)v29; | 3909 v31 = *(int *)v29; |
3965 v32 = TargetColor(0xFFu, 0xFFu, 0x9Bu); | 3910 sprintfex(pTmpBuf.data(), "\f%05d%s\f%05d", TargetColor(0xFFu, 0xFFu, 0x9Bu), v31, TargetColor(0xFFu, 0xFFu, 0xFFu)); |
3966 sprintfex(pTmpBuf.data(), "\f%05d%s\f%05d", v32, v31, v30); | |
3967 sprintfex(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * (unsigned __int8)v29[8]); | 3911 sprintfex(pTmpBuf2.data(), bountyHunting_text, pTmpBuf.data(), 100 * (unsigned __int8)v29[8]); |
3968 current_npc_text = pTmpBuf2.data(); | 3912 current_npc_text = pTmpBuf2.data(); |
3969 v15 = ""; | 3913 strcpy(pButton->pButtonName, ""); |
3970 v16 = (GUIButton *)pInString; | 3914 continue; |
3971 goto LABEL_49; | 3915 } |
3972 } | 3916 if ( pButton->msg_param != 93 ) |
3973 if ( v28 != 10 ) | 3917 { |
3974 { | 3918 strcpy(pButton->pButtonName, ""); |
3975 v15 = ""; | 3919 continue; |
3976 goto LABEL_49; | |
3977 } | 3920 } |
3978 } | 3921 } |
3979 else | 3922 else |
3980 { | 3923 { |
3981 if ( v17 == 24 ) | 3924 if ( pButton->msg_param == 24 )//evt_F |
3982 { | 3925 { |
3983 v23 = v58->evt_F; | 3926 v15 = (char *)pNPCTopics[pNPC->evt_F-1].pTopic; |
3984 LABEL_33: | |
3985 v15 = (char *)pNPCTopics[v23-1].pTopic;//(&dword_721660)[8 * v23]; | |
3986 if ( !v15 ) | 3927 if ( !v15 ) |
3987 { | 3928 { |
3988 v16->msg_param = 0; | 3929 pButton->msg_param = 0; |
3989 v15 = ""; | 3930 v15 = ""; |
3990 } | 3931 } |
3991 goto LABEL_49; | 3932 strcpy(pButton->pButtonName, v15); |
3992 } | 3933 continue; |
3993 v18 = v17 - 13; | 3934 } |
3935 v18 = pButton->msg_param - 13; | |
3994 if ( v18 ) | 3936 if ( v18 ) |
3995 { | 3937 { |
3996 v19 = v18 - 6; | 3938 if ( pButton->msg_param == 19 )//evt_A |
3997 if ( !v19 ) | 3939 { |
3998 { | 3940 v15 = (char *)pNPCTopics[pNPC->evt_A-1].pTopic; |
3999 v23 = v58->evt_A; | |
4000 goto LABEL_33; | |
4001 } | |
4002 v20 = v19 - 1; | |
4003 if ( !v20 ) | |
4004 { | |
4005 v15 = (char *)pNPCTopics[v58->evt_B-1].pTopic;//(&dword_721660)[8 * v58->evtb]; | |
4006 if ( !v15 ) | 3941 if ( !v15 ) |
4007 { | 3942 { |
4008 v16->msg_param = 0; | 3943 pButton->msg_param = 0; |
3944 v15 = ""; | |
3945 } | |
3946 strcpy(pButton->pButtonName, v15); | |
3947 continue; | |
3948 } | |
3949 if ( pButton->msg_param == 20 )//evt_B | |
3950 { | |
3951 v15 = (char *)pNPCTopics[pNPC->evt_B-1].pTopic; | |
3952 if ( !v15 ) | |
3953 { | |
3954 pButton->msg_param = 0; | |
4009 v15 = ""; | 3955 v15 = ""; |
4010 } | 3956 } |
4011 if ( uDialogueType != 84 ) | 3957 if ( uDialogueType != 84 ) |
4012 goto LABEL_49; | 3958 { |
4013 sprintf(pTmpBuf.data(), format_4E2D80, v55, pItemsTable->pItems[contract_approved].pUnidentifiedName); | 3959 strcpy(pButton->pButtonName, v15); |
3960 continue; | |
3961 } | |
3962 sprintf(pTmpBuf.data(), format_4E2D80, TargetColor(0xE1u, 0xCDu, 0x23u), pItemsTable->pItems[contract_approved].pUnidentifiedName); | |
4014 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data()); | 3963 sprintf(pTmpBuf2.data(), current_npc_text, pTmpBuf.data()); |
4015 current_npc_text = pTmpBuf2.data(); | 3964 current_npc_text = pTmpBuf2.data(); |
4016 v16 = (GUIButton *)pInString; | 3965 strcpy(pButton->pButtonName, v15); |
4017 goto LABEL_49; | 3966 continue; |
4018 } | 3967 } |
4019 v21 = v20 - 1; | 3968 if ( pButton->msg_param == 21 )//evt_C |
4020 if ( !v21 ) | 3969 { |
4021 { | 3970 v15 = (char *)pNPCTopics[pNPC->evt_C-1].pTopic; |
4022 v23 = v58->evt_C; | 3971 if ( !v15 ) |
4023 goto LABEL_33; | 3972 { |
4024 } | 3973 pButton->msg_param = 0; |
4025 v22 = v21 - 1; | 3974 v15 = ""; |
4026 if ( !v22 ) | 3975 } |
4027 { | 3976 strcpy(pButton->pButtonName, v15); |
4028 v23 = v58->evt_D; | 3977 continue; |
4029 goto LABEL_33; | 3978 } |
4030 } | 3979 if ( pButton->msg_param == 22 )//evt_D |
4031 if ( v22 == 1 ) | 3980 { |
4032 { | 3981 v15 = (char *)pNPCTopics[pNPC->evt_D-1].pTopic; |
4033 v23 = v58->evt_E; | 3982 if ( !v15 ) |
4034 goto LABEL_33; | 3983 { |
4035 } | 3984 pButton->msg_param = 0; |
4036 LABEL_41: | 3985 v15 = ""; |
4037 v15 = ""; | 3986 } |
4038 goto LABEL_49; | 3987 strcpy(pButton->pButtonName, v15); |
4039 } | 3988 continue; |
4040 v15 = pGlobalTXT_LocalizationStrings[122]; | 3989 } |
4041 } | 3990 if ( pButton->msg_param == 23 )//evt_E |
4042 LABEL_49: | 3991 { |
4043 strcpy(v16->pButtonName, v15); | 3992 v15 = (char *)pNPCTopics[pNPC->evt_E-1].pTopic; |
4044 ++v56; | 3993 if ( !v15 ) |
4045 if ( v56 >= v52.pStartingPosActiveItem + v52.pNumPresenceButton ) | 3994 { |
4046 { | 3995 pButton->msg_param = 0; |
4047 v14 = pDialogueWindow; | 3996 v15 = ""; |
4048 break; | 3997 } |
3998 strcpy(pButton->pButtonName, v15); | |
3999 continue; | |
4000 } | |
4001 strcpy(pButton->pButtonName, ""); | |
4002 continue; | |
4003 } | |
4004 strcpy(pButton->pButtonName, pGlobalTXT_LocalizationStrings[122]);// | |
4049 } | 4005 } |
4050 } | 4006 } |
4051 } | 4007 } |
4052 v34 = 0; | 4008 v34 = 0; |
4053 v54 = TargetColor(0xFFu, 0xFFu, 0xFFu); | 4009 v36 = pDialogueWindow->pStartingPosActiveItem; |
4054 v35 = TargetColor(0xE1u, 0xCDu, 0x23u); | 4010 for ( i = v36 + pDialogueWindow->pNumPresenceButton; (signed int)v36 < (signed int)i; i = pDialogueWindow->pNumPresenceButton |
4055 v36 = v14->pStartingPosActiveItem; | |
4056 v55 = v35; | |
4057 for ( i = v36 + v14->pNumPresenceButton; (signed int)v36 < (signed int)i; i = pDialogueWindow->pNumPresenceButton | |
4058 + pDialogueWindow->pStartingPosActiveItem ) | 4011 + pDialogueWindow->pStartingPosActiveItem ) |
4059 { | 4012 { |
4060 v37 = v14->GetControl(v36); | 4013 v37 = pDialogueWindow->GetControl(v36); |
4061 v38 = pFontArrus->CalcTextHeight(v37->pButtonName, &v52, 0, 0); | 4014 v38 = pFontArrus->CalcTextHeight(v37->pButtonName, &v52, 0, 0); |
4062 v14 = pDialogueWindow; | |
4063 v34 += v38; | 4015 v34 += v38; |
4064 ++v36; | 4016 ++v36; |
4065 } | 4017 } |
4066 v39 = v14->pNumPresenceButton; | 4018 v39 = pDialogueWindow->pNumPresenceButton; |
4067 if ( v39 ) | 4019 if ( v39 ) |
4068 { | 4020 { |
4069 v58 = (NPCData *)((174 - v34) / v39); | 4021 pNPC = (NPCData *)((174 - v34) / v39); |
4070 if ( (signed int)v58 > 32 ) | 4022 if ( (signed int)pNPC > 32 ) |
4071 v58 = (NPCData *)32; | 4023 pNPC = (NPCData *)32; |
4072 pInString = (char *)2; | 4024 pInString = (char *)2; |
4073 v40 = (174 - (signed int)v58 * v39 - v34) / 2 - (signed int)v58 / 2 + 138; | 4025 v40 = (174 - (signed int)pNPC * v39 - v34) / 2 - (signed int)pNPC / 2 + 138; |
4074 v56 = v14->pStartingPosActiveItem; | 4026 for ( i = pDialogueWindow->pStartingPosActiveItem; i < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem; ++i ) |
4075 i = v56; | 4027 { |
4076 if ( (signed int)i < (signed int)(i + v39) ) | 4028 v41 = pDialogueWindow->GetControl(i); |
4077 { | 4029 v42 = v41; |
4078 while ( 1 ) | 4030 v43 = v41->pButtonName; |
4079 { | 4031 v41->uY = (unsigned int)((char *)pNPC + v40); |
4080 v41 = v14->GetControl(i); | 4032 v44 = pFontArrus->CalcTextHeight(v41->pButtonName, &v52, 0, 0); |
4081 v42 = v41; | 4033 v45 = v42->uY; |
4082 v43 = v41->pButtonName; | 4034 v42->uHeight = v44; |
4083 v41->uY = (unsigned int)((char *)v58 + v40); | 4035 v40 = v45 + v44 - 1; |
4084 v44 = pFontArrus->CalcTextHeight(v41->pButtonName, &v52, 0, 0); | 4036 v42->uW = v40; |
4085 v45 = v42->uY; | 4037 v46 = TargetColor(0xE1u, 0xCDu, 0x23u); |
4086 v42->uHeight = v44; | 4038 if ( (char *)pDialogueWindow->pCurrentPosActiveItem != pInString ) |
4087 v40 = v45 + v44 - 1; | 4039 v46 = TargetColor(0xFFu, 0xFFu, 0xFFu); |
4088 v42->uW = v40; | 4040 v52.DrawTitleText(pFontArrus, 0, v45, v46, v43, 3); |
4089 v46 = v55; | 4041 ++pInString; |
4090 if ( (char *)pDialogueWindow->pCurrentPosActiveItem != pInString ) | |
4091 v46 = v54; | |
4092 v52.DrawTitleText(pFontArrus, 0, v45, v46, v43, 3u); | |
4093 v14 = pDialogueWindow; | |
4094 ++pInString; | |
4095 ++v56; | |
4096 i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem; | |
4097 if ( v56 >= (signed int)i ) | |
4098 break; | |
4099 i = v56; | |
4100 } | |
4101 } | 4042 } |
4102 } | 4043 } |
4103 if ( current_npc_text ) | 4044 if ( current_npc_text ) |
4104 { | 4045 { |
4105 w.uFrameWidth = 458; | 4046 w.uFrameWidth = 458; |
4110 { | 4051 { |
4111 v47 = pFontCreate; | 4052 v47 = pFontCreate; |
4112 v48 = pFontCreate->CalcTextHeight(current_npc_text, &w, 13, 0) + 7; | 4053 v48 = pFontCreate->CalcTextHeight(current_npc_text, &w, 13, 0) + 7; |
4113 } | 4054 } |
4114 pRenderer->GetLeather(8, 352 - v48, pIcons_LOD->GetTexture(uTextureID_Leather), pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight - v48); | 4055 pRenderer->GetLeather(8, 352 - v48, pIcons_LOD->GetTexture(uTextureID_Leather), pIcons_LOD->GetTexture(uTextureID_Leather)->uTextureHeight - v48); |
4115 pRenderer->DrawTextureIndexed(8u, 347 - v48, pTexture_591428); | 4056 pRenderer->DrawTextureIndexed(8, 347 - v48, pTexture_591428); |
4116 v49 = FitTextInAWindow(current_npc_text, v47, &w, 13, 0); | 4057 house_window.DrawText(v47, 13, 354 - v48, 0, FitTextInAWindow(current_npc_text, v47, &w, 13, 0), 0, 0, 0); |
4117 a1.DrawText(v47, 13, 354 - v48, 0, v49, 0, 0, 0); | |
4118 } | 4058 } |
4119 } | 4059 } |
4120 | 4060 |
4121 //----- (004B4F4F) -------------------------------------------------------- | 4061 //----- (004B4F4F) -------------------------------------------------------- |
4122 void JailDialog() | 4062 void JailDialog() |