Mercurial > mm7
changeset 1854:a02d72dd7653
Merge
author | Grumpy7 |
---|---|
date | Mon, 14 Oct 2013 00:24:57 +0200 |
parents | 4ae5b7e7a920 (current diff) 3b39b70e8e93 (diff) |
children | 51e9b4621d0a |
files | |
diffstat | 6 files changed, 30 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/Indoor.cpp Mon Oct 14 00:24:28 2013 +0200 +++ b/Indoor.cpp Mon Oct 14 00:24:57 2013 +0200 @@ -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/NewUI/MainMenu.cpp Mon Oct 14 00:24:28 2013 +0200 +++ b/NewUI/MainMenu.cpp Mon Oct 14 00:24:57 2013 +0200 @@ -29,7 +29,7 @@ bool MainMenuWindow::Initialize() { auto background_texture = new RGBTexture; - background_texture->Load("newtitle.pcx", 0); + background_texture->Load("mm6title.pcx", 0); return true; }
--- a/Outdoor_stuff.h Mon Oct 14 00:24:28 2013 +0200 +++ b/Outdoor_stuff.h Mon Oct 14 00:24:57 2013 +0200 @@ -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 Mon Oct 14 00:24:28 2013 +0200 +++ b/Render.cpp Mon Oct 14 00:24:57 2013 +0200 @@ -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/Texture.cpp Mon Oct 14 00:24:28 2013 +0200 +++ b/Texture.cpp Mon Oct 14 00:24:57 2013 +0200 @@ -557,6 +557,7 @@ this->uWidth = header1.right - header1.left + 1; this->uHeight = header1.bottom - header1.up + 1; this->uNumPixels = (signed __int16)this->uWidth * (signed __int16)this->uHeight; + this->pPixels = (unsigned __int16 *)malloc(2 * this->uNumPixels + 4); if ( this->pPixels ) { if ( mode )
--- a/mm7_3.cpp Mon Oct 14 00:24:28 2013 +0200 +++ b/mm7_3.cpp Mon Oct 14 00:24:57 2013 +0200 @@ -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) --------------------------------------------------------