comparison GUIWindow.cpp @ 870:a0ae8d36c2d6

TavernDialog fixed
author Ritor1
date Mon, 01 Apr 2013 13:02:05 +0600
parents 06fc66ceecd6
children aa0172fd88c6
comparison
equal deleted inserted replaced
869:715064ae1792 870:a0ae8d36c2d6
1093 pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight - (pTextHeight + 7)); 1093 pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight - (pTextHeight + 7));
1094 pRenderer->DrawTextureIndexed(8, 347 - v6, pTexture_591428); 1094 pRenderer->DrawTextureIndexed(8, 347 - v6, pTexture_591428);
1095 v7 = FitTextInAWindow(current_npc_text, pFontArrus, &pDialogWindow, 0xDu, 0); 1095 v7 = FitTextInAWindow(current_npc_text, pFontArrus, &pDialogWindow, 0xDu, 0);
1096 window_SpeakInHouse->DrawText(pFontArrus, 13, 354 - v6, 0, v7, 0, 0, 0); 1096 window_SpeakInHouse->DrawText(pFontArrus, 13, 354 - v6, 0, v7, 0, 0, 0);
1097 } 1097 }
1098 v8 = 0;
1099 if ( uNumDialogueNPCPortraits <= 0 ) 1098 if ( uNumDialogueNPCPortraits <= 0 )
1100 { 1099 {
1101 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 1100 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
1102 { 1101 {
1103 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 1102 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
1107 { 1106 {
1108 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]); 1107 pRenderer->DrawTextureIndexed(471, 445, &pIcons_LOD->pTextures[uExitCancelTextureId]);
1109 } 1108 }
1110 return; 1109 return;
1111 } 1110 }
1111 v8 = 0;
1112 while ( 1 ) 1112 while ( 1 )
1113 { 1113 {
1114 //pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4, 1114 //pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
1115 // *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4, 1115 // *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
1116 pRenderer->DrawTextureIndexed(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8] - 4, 1116 pRenderer->DrawTextureIndexed(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8] - 4,
1122 if ( uNumDialogueNPCPortraits < 4 ) 1122 if ( uNumDialogueNPCPortraits < 4 )
1123 break; 1123 break;
1124 LABEL_57: 1124 LABEL_57:
1125 ++v8; 1125 ++v8;
1126 if ( v8 >= uNumDialogueNPCPortraits ) 1126 if ( v8 >= uNumDialogueNPCPortraits )
1127 //goto LABEL_58;
1128 { 1127 {
1129 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 1128 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
1130 { 1129 {
1131 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 1130 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
1132 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 1131 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
1153 v13 = (char *)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterTitle; 1152 v13 = (char *)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterTitle;
1154 pWindow.DrawTitleText(pFontCreate, 0x1E3u, 113, pColor2, v13, 3); 1153 pWindow.DrawTitleText(pFontCreate, 0x1E3u, 113, pColor2, v13, 3);
1155 goto LABEL_57; 1154 goto LABEL_57;
1156 } 1155 }
1157 v15 = 3; 1156 v15 = 3;
1158 v13 = HouseNPCData[(v8 +1) - (dword_591080 != 0)]->pName; 1157 v13 = HouseNPCData[v8 - (dword_591080 != 0)]->pName;
1159 v9 = pNPCPortraits_x[6 + (uNumDialogueNPCPortraits - 1)][v8] + pDialogueNPCPortraits[v8]->uTextureHeight + 2; 1158 v9 = pNPCPortraits_x[6 + (uNumDialogueNPCPortraits - 1)][v8] + pDialogueNPCPortraits[v8]->uTextureHeight + 2;
1160 } 1159 }
1161 //v11 = pColor2; 1160 //v11 = pColor2;
1162 v10 = v9; 1161 v10 = v9;
1163 pWindow.DrawTitleText(pFontCreate, 0x1E3u, v10, pColor2, v13, v15); 1162 pWindow.DrawTitleText(pFontCreate, 0x1E3u, v10, pColor2, v13, v15);
1167 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); 1166 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]);
1168 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[(signed int)v4]); 1167 pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[(signed int)v4]);
1169 if ( pCurrentScreen == SCREEN_E ) 1168 if ( pCurrentScreen == SCREEN_E )
1170 { 1169 {
1171 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); 1170 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
1172 //goto LABEL_58;
1173 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 1171 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
1174 { 1172 {
1175 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 1173 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
1176 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 1174 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
1177 } 1175 }
1244 default: 1242 default:
1245 __debugbreak;//New BildingType 1243 __debugbreak;//New BildingType
1246 break; 1244 break;
1247 } 1245 }
1248 } 1246 }
1249 //LABEL_58:
1250 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic ) 1247 if ( pDialogueNPCCount == uNumDialogueNPCPortraits && uHouse_ExitPic )
1251 { 1248 {
1252 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]); 1249 pRenderer->DrawTextureIndexed(556, 451, &pIcons_LOD->pTextures[uTextureID_x_x_u]);
1253 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]); 1250 pRenderer->DrawTextureIndexed(476, 451, &pIcons_LOD->pTextures[uTextureID_x_ok_u]);
1254 } 1251 }
1969 v29 = (char*)pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S];//Войти в ^Pv[%s] 1966 v29 = (char*)pGlobalTXT_LocalizationStrings[LOCSTR_ENTER_S];//Войти в ^Pv[%s]
1970 } 1967 }
1971 else 1968 else
1972 { 1969 {
1973 if ( v26 || !dword_591080 ) 1970 if ( v26 || !dword_591080 )
1974 v27 = HouseNPCData[(v26 +1) - (dword_591080 != 0)]->pName; 1971 v27 = HouseNPCData[v26 - (dword_591080 != 0)]->pName;//problem in Harmondale tavern(v26 == 0)
1975 else 1972 else
1976 //v27 = (char *)p2DEvents_minus1_::08[13 * a4]; 1973 //v27 = (char *)p2DEvents_minus1_::08[13 * a4];
1977 v27 = (char *)p2DEvents[pButton - 1].pProprieterName; 1974 v27 = (char *)p2DEvents[pButton - 1].pProprieterName;
1978 v30 = v27; 1975 v30 = v27;
1979 v29 = (char*)pGlobalTXT_LocalizationStrings[435];// "Converse with %s" Побеседовать с ^Pt[%s] 1976 v29 = (char*)pGlobalTXT_LocalizationStrings[435];// "Converse with %s" Побеседовать с ^Pt[%s]