Mercurial > mm7
comparison IndoorCameraD3D.cpp @ 1641:466c5e15f524
Excess wrapper (IndoorLocation_drawstru) removed.
author | Nomad |
---|---|
date | Tue, 17 Sep 2013 18:39:32 +0200 |
parents | afc1c3514dd5 |
children | 8971dc85b8fb |
comparison
equal
deleted
inserted
replaced
1640:afc1c3514dd5 | 1641:466c5e15f524 |
---|---|
8 #include "LOD.h" | 8 #include "LOD.h" |
9 #include "Math.h" | 9 #include "Math.h" |
10 #include "mm7_data.h" | 10 #include "mm7_data.h" |
11 | 11 |
12 #include "stru9.h" | 12 #include "stru9.h" |
13 | |
14 | |
15 // calculates FOV (Field of View) angle in radians for IndoorCamera::Initialize and BLVRenderParams::Reset | |
16 float _calc_fov(int viewport_width, int angle_degree) | |
17 { | |
18 return viewport_width * 0.5 / tan(angle_degree / 2 * 0.01745329) + 0.5; | |
19 } | |
20 | |
13 | 21 |
14 | 22 |
15 //----- (004361EF) -------------------------------------------------------- | 23 //----- (004361EF) -------------------------------------------------------- |
16 IndoorCameraD3D::IndoorCameraD3D() | 24 IndoorCameraD3D::IndoorCameraD3D() |
17 { | 25 { |
1533 *a5 = floorf(a2a + 0.5f); | 1541 *a5 = floorf(a2a + 0.5f); |
1534 a2b = (double)z * fov * v6 + screenCenterY; | 1542 a2b = (double)z * fov * v6 + screenCenterY; |
1535 //v8 = a2b + 6.7553994e15; | 1543 //v8 = a2b + 6.7553994e15; |
1536 *a6 = pViewport->uViewportBR_Y - floorf(a2b + 0.5f); | 1544 *a6 = pViewport->uViewportBR_Y - floorf(a2b + 0.5f); |
1537 } | 1545 } |
1538 else | 1546 /*else |
1539 { | 1547 { |
1540 LODWORD(v9) = pBLVRenderParams->field_40 << 16; | 1548 LODWORD(v9) = pBLVRenderParams->fov_rad_fixpoint << 16; |
1541 HIDWORD(v9) = pBLVRenderParams->field_40 >> 16; | 1549 HIDWORD(v9) = pBLVRenderParams->fov_rad_fixpoint >> 16; |
1542 v10 = v9 / x; | 1550 v10 = v9 / x; |
1543 LODWORD(v9) = pBLVRenderParams->field_40 << 16; | 1551 LODWORD(v9) = pBLVRenderParams->fov_rad_fixpoint << 16; |
1544 HIDWORD(v9) = pBLVRenderParams->field_40 >> 16; | 1552 HIDWORD(v9) = pBLVRenderParams->fov_rad_fixpoint >> 16; |
1545 *a5 = pBLVRenderParams->uViewportCenterX | 1553 *a5 = pBLVRenderParams->uViewportCenterX |
1546 - ((signed int)(((unsigned __int64)(v10 * (signed __int64)y) >> 16) + 32768) >> 16); | 1554 - ((signed int)(((unsigned __int64)(v10 * (signed __int64)y) >> 16) + 32768) >> 16); |
1547 *a6 = pBLVRenderParams->uViewportCenterY - ((signed int)(((unsigned __int64)(v9 / x * z) >> 16) + 32768) >> 16); | 1555 *a6 = pBLVRenderParams->uViewportCenterY - ((signed int)(((unsigned __int64)(v9 / x * z) >> 16) + 32768) >> 16); |
1548 } | 1556 }*/ |
1549 } | 1557 } |
1550 | 1558 |
1551 //----- (00436A6D) -------------------------------------------------------- | 1559 //----- (00436A6D) -------------------------------------------------------- |
1552 double IndoorCameraD3D::GetPolygonMinZ(RenderVertexSoft *pVertices, unsigned int uStripType) | 1560 double IndoorCameraD3D::GetPolygonMinZ(RenderVertexSoft *pVertices, unsigned int uStripType) |
1553 { | 1561 { |