Mercurial > mm7
comparison mm7_2.cpp @ 1202:0dbf6c4dd029
arrays to std::arrays phase 1
author | Grumpy7 |
---|---|
date | Sat, 08 Jun 2013 21:33:22 +0200 |
parents | 15ad868d972f |
children | 1eed3e0ab666 |
comparison
equal
deleted
inserted
replaced
1196:44f37efc159c | 1202:0dbf6c4dd029 |
---|---|
386 else | 386 else |
387 { | 387 { |
388 v0 = 0; | 388 v0 = 0; |
389 if ( (signed int)uNumActors > 0 ) | 389 if ( (signed int)uNumActors > 0 ) |
390 { | 390 { |
391 v1 = pActors;//[0].uAIState; | 391 v1 = pActors.data();//[0].uAIState; |
392 v7 = uNumActors; | 392 v7 = uNumActors; |
393 do | 393 do |
394 { | 394 { |
395 v2 = v1->uAIState; | 395 v2 = v1->uAIState; |
396 if ( v1->uAIState == Dead || v2 == Removed || v2 == Disabled || (v3 = v1->uSummonerID) != 0 && PID_TYPE(v3) == OBJECT_Player) | 396 if ( v1->uAIState == Dead || v2 == Removed || v2 == Disabled || (v3 = v1->uSummonerID) != 0 && PID_TYPE(v3) == OBJECT_Player) |
2726 v23 = pMonsterList->GetMonsterIDByName(v15); | 2726 v23 = pMonsterList->GetMonsterIDByName(v15); |
2727 v3 = 0; | 2727 v3 = 0; |
2728 v20 = uNumActors; | 2728 v20 = uNumActors; |
2729 if ( (signed int)uNumActors > 0 ) | 2729 if ( (signed int)uNumActors > 0 ) |
2730 { | 2730 { |
2731 v4 = pActors;//[0].uAIState; | 2731 v4 = pActors.data();//[0].uAIState; |
2732 while ( v4->uAIState != Removed ) | 2732 while ( v4->uAIState != Removed ) |
2733 { | 2733 { |
2734 ++v3; | 2734 ++v3; |
2735 ++v4; | 2735 ++v4; |
2736 if ( v3 >= (signed int)uNumActors ) | 2736 if ( v3 >= (signed int)uNumActors ) |
3057 v21 = a1; | 3057 v21 = a1; |
3058 v24 = a2; | 3058 v24 = a2; |
3059 v2 = 0; | 3059 v2 = 0; |
3060 if ( (signed int)uNumActors <= 0 ) | 3060 if ( (signed int)uNumActors <= 0 ) |
3061 goto LABEL_8; | 3061 goto LABEL_8; |
3062 v3 = pActors; | 3062 v3 = pActors.data(); |
3063 while ( 1 ) | 3063 while ( 1 ) |
3064 { | 3064 { |
3065 v22 = v3->pMonsterInfo.uID - 1; | 3065 v22 = v3->pMonsterInfo.uID - 1; |
3066 v4 = (signed __int64)((double)v22 * 0.3333333333333333); | 3066 v4 = (signed __int64)((double)v22 * 0.3333333333333333); |
3067 if ( (int)v4 != 40 ) | 3067 if ( (int)v4 != 40 ) |
3304 memset(stru_5E4C90._decor_events, 0, 125); | 3304 memset(stru_5E4C90._decor_events, 0, 125); |
3305 | 3305 |
3306 uint decorEventIdx = 0; | 3306 uint decorEventIdx = 0; |
3307 for (uint i = 0; i < uNumLevelDecorations; ++i) | 3307 for (uint i = 0; i < uNumLevelDecorations; ++i) |
3308 { | 3308 { |
3309 auto decor = pLevelDecorations + i; | 3309 auto decor = &pLevelDecorations[i]; |
3310 | 3310 |
3311 if (!decor->field_16_event_id) | 3311 if (!decor->field_16_event_id) |
3312 { | 3312 { |
3313 if (decor->IsInteractive()) | 3313 if (decor->IsInteractive()) |
3314 { | 3314 { |
5268 | 5268 |
5269 //v15 = 0; | 5269 //v15 = 0; |
5270 for (uint i = 0; i < uNumActors; ++i) | 5270 for (uint i = 0; i < uNumActors; ++i) |
5271 //if ( (signed int)uNumActors > 0 ) | 5271 //if ( (signed int)uNumActors > 0 ) |
5272 { | 5272 { |
5273 auto pActor = pActors + i; | 5273 auto pActor = &pActors[i]; |
5274 //v2 = (char *)&pActors[0].uNPC_ID; | 5274 //v2 = (char *)&pActors[0].uNPC_ID; |
5275 //do | 5275 //do |
5276 //{ | 5276 //{ |
5277 v3 = pActor->pMonsterInfo.uID; | 5277 v3 = pActor->pMonsterInfo.uID; |
5278 v17 = 0; | 5278 v17 = 0; |
5320 v20 = 0; | 5320 v20 = 0; |
5321 //v16 = v1; | 5321 //v16 = v1; |
5322 | 5322 |
5323 for (uint i = 0; i < uNumActors; ++i) | 5323 for (uint i = 0; i < uNumActors; ++i) |
5324 { | 5324 { |
5325 auto pActor = pActors + i; | 5325 auto pActor = &pActors[i]; |
5326 //v7 = (char *)&pActors[0].pMonsterInfo; | 5326 //v7 = (char *)&pActors[0].pMonsterInfo; |
5327 //do | 5327 //do |
5328 //{ | 5328 //{ |
5329 v8 = 0; | 5329 v8 = 0; |
5330 if ( v6 > 0 ) | 5330 if ( v6 > 0 ) |
5419 v1 = uNumLevelDecorations; | 5419 v1 = uNumLevelDecorations; |
5420 v2 = (signed __int16)v0; | 5420 v2 = (signed __int16)v0; |
5421 result = 0; | 5421 result = 0; |
5422 if ( (signed int)uNumLevelDecorations > 0 ) | 5422 if ( (signed int)uNumLevelDecorations > 0 ) |
5423 { | 5423 { |
5424 v4 = pLevelDecorations; | 5424 v4 = pLevelDecorations.data(); |
5425 do | 5425 do |
5426 { | 5426 { |
5427 if ( v4->uDecorationDescID == v2 ) | 5427 if ( v4->uDecorationDescID == v2 ) |
5428 { | 5428 { |
5429 v5 = _6836C8_num_decorations_6807E8++; | 5429 v5 = _6836C8_num_decorations_6807E8++; |
6798 if ( pRenderer->pRenderD3D ) | 6798 if ( pRenderer->pRenderD3D ) |
6799 pGame->pVisInstance->_4C1A02(); | 6799 pGame->pVisInstance->_4C1A02(); |
6800 pEventTimer->Pause(); | 6800 pEventTimer->Pause(); |
6801 pMiscTimer->Pause(); | 6801 pMiscTimer->Pause(); |
6802 pParty->uFlags = 2; | 6802 pParty->uFlags = 2; |
6803 pCastSpellInfo->_427D48(1); | 6803 pCastSpellInfo.data()->_427D48(1); |
6804 ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows(); | 6804 ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows(); |
6805 DoPrepareWorld(0, (v1 == 0) + 1); | 6805 DoPrepareWorld(0, (v1 == 0) + 1); |
6806 pMiscTimer->Resume(); | 6806 pMiscTimer->Resume(); |
6807 pEventTimer->Resume(); | 6807 pEventTimer->Resume(); |
6808 } | 6808 } |
9608 v15 = a2; | 9608 v15 = a2; |
9609 v16 = a1; | 9609 v16 = a1; |
9610 v19 = 0; | 9610 v19 = 0; |
9611 if ( (signed int)uNumActors > 0 ) | 9611 if ( (signed int)uNumActors > 0 ) |
9612 { | 9612 { |
9613 v4 = pActors;//[0].uAIState; | 9613 v4 = pActors.data();//[0].uAIState; |
9614 do | 9614 do |
9615 { | 9615 { |
9616 v5 = abs(v4->vPosition.x - pParty->vPosition.x); | 9616 v5 = abs(v4->vPosition.x - pParty->vPosition.x); |
9617 v17 = abs(v4->vPosition.y - pParty->vPosition.y); | 9617 v17 = abs(v4->vPosition.y - pParty->vPosition.y); |
9618 v18 = abs(v4->vPosition.z - pParty->vPosition.z); | 9618 v18 = abs(v4->vPosition.z - pParty->vPosition.z); |
9959 | 9959 |
9960 v6 = 0; | 9960 v6 = 0; |
9961 v1 = this; | 9961 v1 = this; |
9962 if ( (signed int)uNumActors > 0 ) | 9962 if ( (signed int)uNumActors > 0 ) |
9963 { | 9963 { |
9964 v2 = pActors;//[0].vPosition.y; | 9964 v2 = pActors.data();//[0].vPosition.y; |
9965 do | 9965 do |
9966 { | 9966 { |
9967 if ( v2->CanAct() ) | 9967 if ( v2->CanAct() ) |
9968 { | 9968 { |
9969 //UNDEF(v3); | 9969 //UNDEF(v3); |