annotate Engine/Graphics/stru10.cpp @ 2541:a902abdfc7f2

1. Renamed class Game to class Engine. 2. Separated game logic as state of FSM from game logic as engine. 3. Found out that many UI screen initializers were optimized away, intially they all returned newly created window as separate object like it is done in CharacterUI_Initialize.
author a.parshin
date Sun, 10 May 2015 01:29:11 +0200
parents 68cdef6879a0
children b6140dfeac27
rev   line source
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
1 #define _CRTDBG_MAP_ALLOC
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
2 #include <stdlib.h>
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
3 #include <crtdbg.h>
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
4
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
6 #include "Engine/Engine.h"
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
7 #include "stru10.h"
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
8 #include "Indoor.h"
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
9 #include "Engine/Party.h"
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
10
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
11
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
12
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
13 int _49CE9E_sub0_x(RenderVertexSoft *pVertices, unsigned int uNumVertices, float test_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
14 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
15 float max_val = FLT_MAX;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
16 int idx = -1;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
17
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
18 float temp_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
19 for (uint i = 0; i < uNumVertices; ++i)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
20 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
21 if (pVertices[i].vWorldPosition.x <= test_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
22 temp_val = test_val - pVertices[i].vWorldPosition.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
23 else
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
24 temp_val = pVertices[i].vWorldPosition.x - test_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
25
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
26 if (temp_val < max_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
27 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
28 max_val = temp_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
29 idx = i;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
30 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
31 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
32 return idx;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
33 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
34
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
35
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
36 int _49CE9E_sub0_y(RenderVertexSoft *pVertices, unsigned int uNumVertices, float test_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
37 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
38 float max_val = FLT_MAX;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
39 int idx = -1;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
40
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
41 float temp_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
42 for (uint i = 0; i < uNumVertices; ++i)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
43 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
44 if (pVertices[i].vWorldPosition.y <= test_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
45 temp_val = test_val - pVertices[i].vWorldPosition.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
46 else
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
47 temp_val = pVertices[i].vWorldPosition.y - test_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
48
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
49 if (temp_val < max_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
50 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
51 max_val = temp_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
52 idx = i;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
53 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
54 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
55 return idx;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
56 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
57
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
58
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
59 int _49CE9E_sub0_z(RenderVertexSoft *pVertices, unsigned int uNumVertices, float test_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
60 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
61 float max_val = FLT_MAX;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
62 int idx = -1;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
63
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
64 float temp_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
65 for (uint i = 0; i < uNumVertices; ++i)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
66 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
67 if (pVertices[i].vWorldPosition.z <= test_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
68 temp_val = test_val - pVertices[i].vWorldPosition.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
69 else
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
70 temp_val = pVertices[i].vWorldPosition.z - test_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
71
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
72 if (temp_val < max_val)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
73 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
74 max_val = temp_val;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
75 idx = i;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
76 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
77 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
78 return idx;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
79 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
80
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
81 //----- (0049CE9E) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
82 void stru10::_49CE9E(BLVFace *pFace, RenderVertexSoft *pVertices, unsigned int uNumVertices, RenderVertexSoft *pOutLimits)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
83 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
84 Assert(sizeof(RenderVertexSoft) == 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
85
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
86 RenderVertexSoft pLimits[64];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
87 stru10::CalcPolygonLimits(pFace, pLimits);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
88
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
89 if (pFace->uAttributes & FACE_XY_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
90 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
91 memcpy(&pOutLimits[0], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[0].vWorldPosition.x)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
92 memcpy(&pOutLimits[2], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[2].vWorldPosition.x)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
93 memcpy(&pOutLimits[1], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[1].vWorldPosition.y)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
94 memcpy(&pOutLimits[3], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[3].vWorldPosition.y)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
95 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
96 else if (pFace->uAttributes & FACE_XZ_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
97 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
98 memcpy(&pOutLimits[0], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[0].vWorldPosition.x)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
99 memcpy(&pOutLimits[2], &pVertices[_49CE9E_sub0_x(pVertices, uNumVertices, pLimits[2].vWorldPosition.x)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
100 memcpy(&pOutLimits[1], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[1].vWorldPosition.z)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
101 memcpy(&pOutLimits[3], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[3].vWorldPosition.z)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
102 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
103 else if (pFace->uAttributes & FACE_YZ_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
104 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
105 memcpy(&pOutLimits[0], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[0].vWorldPosition.y)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
106 memcpy(&pOutLimits[2], &pVertices[_49CE9E_sub0_y(pVertices, uNumVertices, pLimits[2].vWorldPosition.y)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
107 memcpy(&pOutLimits[1], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[1].vWorldPosition.z)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
108 memcpy(&pOutLimits[3], &pVertices[_49CE9E_sub0_z(pVertices, uNumVertices, pLimits[3].vWorldPosition.z)], 0x30);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
109 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
110 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
111
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
112 //----- (0049D379) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
113 void stru10::CalcPolygonLimits(BLVFace *pFace, RenderVertexSoft *pOutVertices)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
114 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
115 struct
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
116 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
117 float x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
118 float y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
119 int c;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
120 } v46[40]; //[sp+0C];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
121
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
122 if (pFace->uAttributes & FACE_XY_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
123 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
124 for (uint i = 0; i < pFace->uNumVertices; ++i)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
125 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
126 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pXInterceptDisplacements[i];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
127 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pYInterceptDisplacements[i];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
128 v46[i].c = i;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
129 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
130 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
131 if (pFace->uAttributes & FACE_XZ_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
132 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
133 for (uint i = 0; i < pFace->uNumVertices; ++i)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
134 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
135 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].x + pFace->pXInterceptDisplacements[i];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
136 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].z + pFace->pZInterceptDisplacements[i];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
137 v46[i].c = i;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
138 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
139 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
140 if (pFace->uAttributes & FACE_YZ_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
141 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
142 for (uint i = 0; i < pFace->uNumVertices; ++i)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
143 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
144 v46[i].x = pIndoor->pVertices[pFace->pVertexIDs[i]].y + pFace->pYInterceptDisplacements[i];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
145 v46[i].y = pIndoor->pVertices[pFace->pVertexIDs[i]].z + pFace->pZInterceptDisplacements[i];
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
146 v46[i].c = i;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
147 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
148 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
149
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
150 float x_min = v46[0].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
151 uint x_min_idx = 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
152
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
153 float x_max = v46[0].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
154 uint x_max_idx = 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
155
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
156 float y_min = v46[0].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
157 uint y_min_idx = 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
158
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
159 float y_max = v46[0].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
160 uint y_max_idx = 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
161
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
162 for (uint i = 0; i < pFace->uNumVertices; ++i)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
163 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
164 if (v46[i].x < x_min)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
165 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
166 x_min = v46[i].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
167 x_min_idx = v46[i].c;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
168 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
169 if (v46[i].x > x_max)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
170 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
171 x_max = v46[i].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
172 x_max_idx = v46[i].c;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
173 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
174
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
175 if (v46[i].y < y_min)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
176 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
177 y_min = v46[i].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
178 y_min_idx = v46[i].c;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
179 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
180 if (v46[i].y > y_max)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
181 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
182 y_max = v46[i].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
183 y_max_idx = v46[i].c;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
184 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
185 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
186
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
187 RenderVertexSoft v1; // [sp+30Ch] [bp-54h]@24
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
188 v1.vWorldPosition.x = (float)pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
189 v1.vWorldPosition.y = (float)pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
190 v1.vWorldPosition.z = (float)pIndoor->pVertices[pFace->pVertexIDs[x_min_idx]].z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
191 memcpy(&pOutVertices[0], &v1, sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
192
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
193 RenderVertexSoft v2; // [sp+30Ch] [bp-54h]@24
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
194 v2.vWorldPosition.x = (float)pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
195 v2.vWorldPosition.y = (float)pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
196 v2.vWorldPosition.z = (float)pIndoor->pVertices[pFace->pVertexIDs[y_min_idx]].z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
197 memcpy(&pOutVertices[1], &v2, sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
198
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
199 RenderVertexSoft v3; // [sp+30Ch] [bp-54h]@24
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
200 v3.vWorldPosition.x = (float)pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
201 v3.vWorldPosition.y = (float)pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
202 v3.vWorldPosition.z = (float)pIndoor->pVertices[pFace->pVertexIDs[x_max_idx]].z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
203 memcpy(&pOutVertices[2], &v3, sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
204
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
205 RenderVertexSoft v4; // [sp+30Ch] [bp-54h]@24
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
206 v4.vWorldPosition.x = (double)pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]].x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
207 v4.vWorldPosition.y = (double)pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]].y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
208 v4.vWorldPosition.z = (double)pIndoor->pVertices[pFace->pVertexIDs[y_max_idx]].z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
209 memcpy(&pOutVertices[3], &v4, sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
210 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
211
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
212
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
213 //----- (0049C9E3) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
214 bool stru10::CalcFaceBounding(BLVFace *pFace, RenderVertexSoft *pFaceLimits, unsigned int uNumVertices, RenderVertexSoft *pOutBounding)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
215 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
216 //IndoorCameraD3D *v6; // edi@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
217 //PolygonType v7; // al@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
218 //unsigned int v8; // edx@7
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
219 //char v10; // zf@10
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
220 //float v13; // ST14_4@20
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
221 //stru10 *v15; // ecx@21
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
222 //RenderVertexSoft *v16; // ST0C_4@21
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
223 //bool result; // eax@21
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
224 //float v18; // ST14_4@24
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
225 //stru10 *v19; // edi@29
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
226 //float v20; // ST14_4@30
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
227 //float v21; // ST14_4@30
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
228 //float v22; // ST14_4@30
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
229 //float v23; // ST14_4@30
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
230 //float v24; // ST14_4@31
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
231 //RenderVertexSoft v25; // [sp+10h] [bp-90h]@24
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
232 //RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
233 //IndoorCameraD3D *thisa; // [sp+70h] [bp-30h]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
234 //stru10 *v31; // [sp+84h] [bp-1Ch]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
235 //float v32; // [sp+88h] [bp-18h]@8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
236 Vec3_float_ a1; // [sp+8Ch] [bp-14h]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
237 //float v35; // [sp+9Ch] [bp-4h]@8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
238
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
239 //auto a3 = pFace;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
240 //auto arg4 = pFaceBounding;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
241
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
242 //_ESI = a3;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
243 //v31 = this;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
244 //v6 = pEngine->pIndoorCameraD3D;
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
245 //v7 = a3->uPolygonType;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
246
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
247 a1.x = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
248 a1.y = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
249 a1.z = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
250
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
251 float var_28;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
252 float var_24;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
253 switch (pFace->uPolygonType)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
254 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
255 case POLYGON_VerticalWall:
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
256 a1.x = -pFace->pFacePlane.vNormal.y;// направление полигона
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
257 a1.y = pFace->pFacePlane.vNormal.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
258 a1.z = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
259 a1.Normalize();
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
260
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
261 var_28 = 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
262 var_24 = 1;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
263 break;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
264
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
265 case POLYGON_Floor:
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
266 case POLYGON_Ceiling:
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
267 a1.x = 1;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
268 a1.y = 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
269 a1.z = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
270
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
271 var_28 = 1;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
272 var_24 = 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
273 break;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
274
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
275 default:
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
276 Error("Invalid polygon type (%u)", pFace->uPolygonType);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
277 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
278
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
279
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
280 float face_center_x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
281 float face_center_y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
282 float face_center_z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
283 float a3;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
284 float var_8;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
285
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
286 if (pFace->uAttributes & FACE_XY_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
287 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
288 face_center_x = (pFaceLimits[0].vWorldPosition.x + pFaceLimits[2].vWorldPosition.x) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
289 face_center_y = (pFaceLimits[3].vWorldPosition.y + pFaceLimits[1].vWorldPosition.y) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
290 face_center_z = (pFaceLimits[0].vWorldPosition.z + pFaceLimits[2].vWorldPosition.z) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
291
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
292 a3 = face_center_x - pFaceLimits[0].vWorldPosition.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
293 var_8 = face_center_y - pFaceLimits[1].vWorldPosition.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
294 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
295 if (pFace->uAttributes & FACE_XZ_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
296 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
297 face_center_x = (pFaceLimits[0].vWorldPosition.x + pFaceLimits[2].vWorldPosition.x) / 2;// центр полигона
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
298 face_center_y = (pFaceLimits[0].vWorldPosition.y + pFaceLimits[2].vWorldPosition.y) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
299 face_center_z = (pFaceLimits[1].vWorldPosition.z + pFaceLimits[3].vWorldPosition.z) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
300
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
301 a3 = face_center_x - pFaceLimits[0].vWorldPosition.x;//от центра до верхнего края
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
302 var_8 = face_center_z - pFaceLimits[1].vWorldPosition.z;// высота от центра
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
303
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
304 if (pFace->uPolygonType == POLYGON_VerticalWall)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
305 a3 /= a1.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
306 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
307 if (pFace->uAttributes & FACE_YZ_PLANE)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
308 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
309 face_center_x = (pFaceLimits[0].vWorldPosition.x + pFaceLimits[2].vWorldPosition.x) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
310 face_center_y = (pFaceLimits[0].vWorldPosition.y + pFaceLimits[2].vWorldPosition.y) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
311 face_center_z = (pFaceLimits[1].vWorldPosition.z + pFaceLimits[3].vWorldPosition.z) / 2;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
312
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
313 a3 = face_center_y - pFaceLimits[0].vWorldPosition.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
314 var_8 = face_center_z - pFaceLimits[1].vWorldPosition.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
315 // [0.5]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
316 if (pFace->uPolygonType == POLYGON_VerticalWall)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
317 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
318 if (a1.x != 1.0f)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
319 a3 /= a1.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
320 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
321 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
322
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
323
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
324
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
325
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
326 //_EBX = arg0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
327 //v15 = v31;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
328 //v16 = arg0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
329 //float var_20 = var_8 * var_24;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
330 //var_8 = a3 * a1.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
331 //float arg_0 = var_8 + var_4;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
332
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
333 /*
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
334
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
335
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
336
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
337 .text:0049CBB3 fld [ebp+var_8] 0 var8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
338 .text:0049CBB6 1 fmul ds:flt_4D84E8 0 var8 * flt_4D84E8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
339
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
340 .text:0049CBBC 1 fld [ebp+var_8] 0 var8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
341 1 var8 * flt_4D84E8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
342
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
343 .text:0049CBBF 2 fmul [ebp+var_28] 0 var8 * var28
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
344 1 var8 * flt_4D84E8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
345
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
346 .text:0049CBC2 2 fld [ebp+var_8] 0 var8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
347 1 var8 * var28
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
348 2 var8 * flt_4D84E8
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
349
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
350 .text:0049CBC5 3 fmul [ebp+var_24] 0 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
351 1 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
352 2 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
353
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
354 .text:0049CBD5 3 fst [ebp+var_20] 0 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
355 1 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
356 2 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
357 [var20] var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
358
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
359 .text:0049CBD8 3 fld [ebp+a3] 0 a3 -1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
360 1 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
361 2 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
362 3 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
363
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
364 .text:0049CBDB 4 fmul [ebp+a1.x] 0 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
365 1 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
366 2 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
367 3 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
368
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
369 .text:0049CBDE 4 fld [ebp+a3] 0 a3
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
370 1 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
371 2 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
372 3 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
373 4 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
374
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
375 .text:0049CBE1 5 fmul [ebp+a1.y] 0 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
376 1 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
377 2 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
378 3 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
379 4 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
380 .text:0049CBE4 5 fld [ebp+a3]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
381 .text:0049CBE7 6 fmul [ebp+a1.z] 0 a3 * a1.z 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
382 1 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
383 2 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
384 3 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
385 4 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
386 5 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
387
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
388 .text:0049CBEC 6 fstp [ebp+var_8]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
389 var8 <- a3 * a1.z 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
390
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
391 .text:0049CBEF 5 fld [ebp+arg4] 0 arg4 -1700
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
392 1 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
393 2 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
394 3 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
395 4 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
396 5 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
397
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
398 .text:0049CBF2 6 fsub st, st(2) 0 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
399 1 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
400 2 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
401 3 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
402 4 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
403 5 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
404
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
405 .text:0049CBF4 6 fld st 0 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
406 1 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
407 2 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
408 3 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
409 4 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
410 5 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
411 6 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
412
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
413 .text:0049CBF6 7 fadd st, st(6) 0 arg4 - a3 * a1.x + var8 * flt_4D84E8 -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
414 1 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
415 2 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
416 3 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
417 4 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
418 5 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
419 6 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
420 .text:0049CBF8 7 fstp dword ptr [ebx]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
421 [0].x <- arg4 - a3 * a1.x + var8 * flt_4D84E8 -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
422
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
423 .text:0049CBFA 6 fld [ebp+var_18] 0 var18 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
424 1 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
425 2 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
426 3 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
427 4 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
428 5 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
429 6 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
430
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
431 .text:0049CBFD 7 fsub st, st(2) 0 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
432 1 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
433 2 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
434 3 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
435 4 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
436 5 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
437 6 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
438
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
439 .text:0049CBFF 7 fld st 0 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
440 1 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
441 2 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
442 3 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
443 4 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
444 5 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
445 6 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
446 7 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
447
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
448 .text:0049CC01 8 fadd st, st(6) 0 var18 - a3 * a1.y + var8 * var28 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
449 1 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
450 2 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
451 3 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
452 4 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
453 5 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
454 6 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
455 7 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
456
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
457 .text:0049CC03 8 fstp dword ptr [ebx+4]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
458 [0].y <- var18 - a3 * a1.y + var8 * var28 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
459
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
460 .text:0049CC06 7 fld [ebp+var_4]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
461 .text:0049CC09 8 fsub [ebp+var_8] 0 var4 - a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
462 1 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
463 2 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
464 3 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
465 4 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
466 5 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
467 6 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
468 7 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
469 .text:0049CC0C 8 fst [ebp+a3]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
470 a3 <- var4 - a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
471
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
472 .text:0049CC0F 8 fadd st, st(5)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
473 .text:0049CC11 8 fstp dword ptr [ebx+8]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
474 [0].z <- var4 - a3 * a1.z + var8 * var24 1536
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
475
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
476 0 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
477 1 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
478 2 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
479 3 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
480 4 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
481 5 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
482 6 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
483
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
484
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
485
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
486
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
487 [var20] var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
488 [var8] a3 * a1.z
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
489 [a3] var4 - a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
490
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
491
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
492 .text:0049CC14 7 fld st(1)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
493 .text:0049CC16 8 fsub st, st(7) 0 arg4 - a3 * a1.x - var8 * flt_4D84E8 -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
494 1 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
495 2 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
496 3 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
497 4 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
498 5 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
499 6 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
500 7 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
501 .text:0049CC18 8 fstp dword ptr [ebx+30h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
502 [1].x <- arg4 - a3 * a1.x - var8 * flt_4D84E8 -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
503
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
504 0 var18 - a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
505 1 arg4 - a3 * a1.x -3684
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
506 2 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
507 3 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
508 4 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
509 5 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
510 6 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
511 .text:0049CC1B 7 fsub st, st(5)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
512 .text:0049CC1D 7 fstp dword ptr [ebx+34h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
513 [1].y <- var18 - a3 * a1.y - var8 * var28 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
514 .text:0049CC20 6 fstp st
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
515 0 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
516 1 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
517 2 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
518 3 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
519 4 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
520
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
521
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
522 [var20] var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
523 [var8] a3 * a1.z
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
524 [a3] var4 - a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
525
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
526 .text:0049CC22 5 fld [ebp+a3] 0 var4 - a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
527 1 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
528 2 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
529 3 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
530 4 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
531 5 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
532 .text:0049CC25 6 fsub st, st(3)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
533 .text:0049CC27 6 fstp dword ptr [ebx+38h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
534 [1].z <- var4 - a3 * a1.z - var8 * var24 768 - 768 = 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
535
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
536 0 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
537 1 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
538 2 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
539 3 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
540 4 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
541
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
542
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
543 .text:0049CC2A fld st(1)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
544 .text:0049CC2C 6 fadd [ebp+arg4] 0 arg4 + a3 * a1.x 284
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
545 1 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
546 2 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
547 3 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
548 4 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
549 5 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
550 .text:0049CC2F 6 fst [ebp+a3]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
551
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
552 [var20] var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
553 [var8] a3 * a1.z
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
554 [a3] arg4 + a3 * a1.x 284
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
555 .text:0049CC32 6 fsub st, st(5)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
556 .text:0049CC34 6 fstp dword ptr [ebx+60h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
557 [2].x <- arg4 + a3 * a1.x - var8 * flt_4D84E8 284
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
558
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
559 0 a3 * a1.y 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
560 1 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
561 2 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
562 3 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
563 4 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
564
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
565 .text:0049CC37 5 fadd [ebp+var_18] 0 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
566 1 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
567 2 var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
568 3 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
569 4 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
570
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
571 .text:0049CC3A 5 fstp st(2) 0 a3 * a1.x 1984
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
572 1 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
573 2 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
574 3 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
575
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
576 .text:0049CC3C 4 fstp st 0 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
577 1 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
578 2 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
579
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
580 .text:0049CC3E 3 fld st 0 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
581 1 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
582 2 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
583 3 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
584 .text:0049CC40 4 fsub st, st(2)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
585 .text:0049CC42 4 fstp dword ptr [ebx+64h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
586 [2].y <- var18 + a3 * a1.y - var8 * var28 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
587
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
588 0 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
589 1 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
590 2 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
591
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
592 [var20] var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
593 [var8] a3 * a1.z
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
594 [a3] arg4 + a3 * a1.x 284
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
595 .text:0049CC45 3 fld [ebp+var_8]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
596 .text:0049CC48 4 fadd [ebp+var_4] 0 var4 + a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
597 1 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
598 2 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
599 3 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
600
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
601 .text:0049CC4B 4 fst [ebp+arg0]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
602 [var20] var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
603 [arg0] var4 + a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
604 [var8] a3 * a1.z 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
605 [a3] arg4 + a3 * a1.x 284
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
606
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
607 .text:0049CC4E 4 fsub [ebp+var_20]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
608 .text:0049CC51 4 fstp dword ptr [ebx+68h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
609 [2].z <- var4 + a3 * a1.z - var8 * var24 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
610
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
611
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
612
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
613 [var20] var8 * var24 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
614 [arg0] var4 + a3 * a1.z 768
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
615 [var8] a3 * a1.z 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
616 [a3] arg4 + a3 * a1.x 284
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
617
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
618
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
619 0 var18 + a3 * a1.y 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
620 1 var8 * var28 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
621 2 var8 * flt_4D84E8 0
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
622
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
623 .text:0049CC54 3 fld [ebp+a3]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
624 .text:0049CC57 4 fadd st, st(3)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
625 .text:0049CC59 4 fstp dword ptr [ebx+90h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
626 [3].x <- arg4 + a3 * a1.x + var8 * flt_4D84E8 284
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
627
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
628 .text:0049CC5F 3 fadd st, st(1)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
629 .text:0049CC61 3 fstp dword ptr [ebx+94h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
630 [3].y <- var18 + a3 * a1.y + var8 * var28 1480
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
631
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
632 .text:0049CC67 2 fstp st
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
633 .text:0049CC69 1 fstp st
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
634 0 empty
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
635 .text:0049CC6B 0 fld [ebp+arg0]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
636 .text:0049CC6E 1 fadd [ebp+var_20]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
637 .text:0049CC71 1 fstp dword ptr [ebx+98h]
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
638 [3].z <- var4 + a3 * a1.z + var8 * var24 1536
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
639
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
640 0 empty
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
641 */
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
642
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
643 pOutBounding[0].vWorldPosition.x = face_center_x - a3 * a1.x + var_8 * flt_4D84E8;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
644 pOutBounding[0].vWorldPosition.y = face_center_y - a3 * a1.y + var_8 * var_28;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
645 pOutBounding[0].vWorldPosition.z = face_center_z - a3 * a1.z + var_8 * var_24;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
646
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
647 pOutBounding[1].vWorldPosition.x = face_center_x - a3 * a1.x - var_8 * flt_4D84E8;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
648 pOutBounding[1].vWorldPosition.y = face_center_y - a3 * a1.y - var_8 * var_28;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
649 pOutBounding[1].vWorldPosition.z = face_center_z - a3 * a1.z - var_8 * var_24;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
650
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
651 pOutBounding[2].vWorldPosition.x = face_center_x + a3 * a1.x - var_8 * flt_4D84E8;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
652 pOutBounding[2].vWorldPosition.y = face_center_y + a3 * a1.y - var_8 * var_28;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
653 pOutBounding[2].vWorldPosition.z = face_center_z + a3 * a1.z - var_8 * var_24;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
654
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
655 pOutBounding[3].vWorldPosition.x = face_center_x + a3 * a1.x + var_8 * flt_4D84E8;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
656 pOutBounding[3].vWorldPosition.y = face_center_y + a3 * a1.y + var_8 * var_28;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
657 pOutBounding[3].vWorldPosition.z = face_center_z + a3 * a1.z + var_8 * var_24;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
658
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
659 a1.x = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
660 a1.y = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
661 a1.z = 0.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
662 a3 = face_center_x + a3 * a1.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
663
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
664 if (!FindFacePlane(pOutBounding, &a1, &a3))
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
665 return false;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
666
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
667
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
668
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
669 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
670 memcpy(&v25, pOutBounding, sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
671
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
672 float _dp = (v25.vWorldPosition.x - pEngine->pIndoorCameraD3D->vPartyPos.x) * a1.x +
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
673 (v25.vWorldPosition.y - pEngine->pIndoorCameraD3D->vPartyPos.y) * a1.y +
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
674 (v25.vWorldPosition.z - pEngine->pIndoorCameraD3D->vPartyPos.z) * a1.z;
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
675 if (fabs(_dp) < 1e-6f)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
676 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
677 memcpy(&v25, &pOutBounding[1], sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
678 memcpy(&pOutBounding[1], &pOutBounding[3], sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
679 memcpy(&pOutBounding[3], &v25, sizeof(RenderVertexSoft));
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
680 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
681
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
682 //if ( byte_4D864C && pEngine->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS)
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
683 //{
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
684 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
685 if ( draw_portals_loops )
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
686 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
687 if (!bDoNotDrawPortalFrustum)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
688 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
689 v26.vWorldPosition.x = pParty->vPosition.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
690 v26.vWorldPosition.y = pParty->vPosition.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
691 v26.vWorldPosition.z = pParty->vPosition.z + pParty->sEyelevel; // frustum
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
692
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
693 pEngine->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF0000u, &pOutBounding[0], 0xFF0000u, 0, 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
694 pEngine->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFF00u, &pOutBounding[1], 0xFF00u, 0, 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
695 pEngine->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFu, &pOutBounding[2], 0xFFu, 0, 0);
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
696 pEngine->pIndoorCameraD3D->do_draw_debug_line_sw(&v26, 0xFFFFFFu, &pOutBounding[3], 0xFFFFFFu, 0, 0);
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
697 bDoNotDrawPortalFrustum = true;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
698 }
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
699 pEngine->pIndoorCameraD3D->debug_outline_sw(pOutBounding, uNumVertices, 0x1EFF1Eu, 0.00019999999); // bounding
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
700 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
701 //}
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
702
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
703 //pEngine->pIndoorCameraD3D->debug_outline_sw(pFaceLimits, 4, 0xFFF14040, 0.000099999997); // limits
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
704
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
705 /*if ( byte_4D864C && pEngine->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS)
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
706 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
707 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
708 v26.vWorldPosition.x = face_center_x; // corner to center
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
709 v26.vWorldPosition.y = face_center_y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
710 v26.vWorldPosition.z = face_center_z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
711
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
712 pEngine->pIndoorCameraD3D->do_draw_debug_line_sw(pFaceLimits, 0xFF00u, &v26, 0xFF0000u, 0, 0);
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
713 }*/
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
714
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
715
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
716 /*if ( byte_4D864C )
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
717 {
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
718 if ( pEngine->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS)*/
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
719 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
720 RenderVertexSoft v25; // [sp+10h] [bp-90h]@20
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
721 RenderVertexSoft v26; // [sp+40h] [bp-60h]@20
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
722
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
723 v25.vWorldPosition.x = face_center_x; // portal normal
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
724 v25.vWorldPosition.y = face_center_y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
725 v25.vWorldPosition.z = face_center_z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
726
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
727 v26.vWorldPosition.x = face_center_x + a1.x * 400.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
728 v26.vWorldPosition.y = face_center_y + a1.y * 400.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
729 v26.vWorldPosition.z = face_center_z + a1.z * 400.0f;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
730
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
731 if ( draw_portals_loops )
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
732 pEngine->pIndoorCameraD3D->do_draw_debug_line_sw(&v25, -1, &v26, 0xFFFF00u, 0, 0);
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
733 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
734 //}
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
735
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
736 return true;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
737 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
738
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
739
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
740
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
741 //----- (0049C5B0) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
742 stru10::stru10()
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
743 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
744 this->bDoNotDrawPortalFrustum = false;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
745 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
746
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
747 //----- (0049C5BD) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
748 stru10::~stru10()
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
749 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
750 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
751
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
752 //----- (0049C5DA) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
753 char stru10::_49C5DA(BLVFace *pFace, RenderVertexSoft *pVertices, unsigned int *pNumVertices, IndoorCameraD3D_Vec4 *a5, RenderVertexSoft *pOutBounding)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
754 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
755 RenderVertexSoft pLimits[4]; // [sp+Ch] [bp-C0h]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
756
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
757 _49CE9E(pFace, pVertices, *pNumVertices, pLimits);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
758
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
759 //if ( byte_4D864C && pEngine->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS)
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
760 // pEngine->pIndoorCameraD3D->debug_outline_sw(a4a, 4u, 0xFF1E1Eu, 0.000099999997);
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
761 if (CalcFaceBounding(pFace, pLimits, 4, pOutBounding))
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
762 return _49C720(pOutBounding, a5);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
763 return false;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
764 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
765 // 4D864C: using guessed type char byte_4D864C;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
766
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
767 //----- (0049C681) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
768 bool stru10::CalcPortalShape(BLVFace *pFace, IndoorCameraD3D_Vec4 *pPortalDataFrustum, RenderVertexSoft *pOutBounding)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
769 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
770 RenderVertexSoft pLimits[4]; // [sp+Ch] [bp-C0h]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
771
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
772 CalcPolygonLimits(pFace, pLimits);//определение границ портала
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
773 //if ( byte_4D864C && pEngine->uFlags & GAME_FLAGS_1_DRAW_BLV_DEBUGS)
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
774 // pEngine->pIndoorCameraD3D->debug_outline_sw(pLimits, 4, 0xFF1E1E, 0.000099999997);
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
775 if (CalcFaceBounding(pFace, pLimits, 4, pOutBounding))
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
776 return _49C720(pOutBounding, pPortalDataFrustum) != 0;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
777 return false;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
778 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
779
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
780 // 4D864C: using guessed type char byte_4D864C;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
781
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
782 //----- (0049C720) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
783 char stru10::_49C720(RenderVertexSoft *pFaceBounding, IndoorCameraD3D_Vec4 *pPortalDataFrustum)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
784 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
785 Vec3_float_ pRayStart; // [sp+4h] [bp-34h]@1
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
786 pRayStart.x = (double)pEngine->pIndoorCameraD3D->vPartyPos.x;
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
787 pRayStart.y = (double)pEngine->pIndoorCameraD3D->vPartyPos.y;
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2499
diff changeset
788 pRayStart.z = (double)pEngine->pIndoorCameraD3D->vPartyPos.z;
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
789
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
790 if (FindFaceNormal(&pFaceBounding[0], &pFaceBounding[1], &pRayStart, &pPortalDataFrustum[0]) &&
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
791 FindFaceNormal(&pFaceBounding[1], &pFaceBounding[2], &pRayStart, &pPortalDataFrustum[1]) &&
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
792 FindFaceNormal(&pFaceBounding[2], &pFaceBounding[3], &pRayStart, &pPortalDataFrustum[2]) &&
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
793 FindFaceNormal(&pFaceBounding[3], &pFaceBounding[0], &pRayStart, &pPortalDataFrustum[3]))
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
794 return true;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
795 return false;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
796 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
797
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
798 //----- (0049C7C5) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
799 bool stru10::FindFaceNormal(RenderVertexSoft *pFaceBounding1, RenderVertexSoft *pFaceBounding2, Vec3_float_ *pRayStart, IndoorCameraD3D_Vec4 *pPortalDataFrustum)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
800 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
801 Vec3_float_ ray_dir; // [sp+4h] [bp-48h]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
802 Vec3_float_ pRay2; // [sp+10h] [bp-3Ch]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
803
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
804 ray_dir.x = pFaceBounding1->vWorldPosition.x - pRayStart->x;//get ray for cmera to bounding1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
805 ray_dir.y = pFaceBounding1->vWorldPosition.y - pRayStart->y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
806 ray_dir.z = pFaceBounding1->vWorldPosition.z - pRayStart->z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
807 Vec3_float_::Cross(&ray_dir, &pRay2, pFaceBounding2->vWorldPosition.x - pFaceBounding1->vWorldPosition.x,
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
808 pFaceBounding2->vWorldPosition.y - pFaceBounding1->vWorldPosition.y,
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
809 pFaceBounding2->vWorldPosition.z - pFaceBounding1->vWorldPosition.z);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
810
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
811 float sqr_mag = pRay2.x * pRay2.x + pRay2.y * pRay2.y + pRay2.z * pRay2.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
812 if (fabsf(sqr_mag) > 1e-6f)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
813 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
814 float inv_mag = 1.0f / sqrtf(sqr_mag);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
815 pRay2.x *= inv_mag;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
816 pRay2.y *= inv_mag;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
817 pRay2.z *= inv_mag;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
818 pRay2.Normalize();
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
819
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
820 pPortalDataFrustum->x = pRay2.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
821 pPortalDataFrustum->y = pRay2.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
822 pPortalDataFrustum->z = pRay2.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
823 pPortalDataFrustum->dot = pRayStart->z * pRay2.z + pRayStart->y * pRay2.y + pRayStart->x * pRay2.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
824 return true;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
825 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
826 return false;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
827 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
828
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
829 //----- (0049C8DC) --------------------------------------------------------
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
830 bool stru10::FindFacePlane(RenderVertexSoft *arg0, Vec3_float_ *a2, float *a3)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
831 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
832 Vec3_float_ v1; // [sp+8h] [bp-3Ch]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
833 Vec3_float_ v2; // [sp+14h] [bp-30h]@1
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
834
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
835 v1.x = arg0[1].vWorldPosition.x - arg0[0].vWorldPosition.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
836 v1.y = arg0[1].vWorldPosition.y - arg0[0].vWorldPosition.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
837 v1.z = arg0[1].vWorldPosition.z - arg0[0].vWorldPosition.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
838
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
839 Vec3_float_::Cross(&v1, &v2, arg0[2].vWorldPosition.x - arg0[1].vWorldPosition.x,
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
840 arg0[2].vWorldPosition.y - arg0[1].vWorldPosition.y,
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
841 arg0[2].vWorldPosition.z - arg0[1].vWorldPosition.z);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
842
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
843 float sqr_mag = v2.x * v2.x + v2.y * v2.y + v2.z * v2.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
844 if (fabsf(sqr_mag) > 1e-6f)
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
845 {
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
846 //v2.Normalize();
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
847 float inv_mag = 1.0f / sqrtf(sqr_mag);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
848 v2.x *= inv_mag;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
849 v2.y *= inv_mag;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
850 v2.z *= inv_mag;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
851
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
852 a2->x = v2.x;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
853 a2->y = v2.y;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
854 a2->z = v2.z;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
855 *a3 = -(arg0[0].vWorldPosition.z * v2.z + arg0[0].vWorldPosition.y * v2.y + arg0[0].vWorldPosition.x * v2.x);
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
856 return true;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
857 }
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
858 return false;
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents:
diff changeset
859 }