comparison mm7_3.cpp @ 1167:15ad868d972f

pPartyBuffs - change plain numbers to enums
author Grumpy7
date Tue, 04 Jun 2013 18:29:35 +0200
parents 29a8defbad9e
children 0dbf6c4dd029
comparison
equal deleted inserted replaced
1166:11cda4934da3 1167:15ad868d972f
1208 { 1208 {
1209 v38 = stru_721530.uFaceID; 1209 v38 = stru_721530.uFaceID;
1210 Actor::AI_FaceObject(v75, v38, 0, (AIDirection *)0); 1210 Actor::AI_FaceObject(v75, v38, 0, (AIDirection *)0);
1211 break; 1211 break;
1212 } 1212 }
1213 //v52 = HIDWORD(pParty->pPartyBuffs[11].uExpireTime) == 0; 1213 //v52 = HIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) == 0;
1214 //v53 = SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) < 0; 1214 //v53 = SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) < 0;
1215 v0->vVelocity.y = 0; 1215 v0->vVelocity.y = 0;
1216 v0->vVelocity.x = 0; 1216 v0->vVelocity.x = 0;
1217 //if ( !v53 && (!(v53 | v52) || LODWORD(pParty->pPartyBuffs[11].uExpireTime) > 0) ) 1217 //if ( !v53 && (!(v53 | v52) || LODWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) > 0) )
1218 if ( (signed __int64)pParty->pPartyBuffs[11].uExpireTime < 0) 1218 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime < 0)
1219 pParty->pPartyBuffs[11].Reset(); 1219 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset();
1220 viewparams->bRedrawGameUI = 1; 1220 viewparams->bRedrawGameUI = 1;
1221 break; 1221 break;
1222 case OBJECT_Decoration: 1222 case OBJECT_Decoration:
1223 v47 = integer_sqrt(v0->vVelocity.x * v0->vVelocity.x + v0->vVelocity.y * v0->vVelocity.y); 1223 v47 = integer_sqrt(v0->vVelocity.x * v0->vVelocity.x + v0->vVelocity.y * v0->vVelocity.y);
1224 v48 = stru_5C6E00->Atan2( 1224 v48 = stru_5C6E00->Atan2(
1916 uSectorID = stru_721530.uSectorID; 1916 uSectorID = stru_721530.uSectorID;
1917 stru_721530.field_70 += stru_721530.field_7C; 1917 stru_721530.field_70 += stru_721530.field_7C;
1918 auto v87 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16) + new_party_z; 1918 auto v87 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.field_58.z) >> 16) + new_party_z;
1919 if ( PID_TYPE(stru_721530.uFaceID) == OBJECT_Actor) 1919 if ( PID_TYPE(stru_721530.uFaceID) == OBJECT_Actor)
1920 { 1920 {
1921 if ( SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) >= 0 1921 if ( SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) >= 0
1922 && (SHIDWORD(pParty->pPartyBuffs[11].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[11].uExpireTime)) ) 1922 && (SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime) > 0 || LODWORD(pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime)) )
1923 pParty->pPartyBuffs[11].Reset(); 1923 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset();
1924 viewparams->bRedrawGameUI = 1; 1924 viewparams->bRedrawGameUI = 1;
1925 goto LABEL_152; 1925 goto LABEL_152;
1926 } 1926 }
1927 if ( PID_TYPE(stru_721530.uFaceID) == OBJECT_Decoration) 1927 if ( PID_TYPE(stru_721530.uFaceID) == OBJECT_Decoration)
1928 { 1928 {
2277 pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER; 2277 pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER;
2278 if (pParty->WaterWalkActive()) 2278 if (pParty->WaterWalkActive())
2279 { 2279 {
2280 //LOBYTE(pParty->uFlags) &= 0x7Fu; 2280 //LOBYTE(pParty->uFlags) &= 0x7Fu;
2281 bWaterWalk = 1; 2281 bWaterWalk = 1;
2282 *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; 2282 *(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 119] |= 1u;
2283 if (!(pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags & 1) && 2283 if (!(pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags & 1) &&
2284 pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster-1].sMana <= 0 ) 2284 pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster-1].sMana <= 0 )
2285 //*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[18].uCaster + 10] <= 0 ) 2285 //*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster + 10] <= 0 )
2286 bWaterWalk = 0; 2286 bWaterWalk = 0;
2287 } 2287 }
2288 v3 = ODM_GetFloorLevel(pX, pY, pZ, pParty->uPartyHeight, &v130, &v108, bWaterWalk); 2288 v3 = ODM_GetFloorLevel(pX, pY, pZ, pParty->uPartyHeight, &v130, &v108, bWaterWalk);
2289 v111 = v3; 2289 v111 = v3;
2290 if ( bFeatherFall ) 2290 if ( bFeatherFall )
2333 if (pParty->walk_sound_timer >= pEventTimer->uTimeElapsed) 2333 if (pParty->walk_sound_timer >= pEventTimer->uTimeElapsed)
2334 pParty->walk_sound_timer -= pEventTimer->uTimeElapsed; 2334 pParty->walk_sound_timer -= pEventTimer->uTimeElapsed;
2335 else pParty->walk_sound_timer = 0; 2335 else pParty->walk_sound_timer = 0;
2336 } 2336 }
2337 if (!bUnderwater 2337 if (!bUnderwater
2338 && SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) <= 0 2338 && SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime) <= 0
2339 && (SHIDWORD(pParty->pPartyBuffs[7].uExpireTime) < 0 || LODWORD(pParty->pPartyBuffs[7].uExpireTime) <= 0) ) 2339 && (SHIDWORD(pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime) < 0 || LODWORD(pParty->pPartyBuffs[PARTY_BUFF_FLY].uExpireTime) <= 0) )
2340 pParty->bFlying = false; 2340 pParty->bFlying = false;
2341 if (!bJumping) 2341 if (!bJumping)
2342 { 2342 {
2343 if ( pParty->floor_face_pid != PID(OBJECT_BModel, v108) ) 2343 if ( pParty->floor_face_pid != PID(OBJECT_BModel, v108) )
2344 { 2344 {
2422 case PARTY_FlyDown: 2422 case PARTY_FlyDown:
2423 if (pParty->FlyActive() || bUnderwater) 2423 if (pParty->FlyActive() || bUnderwater)
2424 { 2424 {
2425 pParty->bFlying = 0; 2425 pParty->bFlying = 0;
2426 if ( bUnderwater 2426 if ( bUnderwater
2427 || pParty->pPartyBuffs[7].uFlags & 1 2427 || pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags & 1
2428 || pParty->pPlayers[pParty->pPartyBuffs[7].uCaster - 1].sMana > 0 )//*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[7].uCaster + 10] > 0 ) 2428 || pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].sMana > 0 )//*(int *)&pParty->pArtifactsFound[6972 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster + 10] > 0 )
2429 { 2429 {
2430 pZ -= 30; 2430 pZ -= 30;
2431 v113 -= 30; 2431 v113 -= 30;
2432 pParty->uFallSpeed = 0; 2432 pParty->uFallSpeed = 0;
2433 v121 = 0; 2433 v121 = 0;
2669 v129 = (unsigned __int64)(4i64 * v126) >> 16; 2669 v129 = (unsigned __int64)(4i64 * v126) >> 16;
2670 pZ = v113 + v129; 2670 pZ = v113 + v129;
2671 if ( v127 ) 2671 if ( v127 )
2672 pZ = v113; 2672 pZ = v113;
2673 if (pParty->FlyActive()) 2673 if (pParty->FlyActive())
2674 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] &= 0xFEu; 2674 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] &= 0xFEu;
2675 pParty->uFallStartY = pZ; 2675 pParty->uFallStartY = pZ;
2676 //goto LABEL_141; 2676 //goto LABEL_141;
2677 } 2677 }
2678 else 2678 else
2679 { 2679 {
2682 v121 = 0; 2682 v121 = 0;
2683 pZ = v111; 2683 pZ = v111;
2684 pParty->uFallStartY = v111; 2684 pParty->uFallStartY = v111;
2685 v113 = pZ; 2685 v113 = pZ;
2686 if (pParty->FlyActive()) 2686 if (pParty->FlyActive())
2687 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u; 2687 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1u;
2688 2688
2689 } 2689 }
2690 } 2690 }
2691 else 2691 else
2692 { 2692 {
2693 v113 = pZ; 2693 v113 = pZ;
2694 if (pParty->FlyActive()) 2694 if (pParty->FlyActive())
2695 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[7].uOverlayID + 119] |= 1u; 2695 stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uOverlayID + 119] |= 1u;
2696 } 2696 }
2697 //LABEL_141: 2697 //LABEL_141:
2698 if (bJumping && !pParty->bFlying) 2698 if (bJumping && !pParty->bFlying)
2699 { 2699 {
2700 v33 = -(pEventTimer->uTimeElapsed * GetGravityStrength()); 2700 v33 = -(pEventTimer->uTimeElapsed * GetGravityStrength());
3209 if ( v78 || v77) 3209 if ( v78 || v77)
3210 { 3210 {
3211 if ( bWaterWalk ) 3211 if ( bWaterWalk )
3212 { 3212 {
3213 pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER; 3213 pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER;
3214 //v79 = 20 * pParty->pPartyBuffs[18].uOverlayID + 6180178; 3214 //v79 = 20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 6180178;
3215 //*(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119] |= 1u; 3215 //*(short *)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 119] |= 1u;
3216 v79 = (int)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[18].uOverlayID + 119]; 3216 v79 = (int)&stru_5E4C90._decor_events[20 * pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uOverlayID + 119];
3217 *(short *)v79 |= 1u; 3217 *(short *)v79 |= 1u;
3218 if ( !v122 || !v69 ) 3218 if ( !v122 || !v69 )
3219 { 3219 {
3220 if ( !v76 ) 3220 if ( !v76 )
3221 { 3221 {
6814 } 6814 }
6815 v6 = 0; 6815 v6 = 0;
6816 if (pWeather->bNight) 6816 if (pWeather->bNight)
6817 { 6817 {
6818 v8 = 67108864; 6818 v8 = 67108864;
6819 if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime > 0 ) 6819 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0 )
6820 v8 = pParty->pPartyBuffs[16].uPower << 26; 6820 v8 = pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uPower << 26;
6821 if ( a3 <= v8 ) 6821 if ( a3 <= v8 )
6822 { 6822 {
6823 if ( a3 > 0 ) 6823 if ( a3 > 0 )
6824 { 6824 {
6825 LODWORD(v9) = a3 << 16; 6825 LODWORD(v9) = a3 << 16;
6983 { 6983 {
6984 v12 = 0; 6984 v12 = 0;
6985 } 6985 }
6986 else 6986 else
6987 { 6987 {
6988 if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime > 0 ) 6988 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0 )
6989 { 6989 {
6990 if ( (signed __int64)pParty->pPartyBuffs[16].uExpireTime <= 0 ) 6990 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime <= 0 )
6991 v11 = 0; 6991 v11 = 0;
6992 else 6992 else
6993 v11 = pParty->pPartyBuffs[16].uPower; 6993 v11 = pParty->pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uPower;
6994 } 6994 }
6995 v12 = v11 << 26; 6995 v12 = v11 << 26;
6996 } 6996 }
6997 if ( a4 ) 6997 if ( a4 )
6998 goto LABEL_24; 6998 goto LABEL_24;
13087 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0); 13087 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
13088 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u); 13088 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
13089 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u); 13089 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
13090 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u); 13090 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
13091 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335); 13091 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
13092 v37 = &pParty->pPartyBuffs[2]; 13092 v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS];
13093 v36 = pParty->uTimePlayed + v39; 13093 v36 = pParty->uTimePlayed + v39;
13094 v37->Apply(v36, a7b, v43, 0, 0); 13094 v37->Apply(v36, a7b, v43, 0, 0);
13095 goto LABEL_139; 13095 goto LABEL_139;
13096 } 13096 }
13097 if ( v41 == 1 ) 13097 if ( v41 == 1 )
13101 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0); 13101 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
13102 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u); 13102 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
13103 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u); 13103 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
13104 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u); 13104 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
13105 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335); 13105 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
13106 v37 = &pParty->pPartyBuffs[2]; 13106 v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS];
13107 v36 = pParty->uTimePlayed + v39; 13107 v36 = pParty->uTimePlayed + v39;
13108 v37->Apply(v36, a7b, v43, 0, 0); 13108 v37->Apply(v36, a7b, v43, 0, 0);
13109 goto LABEL_139; 13109 goto LABEL_139;
13110 } 13110 }
13111 } 13111 }
13114 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0); 13114 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 0);
13115 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u); 13115 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 1u);
13116 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u); 13116 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 2u);
13117 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u); 13117 pGame->pStru6Instance->SetPlayerBuffAnim(0x53u, 3u);
13118 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335); 13118 v39 = (signed __int64)((double)(v42 << 7) * 0.033333335);
13119 v37 = &pParty->pPartyBuffs[2]; 13119 v37 = &pParty->pPartyBuffs[PARTY_BUFF_DAY_OF_GODS];
13120 v36 = pParty->uTimePlayed + v39; 13120 v36 = pParty->uTimePlayed + v39;
13121 v37->Apply(v36, a7b, v43, 0, 0); 13121 v37->Apply(v36, a7b, v43, 0, 0);
13122 goto LABEL_139; 13122 goto LABEL_139;
13123 } 13123 }
13124 if ( spellnum != 58 ) 13124 if ( spellnum != 58 )
13564 v52 = 0; 13564 v52 = 0;
13565 v50 = 0; 13565 v50 = 0;
13566 v48 = uSkill; 13566 v48 = uSkill;
13567 v46 = v15; 13567 v46 = v15;
13568 v39 = (signed __int64)((double)(v38 << 7) * 0.033333335); 13568 v39 = (signed __int64)((double)(v38 << 7) * 0.033333335);
13569 v37 = &pParty->pPartyBuffs[10]; 13569 v37 = &pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION];
13570 v36 = pParty->uTimePlayed + v39; 13570 v36 = pParty->uTimePlayed + v39;
13571 v37->Apply(v36, v46, v48, v50, v52); 13571 v37->Apply(v36, v46, v48, v50, v52);
13572 goto LABEL_139; 13572 goto LABEL_139;
13573 case 3: 13573 case 3:
13574 case 14: 13574 case 14: