diff mm7_5.cpp @ 167:90a9c828c2a6

pWindow and pBtn
author Ritor1
date Wed, 12 Dec 2012 12:52:40 +0600
parents 87c503d426e0
children 12a0213e66c7
line wrap: on
line diff
--- a/mm7_5.cpp	Tue Dec 11 17:23:17 2012 +0600
+++ b/mm7_5.cpp	Wed Dec 12 12:52:40 2012 +0600
@@ -671,7 +671,7 @@
             0,
             v1,
             0);
-          ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
+          pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(
                          243u,
                          162u,
                          16u,
@@ -684,7 +684,7 @@
                          v1,
                          &pIcons_LOD->pTextures[uTextureID_507C70],
                          0);
-          ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
+          pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(
                          0x1B3u,
                          0xA2u,
                          0x10u,
@@ -698,7 +698,7 @@
                          &pIcons_LOD->pTextures[uTextureID_507C74],
                          0);
           pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xA2u, 0xACu, 0x11u, v0, 0, 0x6Fu, 0, 0, v1, 0);
-          ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
+          pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(
                          0xF3u,
                          0xD8u,
                          0x10u,
@@ -711,7 +711,7 @@
                          v1,
                          &pIcons_LOD->pTextures[uTextureID_507C70],
                          0);
-          ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
+          pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(
                          0x1B3u,
                          0xD8u,
                          0x10u,
@@ -725,7 +725,7 @@
                          &pIcons_LOD->pTextures[uTextureID_507C74],
                          0);
           pGUIWindow_CurrentMenu->CreateButton(0x107u, 0xD8u, 0xACu, 0x11u, v0, 0, 0x70u, 0, 0, v1, 0);
-          ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
+          pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(
                          0xF3u,
                          0x10Eu,
                          0x10u,
@@ -738,7 +738,7 @@
                          v1,
                          &pIcons_LOD->pTextures[uTextureID_507C70],
                          0);
-          ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
+          pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(
                          0x1B3u,
                          0x10Eu,
                          0x10u,
@@ -907,7 +907,7 @@
             v0 = 1;
             if ( GammaController::IsGammaSupported() )
             {
-              ptr_50C9CC = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_SliderLeft = pGUIWindow_CurrentMenu->CreateButton(
                              0x15u,
                              0xA1u,
                              0x10u,
@@ -920,7 +920,7 @@
                              v1,
                              &pIcons_LOD->pTextures[uTextureID_507C20],
                              0);
-              ptr_50C9C8 = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_SliderRight = pGUIWindow_CurrentMenu->CreateButton(
                              0xD5u,
                              0xA1u,
                              0x10u,
@@ -972,7 +972,7 @@
             v19 = (double)(signed int)uGammaPos * 0.1 + 0.6;
             pGame->pGammaController->Initialize(v19);
             v166 = v0;
-            v152 = (int)ptr_50C9CC;
+            v152 = (int)pBtn_SliderLeft;
             v145 = (WindowType)90;
             v140 = 0;
             v136 = 0;
@@ -988,7 +988,7 @@
               pGame->pGammaController->Initialize(v21);
               v20 = 213;
               v166 = v0;
-              v152 = (int)ptr_50C9C8;
+              v152 = (int)pBtn_SliderRight;
               v145 = (WindowType)90;
               v140 = 0;
               v136 = 0;
@@ -1031,7 +1031,7 @@
               uMusicVolimeMultiplier = 0;
             v167 = v0;
             v23 = 243;
-            v153 = (int)ptr_50C9CC;
+            v153 = (int)pBtn_SliderLeft;
 LABEL_136:
             GUIWindow::Create(v23, 0xD8u, 0, 0, (enum WindowType)90, v153, v167);
             goto LABEL_143;
@@ -1043,7 +1043,7 @@
               uMusicVolimeMultiplier = 9;
             v167 = v0;
             v23 = 435;
-            v153 = (int)ptr_50C9C8;
+            v153 = (int)pBtn_SliderRight;
             goto LABEL_136;
           }
           uMusicVolimeMultiplier = (pMouse->GetCursorPos(&v202)->x - 263) / 17;
@@ -1071,7 +1071,7 @@
               uSoundVolumeMultiplier = 0;
             v168 = v0;
             v24 = 243;
-            v154 = (int)ptr_50C9CC;
+            v154 = (int)pBtn_SliderLeft;
 LABEL_150:
             GUIWindow::Create(v24, 0xA2u, 0, 0, (enum WindowType)90, v154, v168);
             goto LABEL_157;
@@ -1083,7 +1083,7 @@
               uSoundVolumeMultiplier = 9;
             v168 = v0;
             v24 = 435;
-            v154 = (int)ptr_50C9C8;
+            v154 = (int)pBtn_SliderRight;
             goto LABEL_150;
           }
           uSoundVolumeMultiplier = (pMouse->GetCursorPos(&v207)->x - 263) / 17;
@@ -1121,7 +1121,7 @@
               uVoicesVolumeMultiplier = 0;
             v169 = v0;
             v25 = 243;
-            v155 = (int)ptr_50C9CC;
+            v155 = (int)pBtn_SliderLeft;
 LABEL_166:
             GUIWindow::Create(v25, 0x10Eu, 0, 0, (enum WindowType)90, v155, v169);
             goto LABEL_173;
@@ -1133,7 +1133,7 @@
               uVoicesVolumeMultiplier = 9;
             v169 = v0;
             v25 = 435;
-            v155 = (int)ptr_50C9C8;
+            v155 = (int)pBtn_SliderRight;
             goto LABEL_166;
           }
           uVoicesVolumeMultiplier = (pMouse->GetCursorPos(&v205)->x - 263) / 17;
