changeset 205:6d982dfab925

8.01.13
author Ritor1
date Tue, 08 Jan 2013 17:29:13 +0600
parents 22730e77fa32
children c38d2f00e3ad
files Game.cpp Party.cpp mm7_4.cpp
diffstat 3 files changed, 81 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/Game.cpp	Mon Jan 07 14:16:50 2013 +0600
+++ b/Game.cpp	Tue Jan 08 17:29:13 2013 +0600
@@ -150,8 +150,8 @@
   pOtherOverlayList->field_3EC = 0;
   viewparams->bRedrawGameUI = v5;
   GameUI_DrawPartySpells();
-  if (v4 || pParty->pHirelings[0].evtc || pParty->pHirelings[1].evtc ) //Ritor1: it's temporarily
-    DrawHiredNPCs();
+  if (v4 || pParty->pHirelings[0].evtc || pParty->pHirelings[1].evtc ) 
+    //DrawHiredNPCs();//Ritor1: it's temporarily
   GameUI_DrawPortraits(v4);
   GameUI_DrawLifeManaBars();
   GameUI_DrawCharacterSelectionFrame();
@@ -191,16 +191,16 @@
   //signed int v1; // esi@4
   //Render *v2; // edi@7
   //signed int v3; // esi@7
-  signed int v4; // ecx@58
-  char *v5; // eax@59
+  signed int pNewNPCsCount; // ecx@58
+  char *pFlags; // eax@59
   Player *pPlayer; // esi@65
   OtherOverlay *pOtherOverlay; // esi@67
   signed int v8; // edi@67
-  int v9; // edi@69
+  int pPlayerNum; // edi@69
   int *pHealth; // esi@71
   signed int v11; // esi@78
   int v12; // eax@83
-  const char *v13; // [sp-4h] [bp-68h]@74
+  const char *pLocationName; // [sp-4h] [bp-68h]@74
   bool bLoading; // [sp+10h] [bp-54h]@1
   signed int bLoadinga; // [sp+10h] [bp-54h]@19
   signed int v16; // [sp+14h] [bp-50h]@8
@@ -275,7 +275,7 @@
       if ( pArcomageGame->bGameInProgress )
       {
         ArcomageGame::Loop();
-LABEL_89:
+//LABEL_89:
         pRenderer->Present();
         continue;
       }
@@ -326,7 +326,11 @@
       }
       //pAudioPlayer->_4AAFCF();Ritor1: it's temporarily
       if (uGameState == 1)
-        goto LABEL_96;
+        //goto LABEL_96;
+	  {
+		bLoadinga = 1;
+        continue;
+	  }
       if (uGameState == 2)
       {
         pAudioPlayer->StopChannels(-1, -1);
@@ -335,10 +339,12 @@
         continue;
       }
       if ( (signed int)uGameState <= 2 )
-        goto LABEL_85;
+        //goto LABEL_85;
+		pGame->Draw();
+        continue;
       if ( (signed int)uGameState <= 5 || uGameState == 7 )
       {
-LABEL_96:
+//LABEL_96:
         bLoadinga = 1;
         continue;
       }
@@ -346,30 +352,32 @@
       {
         if ( uGameState != 9 )
         {
-LABEL_85:
+//LABEL_85:
           pGame->Draw();
           continue;
         }
         pRenderer->BeginScene();
         GUI_UpdateWindows();
         pRenderer->EndScene();
-        goto LABEL_89;
+        //goto LABEL_89;
+		pRenderer->Present();
+        continue;
       }
       pAudioPlayer->StopChannels(-1, -1);
       memset(pParty->pHirelings, 0, 0x4Cu);
       memset(&pParty->pHirelings[1], 0, 0x4Cu);
-      v4 = 0;
+      pNewNPCsCount = 0;
       if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
       {
-        v5 = (char *)&pNPCStats->pNewNPCData[0].uFlags;
+        pFlags = (char *)&pNPCStats->pNewNPCData[0].uFlags;
         do
         {
-          if ( *((int *)v5 + 6) )
-            *v5 &= 0x7Fu;
-          ++v4;
-          v5 += 76;
+          if ( *((int *)pFlags + 6) )
+            *pFlags &= 0x7Fu;
+          ++pNewNPCsCount;
+          pFlags += 76;
         }
-        while ( v4 < (signed int)pNPCStats->uNumNewNPCs );
+        while ( pNewNPCsCount < (signed int)pNPCStats->uNumNewNPCs );
       }
       pVideoPlayer->PlayDeathMovie();
       if ( pVideoPlayer->AnyMovieLoaded() )
@@ -397,19 +405,19 @@
       }
       while ( v8 );
       memset(pParty->pPartyBuffs, 0, 0x140u);
-      v9 = 1;
+      pPlayerNum = 1;
       if ( pParty->bTurnBasedModeOn == 1 )
       {
-        pTurnEngine->End(1u);
+        pTurnEngine->End(1);
         pParty->bTurnBasedModeOn = 0;
       }
