Mercurial > mm7
diff mm7_3.cpp @ 1225:42b41aaecd87
Слияние
author | Ritor1 |
---|---|
date | Wed, 05 Jun 2013 21:00:45 +0600 |
parents | 15ad868d972f |
children | 0dbf6c4dd029 |
line wrap: on
line diff
--- a/mm7_3.cpp Wed Jun 05 21:00:11 2013 +0600 +++ b/mm7_3.cpp Wed Jun 05 21:00:45 2013 +0600 @@ -1,3 +1,7 @@ +#ifdef _MSC_VER +#define _CRT_SECURE_NO_WARNINGS +#endif + #include <assert.h> @@ -1206,13 +1210,13 @@ Actor::AI_FaceObject(v75, v38, 0, (AIDirection *)0); break; } - //v52 = HIDWORD(pParty->pPartyBuffs[11].uExpireTime) == 0; - //v53 = SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) < 0; + //v52 = HIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) == 0; + //v53 = SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) < 0; v0->vVelocity.y = 0; v0->vVelocity.x = 0; - //if ( !v53 && (!(v53 | v52) || LODWORD(pParty->pPartyBuffs[11].uExpireTime) > 0) ) - if ( (signed __int64)pParty->pPartyBuffs[11].uExpireTime < 0) - pParty->pPartyBuffs[11].Reset(); + //if ( !v53 && (!(v53 | v52) || LODWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) > 0) ) + if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime < 0) + pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); viewparams->bRedrawGameUI = 1; break; case OBJECT_Decoration: @@ -1914,9 +1918,9 @@ auto v87 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16) + new_party_z; if ( PID_TYPE(stru_721530.uFaceID) == OBJECT_Actor) { - if ( SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) >= 0 - && (SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[11].uExpireTime)) ) - pParty->pPartyBuffs[11].Reset(); + if ( SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) >= 0 + && (SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime)) ) + pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); viewparams->bRedrawGameUI = 1; goto LABEL_152; } @@ -2275,10 +2279,10 @@ { //LOBYTE(pParty->uFlags) &= 0x7Fu; bWaterWalk = 1; - *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; + *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 119] |= 1u; if (!(pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags & 1) && pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster-1].sMana <= 0 ) - //*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 ) + //*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster + 10] <= 0 ) bWaterWalk = 0; } v3 = ODM_GetFloorLevel(pX, pY, pZ, pParty->uPartyHeight, &v130, &v108, bWaterWalk); @@ -2331,8 +2335,8 @@ else pParty->walk_sound_timer = 0; } if (!bUnderwater - && SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) <= 0 - && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) < 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime) <= 0) ) + && SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime) <= 0 + && (SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime) < 0 || LODWORD(pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime) <= 0) ) pParty->bFlying = false; if (!bJumping) { @@ -2420,8 +2424,8 @@ { pParty->bFlying = 0; if ( bUnderwater - || pParty->pPartyBuffs[7].uFlags & 1 - || pParty->pPlayers[pParty->pPartyBuffs[7].uCaster - 1].sMana > 0 )//*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[7].uCaster + 10] > 0 ) + || pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags & 1 + || pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].sMana > 0 )//*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster + 10] > 0 ) { pZ -= 30; v113 -= 30; @@ -2667,7 +2671,7 @@ if ( v127 ) pZ = v113; if (pParty->FlyActive()) - stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu; + stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] &= 0xFEu; pParty->uFallStartY = pZ; //goto LABEL_141; } @@ -2680,7 +2684,7 @@ pParty->uFallStartY = v111; v113 = pZ; if (pParty->FlyActive()) - stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u; + stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1u; } } @@ -2688,7 +2692,7 @@ { v113 = pZ; if (pParty->FlyActive()) - stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u; + stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1u; } //LABEL_141: if (bJumping && !pParty->bFlying) @@ -3207,9 +3211,9 @@ if ( bWaterWalk ) { pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER; - //v79 = 20 * pParty->pPartyBuffs[18].uOverlayID + 6180178; - //*(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; - v79 = (int)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119]; + //v79 = 20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 6180178; + //*(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 119] |= 1u; + v79 = (int)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 119]; *(short *)v79 |= 1u; if ( !v122 || !v69 ) { @@ -5584,9 +5588,9 @@ wchar_t xn_filename[1024], xp_filename[1024], yn_filename[1024], yp_filename[1024], zn_filename[1024], zp_filename[1024]; - swprintf(xn_filename, L"%s_xn.tga", skybox_name); swprintf(xp_filename, L"%s_xp.tga", skybox_name); - swprintf(yn_filename, L"%s_yn.tga", skybox_name); swprintf(yp_filename, L"%s_yp.tga", skybox_name); - swprintf(zn_filename, L"%s_zn.tga", skybox_name); swprintf(zp_filename, L"%s_zp.tga", skybox_name); + swprintf(xn_filename, wcslen(L"%s_xn.tga"), L"%s_xn.tga", skybox_name); swprintf(xp_filename, wcslen(L"%s_xp.tga"), L"%s_xp.tga", skybox_name); + swprintf(yn_filename, wcslen(L"%s_yn.tga"), L"%s_yn.tga", skybox_name); swprintf(yp_filename, wcslen(L"%s_yp.tga"), L"%s_yp.tga", skybox_name); + swprintf(zn_filename, wcslen(L"%s_zn.tga"), L"%s_zn.tga", skybox_name); swprintf(zp_filename, wcslen(L"%s_zp.tga"), L"%s_zp.tga", skybox_name); int xn_width, xn_height; skybox_xn = LoadTgaTexture(xn_filename, &xn_width, &xn_height); @@ -6812,8 +6816,8 @@ if (pWeather->bNight) { v8 = 67108864; - if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime > 0 ) - v8 = pParty->pPartyBuffs[16].uPower << 26; + if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0 ) + v8 = pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uPower << 26; if ( a3 <= v8 ) { if ( a3 > 0 ) @@ -6981,12 +6985,12 @@ } else { - if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime > 0 ) - { - if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime <= 0 ) + if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0 ) + { + if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime <= 0 ) v11 = 0; else - v11 = pParty->pPartyBuffs[16].uPower; + v11 = pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uPower; } v12 = v11 << 26; } @@ -13085,7 +13089,7 @@ pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u); pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u); v39 = (signed __int64)((double)(v42 << 7) * 0.033333335); - v37 = &pParty->pPartyBuffs[2]; + v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS]; v36 = pParty->uTimePlayed + v39; v37->Apply(v36, a7b, v43, 0, 0); goto LABEL_139; @@ -13099,7 +13103,7 @@ pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u); pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u); v39 = (signed __int64)((double)(v42 << 7) * 0.033333335); - v37 = &pParty->pPartyBuffs[2]; + v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS]; v36 = pParty->uTimePlayed + v39; v37->Apply(v36, a7b, v43, 0, 0); goto LABEL_139; @@ -13112,7 +13116,7 @@ pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u); pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u); v39 = (signed __int64)((double)(v42 << 7) * 0.033333335); - v37 = &pParty->pPartyBuffs[2]; + v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS]; v36 = pParty->uTimePlayed + v39; v37->Apply(v36, a7b, v43, 0, 0); goto LABEL_139; @@ -13562,7 +13566,7 @@ v48 = uSkill; v46 = v15; v39 = (signed __int64)((double)(v38 << 7) * 0.033333335); - v37 = &pParty->pPartyBuffs[10]; + v37 = &pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION]; v36 = pParty->uTimePlayed + v39; v37->Apply(v36, v46, v48, v50, v52); goto LABEL_139; @@ -13893,8 +13897,8 @@ } //----- (0044C175) -------------------------------------------------------- -void __fastcall ShowStatusBarString(const char *pString, unsigned int uNumSeconds) -{ +void ShowStatusBarString( const char *pString, unsigned int uNumSeconds ) + { unsigned int v2; // esi@1 int i; // eax@1