@@ -1192,7 +1192,7 @@
           pEventTimer->Pause();
           pAudioPlayer->StopChannels(-1, -1);
           pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
-          ptr_507BE0 = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)ptr_507A10, 0);
+          pBooksWindow = GUIWindow::Create(493u, 355u, 0, 0, (enum WindowType)99, (int)pBtn_Quests, 0);
           bFlashQuestBook = 0;
           goto _continue;
         case UIMSG_OpenAutonotes:
@@ -1203,7 +1203,7 @@
           pEventTimer->Pause();
           pAudioPlayer->StopChannels(-1, -1);
           pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640u, 480u, WINDOW_Book, uMessage, 0);
-          ptr_507BE0 = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)ptr_507A0C, 0);
+          pBooksWindow = GUIWindow::Create(527u, 353u, 0, 0, (enum WindowType)99, (int)pBtn_Autonotes, 0);
           bFlashAutonotesBook = 0;
           goto _continue;
         case UIMSG_OpenMapBook:
@@ -1219,7 +1219,7 @@
           v27 = 353;
           v28 = 546;
           v170 = 0;
-          v156 = (int)ptr_507A08;
+          v156 = (int)pBtn_Maps;
           goto LABEL_210;
         case UIMSG_OpenCalendar:
           if ( pMessageQueue_50CBD0->uNumMessages )
@@ -1232,10 +1232,10 @@
           v27 = 354;
           v28 = 570;
           v170 = 0;
-          v156 = (int)dword_507A04;
+          v156 = (int)pBtn_Calendar;
 LABEL_210:
           pGUIWindow_CurrentMenu = v26;
-          ptr_507BE0 = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170);
+          pBooksWindow = GUIWindow::Create(v28, v27, 0, 0, (enum WindowType)99, v156, v170);
           goto _continue;
         case UIMSG_OpenHistoryBook:
           if ( pMessageQueue_50CBD0->uNumMessages )
@@ -1245,7 +1245,7 @@
           pEventTimer->Pause();
           pAudioPlayer->StopChannels(-1, -1);
           pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_Book, uMessage, 0);
-          ptr_507BE0 = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)ptr_507A00, 0);
+          pBooksWindow = GUIWindow::Create(0x258u, 0x169u, 0, 0, (enum WindowType)99, (int)pBtn_History, 0);
           bFlashHistoryBook = 0;
           goto _continue;
         case UIMSG_CloseBook:
