changeset 48:6a62c4005f0e

23.10.12
author Ritor1
date Tue, 23 Oct 2012 17:33:33 +0600
parents 916bec351934
children 25fabc49627b
files GUIWindow.cpp GUIWindow.h mm7_1.cpp mm7_2.cpp mm7_3.cpp mm7_4.cpp mm7_5.cpp
diffstat 7 files changed, 327 insertions(+), 330 deletions(-) [+]
line wrap: on
line diff
--- a/GUIWindow.cpp	Mon Oct 22 17:28:15 2012 +0600
+++ b/GUIWindow.cpp	Tue Oct 23 17:33:33 2012 +0600
@@ -324,20 +324,20 @@
 {
   if ( a2 )
   {
-    this->field_28 = a2;
+    this->pNumPresenceButton = a2;
     this->field_30 = a3;
     this->field_34 = a4;
-    this->field_2C_focus_id = a5;
-    this->field_38 = a5;
+    this->pCurrentPosActiveItem = a5;
+    this->pStartingPosActiveItem = a5;
     this->field_44 = 1;
   }
   else
   {
-    this->field_28 = 0;
+    this->pNumPresenceButton = 0;
     this->field_30 = a3;
     this->field_34 = a4;
-    this->field_2C_focus_id = 0;
-    this->field_38 = 0;
+    this->pCurrentPosActiveItem = 0;
+    this->pStartingPosActiveItem = 0;
     this->field_44 = 0;
   }
 }
--- a/GUIWindow.h	Mon Oct 22 17:28:15 2012 +0600
+++ b/GUIWindow.h	Tue Oct 23 17:33:33 2012 +0600
@@ -87,11 +87,11 @@
   void *ptr_1C;
   unsigned int uNumControls;
   int field_24;
-  int field_28;
-  int field_2C_focus_id;
+  int pNumPresenceButton; 
+  int pCurrentPosActiveItem;
   int field_30;
   int field_34;
-  int field_38;
+  int pStartingPosActiveItem;
   int field_3C;
   int field_40;
   int field_44;
--- a/mm7_1.cpp	Mon Oct 22 17:28:15 2012 +0600
+++ b/mm7_1.cpp	Tue Oct 23 17:33:33 2012 +0600
@@ -203,7 +203,7 @@
   v1 = uPlayerID;
   a5 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0x9Bu);
   v84 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xAFu, 0xFFu);
-  v85 = pGUIWindow_CurrentMenu->field_2C_focus_id;
+  v85 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem;
   v86 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0, 0);
   v79 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0);
   pPlayer = (Player *)&stru_AA1058[3].pSounds[6972 * v1 + 40552];
