Mercurial > mm7
comparison mm7_4.cpp @ 609:42d5777c2f47
Слияние
author | Ritor1 |
---|---|
date | Wed, 06 Mar 2013 18:22:25 +0600 |
parents | f451efdb7c8b |
children | 628694cd5744 346dc5fc2969 |
comparison
equal
deleted
inserted
replaced
608:653724e9c234 | 609:42d5777c2f47 |
---|---|
3208 break; | 3208 break; |
3209 } | 3209 } |
3210 if ( v7 == 0 ) | 3210 if ( v7 == 0 ) |
3211 v7 = 1; | 3211 v7 = 1; |
3212 if (pPlayer->expression == CHARACTER_EXPRESSION_21) | 3212 if (pPlayer->expression == CHARACTER_EXPRESSION_21) |
3213 pFrame = pPlayerFrameTable->GetFrameBy_y(&pPlayer->field_1AA8, &pPlayer->field_1AA4, pMiscTimer->uTimeElapsed); | 3213 pFrame = pPlayerFrameTable->GetFrameBy_y(&pPlayer->_expression21_frameset, &pPlayer->_expression21_animtime, pMiscTimer->uTimeElapsed); |
3214 else | 3214 else |
3215 pFrame = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed); | 3215 pFrame = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed); |
3216 if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 ) | 3216 if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 ) |
3217 { | 3217 { |
3218 pPlayer->field_1AA2 = pFrame->uTextureID - 1; | 3218 pPlayer->field_1AA2 = pFrame->uTextureID - 1; |
3422 v4 = (v0 - v2) / 5; | 3422 v4 = (v0 - v2) / 5; |
3423 if (pParty->FlyActive()) | 3423 if (pParty->FlyActive()) |
3424 { | 3424 { |
3425 if ( pParty->bFlying ) | 3425 if ( pParty->bFlying ) |
3426 { | 3426 { |
3427 if ( !(pParty->pPartyBuffs[7].uFlags & 1) ) | 3427 if ( !(pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags & 1) ) |
3428 { | 3428 { // colliding with something in the air - fall down |
3429 v5 = v4 * pParty->pPartyBuffs[7].uPower; | 3429 v5 = v4 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uPower; |
3430 __debugbreak(); | 3430 //__debugbreak(); |
3431 v6 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[7].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[7].uCaster + 2000]; | 3431 v6 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[7].uCaster + 2000]; |
3432 v7 = *v6 < v5; | 3432 v7 = *v6 < v5; |
3433 *v6 -= v5; | 3433 *v6 -= v5; |
3434 if ( v7 ) | 3434 if ( v7 ) |
3435 { | 3435 { |
3436 *v6 = 0; | 3436 *v6 = 0; |
3439 v51 = 1; | 3439 v51 = 1; |
3440 } | 3440 } |
3441 } | 3441 } |
3442 } | 3442 } |
3443 } | 3443 } |
3444 | |
3444 if (pParty->WaterWalkActive()) | 3445 if (pParty->WaterWalkActive()) |
3445 { | 3446 { |
3446 if (pParty->uFlags & 0x80 ) | 3447 if (pParty->uFlags & PARTY_FLAGS_1_STANDING_ON_WATER ) |
3447 { | 3448 { |
3448 if ( !(pParty->pPartyBuffs[18].uFlags & 1) ) | 3449 if ( !(pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags & 1) ) |
3449 { | 3450 { // taking on water |
3450 __debugbreak(); | 3451 //__debugbreak(); |
3451 v8 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[18].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[18].uCaster + 2000]; | 3452 v8 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[18].uCaster + 2000]; |
3452 v7 = *v8 < v4; | 3453 v7 = *v8 < v4; |
3453 *v8 -= v4; | 3454 *v8 -= v4; |
3454 if ( v7 ) | 3455 if ( v7 ) |
3455 { | 3456 { |
3456 *v8 = 0; | 3457 *v8 = 0; |
3457 LOBYTE(pParty->uFlags) &= 0x7Fu; | 3458 pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER; |
3458 v51 = 1; | 3459 v51 = 1; |
3459 } | 3460 } |
3460 } | 3461 } |
3461 } | 3462 } |
3462 } | 3463 } |
3464 | |
3463 if (pParty->ImmolationActive()) | 3465 if (pParty->ImmolationActive()) |
3464 { | 3466 { |
3465 //SpriteObject::SpriteObject(&a1); | 3467 //SpriteObject::SpriteObject(&a1); |
3466 v9 = 0; | 3468 v9 = 0; |
3467 a3.z = 0; | 3469 a3.z = 0; |
4333 } | 4335 } |
4334 return result; | 4336 return result; |
4335 } | 4337 } |
4336 | 4338 |
4337 //----- (00494B5E) -------------------------------------------------------- | 4339 //----- (00494B5E) -------------------------------------------------------- |
4338 PlayerFrame *PlayerFrameTable::GetFrameBy_y(int *a2, int *a3, int a4) | 4340 PlayerFrame *PlayerFrameTable::GetFrameBy_y(int *pFramesetID, int *pAnimTime, int a4) |
4339 { | 4341 { |
4340 PlayerFrameTable *v4; // edi@1 | 4342 PlayerFrameTable *v4; // edi@1 |
4341 int v5; // esi@1 | 4343 int v5; // esi@1 |
4342 int v6; // eax@2 | 4344 int v6; // eax@2 |
4343 | 4345 |
4344 v4 = this; | 4346 v4 = this; |
4345 v5 = a4 + *a3; | 4347 v5 = a4 + *pAnimTime; |
4346 if ( v5 < 8 * this->pFrames[*a2].uAnimTime ) | 4348 if ( v5 < 8 * this->pFrames[*pFramesetID].uAnimTime ) |
4347 { | 4349 { |
4348 *a3 = v5; | 4350 *pAnimTime = v5; |
4349 } | 4351 } |
4350 else | 4352 else |
4351 { | 4353 { |
4352 v6 = rand() % 4 + 21; | 4354 v6 = rand() % 4 + 21; |
4353 *a2 = v6; | 4355 *pFramesetID = v6; |
4354 *a3 = 8 * v5 % v4->pFrames[v6].uAnimTime; | 4356 *pAnimTime = 8 * v5 % v4->pFrames[v6].uAnimTime; |
4355 } | 4357 } |
4356 return &v4->pFrames[*a2]; | 4358 return &v4->pFrames[*pFramesetID]; |
4357 } | 4359 } |
4358 | 4360 |
4359 //----- (00494BC3) -------------------------------------------------------- | 4361 //----- (00494BC3) -------------------------------------------------------- |
4360 void PlayerFrameTable::ToFile() | 4362 void PlayerFrameTable::ToFile() |
4361 { | 4363 { |
4804 // AE3370: using guessed type int dword_AE3370; | 4806 // AE3370: using guessed type int dword_AE3370; |
4805 | 4807 |
4806 //----- (00495430) -------------------------------------------------------- | 4808 //----- (00495430) -------------------------------------------------------- |
4807 char *__fastcall GetReputationString(signed int a1) | 4809 char *__fastcall GetReputationString(signed int a1) |
4808 { | 4810 { |
4809 char *result; // eax@2 | 4811 if (a1 >= 25) |
4810 | 4812 return pGlobalTXT_LocalizationStrings[379]; // Hated |
4811 if ( a1 < 25 ) | 4813 else if (a1 >= 6) |
4812 { | 4814 return pGlobalTXT_LocalizationStrings[392]; // Unfriendly |
4813 if ( a1 < 6 ) | 4815 else if (a1 >= -5) |
4814 { | 4816 return pGlobalTXT_LocalizationStrings[399]; // Neutral; |
4815 if ( a1 < -5 ) | 4817 else if (a1 >= -24) |
4816 { | 4818 return pGlobalTXT_LocalizationStrings[402]; // Friendly |
4817 result = pGlobalTXT_LocalizationStrings[402]; | |
4818 if ( a1 < -24 ) | |
4819 result = pGlobalTXT_LocalizationStrings[434]; | |
4820 } | |
4821 else | |
4822 { | |
4823 result = pGlobalTXT_LocalizationStrings[399]; | |
4824 } | |
4825 } | |
4826 else | |
4827 { | |
4828 result = pGlobalTXT_LocalizationStrings[392]; | |
4829 } | |
4830 } | |
4831 else | 4819 else |
4832 { | 4820 return pGlobalTXT_LocalizationStrings[434]; // Respected; |
4833 result = pGlobalTXT_LocalizationStrings[379]; | |
4834 } | |
4835 return result; | |
4836 } | 4821 } |
4837 | 4822 |
4838 //----- (00495461) -------------------------------------------------------- | 4823 //----- (00495461) -------------------------------------------------------- |
4839 char *BuilDialogueString(char *lpsz, unsigned __int8 uPlayerID, ItemGen *a3, char *a4, int a5, __int64 *a6) | 4824 char *BuilDialogueString(char *lpsz, unsigned __int8 uPlayerID, ItemGen *a3, char *a4, int a5, __int64 *a6) |
4840 { | 4825 { |