diff GUIWindow.cpp @ 165:572d821561f3

MenuID
author Ritor1
date Thu, 14 Feb 2013 14:48:43 +0600
parents f4ebd13c2a8e
children 91fa025e6ca6
line wrap: on
line diff
--- a/GUIWindow.cpp	Thu Feb 14 09:27:19 2013 +0600
+++ b/GUIWindow.cpp	Thu Feb 14 14:48:43 2013 +0600
@@ -1056,10 +1056,7 @@
   v1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
   v19 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0x15u, 0x99u, 0xE9u);
   pRenderer->DrawTextureIndexed(0x1DDu, 0, pTexture_Dialogue_Background);
-  pRenderer->DrawTextureTransparent(
-    0x1D4u,
-    0,
-    (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
+  pRenderer->DrawTextureTransparent(0x1D4u, 0, (Texture *)(uTextureID_507B04 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507B04] : 0));
   if ( array_5913D8[6] != (NPCData *)uNumDialogueNPCPortraits || !uHouse_ExitPic )
   {
     w.uFrameWidth = 130;
@@ -1073,14 +1070,9 @@
       v3 = 2 * LOBYTE(pFontCreate->uFontHeight) - 6 - pFontCreate->CalcTextHeight(v2, &w, 0, 0);
       if ( v3 < 0 )
         v3 = 0;
-      v18.DrawTitleText(
-        pFontCreate,
-        0x1EAu,
-        v3 / 2 + 4,
-        v1,
+      v18.DrawTitleText(pFontCreate, 0x1EAu, v3 / 2 + 4, v1,
         //(const char *)p2DEvents_minus1_::04[13 * (unsigned int)ptr_507BC0->ptr_1C],
-        p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pName,
-        3u);
+        p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pName, 3);
     }
   }
   v18.uFrameWidth += 8;
@@ -1099,10 +1091,7 @@
       w.uFrameZ = 457;
       v5 = pFontArrus->CalcTextHeight(ptr_F8B1E8, &w, 13, 0);
       v6 = v5 + 7;