@@ -2143,9 +2143,9 @@
     if ( pWindowList[v3].field_30 != v1 )
     {
       pMouse->GetClickPos(&uClickX, &uClickY);
-      v4 = pWindowList[v3].field_38;
-      v29 = v4 + pWindowList[v3].field_28;
-      if ( v4 < v4 + pWindowList[v3].field_28 )
+      v4 = pWindowList[v3].pStartingPosActiveItem;
+      v29 = v4 + pWindowList[v3].pNumPresenceButton;
+      if ( v4 < v4 + pWindowList[v3].pNumPresenceButton )
       {
         while ( 1 )
         {
@@ -2184,10 +2184,10 @@
   if ( v26 == 37 )
   {
     v12 = pWindowList[v3].field_34;
-    if ( pWindowList[v3].field_2C_focus_id - pWindowList[v3].field_38 - v12 >= 0 )
+    if ( pWindowList[v3].pCurrentPosActiveItem - pWindowList[v3].pStartingPosActiveItem - v12 >= 0 )
     {
       v8 = pCurrentScreen == 21;
-      pWindowList[v3].field_2C_focus_id -= v12;
+      pWindowList[v3].pCurrentPosActiveItem -= v12;
       if ( v8 )
       {
         pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1);
@@ -2197,7 +2197,7 @@
     if ( pWindowList[v3].field_30 != v1 )
       goto LABEL_47;
     v9 = pWindowList[v3].pControlsHead;
-    v13 = pWindowList[v3].field_2C_focus_id;
+    v13 = pWindowList[v3].pCurrentPosActiveItem;
     if ( v13 > (signed int)v1 )
     {
       do
@@ -2223,11 +2223,11 @@
   {
     if ( v26 == 39 )
     {
-      v7 = pWindowList[v3].field_2C_focus_id + pWindowList[v3].field_34;
-      if ( v7 < pWindowList[v3].field_28 + pWindowList[v3].field_38 )
+      v7 = pWindowList[v3].pCurrentPosActiveItem + pWindowList[v3].field_34;
+      if ( v7 < pWindowList[v3].pNumPresenceButton + pWindowList[v3].pStartingPosActiveItem )
       {
         v8 = pCurrentScreen == 21;
-        pWindowList[v3].field_2C_focus_id = v7;
+        pWindowList[v3].pCurrentPosActiveItem = v7;
         if ( v8 )
         {
           pAudioPlayer->PlaySound((SoundID)66, v1, v1, -1, v1, v1, v1, v1);
@@ -2237,7 +2237,7 @@
       if ( pWindowList[v3].field_30 != v1 )
         goto LABEL_47;
       v9 = pWindowList[v3].pControlsHead;
-      v10 = pWindowList[v3].field_2C_focus_id;
+      v10 = pWindowList[v3].pCurrentPosActiveItem;
       if ( v10 > (signed int)v1 )
       {
         do
@@ -2251,16 +2251,16 @@
     }
     if ( v26 == 40 )
     {
-      v17 = pWindowList[v3].field_38;
-      v18 = pWindowList[v3].field_2C_focus_id;
-      if ( v18 >= pWindowList[v3].field_28 + v17 - 1 )
-        pWindowList[v3].field_2C_focus_id = v17;
+      v17 = pWindowList[v3].pStartingPosActiveItem;
+      v18 = pWindowList[v3].pCurrentPosActiveItem;
+      if ( v18 >= pWindowList[v3].pNumPresenceButton + v17 - 1 )
+        pWindowList[v3].pCurrentPosActiveItem = v17;
       else
-        pWindowList[v3].field_2C_focus_id = v18 + 1;
+        pWindowList[v3].pCurrentPosActiveItem = v18 + 1;
       if ( pWindowList[v3].field_30 != v1 )
         return 1;
       v19 = pWindowList[v3].pControlsHead;
-      v20 = pWindowList[v3].field_2C_focus_id;
+      v20 = pWindowList[v3].pCurrentPosActiveItem;
       if ( v20 > (signed int)v1 )
       {
         do
@@ -2275,9 +2275,9 @@
     if ( v26 == 41 )
     {
       pMouse->GetClickPos(&uClickX, &uClickY);
-      v4 = pWindowList[v3].field_38;
-      v28 = v4 + pWindowList[v3].field_28;
-      if ( v4 < v4 + pWindowList[v3].field_28 )
+      v4 = pWindowList[v3].pStartingPosActiveItem;
+      v28 = v4 + pWindowList[v3].pNumPresenceButton;
+      if ( v4 < v4 + pWindowList[v3].pNumPresenceButton )
       {
         while ( 1 )
         {
@@ -2302,7 +2302,7 @@
             goto LABEL_45;
         }
 LABEL_66:
-        pWindowList[v3].field_2C_focus_id = v4;
+        pWindowList[v3].pCurrentPosActiveItem = v4;
         return 1;
       }
 LABEL_46:
@@ -2311,18 +2311,18 @@
     }
     goto LABEL_47;
   }
-  v22 = pWindowList[v3].field_2C_focus_id;
-  v23 = pWindowList[v3].field_38;
+  v22 = pWindowList[v3].pCurrentPosActiveItem;
+  v23 = pWindowList[v3].pStartingPosActiveItem;
   if ( v22 <= v23 )
-    v24 = pWindowList[v3].field_28 + v23 - 1;
+    v24 = pWindowList[v3].pNumPresenceButton + v23 - 1;
   else
     v24 = v22 - 1;
   v8 = pWindowList[v3].field_30 == v1;
-  pWindowList[v3].field_2C_focus_id = v24;
+  pWindowList[v3].pCurrentPosActiveItem = v24;
   if ( !v8 )
     return 1;
   v19 = pWindowList[v3].pControlsHead;
-  v25 = pWindowList[v3].field_2C_focus_id;
+  v25 = pWindowList[v3].pCurrentPosActiveItem;
   if ( v25 > (signed int)v1 )
   {
     do
@@ -3952,7 +3952,7 @@
       8u,
       (Texture *)(uTextureID_RestUI_restmain != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_RestUI_restmain] : 0));
     v10 = pParty->uCurrentHour;
-    dword_506F1C = pGUIWindow_CurrentMenu->field_2C_focus_id;
+    dword_506F1C = pGUIWindow_CurrentMenu->pCurrentPosActiveItem;
     if ( (signed int)pParty->uCurrentHour <= 12 )
     {
       if ( !v10 )
--- a/mm7_2.cpp	Mon Oct 22 17:28:15 2012 +0600
+++ b/mm7_2.cpp	Tue Oct 23 17:33:33 2012 +0600
@@ -166,11 +166,11 @@
     v14 = pDialogueWindow;
     v15 = 80 - v11 * (100 - (signed int)pOutString) / v11 - (signed int)pOutString;
     v16 = v15 - HIDWORD(v15);
-    LODWORD(v15) = pDialogueWindow->field_38;
-    HIDWORD(v15) = v15 + pDialogueWindow->field_28;
+    LODWORD(v15) = pDialogueWindow->pStartingPosActiveItem;
+    HIDWORD(v15) = v15 + pDialogueWindow->pNumPresenceButton;
     v17 = (v16 >> 1) - v29 / 2 + 158;
-    v18 = -pDialogueWindow->field_28 < 0;
-    pOutString = (GUIFont *)pDialogueWindow->field_38;
+    v18 = -pDialogueWindow->pNumPresenceButton < 0;
+    pOutString = (GUIFont *)pDialogueWindow->pStartingPosActiveItem;
     if ( v18 ^ __OFSUB__((int)v15, HIDWORD(v15)) )
     {
       v31 = 2;
@@ -186,7 +186,7 @@
         v17 = v23 + v22 - 1;
         v21->uW = v17;
         v24 = v30;
-        if ( pDialogueWindow->field_2C_focus_id != v31 )
+        if ( pDialogueWindow->pCurrentPosActiveItem != v31 )
           v24 = v28;
         _this.DrawText2(pFontArrus, 0, v23, v24, *v19, 3u);
         v14 = pDialogueWindow;
@@ -194,7 +194,7 @@
         ++v19;
         pOutString = (GUIFont *)((char *)pOutString + 1);
       }
-      while ( (signed int)pOutString < pDialogueWindow->field_28 + pDialogueWindow->field_38 );
+      while ( (signed int)pOutString < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem );
     }
   }
   else
@@ -403,11 +403,11 @@
     return;
   }
   v8 = v14[0];
-  if ( pDialogueWindow->field_2C_focus_id != 2 )
+  if ( pDialogueWindow->pCurrentPosActiveItem != 2 )
     v8 = v13[0];
   _this.DrawText2(pFontArrus, 0, 0x92u, v8, pGlobalTXT_LocalizationStrings[60], 3u);
   v9 = v14[0];
-  if ( pDialogueWindow->field_2C_focus_id != 3 )
+  if ( pDialogueWindow->pCurrentPosActiveItem != 3 )
     v9 = v13[0];
   _this.DrawText2(pFontArrus, 0, 0xB0u, v9, pGlobalTXT_LocalizationStrings[244], 3u);
 }
@@ -662,8 +662,8 @@
           pOutString = (GUIFont *)(v9 * (100 - v85->GetMerchant()) / 100);
           if ( (signed int)pOutString < v9 / 3 )
             pOutString = (GUIFont *)(v9 / 3);
-          v10 = v8->field_38;
-          v11 = v10 + v8->field_28;
+          v10 = v8->pStartingPosActiveItem;
+          v11 = v10 + v8->pNumPresenceButton;
           v86 = 0;
           if ( (signed int)v10 < v11 )
           {
@@ -678,7 +678,7 @@
               }
               ++v10;
             }
-            while ( (signed int)v10 < v8->field_38 + v8->field_28 );
+            while ( (signed int)v10 < v8->pStartingPosActiveItem + v8->pNumPresenceButton );
             if ( v86 )
             {
               sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], pOutString);
@@ -687,9 +687,9 @@
               if ( (149 - v89) / v86 > 32 )
                 pOutString = (GUIFont *)32;
               v14 = (149 - v86 * (signed int)pOutString - v89) / 2 - (signed int)pOutString / 2 + 162;
-              v89 = v8->field_38;
+              v89 = v8->pStartingPosActiveItem;
               v83 = v14;
-              if ( v89 < v89 + v8->field_28 )
+              if ( v89 < v89 + v8->pNumPresenceButton )
               {
                 v86 = 2;
                 do
@@ -716,13 +716,13 @@
                     v16->uW = v22;
                     v83 = v22;
                     v23 = v84[0];
-                    if ( pDialogueWindow->field_2C_focus_id != v21 )
+                    if ( pDialogueWindow->pCurrentPosActiveItem != v21 )
                       v23 = v81;
                     v79.DrawText2(pFontArrus, 0, v20, v23, Str[1], 3u);
                   }
-                  v24 = v8->field_28;
+                  v24 = v8->pNumPresenceButton;
                   ++v89;
-                  v25 = v8->field_38 + v24;
+                  v25 = v8->pStartingPosActiveItem + v24;
                   ++v86;
                 }
                 while ( v89 < v25 );
@@ -768,7 +768,7 @@
     if ( !sub_4B1784_check_if_player_concious__draw_warning_else_mess_with_dlg_win() )
       return;
     v28 = *(int *)v84;
-    if ( pDialogueWindow->field_2C_focus_id != 2 )
+    if ( pDialogueWindow->pCurrentPosActiveItem != 2 )
       v28 = v81;
     sprintfex(&Dest, format_4E2DC8, v28);
     sprintfex(pTmpBuf2, pGlobalTXT_LocalizationStrings[178], pOutString);
@@ -776,7 +776,7 @@
     v90 = pFontArrus->CalcTextHeight(&Dest, &v79, 0, 0);
     strcat(&Dest, "\n \n");
     v29 = *(int *)v84;
-    if ( pDialogueWindow->field_2C_focus_id != 3 )
+    if ( pDialogueWindow->pCurrentPosActiveItem != 3 )
       v29 = v81;
     sprintfex(&a1, format_4E2DC8, v29);
     sprintfex(pTmpBuf2,
@@ -788,7 +788,7 @@
     v88 = pFontArrus->CalcTextHeight(&a1, &v79, 0, 0);
     strcat(&a1, "\n \n");
     v30 = *(int *)v84;
-    if ( pDialogueWindow->field_2C_focus_id != 4 )
+    if ( pDialogueWindow->pCurrentPosActiveItem != 4 )
       v30 = v81;
     sprintfex(&v77, format_4E2DC8, v30);
     strcat(&v77, pGlobalTXT_LocalizationStrings[160]);
@@ -800,7 +800,7 @@
     if ( v31 >= 108 && v31 <= 120 )
     {
       v32 = *(int *)v84;
-      if ( pDialogueWindow->field_2C_focus_id != 5 )
+      if ( pDialogueWindow->pCurrentPosActiveItem != 5 )
         v32 = v81;
       sprintfex(&v75, format_4E2DC8, v32);
       strcat(&v75, pGlobalTXT_LocalizationStrings[611]);
@@ -808,11 +808,11 @@
     }
     v33 = pDialogueWindow;
     Str[1] = (char *)pDialogueWindow;
-    v34 = pDialogueWindow->field_38;
-    v35 = v34 + pDialogueWindow->field_28;
+    v34 = pDialogueWindow->pStartingPosActiveItem;
+    v35 = v34 + pDialogueWindow->pNumPresenceButton;
     v36 = LOBYTE(pFontArrus->uFontHeight) - 3;
-    v37 = -pDialogueWindow->field_28 < 0;
-    pOutString = (GUIFont *)pDialogueWindow->field_38;
+    v37 = -pDialogueWindow->pNumPresenceButton < 0;
+    pOutString = (GUIFont *)pDialogueWindow->pStartingPosActiveItem;
     if ( !(v37 ^ __OFSUB__(v34, v35)) )
     {
 LABEL_75:
@@ -858,9 +858,9 @@
 LABEL_73:
         v38->uW = v41;
       }
-      v47 = v33->field_38;
+      v47 = v33->pStartingPosActiveItem;
       pOutString = (GUIFont *)((char *)pOutString + 1);
-      if ( (signed int)pOutString >= v33->field_28 + v47 )
+      if ( (signed int)pOutString >= v33->pNumPresenceButton + v47 )
         goto LABEL_75;
     }
     v42 = v90 + v88 + 2 * v36 + 146;
@@ -890,11 +890,11 @@
     v51 = pDialogueWindow;
     v52 = 174 - v48 * (174 - (signed int)pOutString) / v48 - (signed int)pOutString;
     v53 = v52 - HIDWORD(v52);
-    LODWORD(v52) = pDialogueWindow->field_38;
-    HIDWORD(v52) = v52 + pDialogueWindow->field_28;
+    LODWORD(v52) = pDialogueWindow->pStartingPosActiveItem;
+    HIDWORD(v52) = v52 + pDialogueWindow->pNumPresenceButton;
     v54 = (v53 >> 1) - v86 / 2 + 138;
-    v37 = -pDialogueWindow->field_28 < 0;
-    v89 = pDialogueWindow->field_38;
+    v37 = -pDialogueWindow->pNumPresenceButton < 0;
+    v89 = pDialogueWindow->pStartingPosActiveItem;
     if ( v37 ^ __OFSUB__((int)v52, HIDWORD(v52)) )
     {
       v85 = (Player *)2;
@@ -911,7 +911,7 @@
         v54 = v57 + v58 - 1;
         v55->uW = v54;
         v60 = v84[0];
-        if ( (Player *)pDialogueWindow->field_2C_focus_id != v59 )
+        if ( (Player *)pDialogueWindow->pCurrentPosActiveItem != v59 )
           v60 = v81;
         v79.DrawText2(pFontArrus, 0, v58, v60, *(const char **)&pOutString->cFirstChar, 3u);
         v51 = pDialogueWindow;
@@ -919,7 +919,7 @@
         pOutString = (GUIFont *)((char *)pOutString + 4);
         ++v89;
       }
-      while ( v89 < pDialogueWindow->field_28 + pDialogueWindow->field_38 );
+      while ( v89 < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem );
     }
   }
 }
@@ -1144,11 +1144,11 @@
       while ( (signed int)v66 < (signed int)&pShopOptions[3] );
       v68 = pDialogueWindow;
       v109 = (const char **)((174 - v65) / 3);
-      result = (char *)pDialogueWindow->field_38;
-      v69 = (int)&result[pDialogueWindow->field_28];
+      result = (char *)pDialogueWindow->pStartingPosActiveItem;
+      v69 = (int)&result[pDialogueWindow->pNumPresenceButton];
       v70 = (3 * (58 - (signed int)v109) - v65) / 2 - (174 - v65) / 3 / 2 + 138;
-      v20 = -pDialogueWindow->field_28 < 0;
-      v106.y = pDialogueWindow->field_38;
+      v20 = -pDialogueWindow->pNumPresenceButton < 0;
+      v106.y = pDialogueWindow->pStartingPosActiveItem;
       if ( v20 ^ __OFSUB__((int)result, (int)v69) )
       {
         _this = (Player *)2;
@@ -1165,14 +1165,14 @@
           v70 = v73 + v74 - 1;
           v71->uW = v70;
           v76 = v104;
-          if ( (Player *)pDialogueWindow->field_2C_focus_id != v75 )
+          if ( (Player *)pDialogueWindow->pCurrentPosActiveItem != v75 )
             v76 = v105;
           v101.DrawText2(pFontArrus, 0, v74, v76, *(const char **)v108, 3u);
           v68 = pDialogueWindow;
           _this = (Player *)((char *)_this + 1);
           v108 += 4;
           ++v106.y;
-          result = (char *)(pDialogueWindow->field_28 + pDialogueWindow->field_38);
+          result = (char *)(pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem);
         }
         while ( v106.y < (signed int)result );
       }
