comparison SpriteObject.cpp @ 1643:7182930263b3

fixpoint functions renaming
author zipi
date Tue, 17 Sep 2013 19:24:23 +0100
parents 2d9c8f609a3c
children 35c1e4ff6ba7
comparison
equal deleted inserted replaced
1642:8971dc85b8fb 1643:7182930263b3
80 if ( a5 == 0 ) 80 if ( a5 == 0 )
81 { 81 {
82 pSpriteObjects[v6].vVelocity.z = 0; 82 pSpriteObjects[v6].vVelocity.z = 0;
83 if ( a4 ) 83 if ( a4 )
84 { 84 {
85 v13 = fixpoint_sub0(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch)); 85 v13 = fixpoint_mul(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch));
86 a5a = fixpoint_sub0(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch)); 86 a5a = fixpoint_mul(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch));
87 pSpriteObjects[v6].vVelocity.x = fixpoint_sub0(v13, a4); 87 pSpriteObjects[v6].vVelocity.x = fixpoint_mul(v13, a4);
88 pSpriteObjects[v6].vVelocity.y = fixpoint_sub0(a5a, a4); 88 pSpriteObjects[v6].vVelocity.y = fixpoint_mul(a5a, a4);
89 pSpriteObjects[v6].vVelocity.z = fixpoint_sub0(stru_5C6E00->Sin(pitch), a4); 89 pSpriteObjects[v6].vVelocity.z = fixpoint_mul(stru_5C6E00->Sin(pitch), a4);
90 } 90 }
91 else 91 else
92 { 92 {
93 pSpriteObjects[v6].vVelocity.y = 0; 93 pSpriteObjects[v6].vVelocity.y = 0;
94 pSpriteObjects[v6].vVelocity.x = 0; 94 pSpriteObjects[v6].vVelocity.x = 0;
105 Vec3_int_::Rotate(24, stru_5C6E00->uIntegerHalfPi + pSpriteObjects[v6].uFacing, 0, v17, &pSpriteObjects[v6].vPosition.x, 105 Vec3_int_::Rotate(24, stru_5C6E00->uIntegerHalfPi + pSpriteObjects[v6].uFacing, 0, v17, &pSpriteObjects[v6].vPosition.x,
106 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z); 106 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z);
107 pSpriteObjects[v6].vVelocity.z = 0; 107 pSpriteObjects[v6].vVelocity.z = 0;
108 if ( a4 ) 108 if ( a4 )
109 { 109 {
110 v13 = fixpoint_sub0(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch)); 110 v13 = fixpoint_mul(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch));
111 a5a = fixpoint_sub0(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch)); 111 a5a = fixpoint_mul(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch));
112 pSpriteObjects[v6].vVelocity.x = fixpoint_sub0(v13, a4); 112 pSpriteObjects[v6].vVelocity.x = fixpoint_mul(v13, a4);
113 pSpriteObjects[v6].vVelocity.y = fixpoint_sub0(a5a, a4); 113 pSpriteObjects[v6].vVelocity.y = fixpoint_mul(a5a, a4);
114 pSpriteObjects[v6].vVelocity.z = fixpoint_sub0(stru_5C6E00->Sin(pitch), a4); 114 pSpriteObjects[v6].vVelocity.z = fixpoint_mul(stru_5C6E00->Sin(pitch), a4);
115 } 115 }
116 else 116 else
117 { 117 {
118 pSpriteObjects[v6].vVelocity.y = 0; 118 pSpriteObjects[v6].vVelocity.y = 0;
119 pSpriteObjects[v6].vVelocity.x = 0; 119 pSpriteObjects[v6].vVelocity.x = 0;
130 Vec3_int_::Rotate(8, stru_5C6E00->uIntegerHalfPi + pSpriteObjects[v6].uFacing, 0, v17, &pSpriteObjects[v6].vPosition.x, 130 Vec3_int_::Rotate(8, stru_5C6E00->uIntegerHalfPi + pSpriteObjects[v6].uFacing, 0, v17, &pSpriteObjects[v6].vPosition.x,
131 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z); 131 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z);
132 pSpriteObjects[v6].vVelocity.z = 0; 132 pSpriteObjects[v6].vVelocity.z = 0;
133 if ( a4 ) 133 if ( a4 )
134 { 134 {
135 v13 = fixpoint_sub0(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch)) >> 16; 135 v13 = fixpoint_mul(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch)) >> 16;
136 a5a = fixpoint_sub0(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch)) >> 16; 136 a5a = fixpoint_mul(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch)) >> 16;
137 pSpriteObjects[v6].vVelocity.x = fixpoint_sub0(v13, a4); 137 pSpriteObjects[v6].vVelocity.x = fixpoint_mul(v13, a4);
138 pSpriteObjects[v6].vVelocity.y = fixpoint_sub0(a5a, a4); 138 pSpriteObjects[v6].vVelocity.y = fixpoint_mul(a5a, a4);
139 pSpriteObjects[v6].vVelocity.z = fixpoint_sub0(stru_5C6E00->Sin(pitch), a4); 139 pSpriteObjects[v6].vVelocity.z = fixpoint_mul(stru_5C6E00->Sin(pitch), a4);
140 } 140 }
141 else 141 else
142 { 142 {
143 pSpriteObjects[v6].vVelocity.y = 0; 143 pSpriteObjects[v6].vVelocity.y = 0;
144 pSpriteObjects[v6].vVelocity.x = 0; 144 pSpriteObjects[v6].vVelocity.x = 0;
155 Vec3_int_::Rotate(8, pSpriteObjects[v6].uFacing - stru_5C6E00->uIntegerHalfPi, 0, v17, &pSpriteObjects[v6].vPosition.x, 155 Vec3_int_::Rotate(8, pSpriteObjects[v6].uFacing - stru_5C6E00->uIntegerHalfPi, 0, v17, &pSpriteObjects[v6].vPosition.x,
156 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z); 156 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z);
157 pSpriteObjects[v6].vVelocity.z = 0; 157 pSpriteObjects[v6].vVelocity.z = 0;
158 if ( a4 ) 158 if ( a4 )
159 { 159 {
160 v13 = fixpoint_sub0(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch)); 160 v13 = fixpoint_mul(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch));
161 a5a = fixpoint_sub0(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch)); 161 a5a = fixpoint_mul(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch));
162 pSpriteObjects[v6].vVelocity.x = fixpoint_sub0(v13, a4); 162 pSpriteObjects[v6].vVelocity.x = fixpoint_mul(v13, a4);
163 pSpriteObjects[v6].vVelocity.y = fixpoint_sub0(a5a, a4); 163 pSpriteObjects[v6].vVelocity.y = fixpoint_mul(a5a, a4);
164 pSpriteObjects[v6].vVelocity.z = fixpoint_sub0(stru_5C6E00->Sin(pitch), a4); 164 pSpriteObjects[v6].vVelocity.z = fixpoint_mul(stru_5C6E00->Sin(pitch), a4);
165 } 165 }
166 else 166 else
167 { 167 {
168 pSpriteObjects[v6].vVelocity.y = 0; 168 pSpriteObjects[v6].vVelocity.y = 0;
169 pSpriteObjects[v6].vVelocity.x = 0; 169 pSpriteObjects[v6].vVelocity.x = 0;
180 Vec3_int_::Rotate(24, pSpriteObjects[v6].uFacing - stru_5C6E00->uIntegerHalfPi, 0, v17, &pSpriteObjects[v6].vPosition.x, 180 Vec3_int_::Rotate(24, pSpriteObjects[v6].uFacing - stru_5C6E00->uIntegerHalfPi, 0, v17, &pSpriteObjects[v6].vPosition.x,
181 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z); 181 &pSpriteObjects[v6].vPosition.y, &pSpriteObjects[v6].vPosition.z);
182 pSpriteObjects[v6].vVelocity.z = 0; 182 pSpriteObjects[v6].vVelocity.z = 0;
183 if ( a4 ) 183 if ( a4 )
184 { 184 {
185 v13 = fixpoint_sub0(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch)); 185 v13 = fixpoint_mul(stru_5C6E00->Cos(angle), stru_5C6E00->Cos(pitch));
186 a5a = fixpoint_sub0(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch)); 186 a5a = fixpoint_mul(stru_5C6E00->Sin(angle), stru_5C6E00->Cos(pitch));
187 pSpriteObjects[v6].vVelocity.x = fixpoint_sub0(v13, a4); 187 pSpriteObjects[v6].vVelocity.x = fixpoint_mul(v13, a4);
188 pSpriteObjects[v6].vVelocity.y = fixpoint_sub0(a5a, a4); 188 pSpriteObjects[v6].vVelocity.y = fixpoint_mul(a5a, a4);
189 pSpriteObjects[v6].vVelocity.z = fixpoint_sub0(stru_5C6E00->Sin(pitch), a4); 189 pSpriteObjects[v6].vVelocity.z = fixpoint_mul(stru_5C6E00->Sin(pitch), a4);
190 } 190 }
191 else 191 else
192 { 192 {
193 pSpriteObjects[v6].vVelocity.y = 0; 193 pSpriteObjects[v6].vVelocity.y = 0;
194 pSpriteObjects[v6].vVelocity.x = 0; 194 pSpriteObjects[v6].vVelocity.x = 0;
309 v1->vPosition.z = v8; 309 v1->vPosition.z = v8;
310 ODM_GetTerrainNormalAt(v12, v11, &v51); 310 ODM_GetTerrainNormalAt(v12, v11, &v51);
311 v1->vVelocity.z -= LOWORD(pEventTimer->uTimeElapsed) * GetGravityStrength(); 311 v1->vVelocity.z -= LOWORD(pEventTimer->uTimeElapsed) * GetGravityStrength();
312 v56 = abs(v51.y * v1->vVelocity.y + v51.z * v1->vVelocity.z + v51.x * v1->vVelocity.x) >> 16; 312 v56 = abs(v51.y * v1->vVelocity.y + v51.z * v1->vVelocity.z + v51.x * v1->vVelocity.x) >> 16;
313 //v60 = ((unsigned __int64)(v56 * (signed __int64)v51.x) >> 16); 313 //v60 = ((unsigned __int64)(v56 * (signed __int64)v51.x) >> 16);
314 v1->vVelocity.x += fixpoint_sub0(v56, v51.x); 314 v1->vVelocity.x += fixpoint_mul(v56, v51.x);
315 //v60 = ((unsigned __int64)(v56 * (signed __int64)v51.y) >> 16); 315 //v60 = ((unsigned __int64)(v56 * (signed __int64)v51.y) >> 16);
316 v1->vVelocity.y += fixpoint_sub0(v56, v51.y); 316 v1->vVelocity.y += fixpoint_mul(v56, v51.y);
317 //v60 = ((unsigned __int64)(v56 * (signed __int64)v51.z) >> 16); 317 //v60 = ((unsigned __int64)(v56 * (signed __int64)v51.z) >> 16);
318 v1->vVelocity.z += fixpoint_sub0(v56, v51.z); 318 v1->vVelocity.z += fixpoint_mul(v56, v51.z);
319 LABEL_12: 319 LABEL_12:
320 v7 = v54; 320 v7 = v54;
321 goto LABEL_13; 321 goto LABEL_13;
322 } 322 }
323 if ( v10 & 0x40 ) 323 if ( v10 & 0x40 )
329 } 329 }
330 v1->vPosition.z = v8; 330 v1->vPosition.z = v8;
331 if ( !(v2->uFlags & OBJECT_DESC_BOUNCE) || (v21 = -v1->vVelocity.z >> 1, v1->vVelocity.z = v21, (signed __int16)v21 < 10) ) 331 if ( !(v2->uFlags & OBJECT_DESC_BOUNCE) || (v21 = -v1->vVelocity.z >> 1, v1->vVelocity.z = v21, (signed __int16)v21 < 10) )
332 v1->vVelocity.z = 0; 332 v1->vVelocity.z = 0;
333 333
334 v1->vVelocity.x = fixpoint_sub0(58500, v1->vVelocity.x); 334 v1->vVelocity.x = fixpoint_mul(58500, v1->vVelocity.x);
335 v1->vVelocity.y = fixpoint_sub0(58500, v1->vVelocity.y); 335 v1->vVelocity.y = fixpoint_mul(58500, v1->vVelocity.y);
336 v1->vVelocity.z = fixpoint_sub0(58500, v1->vVelocity.z); 336 v1->vVelocity.z = fixpoint_mul(58500, v1->vVelocity.z);
337 337
338 if ( (v1->vVelocity.y * v1->vVelocity.y + v1->vVelocity.x * v1->vVelocity.x) < 400 ) 338 if ( (v1->vVelocity.y * v1->vVelocity.y + v1->vVelocity.x * v1->vVelocity.x) < 400 )
339 { 339 {
340 340
341 v1->vVelocity.y = 0; 341 v1->vVelocity.y = 0;
501 pGame->pParticleEngine->AddParticle(&Dst); 501 pGame->pParticleEngine->AddParticle(&Dst);
502 } 502 }
503 return; 503 return;
504 } 504 }
505 //v60 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.x) >> 16); 505 //v60 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.x) >> 16);
506 v1->vPosition.x += fixpoint_sub0(stru_721530.field_7C, stru_721530.direction.x); 506 v1->vPosition.x += fixpoint_mul(stru_721530.field_7C, stru_721530.direction.x);
507 //v60 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.y) >> 16); 507 //v60 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.y) >> 16);
508 v1->vPosition.y += fixpoint_sub0(stru_721530.field_7C, stru_721530.direction.y); 508 v1->vPosition.y += fixpoint_mul(stru_721530.field_7C, stru_721530.direction.y);
509 //v60 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.z) >> 16); 509 //v60 = ((unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.z) >> 16);
510 v28 = LOWORD(stru_721530.uSectorID); 510 v28 = LOWORD(stru_721530.uSectorID);
511 v1->vPosition.z += fixpoint_sub0(stru_721530.field_7C, stru_721530.direction.z); 511 v1->vPosition.z += fixpoint_mul(stru_721530.field_7C, stru_721530.direction.z);
512 v29 = v1->vPosition.z; 512 v29 = v1->vPosition.z;
513 v1->uSectorID = v28; 513 v1->uSectorID = v28;
514 stru_721530.field_70 += stru_721530.field_7C; 514 stru_721530.field_70 += stru_721530.field_7C;
515 if ( v2->uFlags & OBJECT_DESC_INTERACTABLE ) 515 if ( v2->uFlags & OBJECT_DESC_INTERACTABLE )
516 { 516 {
784 Dst.flt_28 = 1.0; 784 Dst.flt_28 = 1.0;
785 pGame->pParticleEngine->AddParticle(&Dst); 785 pGame->pParticleEngine->AddParticle(&Dst);
786 return; 786 return;
787 } 787 }
788 //v40 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.x) >> 16; 788 //v40 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.x) >> 16;
789 pSpriteObject->vPosition.x += fixpoint_sub0(stru_721530.field_7C, stru_721530.direction.x); 789 pSpriteObject->vPosition.x += fixpoint_mul(stru_721530.field_7C, stru_721530.direction.x);
790 //v40 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.y) >> 16; 790 //v40 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.y) >> 16;
791 pSpriteObject->vPosition.y += fixpoint_sub0(stru_721530.field_7C, stru_721530.direction.y); 791 pSpriteObject->vPosition.y += fixpoint_mul(stru_721530.field_7C, stru_721530.direction.y);
792 //v40 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.z) >> 16; 792 //v40 = (unsigned __int64)(stru_721530.field_7C * (signed __int64)stru_721530.direction.z) >> 16;
793 pSpriteObject->vPosition.z += fixpoint_sub0(stru_721530.field_7C, stru_721530.direction.z); 793 pSpriteObject->vPosition.z += fixpoint_mul(stru_721530.field_7C, stru_721530.direction.z);
794 pSpriteObject->uSectorID = stru_721530.uSectorID; 794 pSpriteObject->uSectorID = stru_721530.uSectorID;
795 stru_721530.field_70 += stru_721530.field_7C; 795 stru_721530.field_70 += stru_721530.field_7C;
796 if ( pObject->uFlags & 0x40 && !_46BFFA_check_object_intercept(uLayingItemID, stru_721530.uFaceID) ) 796 if ( pObject->uFlags & 0x40 && !_46BFFA_check_object_intercept(uLayingItemID, stru_721530.uFaceID) )
797 return; 797 return;
798 v15 = (signed int)stru_721530.uFaceID >> 3; 798 v15 = (signed int)stru_721530.uFaceID >> 3;
799 if (PID_TYPE(stru_721530.uFaceID) == OBJECT_Decoration) 799 if (PID_TYPE(stru_721530.uFaceID) == OBJECT_Decoration)
800 { 800 {
801 v40 = integer_sqrt(pSpriteObject->vVelocity.x * pSpriteObject->vVelocity.x + pSpriteObject->vVelocity.y * pSpriteObject->vVelocity.y); 801 v40 = integer_sqrt(pSpriteObject->vVelocity.x * pSpriteObject->vVelocity.x + pSpriteObject->vVelocity.y * pSpriteObject->vVelocity.y);
802 v23 = stru_5C6E00->Atan2(pSpriteObject->vPosition.x - pLevelDecorations[v15].vPosition.x, 802 v23 = stru_5C6E00->Atan2(pSpriteObject->vPosition.x - pLevelDecorations[v15].vPosition.x,
803 pSpriteObject->vPosition.y - pLevelDecorations[v15].vPosition.y); 803 pSpriteObject->vPosition.y - pLevelDecorations[v15].vPosition.y);
804 pSpriteObject->vVelocity.x = fixpoint_sub0(stru_5C6E00->Cos(v23), v40); 804 pSpriteObject->vVelocity.x = fixpoint_mul(stru_5C6E00->Cos(v23), v40);
805 pSpriteObject->vVelocity.y = fixpoint_sub0(stru_5C6E00->Sin(v23), v40); 805 pSpriteObject->vVelocity.y = fixpoint_mul(stru_5C6E00->Sin(v23), v40);
806 } 806 }
807 else 807 else
808 { 808 {
809 if (PID_TYPE(stru_721530.uFaceID) != OBJECT_BModel) 809 if (PID_TYPE(stru_721530.uFaceID) != OBJECT_BModel)
810 goto LABEL_64; 810 goto LABEL_64;
814 { 814 {
815 v42 = abs(v16->pFacePlane_old.vNormal.x * pSpriteObject->vVelocity.x + v16->pFacePlane_old.vNormal.z * pSpriteObject->vVelocity.z 815 v42 = abs(v16->pFacePlane_old.vNormal.x * pSpriteObject->vVelocity.x + v16->pFacePlane_old.vNormal.z * pSpriteObject->vVelocity.z
816 + v16->pFacePlane_old.vNormal.y * pSpriteObject->vVelocity.y) >> 16; 816 + v16->pFacePlane_old.vNormal.y * pSpriteObject->vVelocity.y) >> 16;
817 if ( (stru_721530.speed >> 3) > v42 ) 817 if ( (stru_721530.speed >> 3) > v42 )
818 v42 = stru_721530.speed >> 3; 818 v42 = stru_721530.speed >> 3;
819 pSpriteObject->vVelocity.x += 2 * fixpoint_sub0(v42, v16->pFacePlane_old.vNormal.x); 819 pSpriteObject->vVelocity.x += 2 * fixpoint_mul(v42, v16->pFacePlane_old.vNormal.x);
820 pSpriteObject->vVelocity.y += 2 * fixpoint_sub0(v42, v16->pFacePlane_old.vNormal.y); 820 pSpriteObject->vVelocity.y += 2 * fixpoint_mul(v42, v16->pFacePlane_old.vNormal.y);
821 v39 = fixpoint_sub0(v42, v16->pFacePlane_old.vNormal.z); 821 v39 = fixpoint_mul(v42, v16->pFacePlane_old.vNormal.z);
822 if ( v16->pFacePlane_old.vNormal.z <= 32000 ) 822 if ( v16->pFacePlane_old.vNormal.z <= 32000 )
823 { 823 {
824 v22 = 2 * v39; 824 v22 = 2 * v39;
825 } 825 }
826 else 826 else
827 { 827 {
828 pSpriteObject->vVelocity.z += v39; 828 pSpriteObject->vVelocity.z += v39;
829 v22 = fixpoint_sub0(32000, v39); 829 v22 = fixpoint_mul(32000, v39);
830 } 830 }
831 pSpriteObject->vVelocity.z += v22; 831 pSpriteObject->vVelocity.z += v22;
832 if ( BYTE3(v16->uAttributes) & 0x10 ) 832 if ( BYTE3(v16->uAttributes) & 0x10 )
833 EventProcessor(pIndoor->pFaceExtras[v16->uFaceExtraID].uEventID, 0, 1); 833 EventProcessor(pIndoor->pFaceExtras[v16->uFaceExtraID].uEventID, 0, 1);
834 goto LABEL_63; 834 goto LABEL_63;
859 pSpriteObject->vPosition.z = v20[*v16->pVertexIDs].z + 1; 859 pSpriteObject->vPosition.z = v20[*v16->pVertexIDs].z + 1;
860 } 860 }
861 LABEL_63: 861 LABEL_63:
862 //v2 = v37; 862 //v2 = v37;
863 LABEL_64: 863 LABEL_64:
864 pSpriteObject->vVelocity.x = fixpoint_sub0(58500, pSpriteObject->vVelocity.x); 864 pSpriteObject->vVelocity.x = fixpoint_mul(58500, pSpriteObject->vVelocity.x);
865 pSpriteObject->vVelocity.y = fixpoint_sub0(58500, pSpriteObject->vVelocity.y); 865 pSpriteObject->vVelocity.y = fixpoint_mul(58500, pSpriteObject->vVelocity.y);
866 pSpriteObject->vVelocity.z = fixpoint_sub0(58500, pSpriteObject->vVelocity.z); 866 pSpriteObject->vVelocity.z = fixpoint_mul(58500, pSpriteObject->vVelocity.z);
867 ++uFaceID; 867 ++uFaceID;
868 v28 = __OFSUB__(uFaceID, 100); 868 v28 = __OFSUB__(uFaceID, 100);
869 v27 = uFaceID - 100 < 0; 869 v27 = uFaceID - 100 < 0;
870 if ( !(v27 ^ v28) ) 870 if ( !(v27 ^ v28) )
871 return; 871 return;
891 { 891 {
892 if ( v7->pFacePlane_old.vNormal.z < 45000 ) 892 if ( v7->pFacePlane_old.vNormal.z < 45000 )
893 pSpriteObject->vVelocity.z -= LOWORD(pEventTimer->uTimeElapsed) * GetGravityStrength(); 893 pSpriteObject->vVelocity.z -= LOWORD(pEventTimer->uTimeElapsed) * GetGravityStrength();
894 v8 = 0; 894 v8 = 0;
895 } 895 }
896 pSpriteObject->vVelocity.x = fixpoint_sub0(58500, pSpriteObject->vVelocity.x); 896 pSpriteObject->vVelocity.x = fixpoint_mul(58500, pSpriteObject->vVelocity.x);
897 pSpriteObject->vVelocity.y = fixpoint_sub0(58500, pSpriteObject->vVelocity.y); 897 pSpriteObject->vVelocity.y = fixpoint_mul(58500, pSpriteObject->vVelocity.y);
898 pSpriteObject->vVelocity.z = fixpoint_sub0(58500, pSpriteObject->vVelocity.z); 898 pSpriteObject->vVelocity.z = fixpoint_mul(58500, pSpriteObject->vVelocity.z);
899 v9 = pSpriteObject->vVelocity.x; 899 v9 = pSpriteObject->vVelocity.x;
900 if ( v9 * v9 + pSpriteObject->vVelocity.y * pSpriteObject->vVelocity.y < 400 ) 900 if ( v9 * v9 + pSpriteObject->vVelocity.y * pSpriteObject->vVelocity.y < 400 )
901 { 901 {
902 pSpriteObject->vVelocity.z = v8; 902 pSpriteObject->vVelocity.z = v8;
903 pSpriteObject->vVelocity.y = v8; 903 pSpriteObject->vVelocity.y = v8;