changeset 1507:a109bb203e28

UIGame.cpp cleaning(continue) GameUI_DrawMinimap
author Ritor1
date Mon, 02 Sep 2013 17:30:50 +0600
parents c76c0f6974bc
children 4b300ff1ba5e
files Game.cpp IndoorCameraD3D.cpp Player.cpp UI/UICharacter.cpp UI/UiGame.cpp Vis.cpp mm7_1.cpp mm7_2.cpp mm7_data.cpp mm7_data.h stru10.cpp
diffstat 11 files changed, 318 insertions(+), 430 deletions(-) [+]
line wrap: on
line diff
--- a/Game.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/Game.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -212,36 +212,39 @@
 
   ++frames_this_second;
 
-
-  if (render_framerate)
+  extern bool debug_information;
+  if ( debug_information )
   {
-    sprintf(pTmpBuf.data(), "FPS: % .4f", framerate);
-    pPrimaryWindow->DrawText(pFontArrus, 494, 0, TargetColor(0, 0, 0), pTmpBuf.data(), 0, 0, 0);
-  }
+    if (render_framerate)
+    {
+      sprintf(pTmpBuf.data(), "FPS: % .4f", framerate);
+      pPrimaryWindow->DrawText(pFontArrus, 494, 0, TargetColor(0, 0, 0), pTmpBuf.data(), 0, 0, 0);
+    }
 
-  if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
-  {
-    auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
-    sprintf(pTmpBuf.data(), "Party Sector ID:        %u/%u\n", sector_id, pIndoor->uNumSectors);
-    pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
+    if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
+    {
+      auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
+      sprintf(pTmpBuf.data(), "Party Sector ID:        %u/%u\n", sector_id, pIndoor->uNumSectors);
+      pPrimaryWindow->DrawText(pFontArrus, 16, 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
+    }
+    sprintf(pTmpBuf.data(), "Party Position:         % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
+    pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
+  
+    if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
+    {
+      uint uFaceID;
+      auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
+      auto floor_level = BLV_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + 40, sector_id, &uFaceID);
+      sprintf(pTmpBuf.data(), "BLV_GetFloorLevel: %d   face_id %d\n", floor_level, uFaceID);
+    }
+    else
+    {
+      int on_water, _a6;
+      auto floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false);
+      sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d   on_water: %s    a6 = %d\n", floor_level, on_water ? "true" : "false", _a6);
+    }
+    pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
   }
-  sprintf(pTmpBuf.data(), "Party Position:         % d % d % d", pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
-  pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
-  
-  if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
-  {
-    uint uFaceID;
-    auto sector_id = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
-    auto floor_level = BLV_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + 40, sector_id, &uFaceID);
-    sprintf(pTmpBuf.data(), "BLV_GetFloorLevel: %d   face_id %d\n", floor_level, uFaceID);
-  }
-  else
-  {
-    int on_water, _a6;
-    auto floor_level = ODM_GetFloorLevel(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z, 0, &on_water, &_a6, false);
-    sprintf(pTmpBuf.data(), "ODM_GetFloorLevel: %d   on_water: %s    a6 = %d\n", floor_level, on_water ? "true" : "false", _a6);
-  }
-  pPrimaryWindow->DrawText(pFontArrus, 16, 16 + 16 + 16, TargetColor(255, 255, 255), pTmpBuf.data(), 0, 0, 0xFFFFFFFF);
 
   GUI_UpdateWindows();
   pParty->UpdatePlayersAndHirelingsEmotions();
--- a/IndoorCameraD3D.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/IndoorCameraD3D.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -687,10 +687,8 @@
   RenderVertexSoft *v6; // eax@2
   RenderVertexSoft *v7; // edi@3
   char v8; // zf@3
-  IndoorCameraD3D *v9; // [sp+10h] [bp-4h]@1
   unsigned int uNumVerticesa; // [sp+20h] [bp+Ch]@2
 
-  v9 = this;
   v5 = 0;
   if ( (signed int)(uNumVertices - 1) > 0 )
   {
@@ -765,17 +763,6 @@
 //----- (00437906) --------------------------------------------------------
 void IndoorCameraD3D::PrepareAndDrawDebugOutline(BLVFace *pFace, unsigned int uDiffuse)
 {
-  char *v3; // eax@2
-  signed int v4; // ecx@2
-  signed int v5; // ebx@5
-  Vec3_short_ *v6; // edx@6
-  char *v7; // esi@6
-  signed int v8; // ecx@7
-  IndoorCameraD3D *thisa; // [sp+8h] [bp-4h]@1
-
-  thisa = this;
-
-  
   static RenderVertexSoft static_sub_437906_array_50CDD0[64];
   static bool __init_flag1 = false;
   if (!__init_flag1)
@@ -785,25 +772,20 @@
     for (uint i = 0; i < 64; ++i)
       static_sub_437906_array_50CDD0[i].flt_2C = 0.0f;
   }
-
-  v5 = 0;
   if ( pFace->uNumVertices )
   {
-    v6 = pIndoor->pVertices;
-    v7 = (char *)&static_sub_437906_array_50CDD0[0].vWorldPosition.y;
-    do
+    for ( uint i = 0; i < pFace->uNumVertices; i++ )
     {
-      v8 = v5++;
-      *((float *)v7 - 1) = (double)v6[pFace->pVertexIDs[v8]].x;
-      *(float *)v7 = (double)v6[pFace->pVertexIDs[v8]].y;
-      v7 += 48;
-      *((float *)v7 - 11) = (double)v6[pFace->pVertexIDs[v8]].z;
-      *((float *)v7 - 4) = (double)pFace->pVertexUIDs[v8];
-      *((float *)v7 - 3) = (double)pFace->pVertexVIDs[v8];
+      static_sub_437906_array_50CDD0[i].vWorldPosition.x = (double)pIndoor->pVertices[pFace->pVertexIDs[i]].x;
+      static_sub_437906_array_50CDD0[i].vWorldPosition.y = (double)pIndoor->pVertices[pFace->pVertexIDs[i]].y;
+      static_sub_437906_array_50CDD0[i].vWorldPosition.z = (double)pIndoor->pVertices[pFace->pVertexIDs[i]].z;
+      static_sub_437906_array_50CDD0[i].u = (double)pFace->pVertexUIDs[i];
+      static_sub_437906_array_50CDD0[i].v = (double)pFace->pVertexVIDs[i];
     }
-    while ( v5 < pFace->uNumVertices );
   }
-  debug_outline_sw(static_sub_437906_array_50CDD0, pFace->uNumVertices, uDiffuse, 0.0);
+  extern bool draw_debug_line;
+  if ( draw_debug_line )
+    debug_outline_sw(static_sub_437906_array_50CDD0, pFace->uNumVertices, uDiffuse, 0.0);
 }
 // 50D9D0: using guessed type char static_sub_437906_byte_50D9D0_init_flag;
 
--- a/Player.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/Player.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -7547,15 +7547,20 @@
               goto _play_sound;
             case VAR_Sex:
               Dst->uSex = (PLAYER_SEX)val;
-              goto _play_anim_and_exit;
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              goto _play_sound;
             case VAR_Class:
               Dst->classType = (PLAYER_CLASS_TYPE)val;
-              goto _play_anim_and_exit;
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              goto _play_sound;
             case VAR_CurrentHP:
               v8 = &Dst->sHealth;
               *v8 += val;
               if ( Dst->sHealth <= Dst->GetMaxHealth() )
-                goto _play_anim_and_exit;
+              {
+                pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+                goto _play_sound;
+              }
               v9 = v4->GetMaxHealth();
               goto LABEL_23;
             case VAR_MaxHP:
@@ -7573,7 +7578,8 @@
 LABEL_23:
                 *v8 = v9;
               }
-              goto _play_anim_and_exit;
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              goto _play_sound;
             case VAR_MaxSP:
               v11 = GetMaxMana();
               v4->_mana_related = 0;
@@ -7592,7 +7598,8 @@
               *v12 += val;
               if ( *v12 > 255 )
                 *v12 = 255;
-              goto _play_anim_and_exit;
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              goto _play_sound;
             case VAR_Age:
               Dst->sAgeModifier += val;
               return;
@@ -7608,14 +7615,25 @@
                 v14->PlaySound(SPEECH_96, 0);
               }
               v15 = (char *)v4->_achieved_awards_bits;
-              goto LABEL_44;
+              _449B7E_toggle_bit((unsigned char *)v15, val, 1);
+              if ( v34 != 1 )
+              {
+                if ( v3 != 1 )
+                  return;
+                goto _play_sound;
+              }
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              if ( v3 != 1 )
+                return;
+              goto _play_sound;
             case VAR_Experience:
               v16 = __CFADD__(val, LODWORD(Dst->uExperience));
               LODWORD(Dst->uExperience) += val;
               HIDWORD(Dst->uExperience) += ((unsigned __int64)val >> 32) + v16;
               if ( (signed __int64)Dst->uExperience > 4000000000i64 )
                 Dst->uExperience = 4000000000i64;
-              goto _play_anim_and_exit;
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              goto _play_sound;
             case VAR_QBits_QuestsDone:
               if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_quest_bits[((signed __int16)val - 1) >> 3])
                 //&& (&dword_722F10)[4 * val] )
@@ -7628,9 +7646,17 @@
                 pPlayers[uPlayerIdx + 1]->PlaySound(SPEECH_93, 0);
               }
               v15 = (char *)pParty->_quest_bits;
-LABEL_44:
-              _449B7E_toggle_bit((unsigned char *)v15, val, 1u);
-              goto LABEL_173;
+              _449B7E_toggle_bit((unsigned char *)v15, val, 1);
+              if ( v34 != 1 )
+              {
+                if ( v3 != 1 )
+                  return;
+                goto _play_sound;
+              }
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              if ( v3 != 1 )
+                return;
+              goto _play_sound;
             case VAR_PlayerItemInHands:
               item.Reset();
               item.Reset();
@@ -7762,9 +7788,9 @@
               *v18 += val;
               if ( *v18 > 255 )
                 *v18 = 255;
-              v31 = 0;
-              v29 = 92;
-              goto LABEL_116;
+              pPlayers[uPlayerIdx + 1]->PlaySound(SPEECH_92, 0);
+              pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+              goto _play_sound;
             default:
               return;
           }
@@ -7777,10 +7803,9 @@
           *v19 = 255;
         v31 = 0;
         v29 = SPEECH_91;
-LABEL_116:
-        v3 = 1;
         pPlayers[uPlayerIdx + 1]->PlaySound((PlayerSpeech)v29, v31);
-        goto _play_anim_and_maybe_sound;
+        pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+        goto _play_sound;
       }
       if ( var_type <= VAR_DisarmTrapSkill )
       {
@@ -7850,7 +7875,8 @@
           LOBYTE(v21) = v21 & 0xC0;
           *(short *)v20 = v22 | v21;
         }
-        goto _play_anim_and_exit;
+        pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+        goto _play_sound;
       }
       if ( var_type <= VAR_LearningSkill )
         return;
@@ -7873,13 +7899,7 @@
         }
         memset(Dst, 0, 0xA0u);
       }
-_play_anim_and_exit:
-      v3 = 1;
-_play_anim_and_maybe_sound:
       pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
-_maybe_play_sound:
-      if ( v3 != 1 )
-        return;
       goto _play_sound;
     }
     if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_autonote_bits[((signed __int16)val - 1) >> 3])
@@ -7895,17 +7915,32 @@
     }
     _449B7E_toggle_bit(pParty->_autonote_bits, val, 1);
     v3 = 1;
-LABEL_173:
     if ( v34 != 1 )
-      goto _maybe_play_sound;
-    goto _play_anim_and_maybe_sound;
+    {
+      if ( v3 != 1 )
+        return;
+      goto _play_sound;
+    }
+    pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+    if ( v3 != 1 )
+      return;
+    goto _play_sound;
   }
   if ( var_type > VAR_GoldInBank )
   {
     if ( var_type == 307 )
     {
       pParty->uNumDeaths += val;
-      goto LABEL_173;
+      if ( v34 != 1 )
+      {
+        if ( v3 != 1 )
+          return;
+        goto _play_sound;
+      }
+      pGame->pStru6Instance->SetPlayerBuffAnim(0x97u, uPlayerIdx);
+      if ( v3 != 1 )
+        return;
+      goto _play_sound;
     }
     switch ( var_type )
     {
--- a/UI/UICharacter.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/UI/UICharacter.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -2012,43 +2012,43 @@
   //First column(Первая колонка)
   pY = 53;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[144],
-          UI_GetHealthManaStringColor(player->GetActualMight(), player->GetBaseStrength()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualMight(), player->GetBaseStrength()),
           player->GetActualMight(), player->GetBaseStrength());//Might
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[116],
-          UI_GetHealthManaStringColor(player->GetActualIntelligence(), player->GetBaseIntelligence()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualIntelligence(), player->GetBaseIntelligence()),
           player->GetActualIntelligence(), player->GetBaseIntelligence());//Intellect
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[163],
-          UI_GetHealthManaStringColor(player->GetActualWillpower(), player->GetBaseWillpower()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualWillpower(), player->GetBaseWillpower()),
           player->GetActualWillpower(), player->GetBaseWillpower());//
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[75],
-          UI_GetHealthManaStringColor(player->GetActualEndurance(), player->GetBaseEndurance()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualEndurance(), player->GetBaseEndurance()),
           player->GetActualEndurance(), player->GetBaseEndurance());//
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[1],
-          UI_GetHealthManaStringColor(player->GetActualAccuracy(), player->GetBaseAccuracy()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAccuracy(), player->GetBaseAccuracy()),
           player->GetActualAccuracy(), player->GetBaseAccuracy());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n", pGlobalTXT_LocalizationStrings[211],
-          UI_GetHealthManaStringColor(player->GetActualSpeed(), player->GetBaseSpeed()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualSpeed(), player->GetBaseSpeed()),
           player->GetActualSpeed(), player->GetBaseSpeed());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[136],
-          UI_GetHealthManaStringColor(player->GetActualLuck(), player->GetBaseLuck()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualLuck(), player->GetBaseLuck()),
           player->GetActualLuck(), player->GetBaseLuck());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2057,7 +2057,7 @@
     a2 = "%s\f%05u\r388%d\f00000 / %d\n";
   pY += 2 * LOBYTE(pFontArrus->uFontHeight) + 5;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[108],
-          UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->sHealth, player->GetMaxHealth()),
           player->sHealth, player->GetMaxHealth());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2066,13 +2066,13 @@
     a2 = "%s\f%05u\r388%d\f00000 / %d\n";
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[212],
-          UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->sMana, player->GetMaxMana()),
           player->sMana, player->GetMaxMana());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), "%s\f%05u\r424%d\f00000 /\t185%d\n\n", pGlobalTXT_LocalizationStrings[12],