@@ -1322,9 +1322,9 @@
                       }
                       goto LABEL_322;
                     case 3:
-                      ptr_507BE0->Release();
+                      pBooksWindow->Release();
                       //crt_deconstruct_ptr_6A0118();
-                      ptr_507BE0 = 0;
+                      pBooksWindow = 0;
                       pEventTimer->Resume();
                       goto LABEL_322;
                     case 11:
@@ -1336,7 +1336,7 @@
                       pCurrentScreen = 10;
                       goto _continue;
                     case 10:
-                      v29 = ptr_507BB8;
+                      v29 = pChestWindow;
                       goto LABEL_249;
                     case 25:
                       v29 = ptr_507BC8;
@@ -1584,7 +1584,7 @@
             if ( !pGUIWindow_Settings )
             {
               dword_6BE138 = -1;
-              GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F0, v0);
+              GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_GameSettings, v0);
               pEventTimer->Pause();
               pAudioPlayer->StopChannels(-1, -1);
               ++pIcons_LOD->uTexturePacksCount;
@@ -1599,7 +1599,7 @@
               uTextureID_507934 = pIcons_LOD->LoadTexture("controls1", TEXTURE_16BIT_PALETTE);
               uTextureID_507930 = pIcons_LOD->LoadTexture("resume1", TEXTURE_16BIT_PALETTE);
               uTextureID_50792C = pIcons_LOD->LoadTexture("quit1", TEXTURE_16BIT_PALETTE);
-              ptr_50C9C4 = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_NewGame = pGUIWindow_CurrentMenu->CreateButton(
                              0x13u,
                              0x9Bu,
                              0xD6u,
@@ -1612,7 +1612,7 @@
                              pGlobalTXT_LocalizationStrings[614],// "New Game"
                              (Texture *)(uTextureID_507940 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507940] : 0),
                              0);
-              ptr_50C9C0 = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_SaveGame = pGUIWindow_CurrentMenu->CreateButton(
                              0x13u,
                              0xD1u,
                              0xD6u,
@@ -1625,7 +1625,7 @@
                              pGlobalTXT_LocalizationStrings[615],// "Save Game"
                              (Texture *)(uTextureID_507938 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507938] : 0),
                              0);
-              ptr_50C9BC = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_LoadGame = pGUIWindow_CurrentMenu->CreateButton(
                              0x13u,
                              0x107u,
                              0xD6u,
@@ -1638,7 +1638,7 @@
                              pGlobalTXT_LocalizationStrings[616],// "Load Game"
                              (Texture *)(uTextureID_50793C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50793C] : 0),
                              0);
-              pyt_50C9B8 = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_GameControls = pGUIWindow_CurrentMenu->CreateButton(
                              0xF1u,
                              0x9Bu,
                              0xD6u,
@@ -1651,7 +1651,7 @@
                              pGlobalTXT_LocalizationStrings[617],// ""Sound, Keyboard, Game Options:""
                              (Texture *)(uTextureID_507934 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_507934] : 0),
                              0);
-              ptr_50C9B4 = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_QuitGame = pGUIWindow_CurrentMenu->CreateButton(
                              0xF1u,
                              0xD1u,
                              0xD6u,
@@ -1664,7 +1664,7 @@
                              pGlobalTXT_LocalizationStrings[618],// "Quit"
                              (Texture *)(uTextureID_50792C != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_50792C] : 0),
                              0);
