annotate stru6.cpp @ 2543:b6140dfeac27

GameOver h/cpp
author a.parshin
date Sun, 10 May 2015 03:21:14 +0200
parents a902abdfc7f2
children 30eb6dcac768
rev   line source
2415
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2370
diff changeset
1 #define _CRTDBG_MAP_ALLOC
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2370
diff changeset
2 #include <stdlib.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2370
diff changeset
3 #include <crtdbg.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2370
diff changeset
4
2253
aff7a7b072b7 adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents: 2207
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
6
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
7 #include "Engine/Engine.h"
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
8
0
Ritor1
parents:
diff changeset
9 #include "stru6.h"
1016
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 982
diff changeset
10
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents: 2465
diff changeset
11 #include "Engine/Graphics/LightmapBuilder.h"
2499
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
12 #include "Engine/Objects/SpriteObject.h"
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents: 2465
diff changeset
13 #include "Engine/Graphics/ParticleEngine.h"
2499
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
14 #include "Engine/LOD.h"
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents: 2465
diff changeset
15 #include "Engine/Graphics/Sprites.h"
2499
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
16 #include "Engine/Objects/ObjectList.h"
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
17 #include "Engine/Objects/Actor.h"
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
18 #include "Engine/Random.h"
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
19 #include "Engine/Tables/IconFrameTable.h"
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
20 #include "Engine/Timer.h"
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents: 2465
diff changeset
21 #include "Engine/Graphics/Viewport.h"
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents: 2465
diff changeset
22 #include "Engine/Graphics/Overlays.h"
2499
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
23 #include "Engine/stru160.h"
68cdef6879a0 engine folder
Ritor1
parents: 2496
diff changeset
24 #include "Engine/OurMath.h"
2496
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents: 2465
diff changeset
25 #include "Engine/Graphics/Lights.h"
5abd8fc8f1c6 for ITEM_ARTIFACT_LADYS_ESCORT
Ritor1
parents: 2465
diff changeset
26 #include "Engine/Graphics/Indoor.h"
0
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
2152
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
31 //----- (004A7063) --------------------------------------------------------
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
32 unsigned int ModulateColor(unsigned int diffuse, float multiplier)
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
33 {
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
34 float alpha = multiplier * ((diffuse >> 24) & 0xFF);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
35 int a = (int)floorf(alpha + 0.5f);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
36 a = max(0, min(255, a));
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
37
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
38 float red = multiplier * ((diffuse >> 16) & 0xFF);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
39 int r = (int)floorf(red + 0.5f);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
40 r = max(0, min(255, r));
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
41
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
42 float green = multiplier * ((diffuse >> 8) & 0xFF);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
43 int g = (int)floorf(green + 0.5f);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
44 g = max(0, min(255, g));
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
45
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
46 float blue = multiplier * ((diffuse >> 0) & 0xFF);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
47 int b = (int)floorf(blue + 0.5f);
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
48 b = max(0, min(255, b));
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
49
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
50 return (a << 24) | (r << 16) | (g << 8) | b;
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
51 }
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
52
d44b7775fc06 Removed DirectDraw2 compatibility.
Nomad
parents: 2044
diff changeset
53
1459
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
54 //----- (0042620A) --------------------------------------------------------
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
55 bool sr_42620A(RenderVertexSoft *p)
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
56 {
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2253
diff changeset
57 // __int16 v1; // fps@1
1459
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
58 unsigned __int8 v2; // c0@2
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
59 char v3; // c2@2
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
60 unsigned __int8 v4; // c3@2
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2253
diff changeset
61 // bool result; // eax@2
1459
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
62 unsigned __int8 v6; // c0@4
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
63 char v7; // c2@4
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
64 unsigned __int8 v8; // c3@4
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
65 unsigned __int8 v9; // c0@6
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
66 char v10; // c2@6
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
67 unsigned __int8 v11; // c3@6
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
68 double v12; // st6@7
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
69 float v13; // ST04_4@7
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
70 float v14; // ST00_4@7
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
71 double v15; // st7@7
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
72 double v16; // st6@8
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
73 float v17; // ST04_4@8
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
74 float v18; // ST00_4@8
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
75 double v19; // st7@8
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
76
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
77 //UNDEF(v1);
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
78 if ( p->vWorldViewPosition.x < 300.0
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
79 || (v2 = 300.0 < p[1].vWorldViewPosition.x,
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
80 v3 = 0,
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
81 v4 = 300.0 == p[1].vWorldViewPosition.x,
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
82 //BYTE1(result) = HIBYTE(v1),
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
83 !(v2 | v4)) )
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
84 {
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
85 if ( p->vWorldViewPosition.x < 300.0 )
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
86 {
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
87 v6 = 300.0 < p[1].vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
88 v7 = 0;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
89 v8 = 300.0 == p[1].vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
90 //BYTE1(result) = HIBYTE(v1);
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
91 if ( !(v6 | v8) )
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
92 {
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
93 //LOBYTE(result) = 0;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
94 return false;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
95 }
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
96 }
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
97 v9 = 300.0 < p->vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
98 v10 = 0;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
99 v11 = 300.0 == p->vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
100 //BYTE1(result) = HIBYTE(v1);
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
101 if ( v9 | v11 )
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
102 {
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
103 v16 = 1.0 / (p->vWorldViewPosition.x - p[1].vWorldViewPosition.x);
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
104 v17 = (p->vWorldViewPosition.y - p[1].vWorldViewPosition.y) * v16;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
105 v18 = (p->vWorldViewPosition.z - p[1].vWorldViewPosition.z) * v16;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
106 v19 = 300.0 - p[1].vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
107 p[1].vWorldViewPosition.x = v19 + p[1].vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
108 p[1].vWorldViewPosition.y = v17 * v19 + p[1].vWorldViewPosition.y;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
109 p[1].vWorldViewPosition.z = v19 * v18 + p[1].vWorldViewPosition.z;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
110 }
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
111 else
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
112 {
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
113 v12 = 1.0 / (p[1].vWorldViewPosition.x - p->vWorldViewPosition.x);
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
114 v13 = (p[1].vWorldViewPosition.y - p->vWorldViewPosition.y) * v12;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
115 v14 = (p[1].vWorldViewPosition.z - p->vWorldViewPosition.z) * v12;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
116 v15 = 300.0 - p->vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
117 p->vWorldViewPosition.x = v15 + p->vWorldViewPosition.x;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
118 p->vWorldViewPosition.y = v13 * v15 + p->vWorldViewPosition.y;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
119 p->vWorldViewPosition.z = v15 * v14 + p->vWorldViewPosition.z;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
120 }
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
121 }
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
122 //LOBYTE(result) = 1;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
123 return true;
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
124 }
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
125
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
126
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
127
1106
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
128 //----- (004775C4) --------------------------------------------------------
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
129 stru6_stru1_indoor_sw_billboard::~stru6_stru1_indoor_sw_billboard()
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
130 {
2370
bbf8a522dcec removing non-nullptr conditions before deletes
Grumpy7
parents: 2334
diff changeset
131 delete [] pArray1;
1106
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
132 pArray1 = nullptr;
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
133
2370
bbf8a522dcec removing non-nullptr conditions before deletes
Grumpy7
parents: 2334
diff changeset
134 delete [] pArray2;
1106
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
135 pArray2 = nullptr;
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
136 }
3395579f6c4d stru6_stru1_indoor_sw_billboard destructor fix, removing "extern" from struct definition, fixing probable typo in SPELL_AIR_SPARKS
Grumpy7
parents: 1102
diff changeset
137
0
Ritor1
parents:
diff changeset
138
Ritor1
parents:
diff changeset
139 //----- (00478211) --------------------------------------------------------
Ritor1
parents:
diff changeset
140 void stru6_stru1_indoor_sw_billboard::Initialize(int a2)
Ritor1
parents:
diff changeset
141 {
Ritor1
parents:
diff changeset
142 uNumVec4sInArray1 = 66;
Ritor1
parents:
diff changeset
143 pArray1 = new stru16x[66];
Ritor1
parents:
diff changeset
144
Ritor1
parents:
diff changeset
145 uNumVec3sInArray2 = 128;
Ritor1
parents:
diff changeset
146 pArray2 = new stru160[128];
Ritor1
parents:
diff changeset
147
Ritor1
parents:
diff changeset
148 for (uint i = 0; i < uNumVec4sInArray1; ++i)
Ritor1
parents:
diff changeset
149 {
Ritor1
parents:
diff changeset
150 pArray1[i].field_0 = array_4EB8B8[i].field_0;
Ritor1
parents:
diff changeset
151 pArray1[i].field_4 = array_4EB8B8[i].field_4;
Ritor1
parents:
diff changeset
152 pArray1[i].field_8 = array_4EB8B8[i].field_8;
Ritor1
parents:
diff changeset
153 pArray1[i].field_C = a2;
Ritor1
parents:
diff changeset
154 }
1207
96a81634669e arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents: 1106
diff changeset
155 memcpy(pArray2, array_4EBBD0_x.data()/*array_4EBBD0*/, uNumVec3sInArray2 * sizeof(stru160));
0
Ritor1
parents:
diff changeset
156 }
Ritor1
parents:
diff changeset
157
Ritor1
parents:
diff changeset
158 //----- (0047829F) --------------------------------------------------------
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
159 void stru6_stru1_indoor_sw_billboard::_47829F_sphere_particle(float x_offset, float y_offset, float z_offset, float scale, int diffuse)
0
Ritor1
parents:
diff changeset
160 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
161 int v7 = 0;
0
Ritor1
parents:
diff changeset
162
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
163 for (unsigned int i = 0; i < uNumVec3sInArray2; ++i)
0
Ritor1
parents:
diff changeset
164 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
165 for (unsigned int j = 0; j < 3; ++j)
0
Ritor1
parents:
diff changeset
166 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
167 field_14[j].x = x_offset + scale * *(&pArray1->field_0 + 4 * *(int *)((char *)&pArray2->field_0 + v7));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
168 field_14[j].y = y_offset + scale * *(&pArray1->field_4 + 4 * *(int *)((char *)&pArray2->field_0 + v7));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
169 field_14[j].z = z_offset + scale * *(&pArray1->field_8 + 4 * *(int *)((char *)&pArray2->field_0 + v7));
2198
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2188
diff changeset
170 //int v10 = *(int *)((char *)&pArray2->field_0 + v7);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
171
2198
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2188
diff changeset
172 field_14[j].diffuse = *((int *)&pArray1[1].field_0 + 4 * (*(int *)((char *)&pArray2->field_0 + v7)));
0
Ritor1
parents:
diff changeset
173 v7 += 4;
Ritor1
parents:
diff changeset
174 }
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
175
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
176 uNumVertices = 3;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
177 if ( sub_477C61() && sub_477F63() )
0
Ritor1
parents:
diff changeset
178 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
179 if ( sub_47802A() )
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
180 pRenderer->_4A4CC9_AddSomeBillboard(this, diffuse);
0
Ritor1
parents:
diff changeset
181 }
Ritor1
parents:
diff changeset
182 }
Ritor1
parents:
diff changeset
183 }
Ritor1
parents:
diff changeset
184
Ritor1
parents:
diff changeset
185
Ritor1
parents:
diff changeset
186
Ritor1
parents:
diff changeset
187
Ritor1
parents:
diff changeset
188 //----- (004A71FE) --------------------------------------------------------
Ritor1
parents:
diff changeset
189 void stru6::DoAddProjectile(float srcX, float srcY, float srcZ, float dstX, float dstY, float dstZ, unsigned int uTextureID)
Ritor1
parents:
diff changeset
190 {
486
Nomad
parents: 430
diff changeset
191 //int v8; // eax@1
0
Ritor1
parents:
diff changeset
192
486
Nomad
parents: 430
diff changeset
193 //v8 = uNumProjectiles;
Nomad
parents: 430
diff changeset
194 if (uNumProjectiles < 32)
0
Ritor1
parents:
diff changeset
195 {
486
Nomad
parents: 430
diff changeset
196 pProjectiles[uNumProjectiles].srcX = srcX;
Nomad
parents: 430
diff changeset
197 pProjectiles[uNumProjectiles].srcY = srcY;
0
Ritor1
parents:
diff changeset
198 pProjectiles[uNumProjectiles].srcZ = srcZ;
Ritor1
parents:
diff changeset
199 pProjectiles[uNumProjectiles].dstX = dstX;
Ritor1
parents:
diff changeset
200 pProjectiles[uNumProjectiles].dstY = dstY;
Ritor1
parents:
diff changeset
201 pProjectiles[uNumProjectiles].dstZ = dstZ;
Ritor1
parents:
diff changeset
202 pProjectiles[uNumProjectiles++].uTextureID = uTextureID;
Ritor1
parents:
diff changeset
203 }
Ritor1
parents:
diff changeset
204 }
Ritor1
parents:
diff changeset
205
Ritor1
parents:
diff changeset
206 //----- (004A7298) --------------------------------------------------------
Ritor1
parents:
diff changeset
207 void stru6::DrawProjectiles()
Ritor1
parents:
diff changeset
208 {
Ritor1
parents:
diff changeset
209 float v10; // ST1C_4@8
Ritor1
parents:
diff changeset
210 float v11; // ST0C_4@8
Ritor1
parents:
diff changeset
211 IDirect3DTexture2 *v12; // [sp+20h] [bp-78h]@6
Ritor1
parents:
diff changeset
212 RenderVertexSoft v[2]; // [sp+30h] [bp-68h]@1
Ritor1
parents:
diff changeset
213
Ritor1
parents:
diff changeset
214 for (uint i = 0; i < uNumProjectiles; ++i)
Ritor1
parents:
diff changeset
215 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1954
diff changeset
216 ProjectileAnim* p = &pProjectiles[i];
0
Ritor1
parents:
diff changeset
217
Ritor1
parents:
diff changeset
218 v[0].vWorldPosition.x = p->srcX;
Ritor1
parents:
diff changeset
219 v[0].vWorldPosition.y = p->srcY;
Ritor1
parents:
diff changeset
220 v[0].vWorldPosition.z = p->srcZ;
Ritor1
parents:
diff changeset
221 v[1].vWorldPosition.x = p->dstX;
Ritor1
parents:
diff changeset
222 v[1].vWorldPosition.y = p->dstY;
Ritor1
parents:
diff changeset
223 v[1].vWorldPosition.z = p->dstZ;
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
224 pIndoorCameraD3D->ViewTransform(v, 2);
0
Ritor1
parents:
diff changeset
225
Ritor1
parents:
diff changeset
226 sr_42620A(v);
Ritor1
parents:
diff changeset
227
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
228 pIndoorCameraD3D->Project(v, 2, 0);
0
Ritor1
parents:
diff changeset
229
Ritor1
parents:
diff changeset
230 if (p->uTextureID != -1)
Ritor1
parents:
diff changeset
231 v12 = pBitmaps_LOD->pHardwareTextures[p->uTextureID];
Ritor1
parents:
diff changeset
232 else
Ritor1
parents:
diff changeset
233 v12 = 0;
Ritor1
parents:
diff changeset
234
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
235 v10 = pIndoorCameraD3D->fov_x / v[1].vWorldViewPosition.x * 20.0;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
236 v11 = pIndoorCameraD3D->fov_x / v[0].vWorldViewPosition.x * 20.0;
0
Ritor1
parents:
diff changeset
237 pRenderer->DrawProjectile(
Ritor1
parents:
diff changeset
238 v[0].vWorldViewProjX,
Ritor1
parents:
diff changeset
239 v[0].vWorldViewProjY,
Ritor1
parents:
diff changeset
240 v[0].vWorldViewPosition.x,
Ritor1
parents:
diff changeset
241 v11,
Ritor1
parents:
diff changeset
242 v[1].vWorldViewProjX,
Ritor1
parents:
diff changeset
243 v[1].vWorldViewProjY,
Ritor1
parents:
diff changeset
244 v[1].vWorldViewPosition.x,
Ritor1
parents:
diff changeset
245 v10,
Ritor1
parents:
diff changeset
246 v12);
Ritor1
parents:
diff changeset
247 }
Ritor1
parents:
diff changeset
248 }
Ritor1
parents:
diff changeset
249
Ritor1
parents:
diff changeset
250 //----- (004A73AA) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
251 void stru6::_4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(SpriteObject *a2, unsigned int uDiffuse, unsigned int uTextureID)
0
Ritor1
parents:
diff changeset
252 {
Ritor1
parents:
diff changeset
253 stru6 *v4; // edi@1
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
254 SpriteObject *v5; // esi@1
0
Ritor1
parents:
diff changeset
255 int v6; // eax@1
Ritor1
parents:
diff changeset
256 stru6_stru2 *v7; // eax@2
Ritor1
parents:
diff changeset
257 double v8; // st7@2
Ritor1
parents:
diff changeset
258 double v9; // st6@2
Ritor1
parents:
diff changeset
259 double v10; // st7@3
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
260 Particle_sw local_0; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
261 float x; // [sp+78h] [bp+8h]@2
Ritor1
parents:
diff changeset
262
Ritor1
parents:
diff changeset
263 v4 = this;
Ritor1
parents:
diff changeset
264 memset(&local_0, 0, 0x68u);
Ritor1
parents:
diff changeset
265 v5 = a2;
Ritor1
parents:
diff changeset
266 v6 = a2->field_54;
Ritor1
parents:
diff changeset
267 if ( v6 )
Ritor1
parents:
diff changeset
268 {
486
Nomad
parents: 430
diff changeset
269 v7 = &v4->array_4[v6 & 0x1F];
Nomad
parents: 430
diff changeset
270 x = ((double)a2->vPosition.x - v7->flt_0_x) * 0.5 + v7->flt_0_x;
Nomad
parents: 430
diff changeset
271 v8 = ((double)v5->vPosition.y - v7->flt_4_y) * 0.5 + v7->flt_4_y;
Nomad
parents: 430
diff changeset
272 v9 = ((double)v5->vPosition.z - v7->flt_8_z) * 0.5 + v7->flt_8_z;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
273 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
0
Ritor1
parents:
diff changeset
274 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
275 local_0.x = x + 4.0;
Ritor1
parents:
diff changeset
276 local_0.y = v8;
Ritor1
parents:
diff changeset
277 local_0.z = v9;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
278 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
279 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
280 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
281 local_0.timeToLive = (rand() & 0x40) + 96;
Ritor1
parents:
diff changeset
282 local_0.uTextureID = uTextureID;
Ritor1
parents:
diff changeset
283 local_0.flt_28 = 1.0;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
284 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
285 local_0.x = x - 4.0;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
286 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
287 local_0.x = (double)v5->vPosition.x + 4.0;
Ritor1
parents:
diff changeset
288 local_0.y = (double)v5->vPosition.y;
Ritor1
parents:
diff changeset
289 local_0.z = (double)v5->vPosition.z;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
290 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
291 local_0.x = (double)v5->vPosition.x - 4.0;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
292 pEngine->pParticleEngine->AddParticle(&local_0);
486
Nomad
parents: 430
diff changeset
293 v4->array_4[v5->field_54 & 0x1F].flt_0_x = (double)v5->vPosition.x;
Nomad
parents: 430
diff changeset
294 v4->array_4[v5->field_54 & 0x1F].flt_4_y = (double)v5->vPosition.y;
Nomad
parents: 430
diff changeset
295 v4->array_4[v5->field_54 & 0x1F].flt_8_z = (double)v5->vPosition.z;
0
Ritor1
parents:
diff changeset
296 }
Ritor1
parents:
diff changeset
297 else
Ritor1
parents:
diff changeset
298 {
486
Nomad
parents: 430
diff changeset
299 a2->field_54 = v4->field_0++;
Nomad
parents: 430
diff changeset
300 v4->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
Nomad
parents: 430
diff changeset
301 v4->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
Nomad
parents: 430
diff changeset
302 v4->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
0
Ritor1
parents:
diff changeset
303 v10 = (double)a2->vPosition.x;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
304 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
0
Ritor1
parents:
diff changeset
305 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
306 local_0.x = v10 + 4.0;
Ritor1
parents:
diff changeset
307 local_0.y = (double)a2->vPosition.y;
Ritor1
parents:
diff changeset
308 local_0.z = (double)a2->vPosition.z;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
309 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
310 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
311 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
312 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
313 local_0.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
314 local_0.uTextureID = uTextureID;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
315 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
316 local_0.x = (double)a2->vPosition.x - 4.0;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
317 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
318 }
Ritor1
parents:
diff changeset
319 }
Ritor1
parents:
diff changeset
320
Ritor1
parents:
diff changeset
321 //----- (004A75CC) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
322 void stru6::_4A75CC_single_spell_collision_particle(SpriteObject *a1, unsigned int uDiffuse, unsigned int uTextureID)
0
Ritor1
parents:
diff changeset
323 {
Ritor1
parents:
diff changeset
324 double v4; // st7@1
Ritor1
parents:
diff changeset
325 signed int v5; // edi@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
326 Particle_sw local_0; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
327
Ritor1
parents:
diff changeset
328 memset(&local_0, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
329 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
0
Ritor1
parents:
diff changeset
330 local_0.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
331 local_0.y = (double)a1->vPosition.y;
Ritor1
parents:
diff changeset
332 v4 = (double)a1->vPosition.z;
Ritor1
parents:
diff changeset
333 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
334 local_0.z = v4;
Ritor1
parents:
diff changeset
335 v5 = 10;
Ritor1
parents:
diff changeset
336 local_0.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
337 local_0.uTextureID = uTextureID;
Ritor1
parents:
diff changeset
338 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
339 do
Ritor1
parents:
diff changeset
340 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
341 local_0.r = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
342 local_0.g = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
343 local_0.b = (double)(rand() & 0x1FF) - 255.0;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
344 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
345 --v5;
Ritor1
parents:
diff changeset
346 }
Ritor1
parents:
diff changeset
347 while ( v5 );
Ritor1
parents:
diff changeset
348 }
Ritor1
parents:
diff changeset
349
Ritor1
parents:
diff changeset
350 //----- (004A7688) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
351 void stru6::_4A7688_fireball_collision_particle(SpriteObject *a2)
0
Ritor1
parents:
diff changeset
352 {
Ritor1
parents:
diff changeset
353 double v3; // st7@1
Ritor1
parents:
diff changeset
354 double v4; // st7@2
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
355 Particle_sw local_0; // [sp+1Ch] [bp-7Ch]@1
0
Ritor1
parents:
diff changeset
356
Ritor1
parents:
diff changeset
357 memset(&local_0, 0, 0x68u);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
358
0
Ritor1
parents:
diff changeset
359 v3 = (double)a2->uSpriteFrameID / (double)pObjectList->pObjects[a2->uObjectDescID].uLifetime;
Ritor1
parents:
diff changeset
360 if ( v3 >= 0.75 )
Ritor1
parents:
diff changeset
361 v4 = (1.0 - v3) * 4.0;
Ritor1
parents:
diff changeset
362 else
Ritor1
parents:
diff changeset
363 v4 = v3 * 1.333333333333333;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
364
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
365 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
366 local_0.uDiffuse = 0xFF3C1E;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
367 local_0.x = (double)a2->vPosition.x;
0
Ritor1
parents:
diff changeset
368 local_0.y = (double)a2->vPosition.y;
Ritor1
parents:
diff changeset
369 local_0.z = (double)a2->vPosition.z;
Ritor1
parents:
diff changeset
370 local_0.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
371 local_0.uTextureID = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
372 local_0.flt_28 = 1.0;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
373
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
374 // 10 fireball sparks
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
375 for (unsigned int i = 0; i < 10; ++i)
0
Ritor1
parents:
diff changeset
376 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
377 local_0.r = (rand() & 0x1FF) - 255;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
378 local_0.g = (rand() & 0x1FF) - 255;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
379 local_0.b = (rand() & 0x1FF) - 255;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
380 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
381 }
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
382
2198
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2188
diff changeset
383 pStru1->_47829F_sphere_particle((double)a2->vPosition.x, (double)a2->vPosition.y, (double)a2->vPosition.z,
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2188
diff changeset
384 (double)floorf(0.5f + (512.0 * v3)), ModulateColor(0xFF3C1E, v4));
0
Ritor1
parents:
diff changeset
385 }
Ritor1
parents:
diff changeset
386
Ritor1
parents:
diff changeset
387 //----- (004A77FD) --------------------------------------------------------
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
388 void stru6::_4A77FD_implosion_particle_d3d(SpriteObject *a1)
0
Ritor1
parents:
diff changeset
389 {
Ritor1
parents:
diff changeset
390 double v4; // st7@1
Ritor1
parents:
diff changeset
391 double v5; // st7@2
Ritor1
parents:
diff changeset
392 int v7; // eax@4
Ritor1
parents:
diff changeset
393 float v8; // ST0C_4@4
Ritor1
parents:
diff changeset
394 float v9; // ST08_4@4
Ritor1
parents:
diff changeset
395 float v10; // ST04_4@4
Ritor1
parents:
diff changeset
396 float v11; // ST00_4@4
Ritor1
parents:
diff changeset
397 float v12; // [sp+28h] [bp-4h]@1
Ritor1
parents:
diff changeset
398
Ritor1
parents:
diff changeset
399 v4 = (double)a1->uSpriteFrameID / (double)pObjectList->pObjects[a1->uObjectDescID].uLifetime;
Ritor1
parents:
diff changeset
400 v12 = 512.0 - v4 * 512.0;
Ritor1
parents:
diff changeset
401 if ( v4 >= 0.75 )
Ritor1
parents:
diff changeset
402 v5 = v4 * 4.0;
Ritor1
parents:
diff changeset
403 else
Ritor1
parents:
diff changeset
404 v5 = v4 * 1.333333333333333;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
405
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
406 v7 = ModulateColor(0x7E7E7E, v5);
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
407 v8 = (double)floorf(0.5f + v12);
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
408 v9 = (double)a1->vPosition.z;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
409 v10 = (double)a1->vPosition.y;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
410 v11 = (double)a1->vPosition.x;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
411 pStru1->_47829F_sphere_particle(v11, v10, v9, v8, v7);
0
Ritor1
parents:
diff changeset
412 }
Ritor1
parents:
diff changeset
413
Ritor1
parents:
diff changeset
414 //----- (004A78AE) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
415 void stru6::_4A78AE_sparks_spell(SpriteObject *a1)
0
Ritor1
parents:
diff changeset
416 {
Ritor1
parents:
diff changeset
417 ObjectDesc *v2; // esi@1
Ritor1
parents:
diff changeset
418 unsigned int v3; // eax@1
Ritor1
parents:
diff changeset
419 double v4; // st7@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
420 Particle_sw local_0; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
421
Ritor1
parents:
diff changeset
422 v2 = &pObjectList->pObjects[a1->uObjectDescID];
Ritor1
parents:
diff changeset
423 memset(&local_0, 0, 0x68u);
Ritor1
parents:
diff changeset
424 v3 = a1->uSpriteFrameID;
Ritor1
parents:
diff changeset
425 local_0.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
426 v4 = (double)a1->vPosition.y;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
427 local_0.type = ParticleType_Sprite;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
428 local_0.uDiffuse = 0x7F7F7F;
0
Ritor1
parents:
diff changeset
429 local_0.timeToLive = 1;
Ritor1
parents:
diff changeset
430 local_0.y = v4;
Ritor1
parents:
diff changeset
431 local_0.z = (double)a1->vPosition.z;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
432 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
433 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
434 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
435 local_0.uTextureID = pSpriteFrameTable->GetFrame(v2->uSpriteID, v3)->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
436 LODWORD(local_0.flt_28) = 0x40000000u;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
437 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
438 }
Ritor1
parents:
diff changeset
439
Ritor1
parents:
diff changeset
440 //----- (004A7948) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
441 void stru6::_4A7948_mind_blast_after_effect(SpriteObject *a1)
0
Ritor1
parents:
diff changeset
442 {
Ritor1
parents:
diff changeset
443 ObjectDesc *v2; // esi@1
Ritor1
parents:
diff changeset
444 unsigned int v3; // eax@1
Ritor1
parents:
diff changeset
445 double v4; // st7@1
Ritor1
parents:
diff changeset
446 char v5; // al@1
Ritor1
parents:
diff changeset
447 signed int v6; // edi@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
448 Particle_sw Dst; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
449
Ritor1
parents:
diff changeset
450 v2 = &pObjectList->pObjects[a1->uObjectDescID];
Ritor1
parents:
diff changeset
451 memset(&Dst, 0, 0x68u);
Ritor1
parents:
diff changeset
452 v3 = a1->uSpriteFrameID;
Ritor1
parents:
diff changeset
453 Dst.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
454 v4 = (double)a1->vPosition.y;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
455 Dst.type = ParticleType_Sprite | ParticleType_Rotating | ParticleType_1;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
456 Dst.uDiffuse = 0x7F7F7F;
0
Ritor1
parents:
diff changeset
457 Dst.y = v4;
Ritor1
parents:
diff changeset
458 Dst.z = (double)a1->vPosition.z;
Ritor1
parents:
diff changeset
459 Dst.uTextureID = pSpriteFrameTable->GetFrame(v2->uSpriteID, v3)->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
460 v5 = rand();
Ritor1
parents:
diff changeset
461 v6 = 10;
Ritor1
parents:
diff changeset
462 Dst.flt_28 = 1.0;
Ritor1
parents:
diff changeset
463 Dst.timeToLive = (v5 & 0x7F) + 128;
Ritor1
parents:
diff changeset
464 do
Ritor1
parents:
diff changeset
465 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
466 Dst.r = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
467 Dst.g = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
468 Dst.b = (double)(rand() & 0x1FF) - 255.0;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
469 pEngine->pParticleEngine->AddParticle(&Dst);
0
Ritor1
parents:
diff changeset
470 --v6;
Ritor1
parents:
diff changeset
471 }
Ritor1
parents:
diff changeset
472 while ( v6 );
Ritor1
parents:
diff changeset
473 }
Ritor1
parents:
diff changeset
474
Ritor1
parents:
diff changeset
475 //----- (004A7A27) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
476 bool stru6::AddMobileLight(SpriteObject *a1, unsigned int uDiffuse, int uRadius)
0
Ritor1
parents:
diff changeset
477 {
2207
ff8920a40c21 fixpoint_mul
Ritor1
parents: 2198
diff changeset
478 return pMobileLightsStack->AddLight(a1->vPosition.x, a1->vPosition.y, a1->vPosition.z, a1->uSectorID, uRadius,
0
Ritor1
parents:
diff changeset
479 (uDiffuse & 0x00FF0000) >> 16,
Ritor1
parents:
diff changeset
480 (uDiffuse & 0x0000FF00) >> 8,
Ritor1
parents:
diff changeset
481 uDiffuse & 0x000000FF,
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
482 _4E94D3_light_type);
0
Ritor1
parents:
diff changeset
483 }
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
484 // 4E94D3: using guessed type char _4E94D3_light_type;
0
Ritor1
parents:
diff changeset
485
Ritor1
parents:
diff changeset
486 //----- (004A7A66) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
487 void stru6::_4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(SpriteObject *a1, unsigned int uDiffuse, unsigned int uTextureID, float a4)
0
Ritor1
parents:
diff changeset
488 {
Ritor1
parents:
diff changeset
489 int v5; // eax@1
Ritor1
parents:
diff changeset
490 char v6; // al@1
Ritor1
parents:
diff changeset
491 double v7; // st6@1
Ritor1
parents:
diff changeset
492 double v8; // st6@1
Ritor1
parents:
diff changeset
493 double v9; // st7@1
Ritor1
parents:
diff changeset
494 double v10; // st6@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
495 Particle_sw local_0; // [sp+0h] [bp-6Ch]@1
0
Ritor1
parents:
diff changeset
496 float v12; // [sp+68h] [bp-4h]@1
Ritor1
parents:
diff changeset
497 float a1a; // [sp+74h] [bp+8h]@1
Ritor1
parents:
diff changeset
498 float uDiffusea; // [sp+78h] [bp+Ch]@1
Ritor1
parents:
diff changeset
499 float uTextureIDa; // [sp+7Ch] [bp+10h]@1
Ritor1
parents:
diff changeset
500
Ritor1
parents:
diff changeset
501 memset(&local_0, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
502 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
0
Ritor1
parents:
diff changeset
503 local_0.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
504 v5 = a1->vPosition.z;
Ritor1
parents:
diff changeset
505 local_0.y = (double)a1->vPosition.y;
Ritor1
parents:
diff changeset
506 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
507 local_0.z = (double)(v5 + 32);
Ritor1
parents:
diff changeset
508 v6 = rand();
Ritor1
parents:
diff changeset
509 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
510 v7 = 0.0 * a4;
Ritor1
parents:
diff changeset
511 local_0.timeToLive = (v6 & 0x7F) + 128;
Ritor1
parents:
diff changeset
512 local_0.uTextureID = uTextureID;
Ritor1
parents:
diff changeset
513 a1a = v7;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
514 local_0.r = v7;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
515 local_0.g = a4;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
516 local_0.b = a4;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
517 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
518 v8 = 0.70710677 * a4;
Ritor1
parents:
diff changeset
519 uDiffusea = v8;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
520 local_0.r = v8;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
521 local_0.g = v8;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
522 local_0.b = a4;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
523 pEngine->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
524 local_0.g = a1a;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
525 local_0.r = a4;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
526 local_0.b = a4;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
527 pEngine->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
528 local_0.r = uDiffusea;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
529 local_0.b = a4;
0
Ritor1
parents:
diff changeset
530 v9 = -uDiffusea;
Ritor1
parents:
diff changeset
531 uTextureIDa = v9;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
532 local_0.g = v9;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
533 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
534 v10 = -1.0 * a4;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
535 local_0.r = a1a;
0
Ritor1
parents:
diff changeset
536 v12 = v10;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
537 local_0.g = v10;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
538 local_0.b = a4;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
539 pEngine->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
540 local_0.b = a4;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
541 local_0.r = uTextureIDa;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
542 local_0.g = uTextureIDa;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
543 pEngine->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
544 local_0.r = v12;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
545 local_0.g = a1a;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
546 local_0.b = a4;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
547 pEngine->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
548 local_0.r = uTextureIDa;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
549 local_0.g = uDiffusea;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
550 local_0.b = a4;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
551 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
552 }
Ritor1
parents:
diff changeset
553
Ritor1
parents:
diff changeset
554 //----- (004A7C07) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
555 void stru6::_4A7C07(SpriteObject *a2)
0
Ritor1
parents:
diff changeset
556 {
Ritor1
parents:
diff changeset
557 stru6 *v2; // edi@1
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
558 SpriteObject *v3; // esi@1
0
Ritor1
parents:
diff changeset
559 int v4; // eax@1
Ritor1
parents:
diff changeset
560 ObjectDesc *v5; // ebx@1
Ritor1
parents:
diff changeset
561 stru6_stru2 *v6; // eax@2
Ritor1
parents:
diff changeset
562 double v7; // st6@2
Ritor1
parents:
diff changeset
563 double v8; // st5@2
Ritor1
parents:
diff changeset
564 double v9; // st4@2
Ritor1
parents:
diff changeset
565 char v10; // al@2
Ritor1
parents:
diff changeset
566 double v11; // st7@2
Ritor1
parents:
diff changeset
567 double v12; // st7@3
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
568 Particle_sw local_0; // [sp+Ch] [bp-68h]@1
0
Ritor1
parents:
diff changeset
569 float a2a; // [sp+7Ch] [bp+8h]@2
Ritor1
parents:
diff changeset
570
Ritor1
parents:
diff changeset
571 v2 = this;
Ritor1
parents:
diff changeset
572 memset(&local_0, 0, 0x68u);
Ritor1
parents:
diff changeset
573 v3 = a2;
Ritor1
parents:
diff changeset
574 v4 = a2->field_54;
Ritor1
parents:
diff changeset
575 v5 = &pObjectList->pObjects[a2->uObjectDescID];
Ritor1
parents:
diff changeset
576 if ( v4 )
Ritor1
parents:
diff changeset
577 {
486
Nomad
parents: 430
diff changeset
578 v6 = &v2->array_4[v4 & 0x1F];
Nomad
parents: 430
diff changeset
579 v7 = ((double)a2->vPosition.x - v6->flt_0_x) * 0.5 + v6->flt_0_x;
Nomad
parents: 430
diff changeset
580 v8 = ((double)a2->vPosition.y - v6->flt_4_y) * 0.5 + v6->flt_4_y;
Nomad
parents: 430
diff changeset
581 v9 = ((double)a2->vPosition.z - v6->flt_8_z) * 0.5 + v6->flt_8_z;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
582 local_0.type = ParticleType_Sprite;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
583 local_0.uDiffuse = 0xFFFFFF;
0
Ritor1
parents:
diff changeset
584 a2a = v9;
Ritor1
parents:
diff changeset
585 local_0.x = v7;
Ritor1
parents:
diff changeset
586 local_0.z = a2a;
Ritor1
parents:
diff changeset
587 local_0.y = v8;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
588 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
589 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
590 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
591 v10 = rand();
Ritor1
parents:
diff changeset
592 LODWORD(local_0.flt_28) = 0x40400000u;
Ritor1
parents:
diff changeset
593 local_0.timeToLive = (v10 & 0x3F) + 64;
Ritor1
parents:
diff changeset
594 local_0.uTextureID = pSpriteFrameTable->GetFrame(v5->uSpriteID, v3->uSpriteFrameID)->pHwSpriteIDs[0];
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
595 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
596 v11 = (double)v3->vPosition.x;
Ritor1
parents:
diff changeset
597 LODWORD(local_0.flt_28) = 0x40800000u;
Ritor1
parents:
diff changeset
598 local_0.x = v11;
Ritor1
parents:
diff changeset
599 local_0.y = (double)v3->vPosition.y;
Ritor1
parents:
diff changeset
600 local_0.z = (double)v3->vPosition.z;
Ritor1
parents:
diff changeset
601 local_0.timeToLive = (rand() & 0x3F) + 64;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
602 pEngine->pParticleEngine->AddParticle(&local_0);
486
Nomad
parents: 430
diff changeset
603 v2->array_4[v3->field_54 & 0x1F].flt_0_x = (double)v3->vPosition.x;
Nomad
parents: 430
diff changeset
604 v2->array_4[v3->field_54 & 0x1F].flt_4_y = (double)v3->vPosition.y;
Nomad
parents: 430
diff changeset
605 v2->array_4[v3->field_54 & 0x1F].flt_8_z = (double)v3->vPosition.z;
0
Ritor1
parents:
diff changeset
606 }
Ritor1
parents:
diff changeset
607 else
Ritor1
parents:
diff changeset
608 {
486
Nomad
parents: 430
diff changeset
609 a2->field_54 = v2->field_0++;
Nomad
parents: 430
diff changeset
610 v2->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
Nomad
parents: 430
diff changeset
611 v2->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
Nomad
parents: 430
diff changeset
612 v2->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
0
Ritor1
parents:
diff changeset
613 v12 = (double)a2->vPosition.x;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
614 local_0.type = ParticleType_Sprite;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
615 local_0.uDiffuse = 0xFFFFFF;
0
Ritor1
parents:
diff changeset
616 LODWORD(local_0.flt_28) = 0x40000000u;
Ritor1
parents:
diff changeset
617 local_0.x = v12;
Ritor1
parents:
diff changeset
618 local_0.y = (double)a2->vPosition.y;
Ritor1
parents:
diff changeset
619 local_0.z = (double)a2->vPosition.z;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
620 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
621 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
622 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
623 local_0.timeToLive = (rand() & 0x3F) + 64;
Ritor1
parents:
diff changeset
624 local_0.uTextureID = pSpriteFrameTable->GetFrame(v5->uSpriteID, a2->uSpriteFrameID)->pHwSpriteIDs[0];
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
625 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
626 }
Ritor1
parents:
diff changeset
627 }
Ritor1
parents:
diff changeset
628
Ritor1
parents:
diff changeset
629 //----- (004A7E05) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
630 void stru6::AddProjectile(SpriteObject *a2, int a3, unsigned int uTextureID)
0
Ritor1
parents:
diff changeset
631 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
632 if (a2->field_54)
0
Ritor1
parents:
diff changeset
633 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
634 DoAddProjectile(array_4[a2->field_54 & 0x1F].flt_0_x,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
635 array_4[a2->field_54 & 0x1F].flt_4_y,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
636 array_4[a2->field_54 & 0x1F].flt_8_z,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
637 a2->vPosition.x,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
638 a2->vPosition.y,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
639 a2->vPosition.z,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
640 uTextureID);
0
Ritor1
parents:
diff changeset
641 }
Ritor1
parents:
diff changeset
642 else
Ritor1
parents:
diff changeset
643 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
644 a2->field_54 = field_0++;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
645 array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
646 array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
647 array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
0
Ritor1
parents:
diff changeset
648 }
Ritor1
parents:
diff changeset
649 }
Ritor1
parents:
diff changeset
650
Ritor1
parents:
diff changeset
651 //----- (004A7E89) --------------------------------------------------------
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
652 void stru6::_4A7E89_sparkles_on_actor_after_it_casts_buff(Actor *pActor, unsigned int uDiffuse)
0
Ritor1
parents:
diff changeset
653 {
Ritor1
parents:
diff changeset
654 Actor *v3; // edi@1
Ritor1
parents:
diff changeset
655 int v4; // ebx@3
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
656 //int result; // eax@5
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
657 Particle_sw Dst; // [sp+Ch] [bp-6Ch]@1
0
Ritor1
parents:
diff changeset
658 int v7; // [sp+74h] [bp-4h]@2
Ritor1
parents:
diff changeset
659 signed int pActora; // [sp+80h] [bp+8h]@1
Ritor1
parents:
diff changeset
660
Ritor1
parents:
diff changeset
661 memset(&Dst, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
662 Dst.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
0
Ritor1
parents:
diff changeset
663 Dst.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
664 v3 = pActor;
Ritor1
parents:
diff changeset
665 Dst.uTextureID = pBitmaps_LOD->LoadTexture("effpar02", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
666 pActora = 50;
Ritor1
parents:
diff changeset
667 Dst.flt_28 = 1.0;
Ritor1
parents:
diff changeset
668 do
Ritor1
parents:
diff changeset
669 {
Ritor1
parents:
diff changeset
670 v7 = (unsigned __int8)rand() + v3->vPosition.x - 127;
Ritor1
parents:
diff changeset
671 Dst.x = (double)v7;
Ritor1
parents:
diff changeset
672 v7 = (unsigned __int8)rand() + v3->vPosition.y - 127;
Ritor1
parents:
diff changeset
673 Dst.y = (double)v7;
Ritor1
parents:
diff changeset
674 v7 = v3->vPosition.z + (unsigned __int8)rand();
Ritor1
parents:
diff changeset
675 Dst.z = (double)v7;
Ritor1
parents:
diff changeset
676 if ( uDiffuse )
Ritor1
parents:
diff changeset
677 {
Ritor1
parents:
diff changeset
678 Dst.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
679 }
Ritor1
parents:
diff changeset
680 else
Ritor1
parents:
diff changeset
681 {
Ritor1
parents:
diff changeset
682 v4 = rand() << 16;
Ritor1
parents:
diff changeset
683 Dst.uDiffuse = rand() | v4;
Ritor1
parents:
diff changeset
684 }
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
685 pEngine->pParticleEngine->AddParticle(&Dst);
0
Ritor1
parents:
diff changeset
686 --pActora;
Ritor1
parents:
diff changeset
687 }
Ritor1
parents:
diff changeset
688 while ( pActora );
Ritor1
parents:
diff changeset
689 }
Ritor1
parents:
diff changeset
690
Ritor1
parents:
diff changeset
691 //----- (004A7F74) --------------------------------------------------------
Ritor1
parents:
diff changeset
692 void stru6::_4A7F74(int x, int y, int z)
Ritor1
parents:
diff changeset
693 {
Ritor1
parents:
diff changeset
694 stru6 *v4; // esi@1
Ritor1
parents:
diff changeset
695 char v5; // al@1
Ritor1
parents:
diff changeset
696 signed int v6; // edi@1
Ritor1
parents:
diff changeset
697 unsigned int v7; // eax@1
Ritor1
parents:
diff changeset
698 double v8; // st7@2
Ritor1
parents:
diff changeset
699 double v9; // st7@2
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
700 Particle_sw local_0; // [sp+8h] [bp-78h]@1
0
Ritor1
parents:
diff changeset
701 double v11; // [sp+70h] [bp-10h]@1
Ritor1
parents:
diff changeset
702 double v12; // [sp+78h] [bp-8h]@1
Ritor1
parents:
diff changeset
703 float z1; // [sp+88h] [bp+8h]@2
Ritor1
parents:
diff changeset
704
Ritor1
parents:
diff changeset
705 v4 = this;
Ritor1
parents:
diff changeset
706 memset(&local_0, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
707 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
708 local_0.uDiffuse = 0x7E7E7E;
0
Ritor1
parents:
diff changeset
709 v5 = rand();
Ritor1
parents:
diff changeset
710 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
711 v6 = 8;
Ritor1
parents:
diff changeset
712 local_0.timeToLive = (v5 & 0x7F) + 128;
Ritor1
parents:
diff changeset
713 v7 = v4->uTextureID_effpar1;
Ritor1
parents:
diff changeset
714 v12 = (double)x;
Ritor1
parents:
diff changeset
715 local_0.uTextureID = v7;
Ritor1
parents:
diff changeset
716 v11 = (double)y;
Ritor1
parents:
diff changeset
717 do
Ritor1
parents:
diff changeset
718 {
Ritor1
parents:
diff changeset
719 v8 = pRnd->GetRandom();
Ritor1
parents:
diff changeset
720 local_0.x = v8 * 40.0 - 20.0 + v12;
Ritor1
parents:
diff changeset
721 v9 = pRnd->GetRandom();
Ritor1
parents:
diff changeset
722 z1 = (double)z;
Ritor1
parents:
diff changeset
723 local_0.z = z1;
Ritor1
parents:
diff changeset
724 local_0.y = v9 * 40.0 - 20.0 + v11;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
725 local_0.r = pRnd->GetRandom() * 400.0 - 200.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
726 local_0.g = pRnd->GetRandom() * 400.0 - 200.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
727 local_0.b = pRnd->GetRandom() * 150.0 + 50.0;
2541
a902abdfc7f2 1. Renamed class Game to class Engine.
a.parshin
parents: 2524
diff changeset
728 pEngine->pParticleEngine->AddParticle(&local_0);
0
Ritor1
parents:
diff changeset
729 --v6;
Ritor1
parents:
diff changeset
730 }
Ritor1
parents:
diff changeset
731 while ( v6 );
Ritor1
parents:
diff changeset
732 }
Ritor1
parents:
diff changeset
733
Ritor1
parents:
diff changeset
734 //----- (004A806F) --------------------------------------------------------
Ritor1
parents:
diff changeset
735 int stru6::_4A806F(Actor *pActor)
Ritor1
parents:
diff changeset
736 {
Ritor1
parents:
diff changeset
737 int v2; // ecx@1
Ritor1
parents:
diff changeset
738 unsigned int v3; // eax@1
Ritor1
parents:
diff changeset
739 double v4; // st7@2
Ritor1
parents:
diff changeset
740 float v5; // ST00_4@6
Ritor1
parents:
diff changeset
741
Ritor1
parents:
diff changeset
742 v2 = (int)pActor;
1954
730166317ed0 pActorBuffs[10] to pActorBuffs[ACTOR_BUFF_MASS_DISTORTION]
Grumpy7
parents: 1705
diff changeset
743 v3 = LODWORD(pActor->pActorBuffs[ACTOR_BUFF_MASS_DISTORTION].uExpireTime) - pMiscTimer->uTotalGameTimeElapsed;
0
Ritor1
parents:
diff changeset
744 if ( (signed int)v3 <= 64 )
Ritor1
parents:
diff changeset
745 {
Ritor1
parents:
diff changeset
746 if ( (v3 & 0x80000000u) != 0 )
Ritor1
parents:
diff changeset
747 {
1954
730166317ed0 pActorBuffs[10] to pActorBuffs[ACTOR_BUFF_MASS_DISTORTION]
Grumpy7
parents: 1705
diff changeset
748 pActor->pActorBuffs[ACTOR_BUFF_MASS_DISTORTION].uExpireTime = 0i64;
0
Ritor1
parents:
diff changeset
749 v4 = 1.0;
Ritor1
parents:
diff changeset
750 }
Ritor1
parents:
diff changeset
751 else
Ritor1
parents:
diff changeset
752 {
Ritor1
parents:
diff changeset
753 v2 = v3 * v3;
Ritor1
parents:
diff changeset
754 v4 = 1.0 - (double)(signed int)(v3 * v3) * 0.0001953125;
Ritor1
parents:
diff changeset
755 }
Ritor1
parents:
diff changeset
756 }
Ritor1
parents:
diff changeset
757 else
Ritor1
parents:
diff changeset
758 {
Ritor1
parents:
diff changeset
759 v2 = (v3 - 64) * (v3 - 64);
Ritor1
parents:
diff changeset
760 v4 = (double)v2 * 0.0001953125 + 0.2;
Ritor1
parents:
diff changeset
761 }
Ritor1
parents:
diff changeset
762 v5 = v4;
1029
c94d6a37d298 Pointing a face with mouse fixed.
Nomad
parents: 1016
diff changeset
763 return fixpoint_from_float(v5);
0
Ritor1
parents:
diff changeset
764 }
Ritor1
parents:
diff changeset
765
Ritor1
parents:
diff changeset
766 //----- (004A81CA) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
767 bool stru6::_4A81CA(SpriteObject *a2)
0
Ritor1
parents:
diff changeset
768 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
769 //stru6 *v2; // ebx@1
0
Ritor1
parents:
diff changeset
770 int result; // eax@1
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2253
diff changeset
771 // int v4; // eax@27
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
772 //unsigned int diffuse; // esi@41
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
773 //int v6; // ecx@49
0
Ritor1
parents:
diff changeset
774 int v7; // eax@54
Ritor1
parents:
diff changeset
775 int v8; // eax@55
Ritor1
parents:
diff changeset
776 char v9; // zf@56
Ritor1
parents:
diff changeset
777 int v10; // eax@59
Ritor1
parents:
diff changeset
778 int v11; // eax@61
Ritor1
parents:
diff changeset
779 int v12; // eax@85
Ritor1
parents:
diff changeset
780 int v13; // eax@86
Ritor1
parents:
diff changeset
781 int v14; // eax@96
Ritor1
parents:
diff changeset
782 int v15; // eax@111
Ritor1
parents:
diff changeset
783 int v16; // eax@118
Ritor1
parents:
diff changeset
784 int v17; // eax@139
Ritor1
parents:
diff changeset
785 int v18; // eax@140
Ritor1
parents:
diff changeset
786 int v19; // eax@141
Ritor1
parents:
diff changeset
787 int v20; // eax@151
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
788 //unsigned int v21; // [sp-8h] [bp-20h]@66
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
789 //SpriteObject *v22; // [sp-8h] [bp-20h]@81
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
790 //unsigned int v23; // [sp-4h] [bp-1Ch]@4
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
791 //unsigned int v24; // [sp-4h] [bp-1Ch]@5
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2253
diff changeset
792 // unsigned int v25; // [sp-4h] [bp-1Ch]@30
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
793 //unsigned int v26; // [sp-4h] [bp-1Ch]@57
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
794 //unsigned int v27; // [sp-4h] [bp-1Ch]@66
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
795 //int v28; // [sp-4h] [bp-1Ch]@81
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
796 //unsigned int v29; // [sp+0h] [bp-18h]@4
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
797 //unsigned int v30; // [sp+0h] [bp-18h]@5
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
798 //int v31; // [sp+0h] [bp-18h]@30
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
799 //unsigned int v32; // [sp+0h] [bp-18h]@45
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
800 //float v33; // [sp+0h] [bp-18h]@57
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
801 //float v34; // [sp+0h] [bp-18h]@66
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
802 //signed int v35; // [sp+0h] [bp-18h]@81
0
Ritor1
parents:
diff changeset
803 char pContainer[7]; // [sp+10h] [bp-8h]@81
Ritor1
parents:
diff changeset
804
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
805 //__debugbreak(); // need to refactor carefully & collect data
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
806 //v2 = this;
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
807 result = a2->uType;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
808
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
809 switch (a2->uType)
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
810 {
796
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
811 case 500: // blue rat bolt for example
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
812 case 530:
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
813 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x00AAAFF, uTextureID_effpar1);
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
814 return false;
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
815
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
816 case 510: // dragon fire for example
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
817 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1);
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
818 return false;
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
819
567
f51373466911 Pedestals hint string fixed
Nomad
parents: 564
diff changeset
820 case 545:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
821 case 550:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
822 case 555: return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
823
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
824 case 556:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
825 AddMobileLight(a2, 0xFF0000, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
826 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
827
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
828 case 600:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
829 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
830 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
831
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
832 case 1010: // Fire Bolt
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
833 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
834 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
835 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
836 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
837 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
838
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
839 case 1011: // Fire Bolt impact
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
840 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
841 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
842 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
843 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
844 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
845
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
846 case 1050: // Fireball
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
847 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
848 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
849 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
850 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
851 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
852
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
853 case 1051: // Fireball hit
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
854 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
855 AddMobileLight(a2, 0xFF3C1E, 256);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
856 //if (pRenderer->pRenderD3D)
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
857 {
848
ceef50611567 * AI fixed (temporary)
zipi
parents: 828
diff changeset
858 result = PID_TYPE(a2->spell_caster_pid);
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 822
diff changeset
859 if (PID_TYPE(a2->spell_caster_pid) != OBJECT_Actor &&
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 822
diff changeset
860 PID_TYPE(a2->spell_caster_pid) != OBJECT_Item)
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
861 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
862 if (field_204 != 4)
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
863 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
864 field_204++;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
865 _4A7688_fireball_collision_particle(a2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
866 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
867 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
868 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
869 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
870 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
871 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
872
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
873 case 1081:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
874 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
875 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 300.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
876 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 250.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
877 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 200.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
878 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
879 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
880 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
881
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
882 case 2101:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
883 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
884 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xC8C814, uTextureID_effpar1, 200.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
885 AddMobileLight(a2, 0xC8C814, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
886 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
887 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
888
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
889 case 3060: // Acid Burst
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
890 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0AB450, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
891 AddMobileLight(a2, 0x0AB450, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
892 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
893
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
894 case 9000: return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
895 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
896
567
f51373466911 Pedestals hint string fixed
Nomad
parents: 564
diff changeset
897 if ( result < 545 )
0
Ritor1
parents:
diff changeset
898 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1459
diff changeset
899 //__debugbreak(); // find out what kind of spells are these
1102
79010db96ade some spell fixes
zipi
parents: 1051
diff changeset
900 // when summoned light elemental attacks
1424
5930342f092b fall to the water
Ritor1
parents: 1390
diff changeset
901 //cast spell from trees in Avlee
0
Ritor1
parents:
diff changeset
902 result -= 500;
Ritor1
parents:
diff changeset
903 switch ( result )
Ritor1
parents:
diff changeset
904 {
Ritor1
parents:
diff changeset
905 case 1:
Ritor1
parents:
diff changeset
906 case 31:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
907 _4A75CC_single_spell_collision_particle(a2, 0xAAAFF, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
908 return true;
0
Ritor1
parents:
diff changeset
909 case 5:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
910 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x5C310E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
911 return false;
0
Ritor1
parents:
diff changeset
912 case 15:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
913 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0062D0, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
914 return false;
0
Ritor1
parents:
diff changeset
915 case 16:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
916 _4A75CC_single_spell_collision_particle(a2, 0x0062D0, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
917 return false;
0
Ritor1
parents:
diff changeset
918 case 20:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
919 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x0AB450, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
920 return false;
0
Ritor1
parents:
diff changeset
921 case 21:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
922 _4A75CC_single_spell_collision_particle(a2, 0x0AB450, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
923 return false;
0
Ritor1
parents:
diff changeset
924 case 25:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
925 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xC8C805, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
926 return false;
0
Ritor1
parents:
diff changeset
927 case 26:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
928 _4A75CC_single_spell_collision_particle(a2, 0xC8C805, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
929 return false;
0
Ritor1
parents:
diff changeset
930 case 35:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
931 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFFFFFF, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
932 return false;
0
Ritor1
parents:
diff changeset
933 case 36:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
934 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
935 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
936
0
Ritor1
parents:
diff changeset
937 case 40:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
938 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
939 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
940
0
Ritor1
parents:
diff changeset
941 case 11:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
942 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
943 return false;
0
Ritor1
parents:
diff changeset
944 case 6:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
945 _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
946 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
947
0
Ritor1
parents:
diff changeset
948 case 41:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
949 _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
950 return false;
0
Ritor1
parents:
diff changeset
951 default:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
952 return false;
0
Ritor1
parents:
diff changeset
953 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
954 return false;
0
Ritor1
parents:
diff changeset
955 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
956
0
Ritor1
parents:
diff changeset
957 if ( result <= 4051 )
Ritor1
parents:
diff changeset
958 {
Ritor1
parents:
diff changeset
959 if ( result != 4051 )
Ritor1
parents:
diff changeset
960 {
Ritor1
parents:
diff changeset
961 if ( result <= 2031 )
Ritor1
parents:
diff changeset
962 {
Ritor1
parents:
diff changeset
963 if ( result != 2031 )
Ritor1
parents:
diff changeset
964 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
965 if ( result < 1051 )
0
Ritor1
parents:
diff changeset
966 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
967 if ( result < 600 )
0
Ritor1
parents:
diff changeset
968 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
969 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
970 return false;
0
Ritor1
parents:
diff changeset
971 }
Ritor1
parents:
diff changeset
972 if ( result < 811 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
973 return false;
0
Ritor1
parents:
diff changeset
974 if ( result <= 814 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
975 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
976 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
977
0
Ritor1
parents:
diff changeset
978 }
Ritor1
parents:
diff changeset
979 if ( result <= 1081 )
Ritor1
parents:
diff changeset
980 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
981 if (result != 1081)
0
Ritor1
parents:
diff changeset
982 {
Ritor1
parents:
diff changeset
983 result -= 1060;
Ritor1
parents:
diff changeset
984 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
985 return true;
0
Ritor1
parents:
diff changeset
986 v7 = result - 1;
Ritor1
parents:
diff changeset
987 if ( v7 )
Ritor1
parents:
diff changeset
988 {
Ritor1
parents:
diff changeset
989 v8 = v7 - 9;
Ritor1
parents:
diff changeset
990 if ( !v8 )
Ritor1
parents:
diff changeset
991 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
992 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
993 return false;
0
Ritor1
parents:
diff changeset
994 }
Ritor1
parents:
diff changeset
995 result = v8 - 10;
Ritor1
parents:
diff changeset
996 v9 = result == 0;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
997 //LABEL_129:
0
Ritor1
parents:
diff changeset
998 if ( v9 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
999 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1000 return false;
0
Ritor1
parents:
diff changeset
1001 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1002 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1E, uTextureID_effpar1, 250.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1003 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1004 return false;
0
Ritor1
parents:
diff changeset
1005 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1006 //LABEL_84:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1007 // _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, diffuse, v26, v33);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1008 //goto LABEL_43;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1009 return false;
0
Ritor1
parents:
diff changeset
1010 }
Ritor1
parents:
diff changeset
1011 v10 = result - 1090;
Ritor1
parents:
diff changeset
1012 if ( v10 )
Ritor1
parents:
diff changeset
1013 {
Ritor1
parents:
diff changeset
1014 result = v10 - 10;
Ritor1
parents:
diff changeset
1015 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1016 return true;
0
Ritor1
parents:
diff changeset
1017 v11 = result - 1;
Ritor1
parents:
diff changeset
1018 if ( !v11 )
Ritor1
parents:
diff changeset
1019 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1020 //diffuse = 0xFF3C1E;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1021 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1022 //v32 = v2->uTextureID_effpar1;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1023 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1024 //goto LABEL_43;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1025 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1026 return false;
0
Ritor1
parents:
diff changeset
1027 }
Ritor1
parents:
diff changeset
1028 result = v11 - 929;
Ritor1
parents:
diff changeset
1029 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1030 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1031 //LABEL_63:
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1032 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1033 // return true;
0
Ritor1
parents:
diff changeset
1034 _4A78AE_sparks_spell(a2);
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1035 AddMobileLight(a2, 0x64640F, 128);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1036 return false;
0
Ritor1
parents:
diff changeset
1037 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1038
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1039 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xFF3C1Eu, uTextureID_effpar1, 250.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1040 return false;
0
Ritor1
parents:
diff changeset
1041 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1042 //goto LABEL_67;
0
Ritor1
parents:
diff changeset
1043 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1044 if ( result < 3060 )
0
Ritor1
parents:
diff changeset
1045 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1046 if ( result < 2101 )
0
Ritor1
parents:
diff changeset
1047 {
Ritor1
parents:
diff changeset
1048 if ( result != 2060 )
Ritor1
parents:
diff changeset
1049 {
Ritor1
parents:
diff changeset
1050 if ( result != 2061 )
Ritor1
parents:
diff changeset
1051 {
Ritor1
parents:
diff changeset
1052 if ( result <= 2079 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1053 return false;
0
Ritor1
parents:
diff changeset
1054 if ( result <= 2081 )
Ritor1
parents:
diff changeset
1055 {
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1056 //if ( pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1057 _4A77FD_implosion_particle_d3d(a2);
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1058 /*else
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1059 _4A80DC_implosion_particle_sw(a2);*/
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1060 return false;
0
Ritor1
parents:
diff changeset
1061 }
Ritor1
parents:
diff changeset
1062 v9 = result == 2100;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1063 if ( v9 )
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1064 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1065 return false;
0
Ritor1
parents:
diff changeset
1066 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1067 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0xC8C814, uTextureID_effpar2, 200.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1068 AddMobileLight(a2, 0xC8C814, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1069 return false;
0
Ritor1
parents:
diff changeset
1070 }
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1071 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1072 // return true;
0
Ritor1
parents:
diff changeset
1073 memcpy(pContainer, "sp18h1", 7);
Ritor1
parents:
diff changeset
1074 pRnd->SetRange(1, 6);
Ritor1
parents:
diff changeset
1075 pContainer[5] = pRnd->GetInRange() + '0';
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1076 AddProjectile(a2, 100, pBitmaps_LOD->LoadTexture(pContainer));
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1077 return false;
0
Ritor1
parents:
diff changeset
1078 }
Ritor1
parents:
diff changeset
1079 v12 = result - 3010;
Ritor1
parents:
diff changeset
1080 if ( !v12 )
Ritor1
parents:
diff changeset
1081 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1082 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xAB450, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1083 AddMobileLight(a2, 0xAB450, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1084 return false;
0
Ritor1
parents:
diff changeset
1085 }
Ritor1
parents:
diff changeset
1086 v13 = v12 - 1;
Ritor1
parents:
diff changeset
1087 if ( !v13 )
Ritor1
parents:
diff changeset
1088 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1089 _4A75CC_single_spell_collision_particle(a2, 0xAB450, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1090 AddMobileLight(a2, 0xAB450, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1091 return false;
0
Ritor1
parents:
diff changeset
1092 }
Ritor1
parents:
diff changeset
1093 result = v13 - 19;
Ritor1
parents:
diff changeset
1094 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1095 return true;
0
Ritor1
parents:
diff changeset
1096 --result;
Ritor1
parents:
diff changeset
1097 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1098 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1099
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1100 _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1101 AddMobileLight(a2, 0x9EB9F1, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1102 return false;
0
Ritor1
parents:
diff changeset
1103 }
Ritor1
parents:
diff changeset
1104 if ( result > 4000 )
Ritor1
parents:
diff changeset
1105 {
Ritor1
parents:
diff changeset
1106 result -= 4030;
Ritor1
parents:
diff changeset
1107 if ( !result || (--result, !result) )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1108 return true;
0
Ritor1
parents:
diff changeset
1109 result -= 19;
Ritor1
parents:
diff changeset
1110 v9 = result == 0;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1111 if ( v9 )
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1112 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1113 return false;
0
Ritor1
parents:
diff changeset
1114 }
Ritor1
parents:
diff changeset
1115 if ( result == 4000 )
Ritor1
parents:
diff changeset
1116 {
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1117 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1118 // return true;
0
Ritor1
parents:
diff changeset
1119 _4A7C07(a2);
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1120 return false;
0
Ritor1
parents:
diff changeset
1121 }
Ritor1
parents:
diff changeset
1122 result -= 3061;
Ritor1
parents:
diff changeset
1123 if ( !result || (result -= 29) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1124 return true;
0
Ritor1
parents:
diff changeset
1125 v14 = result - 1;
Ritor1
parents:
diff changeset
1126 if ( !v14 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1127 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1128 _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1129 AddMobileLight(a2, 0x9EB9F1, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1130 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1131 }
0
Ritor1
parents:
diff changeset
1132 result = v14 - 1;
Ritor1
parents:
diff changeset
1133 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1134 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1135 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x9EB9F1, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1136 return false;
0
Ritor1
parents:
diff changeset
1137 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1138 _4A7948_mind_blast_after_effect(a2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1139 return false;
0
Ritor1
parents:
diff changeset
1140 }
Ritor1
parents:
diff changeset
1141 if ( result <= 7090 )
Ritor1
parents:
diff changeset
1142 {
Ritor1
parents:
diff changeset
1143 if ( result == 7090 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1144 return true;
0
Ritor1
parents:
diff changeset
1145 if ( result > 6030 )
Ritor1
parents:
diff changeset
1146 {
Ritor1
parents:
diff changeset
1147 if ( result > 6091 )
Ritor1
parents:
diff changeset
1148 {
Ritor1
parents:
diff changeset
1149 result -= 6100;
Ritor1
parents:
diff changeset
1150 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1151 return true;
0
Ritor1
parents:
diff changeset
1152 result -= 930;
Ritor1
parents:
diff changeset
1153 if ( result )
Ritor1
parents:
diff changeset
1154 {
Ritor1
parents:
diff changeset
1155 --result;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1156 if (!result)
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1157 _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1158 return false;
0
Ritor1
parents:
diff changeset
1159 }
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1160 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1161 // return true;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1162 _4A78AE_sparks_spell(a2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1163 AddMobileLight(a2, 0x64640F, 128);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1164 return false;
0
Ritor1
parents:
diff changeset
1165 }
Ritor1
parents:
diff changeset
1166 if ( result != 6091 )
Ritor1
parents:
diff changeset
1167 {
Ritor1
parents:
diff changeset
1168 result -= 6040;
Ritor1
parents:
diff changeset
1169 if ( !result || (result -= 20) == 0 || (result -= 10) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1170 return true;
0
Ritor1
parents:
diff changeset
1171 result -= 20;
Ritor1
parents:
diff changeset
1172 v9 = result == 0;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1173 if ( v9 )
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1174 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1175 return false;
0
Ritor1
parents:
diff changeset
1176 }
Ritor1
parents:
diff changeset
1177 }
Ritor1
parents:
diff changeset
1178 else
Ritor1
parents:
diff changeset
1179 {
Ritor1
parents:
diff changeset
1180 if ( result == 6030 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1181 return true;
0
Ritor1
parents:
diff changeset
1182 if ( result <= 4091 )
Ritor1
parents:
diff changeset
1183 {
Ritor1
parents:
diff changeset
1184 if ( result != 4091 )
Ritor1
parents:
diff changeset
1185 {
Ritor1
parents:
diff changeset
1186 result -= 4070;
Ritor1
parents:
diff changeset
1187 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1188 return true;
0
Ritor1
parents:
diff changeset
1189 v15 = result - 1;
Ritor1
parents:
diff changeset
1190 if ( v15 )
Ritor1
parents:
diff changeset
1191 {
Ritor1
parents:
diff changeset
1192 result = v15 - 9;
Ritor1
parents:
diff changeset
1193 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1194 return true;
0
Ritor1
parents:
diff changeset
1195 result -= 10;
Ritor1
parents:
diff changeset
1196 if ( !result )
Ritor1
parents:
diff changeset
1197 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1198 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1199 return true;
0
Ritor1
parents:
diff changeset
1200 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1201 return false;
0
Ritor1
parents:
diff changeset
1202 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1203 _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1204 return false;
0
Ritor1
parents:
diff changeset
1205 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1206 _4A7A66_miltiple_spell_collision_partifles___like_after_sparks_or_lightning(a2, 0x7E7E7E, uTextureID_effpar1, 200.0);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1207 return false;
0
Ritor1
parents:
diff changeset
1208 }
Ritor1
parents:
diff changeset
1209 v16 = result - 4092;
Ritor1
parents:
diff changeset
1210 if ( !v16 )
Ritor1
parents:
diff changeset
1211 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1212 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0x7E7E7E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1213 return false;
0
Ritor1
parents:
diff changeset
1214 }
Ritor1
parents:
diff changeset
1215 result = v16 - 8;
Ritor1
parents:
diff changeset
1216 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1217 return false;
0
Ritor1
parents:
diff changeset
1218 result -= 1910;
Ritor1
parents:
diff changeset
1219 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1220 return true;
0
Ritor1
parents:
diff changeset
1221 --result;
Ritor1
parents:
diff changeset
1222 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1223 return false;
0
Ritor1
parents:
diff changeset
1224 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1225 //LABEL_122:
0
Ritor1
parents:
diff changeset
1226 _4A7948_mind_blast_after_effect(a2);
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1227 return false;
0
Ritor1
parents:
diff changeset
1228 }
Ritor1
parents:
diff changeset
1229 if ( result <= 9000 )
Ritor1
parents:
diff changeset
1230 {
Ritor1
parents:
diff changeset
1231 if ( result <= 8030 )
Ritor1
parents:
diff changeset
1232 {
Ritor1
parents:
diff changeset
1233 if ( result == 8030 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1234 return true;
0
Ritor1
parents:
diff changeset
1235 v17 = result - 7091;
Ritor1
parents:
diff changeset
1236 if ( v17 )
Ritor1
parents:
diff changeset
1237 {
Ritor1
parents:
diff changeset
1238 v18 = v17 - 909;
Ritor1
parents:
diff changeset
1239 if ( !v18 )
Ritor1
parents:
diff changeset
1240 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1241 _4A73AA_hanging_trace_particles___like_fire_strike_ice_blast_etc(a2, 0xFFFFFF, uTextureID_effpar3);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1242 AddMobileLight(a2, 0xFFFFFF, 128);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1243 return false;
0
Ritor1
parents:
diff changeset
1244 }
Ritor1
parents:
diff changeset
1245 v19 = v18 - 1;
Ritor1
parents:
diff changeset
1246 if ( v19 )
Ritor1
parents:
diff changeset
1247 {
Ritor1
parents:
diff changeset
1248 result = v19 - 9;
Ritor1
parents:
diff changeset
1249 if ( !result )
Ritor1
parents:
diff changeset
1250 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1251 AddMobileLight(a2, 0xFFFFFF, 64);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1252 return false;
0
Ritor1
parents:
diff changeset
1253 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1254 return false;
0
Ritor1
parents:
diff changeset
1255 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1256 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1257 AddMobileLight(a2, 0xFFFFFF, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1258 return false;
0
Ritor1
parents:
diff changeset
1259 }
Ritor1
parents:
diff changeset
1260 else
Ritor1
parents:
diff changeset
1261 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1262 _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1263 AddMobileLight(a2, 0xF00000, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1264 return false;
0
Ritor1
parents:
diff changeset
1265 }
Ritor1
parents:
diff changeset
1266 }
Ritor1
parents:
diff changeset
1267 result -= 8040;
Ritor1
parents:
diff changeset
1268 if ( !result || (result -= 20) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1269 return true;
0
Ritor1
parents:
diff changeset
1270 v20 = result - 30;
Ritor1
parents:
diff changeset
1271 if ( v20 )
Ritor1
parents:
diff changeset
1272 {
Ritor1
parents:
diff changeset
1273 result = v20 - 1;
Ritor1
parents:
diff changeset
1274 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1275 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1276
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1277 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar3);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1278 return false;
0
Ritor1
parents:
diff changeset
1279 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1280 AddMobileLight(a2, 0xFFFFFFu, 128);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1281 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1282 // return true;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1283 AddProjectile(a2, 100, -1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1284 return false;
0
Ritor1
parents:
diff changeset
1285 }
Ritor1
parents:
diff changeset
1286 if ( result > 9050 )
Ritor1
parents:
diff changeset
1287 {
Ritor1
parents:
diff changeset
1288 result -= 9070;
Ritor1
parents:
diff changeset
1289 if ( !result || (result -= 10) == 0 || (--result, !result) )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1290 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1291 return false;
0
Ritor1
parents:
diff changeset
1292 }
Ritor1
parents:
diff changeset
1293 if ( result == 9050 || (result -= 9010) == 0 || (result -= 20) == 0 || (result -= 10) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1294 return true;
0
Ritor1
parents:
diff changeset
1295 --result;
Ritor1
parents:
diff changeset
1296 if ( !result )
Ritor1
parents:
diff changeset
1297 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1298 //LABEL_164:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1299 _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1300 return false;
0
Ritor1
parents:
diff changeset
1301 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1302 //LABEL_168:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1303 return false;
0
Ritor1
parents:
diff changeset
1304 }
Ritor1
parents:
diff changeset
1305
Ritor1
parents:
diff changeset
1306 //----- (004A89BD) --------------------------------------------------------
486
Nomad
parents: 430
diff changeset
1307 void stru6::SetPlayerBuffAnim(unsigned __int16 uSpellID, unsigned __int16 uPlayerID)
0
Ritor1
parents:
diff changeset
1308 {
486
Nomad
parents: 430
diff changeset
1309 //stru6 *v3; // edi@1
0
Ritor1
parents:
diff changeset
1310 PlayerBuffAnim *v4; // esi@1
Ritor1
parents:
diff changeset
1311 const char *v6; // [sp-4h] [bp-10h]@2
Ritor1
parents:
diff changeset
1312
486
Nomad
parents: 430
diff changeset
1313 v4 = &pPlayerBuffs[uPlayerID];
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1314 v4->uSpellAnimTimeElapsed = 0;
486
Nomad
parents: 430
diff changeset
1315 v4->bRender = uSpellID != 0;
Nomad
parents: 430
diff changeset
1316
Nomad
parents: 430
diff changeset
1317 switch (uSpellID)
0
Ritor1
parents:
diff changeset
1318 {
920
34ed2d5e7cfb MagicShopDialog clean and other
Ritor1
parents: 900
diff changeset
1319 case SPELL_DISEASE:
0
Ritor1
parents:
diff changeset
1320 v6 = "zapp";
486
Nomad
parents: 430
diff changeset
1321 break;
Nomad
parents: 430
diff changeset
1322
495
90fdb47bfcba guilds ...
Gloval
parents: 491
diff changeset
1323 case BECOME_MAGIC_GUILD_MEMBER:
0
Ritor1
parents:
diff changeset
1324 case SPELL_AIR_FEATHER_FALL:
Ritor1
parents:
diff changeset
1325 case SPELL_SPIRIT_DETECT_LIFE:
486
Nomad
parents: 430
diff changeset
1326 case SPELL_SPIRIT_FATE:
0
Ritor1
parents:
diff changeset
1327 v6 = "spboost1";
486
Nomad
parents: 430
diff changeset
1328 break;
Nomad
parents: 430
diff changeset
1329
501
6fa3ff8ef729 SubtractVariables
Ritor1
parents: 491
diff changeset
1330 case SPELL_QUEST_COMPLETED:
486
Nomad
parents: 430
diff changeset
1331 case SPELL_AIR_INVISIBILITY:
0
Ritor1
parents:
diff changeset
1332 case SPELL_WATER_WATER_WALK:
486
Nomad
parents: 430
diff changeset
1333 case SPELL_SPIRIT_PRESERVATION:
0
Ritor1
parents:
diff changeset
1334 v6 = "spboost2";
486
Nomad
parents: 430
diff changeset
1335 break;
Nomad
parents: 430
diff changeset
1336
488
Nomad
parents: 486
diff changeset
1337 case SPELL_152:
486
Nomad
parents: 430
diff changeset
1338 __debugbreak(); // spell id == 152 wtf
Nomad
parents: 430
diff changeset
1339 case SPELL_LIGHT_HOUR_OF_POWER:
Nomad
parents: 430
diff changeset
1340 case SPELL_LIGHT_DAY_OF_THE_GODS:
Nomad
parents: 430
diff changeset
1341 case SPELL_LIGHT_DAY_OF_PROTECTION:
Nomad
parents: 430
diff changeset
1342 case SPELL_LIGHT_DIVINE_INTERVENTION:
0
Ritor1
parents:
diff changeset
1343 v6 = "spboost3";
486
Nomad
parents: 430
diff changeset
1344 break;
Nomad
parents: 430
diff changeset
1345
Nomad
parents: 430
diff changeset
1346 case SPELL_SPIRIT_REMOVE_CURSE:
0
Ritor1
parents:
diff changeset
1347 case SPELL_MIND_REMOVE_FEAR:
Ritor1
parents:
diff changeset
1348 case SPELL_BODY_CURE_WEAKNESS:
Ritor1
parents:
diff changeset
1349 v6 = "spheal1";
486
Nomad
parents: 430
diff changeset
1350 break;
Nomad
parents: 430
diff changeset
1351
Nomad
parents: 430
diff changeset
1352 case SPELL_SPIRIT_SHARED_LIFE:
0
Ritor1
parents:
diff changeset
1353 case SPELL_MIND_CURE_PARALYSIS:
486
Nomad
parents: 430
diff changeset
1354 case SPELL_MIND_CURE_INSANITY:
0
Ritor1
parents:
diff changeset
1355 case SPELL_BODY_FIRST_AID:
Ritor1
parents:
diff changeset
1356 case SPELL_BODY_CURE_POISON:
Ritor1
parents:
diff changeset
1357 case SPELL_BODY_CURE_DISEASE:
486
Nomad
parents: 430
diff changeset
1358 case SPELL_DARK_SACRIFICE:
0
Ritor1
parents:
diff changeset
1359 v6 = "spheal2";
486
Nomad
parents: 430
diff changeset
1360 break;
Nomad
parents: 430
diff changeset
1361
Nomad
parents: 430
diff changeset
1362 case SPELL_BODY_POWER_CURE:
Nomad
parents: 430
diff changeset
1363 case SPELL_DARK_SOULDRINKER:
0
Ritor1
parents:
diff changeset
1364 v6 = "spheal3";
486
Nomad
parents: 430
diff changeset
1365 break;
Nomad
parents: 430
diff changeset
1366
0
Ritor1
parents:
diff changeset
1367 case SPELL_FIRE_PROTECTION_FROM_FIRE:
486
Nomad
parents: 430
diff changeset
1368 case SPELL_FIRE_IMMOLATION:
0
Ritor1
parents:
diff changeset
1369 v6 = "spell03";
486
Nomad
parents: 430
diff changeset
1370 break;
Nomad
parents: 430
diff changeset
1371
Nomad
parents: 430
diff changeset
1372 case SPELL_FIRE_HASTE: v6 = "spell05"; break;
Nomad
parents: 430
diff changeset
1373 case SPELL_AIR_PROTECTION_FROM_AIR: v6 = "spell14"; break;
Nomad
parents: 430
diff changeset
1374 case SPELL_AIR_SHIELD: v6 = "spell17"; break;
Nomad
parents: 430
diff changeset
1375 case SPELL_WATER_PROTECTION_FROM_WATER: v6 = "spell25"; break;
Nomad
parents: 430
diff changeset
1376 case SPELL_EARTH_PROTECTION_FROM_EARTH: v6 = "spell36"; break;
Nomad
parents: 430
diff changeset
1377 case SPELL_EARTH_STONESKIN: v6 = "spell38"; break;
Nomad
parents: 430
diff changeset
1378 case SPELL_SPIRIT_BLESS: v6 = "spell46"; break;
Nomad
parents: 430
diff changeset
1379 case SPELL_SPIRIT_HEROISM: v6 = "spell51"; break;
Nomad
parents: 430
diff changeset
1380 case SPELL_SPIRIT_RESSURECTION: v6 = "spell55"; break;
Nomad
parents: 430
diff changeset
1381 case SPELL_MIND_PROTECTION_FROM_MIND: v6 = "spell58"; break;
Nomad
parents: 430
diff changeset
1382 case SPELL_BODY_PROTECTION_FROM_BODY: v6 = "spell69"; break;
Nomad
parents: 430
diff changeset
1383 case SPELL_BODY_REGENERATION: v6 = "spell71"; break;
Nomad
parents: 430
diff changeset
1384 case SPELL_BODY_HAMMERHANDS: v6 = "spell73"; break;
Nomad
parents: 430
diff changeset
1385 case SPELL_BODY_PROTECTION_FROM_MAGIC: v6 = "spell75"; break;
Nomad
parents: 430
diff changeset
1386
0
Ritor1
parents:
diff changeset
1387 default:
486
Nomad
parents: 430
diff changeset
1388 v4->bRender = false;
Nomad
parents: 430
diff changeset
1389 return;
0
Ritor1
parents:
diff changeset
1390 }
486
Nomad
parents: 430
diff changeset
1391
Nomad
parents: 430
diff changeset
1392 v4->uSpellIconID = pIconsFrameTable->FindIcon(v6);
Nomad
parents: 430
diff changeset
1393 if (v4->bRender)
Nomad
parents: 430
diff changeset
1394 v4->uSpellAnimTime = 8 * pIconsFrameTable->pIcons[v4->uSpellIconID].uAnimLength;
0
Ritor1
parents:
diff changeset
1395 }
Ritor1
parents:
diff changeset
1396
Ritor1
parents:
diff changeset
1397 //----- (004A8BDF) --------------------------------------------------------
Ritor1
parents:
diff changeset
1398 void stru6::FadeScreen__like_Turn_Undead_and_mb_Armageddon(unsigned int uDiffuseColor, unsigned int uFadeTime)
Ritor1
parents:
diff changeset
1399 {
Ritor1
parents:
diff changeset
1400 this->uFadeTime = uFadeTime;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1401 this->uFadeLength = uFadeTime;
0
Ritor1
parents:
diff changeset
1402 this->uFadeColor = uDiffuseColor;
Ritor1
parents:
diff changeset
1403 }
Ritor1
parents:
diff changeset
1404
Ritor1
parents:
diff changeset
1405 //----- (004A8BFC) --------------------------------------------------------
2188
0ae56373cc35 CastSpell continue
Ritor1
parents: 2155
diff changeset
1406 int stru6::_4A8BFC() //for SPELL_LIGHT_PRISMATIC_LIGHT
0
Ritor1
parents:
diff changeset
1407 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1408 uAnimLength = 8 * pSpriteFrameTable->pSpriteSFrames[pSpriteFrameTable->FastFindSprite("spell84")].uAnimLength;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1409 return uAnimLength;
0
Ritor1
parents:
diff changeset
1410 }
Ritor1
parents:
diff changeset
1411
Ritor1
parents:
diff changeset
1412 //----- (004A8C27) --------------------------------------------------------
Ritor1
parents:
diff changeset
1413 void stru6::RenderSpecialEffects()
Ritor1
parents:
diff changeset
1414 {
Ritor1
parents:
diff changeset
1415 double v4; // st7@4
Ritor1
parents:
diff changeset
1416 double v5; // st6@4
Ritor1
parents:
diff changeset
1417 float v7; // ST14_4@6
Ritor1
parents:
diff changeset
1418 unsigned int v8; // ST14_4@8
Ritor1
parents:
diff changeset
1419 SpriteFrame *v10; // eax@8
Ritor1
parents:
diff changeset
1420 int v11; // edi@8
Ritor1
parents:
diff changeset
1421 RenderVertexD3D3 vd3d[4]; // [sp+60h] [bp-8Ch]@9
Ritor1
parents:
diff changeset
1422
Ritor1
parents:
diff changeset
1423 if (uNumProjectiles)
Ritor1
parents:
diff changeset
1424 {
Ritor1
parents:
diff changeset
1425 DrawProjectiles();
Ritor1
parents:
diff changeset
1426 uNumProjectiles = 0;
Ritor1
parents:
diff changeset
1427 }
Ritor1
parents:
diff changeset
1428
Ritor1
parents:
diff changeset
1429 field_204 = 0;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1430 if ( uFadeTime > 0 )
0
Ritor1
parents:
diff changeset
1431 {
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1432 v4 = (double)uFadeTime / (double)uFadeLength;
0
Ritor1
parents:
diff changeset
1433 v5 = 1.0 - v4 * v4;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1434 //v6 = v5;
0
Ritor1
parents:
diff changeset
1435 if ( v5 > 0.9 )
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1436 v5 = 1.0 - (v5 - 0.9) * 10.0;
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1437 v7 = v5;
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1438 pRenderer->ScreenFade(uFadeColor, v7);
0
Ritor1
parents:
diff changeset
1439 uFadeTime -= pEventTimer->uTimeElapsed;
Ritor1
parents:
diff changeset
1440 }
Ritor1
parents:
diff changeset
1441
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1442 if (uAnimLength > 0)
0
Ritor1
parents:
diff changeset
1443 {
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1444 v8 = 8 * pSpriteFrameTable->pSpriteSFrames[pSpriteFrameTable->FastFindSprite("spell84")].uAnimLength - uAnimLength;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1445 v10 = pSpriteFrameTable->GetFrame(pSpriteFrameTable->FastFindSprite("spell84"), v8);
0
Ritor1
parents:
diff changeset
1446 v11 = v10->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
1447 uAnimLength -= pEventTimer->uTimeElapsed;
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1448 //if ( pRenderer->pRenderD3D )
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1449 //{
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1450 vd3d[0].pos.x = (double)(signed int)pViewport->uViewportTL_X;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1451 vd3d[0].pos.y = (double)(signed int)pViewport->uViewportTL_Y;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1452 vd3d[0].pos.z = 0.0;
0
Ritor1
parents:
diff changeset
1453 vd3d[0].diffuse = 0x7F7F7Fu;
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1454 vd3d[0].specular = 0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1455 vd3d[0].rhw = 1.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1456 vd3d[0].texcoord.x = 0.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1457 vd3d[0].texcoord.y = 0.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1458
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1459 vd3d[1].pos.x = (double)(signed int)pViewport->uViewportTL_X;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1460 vd3d[1].pos.y = (double)(pViewport->uViewportBR_Y + 1);
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1461 vd3d[1].pos.z = 0.0;
0
Ritor1
parents:
diff changeset
1462 vd3d[1].diffuse = 0x7F7F7Fu;
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1463 vd3d[1].specular = 0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1464 vd3d[1].rhw = 1.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1465 vd3d[1].texcoord.x = 0.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1466 vd3d[1].texcoord.y = 1.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1467
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1468 vd3d[2].pos.x = (double)(signed int)pViewport->uViewportBR_X;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1469 vd3d[2].pos.y = (double)(pViewport->uViewportBR_Y + 1);
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1470 vd3d[2].pos.z = 0.0;
0
Ritor1
parents:
diff changeset
1471 vd3d[2].diffuse = 0x7F7F7Fu;
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1472 vd3d[2].specular = 0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1473 vd3d[2].rhw = 1.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1474 vd3d[2].texcoord.x = 1.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1475 vd3d[2].texcoord.y = 1.0;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1476
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1477 vd3d[3].pos.x = (double)(signed int)pViewport->uViewportBR_X;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1478 vd3d[3].pos.y = (double)(signed int)pViewport->uViewportTL_Y;
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1479 vd3d[3].pos.z = 0.0;
0
Ritor1
parents:
diff changeset
1480 vd3d[3].diffuse = 0x7F7F7Fu;
Ritor1
parents:
diff changeset
1481 vd3d[3].specular = 0;
Ritor1
parents:
diff changeset
1482 vd3d[3].rhw = 1.0;
Ritor1
parents:
diff changeset
1483 vd3d[3].texcoord.x = 1.0;
Ritor1
parents:
diff changeset
1484 vd3d[3].texcoord.y = 0.0;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1485
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1486 pRenderer->DrawSpecialEffectsQuad(vd3d, pSprites_LOD->pHardwareSprites[v11].pTexture);
2425
d922225a6081 Hot key for mm7 main menu
Ritor1
parents: 2420
diff changeset
1487 //}
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1488 /*else
0
Ritor1
parents:
diff changeset
1489 {
Ritor1
parents:
diff changeset
1490 vsr.pTarget = pRenderer->pTargetSurface;
2002
2e6c63bdcfa9 RenderBillboardD3D initialization
zipi
parents: 1980
diff changeset
1491 vsr.sParentBillboardID = -1;
0
Ritor1
parents:
diff changeset
1492 vsr.pTargetZ = pRenderer->pActiveZBuffer;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1493 vsr.uScreenSpaceX = (signed int)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2;
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1494 vsr.uScreenSpaceY = pViewport->uViewportBR_Y;
0
Ritor1
parents:
diff changeset
1495 v24 = 16777216;
Ritor1
parents:
diff changeset
1496 LODWORD(v18) = 0;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1497 HIDWORD(v18) = (signed __int16)(LOWORD(pViewport->uViewportBR_X) - LOWORD(pViewport->uViewportTL_X));
144
8ab4484c22e0 Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents: 142
diff changeset
1498 vsr._screenspace_x_scaler_packedfloat = v18 / 0x1000000;
0
Ritor1
parents:
diff changeset
1499 LODWORD(v18) = 0;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1500 HIDWORD(v18) = (signed __int16)(LOWORD(pViewport->uViewportBR_Y) - LOWORD(pViewport->uViewportTL_Y));
0
Ritor1
parents:
diff changeset
1501 v26 = v18 / 16777216;
144
8ab4484c22e0 Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents: 142
diff changeset
1502 vsr._screenspace_y_scaler_packedfloat = v18 / 0x1000000;
0
Ritor1
parents:
diff changeset
1503 vsr.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v70->uPaletteIndex, 0, 1);
Ritor1
parents:
diff changeset
1504 vsr.uTargetPitch = pRenderer->uTargetSurfacePitch;
2002
2e6c63bdcfa9 RenderBillboardD3D initialization
zipi
parents: 1980
diff changeset
1505 vsr.sParentBillboardID = -1;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1506 vsr.uViewportX = pViewport->uViewportTL_X;
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1507 vsr.uViewportZ = pViewport->uViewportBR_X;
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1508 vsr.uViewportY = pViewport->uViewportTL_Y;
0
Ritor1
parents:
diff changeset
1509 vsr.sZValue = 0;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1510 vsr.uViewportW = pViewport->uViewportBR_Y;
0
Ritor1
parents:
diff changeset
1511 vsr.uFlags = 0;
Ritor1
parents:
diff changeset
1512 if ( v11 >= 0 )
733
700b58aac975 MonsterPopup preview doll fixed
Nomad
parents: 719
diff changeset
1513 pSprites_LOD->pSpriteHeaders[v11].DrawSprite_sw(&vsr, 1);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1514 }*/
0
Ritor1
parents:
diff changeset
1515 }
Ritor1
parents:
diff changeset
1516 }
Ritor1
parents:
diff changeset
1517
Ritor1
parents:
diff changeset
1518 //----- (004A902A) --------------------------------------------------------
Ritor1
parents:
diff changeset
1519 void stru6::DrawPlayerBuffAnims()
Ritor1
parents:
diff changeset
1520 {
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1521 for (uint i = 0; i < 4; ++i)
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1522 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1954
diff changeset
1523 PlayerBuffAnim* buff = &pPlayerBuffs[i];
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1524 if (!buff->bRender)
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1525 continue;
0
Ritor1
parents:
diff changeset
1526
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1527 buff->uSpellAnimTimeElapsed += pEventTimer->uTimeElapsed;
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1528 if (buff->uSpellAnimTimeElapsed >= buff->uSpellAnimTime)
0
Ritor1
parents:
diff changeset
1529 {
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1530 buff->bRender = false;
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1531 continue;
0
Ritor1
parents:
diff changeset
1532 }
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1533
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1954
diff changeset
1534 IconFrame* icon = pIconsFrameTable->GetFrame(buff->uSpellIconID, buff->uSpellAnimTimeElapsed);
2524
c7264ab7132f Main menu rendered using d3d11
a.parshin
parents: 2499
diff changeset
1535 pRenderer->DrawTextureIndexedAlpha(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i], 385, pIcons_LOD->GetTexture(icon->uTextureID));
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1536
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1537 pOtherOverlayList->bRedraw = true;
0
Ritor1
parents:
diff changeset
1538 }
Ritor1
parents:
diff changeset
1539 }
Ritor1
parents:
diff changeset
1540
Ritor1
parents:
diff changeset
1541 //----- (004A90A0) --------------------------------------------------------
Ritor1
parents:
diff changeset
1542 void stru6::LoadAnimations()
Ritor1
parents:
diff changeset
1543 {
Ritor1
parents:
diff changeset
1544 uTextureID_effpar1 = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
1545 uTextureID_effpar2 = pBitmaps_LOD->LoadTexture("effpar02", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
1546 uTextureID_effpar3 = pBitmaps_LOD->LoadTexture("effpar03", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
1547 uSpriteID_sp57c = pSprites_LOD->LoadSprite("sp57c", 6);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1548
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1549 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("zapp"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1550 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal1"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1551 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal2"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1552 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal3"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1553 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost1"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1554 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost2"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1555 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost3"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1556 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell03"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1557 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell05"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1558 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell14"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1559 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell17"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1560 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell21"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1561 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell25"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1562 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell27"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1563 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell36"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1564 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell38"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1565 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell46"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1566 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell51"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1567 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell55"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1568 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell58"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1569 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell69"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1570 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell71"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1571 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell73"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1572 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell75"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1573 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell96"));
0
Ritor1
parents:
diff changeset
1574
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1575 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell01"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1576 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell02"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1577 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell03"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1578 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell09"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1579 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell11"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1580 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell18"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1581 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell22"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1582 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell26"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1583 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell29"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1584 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell39"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1585 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell39c"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1586 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell41"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1587 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell57c"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1588 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell62"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1589 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell65"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1590 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell66"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1591 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell70"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1592 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell76"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1593 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell84"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1594 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell90"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1595 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell92"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1596 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell93"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1597 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1598 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97c"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1599 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97c"));
0
Ritor1
parents:
diff changeset
1600 }
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1601
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1602 //----- (004775ED) --------------------------------------------------------
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1603 int stru6_stru1_indoor_sw_billboard::_4775ED(float a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1604 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1605 char *v2; // edi@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1606 //int v3; // eax@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1607 char *v4; // edx@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1608 char *v5; // esi@3
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1609 double v6; // st7@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1610 signed __int64 v7; // ST84_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1611 double v8; // ST0C_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1612 int v9; // esi@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1613 double v10; // ST44_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1614 int v11; // ecx@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1615 double v12; // ST34_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1616 int v13; // ecx@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1617 double v14; // ST14_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1618 double v15; // st7@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1619 unsigned int v16; // ecx@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1620 signed __int64 v17; // ST64_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1621 double v18; // ST24_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1622 int v19; // edi@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1623 double v20; // ST3C_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1624 int v21; // ecx@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1625 double v22; // ST2C_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1626 int v23; // ST9C_4@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1627 double v24; // ST1C_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1628 int *v25; // edi@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1629 int v26; // esi@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1630 int *v27; // edi@10
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1631 int v28; // esi@10
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1632 // int result; // eax@12
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1633 __int64 v30; // [sp+A8h] [bp-30h]@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1634 float v31; // [sp+B0h] [bp-28h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1635 float v32; // [sp+B4h] [bp-24h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1636 int v33; // [sp+B8h] [bp-20h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1637 int v34; // [sp+BCh] [bp-1Ch]@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1638 stru6_stru1_indoor_sw_billboard *v35; // [sp+C0h] [bp-18h]@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1639 float v36; // [sp+C4h] [bp-14h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1640 int v37; // [sp+C8h] [bp-10h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1641 int v38; // [sp+CCh] [bp-Ch]@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1642 float v39; // [sp+D0h] [bp-8h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1643 int *v40; // [sp+D4h] [bp-4h]@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1644
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1645 // __debugbreak();//нужно почистить, срабатывает при применении закла Точечный взрыв и при стрельбе из жезла
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1646 v2 = (char *)&this->field_64[4 * this->uNumVertices];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1647 v38 = 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1648 *(int *)v2 = this->field_64[0];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1649 v2 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1650 *(int *)v2 = this->field_64[1];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1651 v2 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1652 *(int *)v2 = this->field_64[2];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1653 *((int *)v2 + 1) = this->field_64[3];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1654 //v3 = this->uNumVertices;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1655 v35 = this;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1656 if (this->uNumVertices > 0)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1657 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1658 v40 = &this->field_64[20];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1659 v4 = (char *)&this->field_64[3] + 3;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1660
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1661 //while ( 1 )
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1662 for (v34 = this->uNumVertices; v34; --v34)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1663 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1664 v5 = v4 - 15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1665 if (*(float *)(v4 - 15) <= (double)a2 && *(float *)(v4 + 1) <= (double)a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1666 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1667 v4 += 16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1668 //--v34;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1669 //if ( !v34 )
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1670 //return this->uNumVertices = v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1671 continue;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1672 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1673 if (*(float *)v5 <= (double)a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1674 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1675 v6 = (a2 - *(float *)v5) / (*(float *)(v4 + 1) - *(float *)v5);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1676 v7 = (unsigned __int8)v4[16] - (unsigned int)(unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1677 v36 = v6;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1678 v31 = (*(float *)(v4 + 5) - *(float *)(v4 - 11)) * v6 + *(float *)(v4 - 11);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1679 v32 = (*(float *)(v4 + 9) - *(float *)(v4 - 7)) * v6 + *(float *)(v4 - 7);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1680 *(float *)&v37 = (double)v7 * v6;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1681 v8 = *(float *)&v37 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1682 v9 = (unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1683 *(float *)&v37 = (double)((unsigned __int8)v4[15] - (unsigned int)(unsigned __int8)*(v4 - 1)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1684 v10 = *(float *)&v37 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1685 v11 = (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1686 v37 = LODWORD(v10) + (unsigned __int8)*(v4 - 1);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1687 v39 = (double)((unsigned int)(unsigned __int8)v4[14] - v11) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1688 v12 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1689 v13 = LODWORD(v12) + (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1690 v39 = (double)((*(int *)(v4 + 13) & 0xFF) - (*(int *)(v4 - 3) & 0xFFu)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1691 v14 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1692 v33 = (LODWORD(v14) + (*(int *)(v4 - 3) & 0xFF)) | ((v13 | ((v37 | ((LODWORD(v8) + v9) << 8)) << 8)) << 8);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1693 //this = v35;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1694 v5 = (char *)&v30 + 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1695 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1696 else if (*(float *)(v4 + 1) <= (double)a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1697 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1698 v15 = (a2 - *(float *)v5) / (*(float *)(v4 + 1) - *(float *)v5);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1699 v16 = (unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1700 HIDWORD(v30) = LODWORD(a2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1701 v17 = (unsigned __int8)v4[16] - v16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1702 v36 = v15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1703 v31 = (*(float *)(v4 + 5) - *(float *)(v4 - 11)) * v15 + *(float *)(v4 - 11);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1704 v32 = (*(float *)(v4 + 9) - *(float *)(v4 - 7)) * v15 + *(float *)(v4 - 7);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1705 v39 = (double)v17 * v15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1706 v18 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1707 v19 = (unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1708 v39 = (double)((unsigned __int8)v4[15] - (unsigned int)(unsigned __int8)*(v4 - 1)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1709 v20 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1710 v21 = (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1711 v37 = LODWORD(v20) + (unsigned __int8)*(v4 - 1);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1712 v39 = (double)((unsigned int)(unsigned __int8)v4[14] - v21) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1713 v22 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1714 v23 = LODWORD(v22) + (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1715 v39 = (double)((*(int *)(v4 + 13) & 0xFF) - (*(int *)(v4 - 3) & 0xFFu)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1716 v24 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1717 v33 = (LODWORD(v24) + (*(int *)(v4 - 3) & 0xFF)) | ((v23 | ((v37 | ((LODWORD(v18) + v19) << 8)) << 8)) << 8);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1718 v25 = v40;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1719 *v40 = *(int *)v5;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1720 v26 = (int)(v5 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1721 ++v25;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1722 *v25 = *(int *)v26;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1723 v26 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1724 ++v25;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1725 ++v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1726 v40 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1727 *v25 = *(int *)v26;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1728 v25[1] = *(int *)(v26 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1729 v5 = (char *)&v30 + 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1730 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1731 v27 = v40;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1732 ++v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1733 *v40 = *(int *)v5;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1734 v28 = (int)(v5 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1735 ++v27;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1736 *v27 = *(int *)v28;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1737 v28 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1738 ++v27;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1739 v40 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1740 *v27 = *(int *)v28;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1741 v27[1] = *(int *)(v28 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1742 v4 += 16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1743 //--v34;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1744 //if ( !v34 )
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1745 //return this->uNumVertices = v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1746 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1747 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1748 return this->uNumVertices = v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1749 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1750
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1751 //----- (00477927) --------------------------------------------------------
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1752 int stru6_stru1_indoor_sw_billboard::_477927(float a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1753 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1754 char *v2; // edi@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1755 int v3; // eax@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1756 char *v4; // edx@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1757 char *v5; // esi@3
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1758 double v6; // st7@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1759 signed __int64 v7; // ST84_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1760 double v8; // ST0C_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1761 int v9; // esi@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1762 double v10; // ST44_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1763 int v11; // ecx@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1764 double v12; // ST34_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1765 int v13; // ecx@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1766 double v14; // ST14_8@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1767 double v15; // st7@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1768 unsigned int v16; // ecx@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1769 signed __int64 v17; // ST64_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1770 double v18; // ST24_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1771 int v19; // edi@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1772 double v20; // ST3C_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1773 int v21; // ecx@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1774 double v22; // ST2C_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1775 int v23; // ST9C_4@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1776 double v24; // ST1C_8@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1777 int *v25; // edi@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1778 int v26; // esi@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1779 int *v27; // edi@10
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1780 int v28; // esi@10
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1781 // int result; // eax@12
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1782 __int64 v30; // [sp+A8h] [bp-30h]@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1783 float v31; // [sp+B0h] [bp-28h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1784 float v32; // [sp+B4h] [bp-24h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1785 int v33; // [sp+B8h] [bp-20h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1786 int v34; // [sp+BCh] [bp-1Ch]@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1787 stru6_stru1_indoor_sw_billboard *v35; // [sp+C0h] [bp-18h]@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1788 float v36; // [sp+C4h] [bp-14h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1789 int v37; // [sp+C8h] [bp-10h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1790 int v38; // [sp+CCh] [bp-Ch]@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1791 float v39; // [sp+D0h] [bp-8h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1792 int *v40; // [sp+D4h] [bp-4h]@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1793
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1794 __debugbreak();//нужно почистить
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1795 v2 = (char *)&this->field_64[4 * this->uNumVertices];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1796 v38 = 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1797 *(int *)v2 = this->field_64[0];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1798 v2 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1799 *(int *)v2 = this->field_64[1];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1800 v2 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1801 *(int *)v2 = this->field_64[2];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1802 *((int *)v2 + 1) = this->field_64[3];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1803 v3 = this->uNumVertices;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1804 v35 = this;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1805 if (v3 > 0)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1806 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1807 v40 = &this->field_64[20];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1808 v4 = (char *)&this->field_64[3] + 3;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1809 v34 = v3;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1810 while (1)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1811 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1812 v5 = v4 - 15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1813 if (*(float *)(v4 - 15) >= (double)a2 && *(float *)(v4 + 1) >= (double)a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1814 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1815 v4 += 16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1816 --v34;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1817 if (!v34)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1818 return this->uNumVertices = v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1819 continue;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1820 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1821 if (*(float *)v5 >= (double)a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1822 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1823 v6 = (a2 - *(float *)v5) / (*(float *)(v4 + 1) - *(float *)v5);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1824 v7 = (unsigned __int8)v4[16] - (unsigned int)(unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1825 v36 = v6;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1826 v31 = (*(float *)(v4 + 5) - *(float *)(v4 - 11)) * v6 + *(float *)(v4 - 11);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1827 v32 = (*(float *)(v4 + 9) - *(float *)(v4 - 7)) * v6 + *(float *)(v4 - 7);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1828 *(float *)&v37 = (double)v7 * v6;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1829 v8 = *(float *)&v37 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1830 v9 = (unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1831 *(float *)&v37 = (double)((unsigned __int8)v4[15] - (unsigned int)(unsigned __int8)*(v4 - 1)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1832 v10 = *(float *)&v37 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1833 v11 = (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1834 v37 = LODWORD(v10) + (unsigned __int8)*(v4 - 1);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1835 v39 = (double)((unsigned int)(unsigned __int8)v4[14] - v11) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1836 v12 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1837 v13 = LODWORD(v12) + (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1838 v39 = (double)((*(int *)(v4 + 13) & 0xFF) - (*(int *)(v4 - 3) & 0xFFu)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1839 v14 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1840 v33 = (LODWORD(v14) + (*(int *)(v4 - 3) & 0xFF)) | ((v13 | ((v37 | ((LODWORD(v8) + v9) << 8)) << 8)) << 8);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1841 //this = v35;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1842 v5 = (char *)&v30 + 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1843 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1844 else if (*(float *)(v4 + 1) >= (double)a2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1845 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1846 v15 = (a2 - *(float *)v5) / (*(float *)(v4 + 1) - *(float *)v5);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1847 v16 = (unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1848 HIDWORD(v30) = LODWORD(a2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1849 v17 = (unsigned __int8)v4[16] - v16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1850 v36 = v15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1851 v31 = (*(float *)(v4 + 5) - *(float *)(v4 - 11)) * v15 + *(float *)(v4 - 11);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1852 v32 = (*(float *)(v4 + 9) - *(float *)(v4 - 7)) * v15 + *(float *)(v4 - 7);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1853 v39 = (double)v17 * v15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1854 v18 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1855 v19 = (unsigned __int8)*v4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1856 v39 = (double)((unsigned __int8)v4[15] - (unsigned int)(unsigned __int8)*(v4 - 1)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1857 v20 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1858 v21 = (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1859 v37 = LODWORD(v20) + (unsigned __int8)*(v4 - 1);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1860 v39 = (double)((unsigned int)(unsigned __int8)v4[14] - v21) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1861 v22 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1862 v23 = LODWORD(v22) + (unsigned __int8)*(v4 - 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1863 v39 = (double)((*(int *)(v4 + 13) & 0xFF) - (*(int *)(v4 - 3) & 0xFFu)) * v36;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1864 v24 = v39 + 6.7553994e15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1865 v33 = (LODWORD(v24) + (*(int *)(v4 - 3) & 0xFF)) | ((v23 | ((v37 | ((LODWORD(v18) + v19) << 8)) << 8)) << 8);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1866 v25 = v40;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1867 *v40 = *(int *)v5;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1868 v26 = (int)(v5 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1869 ++v25;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1870 *v25 = *(int *)v26;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1871 v26 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1872 ++v25;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1873 ++v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1874 v40 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1875 *v25 = *(int *)v26;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1876 v25[1] = *(int *)(v26 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1877 v5 = (char *)&v30 + 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1878 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1879 v27 = v40;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1880 ++v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1881 *v40 = *(int *)v5;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1882 v28 = (int)(v5 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1883 ++v27;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1884 *v27 = *(int *)v28;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1885 v28 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1886 ++v27;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1887 v40 += 4;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1888 *v27 = *(int *)v28;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1889 v27[1] = *(int *)(v28 + 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1890 v4 += 16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1891 --v34;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1892 if (!v34)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1893 return this->uNumVertices = v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1894 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1895 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1896 return this->uNumVertices = v38;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1897 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1898
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1899 //----- (00477C61) --------------------------------------------------------
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1900 int stru6_stru1_indoor_sw_billboard::sub_477C61()
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1901 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1902 //stru6_stru1_indoor_sw_billboard *v1; // ebx@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1903 int v2; // ecx@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1904 int v3; // eax@3
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1905 double v4; // st7@4
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1906 double v5; // st7@5
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1907 double v6; // st6@5
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1908 double v7; // st5@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1909 float v8; // ST30_4@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1910 float v9; // ST24_4@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1911 double v10; // st7@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1912 double v11; // st6@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1913 double v12; // st5@8
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1914 float v13; // ST24_4@13
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1915 int v14; // esi@13
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1916 char *v15; // esi@15
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1917 //signed int v16; // eax@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1918 // __int16 v17; // fps@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1919 // unsigned __int8 v18; // c2@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1920 // unsigned __int8 v19; // c3@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1921 double v20; // st6@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1922 float v21; // ST18_4@17
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1923 float v22; // ST2C_4@17
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1924 float v23; // ST34_4@17
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1925 float v24; // ST24_4@17
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1926 double v25; // st7@17
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1927 double v26; // st6@17
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1928 float v27; // ST34_4@18
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1929 float v28; // ST30_4@18
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1930 int v29; // eax@19
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1931 signed int v31; // [sp+8h] [bp-28h]@15
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1932 float v32; // [sp+Ch] [bp-24h]@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1933 float v33; // [sp+14h] [bp-1Ch]@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1934 float v34; // [sp+18h] [bp-18h]@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1935 float v35; // [sp+1Ch] [bp-14h]@17
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1936 float v36; // [sp+20h] [bp-10h]@4
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1937 float v37; // [sp+24h] [bp-Ch]@4
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1938 float v38; // [sp+24h] [bp-Ch]@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1939 float v39; // [sp+28h] [bp-8h]@9
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1940 float v40; // [sp+28h] [bp-8h]@16
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1941 float v41; // [sp+2Ch] [bp-4h]@6
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1942 float v42; // [sp+2Ch] [bp-4h]@9
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1943
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1944 //__debugbreak();//нужно почистить, срабатывает при применении закла Точечный взрыв
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1945 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1946 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1947
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1948 if (this->uNumVertices > 0)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1949 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1950 v3 = (int)&this->field_14[1];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1951 //do
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1952 for (v2 = 0; v2 < this->uNumVertices; ++v2)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1953 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1954 v4 = *(float *)(v3 - 4);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1955 LODWORD(v37) = *(int *)v3;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1956 LODWORD(v36) = *(int *)(v3 + 4);
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1957 if (pIndoorCameraD3D->sRotationX)
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1958 {
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1959 v5 = v4 - (double)pIndoorCameraD3D->vPartyPos.x;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1960 v6 = v37 - (double)pIndoorCameraD3D->vPartyPos.y;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1961 //if ( pRenderer->pRenderD3D )
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1962 //{
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1963 v41 = pIndoorCameraD3D->fRotationYSine * v6 + pIndoorCameraD3D->fRotationYCosine * v5;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1964 v7 = pIndoorCameraD3D->fRotationYSine * v5 - pIndoorCameraD3D->fRotationYCosine * v6;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1965 /*}
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1966 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1967 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1968 v41 = pBLVRenderParams->fCosineY * v5 - pBLVRenderParams->fSineY * v6;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1969 v7 = pBLVRenderParams->fSineY * v5 + pBLVRenderParams->fCosineY * v6;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1970 }*/
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1971 v8 = v7;
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1972 v9 = v36 - (double)pIndoorCameraD3D->vPartyPos.z;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1973 v10 = pIndoorCameraD3D->fRotationXCosine * v41 - pIndoorCameraD3D->fRotationXSine * v9;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1974 v11 = v8;
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1975 v12 = pIndoorCameraD3D->fRotationXCosine * v9 + pIndoorCameraD3D->fRotationXSine * v41;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1976 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1977 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1978 {
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1979 v42 = v4 - (double)pIndoorCameraD3D->vPartyPos.x;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1980 v39 = v37 - (double)pIndoorCameraD3D->vPartyPos.y;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1981 //if ( pRenderer->pRenderD3D )
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1982 //{
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1983 v10 = pIndoorCameraD3D->fRotationYSine * v39 + pIndoorCameraD3D->fRotationYCosine * v42;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1984 v11 = pIndoorCameraD3D->fRotationYSine * v42 - pIndoorCameraD3D->fRotationYCosine * v39;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1985 /*}
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1986 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1987 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1988 v10 = pBLVRenderParams->fCosineY * v42 - pBLVRenderParams->fSineY * v39;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1989 v11 = pBLVRenderParams->fSineY * v42 + pBLVRenderParams->fCosineY * v39;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1990 }*/
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
1991 v12 = v36 - (double)pIndoorCameraD3D->vPartyPos.z;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1992 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1993 v13 = v12;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1994 //++v2;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1995 *(int *)(v3 + 84) = LODWORD(v13);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1996 v14 = *(int *)(v3 + 8);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1997 *(float *)(v3 + 76) = v10;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1998 *(int *)(v3 + 88) = v14;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
1999 *(float *)(v3 + 80) = v11;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2000 v3 += 16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2001 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2002 //while ( v2 < this->uNumVertices );
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2003 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2004 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2005 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2006 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2007 v15 = (char *)&this->field_14[1];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2008 //do
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2009 for (v31 = 3; v31; --v31)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2010 {
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2011 v40 = (double)stru_5C6E00->Cos(pIndoorCameraD3D->sRotationX) * 0.0000152587890625;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2012 v32 = (double)stru_5C6E00->Sin(pIndoorCameraD3D->sRotationX) * 0.0000152587890625;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2013 v34 = (double)stru_5C6E00->Cos(pIndoorCameraD3D->sRotationY) * 0.0000152587890625;
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2014 v33 = (double)stru_5C6E00->Sin(pIndoorCameraD3D->sRotationY) * 0.0000152587890625;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2015 //v16 = stru_5C6E00->Sin(pODMRenderParams->rotation_y);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2016 LODWORD(v38) = *(int *)v15;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2017 //UNDEF(v17);
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2018 v20 = *((float *)v15 - 1) - (double)pIndoorCameraD3D->vPartyPos.x;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2019 //if ( v19 | v18 )
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2020 if (pIndoorCameraD3D->vPartyPos.x == 0)
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2021 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2022 v27 = v20;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2023 LODWORD(v35) = *((int *)v15 + 1);
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2024 v28 = v38 - (double)pIndoorCameraD3D->vPartyPos.y;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2025 v25 = v33 * v28 + v34 * v27;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2026 v26 = v34 * v28 - v33 * v27;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2027 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2028 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2029 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2030 v21 = v20;
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2031 v22 = v38 - (double)pIndoorCameraD3D->vPartyPos.y;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2032 v23 = v33 * v22 + v34 * v21;
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2033 v24 = *((float *)v15 + 1) - (double)pIndoorCameraD3D->vPartyPos.z;
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2034 v25 = v32 * v24 + v40 * v23;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2035 v26 = v34 * v22 - v33 * v21;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2036 v35 = v40 * v24 - v32 * v23;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2037 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2038 *((int *)v15 + 21) = LODWORD(v35);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2039 v29 = *((int *)v15 + 2);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2040 *((float *)v15 + 19) = v25;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2041 *((int *)v15 + 22) = v29;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2042 *((float *)v15 + 20) = v26;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2043 v15 += 16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2044 //--v31;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2045 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2046 //while ( v31 );
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2047 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2048 this->uNumVertices = 3;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2049 return 1;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2050 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2051
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2052 //----- (00477F63) --------------------------------------------------------
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2053 bool stru6_stru1_indoor_sw_billboard::sub_477F63()
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2054 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2055 signed int v1; // ebx@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2056 double v3; // st7@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2057 //int v4; // edx@4
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2058 char *v5; // ecx@5
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2059 int v6; // edi@5
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2060 float v7; // ST08_4@13
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2061 signed int v9; // [sp+Ch] [bp-8h]@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2062 float v10; // [sp+10h] [bp-4h]@2
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2063
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2064 //__debugbreak();// почистить
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2065 v1 = 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2066 v9 = 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2067 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2068 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2069 v10 = 16192.0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2070 v3 = (double)pBLVRenderParams->fov_rad_fixpoint * 0.000015258789;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2071 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2072 else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2073 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2074 v10 = (double)pODMRenderParams->shading_dist_mist;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2075 v3 = 8.0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2076 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2077 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2078 __debugbreak();//Error
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2079 if (this->uNumVertices <= 0)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2080 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2081 memcpy(&this->field_14[40], &this->field_14[20], 16 * this->uNumVertices);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2082 return this->uNumVertices != 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2083 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2084 v5 = (char *)&this->field_14[20];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2085 for (v6 = 0; v6 < this->uNumVertices; v6++)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2086 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2087 if (v3 >= *(float *)v5 || *(float *)v5 >= (double)v10)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2088 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2089 if (v3 < *(float *)v5)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2090 v9 = 1;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2091 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2092 v1 = 1;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2093 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2094 v5 += 16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2095 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2096 if (!v1)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2097 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2098 if (v9)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2099 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2100 this->_477927(v10);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2101 return this->uNumVertices != 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2102 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2103 memcpy(&this->field_14[40], &this->field_14[20], 16 * this->uNumVertices);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2104 return this->uNumVertices != 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2105 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2106 v7 = v3;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2107 _4775ED(v7);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2108 return this->uNumVertices != 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2109 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2110
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2111 //----- (0047802A) --------------------------------------------------------
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2112 int stru6_stru1_indoor_sw_billboard::sub_47802A()
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2113 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2114 double v6; // st7@4
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2115 signed int v16; // [sp+38h] [bp-Ch]@1
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2116 int a6; // [sp+3Ch] [bp-8h]@5
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2117 int a5; // [sp+40h] [bp-4h]@5
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2118
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2119 // __debugbreak(); //необходимо проверить this->field_B4[i*4+16]
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2120 v16 = 0;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2121 if (uCurrentlyLoadedLevelType == LEVEL_Indoor)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2122 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2123 for (int i = 0; i < this->uNumVertices; i++)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2124 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2125 v6 = (double)pBLVRenderParams->fov_rad_fixpoint * 0.000015258789 / this->field_B4[i * 4];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2126 //if ( pRenderer->pRenderD3D )
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2127 {
2543
b6140dfeac27 GameOver h/cpp
a.parshin
parents: 2541
diff changeset
2128 pIndoorCameraD3D->Project(round_to_int(this->field_B4[i * 4]), round_to_int(this->field_B4[i * 4 + 1]), round_to_int(this->field_B4[i * 4 + 2]),
2464
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2129 &a5, &a6);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2130 this->field_B4[i * 4 + 16] = (double)a5;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2131 this->field_B4[i * 4 + 17] = (double)a6;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2132 this->field_B4[i * 4 + 18] = round_to_int(this->field_B4[i * 4]);
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2133 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2134 /*else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2135 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2136 this->field_B4[i*4+16] = (double)pBLVRenderParams->uViewportCenterX - v6 * this->field_B4[i*4+1];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2137 this->field_B4[i*4+17] = (double)pBLVRenderParams->uViewportCenterY - v6 * this->field_B4[i*4+2];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2138 this->field_B4[i*4+18] = this->field_B4[i*4];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2139 }*/
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2140 this->field_B4[i * 4 + 19] = this->field_B4[i * 4 + 3];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2141 if ((double)(signed int)pViewport->uViewportTL_X <= this->field_B4[i * 4 + 16] && (double)(signed int)pViewport->uViewportBR_X > this->field_B4[i * 4 + 16]
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2142 && (double)(signed int)pViewport->uViewportTL_Y <= this->field_B4[i * 4 + 17] && (double)(signed int)pViewport->uViewportBR_Y > this->field_B4[i * 4 + 17])
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2143 v16 = 1;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2144 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2145 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2146 else
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2147 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2148 for (int i = 0; i < this->uNumVertices; i++)
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2149 {
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2150 this->field_B4[i * 4 + 20] = (double)pViewport->uScreenCenterX - (double)pODMRenderParams->int_fov_rad / this->field_B4[i * 4] * this->field_B4[i * 4 + 1];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2151 this->field_B4[i * 4 + 21] = (double)pViewport->uScreenCenterY - (double)pODMRenderParams->int_fov_rad / this->field_B4[i * 4] * this->field_B4[i * 4 + 2];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2152 *((int *)&this->field_B4[i * 4 + 22]) = (int)this->field_B4[i * 4];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2153 *((int *)&this->field_B4[i * 4 + 23]) = this->field_B4[i * 4 + 3];
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2154 if ((double)(signed int)pViewport->uViewportTL_X <= this->field_B4[i * 4 + 20] && (double)(signed int)pViewport->uViewportBR_X > this->field_B4[i * 4 + 20]
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2155 && (double)(signed int)pViewport->uViewportTL_Y <= this->field_B4[i * 4 + 21] && (double)(signed int)pViewport->uViewportBR_Y > this->field_B4[i * 4 + 21])
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2156 v16 = 1;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2157 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2158 }
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2159 return v16;
104fdbea0386 cleaning project part 2
zipi
parents: 2425
diff changeset
2160 }