comparison mm7_5.cpp @ 90:d61f6bc04bf2

more pointer fixes
author zipi
date Wed, 06 Feb 2013 22:32:43 +0000
parents 98cd93e14777
children 471b1354cc73
comparison
equal deleted inserted replaced
89:98cd93e14777 90:d61f6bc04bf2
4946 int v23; // edx@18 4946 int v23; // edx@18
4947 int v24; // eax@18 4947 int v24; // eax@18
4948 Vec3_int_ v25; // ST04_12@19 4948 Vec3_int_ v25; // ST04_12@19
4949 unsigned int v26; // ebx@20 4949 unsigned int v26; // ebx@20
4950 Player *v27; // edi@20 4950 Player *v27; // edi@20
4951 char *v28; // edi@27 4951 Actor *v28; // edi@27
4952 int v29; // ebx@29 4952 int v29; // ebx@29
4953 int v30; // eax@29 4953 int v30; // eax@29
4954 int v31; // edx@29 4954 int v31; // edx@29
4955 int v32; // eax@29 4955 int v32; // eax@29
4956 int v33; // ST24_4@29 4956 int v33; // ST24_4@29
5085 } 5085 }
5086 } 5086 }
5087 uActorID = 0; 5087 uActorID = 0;
5088 if ( (signed int)uNumActors > 0 ) 5088 if ( (signed int)uNumActors > 0 )
5089 { 5089 {
5090 v28 = (char *)&pActors[0].vPosition.z; 5090 v28 = pActors;//[0].vPosition.z;
5091 do 5091 do
5092 { 5092 {
5093 if ( ((Actor *)(v28 - 146))->CanAct() ) 5093 if ( ((Actor *)(v28 - 146))->CanAct() )
5094 { 5094 {
5095 v29 = *(short *)v1; 5095 v29 = *(short *)v1;
5096 v30 = *((short *)v28 - 1) - *((short *)v1 - 100); 5096 v30 = *(&v28->vPosition.y - *((short *)v1 - 100);
5097 a1 = *((short *)v28 - 2) - *((short *)v1 - 200); 5097 a1 = *(&v28->vPosition.x - *((short *)v1 - 200);
5098 v31 = *(short *)v28; 5098 v31 = v28->vPosition.z;
5099 v48 = v30; 5099 v48 = v30;
5100 v44 = v31; 5100 v44 = v31;
5101 v32 = ((signed int)*((short *)v28 - 4) >> 1) - v29; 5101 v32 = (v28->uActorHeight >> 1) - v29;
5102 v33 = *((short *)v28 - 5) + *((short *)v1 + 100); 5102 v33 = *(&v28->uActorRadius + *((short *)v1 + 100);
5103 if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) ) 5103 if ( a1 * a1 + v48 * v48 + (v31 + v32) * (v31 + v32) < (unsigned int)(v33 * v33) )
5104 { 5104 {
5105 v34.z = *(short *)v1; 5105 v34.z = *(short *)v1;
5106 v34.y = *((short *)v1 - 100); 5106 v34.y = *((short *)v1 - 100);
5107 v34.x = *((short *)v1 - 200); 5107 v34.x = *((short *)v1 - 200);
5108 if ( sub_407A1C(*((short *)v28 - 2), *((short *)v28 - 1), *(short *)v28 + 50, v34) ) 5108 if ( sub_407A1C(v28->vPosition.x, v28->vPosition.y, v28->vPosition.z + 50, v34) )
5109 { 5109 {
5110 Vec3_int_::Normalize(&a1, &v48, &v44); 5110 Vec3_int_::Normalize(&a1, &v48, &v44);
5111 v35 = pVelocity; 5111 v35 = pVelocity;
5112 pVelocity->x = a1; 5112 pVelocity->x = a1;
5113 v35->y = v48; 5113 v35->y = v48;
5116 { 5116 {
5117 case 4: 5117 case 4:
5118 DamageMonsterFromParty(*((short *)v1 - 300), uActorID, v35); 5118 DamageMonsterFromParty(*((short *)v1 - 300), uActorID, v35);
5119 break; 5119 break;
5120 case 3: 5120 case 3:
5121 if ( v36 && pActors[v37].GetActorsRelation((Actor *)(v28 - 146)) ) 5121 if ( v36 && pActors[v37].GetActorsRelation(v28) )
5122 sub_43B1B0(*((short *)v1 - 300), uActorID, pVelocity, v36->field_61); 5122 sub_43B1B0(*((short *)v1 - 300), uActorID, pVelocity, v36->field_61);
5123 break; 5123 break;
5124 case 2: 5124 case 2:
5125 sub_43B057(*((short *)v1 - 300), uActorID, v35); 5125 sub_43B057(*((short *)v1 - 300), uActorID, v35);
5126 break; 5126 break;
5127 } 5127 }
5128 } 5128 }
5129 } 5129 }
5130 } 5130 }
5131 ++uActorID; 5131 ++uActorID;
5132 v28 += 836; 5132 ++v28;
5133 } 5133 }
5134 while ( (signed int)uActorID < (signed int)uNumActors ); 5134 while ( (signed int)uActorID < (signed int)uNumActors );
5135 } 5135 }
5136 } 5136 }
5137 ++pVelocity; 5137 ++pVelocity;