Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/mm7_4.cpp Sat Mar 30 19:36:05 2013 +0400 +++ b/mm7_4.cpp Sun Mar 31 10:44:43 2013 +0100 @@ -1119,7 +1119,7 @@ do { v4 = *v3; - if ( (v4 & 7) == OBJECT_Decoration) + if ( PID_TYPE(v4) == OBJECT_Decoration) { v5 = &pLevelDecorations[(signed __int16)v4 >> 3]; if ( !(v5->field_2 & 0x20) ) @@ -1515,7 +1515,7 @@ v2 = this; v3 = operator new(8 * a2 + 16); v2->pBlockBase = v3; - v4 = (char *)v3 + (-(signed int)v3 & 7); + v4 = (char *)v3 + PID_TYPE(-(signed int)v3); result = v2; v2->pAlignedBlock = v4; } @@ -8582,8 +8582,8 @@ v7 = this->pQueue; do { - if ( (v7->uPackedID & 7) == OBJECT_Actor ) - LOBYTE(pActors[v7->uPackedID >> 3].uAttributes) &= 0x7Fu; + if ( PID_TYPE(v7->uPackedID) == OBJECT_Actor ) + LOBYTE(pActors[PID_ID(v7->uPackedID)].uAttributes) &= 0x7Fu; ++v4; ++v7; } @@ -8612,8 +8612,8 @@ v11 = v2->pQueue; do { - objType = (ObjectType)(v11->uPackedID & 7); - objID = v11->uPackedID >> 3; + objType = (ObjectType)PID_TYPE(v11->uPackedID); + objID = PID_ID(v11->uPackedID); if ( objType == OBJECT_Player ) { pPlayers[objID + 1]->uTimeToRecovery = (signed __int64)((double)v11->field_4 * 2.133333333333333);