@@ -1195,8 +1195,8 @@
           v108 = v32 * (100 - _this->GetMerchant()) / 100;
           if ( v108 < v32 / 3 )
             v108 = v32 / 3;
-          v33 = v30->field_38;
-          v34 = v33 + v30->field_28;
+          v33 = v30->pStartingPosActiveItem;
+          v34 = v33 + v30->pNumPresenceButton;
           v109 = 0;
           if ( (signed int)v33 >= v34 )
             goto LABEL_105;
@@ -1211,7 +1211,7 @@
             }
             ++v33;
           }
-          while ( (signed int)v33 < v30->field_28 + v30->field_38 );
+          while ( (signed int)v33 < v30->pNumPresenceButton + v30->pStartingPosActiveItem );
           if ( !v109 )
           {
 LABEL_105:
@@ -1232,11 +1232,11 @@
           v108 = (149 - v106.y) / (signed int)v109;
           if ( (149 - v106.y) / (signed int)v109 > 32 )
             v108 = 32;
-          result = (char *)v30->field_38;
+          result = (char *)v30->pStartingPosActiveItem;
           v37 = (149 - (signed int)v109 * v108 - v106.y) / 2 - v108 / 2 + 162;
           v106.y = (LONG)result;
           v103 = v37;
-          if ( (signed int)result < (signed int)&result[v30->field_28] )
+          if ( (signed int)result < (signed int)&result[v30->pNumPresenceButton] )
           {
             v109 = (const char **)2;
             do
@@ -1263,13 +1263,13 @@
                 v39->uW = v45;
                 v103 = v45;
                 v46 = v104;
-                if ( (const char **)pDialogueWindow->field_2C_focus_id != v44 )
+                if ( (const char **)pDialogueWindow->pCurrentPosActiveItem != v44 )
                   v46 = v105;
                 v101.DrawText2(pFontArrus, 0, v43, v46, Str, 3u);
               }
-              v47 = v30->field_38;
+              v47 = v30->pStartingPosActiveItem;
               ++v106.y;
-              result = (char *)(v30->field_28 + v47);
+              result = (char *)(v30->pNumPresenceButton + v47);
               v109 = (const char **)((char *)v109 + 1);
             }
             while ( v106.y < (signed int)result );
