Mercurial > mm7
changeset 1845:f3db8e8cbad5
Merge
author | Ritor1 |
---|---|
date | Sun, 13 Oct 2013 22:53:45 +0600 |
parents | 4359a15360e3 (diff) 2e6d3cd052e0 (current diff) |
children | 7954c2f385b5 |
files | |
diffstat | 4 files changed, 28 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/Indoor.cpp Sun Oct 13 07:18:03 2013 +0200 +++ b/Indoor.cpp Sun Oct 13 22:53:45 2013 +0600 @@ -5182,13 +5182,13 @@ this->angle_from_north = fixpoint_mul(v19, v28) + fixpoint_mul(a4, v9); this->angle_from_west = fixpoint_mul(a3, v8) - fixpoint_mul(a2, v29); - this->field_14 = fixpoint_mul(a4, v28) - fixpoint_mul(v19, v9); + this->viewing_angle_from_west_east = fixpoint_mul(a4, v28) - fixpoint_mul(v19, v9); } else { this->angle_from_north = fixpoint_mul(a2, v8) + fixpoint_mul(a3, v29); this->angle_from_west = fixpoint_mul(a3, v8) - fixpoint_mul(a2, v29); - this->field_14 = a4; + this->viewing_angle_from_west_east = a4; } if (pGame->pIndoorCameraD3D->sRotationX) @@ -5197,25 +5197,25 @@ this->angle_from_east = fixpoint_mul(v21, v28) + fixpoint_mul(a7, v9); this->angle_from_south = fixpoint_mul(a6, v8) - fixpoint_mul(a5, v29); - this->viewing_angle = fixpoint_mul(a7, v28) - fixpoint_mul(v21, v9); + this->viewing_angle_from_north_south = fixpoint_mul(a7, v28) - fixpoint_mul(v21, v9); } else { this->angle_from_east = fixpoint_mul(a5, v8) + fixpoint_mul(a6, v29); this->angle_from_south = fixpoint_mul(a6, v8) - fixpoint_mul(a5, v29); - this->viewing_angle = a7; + this->viewing_angle_from_north_south = a7; } this->angle_from_east = -this->angle_from_east; this->angle_from_south = -this->angle_from_south; - this->viewing_angle = -this->viewing_angle; + this->viewing_angle_from_north_south = -this->viewing_angle_from_north_south; this->field_24 = fixpoint_dot(this->angle_from_north, this->field_0_party_dir_x, this->angle_from_west, this->field_4_party_dir_y, - this->field_14, this->field_8_party_dir_z); + this->viewing_angle_from_west_east, this->field_8_party_dir_z); this->field_28 = fixpoint_dot(this->angle_from_east, this->field_0_party_dir_x, this->angle_from_south, this->field_4_party_dir_y, - this->viewing_angle, this->field_8_party_dir_z); + this->viewing_angle_from_north_south, this->field_8_party_dir_z); } //----- (00407A1C) -------------------------------------------------------- bool __fastcall sub_407A1C(int x, int z, int y, Vec3_int_ v)
--- a/Outdoor_stuff.h Sun Oct 13 07:18:03 2013 +0200 +++ b/Outdoor_stuff.h Sun Oct 13 22:53:45 2013 +0600 @@ -77,10 +77,10 @@ int field_8_party_dir_z; int angle_from_north;//field_C int angle_from_west;//field_10 - int field_14; + int viewing_angle_from_west_east; int angle_from_east;//field_18 int angle_from_south;//field_1C - int viewing_angle;//field_20 + int viewing_angle_from_north_south;//field_20 int field_24; int field_28; };
--- a/Render.cpp Sun Oct 13 07:18:03 2013 +0200 +++ b/Render.cpp Sun Oct 13 22:53:45 2013 +0600 @@ -5161,10 +5161,10 @@ while ( 2 ) { v15 = (void *)(v72 * (v70 - (int)array_507D30[_507D30_idx].vWorldViewProjY)); - v77 = (unsigned __int64)(v62.ptr_38->field_14 * (signed __int64)(signed int)v15) >> 16; + v77 = (unsigned __int64)(v62.ptr_38->viewing_angle_from_west_east * (signed __int64)(signed int)v15) >> 16; v74 = v77 + v62.ptr_38->angle_from_north; v77 = (int)v15; - v77 = (unsigned __int64)(v62.ptr_38->viewing_angle * (signed __int64)(signed int)v15) >> 16; + v77 = (unsigned __int64)(v62.ptr_38->viewing_angle_from_north_south * (signed __int64)(signed int)v15) >> 16; v79 = v15; v75 = (RenderVertexSoft *)(v77 + v62.ptr_38->angle_from_east); v79 = (void *)((unsigned __int64)(v62.v_18.z * (signed __int64)(signed int)v15) >> 16); @@ -5276,12 +5276,12 @@ do { v35 = (const void *)(v72 * (v70 - (unsigned __int64)(signed __int64)*(float *)v34)); - v78 = v62.ptr_38->field_14; + v78 = v62.ptr_38->viewing_angle_from_west_east; v81 = (const void *)((unsigned __int64)(v78 * (signed __int64)(signed int)v35) >> 16); v36 = (int)((char *)v81 + v62.ptr_38->angle_from_north); v81 = v35; v74 = v36; - v78 = v62.ptr_38->viewing_angle; + v78 = v62.ptr_38->viewing_angle_from_north_south; v81 = (const void *)((unsigned __int64)(v78 * (signed __int64)(signed int)v35) >> 16); v78 = (int)v35; v75 = (RenderVertexSoft *)((char *)v81 + v62.ptr_38->angle_from_east);
--- a/mm7_3.cpp Sun Oct 13 07:18:03 2013 +0200 +++ b/mm7_3.cpp Sun Oct 13 22:53:45 2013 +0600 @@ -4958,10 +4958,12 @@ //rotate skydome(вращение купола неба)-------------------------------------- // В игре принята своя система измерения углов. Полный угол (180). Значению угла 0 соответствует // направление на север и/или юг (либо на восток и/или запад), значению 65536 еденицам(0х10000) соответствует угол 90. - v39 = (unsigned __int64)(pSkyPolygon.ptr_38->field_14 * (signed __int64)(v33 * (v30 - array_50AC10[i].vWorldViewProjY))) >> 16; + // две переменные хранят данные по углу обзора. field_14 по западу и востоку. field_20 по югу и северу + // от -25080 до 25080 + v39 = (unsigned __int64)(pSkyPolygon.ptr_38->viewing_angle_from_west_east * (signed __int64)(v33 * (v30 - array_50AC10[i].vWorldViewProjY))) >> 16; v35 = v39 + pSkyPolygon.ptr_38->angle_from_north; - v39 = (unsigned __int64)(pSkyPolygon.ptr_38->viewing_angle * (signed __int64)(v33 * (v30 - array_50AC10[i].vWorldViewProjY))) >> 16; + v39 = (unsigned __int64)(pSkyPolygon.ptr_38->viewing_angle_from_north_south * (signed __int64)(v33 * (v30 - array_50AC10[i].vWorldViewProjY))) >> 16; v36 = v39 + pSkyPolygon.ptr_38->angle_from_east; v38 = pSkyPolygon.v_18.z; @@ -5002,7 +5004,7 @@ } LODWORD(v17) = LODWORD(v34) << 16; HIDWORD(v17) = v34 >> 16; - v40 = v17 / v38; + //v40 = v17 / v38; v18 = v17 / v38; if ( v18 < 0 ) v18 = pODMRenderParams->shading_dist_mist; @@ -5725,13 +5727,13 @@ this->angle_from_north = fixpoint_mul(v17, v25) + fixpoint_mul(a4, v27); this->angle_from_west = fixpoint_mul(a3, v9) - fixpoint_mul(a2, v7); - this->field_14 = fixpoint_mul(a4, v25) - fixpoint_mul(v17, v27); + this->viewing_angle_from_west_east = fixpoint_mul(a4, v25) - fixpoint_mul(v17, v27); } else { this->angle_from_north = fixpoint_mul(a2, v9) + fixpoint_mul(a3, v7); this->angle_from_west = fixpoint_mul(a3, v9) - fixpoint_mul(a2, v7); - this->field_14 = a4; + this->viewing_angle_from_west_east = a4; } if (pGame->pIndoorCameraD3D->sRotationX) @@ -5740,25 +5742,25 @@ this->angle_from_east = fixpoint_mul(v19, v25) + fixpoint_mul(a7, v27); this->angle_from_south = fixpoint_mul(a6, v9) - fixpoint_mul(a5, v7); - this->viewing_angle = fixpoint_mul(a7, v25) - fixpoint_mul(v19, v27); + this->viewing_angle_from_north_south = fixpoint_mul(a7, v25) - fixpoint_mul(v19, v27); } else { this->angle_from_east = fixpoint_mul(a5, v9) + fixpoint_mul(a6, v7); this->angle_from_south = fixpoint_mul(a6, v9) - fixpoint_mul(a5, v7); - this->viewing_angle = a7; + this->viewing_angle_from_north_south = a7; } this->angle_from_east = -this->angle_from_east; this->angle_from_south = -this->angle_from_south; - this->viewing_angle = -this->viewing_angle; + this->viewing_angle_from_north_south = -this->viewing_angle_from_north_south; this->field_24 = fixpoint_dot(this->angle_from_north, this->field_0_party_dir_x, this->angle_from_west, this->field_4_party_dir_y, - this->field_14, this->field_8_party_dir_z); + this->viewing_angle_from_west_east, this->field_8_party_dir_z); this->field_28 = fixpoint_dot(this->angle_from_east, this->field_0_party_dir_x, this->angle_from_south, this->field_4_party_dir_y, - this->viewing_angle, this->field_8_party_dir_z); + this->viewing_angle_from_north_south, this->field_8_party_dir_z); } //----- (0048694B) -------------------------------------------------------- @@ -5766,14 +5768,14 @@ { this->angle_from_east = -this->angle_from_east; this->angle_from_south = -this->angle_from_south; - this->viewing_angle = -this->viewing_angle; + this->viewing_angle_from_north_south = -this->viewing_angle_from_north_south; this->field_24 = fixpoint_dot(this->angle_from_north, this->field_0_party_dir_x, this->angle_from_west, this->field_4_party_dir_y, - this->field_14, this->field_8_party_dir_z); + this->viewing_angle_from_west_east, this->field_8_party_dir_z); this->field_28 = fixpoint_dot(this->angle_from_east, this->field_0_party_dir_x, this->angle_from_south, this->field_4_party_dir_y, - this->viewing_angle, this->field_8_party_dir_z); + this->viewing_angle_from_north_south, this->field_8_party_dir_z); } //----- (0044100D) --------------------------------------------------------