-          UI_GetHealthManaStringColor(player->GetActualAC(), player->GetBaseAC()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAC(), player->GetBaseAC()),
           player->GetActualAC(), player->GetBaseAC());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 26, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2091,7 +2091,7 @@
   //Second column (Вторая колонка)
   pY = 50;
   sprintf(pTmpBuf.data(), "%s\f%05u\t100%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[5],
-          UI_GetHealthManaStringColor(player->GetActualAge(), player->GetBaseAge()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAge(), player->GetBaseAge()),
           player->GetActualAge(), player->GetBaseAge());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2100,7 +2100,7 @@
     a2 = "%s\f%05u\t180%d\f00000 / %d\n";
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[131],//Уров.
-          UI_GetHealthManaStringColor(player->GetActualLevel(), player->GetBaseLevel()),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualLevel(), player->GetBaseLevel()),
           player->GetActualLevel(), player->GetBaseLevel());
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2132,7 +2132,7 @@
     a2 = "%s\f%05u\t180%d\f00000 / %d\n";
   pY += 2 * LOBYTE(pFontArrus->uFontHeight) - 4;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[87],
-          UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE)),
           player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE));
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2141,7 +2141,7 @@
     a2 = "%s\f%05u\t180%d\f00000 / %d\n";
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[6],
-          UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR)),
           player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_AIR));
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2150,7 +2150,7 @@
     a2 = "%s\f%05u\t180%d\f00000 / %d\n";
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[240],
-          UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER)),
           player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_WATER));
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2159,7 +2159,7 @@
     a2 = "%s\f%05u\t180%d\f00000 / %d\n";
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[70],
-          UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH)),
           player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH));
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
@@ -2168,11 +2168,11 @@
     a2 = "%s\f%05u\t180%d\f00000 / %d\n";
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[142],
-          UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND)),
           player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND));
   if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_MIND) == 200 )
     sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[142],
-         UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), 200), pGlobalTXT_LocalizationStrings[625]);
+         UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND), 200), pGlobalTXT_LocalizationStrings[625]);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 
   a2 = format_4E2E10;
@@ -2180,11 +2180,11 @@
     a2 = "%s\f%05u\t180%d\f00000 / %d\n";
   pY += LOBYTE(pFontArrus->uFontHeight) - 2;
   sprintf(pTmpBuf.data(), a2, pGlobalTXT_LocalizationStrings[29],
-          UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)),
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY)),
           player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY));
   if ( player->classType == PLAYER_CLASS_LICH && player->GetBaseResistance(CHARACTER_ATTRIBUTE_RESIST_BODY) == 200 )
     sprintf(pTmpBuf.data(), format_4E2E00, pGlobalTXT_LocalizationStrings[29],
-          UI_GetHealthManaStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), 200), pGlobalTXT_LocalizationStrings[625]);
+          UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY), 200), pGlobalTXT_LocalizationStrings[625]);
   pGUIWindow_CurrentMenu->DrawText(pFontArrus, 266, pY, 0, pTmpBuf.data(), 0, 0, 0);
 }
 
--- a/UI/UiGame.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/UI/UiGame.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -816,12 +816,12 @@
   strcat(pTmpBuf.data(), pTmpBuf2.data());
   strcat(pTmpBuf.data(), "\f00000\n");
 
-  pTextColor = UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth());
+  pTextColor = UI_GetHealthManaAndOtherQualitiesStringColor(player->sHealth, player->GetMaxHealth());
   sprintfex(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[108], // "Hit Points"
             pTextColor, player->sHealth, player->GetMaxHealth());
   strcat(pTmpBuf.data(), pTmpBuf2.data());
 
-  pTextColor = UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana());
+  pTextColor = UI_GetHealthManaAndOtherQualitiesStringColor(player->sMana, player->GetMaxMana());
   sprintfex(pTmpBuf2.data(), "%s : \f%05u%d\f00000 / %d\n", pGlobalTXT_LocalizationStrings[212], // "Spell Points"
             pTextColor, player->sMana, player->GetMaxMana());
   strcat(pTmpBuf.data(), pTmpBuf2.data());
@@ -894,19 +894,19 @@
     if ( i == 0 )
       pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 22, pY, 0, pGlobalTXT_LocalizationStrings[107], 60, 0);//Здор.
     sprintf(pTmpBuf.data(), "%d", player->sHealth);
-    pTextColor = UI_GetHealthManaStringColor(player->sHealth, player->GetMaxHealth());
+    pTextColor = UI_GetHealthManaAndOtherQualitiesStringColor(player->sHealth, player->GetMaxHealth());
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, pX, pY, pTextColor, pTmpBuf.data(), 84, 0);
     pY = pFontHeight + pY;
     if ( i == 0 )
       pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 22, pY, 0, pGlobalTXT_LocalizationStrings[209], 60, 0);//Мана
     sprintf(pTmpBuf.data(), "%d", player->sMana);
-    pTextColor = UI_GetHealthManaStringColor(player->sMana, player->GetMaxMana());
+    pTextColor = UI_GetHealthManaAndOtherQualitiesStringColor(player->sMana, player->GetMaxMana());
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, pX, pY, pTextColor, pTmpBuf.data(), 84, 0);
     pY = pFontHeight + pY;
     if ( i == 0 )
       pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, 22, pY, 0, pGlobalTXT_LocalizationStrings[0], 60, 0);//Класс брони
     sprintf(pTmpBuf.data(), "%d", player->GetActualAC());
-    pTextColor = UI_GetHealthManaStringColor(player->GetActualAC(), player->GetBaseAC());
+    pTextColor = UI_GetHealthManaAndOtherQualitiesStringColor(player->GetActualAC(), player->GetBaseAC());
     pGUIWindow_CurrentMenu->DrawTextInRect(pFontArrus, pX, pY, pTextColor, pTmpBuf.data(), 84, 0);
     pY = pFontHeight + pY;
     if ( !i )