@@ -1345,11 +1345,11 @@
         while ( (signed int)v15 < (signed int)&unk_F8B1C8 );
         v17 = pDialogueWindow;
         v103 = (174 - v14) / 4;
-        result = (char *)pDialogueWindow->field_38;
-        v18 = (int)&result[pDialogueWindow->field_28];
+        result = (char *)pDialogueWindow->pStartingPosActiveItem;
+        v18 = (int)&result[pDialogueWindow->pNumPresenceButton];
         v19 = (174 - 4 * (174 - v14) / 4 - v14) / 2 - (174 - v14) / 4 / 2 + 138;
-        v20 = -pDialogueWindow->field_28 < 0;
-        _this = (Player *)pDialogueWindow->field_38;
+        v20 = -pDialogueWindow->pNumPresenceButton < 0;
+        _this = (Player *)pDialogueWindow->pStartingPosActiveItem;
         if ( v20 ^ __OFSUB__((int)result, v18) )
         {
           v108 = 2;
@@ -1366,14 +1366,14 @@
             v19 = v24 + v23 - 1;
             v21->uW = v19;
             v26 = v104;
-            if ( pDialogueWindow->field_2C_focus_id != v25 )
+            if ( pDialogueWindow->pCurrentPosActiveItem != v25 )
               v26 = v105;
             v101.DrawText2(pFontArrus, 0, v24, v26, *v109, 3u);
             v17 = pDialogueWindow;
             ++v108;
             ++v109;
             _this = (Player *)((char *)_this + 1);
-            result = (char *)(pDialogueWindow->field_28 + pDialogueWindow->field_38);
+            result = (char *)(pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem);
           }
           while ( (signed int)_this < (signed int)result );
         }
@@ -1762,11 +1762,11 @@
       while ( (signed int)v73 < (signed int)&unk_F8B1C8 );
       v75 = pDialogueWindow;
       Str = (char *)((174 - v72) / 4);
-      result = (POINT *)pDialogueWindow->field_38;
-      v76 = (int)((char *)result + pDialogueWindow->field_28);
+      result = (POINT *)pDialogueWindow->pStartingPosActiveItem;
+      v76 = (int)((char *)result + pDialogueWindow->pNumPresenceButton);
       v77 = (174 - 4 * (174 - v72) / 4 - v72) / 2 - (174 - v72) / 4 / 2 + 138;
-      v28 = -pDialogueWindow->field_28 < 0;
-      v112 = pDialogueWindow->field_38;
+      v28 = -pDialogueWindow->pNumPresenceButton < 0;
+      v112 = pDialogueWindow->pStartingPosActiveItem;
       if ( v28 ^ __OFSUB__((int)result, v76) )
       {
         _this = (Player *)2;
@@ -1783,14 +1783,14 @@
           v77 = v81 + v80 - 1;
           v78->uW = v77;
           v83 = v106;
-          if ( (Player *)pDialogueWindow->field_2C_focus_id != v82 )
+          if ( (Player *)pDialogueWindow->pCurrentPosActiveItem != v82 )
             v83 = v108;
           v104.DrawText2(pFontArrus, 0, v81, v83, *v111, 3u);
           v75 = pDialogueWindow;
           _this = (Player *)((char *)_this + 1);
           ++v111;
           ++v112;
-          result = (POINT *)(pDialogueWindow->field_28 + pDialogueWindow->field_38);
+          result = (POINT *)(pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem);
         }
         while ( (signed int)v112 < (signed int)result );
       }
@@ -1885,11 +1885,11 @@
         while ( (signed int)v23 < (signed int)&pShopOptions[2] );
         Str = (char *)((174 - v22) / 2);
         v25 = pDialogueWindow;
