diff mm7_4.cpp @ 48:6a62c4005f0e

23.10.12
author Ritor1
date Tue, 23 Oct 2012 17:33:33 +0600
parents 916bec351934
children 25fabc49627b
line wrap: on
line diff
--- a/mm7_4.cpp	Mon Oct 22 17:28:15 2012 +0600
+++ b/mm7_4.cpp	Tue Oct 23 17:33:33 2012 +0600
@@ -5333,7 +5333,6 @@
 //----- (00495B39) --------------------------------------------------------
 void __cdecl PlayerCreationUI_Draw()
 {
-  Texture *v0; // edi@1
   const char *uTitleText; // ST10_4@3
   int v2; // eax@3
   IconFrame *v3; // eax@3
@@ -5477,16 +5476,14 @@
   uColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
   pRenderer->BeginScene();
   pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX);
-  v0 = pTexture_MAKESKY;
-  pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2u, pTexture_MAKESKY);
-  pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos++ - 640, 2u, v0);
+  pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY);
+  pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos++ - 640, 2, pTexture_MAKESKY);
   if ( (signed int)uPlayerCreationUI_SkySliderPos > 640 )
     uPlayerCreationUI_SkySliderPos = 0;
   pRenderer->DrawTextureTransparent(0, 0, pTexture_MAKETOP);
   uTitleText = pGlobalTXT_LocalizationStrings[51];
-  uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38)
-                                      / 7;
-  v2 = pFontCChar->AlignText_Center(640u, pGlobalTXT_LocalizationStrings[51]);
+  uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) / 7;
+  v2 = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]);
   pGUIWindow_CurrentMenu->DrawText(pFontCChar, v2 + 1, 0, 0, uTitleText, 0, 0, 0);
   pRenderer->DrawTextureTransparent(17u, 35u, pPlayerPortraits[(char)pParty->pPlayers[0].uFace]);
   pRenderer->DrawTextureTransparent(176u, 35u, pPlayerPortraits[(char)pParty->pPlayers[1].uFace]);
@@ -5516,7 +5513,7 @@
     v4 = 12;
   }
   pRenderer->DrawTextureTransparent(v4, 29, &pIcons_LOD->pTextures[v3->uTextureID]);
-  uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->field_2C_focus_id);
+  uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem);
   pRenderer->DrawTextureTransparent(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim + 1]);
   pRenderer->DrawTextureTransparent(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim-- + 1]);
   if ( uPlayerCreationUI_ArrowAnim < 0 )
