changeset 176:15ba5f459761

Слияние
author Ritor1
date Fri, 14 Dec 2012 17:43:01 +0600
parents 9b5df6cc45a4 (current diff) 1e09ffc4b458 (diff)
children b1f67710227f
files mm7_5.cpp
diffstat 1 files changed, 54 insertions(+), 94 deletions(-) [+]
line wrap: on
line diff
--- a/mm7_5.cpp	Wed Dec 12 20:11:41 2012 +0600
+++ b/mm7_5.cpp	Fri Dec 14 17:43:01 2012 +0600
@@ -15863,7 +15863,6 @@
         else
           v10 = pX - 414;
         pWindow.uFrameX = v10;
-        //goto LABEL_42;
 		pWindow.DrawMessageBox(0);
         goto LABEL_132;
       }
@@ -15891,7 +15890,6 @@
 LABEL_119:
           if ( (signed int)pX > 467 && pCurrentScreen != 14 )
           {
-//LABEL_126:
             identify_item();
             goto LABEL_132;
           }
@@ -15908,11 +15906,9 @@
             goto LABEL_132;
           }
           v11 = pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103;//2DEvent - CharacerScreenInventory
-//LABEL_125:
           if ( !v11 )
             goto LABEL_132;
-          //goto LABEL_126;
-		  identify_item();
+ 		  identify_item();
           goto LABEL_132;
         }
         if ( !dword_506364
@@ -15928,7 +15924,6 @@
         pWindow.uFrameWidth = LODWORD(v27);
         pWindow.uFrameX = pX + 5;
         pWindow.uFrameY = pY + 5;
-        //goto LABEL_41;
 		pWindow.uFrameHeight = 64;
         pAudioPlayer->StopChannels(-1, -1);
         pWindow.DrawMessageBox(0);
@@ -15986,10 +15981,8 @@
         pWindow.uFrameWidth = 256;
         pWindow.uFrameX = 130;
         pWindow.uFrameY = 140;
-//LABEL_41:
         pWindow.uFrameHeight = 64;
         pAudioPlayer->StopChannels(-1, -1);
-//LABEL_42:
         pWindow.DrawMessageBox(0);
         goto LABEL_132;
       }