-        result = (POINT *)pDialogueWindow->field_38;
-        v26 = (int)((char *)result + pDialogueWindow->field_28);
+        result = (POINT *)pDialogueWindow->pStartingPosActiveItem;
+        v26 = (int)((char *)result + pDialogueWindow->pNumPresenceButton);
         v27 = (2 * (87 - (174 - v22) / 2) - v22) / 2 - (174 - v22) / 2 / 2 + 138;
-        v28 = -pDialogueWindow->field_28 < 0;
-        v112 = pDialogueWindow->field_38;
+        v28 = -pDialogueWindow->pNumPresenceButton < 0;
+        v112 = pDialogueWindow->pStartingPosActiveItem;
         if ( v28 ^ __OFSUB__((int)result, v26) )
         {
           _this = (Player *)2;
@@ -1907,14 +1907,14 @@
             v29->uW = v34;
             v27 = v34;
             v35 = v106;
-            if ( (Player *)pDialogueWindow->field_2C_focus_id != v33 )
+            if ( (Player *)pDialogueWindow->pCurrentPosActiveItem != v33 )
               v35 = v108;
             v104.DrawText2(pFontArrus, 0, v32, v35, *v111, 3u);
             v25 = pDialogueWindow;
             _this = (Player *)((char *)_this + 1);
             ++v111;
             ++v112;
-            result = (POINT *)(pDialogueWindow->field_28 + pDialogueWindow->field_38);
+            result = (POINT *)(pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem);
           }
           while ( (signed int)v112 < (signed int)result );
         }
@@ -1935,8 +1935,8 @@
         v111 = (const char **)(v5 * (100 - _this->GetMerchant()) / 100);
         if ( (signed int)v111 < v5 / 3 )
           v111 = (const char **)(v5 / 3);
-        v6 = v2->field_38;
-        v7 = v6 + v2->field_28;
+        v6 = v2->pStartingPosActiveItem;
+        v7 = v6 + v2->pNumPresenceButton;
         v114 = 0;
         if ( (signed int)v6 < v7 )
         {
@@ -1951,7 +1951,7 @@
             }
             ++v6;
           }
-          while ( (signed int)v6 < v2->field_28 + v2->field_38 );
+          while ( (signed int)v6 < v2->pNumPresenceButton + v2->pStartingPosActiveItem );
           if ( v114 )
           {
             sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], v111);
@@ -1959,11 +1959,11 @@
             v111 = (const char **)((signed int)(149 - v112) / v114);
             if ( (signed int)(149 - v112) / v114 > 32 )
               v111 = (const char **)32;
-            result = (POINT *)v2->field_38;
+            result = (POINT *)v2->pStartingPosActiveItem;
             v10 = (signed int)(149 - v114 * (int)v111 - v112) / 2 - (signed int)v111 / 2 + 162;
             v112 = (unsigned int)result;
             v105 = v10;
-            if ( (signed int)result < (signed int)((char *)result + v2->field_28) )
+            if ( (signed int)result < (signed int)((char *)result + v2->pNumPresenceButton) )
             {
               v114 = 2;
               do
@@ -1990,13 +1990,13 @@
                   v12->uW = v18;
                   v105 = v18;
                   v19 = v106;
-                  if ( pDialogueWindow->field_2C_focus_id != v17 )
+                  if ( pDialogueWindow->pCurrentPosActiveItem != v17 )
                     v19 = v108;
                   v104.DrawText2(pFontArrus, 0, v16, v19, Str, 3u);
                 }
-                v20 = v2->field_38;
+                v20 = v2->pStartingPosActiveItem;
                 ++v112;
-                result = (POINT *)(v2->field_28 + v20);
+                result = (POINT *)(v2->pNumPresenceButton + v20);
                 ++v114;
               }
               while ( (signed int)v112 < (signed int)result );
@@ -2486,11 +2486,11 @@
       while ( (signed int)v81 < (signed int)&pShopOptions[3] );
       v83 = pDialogueWindow;
       v152 = (174 - v80) / 3;
-      v84 = pDialogueWindow->field_38;
-      v85 = v84 + pDialogueWindow->field_28;
+      v84 = pDialogueWindow->pStartingPosActiveItem;
+      v85 = v84 + pDialogueWindow->pNumPresenceButton;
       v86 = (3 * (58 - v152) - v80) / 2 - v152 / 2 + 138;
-      v24 = -pDialogueWindow->field_28 < 0;
-      _this = (Player *)pDialogueWindow->field_38;
+      v24 = -pDialogueWindow->pNumPresenceButton < 0;
+      _this = (Player *)pDialogueWindow->pStartingPosActiveItem;
       if ( v24 ^ __OFSUB__(v84, v85) )
       {
         v153 = 2;
@@ -2506,7 +2506,7 @@
           v86 = v90 + v89 - 1;
           v88->uW = v86;
           v92 = v147;
-          if ( pDialogueWindow->field_2C_focus_id != v91 )
+          if ( pDialogueWindow->pCurrentPosActiveItem != v91 )
             v92 = v148;
           v144.DrawText2(pFontArrus, 0, v90, v92, *v79, 3u);
           v83 = pDialogueWindow;
@@ -2514,7 +2514,7 @@
           ++v79;
           _this = (Player *)((char *)_this + 1);
         }
-        while ( (signed int)_this < pDialogueWindow->field_28 + pDialogueWindow->field_38 );
+        while ( (signed int)_this < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem );
       }
       return;
     }
@@ -2529,8 +2529,8 @@
       _this = (Player *)(v38 * (100 - v0->GetMerchant()) / 100);
       if ( (signed int)_this < v38 / 3 )
         _this = (Player *)(v38 / 3);
-      v39 = v37->field_38;
-      v40 = v37->field_28;
+      v39 = v37->pStartingPosActiveItem;
+      v40 = v37->pNumPresenceButton;
       v153 = 0;
       if ( (signed int)v39 < (signed int)(v39 + v40) )
       {
@@ -2545,7 +2545,7 @@
           }
           ++v39;
         }
-        while ( (signed int)v39 < v37->field_28 + v37->field_38 );
+        while ( (signed int)v39 < v37->pNumPresenceButton + v37->pStartingPosActiveItem );
         if ( v153 )
         {
           sprintfex(pTmpBuf, pGlobalTXT_LocalizationStrings[401], _this);
@@ -2554,9 +2554,9 @@
           if ( (149 - v152) / v153 > 32 )
             _this = (Player *)32;
           v43 = (149 - v153 * (signed int)_this - v152) / 2 - (signed int)_this / 2 + 162;
-          v152 = v37->field_38;
+          v152 = v37->pStartingPosActiveItem;
           v146 = v43;
-          if ( v152 < v152 + v37->field_28 )
+          if ( v152 < v152 + v37->pNumPresenceButton )
           {
             v153 = 2;
             do
@@ -2583,13 +2583,13 @@
                 v45->uW = v51;
                 v146 = v51;
                 v52 = v147;
-                if ( pDialogueWindow->field_2C_focus_id != v50 )
+                if ( pDialogueWindow->pCurrentPosActiveItem != v50 )
                   v52 = v148;
                 v144.DrawText2(pFontArrus, 0, v49, v52, Str, 3u);
               }
-              v53 = v37->field_38;
+              v53 = v37->pStartingPosActiveItem;
               ++v152;
-              v54 = v37->field_28 + v53;
+              v54 = v37->pNumPresenceButton + v53;
               ++v153;
             }
             while ( v152 < v54 );