@@ -9787,12 +9784,12 @@
   pPlayer = pPlayers[uActiveCharacter];
   if ( pPlayer->CanAct() )
   {
-    pDialogueWindow->field_28 = dword_F8B1E0;
+    pDialogueWindow->pNumPresenceButton = dword_F8B1E0;
     result = 1;
   }
   else
   {
-    pDialogueWindow->field_28 = 0;
+    pDialogueWindow->pNumPresenceButton = 0;
     memcpy(&v4, pGUIWindow0, sizeof(v4));
     v4.uFrameX = 483;
     v4.uFrameWidth = 148;
@@ -10915,8 +10912,8 @@
   v52.uFrameX = 483;
   v52.uFrameWidth = 148;
   v52.uFrameZ = 334;
-  v56 = v52.field_38;
-  if ( v52.field_38 < v52.field_38 + v52.field_28 )
+  v56 = v52.pStartingPosActiveItem;
+  if ( v52.pStartingPosActiveItem < v52.pStartingPosActiveItem + v52.pNumPresenceButton )
   {
     v15 = (char *)v54;
     while ( 1 )
@@ -11035,7 +11032,7 @@
 LABEL_49:
       strcpy(v16->pButtonName, v15);
       ++v56;
-      if ( v56 >= v52.field_38 + v52.field_28 )
+      if ( v56 >= v52.pStartingPosActiveItem + v52.pNumPresenceButton )
       {
         v14 = pDialogueWindow;
         break;
@@ -11045,10 +11042,10 @@
   v34 = 0;
   v54 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
   v35 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
-  v36 = v14->field_38;
+  v36 = v14->pStartingPosActiveItem;
   v55 = v35;
-  for ( i = v36 + v14->field_28; (signed int)v36 < (signed int)i; i = pDialogueWindow->field_28
-                                                                    + pDialogueWindow->field_38 )
+  for ( i = v36 + v14->pNumPresenceButton; (signed int)v36 < (signed int)i; i = pDialogueWindow->pNumPresenceButton
+                                                                    + pDialogueWindow->pStartingPosActiveItem )
   {
     v37 = v14->GetControl(v36);
     v38 = pFontArrus->CalcTextHeight(v37->pButtonName, &v52, 0, 0);
@@ -11056,7 +11053,7 @@
     v34 += v38;
     ++v36;
   }
-  v39 = v14->field_28;
+  v39 = v14->pNumPresenceButton;
   if ( v39 )
   {
     v58 = (NPCData *)((174 - v34) / v39);
@@ -11064,7 +11061,7 @@
       v58 = (NPCData *)32;
     pInString = (char *)2;
     v40 = (174 - (signed int)v58 * v39 - v34) / 2 - (signed int)v58 / 2 + 138;
-    v56 = v14->field_38;
+    v56 = v14->pStartingPosActiveItem;
     i = v56;
     if ( (signed int)i < (signed int)(i + v39) )
     {
@@ -11080,13 +11077,13 @@
         v40 = v45 + v44 - 1;
         v42->uW = v40;
         v46 = v55;
-        if ( (char *)pDialogueWindow->field_2C_focus_id != pInString )
+        if ( (char *)pDialogueWindow->pCurrentPosActiveItem != pInString )
           v46 = v54;
         v52.DrawText2(pFontArrus, 0, v45, v46, v43, 3u);
         v14 = pDialogueWindow;
         ++pInString;
         ++v56;
-        i = pDialogueWindow->field_28 + pDialogueWindow->field_38;
+        i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem;
         if ( v56 >= (signed int)i )
           break;
         i = v56;
@@ -11512,8 +11509,8 @@
   }
 LABEL_107:
   pDialogueWindow->_41D08F(a2, 1, 0, 2);
-  result = pDialogueWindow->field_28;
-  dword_F8B1E0 = pDialogueWindow->field_28;
+  result = pDialogueWindow->pNumPresenceButton;
+  dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
   return result;
 }
 
@@ -11537,8 +11534,8 @@
     }
   }
   pDialogueWindow->_41D08F(v1, 1, 0, 2);
-  result = pDialogueWindow->field_28;
-  dword_F8B1E0 = pDialogueWindow->field_28;
+  result = pDialogueWindow->pNumPresenceButton;
+  dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
   return result;
 }
 // F8B1E0: using guessed type int dword_F8B1E0;
@@ -11579,8 +11576,8 @@
     }
   }
 LABEL_7:
-  result = pDialogueWindow->field_28;
-  dword_F8B1E0 = pDialogueWindow->field_28;
+  result = pDialogueWindow->pNumPresenceButton;
+  dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
   return result;
 }
 // F8B1E0: using guessed type int dword_F8B1E0;
@@ -11779,8 +11776,8 @@
       break;
   }
 LABEL_43:
-  result = pDialogueWindow->field_28;
-  dword_F8B1E0 = pDialogueWindow->field_28;
+  result = pDialogueWindow->pNumPresenceButton;
+  dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
   return result;
 }
 // F8B1E0: using guessed type int dword_F8B1E0;
@@ -12199,8 +12196,8 @@
       }
       pDialogueWindow->_41D08F(v1, 1, 0, 2);
       v4 = 1;
-      result = (GUIButton *)pDialogueWindow->field_28;
-      dword_F8B1E0 = pDialogueWindow->field_28;
+      result = (GUIButton *)pDialogueWindow->pNumPresenceButton;
+      dword_F8B1E0 = pDialogueWindow->pNumPresenceButton;
     }
     dword_F8B19C = v4;
   }
@@ -12366,8 +12363,8 @@
             v73 = v14 * (100 - v0->GetMerchant()) / 100;
             if ( v73 < v14 / 3 )
               v73 = v14 / 3;
