comparison GUIWindow.cpp @ 336:ea55d6414029

Event_proceccor preliminary
author Gloval
date Thu, 21 Feb 2013 00:33:12 +0400
parents 6581a2cc21b4
children 1c681ad45653
comparison
equal deleted inserted replaced
329:f76027321087 336:ea55d6414029
1045 Texture *v16; // [sp-4h] [bp-BCh]@60 1045 Texture *v16; // [sp-4h] [bp-BCh]@60
1046 GUIWindow w; // [sp+Ch] [bp-ACh]@4 1046 GUIWindow w; // [sp+Ch] [bp-ACh]@4
1047 GUIWindow v18; // [sp+60h] [bp-58h]@2 1047 GUIWindow v18; // [sp+60h] [bp-58h]@2
1048 int v19; // [sp+B4h] [bp-4h]@2 1048 int v19; // [sp+B4h] [bp-4h]@2
1049 1049
1050 if ( !ptr_507BC0 ) 1050 if ( !window_SpeakInHouse )
1051 return; 1051 return;
1052 memcpy(&v18, this, sizeof(v18)); 1052 memcpy(&v18, this, sizeof(v18));
1053 v18.uFrameWidth -= 18; 1053 v18.uFrameWidth -= 18;
1054 v18.uFrameZ -= 18; 1054 v18.uFrameZ -= 18;
1055 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu); 1055 v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
1060 { 1060 {
1061 w.uFrameWidth = 130; 1061 w.uFrameWidth = 130;
1062 w.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight); 1062 w.uFrameHeight = 2 * LOBYTE(pFontCreate->uFontHeight);
1063 1063
1064 //v2 = (const char *)p2DEvents_minus1_::04[13 * (unsigned int)ptr_507BC0->ptr_1C]; 1064 //v2 = (const char *)p2DEvents_minus1_::04[13 * (unsigned int)ptr_507BC0->ptr_1C];
1065 v2 = p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pName; 1065 v2 = p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName;
1066 1066
1067 if ( v2 ) 1067 if ( v2 )
1068 { 1068 {
1069 v3 = 2 * LOBYTE(pFontCreate->uFontHeight) - 6 - pFontCreate->CalcTextHeight(v2, &w, 0, 0); 1069 v3 = 2 * LOBYTE(pFontCreate->uFontHeight) - 6 - pFontCreate->CalcTextHeight(v2, &w, 0, 0);
1070 if ( v3 < 0 ) 1070 if ( v3 < 0 )
1071 v3 = 0; 1071 v3 = 0;
1072 v18.DrawTitleText(pFontCreate, 0x1EAu, v3 / 2 + 4, v1, 1072 v18.DrawTitleText(pFontCreate, 0x1EAu, v3 / 2 + 4, v1,
1073 //(const char *)p2DEvents_minus1_::04[13 * (unsigned int)ptr_507BC0->ptr_1C], 1073 //(const char *)p2DEvents_minus1_::04[13 * (unsigned int)ptr_507BC0->ptr_1C],
1074 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pName, 3); 1074 p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pName, 3);
1075 } 1075 }
1076 } 1076 }
1077 v18.uFrameWidth += 8; 1077 v18.uFrameWidth += 8;
1078 v18.uFrameZ += 8; 1078 v18.uFrameZ += 8;
1079 if ( !array_5913D8[6] ) 1079 if ( !array_5913D8[6] )
1092 v6 = v5 + 7; 1092 v6 = v5 + 7;
1093 pRenderer->_4A6A68(8, 352 - (v5 + 7), (Texture *)(uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0), 1093 pRenderer->_4A6A68(8, 352 - (v5 + 7), (Texture *)(uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0),
1094 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - (v5 + 7)); 1094 (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - (v5 + 7));
1095 pRenderer->DrawTextureIndexed(8u, 347 - v6, pTexture_591428); 1095 pRenderer->DrawTextureIndexed(8u, 347 - v6, pTexture_591428);
1096 v7 = FitTextInAWindow(ptr_F8B1E8, pFontArrus, &w, 0xDu, 0); 1096 v7 = FitTextInAWindow(ptr_F8B1E8, pFontArrus, &w, 0xDu, 0);
1097 ptr_507BC0->DrawText(pFontArrus, 13, 354 - v6, 0, v7, 0, 0, 0); 1097 window_SpeakInHouse->DrawText(pFontArrus, 13, 354 - v6, 0, v7, 0, 0, 0);
1098 } 1098 }
1099 v8 = 0; 1099 v8 = 0;
1100 if ( uNumDialogueNPCPortraits <= 0 ) 1100 if ( uNumDialogueNPCPortraits <= 0 )
1101 goto LABEL_58; 1101 goto LABEL_58;
1102 while ( 1 ) 1102 while ( 1 )
1123 { 1123 {
1124 if ( !v8 && dword_591080 ) 1124 if ( !v8 && dword_591080 )
1125 { 1125 {
1126 v15 = 3; 1126 v15 = 3;
1127 //v13 = (char *)p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]; 1127 //v13 = (char *)p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C];
1128 v13 = (char *)p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterTitle; 1128 v13 = (char *)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterTitle;
1129 v11 = v19; 1129 v11 = v19;
1130 v10 = 113; 1130 v10 = 113;
1131 LABEL_56: 1131 LABEL_56:
1132 v18.DrawTitleText(pFontCreate, 0x1E3u, v10, v11, v13, v15); 1132 v18.DrawTitleText(pFontCreate, 0x1E3u, v10, v11, v13, v15);
1133 goto LABEL_57; 1133 goto LABEL_57;
1155 } 1155 }
1156 else 1156 else
1157 { 1157 {
1158 sprintfex( pTmpBuf, pGlobalTXT_LocalizationStrings[429], 1158 sprintfex( pTmpBuf, pGlobalTXT_LocalizationStrings[429],
1159 //p2DEvents_minus1_::08[13 * (unsigned int)ptr_507BC0->ptr_1C], 1159 //p2DEvents_minus1_::08[13 * (unsigned int)ptr_507BC0->ptr_1C],
1160 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterName, 1160 p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterName,
1161 //p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]); 1161 //p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]);
1162 p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterTitle); 1162 p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].pProprieterTitle);
1163 v18.DrawTitleText(pFontCreate, 0x1E3u, 0x71u, v19, pTmpBuf, 3u); 1163 v18.DrawTitleText(pFontCreate, 0x1E3u, 0x71u, v19, pTmpBuf, 3u);
1164 if ( dword_F8B198 <= 18 ) 1164 if ( dword_F8B198 <= 18 )
1165 { 1165 {
1166 switch ( dword_F8B198 ) 1166 switch ( dword_F8B198 )
1167 { 1167 {
1990 } 1990 }
1991 while ( uWidtha < uNumDialogueNPCPortraits ); 1991 while ( uWidtha < uNumDialogueNPCPortraits );
1992 } 1992 }
1993 if ( v25 == 1 ) 1993 if ( v25 == 1 )
1994 { 1994 {
1995 ptr_507BC0 = &pWindowList[uNextFreeWindowID]; 1995 window_SpeakInHouse = &pWindowList[uNextFreeWindowID];
1996 _4B4224_UpdateNPCTopics(0); 1996 _4B4224_UpdateNPCTopics(0);
1997 } 1997 }
1998 } 1998 }
1999 else 1999 else
2000 { 2000 {