Mercurial > might-and-magic-trilogy
diff Game.cpp @ 205:6d982dfab925
8.01.13
author | Ritor1 |
---|---|
date | Tue, 08 Jan 2013 17:29:13 +0600 |
parents | 22730e77fa32 |
children | c38d2f00e3ad |
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 );