-            v15 = v13->field_38;
-            v16 = v13->field_28;
+            v15 = v13->pStartingPosActiveItem;
+            v16 = v13->pNumPresenceButton;
             v72 = 0;
             if ( (signed int)v15 >= (signed int)(v15 + v16) )
               goto LABEL_76;
@@ -12382,7 +12379,7 @@
               }
               ++v15;
             }
-            while ( (signed int)v15 < v13->field_28 + v13->field_38 );
+            while ( (signed int)v15 < v13->pNumPresenceButton + v13->pStartingPosActiveItem );
             if ( v72 )
             {
               sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v73);// "Skill Cost: %lu"
@@ -12390,11 +12387,11 @@
               v73 = (signed int)(149 - i) / v72;
               if ( v73 > 32 )
                 v73 = 32;
-              result = v13->field_38;
+              result = v13->pStartingPosActiveItem;
               v19 = (signed int)(149 - v72 * v73 - i) / 2 - v73 / 2 + 162;
               i = result;
               v68 = v19;
-              if ( result < result + v13->field_28 )
+              if ( result < result + v13->pNumPresenceButton )
               {
                 v72 = 2;
                 do
@@ -12420,13 +12417,13 @@
                     v21->uW = v26;
                     v68 = v26;
                     v27 = v71;
-                    if ( pDialogueWindow->field_2C_focus_id != v72 )
+                    if ( pDialogueWindow->pCurrentPosActiveItem != v72 )
                       v27 = white;
                     v65.DrawText2(pFontArrus, 0, v25, v27, (char *)HIDWORD(v66), 3u);
                   }
-                  v28 = v13->field_38;
+                  v28 = v13->pStartingPosActiveItem;
                   ++i;
-                  result = v13->field_28 + v28;
+                  result = v13->pNumPresenceButton + v28;
                   ++v72;
                 }
                 while ( (signed int)i < result );
@@ -12454,7 +12451,7 @@
         v33 = pFontArrus->CalcTextHeight(pNPCTopics[122].pText, &v65, 0, 0);
         v65.DrawText2(pFontArrus, 0, (212 - v33) / 2 + 101, v32, v31, 3u);
         result = (int)pDialogueWindow;
-        pDialogueWindow->field_28 = 0;
+        pDialogueWindow->pNumPresenceButton = 0;
         return result;
       }
       v34 = v0->uLevel;
@@ -12544,8 +12541,8 @@
       v72 = 0;
       pShopOptions[0] = pTmpBuf;
       pShopOptions[1] = pGlobalTXT_LocalizationStrings[160];// "Learn Skills"
-      v44 = pDialogueWindow->field_28;
-      v73 = pDialogueWindow->field_38;
+      v44 = pDialogueWindow->pNumPresenceButton;
+      v73 = pDialogueWindow->pStartingPosActiveItem;
       if ( v73 < v73 + v44 )
       {
         v45 = pShopOptions;
@@ -12583,14 +12580,14 @@
           ++v45;
           ++v73;
         }
-        while ( v73 < pDialogueWindow->field_28 + pDialogueWindow->field_38 );
+        while ( v73 < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem );
       }
       HIDWORD(v66) = (174 - v72) / 2;
-      result = v43->field_38;
-      v48 = result + v43->field_28;
+      result = v43->pStartingPosActiveItem;
+      v48 = result + v43->pNumPresenceButton;
       v49 = (2 * (87 - (174 - v72) / 2) - v72) / 2 - (174 - v72) / 2 / 2 + 138;
-      v50 = -v43->field_28 < 0;
-      v73 = v43->field_38;
+      v50 = -v43->pNumPresenceButton < 0;
+      v73 = v43->pStartingPosActiveItem;
       if ( v50 ^ __OFSUB__(result, v48) )
       {
         i = 2;
@@ -12607,14 +12604,14 @@
           v53->uW = v56;
           v49 = v56;
           v57 = v71;
-          if ( pDialogueWindow->field_2C_focus_id != i )
+          if ( pDialogueWindow->pCurrentPosActiveItem != i )
             v57 = white;
           v65.DrawText2(pFontArrus, 0, v55, v57, *v51, 3u);
           v43 = pDialogueWindow;
           ++i;
           ++v51;
           ++v73;
-          result = pDialogueWindow->field_28 + pDialogueWindow->field_38;
+          result = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem;
         }
         while ( v73 < result );
       }