@@ -16046,7 +16039,6 @@
   if ( pCurrentScreen != 21 )
   {
     v11 = pCurrentScreen == 23;
-    //goto LABEL_125;
     if ( !v11 )
       goto LABEL_132;
     identify_item();
@@ -16059,101 +16051,69 @@
   v13 = pY;
   //pStr = v29;
   pStr = 0;
-  while ( 1 )
-  {
-    if ( pButton->uButtonType != 1 && pButton->uButtonType != 3 || (signed int)pX < (signed int)pButton->uX || (signed int)pX > (signed int)pButton->uZ
-      || (signed int)v13 < (signed int)pButton->uY || (signed int)v13 > (signed int)pButton->uW )
-      goto LABEL_117;
-    pControlID = pButton->uControlID;
-    if ( pControlID <= 65 )
-    {
-      if ( pControlID == 65 )
-      {
-        pWindow.Hint = pClassDescriptions[pButton->uControlParam];
-        pStr = pClassNames[pButton->uControlParam];
-      }
-      else
-      {
-        if ( pControlID )
-        {
-          v16 = pControlID - 62;
-          if ( v16 )
-          {
-            v17 = v16 - 1;
-            if ( v17 )
-            {
-              if ( v17 == 1 )
-              {
-                v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->uControlParam + 4);
-                pStr = pSkillNames[v18];
-                pWindow.Hint = pSkillDesc[v18];
-                v13 = pY;
-              }
-              goto LABEL_117;
-            }
-            pStr = pGlobalTXT_LocalizationStrings[668];//
-            pStr2 = pGlobalTXT_LocalizationStrings[669];//"    ,     "
-          }
-          else
-          {
-            pStr = pGlobalTXT_LocalizationStrings[670];//
-            pStr2 = pGlobalTXT_LocalizationStrings[671];//"    ,     "
-          }
-          //goto LABEL_116;
-		  pWindow.Hint = pStr2;
-		  goto LABEL_117;
-        }
-        pWindow.Hint = pAttributeDescriptions[(signed int)pButton->uControlParam % 7];
-        pStr = aAttributeNames[(signed int)pButton->uControlParam % 7];
-      }
-      goto LABEL_117;
-    }
-    if ( pControlID == 66 )
-    {
+  for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext)
+  {
+    if ( pButton->uButtonType == 1 && pButton->uButtonType != 3 && (signed int)pX > (signed int)pButton->uX && (signed int)pX < (signed int)pButton->uZ
+      && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW )
+    {
+     pControlID = pButton->uControlID;
+     switch (pControlID)
+	 {
+	 case 0: //stats info
+      pWindow.Hint = pAttributeDescriptions[(signed int)pButton->uControlParam % 7];
+      pStr = aAttributeNames[(signed int)pButton->uControlParam % 7];
+      break;
+	 case 62: //Plus button info 
+      pStr = pGlobalTXT_LocalizationStrings[670];//
+      pStr2 = pGlobalTXT_LocalizationStrings[671];//"    ,     "
+	  pWindow.Hint = pStr2;
+	  break;
+	 case 63: //Minus button info
+      pStr = pGlobalTXT_LocalizationStrings[668];//
+      pStr2 = pGlobalTXT_LocalizationStrings[669];//"    ,     "
+	  pWindow.Hint = pStr2;
+	  break;
+	 case 64: //Available skill button info
+      v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->uControlParam + 4);
+      pStr = pSkillNames[v18];
+      pWindow.Hint = pSkillDesc[v18];
+      v13 = pY;
+	  break;
+	 case 65: //Available Class Info
+      pWindow.Hint = pClassDescriptions[pButton->uControlParam];
+      pStr = pClassNames[pButton->uControlParam];
+	  break;
+     case 66: //OK Info
       pStr2 = pGlobalTXT_LocalizationStrings[664];//        .
       pStr = pGlobalTXT_LocalizationStrings[665];// 
-      //goto LABEL_116;
 	  pWindow.Hint = pStr2;
-      goto LABEL_117;
-    }
-    if ( pControlID == 67 )
-    {
+      break;
+	 case 67: //Clear info
       pStr2 = pGlobalTXT_LocalizationStrings[666];//     .
       pStr = pGlobalTXT_LocalizationStrings[667];// 
-      //goto LABEL_116;
 	  pWindow.Hint = pStr2;
-      goto LABEL_117;
-    }
-    if ( pControlID > 71 )
       break;
-LABEL_117:
-    pButton = pButton->pNext;
-    if ( !pButton )
-      goto LABEL_112;
-  }
-  if ( pControlID > 75 )
-  {
-    if ( pControlID == 118 )
-    {
+	 case 118: // Character info
       v20 = pButton->uControlParam;
       pStr = pParty->pPlayers[v20].pName;
       pStr2 = pClassDescriptions[pParty->pPlayers[v20].uClass];
-//LABEL_116:
       pWindow.Hint = pStr2;
-      goto LABEL_117;
-    }
-    goto LABEL_117;
-  }
-  v21 = pParty->pPlayers[pButton->uControlParam].GetSkillIdxByOrder(pControlID - 72);
-  v13 = v21;
-  pY = v21;
-  if ( (v21 & 0x80000000u) != 0 || (signed int)v21 >= 37 )
-    goto LABEL_117;
-  v22 = CharacterUI_GetSkillDescText(pButton->uControlParam, (enum PLAYER_SKILL_TYPE)v21);
-  strcpy(pTmpBuf2, v22);
-  pWindow.Hint = pTmpBuf2;
-  pStr = pSkillNames[pY];
-LABEL_112:
+      break;
+     }
+     if ( pControlID > 68 && pControlID <= 75 ) //Sellected skills info
+     {
+      v21 = pParty->pPlayers[pButton->uControlParam].GetSkillIdxByOrder(pControlID - 72);
+      pY = v21;
+      if ( (v21 & 0x80000000u) == 0 || (signed int)v21 < 37 )
+      {
+	   v22 = CharacterUI_GetSkillDescText(pButton->uControlParam, (enum PLAYER_SKILL_TYPE)v21);
+       strcpy(pTmpBuf2, v22);
+       pWindow.Hint = pTmpBuf2;
+       pStr = pSkillNames[pY];
+	  }
+     }
+	}
+  }
   v23 = pWindow.Hint;
   if ( pWindow.Hint )
   {
@@ -16174,7 +16134,7 @@
     pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
     pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
     v25 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0x9B);
-    sprintf(pTmpBuf, format_4E2D80, v25, pStr);
+    sprintf(pTmpBuf, pStr, v25, format_4E2D80);//sprintfex   -   sprintfex(pTmpBuf, format_4E2D80, v25, pStr)
     pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf, 3);
     pWindow.DrawText(pFontSmallnum, 1, LOBYTE(pFontLucida->uFontHeight), 0, v23, 0, 0, 0);
   }