-              ptr_50C9B0 = pGUIWindow_CurrentMenu->CreateButton(
+              pBtn_Resume = pGUIWindow_CurrentMenu->CreateButton(
                              0xF1u,
                              0x107u,
                              0xD6u,
@@ -1694,7 +1694,7 @@
         case UIMSG_BC:
           if ( uMessageParam )
           {
-            GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079E8, 0);
+            GUIWindow::Create(0x272u, 0xB3u, 0, 0, (enum WindowType)90, (int)pBtn_NPCRight, 0);
             v37 = (pParty->pHirelings[0].pName != 0)
                 + (pParty->pHirelings[1].pName != 0)
                 + (unsigned __int8)pParty->field_70A
@@ -1711,7 +1711,7 @@
           }
           else
           {
-            GUIWindow::Create(0x1D5u, 0xB3u, 0, 0, (enum WindowType)90, (int)ptr_5079EC, 0);
+            GUIWindow::Create(0x1D5u, 0xB3u, 0, 0, (enum WindowType)90, (int)pBtn_NPCLeft, 0);
             if ( pParty->field_709 )
             {
               --pParty->field_709;
@@ -2148,9 +2148,9 @@
               ++pMessageQueue_50CBD0->uNumMessages;
             }
             //crt_deconstruct_ptr_6A0118();
-            ptr_507BE0->Release();
+            pBooksWindow->Release();
             pGUIWindow_CurrentMenu->Release();
-            ptr_507BE0 = 0;
+            pBooksWindow = 0;
             pGUIWindow_CurrentMenu = 0;
           }
           else
@@ -2709,7 +2709,7 @@
           sub_41C0B8_set_status_string(pTmpBuf);
           goto LABEL_91;
         case 0x58:
-          GUIWindow::Create(ptr_5064F8->uX, ptr_5064F8->uY, 0, 0, (enum WindowType)90, (int)ptr_5064F8, 0);
+          GUIWindow::Create(pBtn_InstallRemoveSpell->uX, pBtn_InstallRemoveSpell->uY, 0, 0, (enum WindowType)90, (int)pBtn_InstallRemoveSpell, 0);
           if ( !uActiveCharacter )
             goto _continue;
           thisk = pPlayers[uActiveCharacter];
@@ -2879,7 +2879,7 @@
               {
                 pGUIWindow_CurrentMenu->Release();
 LABEL_693:
-                GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F8, 0);
+                GUIWindow::Create(0x1DCu, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_CastSpell, 0);
                 pCurrentScreen = 8;
                 pEventTimer->Pause();
                 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)18, 0, 0);
@@ -2898,14 +2898,14 @@
           ++pIcons_LOD->uTexturePacksCount;
           if ( !pIcons_LOD->uNumPrevLoadedFiles )
             pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
-          GUIWindow::Create(0x230u, 0x1C2u, 0, 0, (enum WindowType)90, (int)ptr_5079F4, 0);
+          GUIWindow::Create(0x230u, 0x1C2u, 0, 0, (enum WindowType)90, (int)pBtn_QuickReference, 0);
           viewparams->bRedrawGameUI = v0;
           pEventTimer->Pause();
           pAudioPlayer->StopChannels(-1, -1);
           pCurrentScreen = 104;
           pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, (enum WindowType)12, 5, 0);
           papredoll_dbrds[2] = pIcons_LOD->LoadTexture("BUTTEXI1", TEXTURE_16BIT_PALETTE);
-          ptr_5076F4 = pGUIWindow_CurrentMenu->CreateButton(
+          pBtn_ExitCancel = pGUIWindow_CurrentMenu->CreateButton(
                          0x187u,
                          0x13Cu,
                          0x4Bu,
@@ -2933,7 +2933,7 @@
           pRenderer->SavePCXImage("gamma.pcx", (char *)uNumSeconds, 155, 117);
           free((void *)uNumSeconds);
           stru_506E40._40E55E("gamma.pcx", 0);
-          GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
+          GUIWindow::Create(0x25Au, 0x1C2u, 0, 0, (enum WindowType)92, (int)pBtn_GameSettings, 0);
 LABEL_453:
           if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
             goto _continue;
@@ -2945,19 +2945,19 @@
             dword_50651C = -1;
           goto _continue;
         case UIMSG_A9:
-          GUIWindow::Create(ptr_507B9C->uX, ptr_507B9C->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)ptr_507B9C, 0);
+          GUIWindow::Create(pBtn_Up->uX, pBtn_Up->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Up, 0);
 LABEL_707:
           dword_506548 = v0;
           goto _continue;
         case UIMSG_AA:
-          GUIWindow::Create(ptr_507BA0->uX, ptr_507BA0->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)ptr_507BA0, 0);
+          GUIWindow::Create(pBtn_Down->uX, pBtn_Down->uY, 0, 0, (WindowType)(WINDOW_HouseInterior|0x42), (int)pBtn_Down, 0);
 LABEL_709:
           dword_506544 = v0;
           goto _continue;
         case 0x55:
           bRingsShownInCharScreen ^= v0;