@@ -12786,11 +12783,11 @@
       while ( (signed int)v77 < (signed int)&pShopOptions[3] );
       v79 = pDialogueWindow;
       _this = (Player *)((174 - v76) / 3);
-      result = pDialogueWindow->field_38;
-      v80 = result + pDialogueWindow->field_28;
+      result = pDialogueWindow->pStartingPosActiveItem;
+      v80 = result + pDialogueWindow->pNumPresenceButton;
       v81 = (3 * (58 - (signed int)_this) - v76) / 2 - (174 - v76) / 3 / 2 + 138;
-      v20 = -pDialogueWindow->field_28 < 0;
-      v118 = pDialogueWindow->field_38;
+      v20 = -pDialogueWindow->pNumPresenceButton < 0;
+      v118 = pDialogueWindow->pStartingPosActiveItem;
       if ( v20 ^ __OFSUB__(result, v80) )
       {
         v122 = 2;
@@ -12807,14 +12804,14 @@
           v81 = v84 + v85 - 1;
           v82->uW = v81;
           v87 = color2;
-          if ( pDialogueWindow->field_2C_focus_id != v86 )
+          if ( pDialogueWindow->pCurrentPosActiveItem != v86 )
             v87 = white;
           v112.DrawText2(pFontArrus, 0, v85, v87, *v119, 3u);
           v79 = pDialogueWindow;
           ++v122;
           ++v119;
           ++v118;
-          result = pDialogueWindow->field_28 + pDialogueWindow->field_38;
+          result = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem;
         }
         while ( v118 < result );
       }
@@ -12837,8 +12834,8 @@
           v119 = (const char **)(v33 * (100 - _this->GetMerchant()) / 100);
           if ( (signed int)v119 < v33 / 3 )
             v119 = (const char **)(v33 / 3);
-          v34 = v31->field_38;
-          v35 = v34 + v31->field_28;
+          v34 = v31->pStartingPosActiveItem;
+          v35 = v34 + v31->pNumPresenceButton;
           v122 = 0;
           if ( (signed int)v34 >= v35 )
             goto LABEL_140;
@@ -12853,7 +12850,7 @@
             }
             ++v34;
           }
-          while ( (signed int)v34 < v31->field_28 + v31->field_38 );
+          while ( (signed int)v34 < v31->pNumPresenceButton + v31->pStartingPosActiveItem );
           if ( !v122 )
           {
 LABEL_140:
@@ -12875,11 +12872,11 @@
           v119 = (const char **)((149 - v118) / v122);
           if ( (149 - v118) / v122 > 32 )
             v119 = (const char **)32;
-          result = v31->field_38;
+          result = v31->pStartingPosActiveItem;
           v38 = (149 - v122 * (signed int)v119 - v118) / 2 - (signed int)v119 / 2 + 162;
           v118 = result;
           v114 = v38;
-          if ( result < result + v31->field_28 )
+          if ( result < result + v31->pNumPresenceButton )
           {
             v122 = 2;
             do
@@ -12906,13 +12903,13 @@
                 v40->uW = v46;
                 v114 = v46;
                 v47 = color2;
-                if ( pDialogueWindow->field_2C_focus_id != v45 )
+                if ( pDialogueWindow->pCurrentPosActiveItem != v45 )
                   v47 = white;
                 v112.DrawText2(pFontArrus, 0, v44, v47, Str, 3u);
               }
-              v48 = v31->field_38;
+              v48 = v31->pStartingPosActiveItem;
               ++v118;
-              result = v31->field_28 + v48;
+              result = v31->pNumPresenceButton + v48;
               ++v122;
             }
             while ( v118 < result );
@@ -12970,11 +12967,11 @@
         while ( (signed int)v15 < (signed int)&unk_F8B1C8 );
         v17 = pDialogueWindow;
         v114 = (174 - v14) / 4;
-        result = pDialogueWindow->field_38;
-        v18 = result + pDialogueWindow->field_28;
+        result = pDialogueWindow->pStartingPosActiveItem;
+        v18 = result + pDialogueWindow->pNumPresenceButton;
         v19 = (174 - 4 * (174 - v14) / 4 - v14) / 2 - (174 - v14) / 4 / 2 + 138;
