Mercurial > mm7
comparison mm7_4.cpp @ 862:f4394e320312
* PID mistake fixed
* Actor::GetDirectionInfo mistake fixed
author | zipi |
---|---|
date | Sun, 31 Mar 2013 13:20:58 +0100 |
parents | 8fc2f035abc0 |
children | 2db21a810d48 231523a39203 |
comparison
equal
deleted
inserted
replaced
861:fea81e031484 | 862:f4394e320312 |
---|---|
131 v8 = v6; | 131 v8 = v6; |
132 v6 = v5; | 132 v6 = v5; |
133 v5 = v8; | 133 v5 = v8; |
134 } | 134 } |
135 if ( (signed int)(((unsigned int)(11 * v5) >> 5) + (v6 >> 2) + v4) < v2 ) | 135 if ( (signed int)(((unsigned int)(11 * v5) >> 5) + (v6 >> 2) + v4) < v2 ) |
136 EventProcessor(v1->field_16_event_id, PID(i,OBJECT_Decoration), 1); | 136 EventProcessor(v1->field_16_event_id, PID(OBJECT_Decoration,i), 1); |
137 } | 137 } |
138 if ( v1->field_2 & 2 ) | 138 if ( v1->field_2 & 2 ) |
139 { | 139 { |
140 v37 = 0; | 140 v37 = 0; |
141 if ( (signed int)uNumActors > 0 ) | 141 if ( (signed int)uNumActors > 0 ) |
975 v13 = 0; | 975 v13 = 0; |
976 if ( v13 < stru_721530.field_7C ) | 976 if ( v13 < stru_721530.field_7C ) |
977 { | 977 { |
978 stru_721530.field_7C = v13; | 978 stru_721530.field_7C = v13; |
979 v14 = 8 * v16; | 979 v14 = 8 * v16; |
980 LOBYTE(v14) = PID(v16,OBJECT_Actor); | 980 LOBYTE(v14) = PID(OBJECT_Actor,v16); |
981 stru_721530.uFaceID = v14; | 981 stru_721530.uFaceID = v14; |
982 } | 982 } |
983 result = 1; | 983 result = 1; |
984 } | 984 } |
985 return result; | 985 return result; |
2131 v16 = *v14; | 2131 v16 = *v14; |
2132 a1.vPosition.x = pActors[v16].vPosition.x; | 2132 a1.vPosition.x = pActors[v16].vPosition.x; |
2133 v17 = pActors[v16].vPosition.y; | 2133 v17 = pActors[v16].vPosition.y; |
2134 a1.vPosition.z = pActors[v16].vPosition.z; | 2134 a1.vPosition.z = pActors[v16].vPosition.z; |
2135 v18 = 8 * v15; | 2135 v18 = 8 * v15; |
2136 LOBYTE(v18) = PID(v15,OBJECT_Actor); | 2136 LOBYTE(v18) = PID(OBJECT_Actor,v15); |
2137 a1.vPosition.y = v17; | 2137 a1.vPosition.y = v17; |
2138 a1.spell_target_pid = v18; | 2138 a1.spell_target_pid = v18; |
2139 v19 = a1.Create(0, 0, 0, 0); | 2139 v19 = a1.Create(0, 0, 0, 0); |
2140 DamageMonsterFromParty(PID(v19,OBJECT_Item), *v14, &a3); | 2140 DamageMonsterFromParty(PID(OBJECT_Item,v19), *v14, &a3); |
2141 ++v9; | 2141 ++v9; |
2142 } | 2142 } |
2143 while ( v9 < v13 ); | 2143 while ( v9 < v13 ); |
2144 } | 2144 } |
2145 } | 2145 } |
5519 v3 = v1->uBitmapID; | 5519 v3 = v1->uBitmapID; |
5520 v4 = v1->uBitmapID; | 5520 v4 = v1->uBitmapID; |
5521 v68 = v2; | 5521 v68 = v2; |
5522 v5 = (Texture *)(v4 != -1 ? (int)&pBitmaps_LOD->pTextures[v3] : 0); | 5522 v5 = (Texture *)(v4 != -1 ? (int)&pBitmaps_LOD->pTextures[v3] : 0); |
5523 v6 = 8 * uFaceID; | 5523 v6 = 8 * uFaceID; |
5524 LOBYTE(v6) = PID(uFaceID,OBJECT_BModel); | 5524 LOBYTE(v6) = PID(OBJECT_BModel,uFaceID); |
5525 stru_F8AD28.field_0 = v6; | 5525 stru_F8AD28.field_0 = v6; |
5526 stru_F8AD28.plane_4.vNormal.x = v1->pFacePlane_old.vNormal.x; | 5526 stru_F8AD28.plane_4.vNormal.x = v1->pFacePlane_old.vNormal.x; |
5527 stru_F8AD28.plane_4.vNormal.y = v1->pFacePlane_old.vNormal.y; | 5527 stru_F8AD28.plane_4.vNormal.y = v1->pFacePlane_old.vNormal.y; |
5528 stru_F8AD28.plane_4.vNormal.z = v1->pFacePlane_old.vNormal.z; | 5528 stru_F8AD28.plane_4.vNormal.z = v1->pFacePlane_old.vNormal.z; |
5529 stru_F8AD28.plane_4.dist = v1->pFacePlane_old.dist; | 5529 stru_F8AD28.plane_4.dist = v1->pFacePlane_old.dist; |
8705 v5 = v4->uCurrentActionLength; | 8705 v5 = v4->uCurrentActionLength; |
8706 v4->uCurrentActionTime += pMiscTimer->uTimeElapsed; | 8706 v4->uCurrentActionTime += pMiscTimer->uTimeElapsed; |
8707 if ( (signed int)v4->uCurrentActionTime >= v5 ) | 8707 if ( (signed int)v4->uCurrentActionTime >= v5 ) |
8708 { | 8708 { |
8709 v17 = ai_near_actors_targets_pid[v20]; | 8709 v17 = ai_near_actors_targets_pid[v20]; |
8710 v6 = Actor::GetDirectionInfo(PID(v20,OBJECT_Actor), v17, &a3, v2); | 8710 v6 = Actor::GetDirectionInfo(PID(OBJECT_Actor,v20), v17, &a3, v2); |
8711 v7 = v4->uAIState; | 8711 v7 = v4->uAIState; |
8712 memcpy(&v15, v6, sizeof(v15)); | 8712 memcpy(&v15, v6, sizeof(v15)); |
8713 v8 = v7 - 4; | 8713 v8 = v7 - 4; |
8714 memcpy(&v14, &v15, sizeof(v14)); | 8714 memcpy(&v14, &v15, sizeof(v14)); |
8715 if ( v8 ) | 8715 if ( v8 ) |
8994 v0->uScreenSpaceX = v43; | 8994 v0->uScreenSpaceX = v43; |
8995 v0->uScreenSpaceY = a6; | 8995 v0->uScreenSpaceY = a6; |
8996 LOWORD(v25) = 0; | 8996 LOWORD(v25) = 0; |
8997 LOBYTE(v26) = v41; | 8997 LOBYTE(v26) = v41; |
8998 | 8998 |
8999 //v0->sZValue = v25 + (PID(i,OBJECT_Actor)); | 8999 //v0->sZValue = v25 + (PID(OBJECT_Actor,i)); |
9000 v0->actual_z = HIWORD(x); | 9000 v0->actual_z = HIWORD(x); |
9001 v0->object_pid = PID(i,OBJECT_Actor); | 9001 v0->object_pid = PID(OBJECT_Actor,i); |
9002 | 9002 |
9003 v29 = HIDWORD(p->pActorBuffs[5].uExpireTime) == 0; | 9003 v29 = HIDWORD(p->pActorBuffs[5].uExpireTime) == 0; |
9004 v30 = HIDWORD(p->pActorBuffs[5].uExpireTime) < 0; | 9004 v30 = HIDWORD(p->pActorBuffs[5].uExpireTime) < 0; |
9005 v0->field_1E = v41; | 9005 v0->field_1E = v41; |
9006 v0->pSpriteFrame = v10; | 9006 v0->pSpriteFrame = v10; |