-      pHealth = &pParty->pPlayers[0].sHealth;
+      pHealth = &pParty->pPlayers[0].sHealth;//193C
       do
       {
-        memset(pHealth - 0x64F, 0, 0xA0u);
-        memset(pHealth - 0x67, 0, 0x180u);
+        memset(pHealth - 0x64F, 0, 0xA0u);//(pConditions, 0, 160)
+        memset(pHealth - 0x67, 0, 0x180u);//(pPlayerBuffs[0], 0, 384)
         *pHealth = 1;
-        pHealth += 1743;
+        pHealth += 1743; //6CF
         uActiveCharacter = 1;
       }
       while ( (signed int)pHealth < (signed int)&pParty->field_871C[567] );
@@ -419,7 +427,7 @@
         pParty->vPosition.y = 12547;
         pParty->vPosition.z = 465;
         pParty->sRotationY = 0;
-        v13 = "out02.odm";
+        pLocationName = "out02.odm";
       }
       else
       {
@@ -427,9 +435,9 @@
         pParty->vPosition.y = 1816;
         pParty->vPosition.z = 0;
         pParty->sRotationY = 512;
-        v13 = "out01.odm";
+        pLocationName = "out01.odm";
       }
-      strcpy(Source, v13);
+      strcpy(Source, pLocationName);
       pParty->uFallStartY = pParty->vPosition.z;
       pParty->sRotationX = 0;
       pParty->uFallSpeed = 0;
@@ -444,23 +452,23 @@
         _5B65B4_npcdata_loword_house_or_other = pParty->sRotationY;
         _5B65B8_npcdata_hiword_house_or_other = pParty->sRotationX;
         dword_5B65C0 = 1;
-        PrepareWorld(1u);
+        PrepareWorld(1);
       }
       InitializeActors();
       v11 = 0;
       do
       {
-        if ( pPlayers[v9]->CanAct() )
-          v17[v11++] = v9;
-        ++v9;
+        if ( pPlayers[pPlayerNum]->CanAct() )
+          v17[v11++] = pPlayerNum;
+        ++pPlayerNum;
       }
-      while ( v9 <= 4 );
+      while ( pPlayerNum <= 4 );
       if ( v11 )
       {
         v12 = rand();
         pPlayers[v17[v12 % v11]]->PlaySound(99, 0);
       }
-      ShowStatusBarString(pGlobalTXT_LocalizationStrings[524], 2u);// "Once again you've cheated death!.."
+      ShowStatusBarString(pGlobalTXT_LocalizationStrings[524], 2u);// "Once again you've cheated death!.." "Вы снова обхитрили смерть! …"
       uGameState = 0;
     }
     while ( !bLoadinga );
--- a/Party.cpp	Mon Jan 07 14:16:50 2013 +0600
+++ b/Party.cpp	Tue Jan 08 17:29:13 2013 +0600
@@ -534,7 +534,7 @@
   //bool v3; // edx@1
   //Player **v4; // eax@1
   //Player *v5; // ecx@1
-  PLAYER_SEX v6; // cl@3
+  PLAYER_SEX pSex; // cl@3
   PLAYER_SEX v7; // al@6
   PLAYER_SEX v8; // al@9
   PLAYER_SEX v9; // cl@12
@@ -580,31 +580,31 @@
     case 3:
     case 8:
     case 9:
-    case 0xCu:
-    case 0xDu:
-    case 0x10u:
-    case 0x11u:
-    case 0x14u:
-    case 0x17u:
+    case 12:
+    case 13:
+    case 16:
+    case 17:
+    case 20:
+    case 23:
     default:
-      v6 = SEX_MALE;
+      pSex = SEX_MALE;
       break;
     case 4:
     case 5:
     case 6:
     case 7:
-    case 0xAu:
-    case 0xBu:
-    case 0xEu:
-    case 0xFu:
-    case 0x12u:
-    case 0x13u:
-    case 0x15u:
-    case 0x18u:
-      v6 = SEX_FEMALE;
+    case 10:
+    case 11:
+    case 14:
+    case 15:
+    case 18:
+    case 19:
+    case 21:
+    case 24:
+      pSex = SEX_FEMALE;
       break;
   }
-  pPlayers[0].uSex = v6;
+  pPlayers[0].uSex = pSex;
   pPlayers[0].RandomizeName();
   strcpy(pPlayers[0].pName, pGlobalTXT_LocalizationStrings[509]);
 