@@ -1978,60 +1978,36 @@
 void GameUI_DrawMinimap(unsigned int uX, unsigned int uY, unsigned int uZ, unsigned int uW, unsigned int uZoom, unsigned int bRedrawOdmMinimap)
 {
   int uHeight; // ebx@6
-  __int16 v11; // cx@11
   unsigned int v14; // ebx@23
   int v15; // eax@23
   __int16 v17; // di@30
-  double v18; // st7@30
-  float v19; // ST38_4@30
   double v20; // st7@30
-  double v21; // st6@30
-  double v22; // st5@33
   signed int v27; // eax@37
   unsigned __int16 *v28; // ecx@37
   signed int v29; // edi@40
-  int v37; // edi@72
-  int v38; // ebx@72
-  __int16 v39; // ax@87
-  int v40; // edi@91
-  int v41; // ebx@91
-  unsigned int v42; // eax@101
-  unsigned int v43; // ebx@101
-  unsigned int v44; // ST30_4@101
-  char *v45; // ebx@106
-  int v46; // edi@108
-  int v47; // eax@108
-  unsigned int v48; // ebx@114
-  unsigned int v49; // ST64_4@114
-  unsigned int v52; // [sp-10h] [bp-64h]@100
-  unsigned int v54; // [sp-Ch] [bp-60h]@100
-  unsigned int v56; // [sp-8h] [bp-5Ch]@100
-  unsigned __int16 v59; // [sp-4h] [bp-58h]@100
+  int pObject_X; // edi@72
+  int pObject_Y; // ebx@72
+  int pActor_X; // edi@91
+  int pActor_Y; // ebx@91
+  int pDecoration_X; // edi@108
+  int pDecoration_Y; // eax@108
   unsigned int lPitch; // [sp+20h] [bp-34h]@1
   unsigned int lPitcha; // [sp+20h] [bp-34h]@23
-  char *lPitchb; // [sp+20h] [bp-34h]@106
   unsigned int v69; // [sp+24h] [bp-30h]@23
   signed int v70; // [sp+24h] [bp-30h]@37
   signed int uBluea; // [sp+28h] [bp-2Ch]@37
   int v73; // [sp+2Ch] [bp-28h]@30
-  int v76; // [sp+34h] [bp-20h]@91
-  int v77; // [sp+34h] [bp-20h]@108
   signed int uCenterY; // [sp+48h] [bp-Ch]@1
   signed int uCenterX; // [sp+4Ch] [bp-8h]@1
   signed int uWidth; // [sp+5Ch] [bp+8h]@30
-  signed int uZf; // [sp+5Ch] [bp+8h]@85
-  signed int uZg; // [sp+5Ch] [bp+8h]@105
   unsigned int uWa; // [sp+60h] [bp+Ch]@23
   float uWb; // [sp+60h] [bp+Ch]@30
   unsigned int uWd; // [sp+60h] [bp+Ch]@95
-  float uZooma; // [sp+64h] [bp+10h]@117
-  Actor *flagsc; // [sp+68h] [bp+14h]@86
+  unsigned int pColor;
 
   uCenterX = (uX + uZ) / 2;
   uCenterY = (uY + uW) / 2;
   lPitch = pRenderer->uTargetSurfacePitch;
-  //TargetColor(0, 0, 0);
-  //uBlue = TargetColor(0, 0, 0xFFu);
   auto bWizardEyeActive = pParty->WizardEyeActive();
   auto uWizardEyeSkillLevel = pParty->WizardEyeSkillLevel();
   if ( CheckHiredNPCSpeciality(Cartographer) )
@@ -2049,43 +2025,34 @@
   uHeight = uW - uY;
   uWidth = uZ - uX;
 
-  if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
+  if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
   {
     v17 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2;
     auto pMapLod0 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask;
     auto pPal = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16;
     v73 = (1 << (v17 + 16)) / (signed int)uZoom;
-    v18 = (double)(1 << (16 - v17));
-    v19 = v18;
-    v20 = (double)(pParty->vPosition.x + 32768) / v18;
-    v21 = (double)(32768 - pParty->vPosition.y) / v19;
-    uWb = v21;
+    v20 = (double)(pParty->vPosition.x + 32768) / (double)(1 << (16 - v17));
+    uWb = (double)(32768 - pParty->vPosition.y) / (double)(1 << (16 - v17));
     switch (uZoom)
     {
       case 512:
       {
         v20 = v20 - (double)(uWidth / 2);
-        v22 = (double)(uHeight / 2);
-        uWb = v21 - v22;
+        uWb = uWb - (double)(uHeight / 2);
       }
       break;
-
       case 1024:
       {
         v20 = v20 - (double)(uWidth / 4);
-        v22 = (double)(uHeight / 4);
-        uWb = v21 - v22;
+        uWb = uWb - (double)(uHeight / 4);
       }
       break;
-
       case 2048:
       {
         v20 = v20 - (double)(uWidth / 8);
-        v22 = (double)(uHeight / 8);
-        uWb = v21 - v22;
+        uWb = uWb - (double)(uHeight / 8);
       }
       break;
-
       default: assert(false);
     }
     assert(sizeof(pOdmMinimap) == 137 * 117 * sizeof(short));
@@ -2099,25 +2066,23 @@
       assert(uWidth == 137 && uHeight == 117);
       //auto pMinimap = (unsigned __int16 *)pOdmMinimap;
 
-        auto mapWidth = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
-
-          v29 = v70 >> 16;
+      auto mapWidth = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
 
-          for (int y = 0; y < uHeight; ++y)
-          {
-              auto pMapLod0Line = &pMapLod0[v27 * mapWidth];
-              for (int x = 0; x < uWidth; ++x)
-              {
-                //*pMinimap++ = pPal[pMapLod0Line[v29]];
-                pOdmMinimap[y][x] = pPal[pMapLod0Line[v29]];
-                v29 = (v70 + x * v73) >> 16;
-              }
-
-            v29 = v70 >> 16;
-            v28 += 137 - uWidth;
-            uBluea += v73;
-            v27 = uBluea >> 16;
-          }
+      v29 = v70 >> 16;
+      for (int y = 0; y < uHeight; ++y)
+      {
+        auto pMapLod0Line = &pMapLod0[v27 * mapWidth];
+        for (int x = 0; x < uWidth; ++x)
+        {
+          //*pMinimap++ = pPal[pMapLod0Line[v29]];
+          pOdmMinimap[y][x] = pPal[pMapLod0Line[v29]];
+          v29 = (v70 + x * v73) >> 16;
+        }
+        v29 = v70 >> 16;
+        v28 += 137 - uWidth;
+        uBluea += v73;
+        v27 = uBluea >> 16;
+      }
     }
 
     for (int y = 0; y < 117; ++y)
@@ -2130,7 +2095,7 @@
     }
     uNumBlueFacesInBLVMinimap = 0;
   }
-  else
+  else// uCurrentlyLoadedLevelType == LEVEL_Indoor
   {
     pRenderer->FillRectFast(uX, uY, uZ - uX, uHeight, 0xF);
     uNumBlueFacesInBLVMinimap = 0;
@@ -2138,77 +2103,62 @@
     for (uint i = 0; i < pIndoor->pMapOutlines->uNumOutlines; ++i)
     {
       auto pOutline = &pIndoor->pMapOutlines->pOutlines[i];
-
       auto pFace1 = pIndoor->pFaces + pOutline->uFace1ID;
       auto pFace2 = pIndoor->pFaces + pOutline->uFace2ID;
       //v9 = pIndoor->pFaces[pMapVertex->uFace1ID].uAttributes;
         //v10 = pIndoor->pFaces[pMapVertex->uFace2ID].uAttributes;
       if (pFace1->Visible() && pFace2->Visible())
       {
-        v11 = pOutline->uFlags;
-        if ( v11 & 1 )
+        //v11 = pOutline->uFlags;
+        if ( pOutline->uFlags & 1 )
           goto LABEL_15;
         if (pFace1->uAttributes & 0x80 || pFace2->uAttributes & 0x80)
           goto LABEL_ABC;
-
       }
       continue;
 
 LABEL_ABC:
-    pOutline->uFlags = v11 | 1;
-    pIndoor->_visible_outlines[i >> 3] |= 1 << (7 - i % 8);
+      pOutline->uFlags = pOutline->uFlags | 1;
+      pIndoor->_visible_outlines[i >> 3] |= 1 << (7 - i % 8);
 
 LABEL_15:
-    //v12 = &pIndoor->pFaces[pOutline->uFace1ID];
-    if (bWizardEyeActive && uWizardEyeSkillLevel >= 3 &&
-        (pFace1->uAttributes & 0x2000 || pFace2->uAttributes & 0x2000) &&
-        (pIndoor->pFaceExtras[pFace1->uFaceExtraID].uEventID || pIndoor->pFaceExtras[pFace2->uFaceExtraID].uEventID))
-    {
-      if (uNumBlueFacesInBLVMinimap < 49)
-        pBlueFacesInBLVMinimapIDs[uNumBlueFacesInBLVMinimap++] = i;
+      //v12 = &pIndoor->pFaces[pOutline->uFace1ID];
+      if (bWizardEyeActive && uWizardEyeSkillLevel >= 3 &&
+          (pFace1->uAttributes & 0x2000 || pFace2->uAttributes & 0x2000) &&
+          (pIndoor->pFaceExtras[pFace1->uFaceExtraID].uEventID || pIndoor->pFaceExtras[pFace2->uFaceExtraID].uEventID))
+      {
+        if (uNumBlueFacesInBLVMinimap < 49)
+          pBlueFacesInBLVMinimapIDs[uNumBlueFacesInBLVMinimap++] = i;
+      }
+      else
+      {
+        auto _a = (uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x);
+        auto _b = ((unsigned int)((unsigned __int64)_a >> 16) << 16);
+        auto _c = ((signed int)(_b - uZoom * pParty->vPosition.x) >> 16);
+        //v69 =     uCenterX + _c;
+        v69 =     uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16);
+        lPitcha = uCenterY - ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16);
+        uWa =     uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16);
+        v14 =     uCenterY - ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16);
+        v15 = abs(pOutline->sZ - pParty->vPosition.z) / 8;
+        if ( v15 > 100 )
+          v15 = 100;
+        pRenderer->RasterLine2D(v69, lPitcha, uWa, v14, viewparams->pPalette[-v15 + 200]);
+      }
     }
