Mercurial > mm7
changeset 1837:303a56458f7b
viewing_angle
author | Ritor1 |
---|---|
date | Fri, 11 Oct 2013 23:57:14 +0600 |
parents | f017f8e79aa1 |
children | 175bf8da83d9 4359a15360e3 |
files | Indoor.cpp Outdoor_stuff.h Render.cpp UI/UIPopup.cpp Viewport.cpp mm7_2.cpp mm7_3.cpp |
diffstat | 7 files changed, 28 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/Indoor.cpp Fri Oct 11 18:55:43 2013 +0600 +++ b/Indoor.cpp Fri Oct 11 23:57:14 2013 +0600 @@ -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->field_20 = fixpoint_mul(a7, v28) - fixpoint_mul(v21, v9); + this->viewing_angle = 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->field_20 = a7; + this->viewing_angle = a7; } this->angle_from_east = -this->angle_from_east; this->angle_from_south = -this->angle_from_south; - this->field_20 = -this->field_20; + this->viewing_angle = -this->viewing_angle; 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->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->field_20, this->field_8_party_dir_z); + this->viewing_angle, this->field_8_party_dir_z); } //----- (00407A1C) -------------------------------------------------------- bool __fastcall sub_407A1C(int x, int z, int y, Vec3_int_ v)
--- a/Outdoor_stuff.h Fri Oct 11 18:55:43 2013 +0600 +++ b/Outdoor_stuff.h Fri Oct 11 23:57:14 2013 +0600 @@ -80,7 +80,7 @@ int field_14; int angle_from_east;//field_18 int angle_from_south;//field_1C - int field_20; + int viewing_angle;//field_20 int field_24; int field_28; };
--- a/Render.cpp Fri Oct 11 18:55:43 2013 +0600 +++ b/Render.cpp Fri Oct 11 23:57:14 2013 +0600 @@ -5164,7 +5164,7 @@ v77 = (unsigned __int64)(v62.ptr_38->field_14 * (signed __int64)(signed int)v15) >> 16; v74 = v77 + v62.ptr_38->angle_from_north; v77 = (int)v15; - v77 = (unsigned __int64)(v62.ptr_38->field_20 * (signed __int64)(signed int)v15) >> 16; + v77 = (unsigned __int64)(v62.ptr_38->viewing_angle * (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); @@ -5281,7 +5281,7 @@ v36 = (int)((char *)v81 + v62.ptr_38->angle_from_north); v81 = v35; v74 = v36; - v78 = v62.ptr_38->field_20; + v78 = v62.ptr_38->viewing_angle; 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/UI/UIPopup.cpp Fri Oct 11 18:55:43 2013 +0600 +++ b/UI/UIPopup.cpp Fri Oct 11 23:57:14 2013 +0600 @@ -1594,17 +1594,17 @@ double v31; // st7@112 Vec3_int_ v39; // [sp-18h] [bp-A8h]@83 GUIWindow message_window; // [sp+Ch] [bp-84h]@137 - POINT a2; // [sp+78h] [bp-18h]@2 + POINT cursor; // [sp+78h] [bp-18h]@2 unsigned int damage_level; // [sp+8Ch] [bp-4h]@23 if (no_rightlick_in_inventory) return; - pMouse->GetCursorPos(&a2); - int item_pid = (pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF) - 1; + pMouse->GetCursorPos(&cursor); + int item_pid = (pRenderer->pActiveZBuffer[cursor.x + pSRZBufferLineOffsets[cursor.y]] & 0xFFFF) - 1; auto item = &pPlayers[uActiveCharacter]->pInventoryItemList[item_pid]; - if (a2.x <= 13 || a2.x >= 462)//items out of inventory(вещи вне инвентаря) + if (cursor.x <= 13 || cursor.x >= 462)//items out of inventory(вещи вне инвентаря) { GameUI_DrawItemInfo(item); return; @@ -1612,8 +1612,8 @@ if (!item_pid) { - int inventory_mouse_x = a2.x - 14; - int inventory_mouse_y = a2.y - 17; + int inventory_mouse_x = cursor.x - 14; + int inventory_mouse_y = cursor.y - 17; int mouse_cell_x = inventory_mouse_x / 32; int mouse_cell_y = inventory_mouse_y / 32; @@ -1637,10 +1637,10 @@ message_window.Hint = pTmpBuf.data(); message_window.uFrameWidth = 384; message_window.uFrameHeight = 180; - if (a2.x <= 320 ) - message_window.uFrameX = a2.x + 30; + if (cursor.x <= 320 ) + message_window.uFrameX = cursor.x + 30; else - message_window.uFrameX = a2.x - 414; + message_window.uFrameX = cursor.x - 414; message_window.uFrameY = 40; message_window.DrawMessageBox(0); return;
--- a/Viewport.cpp Fri Oct 11 18:55:43 2013 +0600 +++ b/Viewport.cpp Fri Oct 11 23:57:14 2013 +0600 @@ -551,6 +551,8 @@ return; } pEventID = pLevelDecorations[(signed int)(unsigned __int16)v0 >> 3].uEventID; + EventProcessor(pEventID, (unsigned __int16)v0, 1); + return; } if ( PID_TYPE(v0) == OBJECT_BModel && HIWORD(v0) < clickable_distance) { @@ -667,7 +669,7 @@ { if ( !pParty->pPickedItem.uItemID ) return; - __debugbreak();//no checker + __debugbreak();//no checker v6 = 0; a1.uType = pItemsTable->pItems[pParty->pPickedItem.uItemID].uSpriteID; if ( (signed int)pObjectList->uNumObjects <= 0 )
--- a/mm7_2.cpp Fri Oct 11 18:55:43 2013 +0600 +++ b/mm7_2.cpp Fri Oct 11 23:57:14 2013 +0600 @@ -4265,8 +4265,8 @@ bool change_seasons = false; bool all_magic = true; bool wizard_eye = false; -bool debug_information = true; -bool show_picked_face = true; +bool debug_information = false; +bool show_picked_face = false; bool draw_debug_line = false; //----- (00462C94) --------------------------------------------------------
--- a/mm7_3.cpp Fri Oct 11 18:55:43 2013 +0600 +++ b/mm7_3.cpp Fri Oct 11 23:57:14 2013 +0600 @@ -4961,7 +4961,7 @@ v39 = (unsigned __int64)(pSkyPolygon.ptr_38->field_14 * (signed __int64)(v33 * (v30 - array_50AC10[i].vWorldViewProjY))) >> 16; v35 = v39 + pSkyPolygon.ptr_38->angle_from_north; - v39 = (unsigned __int64)(pSkyPolygon.ptr_38->field_20 * (signed __int64)(v33 * (v30 - array_50AC10[i].vWorldViewProjY))) >> 16; + v39 = (unsigned __int64)(pSkyPolygon.ptr_38->viewing_angle * (signed __int64)(v33 * (v30 - array_50AC10[i].vWorldViewProjY))) >> 16; v36 = v39 + pSkyPolygon.ptr_38->angle_from_east; v38 = pSkyPolygon.v_18.z; @@ -5740,25 +5740,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->field_20 = fixpoint_mul(a7, v25) - fixpoint_mul(v19, v27); + this->viewing_angle = 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->field_20 = a7; + this->viewing_angle = a7; } this->angle_from_east = -this->angle_from_east; this->angle_from_south = -this->angle_from_south; - this->field_20 = -this->field_20; + this->viewing_angle = -this->viewing_angle; 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->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->field_20, this->field_8_party_dir_z); + this->viewing_angle, this->field_8_party_dir_z); } //----- (0048694B) -------------------------------------------------------- @@ -5766,14 +5766,14 @@ { this->angle_from_east = -this->angle_from_east; this->angle_from_south = -this->angle_from_south; - this->field_20 = -this->field_20; + this->viewing_angle = -this->viewing_angle; 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->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->field_20, this->field_8_party_dir_z); + this->viewing_angle, this->field_8_party_dir_z); } //----- (0044100D) --------------------------------------------------------