-          GUIButton::_41D0D8(ptr_507694);
-          GUIButton::_41D0D8(ptr_507690);
+          GUIButton::_41D0D8(pCharacterScreen_DetalizBtn);
+          GUIButton::_41D0D8(pCharacterScreen_DollBtn);
           if ( bRingsShownInCharScreen )
           {
             v128 = (uTextureID_5118C8 != -1 ? pIcons_LOD->pTextures[uTextureID_5118C8].uTextureHeight : 26);
@@ -2972,7 +2972,7 @@
             v123 = 300;
             v121 = 600;
           }
-          ptr_507694 = pGUIWindow_CurrentMenu->CreateButton(
+          pCharacterScreen_DetalizBtn = pGUIWindow_CurrentMenu->CreateButton(
                          v121,
                          v123,
                          v125,
@@ -2984,7 +2984,7 @@
                          0,
                          pGlobalTXT_LocalizationStrings[64],// "Detail Toggle"
                          0);
-          ptr_507690 = pGUIWindow_CurrentMenu->CreateButton(
+          pCharacterScreen_DollBtn = pGUIWindow_CurrentMenu->CreateButton(
                          0x1DCu,
                          0,
                          0xA4u,
@@ -3055,9 +3055,9 @@
           v142 = (WindowType)91;
           goto LABEL_731;
         case UIMSG_A8:
-          v85 = ptr_50767C;
+          v85 = pCharacterScreen_ExitBtn;
           v163 = 0;
-          v149 = ptr_50767C;
+          v149 = pCharacterScreen_ExitBtn;
           v142 = (WindowType)97;
           goto LABEL_731;
         case UIMSG_CloseBook|0x4:
@@ -3362,10 +3362,9 @@
   dword_507BF0_is_there_popup_onscreen = 0;
   dword_4E455C = 1;
   dword_50CDCC = 0;
-  if ( ptr_507BC4 )
+  if ( pGUIWindow_ScrollWindow )
     free_book_subwindow();
-  if ( !pCurrentScreen
-    && !pGUIWindow_Settings )
+  if ( !pCurrentScreen && !pGUIWindow_Settings )
     pEventTimer->Resume();
   viewparams->bRedrawGameUI = 1;
 }
@@ -3596,7 +3595,7 @@
             pCurrentScreen = 0;
             viewparams->bRedrawGameUI = 1;
           }
-          GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)ptr_5079F0, 0);
+          GUIWindow::Create(602, 450, 0, 0, (enum WindowType)92, (int)pBtn_GameSettings, 0);
           if ( (signed int)pMessageQueue_50CBD0->uNumMessages >= 40 )
             continue;
           pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_CloseBook;
@@ -8373,8 +8372,8 @@
     0,
     (Texture *)(uTextureID_507B04 != -1 ? &pIcons_LOD->pTextures[uTextureID_507B04] : 0));
   pRenderer->DrawTextureIndexed(
-    ptr_507694->uX,
-    ptr_507694->uY,
+    pCharacterScreen_DetalizBtn->uX,
+    pCharacterScreen_DetalizBtn->uY,
     (Texture *)(uTextureID_5118C8 != -1 ? &pIcons_LOD->pTextures[uTextureID_5118C8] : 0));
   v3 = 0;
   v46 = (int)&pPlayer->pEquipment.field_28;
@@ -11984,14 +11983,14 @@
 
 
 //----- (0040D75D) --------------------------------------------------------