-    else
+
+    for (uint i = 0; i < uNumBlueFacesInBLVMinimap; ++i)
     {
-      auto _a = (uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x);
-      auto _b = ((unsigned int)((unsigned __int64)_a >> 16) << 16);
-      auto _c = ((signed int)(_b - uZoom * pParty->vPosition.x) >> 16);
-      v69 =     uCenterX + _c;
-      v69 =     uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16);
-      lPitcha = uCenterY - ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16);
-      uWa =     uCenterX + ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16);
-      v14 =     uCenterY - ((signed int)(((unsigned int)((unsigned __int64)(uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16);
-      v15 = abs(pOutline->sZ - pParty->vPosition.z) / 8;
-      if ( v15 > 100 )
-        v15 = 100;
-      pRenderer->RasterLine2D(v69, lPitcha, uWa, v14, viewparams->pPalette[-v15 + 200]);
+      //v16 = (uint *)&pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[uZb]];
+      auto pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]];
+      pRenderer->RasterLine2D(uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16),
+                 uCenterY - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16),
+                 uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16) - uZoom * pParty->vPosition.x) >> 16),
+                 uCenterY - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16) - uZoom * pParty->vPosition.y) >> 16),
+                 ui_game_minimap_outline_color);
     }
   }
 
-
-  for (uint i = 0; i < uNumBlueFacesInBLVMinimap; ++i)
-  {
-    //v16 = (uint *)&pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[uZb]];
-    auto pOutline = &pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[i]];
-    pRenderer->RasterLine2D(uCenterX + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
-                                                     * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].x) >> 16) << 16)
-                  - uZoom * pParty->vPosition.x) >> 16),
-      uCenterY
-    - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
-                                                     * (signed __int64)pIndoor->pVertices[pOutline->uVertex1ID].y) >> 16) << 16)
-                  - uZoom * pParty->vPosition.y) >> 16),
-      uCenterX
-    + ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
-                                                     * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].x) >> 16) << 16)
-                  - uZoom * pParty->vPosition.x) >> 16),
-      uCenterY
-    - ((signed int)(((unsigned int)((unsigned __int64)((signed int)uZoom
-                                                     * (signed __int64)pIndoor->pVertices[pOutline->uVertex2ID].y) >> 16) << 16)
-                  - uZoom * pParty->vPosition.y) >> 16),
-      ui_game_minimap_outline_color);
-  }
-  }
-
-
   assert(pParty->sRotationY >= 0);
   float angle = (pParty->sRotationY % 2048) / 2048.0f;
   const float two_pi = 2.0f * 3.14159f;
@@ -2216,172 +2166,95 @@
   uint arrow_idx = floorf(0.5f + 7 * angle);
   pRenderer->DrawTextureTransparent(uCenterX - 3, uCenterY - 3, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[arrow_idx]));
 
