comparison mm7_6.cpp @ 1225:42b41aaecd87

Слияние
author Ritor1
date Wed, 05 Jun 2013 21:00:45 +0600
parents 15ad868d972f
children 0dbf6c4dd029
comparison
equal deleted inserted replaced
1224:23632c91ed0a 1225:42b41aaecd87
1 #ifdef _MSC_VER
2 #define _CRT_SECURE_NO_WARNINGS
3 #endif
4
1 #include "MM7.h" 5 #include "MM7.h"
2 6
3 7
4 8
5 #include "Sprites.h" 9 #include "Sprites.h"
1605 { 1609 {
1606 v6 = pParty->pPartyBuffs; 1610 v6 = pParty->pPartyBuffs;
1607 while ( (signed __int64)v6->uExpireTime <= 0 ) 1611 while ( (signed __int64)v6->uExpireTime <= 0 )
1608 { 1612 {
1609 ++v6; 1613 ++v6;
1610 if ( v6 > &pParty->pPartyBuffs[19] ) 1614 if ( v6 > &pParty->pPartyBuffs[PARTY_BUFF_WIZARD_EYE] )
1611 { 1615 {
1612 v7 = pParty->pPlayers;//[0].pPlayerBuffs; 1616 v7 = pParty->pPlayers;//[0].pPlayerBuffs;
1613 v8 = 0; 1617 v8 = 0;
1614 v9 = v7->pPlayerBuffs; 1618 v9 = v7->pPlayerBuffs;
1615 while ( v9->uExpireTime <= 0i64 ) 1619 while ( v9->uExpireTime <= 0i64 )
2597 NPCData *pNPCData; // eax@1089 2601 NPCData *pNPCData; // eax@1089
2598 int v606; // edx@1091 2602 int v606; // edx@1091
2599 AwardType *v607; // ecx@1100 2603 AwardType *v607; // ecx@1100
2600 __int16 v608; // ax@1102 2604 __int16 v608; // ax@1102
2601 signed int v609; // eax@1104 2605 signed int v609; // eax@1104
2602 //int v610; // edi@1106 2606 int v610; // edi@1106
2603 unsigned int v611; // eax@1106 2607 unsigned int v611; // eax@1106
2604 Player *v612; // edi@1106 2608 Player *v612; // edi@1106
2605 DDM_DLV_Header *v613; // eax@1108 2609 DDM_DLV_Header *v613; // eax@1108
2606 int v615; // edi@1119 2610 int v615; // edi@1119
2607 Player *v619; // edi@1123 2611 Player *v619; // edi@1123
6205 } 6209 }
6206 while ( (signed int)i < (signed int)pNPCStats->uNumNewNPCs ); 6210 while ( (signed int)i < (signed int)pNPCStats->uNumNewNPCs );
6207 } 6211 }
6208 v608 = pCastSpell->uPlayerID_2; 6212 v608 = pCastSpell->uPlayerID_2;
6209 if ( v608 != 4 && v608 != 5 6213 if ( v608 != 4 && v608 != 5
6210 //|| (v609 = (signed int)*(&pFontCChar + v608 + (unsigned __int8)pParty->field_709), v609 <= 0) 6214 || (v609 = (signed int)*(&pFontCChar + v608 + (unsigned __int8)pParty->field_709), v609 <= 0)
6211 || (v609 = achieved_awards[v608 + (unsigned __int8)pParty->field_709 - 4], v609 <= 0)
6212 || v609 >= 3 ) 6215 || v609 >= 3 )
6213 { 6216 {
6214 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed 6217 ShowStatusBarString(pGlobalTXT_LocalizationStrings[428], 2); // Spell failed
6215 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0); 6218 pAudioPlayer->PlaySound(SOUND_PlayerCantCastSpell, 0, 0, -1, 0, 0, 0, 0);
6216 pCastSpell->spellnum = 0; 6219 pCastSpell->spellnum = 0;
6217 continue; 6220 continue;
6218 } 6221 }
6219 //v610 = 76 * v609; 6222 v610 = 76 * v609;
6220 //*((int *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + 19 * v609) = 0; 6223 //*((int *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + 19 * v609) = 0;
6221 pParty->pHirelings[v609-1].evt_B = 0; 6224 pParty->pHirelings[v609-1].evt_B = 0;
6222 v611 = pIconsFrameTable->FindIcon("spell96"); 6225 v611 = pIconsFrameTable->FindIcon("spell96");
6223 //*(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + v610 + 4) = pIconsFrameTable->GetIconAnimLength(v611); 6226 //*(int *)((char *)&pParty->pPlayers[3].pInstalledBeacons[4].uBeaconTime + v610 + 4) = pIconsFrameTable->GetIconAnimLength(v611);
6224 pParty->pHirelings[v609-1].evt_C = pIconsFrameTable->GetIconAnimLength(v611); 6227 pParty->pHirelings[v609-1].evt_C = pIconsFrameTable->GetIconAnimLength(v611);
6478 return 8 * this->pIcons[uIconID].uAnimLength; 6481 return 8 * this->pIcons[uIconID].uAnimLength;
6479 } 6482 }
6480 6483
6481 const wchar_t *UIMessage2String(UIMessageType msg) 6484 const wchar_t *UIMessage2String(UIMessageType msg)
6482 { 6485 {
6483 #define CASE(xxx) case xxx: _swprintf(b, L"%03X/%s", msg, L#xxx); return b; 6486 #define CASE(xxx) case xxx: swprintf(b, wcslen(L"%03X/%s"), L"%03X/%s", msg, L#xxx); return b;
6484 static wchar_t b[256]; // bad for threads 6487 static wchar_t b[256]; // bad for threads
6485 switch (msg) 6488 switch (msg)
6486 { 6489 {
6487 CASE(UIMSG_SelectSpell) 6490 CASE(UIMSG_SelectSpell)
6488 CASE(UIMSG_ChangeGameState) 6491 CASE(UIMSG_ChangeGameState)
6569 CASE(UIMSG_OpenVideoOptions) 6572 CASE(UIMSG_OpenVideoOptions)
6570 CASE(UIMSG_ToggleBloodsplats) 6573 CASE(UIMSG_ToggleBloodsplats)
6571 CASE(UIMSG_ToggleColoredLights) 6574 CASE(UIMSG_ToggleColoredLights)
6572 CASE(UIMSG_ToggleTint) 6575 CASE(UIMSG_ToggleTint)
6573 default: 6576 default:
6574 _swprintf(b, L"UIMSG_%03X", msg); return b; 6577 swprintf(b, wcslen(L"UIMSG_%03X") , L"UIMSG_%03X", msg); return b;
6575 }; 6578 };
6576 #undef CASE 6579 #undef CASE
6577 } 6580 }
6578 6581
6579 //----- (0042EB8D) -------------------------------------------------------- 6582 //----- (0042EB8D) --------------------------------------------------------