Mercurial > mm7
diff Vis.cpp @ 1029:c94d6a37d298
Pointing a face with mouse fixed.
author | Nomad |
---|---|
date | Tue, 21 May 2013 12:10:08 +0200 |
parents | 6afa77761a00 |
children | 306ec23b37df d3f4c6584ada |
line wrap: on
line diff
--- a/Vis.cpp Tue May 21 11:24:35 2013 +0200 +++ b/Vis.cpp Tue May 21 12:10:08 2013 +0200 @@ -328,7 +328,7 @@ if ( Intersect_Ray_Face(pRay, pRay + 1, &fDepth, &a1, &pIndoor->pFaces[pFaceID], 0xFFFFFFFFu) ) { pGame->pIndoorCameraD3D->ViewTransform(&a1, 1); - v9 = _48B561_mess_with_scaling_along_z(/*v8, */a1.vWorldViewPosition.x); + v9 = fixpoint_from_float(/*v8, */a1.vWorldViewPosition.x); LOWORD(v9) = 0; v15 = (void *)((PID(OBJECT_BModel,pFaceID)) + v9); pNumPointers = &list->uNumPointers; @@ -379,7 +379,8 @@ if (Intersect_Ray_Face(pRay, pRay + 1, &fDepth, &intersection, &blv_face, i)) { pGame->pIndoorCameraD3D->ViewTransform(&intersection, 1); - int v13 = _48B561_mess_with_scaling_along_z(/*v12, */intersection.vWorldViewPosition.x); + int v13 = fixpoint_from_float(/*v12, */intersection.vWorldViewPosition.x); + v13 &= 0xFFFF0000; v13 += PID(OBJECT_BModel, j | (i << 6)); list->AddObject(face, VisObjectType_Face, v13); @@ -970,7 +971,7 @@ pStartR.x = pIndoorCamera->pos.x; pStartR.y = pIndoorCamera->pos.y; pRotX = pIndoorCamera->sRotationX + UnprojectY((signed __int64)fMouseY); - pDepth = _48B561_mess_with_scaling_along_z(/*(int)&fMouseX, */fPickDepth); + pDepth = fixpoint_from_float(fPickDepth); Vec3_int_::Rotate(pDepth, pRotY, pRotX, pStartR, &outx, &outy, &outz); v11[0].flt_2C = 0.0;