Mercurial > mm7
changeset 419:ad1e9c0bf6da
Multi-npc house icons fixed
author | Nomad |
---|---|
date | Sat, 23 Feb 2013 21:04:08 +0200 |
parents | 913675aac25b |
children | e9a9f97ffbc7 80a5aab68b67 9dc0dffaf7c6 |
files | GUIWindow.cpp mm7_2.cpp mm7_3.cpp mm7_4.cpp mm7_data.cpp mm7_data.h |
diffstat | 6 files changed, 45 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/GUIWindow.cpp Sat Feb 23 19:34:05 2013 +0200 +++ b/GUIWindow.cpp Sat Feb 23 21:04:08 2013 +0200 @@ -1093,11 +1093,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: @@ -1126,15 +1129,15 @@ } 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; goto LABEL_56; } 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); @@ -1917,7 +1920,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: // окно книги заклов @@ -1968,8 +1971,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; @@ -1992,7 +1995,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; }
--- a/mm7_2.cpp Sat Feb 23 19:34:05 2013 +0200 +++ b/mm7_2.cpp Sat Feb 23 21:04:08 2013 +0200 @@ -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;
--- a/mm7_3.cpp Sat Feb 23 19:34:05 2013 +0200 +++ b/mm7_3.cpp Sat Feb 23 21:04:08 2013 +0200 @@ -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) {
--- a/mm7_4.cpp Sat Feb 23 19:34:05 2013 +0200 +++ b/mm7_4.cpp Sat Feb 23 21:04:08 2013 +0200 @@ -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,
--- a/mm7_data.cpp Sat Feb 23 19:34:05 2013 +0200 +++ b/mm7_data.cpp Sat Feb 23 21:04:08 2013 +0200 @@ -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]= { "",
--- a/mm7_data.h Sat Feb 23 19:34:05 2013 +0200 +++ b/mm7_data.h Sat Feb 23 21:04:08 2013 +0200 @@ -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