Mercurial > mm7
comparison mm7_6.cpp @ 1202:0dbf6c4dd029
arrays to std::arrays phase 1
author | Grumpy7 |
---|---|
date | Sat, 08 Jun 2013 21:33:22 +0200 |
parents | 15ad868d972f |
children | 8c02e6f74b29 |
comparison
equal
deleted
inserted
replaced
1196:44f37efc159c | 1202:0dbf6c4dd029 |
---|---|
2234 } | 2234 } |
2235 | 2235 |
2236 | 2236 |
2237 if (a5 & 0x3CA) | 2237 if (a5 & 0x3CA) |
2238 { | 2238 { |
2239 assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo) == 10); | 2239 assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo.data()) == 10); |
2240 for (uint i = 0; i < 10; ++i) | 2240 for (uint i = 0; i < 10; ++i) |
2241 if (pCastSpellInfo[i].field_8 & 0x3CA) | 2241 if (pCastSpellInfo[i].field_8 & 0x3CA) |
2242 { | 2242 { |
2243 pCastSpellInfo[i].spellnum = 0; | 2243 pCastSpellInfo[i].spellnum = 0; |
2244 break; | 2244 break; |
2245 } | 2245 } |
2246 } | 2246 } |
2247 | 2247 |
2248 assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo) == 10); | 2248 assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo.data()) == 10); |
2249 for (uint i = 0; i < 10; ++i) | 2249 for (uint i = 0; i < 10; ++i) |
2250 { | 2250 { |
2251 auto spell = pCastSpellInfo + i; | 2251 auto spell = &pCastSpellInfo[i]; |
2252 if (!spell->spellnum) | 2252 if (!spell->spellnum) |
2253 continue; | 2253 continue; |
2254 | 2254 |
2255 spell->spellnum = 0; | 2255 spell->spellnum = 0; |
2256 if (spell->field_8 & 0x3CA) | 2256 if (spell->field_8 & 0x3CA) |
2262 unk_50C9A0 = 0; | 2262 unk_50C9A0 = 0; |
2263 back_to_game(); | 2263 back_to_game(); |
2264 } | 2264 } |
2265 } | 2265 } |
2266 | 2266 |
2267 int result = pCastSpellInfo->PushCastSpellInfo(a1, uPlayerID, a4, a5, a6); | 2267 int result = pCastSpellInfo.data()->PushCastSpellInfo(a1, uPlayerID, a4, a5, a6); |
2268 if ( result != -1 ) | 2268 if ( result != -1 ) |
2269 { | 2269 { |
2270 if ( a5 & 2 ) | 2270 if ( a5 & 2 ) |
2271 { | 2271 { |
2272 if ( pGUIWindow_Settings ) | 2272 if ( pGUIWindow_Settings ) |
5687 } | 5687 } |
5688 //v733 = __PAIR__(0, v516); | 5688 //v733 = __PAIR__(0, v516); |
5689 signed int _v733 = 0; | 5689 signed int _v733 = 0; |
5690 if ( (signed int)uNumActors > 0 ) | 5690 if ( (signed int)uNumActors > 0 ) |
5691 { | 5691 { |
5692 v518 = pActors;//[0].uAIState; | 5692 v518 = pActors.data();//[0].uAIState; |
5693 auto _v726 = uNumActors; | 5693 auto _v726 = uNumActors; |
5694 do | 5694 do |
5695 { | 5695 { |
5696 v519 = v518->uAIState; | 5696 v519 = v518->uAIState; |
5697 if ( v518->uAIState != 5 && v519 != 11 && v519 != 19 && PID(OBJECT_Player, pCastSpell->uPlayerID) == v518->uSummonerID ) | 5697 if ( v518->uAIState != 5 && v519 != 11 && v519 != 19 && PID(OBJECT_Player, pCastSpell->uPlayerID) == v518->uSummonerID ) |
6653 //result = pParty->pPlayers[uActiveCharacter-1].CanAct(); | 6653 //result = pParty->pPlayers[uActiveCharacter-1].CanAct(); |
6654 auto player = &pParty->pPlayers[uActiveCharacter - 1]; | 6654 auto player = &pParty->pPlayers[uActiveCharacter - 1]; |
6655 if (!player->CanAct()) | 6655 if (!player->CanAct()) |
6656 return; | 6656 return; |
6657 | 6657 |
6658 pCastSpellInfo->_427D48(uActiveCharacter); | 6658 pCastSpellInfo.data()->_427D48(uActiveCharacter); |
6659 //v3 = 0; | 6659 //v3 = 0; |
6660 if (pParty->Invisible()) | 6660 if (pParty->Invisible()) |
6661 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); | 6661 pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); |
6662 | 6662 |
6663 //v31 = player->pEquipment.uBow; | 6663 //v31 = player->pEquipment.uBow; |
7032 LABEL_20: | 7032 LABEL_20: |
7033 result = 0; | 7033 result = 0; |
7034 } | 7034 } |
7035 else | 7035 else |
7036 { | 7036 { |
7037 v1 = pActors; | 7037 v1 = pActors.data(); |
7038 while ( 1 ) | 7038 while ( 1 ) |
7039 { | 7039 { |
7040 v2 = abs(v1->vInitialPosition.x - pParty->vPosition.x); | 7040 v2 = abs(v1->vInitialPosition.x - pParty->vPosition.x); |
7041 v11 = abs(v1->vInitialPosition.y - pParty->vPosition.y); | 7041 v11 = abs(v1->vInitialPosition.y - pParty->vPosition.y); |
7042 v12 = abs(v1->vInitialPosition.z - pParty->vPosition.z); | 7042 v12 = abs(v1->vInitialPosition.z - pParty->vPosition.z); |
7650 if ( !pPlayers[uActiveCharacter]->uTimeToRecovery ) | 7650 if ( !pPlayers[uActiveCharacter]->uTimeToRecovery ) |
7651 { | 7651 { |
7652 v24 = pPlayers[uActiveCharacter]->GetAttackRecoveryTime(false); | 7652 v24 = pPlayers[uActiveCharacter]->GetAttackRecoveryTime(false); |
7653 if ( !pParty->bTurnBasedModeOn ) | 7653 if ( !pParty->bTurnBasedModeOn ) |
7654 pPlayers[uActiveCharacter]->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * (double)v24 * 2.133333333333333)); | 7654 pPlayers[uActiveCharacter]->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * (double)v24 * 2.133333333333333)); |
7655 pCastSpellInfo->_427D48(uActiveCharacter); | 7655 pCastSpellInfo.data()->_427D48(uActiveCharacter); |
7656 pTurnEngine->_40471C(); | 7656 pTurnEngine->_40471C(); |
7657 } | 7657 } |
7658 } | 7658 } |
7659 break; | 7659 break; |
7660 case INPUT_Combat://if press ENTER | 7660 case INPUT_Combat://if press ENTER |