# HG changeset patch # User Ritor1 # Date 1361643018 -21600 # Node ID 9dc0dffaf7c60eb376f5e02bae1a0d8fdc7d7395 # Parent 510fb376ef2ff76fd616ad86e5600b4194994154# Parent ad1e9c0bf6dad4353220da8aca20a87a330913de Слияние diff -r 510fb376ef2f -r 9dc0dffaf7c6 GUIWindow.cpp --- a/GUIWindow.cpp Sun Feb 24 00:10:04 2013 +0600 +++ b/GUIWindow.cpp Sun Feb 24 00:10:18 2013 +0600 @@ -1091,11 +1091,14 @@ goto LABEL_58; while ( 1 ) { - pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4, - *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4, - &pIcons_LOD->pTextures[uTextureID_50795C]); - pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6), - *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6), pDialogueNPCPortraits[v8]); + //pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4, + // *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4, + pRenderer->DrawTextureIndexed(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8] - 4, + pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v8] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); // frame around portrait + //pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6), + // *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6), pDialogueNPCPortraits[v8]); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v8], + pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v8], pDialogueNPCPortraits[v8]); if ( uNumDialogueNPCPortraits < 4 ) break; LABEL_57: @@ -1121,7 +1124,7 @@ } v15 = 3; v13 = array_5913D8[v8 - (dword_591080 != 0)]->pName; - v9 = dword_4E5EC8[v8 + 6 * uNumDialogueNPCPortraits] + pDialogueNPCPortraits[v8]->uTextureHeight + 2; + v9 = pNPCPortraits_x[6 + (uNumDialogueNPCPortraits - 1)][v8] + pDialogueNPCPortraits[v8]->uTextureHeight + 2; } v11 = v19; v10 = v9; @@ -1129,8 +1132,8 @@ goto LABEL_57; } v4 = (char *)array_5913D8[6] - 1; - pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); - pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pDialogueNPCPortraits[(signed int)v4]); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[(signed int)v4]); if ( pCurrentScreen == SCREEN_E ) { CharacterUI_InventoryTab_Draw(uActiveCharacter, 1); @@ -1914,7 +1917,7 @@ (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x5Au, 0, 0x59u, pWindow->Hint, (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); - pWindow->CreateButton(pNPCPortraits_x, pNPCPortraits_y, 0x3Fu, 0x49u, 1, 0, 0x5Au, 1u, 0x20u, pWindow->Hint, 0, 0, 0); + pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 0x3Fu, 0x49u, 1, 0, 0x5Au, 1u, 0x20u, pWindow->Hint, 0, 0, 0); pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x5Au, 1u, 0, pWindow->Hint, 0); break; case WINDOW_SpellBook: // @@ -1965,8 +1968,8 @@ v29 = (char*)pGlobalTXT_LocalizationStrings[435];// ^Pt[%s] } sprintf(&byte_591180[100 * v26], v29, v30); - array_5913D8[v26 + 7] = (NPCData *)pWindow->CreateButton(*(&pNPCPortraits_x + v26 + 6 * uNumDialogueNPCPortraits - 6), - *(&pNPCPortraits_y + v26 + 6 * uNumDialogueNPCPortraits - 6), + array_5913D8[v26 + 7] = (NPCData *)pWindow->CreateButton(pNPCPortraits_x[uNumDialogueNPCPortraits - 1][v26], + pNPCPortraits_y[uNumDialogueNPCPortraits - 1][v26], 0x3Fu, 0x49u, 1, 0, 0x19Au, v26, 0, &byte_591180[100 * v26], 0, 0, 0); ++v26; v25 = uNumDialogueNPCPortraits; @@ -1989,7 +1992,7 @@ (Texture *)(uTextureID_BUTTDESC2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTDESC2] : 0), 0); pBtn_YES = pWindow->CreateButton(0x1E6u, 0x1BDu, 0x4Bu, 0x21u, 1, 0, 0x19Bu, 0, 0x59u, pWindow->Hint, (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); - pWindow->CreateButton(pNPCPortraits_x, pNPCPortraits_y, 0x3Fu, 0x49u, 1, 0, 0x19Bu, 1, 0x20u, pWindow->Hint, 0); + pWindow->CreateButton(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], 0x3Fu, 0x49u, 1, 0, 0x19Bu, 1, 0x20u, pWindow->Hint, 0); pWindow->CreateButton(8u, 8u, 0x1CCu, 0x158u, 1, 0, 0x19Bu, 1u, 0, pWindow->Hint, 0); return pWindow; } diff -r 510fb376ef2f -r 9dc0dffaf7c6 mm7_2.cpp --- a/mm7_2.cpp Sun Feb 24 00:10:04 2013 +0600 +++ b/mm7_2.cpp Sun Feb 24 00:10:18 2013 +0600 @@ -4384,7 +4384,7 @@ v3 = byte_591180; do { - array_5913D8[v2 + 7] = (NPCData *)window_SpeakInHouse->CreateButton(*(&pNPCPortraits_x + v2 + 6 * v1 - 6), *(&pNPCPortraits_y + v2 + 6 * v1 - 6), + array_5913D8[v2 + 7] = (NPCData *)window_SpeakInHouse->CreateButton(pNPCPortraits_x[v1 - 1][v2], pNPCPortraits_y[v1 - 1][v2], 0x3Fu, 0x49u, 1, 0, 0x19Au, v2, 0, v3, 0, 0, 0); v1 = uNumDialogueNPCPortraits; ++v2; diff -r 510fb376ef2f -r 9dc0dffaf7c6 mm7_3.cpp --- a/mm7_3.cpp Sun Feb 24 00:10:04 2013 +0600 +++ b/mm7_3.cpp Sun Feb 24 00:10:18 2013 +0600 @@ -14623,8 +14623,8 @@ v10 = pMapStats->GetMapInfo(pCurrentMapName); v9 = IndoorLocation::GetLocationIndex(dword_591164_teleport_map_name); pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); - pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4, (Texture *)(uTextureID_50795C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50795C] : 0)); - pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pTexture_outside); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, &pIcons_LOD->pTextures[uTextureID_50795C]); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); uTextureID_507B04 = uTextureID_right_panel; pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_right_panel != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_right_panel] : 0)); pRenderer->DrawTextureIndexed(556, 451, (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); @@ -14750,11 +14750,9 @@ pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pDestinationMapName, 20); v0 = pMapStats->GetMapInfo(pDestinationMapName); pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background); - pRenderer->DrawTextureTransparent(0x1D4u, 0, - (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0)); - pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pTexture_outside); - pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, - (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0)); + pRenderer->DrawTextureTransparent(0x1D4u, 0, &pIcons_LOD->pTextures[uTextureID_507B04]); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pTexture_outside); + pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, &pIcons_LOD->pTextures[uTextureID_x_x_u]); pRenderer->DrawTextureIndexed(0x1DCu, 0x1C3u, (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0)); if ( v0 ) @@ -14978,8 +14976,8 @@ v2 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u); pRenderer->DrawTextureIndexed(477, 0, pTexture_Dialogue_Background); pRenderer->DrawTextureTransparent(468, 0, (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0)); - pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); - pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pDialogueNPCPortraits[0]); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0] - 4, pNPCPortraits_y[0][0] - 4, (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0)); + pRenderer->DrawTextureIndexed(pNPCPortraits_x[0][0], pNPCPortraits_y[0][0], pDialogueNPCPortraits[0]); if (pNPC->uProfession) { diff -r 510fb376ef2f -r 9dc0dffaf7c6 mm7_4.cpp --- a/mm7_4.cpp Sun Feb 24 00:10:04 2013 +0600 +++ b/mm7_4.cpp Sun Feb 24 00:10:18 2013 +0600 @@ -11241,8 +11241,8 @@ (Texture *)(uTextureID_BUTTYES2 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_BUTTYES2] : 0), 0); pDialogueWindow->CreateButton( - pNPCPortraits_x, - pNPCPortraits_y, + pNPCPortraits_x[0][0], + pNPCPortraits_y[0][0], 63u, 73u, 1, diff -r 510fb376ef2f -r 9dc0dffaf7c6 mm7_data.cpp --- a/mm7_data.cpp Sun Feb 24 00:10:04 2013 +0600 +++ b/mm7_data.cpp Sun Feb 24 00:10:18 2013 +0600 @@ -958,9 +958,24 @@ char aBardataC[10]; // weak char aLoadprog[777]; // idb char aLoadingD_pcx[777]; // idb -int pNPCPortraits_x = 521; // idb -int dword_4E5EC8[777]; // weak -int pNPCPortraits_y = 38; // idb +int pNPCPortraits_x[6][6] = // 004E5E50 +{ + {521, 0, 0, 0, 0, 0}, + {521, 521, 0, 0, 0, 0}, + {521, 521, 521, 0, 0, 0}, + {521, 486, 564, 521, 0, 0}, + {521, 486, 564, 486, 564, 0}, + {486, 564, 486, 564, 486, 564} +}; +int pNPCPortraits_y[6][6] = // 004E5EE0 +{ + {38, 0, 0, 0, 0, 0}, + {38, 165, 0, 0, 0, 0}, + {38, 133, 228, 0, 0, 0}, + {38, 133, 133, 228, 0, 0}, + {38, 133, 133, 228, 228, 0}, + {38, 38, 133, 133, 228, 228} +}; const char *pHouse_ExitPictures[11]= { "", diff -r 510fb376ef2f -r 9dc0dffaf7c6 mm7_data.h --- a/mm7_data.h Sun Feb 24 00:10:04 2013 +0600 +++ b/mm7_data.h Sun Feb 24 00:10:18 2013 +0600 @@ -681,9 +681,8 @@ extern char aBardataC[10]; // weak extern char aLoadprog[]; // idb extern char aLoadingD_pcx[]; // idb -extern int pNPCPortraits_x; // idb -extern int dword_4E5EC8[]; // weak -extern int pNPCPortraits_y; // idb +extern int pNPCPortraits_x[6][6]; // 004E5E50 +extern int pNPCPortraits_y[6][6]; // 004E5EE0 extern const char *pHouse_ExitPictures[11]; extern const char *_4E6BDC_loc_names[11]; extern char aOutside[]; // idb