--- a/mm7_4.cpp	Mon Jan 07 14:16:50 2013 +0600
+++ b/mm7_4.cpp	Tue Jan 08 17:29:13 2013 +0600
@@ -3162,9 +3162,9 @@
 //----- (004921C1) --------------------------------------------------------
 void GameUI_DrawPortraits(unsigned int _this)
 {
-  Texture *v4; // eax@10
+  Texture *pFace; // eax@10
   unsigned int v7; // eax@17
-  PlayerFrame *v8; // eax@21
+  PlayerFrame *pFrame; // eax@21
   unsigned int v9; // eax@27
   bool v10; // eax@33
   bool v11; // edi@40
@@ -3172,7 +3172,7 @@
   bool v13; // ecx@46
   int v16; // eax@57
   int v19; // eax@62
-  Texture *v20; // [sp-4h] [bp-1Ch]@27
+  Texture *pPortrait; // [sp-4h] [bp-1Ch]@27
   unsigned int v22; // [sp+14h] [bp-4h]@1
 
   v22 = _this;
@@ -3193,14 +3193,14 @@
 
     if (pPlayer->Eradicated())
     {
-      v4 = pTexture_PlayerFaceEradicated;
+      pFace = pTexture_PlayerFaceEradicated;
 LABEL_27:
-      v20 = v4;
+      pPortrait = pFace;
       v9 = pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i];
       if ( pParty->pPartyBuffs[11].uExpireTime )
-        pRenderer->_4A6E7E(v9, 0x183u, v20);
+        pRenderer->_4A6E7E(v9, 0x183u, pPortrait);
       else
-        pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, v20);
+        pRenderer->DrawTextureTransparent(v9 + 1, 0x184u, pPortrait);
       auto _v1 = 0;
       v10 = pPlayer->pPlayerBuffs[14].uExpireTime > 0;
       if (pPlayer->pPlayerBuffs[1].uExpireTime > 0)
@@ -3214,10 +3214,9 @@
     }
     if (pPlayer->Dead())
     {
-      v4 = pTexture_PlayerFaceDead;
+      pFace = pTexture_PlayerFaceDead;
       goto LABEL_27;
     }
-
       v7 = 0;
       for (uint j = 0; j < pPlayerFrameTable->uNumFrames; ++j)
         if (pPlayerFrameTable->pFrames[j].uSequenceID == pPlayer->uExpressionID)
@@ -3225,26 +3224,21 @@
           v7 = j;
           break;
         }
-
     if ( v7 == 0 )
       v7 = 1;
     if (pPlayer->uExpressionID == 21 )
-      v8 = pPlayerFrameTable->GetFrameBy_y(
-             &pPlayer->field_1AA8,
-             &pPlayer->field_1AA4,
-             pMiscTimer->uTimeElapsed);
+      pFrame = pPlayerFrameTable->GetFrameBy_y(&pPlayer->field_1AA8, &pPlayer->field_1AA4, pMiscTimer->uTimeElapsed);
     else
-      v8 = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed);
-    if (pPlayer->field_1AA2 != v8->uTextureID - 1 || v22 )
-    {
-      pPlayer->field_1AA2 = v8->uTextureID - 1;
-      v4 = (Texture *)pTextures_PlayerFaces[i][v8->uTextureID];
+      pFrame = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed);
+    if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 )
+    {
+      pPlayer->field_1AA2 = pFrame->uTextureID - 1;
+      pFace = (Texture *)pTextures_PlayerFaces[i][pFrame->uTextureID];
       goto LABEL_27;
     }
 LABEL_50:
     ;
   }
-
   if ( pParty->bTurnBasedModeOn == 1 )
   {
     if ( pTurnEngine->field_4 != 1 )
@@ -3271,10 +3265,8 @@
               if ( pParty->uFlags & 0x20 )
                 v16 = dword_5079C8;
             }
-            pRenderer->DrawTextureTransparent(
-              pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[pElem->uPackedID >> 3] - 4,
-              0x181u,
-              (Texture *)(v16 != -1 ? &pIcons_LOD->pTextures[v16] : 0));
+            pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[pElem->uPackedID >> 3] - 4,
+              0x181u, (Texture *)(v16 != -1 ? &pIcons_LOD->pTextures[v16] : 0));
           }
         }
       }
@@ -3297,10 +3289,8 @@
           if ( pParty->uFlags & 0x20 )
             v19 = dword_5079C8;
         }
-        pRenderer->DrawTextureTransparent(
-          pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] - 4,
-          0x181u,
-          (Texture *)(v19 != -1 ? &pIcons_LOD->pTextures[v19] : 0));
+        pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i] - 4,
+          0x181u, (Texture *)(v19 != -1 ? &pIcons_LOD->pTextures[v19] : 0));
       }
     }
   }
@@ -5487,7 +5477,7 @@
           if ( v120 && v126 != v120 )
             strcpy(Str, (const char *)pKeyActionMap->pPressedKeysBuffer);
           pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, Str, 130, 0);
-          *((short *)pPlayer->pName + 3323) = 1;
+          *((short *)pPlayer->pName + 3323) = 1; //
         }
       }
       else
@@ -5715,11 +5705,11 @@
 
   if ( pMessageQueue_50CBD0->uNumMessages )
     pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
-  pAudioPlayer->SetMusicVolume((signed __int64)(pSoundVolumeLevels[(char)uMusicVolimeMultiplier] * 64.0));// ??
+  pAudioPlayer->SetMusicVolume((pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0));
   ++pIcons_LOD->uTexturePacksCount;
   if ( !pIcons_LOD->uNumPrevLoadedFiles )
     pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
-  pCurrentScreen = 21;
+  pCurrentScreen = 21;//окно Создания группы
   uPlayerCreationUI_ArrowAnim = 0;
   uPlayerCreationUI_SkySliderPos = 0;
   uPlayerCreationUI_SelectedCharacter = 0;