Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/mm7_6.cpp Sat Jun 08 19:34:33 2013 +0200 +++ b/mm7_6.cpp Sat Jun 08 21:33:22 2013 +0200 @@ -2236,7 +2236,7 @@ if (a5 & 0x3CA) { - assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo) == 10); + assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo.data()) == 10); for (uint i = 0; i < 10; ++i) if (pCastSpellInfo[i].field_8 & 0x3CA) { @@ -2245,10 +2245,10 @@ } } - assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo) == 10); + assert(sizeof(pCastSpellInfo) / sizeof(*pCastSpellInfo.data()) == 10); for (uint i = 0; i < 10; ++i) { - auto spell = pCastSpellInfo + i; + auto spell = &pCastSpellInfo[i]; if (!spell->spellnum) continue; @@ -2264,7 +2264,7 @@ } } - int result = pCastSpellInfo->PushCastSpellInfo(a1, uPlayerID, a4, a5, a6); + int result = pCastSpellInfo.data()->PushCastSpellInfo(a1, uPlayerID, a4, a5, a6); if ( result != -1 ) { if ( a5 & 2 ) @@ -5689,7 +5689,7 @@ signed int _v733 = 0; if ( (signed int)uNumActors > 0 ) { - v518 = pActors;//[0].uAIState; + v518 = pActors.data();//[0].uAIState; auto _v726 = uNumActors; do { @@ -6655,7 +6655,7 @@ if (!player->CanAct()) return; - pCastSpellInfo->_427D48(uActiveCharacter); + pCastSpellInfo.data()->_427D48(uActiveCharacter); //v3 = 0; if (pParty->Invisible()) pParty->pPartyBuffs[PARTY_BUFF_INVISIBILITY].Reset(); @@ -7034,7 +7034,7 @@ } else { - v1 = pActors; + v1 = pActors.data(); while ( 1 ) { v2 = abs(v1->vInitialPosition.x - pParty->vPosition.x); @@ -7652,7 +7652,7 @@ v24 = pPlayers[uActiveCharacter]->GetAttackRecoveryTime(false); if ( !pParty->bTurnBasedModeOn ) pPlayers[uActiveCharacter]->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * (double)v24 * 2.133333333333333)); - pCastSpellInfo->_427D48(uActiveCharacter); + pCastSpellInfo.data()->_427D48(uActiveCharacter); pTurnEngine->_40471C(); } }