comparison mm7_4.cpp @ 848:ceef50611567

* AI fixed (temporary) * PID_ID, PID_TYPE replaces * >> 7 error in AudioPlayer
author zipi
date Sun, 31 Mar 2013 10:44:43 +0100
parents dfd683c4f538
children 8fafe3645f36
comparison
equal deleted inserted replaced
847:e398541aee60 848:ceef50611567
1117 if ( v3 ) 1117 if ( v3 )
1118 { 1118 {
1119 do 1119 do
1120 { 1120 {
1121 v4 = *v3; 1121 v4 = *v3;
1122 if ( (v4 & 7) == OBJECT_Decoration) 1122 if ( PID_TYPE(v4) == OBJECT_Decoration)
1123 { 1123 {
1124 v5 = &pLevelDecorations[(signed __int16)v4 >> 3]; 1124 v5 = &pLevelDecorations[(signed __int16)v4 >> 3];
1125 if ( !(v5->field_2 & 0x20) ) 1125 if ( !(v5->field_2 & 0x20) )
1126 { 1126 {
1127 v6 = &pDecorationList->pDecorations[v5->uDecorationDescID]; 1127 v6 = &pDecorationList->pDecorations[v5->uDecorationDescID];
1513 stru12_MemoryBlock *result; // eax@1 1513 stru12_MemoryBlock *result; // eax@1
1514 1514
1515 v2 = this; 1515 v2 = this;
1516 v3 = operator new(8 * a2 + 16); 1516 v3 = operator new(8 * a2 + 16);
1517 v2->pBlockBase = v3; 1517 v2->pBlockBase = v3;
1518 v4 = (char *)v3 + (-(signed int)v3 & 7); 1518 v4 = (char *)v3 + PID_TYPE(-(signed int)v3);
1519 result = v2; 1519 result = v2;
1520 v2->pAlignedBlock = v4; 1520 v2->pAlignedBlock = v4;
1521 } 1521 }
1522 1522
1523 //----- (004895B7) -------------------------------------------------------- 1523 //----- (004895B7) --------------------------------------------------------
8580 if ( !(v6 | v5) ) 8580 if ( !(v6 | v5) )
8581 { 8581 {
8582 v7 = this->pQueue; 8582 v7 = this->pQueue;
8583 do 8583 do
8584 { 8584 {
8585 if ( (v7->uPackedID & 7) == OBJECT_Actor ) 8585 if ( PID_TYPE(v7->uPackedID) == OBJECT_Actor )
8586 LOBYTE(pActors[v7->uPackedID >> 3].uAttributes) &= 0x7Fu; 8586 LOBYTE(pActors[PID_ID(v7->uPackedID)].uAttributes) &= 0x7Fu;
8587 ++v4; 8587 ++v4;
8588 ++v7; 8588 ++v7;
8589 } 8589 }
8590 while ( v4 < v2->uActorQueueSize ); 8590 while ( v4 < v2->uActorQueueSize );
8591 } 8591 }
8610 if ( v2->uActorQueueSize > 0 ) 8610 if ( v2->uActorQueueSize > 0 )
8611 { 8611 {
8612 v11 = v2->pQueue; 8612 v11 = v2->pQueue;
8613 do 8613 do
8614 { 8614 {
8615 objType = (ObjectType)(v11->uPackedID & 7); 8615 objType = (ObjectType)PID_TYPE(v11->uPackedID);
8616 objID = v11->uPackedID >> 3; 8616 objID = PID_ID(v11->uPackedID);
8617 if ( objType == OBJECT_Player ) 8617 if ( objType == OBJECT_Player )
8618 { 8618 {
8619 pPlayers[objID + 1]->uTimeToRecovery = (signed __int64)((double)v11->field_4 * 2.133333333333333); 8619 pPlayers[objID + 1]->uTimeToRecovery = (signed __int64)((double)v11->field_4 * 2.133333333333333);
8620 } 8620 }
8621 else 8621 else