-      pRenderer->_4A6A68(
-        8u,
-        352 - (v5 + 7),
-        (Texture *)(uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0),
+      pRenderer->_4A6A68(8, 352 - (v5 + 7), (Texture *)(uTextureID_Leather != -1 ? &pIcons_LOD->pTextures[uTextureID_Leather] : 0),
         (uTextureID_Leather != -1 ? pIcons_LOD->pTextures[uTextureID_Leather].uTextureHeight : 26) - (v5 + 7));
       pRenderer->DrawTextureIndexed(8u, 347 - v6, pTexture_591428);
       v7 = FitTextInAWindow(ptr_F8B1E8, pFontArrus, &w, 0xDu, 0);
@@ -1113,14 +1102,11 @@
       goto LABEL_58;
     while ( 1 )
     {
-      pRenderer->DrawTextureIndexed(
-        *(&_4E5E50_transui_x + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
-        *(&_4E5EE0_transui_y + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
+      pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
+        *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6) - 4,
         (Texture *)(uTextureID_50795C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50795C] : 0));
-      pRenderer->DrawTextureIndexed(
-        *(&_4E5E50_transui_x + v8 + 6 * uNumDialogueNPCPortraits - 6),
-        *(&_4E5EE0_transui_y + v8 + 6 * uNumDialogueNPCPortraits - 6),
-        pDialogueNPCPortraits[v8]);
+      pRenderer->DrawTextureIndexed(*(&pNPCPortraits_x + v8 + 6 * uNumDialogueNPCPortraits - 6),
+        *(&pNPCPortraits_y + v8 + 6 * uNumDialogueNPCPortraits - 6), pDialogueNPCPortraits[v8]);
       if ( uNumDialogueNPCPortraits < 4 )
         break;
 LABEL_57:
@@ -1156,9 +1142,9 @@
     goto LABEL_56;
   }
   v4 = (char *)array_5913D8[6] - 1;
-  pRenderer->DrawTextureIndexed(_4E5E50_transui_x - 4, _4E5EE0_transui_y - 4,
+  pRenderer->DrawTextureIndexed(pNPCPortraits_x - 4, pNPCPortraits_y - 4,
     (Texture *)(uTextureID_50795C != -1 ? &pIcons_LOD->pTextures[uTextureID_50795C] : 0));
-  pRenderer->DrawTextureIndexed(_4E5E50_transui_x, _4E5EE0_transui_y, pDialogueNPCPortraits[(signed int)v4]);
+  pRenderer->DrawTextureIndexed(pNPCPortraits_x, pNPCPortraits_y, pDialogueNPCPortraits[(signed int)v4]);
   if ( pCurrentScreen == SCREEN_E )
   {
     CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
@@ -1170,9 +1156,7 @@
   }
   else
   {
-    sprintf(
-      pTmpBuf,
-      pGlobalTXT_LocalizationStrings[429],
+    sprintf( pTmpBuf, pGlobalTXT_LocalizationStrings[429],
       //p2DEvents_minus1_::08[13 * (unsigned int)ptr_507BC0->ptr_1C],
       p2DEvents[(unsigned int)ptr_507BC0->ptr_1C - 1].pProprieterName,
       //p2DEvents_minus1__10[13 * (unsigned int)ptr_507BC0->ptr_1C]);
@@ -1248,10 +1232,7 @@
 LABEL_58:
   if ( array_5913D8[6] == (NPCData *)uNumDialogueNPCPortraits && uHouse_ExitPic )
   {
-    pRenderer->DrawTextureIndexed(
-      0x22Cu,
-      0x1C3u,
-      (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
+    pRenderer->DrawTextureIndexed(0x22Cu, 0x1C3u, (Texture *)(uTextureID_x_x_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
     v16 = (Texture *)(uTextureID_x_ok_u != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_x_ok_u] : 0);
     v14 = 451;
     v12 = 476;
@@ -1855,7 +1836,7 @@
         case WINDOW_Book:
           pWindow->InitializeBookView();
           break;
-        case WINDOW_A:
+        case WINDOW_Dialogue:
           pMainScreenNum = pCurrentScreen;
           pCurrentScreen = SCREEN_NPC_DIALOGUE;
           pBtn_ExitCancel = pWindow->CreateButton(0x1D7u, 0x1BDu, 0xA9u, 0x23u, 1, 0, 0x71u, 0, 0, pGlobalTXT_LocalizationStrings[79], //"Exit"
@@ -1960,7 +1941,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(_4E5E50_transui_x, _4E5EE0_transui_y, 0x3Fu, 0x49u, 1, 0, 0x5Au, 1u, 0x20u, pWindow->Hint, 0, 0, 0);
+          pWindow->CreateButton(pNPCPortraits_x, pNPCPortraits_y, 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: // окно книги заклов
@@ -2011,8 +1992,8 @@
           v29 = pGlobalTXT_LocalizationStrings[435];//Побеседовать с ^Pt[%s]
         }
         sprintf(&byte_591180[100 * v26], v29, v30);
-        array_5913D8[v26 + 7] = (NPCData *)pWindow->CreateButton(*(&_4E5E50_transui_x + v26 + 6 * uNumDialogueNPCPortraits - 6),
-                                             *(&_4E5EE0_transui_y + v26 + 6 * uNumDialogueNPCPortraits - 6),
+        array_5913D8[v26 + 7] = (NPCData *)pWindow->CreateButton(*(&pNPCPortraits_x + v26 + 6 * uNumDialogueNPCPortraits - 6),
+                                             *(&pNPCPortraits_y + v26 + 6 * uNumDialogueNPCPortraits - 6),
                                              0x3Fu, 0x49u, 1, 0, 0x19Au, v26, 0, &byte_591180[100 * v26], 0, 0, 0);
         ++v26;
         v25 = uNumDialogueNPCPortraits;
@@ -2035,7 +2016,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(_4E5E50_transui_x, _4E5EE0_transui_y, 0x3Fu, 0x49u, 1, 0, 0x19Bu, 1, 0x20u, pWindow->Hint, 0);
+      pWindow->CreateButton(pNPCPortraits_x, pNPCPortraits_y, 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;
     }