-        v20 = -pDialogueWindow->field_28 < 0;
-        v122 = pDialogueWindow->field_38;
+        v20 = -pDialogueWindow->pNumPresenceButton < 0;
+        v122 = pDialogueWindow->pStartingPosActiveItem;
         if ( v20 ^ __OFSUB__(result, v18) )
         {
           v119 = (const char **)2;
@@ -12991,14 +12988,14 @@
             v19 = v24 + v23 - 1;
             v21->uW = v19;
             v26 = color2;
-            if ( (const char **)pDialogueWindow->field_2C_focus_id != v25 )
+            if ( (const char **)pDialogueWindow->pCurrentPosActiveItem != v25 )
               v26 = white;
             v112.DrawText2(pFontArrus, 0, v24, v26, (const char *)LODWORD(_this->pConditions[0]), 3u);
             v17 = pDialogueWindow;
             v119 = (const char **)((char *)v119 + 1);
             _this = (Player *)((char *)_this + 4);
             ++v122;
-            result = pDialogueWindow->field_28 + pDialogueWindow->field_38;
+            result = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem;
           }
           while ( v122 < result );
         }
@@ -13851,7 +13848,7 @@
     v38 = pFontArrus->CalcTextHeight(pNPCTopics[121].pText, &v52, 0, 0);
     v52.DrawText2(pFontArrus, 0, (212 - v38) / 2 + 101, v37, v36, 3u);
     result = (int)pDialogueWindow;
-    pDialogueWindow->field_28 = 0;
+    pDialogueWindow->pNumPresenceButton = 0;
     return result;
   }
   result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win();
@@ -13861,8 +13858,8 @@
   v5 = 0;
   v62 = 0;
   Str = 0;
-  v21 = pDialogueWindow->field_38;
-  v22 = v21 + pDialogueWindow->field_28;
+  v21 = pDialogueWindow->pStartingPosActiveItem;
+  v22 = v21 + pDialogueWindow->pNumPresenceButton;
   v61 = 0;
   if ( v21 >= v22 )
     goto LABEL_64;
@@ -13894,7 +13891,7 @@
     }
     ++v21;
   }
-  while ( v21 < v20->field_28 + v20->field_38 );
+  while ( v21 < v20->pNumPresenceButton + v20->pStartingPosActiveItem );
   if ( !v61 )
   {
 LABEL_64:
@@ -13918,11 +13915,11 @@
   v63 = (signed int)(149 - v62) / v61;
   if ( v63 > 32 )
     v63 = 32;
-  result = v20->field_38;
+  result = v20->pStartingPosActiveItem;
   v26 = (signed int)(149 - v61 * v63 - v62) / 2 - v63 / 2 + 162;
   v62 = result;
   v55 = v26;
-  if ( result < result + v20->field_28 )
+  if ( result < result + v20->pNumPresenceButton )
   {
     v61 = 2;
     while ( 1 )
@@ -13953,7 +13950,7 @@
         v28->uW = v33;
         v55 = v33;
         v34 = v57;
-        if ( pDialogueWindow->field_2C_focus_id != v61 )
+        if ( pDialogueWindow->pCurrentPosActiveItem != v61 )
           v34 = v56;
         v52.DrawText2(pFontArrus, 0, v32, v34, Str, 3u);
         goto LABEL_58;
@@ -13962,9 +13959,9 @@
       v28->uHeight = 0;
       v28->uY = 0;
 LABEL_58:
-      v35 = v20->field_38;
+      v35 = v20->pStartingPosActiveItem;
       ++v62;
-      result = v20->field_28 + v35;
+      result = v20->pNumPresenceButton + v35;
       ++v61;
       if ( (signed int)v62 >= result )
         return result;
@@ -14081,8 +14078,8 @@
             v64 = (signed int)(v65 * (100 - v6)) / 100;
             if ( v64 < (signed int)v65 / 3 )
               v64 = (signed int)v65 / 3;
-            v7 = v4->field_38;
-            v8 = v7 + v4->field_28;
+            v7 = v4->pStartingPosActiveItem;
+            v8 = v7 + v4->pNumPresenceButton;
             v65 = 0;
             v62 = v7;
             if ( (signed int)v7 >= v8 )
@@ -14096,10 +14093,10 @@
                 v66 = (DDM_DLV_Header *)((char *)v66 + v10);
                 ++v65;
               }
-              v11 = v4->field_38;
+              v11 = v4->pStartingPosActiveItem;
               ++v62;
             }