-char __fastcall pGUIWindow0_draws_text(int a1, const char *pText, int *pXY)
+char __fastcall pPrimaryWindow_draws_text(int a1, const char *pText, int *pXY)
 {
   const char *v3; // ST0C_4@1
   __int64 v4; // qax@1
 
   v3 = pText;
   v4 = LOBYTE(pFontComic->uFontHeight) - 3;
-  return pGUIWindow0->DrawText(
+  return pPrimaryWindow->DrawText(
            pFontComic,
            *pXY,
            pXY[1] - (((signed int)v4 - HIDWORD(v4)) >> 1) + 3,
@@ -15069,8 +15068,8 @@
                 CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
                 CharacterUI_DrawPaperdoll(uActiveCharacter);
                 pRenderer->DrawTextureTransparent(
-                  ptr_5076F4->uX,
-                  ptr_5076F4->uY,
+                  pBtn_ExitCancel->uX,
+                  pBtn_ExitCancel->uY,
                   (Texture *)(uTextureID_x_x_u != -1 ? &pIcons_LOD->pTextures[uTextureID_x_x_u] : 0));
               }
             }
@@ -15118,8 +15117,8 @@
                   draw_leather();
                   CharacterUI_InventoryTab_Draw(uActiveCharacter, 1);
                   pRenderer->DrawTextureIndexed(
-                    ptr_5076F4->uX,
-                    ptr_5076F4->uY,
+                    pBtn_ExitCancel->uX,
+                    pBtn_ExitCancel->uY,
                     (Texture *)(uTextureID_506438 != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_506438] : 0));
                 }
               }
@@ -15829,7 +15828,7 @@
       return;
     }
   }
-  if ( pParty->pPickedItem.uItemID )
+  if ( pParty->pPickedItem.uItemID )//нажатие на портрет перса правой кнопкой мыши с раствором
   {
     //v1 = 0;
     //do
@@ -15869,8 +15868,8 @@
       v9 = pX + pSRZBufferLineOffsets[pY];
       if ( !(pRenderer->pActiveZBuffer[v9] & 0xFFFF) )
         goto LABEL_132;
-      v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)ptr_507BB8->ptr_1C + 18* *((short *)&pChests[0].mm7__vector_pItems[139].uExpireTime
-                       + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)ptr_507BB8->ptr_1C + 3));
+      v8 = (ItemGen *)(&pOtherOverlayList->pOverlays[49].field_4 + 2662 * (unsigned int)pChestWindow->ptr_1C + 18* *((short *)&pChests[0].mm7__vector_pItems[139].uExpireTime
+                       + (pRenderer->pActiveZBuffer[v9] & 0xFFFF) + 2662 * (unsigned int)pChestWindow->ptr_1C + 3));
     }
     else
     {
@@ -17426,7 +17425,7 @@
         i->uX = 0;
       }
     }
-    ptr_507B9C = pGUIWindow_CurrentMenu->CreateButton(
+    pBtn_Up = pGUIWindow_CurrentMenu->CreateButton(
                    0x1B6u,
                    0x2Eu,
                    (uTextureID_ar_up_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_up_up].uTextureWidth : 24),
@@ -17440,7 +17439,7 @@
                    (Texture *)(uTextureID_ar_up_up != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_up] : 0),
                    uTextureID_ar_up_dn != -1 ? (int)&pIcons_LOD->pTextures[uTextureID_ar_up_dn] : 0,
                    0);
-    ptr_507BA0 = pGUIWindow_CurrentMenu->CreateButton(
+    pBtn_Down = pGUIWindow_CurrentMenu->CreateButton(
                    0x1B6u,
                    0x124u,
                    (uTextureID_ar_dn_up != -1 ? pIcons_LOD->pTextures[uTextureID_ar_dn_up].uTextureWidth : 24),
@@ -17480,10 +17479,10 @@
   {
     dword_507CBC = 0;
     GUIButton::_41D0D8(ptr_507BA4);
-    GUIButton::_41D0D8(ptr_507B9C);
-    GUIButton::_41D0D8(ptr_507BA0);
-    ptr_507BA0 = 0;
-    ptr_507B9C = 0;
+    GUIButton::_41D0D8(pBtn_Up);
+    GUIButton::_41D0D8(pBtn_Down);
+    pBtn_Down = 0;
+    pBtn_Up = 0;
     for ( i = pGUIWindow_CurrentMenu->pControlsHead; i; i = i->pNext )
     {
       if ( i->uControlID == 120 )