@@ -2816,11 +2816,11 @@
       while ( (signed int)v18 < (signed int)&unk_F8B1C8 );
       v20 = pDialogueWindow;
       v146 = (174 - v17) / 4;
-      v21 = pDialogueWindow->field_38;
-      v22 = v21 + pDialogueWindow->field_28;
+      v21 = pDialogueWindow->pStartingPosActiveItem;
+      v22 = v21 + pDialogueWindow->pNumPresenceButton;
       v23 = (174 - 4 * (174 - v17) / 4 - v17) / 2 - (174 - v17) / 4 / 2 + 138;
-      v24 = -pDialogueWindow->field_28 < 0;
-      v152 = pDialogueWindow->field_38;
+      v24 = -pDialogueWindow->pNumPresenceButton < 0;
+      v152 = pDialogueWindow->pStartingPosActiveItem;
       if ( v24 ^ __OFSUB__(v21, v22) )
       {
         _this = (Player *)2;
@@ -2836,7 +2836,7 @@
           v23 = v28 + v27 - 1;
           v26->uW = v23;
           v30 = v147;
-          if ( (Player *)pDialogueWindow->field_2C_focus_id != v29 )
+          if ( (Player *)pDialogueWindow->pCurrentPosActiveItem != v29 )
             v30 = v148;
           v144.DrawText2(pFontArrus, 0, v28, v30, *v16, 3u);
           v20 = pDialogueWindow;
@@ -2844,7 +2844,7 @@
           ++v16;
           ++v152;
         }
-        while ( v152 < pDialogueWindow->field_28 + pDialogueWindow->field_38 );
+        while ( v152 < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem );
       }
     }
     return;
@@ -3773,7 +3773,7 @@
   v1 = 0;
   v2 = a1;
   v55 = a1;
-  if ( !pDialogueWindow->field_28 )
+  if ( !pDialogueWindow->pNumPresenceButton )
     return;
   pRenderer->ClearZBuffer(0, 479);
   v3 = dword_F8B198;
--- a/mm7_3.cpp	Mon Oct 22 17:28:15 2012 +0600
+++ b/mm7_3.cpp	Tue Oct 23 17:33:33 2012 +0600
@@ -16383,8 +16383,8 @@
   v52.uFrameX = 483;
   v52.uFrameWidth = 148;
   v52.uFrameZ = 334;
-  for ( pOutString = (GUIFont *)v52.field_38;
-        (signed int)pOutString < v52.field_38 + v52.field_28;
+  for ( pOutString = (GUIFont *)v52.pStartingPosActiveItem;
+        (signed int)pOutString < v52.pStartingPosActiveItem + v52.pNumPresenceButton;
         pOutString = (GUIFont *)((char *)pOutString + 1) )
   {
     v14 = v52.GetControl((unsigned int)pOutString);
@@ -16533,8 +16533,8 @@
   v33 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xE1u, 0xCDu, 0x23u);
   v34 = pDialogueWindow;
   *(int *)v54 = v33;
-  v35 = pDialogueWindow->field_38;
-  for ( i = v35 + pDialogueWindow->field_28; v35 < i; i = pDialogueWindow->field_28 + pDialogueWindow->field_38 )
+  v35 = pDialogueWindow->pStartingPosActiveItem;
+  for ( i = v35 + pDialogueWindow->pNumPresenceButton; v35 < i; i = pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem )
   {
     v37 = v34->GetControl(v35);
     if ( !v37 )
@@ -16547,7 +16547,7 @@
     v32 += v38;
     ++v35;
   }
-  v39 = v34->field_28;
+  v39 = v34->pNumPresenceButton;
   if ( v39 )
   {
     pOutString = (GUIFont *)((174 - v32) / v39);
@@ -16555,7 +16555,7 @@
       pOutString = (GUIFont *)32;
     v55 = (unsigned __int16 *)1;
     v40 = 174 - (int)pOutString * v39 - v32;
-    v41 = v34->field_38;
+    v41 = v34->pStartingPosActiveItem;
     v42 = v40 / 2 - (signed int)pOutString / 2 + 138;
     if ( (signed int)v41 < (signed int)(v41 + v39) )
     {
@@ -16573,14 +16573,14 @@
         v42 = v45 + v44 - 1;
         v43->uW = v42;
         v47 = v54[0];
-        if ( (unsigned __int16 *)pDialogueWindow->field_2C_focus_id != v46 )
+        if ( (unsigned __int16 *)pDialogueWindow->pCurrentPosActiveItem != v46 )
           v47 = (unsigned __int16)pInString;
         v52.DrawText2(pFontArrus, 0, v45, v47, Str, 3u);
         v34 = pDialogueWindow;
         v55 = (unsigned __int16 *)((char *)v55 + 1);
         ++v41;
       }
-      while ( (signed int)v41 < pDialogueWindow->field_28 + pDialogueWindow->field_38 );
+      while ( (signed int)v41 < pDialogueWindow->pNumPresenceButton + pDialogueWindow->pStartingPosActiveItem );
     }
   }
   pRenderer->DrawTextureIndexed(
--- 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;
       }
--- a/mm7_5.cpp	Mon Oct 22 17:28:15 2012 +0600
+++ b/mm7_5.cpp	Tue Oct 23 17:33:33 2012 +0600
@@ -3400,7 +3400,7 @@
   unsigned int v26; // ecx@127
   unsigned int v27; // eax@129
   unsigned __int8 v28; // of@129
-  SoundID v29; // [sp-2Ch] [bp-3Ch]@36
+  SoundID pSoundID; // [sp-2Ch] [bp-3Ch]@36
   signed int v30; // [sp-28h] [bp-38h]@36
   unsigned int v31; // [sp-24h] [bp-34h]@36
   signed int v32; // [sp-20h] [bp-30h]@36
@@ -3415,17 +3415,19 @@
   signed int v41; // [sp-10h] [bp-20h]@29
   int v42; // [sp-10h] [bp-20h]@36
   int v43; // [sp-10h] [bp-20h]@56