-            while ( (signed int)v62 < v4->field_28 + v11 );
+            while ( (signed int)v62 < v4->pNumPresenceButton + v11 );
             if ( v65 )
             {
               sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v64);
@@ -14109,9 +14106,9 @@
                 v64 = 32;
               v65 = (signed int)(149 - v65 * v64 - (int)v66) / 2 - v64 / 2 + 162;
               v12 = v61;
-              result = v61->field_38;
-              v13 = result + v61->field_28;
-              v62 = v61->field_38;
+              result = v61->pStartingPosActiveItem;
+              v13 = result + v61->pNumPresenceButton;
+              v62 = v61->pStartingPosActiveItem;
               if ( result < v13 )
               {
                 v66 = (DDM_DLV_Header *)2;
@@ -14138,14 +14135,14 @@
                     v15->uW = v20;
                     v65 = v20;
                     v21 = WORD2(v59);
-                    if ( (DDM_DLV_Header *)pDialogueWindow->field_2C_focus_id != v66 )
+                    if ( (DDM_DLV_Header *)pDialogueWindow->pCurrentPosActiveItem != v66 )
                       v21 = WORD2(v58);
                     v57.DrawText2(pFontArrus, 0, v19, v21, (const char *)HIDWORD(v60), 3u);
                   }
                   result = (int)v61;
                   ++v62;
                   v66 = (DDM_DLV_Header *)((char *)v66 + 1);
-                  if ( (signed int)v62 >= v61->field_28 + v61->field_38 )
+                  if ( (signed int)v62 >= v61->pNumPresenceButton + v61->pStartingPosActiveItem )
                     break;
                   v12 = v61;
                 }
@@ -14302,7 +14299,7 @@
     return result;
   }
   v63 = 1;
-  v41 = pDialogueWindow->GetControl(pDialogueWindow->field_38);
+  v41 = pDialogueWindow->GetControl(pDialogueWindow->pStartingPosActiveItem);
   strcpy(a1, nullstring);
   v41->uHeight = 0;
   v41->uY = 0;
@@ -14317,7 +14314,7 @@
   v43 = pDialogueWindow;
   v44 = v63;
   v66 = 0;
-  if ( v63 < pDialogueWindow->field_28 )
+  if ( v63 < pDialogueWindow->pNumPresenceButton )
   {
     v61 = (GUIWindow *)&a1[100 * v63];
     do
@@ -14328,16 +14325,16 @@
       v61 = (GUIWindow *)((char *)v61 + 100);
       ++v44;
     }
-    while ( v44 < pDialogueWindow->field_28 );
-  }
-  v46 = v43->field_28 - v42;
+    while ( v44 < pDialogueWindow->pNumPresenceButton );
+  }
+  v46 = v43->pNumPresenceButton - v42;
   v64 = (174 - (signed int)v66) / v46;
   if ( v64 > 32 )
     v64 = 32;
-  result = v43->field_38;
+  result = v43->pStartingPosActiveItem;
   v47 = (174 - v64 * v46 - (signed int)v66) / 2 - v64 / 2 + 138;
   v65 = v42 + result;
-  if ( v42 + result < result + v43->field_28 )
+  if ( v42 + result < result + v43->pNumPresenceButton )
   {
     v61 = (GUIWindow *)(v42 + 2);
     v66 = (DDM_DLV_Header *)&a1[100 * v42];
@@ -14353,14 +14350,14 @@
       v47 = v52 + v51 - 1;
       v50->uW = v47;
       v53 = WORD2(v59);
-      if ( (GUIWindow *)pDialogueWindow->field_2C_focus_id != v61 )
+      if ( (GUIWindow *)pDialogueWindow->pCurrentPosActiveItem != v61 )
         v53 = WORD2(v58);
       v57.DrawText2(pFontArrus, 0, v52, v53, (const char *)v66, 3u);
       v43 = pDialogueWindow;
       v66 = (DDM_DLV_Header *)((char *)v66 + 100);
       v61 = (GUIWindow *)((char *)v61 + 1);
       ++v65;
-      result = pDialogueWindow->field_28 + pDialogueWindow->field_38;
+      result = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem;
     }
     while ( (signed int)v65 < result );
   }