-  //flagsb = TargetColor(0, 0, 255);
-  //v60 = TargetColor(255, 0, 0);
-  if (bWizardEyeActive)
+  if ( bWizardEyeActive )
   {
-    //uZe = 0;
-    if (uWizardEyeSkillLevel >= 2)
-      for (uint i = 0; i < uNumSpriteObjects; ++i)
-    //if (uNumSpriteObjects > 0)
-      {
-        auto object = &pSpriteObjects[i];
-
-      //a2c = (char *)&pSpriteObjects[0].uObjectDescID;
-      //while ( 1 )
-      //{
-      if (!object->uType || !object->uObjectDescID)
-        continue;
-      //if (uWizardEyeSkillLevel == 1
-      v37 = uCenterX + ((unsigned __int64)((object->vPosition.x - pParty->vPosition.x) * (signed __int64)uZoom) >> 16);
-      //v79 = (unsigned __int64)((object->vPosition.y - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16;
-      //v38 = uCenterY - v79;
-      v38 = uCenterY - ((signed __int64)((object->vPosition.y - pParty->vPosition.y) * (signed __int64)uZoom) >> 16);
-      if (v37 < pRenderer->raster_clip_x || v37 > pRenderer->raster_clip_z ||
-          v38 < pRenderer->raster_clip_y || v38 > pRenderer->raster_clip_w)
-        continue;
-
-      assert(uZoom >= 512);
-      if (pObjectList->pObjects[object->uObjectDescID].uFlags & OBJECT_DESC_UNPICKABLE)
-      {
-        pRenderer->RasterLine2D(v37, v38, v37, v38, ui_game_minimap_projectile_color);
-      }
-      else if (uZoom > 512)
+    if ( uWizardEyeSkillLevel >= 2 )
+    {
+      for ( uint i = 0; i < uNumSpriteObjects; ++i )
       {
-        pRenderer->RasterLine2D(v37 - 1, v38 - 1, v37 - 1, v38 + 1, ui_game_minimap_treasure_color);
-        pRenderer->RasterLine2D(v37, v38 - 2, v37, v38 + 1, ui_game_minimap_treasure_color);
-        pRenderer->RasterLine2D(v37 + 1, v38 - 1, v37 + 1, v38 + 1, ui_game_minimap_treasure_color);
-        pRenderer->RasterLine2D(v37 - 2, v38, v37 - 2, v38 + 1, ui_game_minimap_treasure_color);
-        pRenderer->RasterLine2D(v37 + 2, v38,
-                                v37 + 2, v38 + 1, ui_game_minimap_treasure_color);
-      }
-      else
-      {
-        pRenderer->RasterLine2D(v37 - 1, v38 - 1,
-                                v37 - 1, v38, ui_game_minimap_treasure_color);
-        pRenderer->RasterLine2D(v37, v38 - 1,
-                                v37, v38, ui_game_minimap_treasure_color);
-      }
-//LABEL_82:
-//LABEL_83:
-        //++uZe;
-        //a2c += 112;
-        //if ( uZe >= (signed int)uNumSpriteObjects )
-        //{
-          //goto LABEL_85;
-        //}
-      //}
-    }
-
-
-LABEL_85:
-    //v63 = TargetColor(255, 0, 0);
-    //v61 = TargetColor(0, 255, 0);
-    //v65 = TargetColor(255, 255, 0);
-    uZf = 0;
-    if ( (signed int)uNumActors > 0 )
-    {
-      flagsc = pActors.data();//[0].uAIState;
-      do
-      {
-		v39 = flagsc->uAIState;
-		if ( flagsc->uAIState != 11 && v39 != 19 && (v39 == 5 || BYTE1(flagsc->uAttributes) & 0x80) )
+        if ( !pSpriteObjects[i].uType || !pSpriteObjects[i].uObjectDescID )
+          continue;
+        //if (uWizardEyeSkillLevel == 1
+        pObject_X = uCenterX + ((unsigned __int64)((pSpriteObjects[i].vPosition.x - pParty->vPosition.x) * (signed __int64)uZoom) >> 16);
+        pObject_Y = uCenterY - ((signed __int64)((pSpriteObjects[i].vPosition.y - pParty->vPosition.y) * (signed __int64)uZoom) >> 16);
+        if ( pObject_X >= pRenderer->raster_clip_x && pObject_X <= pRenderer->raster_clip_z &&
+             pObject_Y >= pRenderer->raster_clip_y && pObject_Y <= pRenderer->raster_clip_w)
         {
-		  v40 = ((unsigned __int64)(( flagsc->vPosition.x - pParty->vPosition.x)
-                                  * (signed __int64)(signed int)uZoom) >> 16)
-              + uCenterX;
-          v76 = (unsigned __int64)(( flagsc->vPosition.y - pParty->vPosition.y)
-                                 * (signed __int64)(signed int)uZoom) >> 16;
-          v41 = uCenterY - v76;
-          if ( v40 >= pRenderer->raster_clip_x )
+          if (pObjectList->pObjects[pSpriteObjects[i].uObjectDescID].uFlags & OBJECT_DESC_UNPICKABLE)
           {
-            if ( v40 <= pRenderer->raster_clip_z && v41 >= pRenderer->raster_clip_y && v41 <= pRenderer->raster_clip_w )
-            {
-              uWd = ui_game_minimap_actor_friendly_color;
-			  if ( BYTE3(flagsc->uAttributes) & 1 )
-                uWd = ui_game_minimap_actor_hostile_color;
-              if ( flagsc->uAIState == Dead)
-                uWd = ui_game_minimap_actor_corpse_color;
-              if ( (signed int)uZoom > 1024 )
-              {
-                pRenderer->RasterLine2D(v40 - 1, v41 - 2, v40 - 1, v41 + 2, uWd);
-                pRenderer->RasterLine2D(v40, v41 - 2, v40, v41 + 2, uWd);
-                pRenderer->RasterLine2D(v40 + 1, v41 - 2, v40 + 1, v41 + 2, uWd);
-                v42 = v41 + 1;
-                v43 = v41 - 1;
-                v44 = v42;
-                pRenderer->RasterLine2D(v40 - 2, v43, v40 - 2, v42, uWd);
-                v40 += 2;
-                v59 = uWd;
-                v56 = v44;
-                v54 = v40;
-                v52 = v43;
-              }
-              else
-              {
-                pRenderer->RasterLine2D(v40 - 1, v41 - 1, v40 - 1, uCenterY - v76, uWd);
-                v59 = uWd;
-                v56 = uCenterY - v76;
-                v54 = v40;
-                v52 = v41 - 1;
-              }
-              pRenderer->RasterLine2D(v40, v52, v54, v56, v59);
-            }
+            pRenderer->RasterLine2D(pObject_X, pObject_Y, pObject_X, pObject_Y, ui_game_minimap_projectile_color);
           }
-        }
-        ++uZf;
-        ++flagsc;
-      }
-      while ( uZf < (signed int)uNumActors );
-    }
-  }
-
-
-  //flagsd = TargetColor(255, 255, 255);
-  uZg = 0;
-  if ( (signed int)uNumLevelDecorations > 0 )
-  {
-    v45 = (char *)&pLevelDecorations[0].vPosition;
-    lPitchb = (char *)&pLevelDecorations[0].vPosition;
-    do
-    {
-      if ( *(v45 - 2) & 8 )
-      {
-        v46 = ((unsigned __int64)((*(int *)v45 - pParty->vPosition.x) * (signed __int64)(signed int)uZoom) >> 16)
-            + uCenterX;
-        v77 = (unsigned __int64)((*((int *)v45 + 1) - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16;
-        v47 = uCenterY - v77;
-        if ( v46 >= pRenderer->raster_clip_x )
-        {
-          if ( v46 <= pRenderer->raster_clip_z && v47 >= pRenderer->raster_clip_y && v47 <= pRenderer->raster_clip_w )
+          else if ( uZoom > 512 )
           {
-            if ( (signed int)uZoom > 512 )
-            {
-              v48 = v47 + 1;
-              v49 = v47 - 1;
-              pRenderer->RasterLine2D(v46 - 1, v47 - 1, v46 - 1, v47 + 1, ui_game_minimap_decoration_color_1);
-              pRenderer->RasterLine2D(v46, v49, v46, v48, ui_game_minimap_decoration_color_1);
-              pRenderer->RasterLine2D(v46 + 1, v49, v46 + 1, v48, ui_game_minimap_decoration_color_1);
-              v45 = lPitchb;
-            }
-            else
-            {
-              pRenderer->RasterLine2D(v46, uCenterY - v77, v46, uCenterY - v77, ui_game_minimap_decoration_color_1);
-            }
+            pRenderer->RasterLine2D(pObject_X - 2, pObject_Y,     pObject_X - 2, pObject_Y + 1, ui_game_minimap_treasure_color);
+            pRenderer->RasterLine2D(pObject_X - 1, pObject_Y - 1, pObject_X - 1, pObject_Y + 1, ui_game_minimap_treasure_color);
+            pRenderer->RasterLine2D(pObject_X,     pObject_Y - 2, pObject_X,     pObject_Y + 1, ui_game_minimap_treasure_color);
+            pRenderer->RasterLine2D(pObject_X + 1, pObject_Y - 1, pObject_X + 1, pObject_Y + 1, ui_game_minimap_treasure_color);
+            pRenderer->RasterLine2D(pObject_X + 2, pObject_Y,     pObject_X + 2, pObject_Y + 1, ui_game_minimap_treasure_color);
+          }
+          else
+          {
+            pRenderer->RasterLine2D(pObject_X - 1, pObject_Y - 1, pObject_X - 1, pObject_Y, ui_game_minimap_treasure_color);
+            pRenderer->RasterLine2D(pObject_X,     pObject_Y - 1, pObject_X,     pObject_Y, ui_game_minimap_treasure_color);
           }
         }
       }
-      ++uZg;
-      v45 += 32;
-      lPitchb = v45;
     }
-    while ( uZg < (signed int)uNumLevelDecorations );
+    for ( uint i = 0; i < uNumActors; ++i )//draw actors(отрисовка монстров и нпс)
+    {
+      if ( pActors[i].uAIState != Removed && pActors[i].uAIState != Disabled
+       && (pActors[i].uAIState == Dead || BYTE1(pActors[i].uAttributes) & 0x80) )
+      {
+        pActor_X = uCenterX + ((unsigned __int64)(( pActors[i].vPosition.x - pParty->vPosition.x) * (signed __int64)(signed int)uZoom) >> 16);
+        pActor_Y = uCenterY - ((unsigned __int64)(( pActors[i].vPosition.y - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16);
+        if ( pActor_X >= pRenderer->raster_clip_x && pActor_X <= pRenderer->raster_clip_z
+          && pActor_Y >= pRenderer->raster_clip_y && pActor_Y <= pRenderer->raster_clip_w )
+        {
+          pColor = ui_game_minimap_actor_friendly_color;
+          if ( BYTE3(pActors[i].uAttributes) & 1 )
+            pColor = ui_game_minimap_actor_hostile_color;
+          if ( pActors[i].uAIState == Dead)
+            pColor = ui_game_minimap_actor_corpse_color;
+          if ( uZoom > 1024 )
+          {
+            pRenderer->RasterLine2D(pActor_X - 2, pActor_Y - 1, pActor_X - 2, pActor_Y + 1, pColor);
+            pRenderer->RasterLine2D(pActor_X - 1, pActor_Y - 2, pActor_X - 1, pActor_Y + 2, pColor);
+            pRenderer->RasterLine2D(pActor_X,     pActor_Y - 2, pActor_X,     pActor_Y + 2, pColor);
+            pRenderer->RasterLine2D(pActor_X + 1, pActor_Y - 2, pActor_X + 1, pActor_Y + 2, pColor);
+            pRenderer->RasterLine2D(pActor_X + 2, pActor_Y - 1, pActor_X + 2, pActor_Y + 1, pColor);
+          }
+          else
+          {
+            pRenderer->RasterLine2D(pActor_X - 1, pActor_Y - 1, pActor_X - 1, pActor_Y, pColor);
+            pRenderer->RasterLine2D(pActor_X,     pActor_Y - 1, pActor_X,     pActor_Y, pColor);
+          }
+        }
+      }
+    }
+    for ( uint i = 0; i < (signed int)uNumLevelDecorations; ++i )//draw items(отрисовка предметов)
+    {
+      if ( pLevelDecorations[i].uFlags & 8 )
+      {
+        pDecoration_X = uCenterX + ((unsigned __int64)((pLevelDecorations[i].vPosition.x - pParty->vPosition.x) * (signed __int64)(signed int)uZoom) >> 16);
+        pDecoration_Y = uCenterY - ((unsigned __int64)((pLevelDecorations[i].vPosition.y - pParty->vPosition.y) * (signed __int64)(signed int)uZoom) >> 16);
+        if ( pDecoration_X >= pRenderer->raster_clip_x && pDecoration_X <= pRenderer->raster_clip_z
+          && pDecoration_Y >= pRenderer->raster_clip_y && pDecoration_Y <= pRenderer->raster_clip_w )
+        {
+          if ( (signed int)uZoom > 512 )
+          {
+            pRenderer->RasterLine2D(pDecoration_X - 1, pDecoration_Y - 1, pDecoration_X - 1, pDecoration_Y + 1, ui_game_minimap_decoration_color_1);
+            pRenderer->RasterLine2D(pDecoration_X,     pDecoration_Y - 1, pDecoration_X,     pDecoration_Y + 1, ui_game_minimap_decoration_color_1);
+            pRenderer->RasterLine2D(pDecoration_X + 1, pDecoration_Y - 1, pDecoration_X + 1, pDecoration_Y + 1, ui_game_minimap_decoration_color_1);
+          }
+          else
+            pRenderer->RasterLine2D(pDecoration_X, pDecoration_Y, pDecoration_X, pDecoration_Y, ui_game_minimap_decoration_color_1);
+        }
+      }
+    }
   }
-  pRenderer->DrawTextureTransparent(0x1D4u, 0, pIcons_LOD->GetTexture(dword_5079D8));
-  uZooma = (double)pParty->sRotationY * 0.1171875;
-  //v50 = uZooma + 6.7553994e15;
+  pRenderer->DrawTextureTransparent(468, 0, pIcons_LOD->GetTexture(uTextureID_Minimap_Loop));//draw minimap_loop
   pRenderer->SetTextureClipRect(541, 0, 567, 480);
-  pRenderer->DrawTextureIndexed(floorf(uZooma + 0.5f) + 285, 136, pIcons_LOD->GetTexture(dword_5079B4));
+  pRenderer->DrawTextureIndexed(floorf(((double)pParty->sRotationY * 0.1171875) + 0.5f) + 285, 136, pIcons_LOD->GetTexture(uTextureID_Compas));//draw compas
   pRenderer->ResetTextureClipRect();
 }
 
@@ -2445,7 +2318,6 @@
       }
     }
 
-    //v6 = (unsigned __int8)pParty->field_709;
     for ( int i = (unsigned __int8)pParty->field_709; i < v22 && pNPC_limit_ID < 2; i++ )
     {
       if ( (unsigned __int8)pTmpBuf[i] >= 2 )
@@ -2482,37 +2354,22 @@
 // 6BE3C5: using guessed type char bNoNPCHiring;
 
 //----- (004178FE) --------------------------------------------------------
-unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2)
+unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(signed int current_pos, signed int base_pos)
 {
-  unsigned __int16 v2; // dx@2
-  unsigned __int16 v3; // cx@2
-  int v5; // eax@5
-  unsigned __int16 v6; // [sp-4h] [bp-8h]@2
+  unsigned __int16 R, G, B;
 
-  if ( a1 <= a2 )
+  if ( current_pos <= base_pos )
   {
-    if ( a1 == a2 )
+    if ( current_pos == base_pos )//White
       return 0;
-    v5 = 100 * a1 / a2;
-    v3 = 255;
-    if ( v5 >= 25 )
-    {
-      v6 = 100;
-      v2 = 255;
-    }
-    else
-    {
-      v6 = 0;
-      v2 = 0;
-    }
+    if ( 100 * current_pos / base_pos >= 25 )//Yellow( current_pos > 1/4 )
+      R = 255, G = 255, B = 100;
+    else//Red( current_pos < 1/4 )
+      R = 255, G = 0, B = 0;
   }
-  else
-  {
-    v6 = 0;
-    v2 = 255;
-    v3 = 0;
-  }
-  return TargetColor(v3, v2, v6);
+  else//Green
+    R = 0, G = 255, B = 0;
+  return TargetColor(R, G, B);
 }
 
 //----- (00417939) --------------------------------------------------------
--- a/Vis.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/Vis.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -664,7 +664,9 @@
   if ( v16 != 1 )
     return false;
 
-  pFace->uAttributes |= FACE_PICKED;
+  extern bool show_picked_face;
+  if ( show_picked_face )
+    pFace->uAttributes |= FACE_PICKED;
   return true;
 /*
   int v5; // esi@10
--- a/mm7_1.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/mm7_1.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -175,8 +175,8 @@
         pTexture_LeftFrame->Reload("ib-l-C.pcx");
         pTexture_StatusBar->Reload("IB-Foot-c.pcx");
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-C", 2);
-        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D8], "ib-autmask-c", 2);
-        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079B4], "IB-COMP-C", 2);
+        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-c", 2);
+        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-C", 2);
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-c", 2);
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-c", 2);
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-c", 2);
@@ -222,8 +222,8 @@
         pTexture_LeftFrame->Load("ib-l-C.pcx", 0);
         pTexture_StatusBar->Load("IB-Foot-c.pcx", 0);
         uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-C", TEXTURE_16BIT_PALETTE);
-        dword_5079D8 = pIcons_LOD->LoadTexture("ib-autmask-c", TEXTURE_16BIT_PALETTE);
-        dword_5079B4 = pIcons_LOD->LoadTexture("IB-COMP-C", TEXTURE_16BIT_PALETTE);
+        uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-c", TEXTURE_16BIT_PALETTE);
+        uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-C", TEXTURE_16BIT_PALETTE);
         dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-c", TEXTURE_16BIT_PALETTE);
         dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-c", TEXTURE_16BIT_PALETTE);
         dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-c", TEXTURE_16BIT_PALETTE);
@@ -263,8 +263,8 @@
         pTexture_LeftFrame->Reload("ib-l-a.pcx");
         pTexture_StatusBar->Reload("IB-Foot-a.pcx");
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-a", 2);
-        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D8], "ib-autmask-a", 2);
-        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079B4], "IB-COMP-a", 2);
+        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-a", 2);
+        pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-a", 2);
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-a", 2);
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-a", 2);
         pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-a", 2);
@@ -307,8 +307,8 @@
         pTexture_LeftFrame->Load("ib-l-A.pcx", 0);
         pTexture_StatusBar->Load("IB-Foot-a.pcx", 0);
         uTextureID_right_panel = pIcons_LOD->LoadTexture("ib-mb-A", TEXTURE_16BIT_PALETTE);
-        dword_5079D8 = pIcons_LOD->LoadTexture("ib-autmask-a", TEXTURE_16BIT_PALETTE);
-        dword_5079B4 = pIcons_LOD->LoadTexture("IB-COMP-A", TEXTURE_16BIT_PALETTE);
+        uTextureID_Minimap_Loop = pIcons_LOD->LoadTexture("ib-autmask-a", TEXTURE_16BIT_PALETTE);
+        uTextureID_Compas = pIcons_LOD->LoadTexture("IB-COMP-A", TEXTURE_16BIT_PALETTE);
         dword_5079D0 = pIcons_LOD->LoadTexture("IB-InitG-a", TEXTURE_16BIT_PALETTE);
         dword_5079C8 = pIcons_LOD->LoadTexture("IB-InitY-a", TEXTURE_16BIT_PALETTE);
         dword_5079CC = pIcons_LOD->LoadTexture("IB-InitR-a", TEXTURE_16BIT_PALETTE);
@@ -359,8 +359,8 @@
       pTexture_LeftFrame->Reload("ib-l-B.pcx");
       pTexture_StatusBar->Reload("IB-Foot-b.pcx");
       pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_right_panel], "ib-mb-B", 2);
-      pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D8], "ib-autmask-b", 2);
-      pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079B4], "IB-COMP-B", 2);
+      pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Minimap_Loop], "ib-autmask-b", 2);
+      pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[uTextureID_Compas], "IB-COMP-B", 2);
       pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079D0], "IB-InitG-b", 2);
       pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079C8], "IB-InitY-b", 2);
       pIcons_LOD->ReloadTexture(&pIcons_LOD->pTextures[dword_5079CC], "IB-InitR-b", 2);
--- a/mm7_2.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/mm7_2.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -5289,6 +5289,9 @@
 bool change_seasons = false;
 bool all_magic = true;
 bool wizard_eye = true;
+bool debug_information = false;
+bool show_picked_face = false;
+bool draw_debug_line = false;
 
 //----- (00462C94) --------------------------------------------------------
 bool MM_Main(const wchar_t *pCmdLine)
--- a/mm7_data.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/mm7_data.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -942,11 +942,11 @@
 int uTextureID_PlayerBuff_Preservation; // weak
 int uTextureID_PlayerBuff_Bless; // weak
 int uTextureID_Btn_QuickReference; // weak
-int dword_5079B4; // weak
+int uTextureID_Compas; // dword_5079B4
 int dword_5079C8; // weak
 int dword_5079CC; // weak
 int dword_5079D0; // weak
-int dword_5079D8; // weak
+int uTextureID_Minimap_Loop; // dword_5079D8
 struct GUIButton *pBtn_ZoomOut; // idb
 struct GUIButton *pBtn_ZoomIn; // idb
 unsigned int uGameUIFontShadow;
--- a/mm7_data.h	Mon Sep 02 12:03:40 2013 +0600
+++ b/mm7_data.h	Mon Sep 02 17:30:50 2013 +0600
@@ -584,11 +584,11 @@
 extern int uTextureID_PlayerBuff_Preservation; // weak
 extern int uTextureID_PlayerBuff_Bless; // weak
 extern int uTextureID_Btn_QuickReference; // weak
-extern int dword_5079B4; // weak
+extern int uTextureID_Compas; // dword_5079B4
 extern int dword_5079C8; // weak
 extern int dword_5079CC; // weak
 extern int dword_5079D0; // weak
-extern int dword_5079D8; // weak
+extern int uTextureID_Minimap_Loop; // dword_5079D8
 extern struct GUIButton *pBtn_ZoomOut; // idb
 extern struct GUIButton *pBtn_ZoomIn; // idb
 extern unsigned int uGameUIFontShadow;
@@ -1100,7 +1100,7 @@
 void identify_item();
 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(struct Vec2_int_ *_this);
 void UI_OnMouseLeftClick(int *pXY); // idb
-unsigned int __fastcall UI_GetHealthManaStringColor(signed int a1, signed int a2);
+unsigned int UI_GetHealthManaAndOtherQualitiesStringColor(signed int current_pos, signed int base_pos);
 unsigned int __fastcall GetSizeInInventorySlots(unsigned int uNumPixels);
 struct GUIButton *__fastcall GUI_HandleHotkey(unsigned __int8 uHotkey); // idb
 int __fastcall GUI_ReplaceHotkey(unsigned __int8 uOldHotkey, unsigned __int8 uNewHotkey, char bFirstCall);
--- a/stru10.cpp	Mon Sep 02 12:03:40 2013 +0600
+++ b/stru10.cpp	Mon Sep 02 17:30:50 2013 +0600
@@ -682,19 +682,23 @@
     //if ( byte_4D864C && pGame->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS)
     //{
       RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
-      if (!bDoNotDrawPortalFrustum)
+      extern bool draw_debug_line;
+      if ( draw_debug_line )
       {
-        v26.vWorldPosition.x = pParty->vPosition.x;
-        v26.vWorldPosition.y = pParty->vPosition.y;
-        v26.vWorldPosition.z = pParty->vPosition.z + pParty->sEyelevel;             // frustum
+        if (!bDoNotDrawPortalFrustum)
+        {
+          v26.vWorldPosition.x = pParty->vPosition.x;
+          v26.vWorldPosition.y = pParty->vPosition.y;
+          v26.vWorldPosition.z = pParty->vPosition.z + pParty->sEyelevel;             // frustum
 
-        pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF0000u, &pOutBounding[0], 0xFF0000u, 0, 0);
-        pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF00u, &pOutBounding[1], 0xFF00u, 0, 0);
-        pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFu, &pOutBounding[2], 0xFFu, 0, 0);
-        pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFFFFFu, &pOutBounding[3], 0xFFFFFFu, 0, 0);
-        bDoNotDrawPortalFrustum = true;
+          pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF0000u, &pOutBounding[0], 0xFF0000u, 0, 0);
+          pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF00u, &pOutBounding[1], 0xFF00u, 0, 0);
+          pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFu, &pOutBounding[2], 0xFFu, 0, 0);
+          pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFFFFFu, &pOutBounding[3], 0xFFFFFFu, 0, 0);
+          bDoNotDrawPortalFrustum = true;
+        }
+        pGame->pIndoorCameraD3D->debug_outline_sw(pOutBounding, uNumVertices, 0x1EFF1Eu, 0.00019999999);    // bounding
       }
-      pGame->pIndoorCameraD3D->debug_outline_sw(pOutBounding, uNumVertices, 0x1EFF1Eu, 0.00019999999);    // bounding
     //}
 
     //pGame->pIndoorCameraD3D->debug_outline_sw(pFaceLimits,  4, 0xFFF14040, 0.000099999997);     // limits
@@ -725,7 +729,9 @@
         v26.vWorldPosition.y = face_center_y + a1.y * 400.0f;
         v26.vWorldPosition.z = face_center_z + a1.z * 400.0f;
 
-        pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, 0xFFFFFFFFu, &v26, 0xFFFF00u, 0, 0);
+        extern bool draw_debug_line;
+        if ( draw_debug_line )
+          pGame->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, 0xFFFFFFFFu, &v26, 0xFFFF00u, 0, 0);
       }
   //}