-  unsigned __int8 uClass[4]; // [sp+4h] [bp-Ch]@3
+  int uNum; // [sp+4h] [bp-Ch]@3
   UIMessageType v45; // [sp+8h] [bp-8h]@3
   int v46; // [sp+Ch] [bp-4h]@3
+  Player *pPlayer;
 
   if ( pMessageQueue_50CBD0->uNumMessages )
   {
     //v0 = pAudioPlayer;
     v1 = (char *)pParty->pPlayers;
+	pPlayer = pParty->pPlayers;
     do
     {
-      pMessageQueue_50CBD0->PopMessage(&v45, (int *)uClass, &v46);
+      pMessageQueue_50CBD0->PopMessage(&v45, &uNum, &v46);
       switch (v45)
       {
         case UIMSG_MainMenu_ShowPartyCreationWnd:
@@ -3475,11 +3477,11 @@
           if (pGUIWindow_CurrentMenu->field_40 == 1)
             pKeyActionMap->_459ED1(0);
           if ( pCurrentScreen != 11
-              || uLoadGameUI_SelectedSlot != *(int *)uClass + dword_6A0C9C )
+              || uLoadGameUI_SelectedSlot != uNum + dword_6A0C9C )
           {
             //load clicked line
-              v26 = *(int *)uClass + dword_6A0C9C;
-              if ( dword_6BE138 == *(int *)uClass + dword_6A0C9C )
+              v26 = uNum + dword_6A0C9C;
+              if ( dword_6BE138 == uNum + dword_6A0C9C )
               {
                 pMessageQueue_50CBD0->SendMessage(UIMSG_A4, 0, 0);
                 pMessageQueue_50CBD0->SendMessage(UIMSG_LoadGame, 0, 0);
@@ -3525,24 +3527,23 @@
             GUIWindow::Create(v18, v8, v33, v35, v37, v39, v43);
             continue;
           }
-          if ( v45 == UIMSG_AB )
-          {
-            v23 = (char *)&pParty->pPlayers[*(int *)uClass];
-            v24 = (int)(v23 + 186);
-            v12 = (char)(v23[186] - 1) < 0;
-            --*(char *)v24;
+          if ( v45 == UIMSG_AB ) // sellect face -1
+          {
+            pPlayer = &pParty->pPlayers[uNum];
+            v12 = (char)((int)pPlayer->uFace - 1) < 0;
+            --pPlayer->uFace;
             if ( v12 )
-              *(char *)v24 = 19;
-            *((int *)v23 + 1608) = *(char *)v24;
-            ((Player *)v23)->SetInitialStats();
-            ((Player *)v23)->SetSexByVoice();
-            ((Player *)v23)->RandomizeName();
-            v25 = *(int *)uClass;
-            pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id
-                                                       - pGUIWindow_CurrentMenu->field_38)
+              pPlayer->uFace = 19;
+            pPlayer->uVoiceID = pPlayer->uFace;
+            pPlayer->SetInitialStats();
+            pPlayer->SetSexByVoice();
+            pPlayer->RandomizeName();
+            v25 = uNum;
+            pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem
+                                                       - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
                                                       % 7
-                                                      + pGUIWindow_CurrentMenu->field_38
-                                                      + 7 * *(int *)uClass;
+                                                      + pGUIWindow_CurrentMenu->pStartingPosActiveItem
+                                                      + 7 * uNum;
             uPlayerCreationUI_SelectedCharacter = v25;
             GUIWindow::Create(
               pCreationUI_BtnPressLeft[v25]->uX,
@@ -3554,24 +3555,24 @@
               1);
             //v0 = pAudioPlayer;
             pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0.0, 0);
-            v22 = (Player *)v23;
+            v22 = pPlayer;
             goto LABEL_117;
           }
-          if ( v45 == UIMSG_AC )
-          {
-            v19 = (int)&v1[6972 * *(int *)uClass];
-            v20 = (char)(*(char *)(v19 + 186) + 1) % 20;
-            *(char *)(v19 + 186) = v20;
-            *(int *)(v19 + 6432) = v20;
-            ((Player *)v19)->SetInitialStats();
-            ((Player *)v19)->SetSexByVoice();
-            ((Player *)v19)->RandomizeName();
-            v21 = *(int *)uClass;
-            pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id
-                                                       - pGUIWindow_CurrentMenu->field_38)
+          if ( v45 == UIMSG_AC ) //sellect face +1
+          {
+            pPlayer = &pParty->pPlayers[uNum];
+			v20 = (char)((int)pPlayer->uFace + 1) % 20;
+            pPlayer->uFace = v20;
+            pPlayer->uVoiceID = v20;
+            pPlayer->SetInitialStats();
+            pPlayer->SetSexByVoice();
+            pPlayer->RandomizeName();
+            v21 = uNum;
+            pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem
+                                                       - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
                                                       % 7
-                                                      + pGUIWindow_CurrentMenu->field_38
-                                                      + 7 * *(int *)uClass;
+                                                      + pGUIWindow_CurrentMenu->pStartingPosActiveItem
+                                                      + 7 * uNum;
             uPlayerCreationUI_SelectedCharacter = v21;
             GUIWindow::Create(
               pCreationUI_BtnPressRight[v21]->uX,
@@ -3583,7 +3584,7 @@
               1);
             //v0 = pAudioPlayer;
             pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
-            v22 = (Player *)v19;
+            v22 = pPlayer;
 LABEL_117:
             v22->PlaySound(102, 0);
             v1 = (char *)pParty->pPlayers;
@@ -3623,8 +3624,8 @@
         if ( v45 == UIMSG_A3 )
         {
           ++dword_6A0C9C;
-          if ( dword_6A0C9C >= *(int *)uClass )
-            dword_6A0C9C = *(int *)uClass - 1;
+          if ( dword_6A0C9C >= uNum )
+            dword_6A0C9C = uNum - 1;
           if ( dword_6A0C9C < 1 )
             dword_6A0C9C = 0;
           v7 = pGUIWindow_CurrentMenu;
@@ -3725,12 +3726,12 @@
         {
           if ( v45 == 118 )
           {
-            v14 = *(int *)uClass;
-            pGUIWindow_CurrentMenu->field_2C_focus_id = (pGUIWindow_CurrentMenu->field_2C_focus_id
-                                                       - pGUIWindow_CurrentMenu->field_38)
+            v14 = uNum;
+            pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem
+                                                       - pGUIWindow_CurrentMenu->pStartingPosActiveItem)
                                                       % 7
-                                                      + pGUIWindow_CurrentMenu->field_38
-                                                      + 7 * *(int *)uClass;
+                                                      + pGUIWindow_CurrentMenu->pStartingPosActiveItem
+                                                      + 7 * uNum;
             uPlayerCreationUI_SelectedCharacter = v14;
 LABEL_36:
             v42 = 0;
@@ -3740,14 +3741,14 @@
             v32 = -1;
             v31 = 0;
             v30 = 0;
-            v29 = (SoundID)66;
+            pSoundID = (SoundID)66;
 LABEL_40:
-            pAudioPlayer->PlaySound(v29, v30, v31, v32, v34, v36, v38, v42);
+            pAudioPlayer->PlaySound(pSoundID, v30, v31, v32, v34, v36, v38, v42);
             continue;
           }
           if ( v45 == 144 )
           {
-            v9 = (Player *)&v1[6972 * *(int *)uClass];
+            v9 = &pPlayer[uNum];
             v46 = v9->GetSexByVoice();
             do
             {
@@ -3757,12 +3758,12 @@
               v13 = v9->GetSexByVoice();
             }
             while ( v13 != v46 );
-            v11 = pCreationUI_BtnPressLeft2[*(int *)uClass];
+            v11 = pCreationUI_BtnPressLeft2[uNum];
             goto LABEL_60;
           }
           if ( v45 == 145 )
           {
-            v9 = (Player *)&v1[6972 * *(int *)uClass];
+            v9 = &pPlayer[uNum];
             v46 = v9->GetSexByVoice();
             do
             {
@@ -3770,7 +3771,7 @@
               v10 = v9->GetSexByVoice();
             }
             while ( v10 != v46 );
-            v11 = pCreationUI_BtnPressRight2[*(int *)uClass];
+            v11 = pCreationUI_BtnPressRight2[uNum];
 LABEL_60:
             GUIWindow::Create(v11->uX, v11->uY, 0, 0, (enum WindowType)92, (int)v11, 1);
             pAudioPlayer->PlaySound((SoundID)66, 0, 0, -1, 0, 0, 0, 0);
@@ -3800,21 +3801,21 @@
       {
         if ( v45 == 75 )
         {
-          uPlayerCreationUI_SelectedCharacter = *(int *)uClass;
+          uPlayerCreationUI_SelectedCharacter = uNum;
           v41 = 3;
           v1 = (char *)pParty->pPlayers;
-          v5 = (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7
-             + pGUIWindow_CurrentMenu->field_38
-             + 7 * *(int *)uClass;
+          v5 = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7
+             + pGUIWindow_CurrentMenu->pStartingPosActiveItem
+             + 7 * uNum;
           goto LABEL_44;
         }
         if ( (signed int)v45 > 60 )
         {
-          if ( v45 == 62 )
-          {
-            GUIWindow::Create(0x265u, 0x189u, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1);
-            ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute(
-              (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7);
+          if ( v45 == 62 ) //click +
+          {
+            GUIWindow::Create(613, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnPlus, 1);
+            (&pPlayer[uPlayerCreationUI_SelectedCharacter])->IncreaseAttribute(
+              (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
             v42 = 0;
             v38 = 0;
             v36 = 0;
@@ -3822,14 +3823,14 @@
             v32 = -1;
             v31 = 0;
             v30 = 0;
-            v29 = (SoundID)20;
+            pSoundID = (SoundID)20;
             goto LABEL_40;
           }
-          if ( v45 == 63 )
-          {
-            GUIWindow::Create(0x20Bu, 0x189u, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1);
-            ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute(
-              (pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38) % 7);
+          if ( v45 == 63 ) // click -
+          {
+            GUIWindow::Create(523, 393, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnMinus, 1);
+            (&pPlayer[uPlayerCreationUI_SelectedCharacter])->DecreaseAttribute(
+              (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7);
             v42 = 0;
             v38 = 0;
             v36 = 0;
@@ -3837,14 +3838,13 @@
             v32 = -1;
             v31 = 0;
             v30 = 0;
-            v29 = (SoundID)23;
+            pSoundID = (SoundID)23;
             goto LABEL_40;
           }
-          if ( v45 == 64 )
-          {
-            auto _t = (Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter];
-            v6 = _t->GetSkillIdxByOrder(
-                   *(int *)uClass + 4);
+          if ( v45 == 64 ) // sellect active skill
+          {
+            auto _t = &pPlayer[uPlayerCreationUI_SelectedCharacter];
+            v6 = _t->GetSkillIdxByOrder(uNum + 4);
             if ( _t->GetSkillIdxByOrder(3) == 37 )
               pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1;
             v42 = 0;
@@ -3854,15 +3854,15 @@
             v32 = -1;
             v31 = 0;
             v30 = 0;
-            v29 = (SoundID)24;
+            pSoundID = (SoundID)24;
             goto LABEL_40;
           }
           if ( v45 == 65 )
           {
-            ((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->Reset(uClass[0]);
+            (&pPlayer[uPlayerCreationUI_SelectedCharacter])->Reset(0);
             goto LABEL_36;
           }
-          if ( v45 == 66 )
+          if ( v45 == 66 ) // click ok
           {
             GUIWindow::Create(0x244u, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0);
             if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() )
@@ -3871,7 +3871,7 @@
               uGameState = 6;
             continue;
           }
-          if ( v45 == 67 )
+          if ( v45 == 67 ) // click reset
           {
             GUIWindow::Create(0x20Fu, 0x1AFu, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnReset, 0);
             pParty->Reset();
@@ -3880,14 +3880,14 @@
           {
             if ( v45 == 74 )
             {
-              uPlayerCreationUI_SelectedCharacter = *(int *)uClass;
-              v4 = pGUIWindow_CurrentMenu->field_2C_focus_id - pGUIWindow_CurrentMenu->field_38;
-              v46 = pGUIWindow_CurrentMenu->field_38;
+              uPlayerCreationUI_SelectedCharacter = uNum;
+              v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem;
+              v46 = pGUIWindow_CurrentMenu->pStartingPosActiveItem;
               v41 = 2;
-              v5 = v4 % 7 + v46 + 7 * *(int *)uClass;
+              v5 = (v4 % 7) + v46 + 7 * uNum;
 LABEL_44:
-              pGUIWindow_CurrentMenu->field_2C_focus_id = v5;
-              pParty->pPlayers[0].pActiveSkills[((Player *)&v1[6972 * uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41)
+              pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5;
+              pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41)
                                              + 3486 * uPlayerCreationUI_SelectedCharacter] = 0;
               continue;
             }
@@ -3899,8 +3899,8 @@
           {
             case 60:
               pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0);
-              v3 = *(void **)uClass;
-              uPlayerCreationUI_SelectedCharacter = *(int *)uClass;
+              v3 = (void *)uNum;
+              uPlayerCreationUI_SelectedCharacter = uNum;
               pKeyActionMap->_459E5A(0, 15, pGUIWindow_CurrentMenu);
               pGUIWindow_CurrentMenu->ptr_1C = v3;
               break;