@@ -14572,7 +14569,7 @@
     v26 = pFontArrus->CalcTextHeight(pNPCTopics[171].pText, &v28, 0, 0);
     v28.DrawText2(pFontArrus, 0, (212 - v26) / 2 + 101, v25, v24, 3u);
     result = (int)pDialogueWindow;
-    pDialogueWindow->field_28 = 0;
+    pDialogueWindow->pNumPresenceButton = 0;
     return result;
   }
   result = sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win();
@@ -14582,9 +14579,9 @@
   v33 = 0;
   v34 = 0;
   v29 = pDialogueWindow;
-  v9 = pDialogueWindow->field_38;
-  v10 = v9 + pDialogueWindow->field_28;
-  v35 = pDialogueWindow->field_38;
+  v9 = pDialogueWindow->pStartingPosActiveItem;
+  v10 = v9 + pDialogueWindow->pNumPresenceButton;
+  v35 = pDialogueWindow->pStartingPosActiveItem;
   if ( v9 >= v10 )
     goto LABEL_40;
   do
@@ -14596,10 +14593,10 @@
       v33 += v12;
       ++v34;
     }
-    v13 = v8->field_38;
+    v13 = v8->pStartingPosActiveItem;
     ++v35;
   }
-  while ( v35 < v8->field_28 + v13 );
+  while ( v35 < v8->pNumPresenceButton + v13 );
   if ( !v34 )
   {
 LABEL_40:
@@ -14615,10 +14612,10 @@
   v32 = (149 - v33) / v34;
   if ( (149 - v33) / v34 > 32 )
     v32 = 32;
-  result = v8->field_38;
+  result = v8->pStartingPosActiveItem;
   v35 = result;
   v34 = (149 - v34 * v32 - v33) / 2 - v32 / 2 + 162;
-  if ( result < result + v8->field_28 )
+  if ( result < result + v8->pNumPresenceButton )
   {
     v33 = 2;
     do
@@ -14639,7 +14636,7 @@
           v14->uW = v20;
           v34 = v20;
           v21 = v31;
-          if ( pDialogueWindow->field_2C_focus_id != v33 )
+          if ( pDialogueWindow->pCurrentPosActiveItem != v33 )
             v21 = v30;
           v28.DrawText2(pFontArrus, 0, v19, v21, v17, 3u);
           goto LABEL_34;
@@ -14656,7 +14653,7 @@
       v8 = v29;
       ++v35;
       ++v33;
-      result = v29->field_28 + v29->field_38;
+      result = v29->pNumPresenceButton + v29->pStartingPosActiveItem;
     }
     while ( v35 < result );
   }
@@ -14767,9 +14764,9 @@
       strcpy(&Dest, nullstring);
       sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[405], s1);
       v18 = pFontArrus->CalcTextHeight(pTmpBuf2, &v53, 0, 0);
-      v19 = v16->field_28;
+      v19 = v16->pNumPresenceButton;
       v20 = v18 + v17 + 146;
-      v21 = v16->field_38;
+      v21 = v16->pStartingPosActiveItem;
       v63 = v20;
       v55 = v20;
       v60 = v21;
@@ -14793,7 +14790,7 @@
         {
           v58 = v61;
           v27 = (const char *)v56;
-          if ( pDialogueWindow->field_2C_focus_id != s1 )
+          if ( pDialogueWindow->pCurrentPosActiveItem != s1 )
             v27 = *(const char **)v57;
           v47[1] = v27;
           sprintfex(a1, format_4E2DC8, v27);
@@ -14869,7 +14866,7 @@
           }
         }
         ++v60;
-        if ( (signed int)v60 >= v59->field_28 + v59->field_38 )
+        if ( (signed int)v60 >= v59->pNumPresenceButton + v59->pStartingPosActiveItem )
           break;
         v16 = v59;
       }