Mercurial > mm7
diff IndoorCameraD3D.cpp @ 1641:466c5e15f524
Excess wrapper (IndoorLocation_drawstru) removed.
author | Nomad |
---|---|
date | Tue, 17 Sep 2013 18:39:32 +0200 |
parents | afc1c3514dd5 |
children | 8971dc85b8fb |
line wrap: on
line diff
--- a/IndoorCameraD3D.cpp Tue Sep 17 17:40:59 2013 +0200 +++ b/IndoorCameraD3D.cpp Tue Sep 17 18:39:32 2013 +0200 @@ -12,6 +12,14 @@ #include "stru9.h" +// calculates FOV (Field of View) angle in radians for IndoorCamera::Initialize and BLVRenderParams::Reset +float _calc_fov(int viewport_width, int angle_degree) +{ + return viewport_width * 0.5 / tan(angle_degree / 2 * 0.01745329) + 0.5; +} + + + //----- (004361EF) -------------------------------------------------------- IndoorCameraD3D::IndoorCameraD3D() { @@ -1535,17 +1543,17 @@ //v8 = a2b + 6.7553994e15; *a6 = pViewport->uViewportBR_Y - floorf(a2b + 0.5f); } - else + /*else { - LODWORD(v9) = pBLVRenderParams->field_40 << 16; - HIDWORD(v9) = pBLVRenderParams->field_40 >> 16; + LODWORD(v9) = pBLVRenderParams->fov_rad_fixpoint << 16; + HIDWORD(v9) = pBLVRenderParams->fov_rad_fixpoint >> 16; v10 = v9 / x; - LODWORD(v9) = pBLVRenderParams->field_40 << 16; - HIDWORD(v9) = pBLVRenderParams->field_40 >> 16; + LODWORD(v9) = pBLVRenderParams->fov_rad_fixpoint << 16; + HIDWORD(v9) = pBLVRenderParams->fov_rad_fixpoint >> 16; *a5 = pBLVRenderParams->uViewportCenterX - ((signed int)(((unsigned __int64)(v10 * (signed __int64)y) >> 16) + 32768) >> 16); *a6 = pBLVRenderParams->uViewportCenterY - ((signed int)(((unsigned __int64)(v9 / x * z) >> 16) + 32768) >> 16); - } + }*/ } //----- (00436A6D) --------------------------------------------------------