annotate stru6.cpp @ 2159:67a83bc1a7de

uDefaultPartyHeight = 192
author Ritor1
date Mon, 13 Jan 2014 14:31:25 +0600
parents 0a1438c16c2b
children 0ae56373cc35
rev   line source
0
Ritor1
parents:
diff changeset
1 #include "stru6.h"
1016
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 982
diff changeset
2
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 982
diff changeset
3 #include "mm7_data.h"
c45d51b3f4f4 Included header files cleanup
Grumpy7
parents: 982
diff changeset
4 #include "LightmapBuilder.h"
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
5 #include "SpriteObject.h"
0
Ritor1
parents:
diff changeset
6 #include "IndoorCameraD3D.h"
Ritor1
parents:
diff changeset
7 #include "ParticleEngine.h"
Ritor1
parents:
diff changeset
8 #include "Game.h"
Ritor1
parents:
diff changeset
9 #include "LOD.h"
Ritor1
parents:
diff changeset
10 #include "Sprites.h"
Ritor1
parents:
diff changeset
11 #include "DecalBuilder.h"
Ritor1
parents:
diff changeset
12 #include "ObjectList.h"
Ritor1
parents:
diff changeset
13 #include "Actor.h"
Ritor1
parents:
diff changeset
14 #include "Random.h"
Ritor1
parents:
diff changeset
15 #include "Spells.h"
Ritor1
parents:
diff changeset
16 #include "IconFrameTable.h"
2044
28cb79ae2f6f Time.h rename
Ritor1
parents: 2037
diff changeset
17 #include "Timer.h"
0
Ritor1
parents:
diff changeset
18 #include "Viewport.h"
Ritor1
parents:
diff changeset
19 #include "PaletteManager.h"
Ritor1
parents:
diff changeset
20 #include "Overlays.h"
Ritor1
parents:
diff changeset
21 #include "stru160.h"
2037
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents: 2002
diff changeset
22 #include "OurMath.h"
1262
0aeac0b9ca30 included header cleanup
Grumpy7
parents: 1207
diff changeset
23 #include "Lights.h"
0
Ritor1
parents:
diff changeset
24
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 822
diff changeset
25 #include "MM7.h"
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 822
diff changeset
26
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 {
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
57 __int16 v1; // fps@1
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
2ca62c9e7b3c Function names
Nomad
parents: 1424
diff changeset
61 bool result; // eax@2
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 {
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
131 if (pArray1)
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 delete [] pArray1;
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 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
134
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 if (pArray2)
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 delete [] pArray2;
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 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
138 }
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
139
0
Ritor1
parents:
diff changeset
140
Ritor1
parents:
diff changeset
141 //----- (00478211) --------------------------------------------------------
Ritor1
parents:
diff changeset
142 void stru6_stru1_indoor_sw_billboard::Initialize(int a2)
Ritor1
parents:
diff changeset
143 {
Ritor1
parents:
diff changeset
144 uNumVec4sInArray1 = 66;
Ritor1
parents:
diff changeset
145 pArray1 = new stru16x[66];
Ritor1
parents:
diff changeset
146
Ritor1
parents:
diff changeset
147 uNumVec3sInArray2 = 128;
Ritor1
parents:
diff changeset
148 pArray2 = new stru160[128];
Ritor1
parents:
diff changeset
149
Ritor1
parents:
diff changeset
150 for (uint i = 0; i < uNumVec4sInArray1; ++i)
Ritor1
parents:
diff changeset
151 {
Ritor1
parents:
diff changeset
152 pArray1[i].field_0 = array_4EB8B8[i].field_0;
Ritor1
parents:
diff changeset
153 pArray1[i].field_4 = array_4EB8B8[i].field_4;
Ritor1
parents:
diff changeset
154 pArray1[i].field_8 = array_4EB8B8[i].field_8;
Ritor1
parents:
diff changeset
155 pArray1[i].field_C = a2;
Ritor1
parents:
diff changeset
156 }
1207
96a81634669e arrays to std::arrays phase 3 - finishing global arrays
Grumpy7
parents: 1106
diff changeset
157 memcpy(pArray2, array_4EBBD0_x.data()/*array_4EBBD0*/, uNumVec3sInArray2 * sizeof(stru160));
0
Ritor1
parents:
diff changeset
158 }
Ritor1
parents:
diff changeset
159
Ritor1
parents:
diff changeset
160 //----- (0047829F) --------------------------------------------------------
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
161 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
162 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
163 int v7 = 0;
0
Ritor1
parents:
diff changeset
164
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
165 for (unsigned int i = 0; i < uNumVec3sInArray2; ++i)
0
Ritor1
parents:
diff changeset
166 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
167 for (unsigned int j = 0; j < 3; ++j)
0
Ritor1
parents:
diff changeset
168 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
169 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
170 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
171 field_14[j].z = z_offset + scale * *(&pArray1->field_8 + 4 * *(int *)((char *)&pArray2->field_0 + v7));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
172 int v10 = *(int *)((char *)&pArray2->field_0 + v7);
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
173
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
174 field_14[j].diffuse = *((int *)&pArray1[1].field_0 + 4 * v10);
0
Ritor1
parents:
diff changeset
175 v7 += 4;
Ritor1
parents:
diff changeset
176 }
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
177
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
178 uNumVertices = 3;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
179 if ( sub_477C61() && sub_477F63() )
0
Ritor1
parents:
diff changeset
180 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
181 if ( sub_47802A() )
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
182 pRenderer->_4A4CC9_AddSomeBillboard(this, diffuse);
0
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
Ritor1
parents:
diff changeset
189
Ritor1
parents:
diff changeset
190 //----- (004A71FE) --------------------------------------------------------
Ritor1
parents:
diff changeset
191 void stru6::DoAddProjectile(float srcX, float srcY, float srcZ, float dstX, float dstY, float dstZ, unsigned int uTextureID)
Ritor1
parents:
diff changeset
192 {
486
Nomad
parents: 430
diff changeset
193 //int v8; // eax@1
0
Ritor1
parents:
diff changeset
194
486
Nomad
parents: 430
diff changeset
195 //v8 = uNumProjectiles;
Nomad
parents: 430
diff changeset
196 if (uNumProjectiles < 32)
0
Ritor1
parents:
diff changeset
197 {
486
Nomad
parents: 430
diff changeset
198 pProjectiles[uNumProjectiles].srcX = srcX;
Nomad
parents: 430
diff changeset
199 pProjectiles[uNumProjectiles].srcY = srcY;
0
Ritor1
parents:
diff changeset
200 pProjectiles[uNumProjectiles].srcZ = srcZ;
Ritor1
parents:
diff changeset
201 pProjectiles[uNumProjectiles].dstX = dstX;
Ritor1
parents:
diff changeset
202 pProjectiles[uNumProjectiles].dstY = dstY;
Ritor1
parents:
diff changeset
203 pProjectiles[uNumProjectiles].dstZ = dstZ;
Ritor1
parents:
diff changeset
204 pProjectiles[uNumProjectiles++].uTextureID = uTextureID;
Ritor1
parents:
diff changeset
205 }
Ritor1
parents:
diff changeset
206 }
Ritor1
parents:
diff changeset
207
Ritor1
parents:
diff changeset
208 //----- (004A7298) --------------------------------------------------------
Ritor1
parents:
diff changeset
209 void stru6::DrawProjectiles()
Ritor1
parents:
diff changeset
210 {
Ritor1
parents:
diff changeset
211 float v10; // ST1C_4@8
Ritor1
parents:
diff changeset
212 float v11; // ST0C_4@8
Ritor1
parents:
diff changeset
213 IDirect3DTexture2 *v12; // [sp+20h] [bp-78h]@6
Ritor1
parents:
diff changeset
214 RenderVertexSoft v[2]; // [sp+30h] [bp-68h]@1
Ritor1
parents:
diff changeset
215
Ritor1
parents:
diff changeset
216 for (uint i = 0; i < uNumProjectiles; ++i)
Ritor1
parents:
diff changeset
217 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1954
diff changeset
218 ProjectileAnim* p = &pProjectiles[i];
0
Ritor1
parents:
diff changeset
219
Ritor1
parents:
diff changeset
220 v[0].vWorldPosition.x = p->srcX;
Ritor1
parents:
diff changeset
221 v[0].vWorldPosition.y = p->srcY;
Ritor1
parents:
diff changeset
222 v[0].vWorldPosition.z = p->srcZ;
Ritor1
parents:
diff changeset
223 v[1].vWorldPosition.x = p->dstX;
Ritor1
parents:
diff changeset
224 v[1].vWorldPosition.y = p->dstY;
Ritor1
parents:
diff changeset
225 v[1].vWorldPosition.z = p->dstZ;
Ritor1
parents:
diff changeset
226 pGame->pIndoorCameraD3D->ViewTransform(v, 2);
Ritor1
parents:
diff changeset
227
Ritor1
parents:
diff changeset
228 sr_42620A(v);
Ritor1
parents:
diff changeset
229
Ritor1
parents:
diff changeset
230 pGame->pIndoorCameraD3D->Project(v, 2, 0);
Ritor1
parents:
diff changeset
231
Ritor1
parents:
diff changeset
232 if (p->uTextureID != -1)
Ritor1
parents:
diff changeset
233 v12 = pBitmaps_LOD->pHardwareTextures[p->uTextureID];
Ritor1
parents:
diff changeset
234 else
Ritor1
parents:
diff changeset
235 v12 = 0;
Ritor1
parents:
diff changeset
236
Ritor1
parents:
diff changeset
237 v10 = pGame->pIndoorCameraD3D->fov_x / v[1].vWorldViewPosition.x * 20.0;
Ritor1
parents:
diff changeset
238 v11 = pGame->pIndoorCameraD3D->fov_x / v[0].vWorldViewPosition.x * 20.0;
Ritor1
parents:
diff changeset
239 pRenderer->DrawProjectile(
Ritor1
parents:
diff changeset
240 v[0].vWorldViewProjX,
Ritor1
parents:
diff changeset
241 v[0].vWorldViewProjY,
Ritor1
parents:
diff changeset
242 v[0].vWorldViewPosition.x,
Ritor1
parents:
diff changeset
243 v11,
Ritor1
parents:
diff changeset
244 v[1].vWorldViewProjX,
Ritor1
parents:
diff changeset
245 v[1].vWorldViewProjY,
Ritor1
parents:
diff changeset
246 v[1].vWorldViewPosition.x,
Ritor1
parents:
diff changeset
247 v10,
Ritor1
parents:
diff changeset
248 v12);
Ritor1
parents:
diff changeset
249 }
Ritor1
parents:
diff changeset
250 }
Ritor1
parents:
diff changeset
251
Ritor1
parents:
diff changeset
252 //----- (004A73AA) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
253 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
254 {
Ritor1
parents:
diff changeset
255 stru6 *v4; // edi@1
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
256 SpriteObject *v5; // esi@1
0
Ritor1
parents:
diff changeset
257 int v6; // eax@1
Ritor1
parents:
diff changeset
258 stru6_stru2 *v7; // eax@2
Ritor1
parents:
diff changeset
259 double v8; // st7@2
Ritor1
parents:
diff changeset
260 double v9; // st6@2
Ritor1
parents:
diff changeset
261 double v10; // st7@3
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
262 Particle_sw local_0; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
263 float x; // [sp+78h] [bp+8h]@2
Ritor1
parents:
diff changeset
264
Ritor1
parents:
diff changeset
265 v4 = this;
Ritor1
parents:
diff changeset
266 memset(&local_0, 0, 0x68u);
Ritor1
parents:
diff changeset
267 v5 = a2;
Ritor1
parents:
diff changeset
268 v6 = a2->field_54;
Ritor1
parents:
diff changeset
269 if ( v6 )
Ritor1
parents:
diff changeset
270 {
486
Nomad
parents: 430
diff changeset
271 v7 = &v4->array_4[v6 & 0x1F];
Nomad
parents: 430
diff changeset
272 x = ((double)a2->vPosition.x - v7->flt_0_x) * 0.5 + v7->flt_0_x;
Nomad
parents: 430
diff changeset
273 v8 = ((double)v5->vPosition.y - v7->flt_4_y) * 0.5 + v7->flt_4_y;
Nomad
parents: 430
diff changeset
274 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
275 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
0
Ritor1
parents:
diff changeset
276 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
277 local_0.x = x + 4.0;
Ritor1
parents:
diff changeset
278 local_0.y = v8;
Ritor1
parents:
diff changeset
279 local_0.z = v9;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
280 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
281 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
282 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
283 local_0.timeToLive = (rand() & 0x40) + 96;
Ritor1
parents:
diff changeset
284 local_0.uTextureID = uTextureID;
Ritor1
parents:
diff changeset
285 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
286 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
287 local_0.x = x - 4.0;
Ritor1
parents:
diff changeset
288 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
289 local_0.x = (double)v5->vPosition.x + 4.0;
Ritor1
parents:
diff changeset
290 local_0.y = (double)v5->vPosition.y;
Ritor1
parents:
diff changeset
291 local_0.z = (double)v5->vPosition.z;
Ritor1
parents:
diff changeset
292 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
293 local_0.x = (double)v5->vPosition.x - 4.0;
Ritor1
parents:
diff changeset
294 pGame->pParticleEngine->AddParticle(&local_0);
486
Nomad
parents: 430
diff changeset
295 v4->array_4[v5->field_54 & 0x1F].flt_0_x = (double)v5->vPosition.x;
Nomad
parents: 430
diff changeset
296 v4->array_4[v5->field_54 & 0x1F].flt_4_y = (double)v5->vPosition.y;
Nomad
parents: 430
diff changeset
297 v4->array_4[v5->field_54 & 0x1F].flt_8_z = (double)v5->vPosition.z;
0
Ritor1
parents:
diff changeset
298 }
Ritor1
parents:
diff changeset
299 else
Ritor1
parents:
diff changeset
300 {
486
Nomad
parents: 430
diff changeset
301 a2->field_54 = v4->field_0++;
Nomad
parents: 430
diff changeset
302 v4->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
Nomad
parents: 430
diff changeset
303 v4->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
Nomad
parents: 430
diff changeset
304 v4->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
0
Ritor1
parents:
diff changeset
305 v10 = (double)a2->vPosition.x;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
306 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
0
Ritor1
parents:
diff changeset
307 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
308 local_0.x = v10 + 4.0;
Ritor1
parents:
diff changeset
309 local_0.y = (double)a2->vPosition.y;
Ritor1
parents:
diff changeset
310 local_0.z = (double)a2->vPosition.z;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
311 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
312 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
313 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
314 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
315 local_0.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
316 local_0.uTextureID = uTextureID;
Ritor1
parents:
diff changeset
317 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
318 local_0.x = (double)a2->vPosition.x - 4.0;
Ritor1
parents:
diff changeset
319 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
320 }
Ritor1
parents:
diff changeset
321 }
Ritor1
parents:
diff changeset
322
Ritor1
parents:
diff changeset
323 //----- (004A75CC) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
324 void stru6::_4A75CC_single_spell_collision_particle(SpriteObject *a1, unsigned int uDiffuse, unsigned int uTextureID)
0
Ritor1
parents:
diff changeset
325 {
Ritor1
parents:
diff changeset
326 double v4; // st7@1
Ritor1
parents:
diff changeset
327 signed int v5; // edi@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
328 Particle_sw local_0; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
329
Ritor1
parents:
diff changeset
330 memset(&local_0, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
331 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
0
Ritor1
parents:
diff changeset
332 local_0.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
333 local_0.y = (double)a1->vPosition.y;
Ritor1
parents:
diff changeset
334 v4 = (double)a1->vPosition.z;
Ritor1
parents:
diff changeset
335 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
336 local_0.z = v4;
Ritor1
parents:
diff changeset
337 v5 = 10;
Ritor1
parents:
diff changeset
338 local_0.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
339 local_0.uTextureID = uTextureID;
Ritor1
parents:
diff changeset
340 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
341 do
Ritor1
parents:
diff changeset
342 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
343 local_0.r = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
344 local_0.g = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
345 local_0.b = (double)(rand() & 0x1FF) - 255.0;
0
Ritor1
parents:
diff changeset
346 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
347 --v5;
Ritor1
parents:
diff changeset
348 }
Ritor1
parents:
diff changeset
349 while ( v5 );
Ritor1
parents:
diff changeset
350 }
Ritor1
parents:
diff changeset
351
Ritor1
parents:
diff changeset
352 //----- (004A7688) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
353 void stru6::_4A7688_fireball_collision_particle(SpriteObject *a2)
0
Ritor1
parents:
diff changeset
354 {
Ritor1
parents:
diff changeset
355 double v3; // st7@1
Ritor1
parents:
diff changeset
356 double v4; // st7@2
Ritor1
parents:
diff changeset
357 int v6; // eax@6
Ritor1
parents:
diff changeset
358 float v7; // ST0C_4@6
Ritor1
parents:
diff changeset
359 float v8; // ST08_4@6
Ritor1
parents:
diff changeset
360 float v9; // ST04_4@6
Ritor1
parents:
diff changeset
361 float v10; // ST00_4@6
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
362 Particle_sw local_0; // [sp+1Ch] [bp-7Ch]@1
0
Ritor1
parents:
diff changeset
363 float v13; // [sp+88h] [bp-10h]@1
Ritor1
parents:
diff changeset
364
Ritor1
parents:
diff changeset
365 memset(&local_0, 0, 0x68u);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
366
0
Ritor1
parents:
diff changeset
367 v3 = (double)a2->uSpriteFrameID / (double)pObjectList->pObjects[a2->uObjectDescID].uLifetime;
Ritor1
parents:
diff changeset
368 v13 = 512.0 * v3;
Ritor1
parents:
diff changeset
369 if ( v3 >= 0.75 )
Ritor1
parents:
diff changeset
370 v4 = (1.0 - v3) * 4.0;
Ritor1
parents:
diff changeset
371 else
Ritor1
parents:
diff changeset
372 v4 = v3 * 1.333333333333333;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
373
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
374 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
375 local_0.uDiffuse = 0xFF3C1E;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
376 local_0.x = (double)a2->vPosition.x;
0
Ritor1
parents:
diff changeset
377 local_0.y = (double)a2->vPosition.y;
Ritor1
parents:
diff changeset
378 local_0.z = (double)a2->vPosition.z;
Ritor1
parents:
diff changeset
379 local_0.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
380 local_0.uTextureID = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
381 local_0.flt_28 = 1.0;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
382
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
383 // 10 fireball sparks
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
384 for (unsigned int i = 0; i < 10; ++i)
0
Ritor1
parents:
diff changeset
385 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
386 local_0.r = (rand() & 0x1FF) - 255;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
387 local_0.g = (rand() & 0x1FF) - 255;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
388 local_0.b = (rand() & 0x1FF) - 255;
0
Ritor1
parents:
diff changeset
389 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
390 }
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
391
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
392 v6 = ModulateColor(0xFF3C1E, v4);
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
393 v7 = (double)floorf(0.5f + v13);
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
394 v8 = (double)a2->vPosition.z;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
395 v9 = (double)a2->vPosition.y;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
396 v10 = (double)a2->vPosition.x;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
397 pStru1->_47829F_sphere_particle(v10, v9, v8, v7, v6);
0
Ritor1
parents:
diff changeset
398 }
Ritor1
parents:
diff changeset
399
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
400
0
Ritor1
parents:
diff changeset
401 //----- (004A77FD) --------------------------------------------------------
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
402 void stru6::_4A77FD_implosion_particle_d3d(SpriteObject *a1)
0
Ritor1
parents:
diff changeset
403 {
Ritor1
parents:
diff changeset
404 double v4; // st7@1
Ritor1
parents:
diff changeset
405 double v5; // st7@2
Ritor1
parents:
diff changeset
406 int v7; // eax@4
Ritor1
parents:
diff changeset
407 float v8; // ST0C_4@4
Ritor1
parents:
diff changeset
408 float v9; // ST08_4@4
Ritor1
parents:
diff changeset
409 float v10; // ST04_4@4
Ritor1
parents:
diff changeset
410 float v11; // ST00_4@4
Ritor1
parents:
diff changeset
411 float v12; // [sp+28h] [bp-4h]@1
Ritor1
parents:
diff changeset
412
Ritor1
parents:
diff changeset
413 v4 = (double)a1->uSpriteFrameID / (double)pObjectList->pObjects[a1->uObjectDescID].uLifetime;
Ritor1
parents:
diff changeset
414 v12 = 512.0 - v4 * 512.0;
Ritor1
parents:
diff changeset
415 if ( v4 >= 0.75 )
Ritor1
parents:
diff changeset
416 v5 = v4 * 4.0;
Ritor1
parents:
diff changeset
417 else
Ritor1
parents:
diff changeset
418 v5 = v4 * 1.333333333333333;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
419
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
420 v7 = ModulateColor(0x7E7E7E, v5);
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
421 v8 = (double)floorf(0.5f + v12);
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
422 v9 = (double)a1->vPosition.z;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
423 v10 = (double)a1->vPosition.y;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
424 v11 = (double)a1->vPosition.x;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
425 pStru1->_47829F_sphere_particle(v11, v10, v9, v8, v7);
0
Ritor1
parents:
diff changeset
426 }
Ritor1
parents:
diff changeset
427
Ritor1
parents:
diff changeset
428 //----- (004A78AE) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
429 void stru6::_4A78AE_sparks_spell(SpriteObject *a1)
0
Ritor1
parents:
diff changeset
430 {
Ritor1
parents:
diff changeset
431 ObjectDesc *v2; // esi@1
Ritor1
parents:
diff changeset
432 unsigned int v3; // eax@1
Ritor1
parents:
diff changeset
433 double v4; // st7@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
434 Particle_sw local_0; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
435
Ritor1
parents:
diff changeset
436 v2 = &pObjectList->pObjects[a1->uObjectDescID];
Ritor1
parents:
diff changeset
437 memset(&local_0, 0, 0x68u);
Ritor1
parents:
diff changeset
438 v3 = a1->uSpriteFrameID;
Ritor1
parents:
diff changeset
439 local_0.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
440 v4 = (double)a1->vPosition.y;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
441 local_0.type = ParticleType_Sprite;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
442 local_0.uDiffuse = 0x7F7F7F;
0
Ritor1
parents:
diff changeset
443 local_0.timeToLive = 1;
Ritor1
parents:
diff changeset
444 local_0.y = v4;
Ritor1
parents:
diff changeset
445 local_0.z = (double)a1->vPosition.z;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
446 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
447 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
448 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
449 local_0.uTextureID = pSpriteFrameTable->GetFrame(v2->uSpriteID, v3)->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
450 LODWORD(local_0.flt_28) = 0x40000000u;
Ritor1
parents:
diff changeset
451 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
452 }
Ritor1
parents:
diff changeset
453
Ritor1
parents:
diff changeset
454 //----- (004A7948) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
455 void stru6::_4A7948_mind_blast_after_effect(SpriteObject *a1)
0
Ritor1
parents:
diff changeset
456 {
Ritor1
parents:
diff changeset
457 ObjectDesc *v2; // esi@1
Ritor1
parents:
diff changeset
458 unsigned int v3; // eax@1
Ritor1
parents:
diff changeset
459 double v4; // st7@1
Ritor1
parents:
diff changeset
460 char v5; // al@1
Ritor1
parents:
diff changeset
461 signed int v6; // edi@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
462 Particle_sw Dst; // [sp+8h] [bp-68h]@1
0
Ritor1
parents:
diff changeset
463
Ritor1
parents:
diff changeset
464 v2 = &pObjectList->pObjects[a1->uObjectDescID];
Ritor1
parents:
diff changeset
465 memset(&Dst, 0, 0x68u);
Ritor1
parents:
diff changeset
466 v3 = a1->uSpriteFrameID;
Ritor1
parents:
diff changeset
467 Dst.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
468 v4 = (double)a1->vPosition.y;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
469 Dst.type = ParticleType_Sprite | ParticleType_Rotating | ParticleType_1;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
470 Dst.uDiffuse = 0x7F7F7F;
0
Ritor1
parents:
diff changeset
471 Dst.y = v4;
Ritor1
parents:
diff changeset
472 Dst.z = (double)a1->vPosition.z;
Ritor1
parents:
diff changeset
473 Dst.uTextureID = pSpriteFrameTable->GetFrame(v2->uSpriteID, v3)->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
474 v5 = rand();
Ritor1
parents:
diff changeset
475 v6 = 10;
Ritor1
parents:
diff changeset
476 Dst.flt_28 = 1.0;
Ritor1
parents:
diff changeset
477 Dst.timeToLive = (v5 & 0x7F) + 128;
Ritor1
parents:
diff changeset
478 do
Ritor1
parents:
diff changeset
479 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
480 Dst.r = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
481 Dst.g = (double)(rand() & 0x1FF) - 255.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
482 Dst.b = (double)(rand() & 0x1FF) - 255.0;
0
Ritor1
parents:
diff changeset
483 pGame->pParticleEngine->AddParticle(&Dst);
Ritor1
parents:
diff changeset
484 --v6;
Ritor1
parents:
diff changeset
485 }
Ritor1
parents:
diff changeset
486 while ( v6 );
Ritor1
parents:
diff changeset
487 }
Ritor1
parents:
diff changeset
488
Ritor1
parents:
diff changeset
489 //----- (004A7A27) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
490 bool stru6::AddMobileLight(SpriteObject *a1, unsigned int uDiffuse, int uRadius)
0
Ritor1
parents:
diff changeset
491 {
Ritor1
parents:
diff changeset
492 return pMobileLightsStack->AddLight(
Ritor1
parents:
diff changeset
493 a1->vPosition.x,
Ritor1
parents:
diff changeset
494 a1->vPosition.y,
Ritor1
parents:
diff changeset
495 a1->vPosition.z,
Ritor1
parents:
diff changeset
496 a1->uSectorID,
Ritor1
parents:
diff changeset
497 uRadius,
Ritor1
parents:
diff changeset
498 (uDiffuse & 0x00FF0000) >> 16,
Ritor1
parents:
diff changeset
499 (uDiffuse & 0x0000FF00) >> 8,
Ritor1
parents:
diff changeset
500 uDiffuse & 0x000000FF,
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
501 _4E94D3_light_type);
0
Ritor1
parents:
diff changeset
502 }
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
503 // 4E94D3: using guessed type char _4E94D3_light_type;
0
Ritor1
parents:
diff changeset
504
Ritor1
parents:
diff changeset
505 //----- (004A7A66) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
506 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
507 {
Ritor1
parents:
diff changeset
508 int v5; // eax@1
Ritor1
parents:
diff changeset
509 char v6; // al@1
Ritor1
parents:
diff changeset
510 double v7; // st6@1
Ritor1
parents:
diff changeset
511 double v8; // st6@1
Ritor1
parents:
diff changeset
512 double v9; // st7@1
Ritor1
parents:
diff changeset
513 double v10; // st6@1
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
514 Particle_sw local_0; // [sp+0h] [bp-6Ch]@1
0
Ritor1
parents:
diff changeset
515 float v12; // [sp+68h] [bp-4h]@1
Ritor1
parents:
diff changeset
516 float a1a; // [sp+74h] [bp+8h]@1
Ritor1
parents:
diff changeset
517 float uDiffusea; // [sp+78h] [bp+Ch]@1
Ritor1
parents:
diff changeset
518 float uTextureIDa; // [sp+7Ch] [bp+10h]@1
Ritor1
parents:
diff changeset
519
Ritor1
parents:
diff changeset
520 memset(&local_0, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
521 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
0
Ritor1
parents:
diff changeset
522 local_0.x = (double)a1->vPosition.x;
Ritor1
parents:
diff changeset
523 v5 = a1->vPosition.z;
Ritor1
parents:
diff changeset
524 local_0.y = (double)a1->vPosition.y;
Ritor1
parents:
diff changeset
525 local_0.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
526 local_0.z = (double)(v5 + 32);
Ritor1
parents:
diff changeset
527 v6 = rand();
Ritor1
parents:
diff changeset
528 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
529 v7 = 0.0 * a4;
Ritor1
parents:
diff changeset
530 local_0.timeToLive = (v6 & 0x7F) + 128;
Ritor1
parents:
diff changeset
531 local_0.uTextureID = uTextureID;
Ritor1
parents:
diff changeset
532 a1a = v7;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
533 local_0.r = v7;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
534 local_0.g = a4;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
535 local_0.b = a4;
0
Ritor1
parents:
diff changeset
536 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
537 v8 = 0.70710677 * a4;
Ritor1
parents:
diff changeset
538 uDiffusea = v8;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
539 local_0.r = v8;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
540 local_0.g = v8;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
541 local_0.b = a4;
0
Ritor1
parents:
diff changeset
542 pGame->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
543 local_0.g = a1a;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
544 local_0.r = a4;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
545 local_0.b = a4;
0
Ritor1
parents:
diff changeset
546 pGame->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
547 local_0.r = uDiffusea;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
548 local_0.b = a4;
0
Ritor1
parents:
diff changeset
549 v9 = -uDiffusea;
Ritor1
parents:
diff changeset
550 uTextureIDa = v9;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
551 local_0.g = v9;
0
Ritor1
parents:
diff changeset
552 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
553 v10 = -1.0 * a4;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
554 local_0.r = a1a;
0
Ritor1
parents:
diff changeset
555 v12 = v10;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
556 local_0.g = v10;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
557 local_0.b = a4;
0
Ritor1
parents:
diff changeset
558 pGame->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
559 local_0.b = a4;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
560 local_0.r = uTextureIDa;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
561 local_0.g = uTextureIDa;
0
Ritor1
parents:
diff changeset
562 pGame->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
563 local_0.r = v12;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
564 local_0.g = a1a;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
565 local_0.b = a4;
0
Ritor1
parents:
diff changeset
566 pGame->pParticleEngine->AddParticle(&local_0);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
567 local_0.r = uTextureIDa;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
568 local_0.g = uDiffusea;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
569 local_0.b = a4;
0
Ritor1
parents:
diff changeset
570 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
571 }
Ritor1
parents:
diff changeset
572
Ritor1
parents:
diff changeset
573 //----- (004A7C07) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
574 void stru6::_4A7C07(SpriteObject *a2)
0
Ritor1
parents:
diff changeset
575 {
Ritor1
parents:
diff changeset
576 stru6 *v2; // edi@1
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
577 SpriteObject *v3; // esi@1
0
Ritor1
parents:
diff changeset
578 int v4; // eax@1
Ritor1
parents:
diff changeset
579 ObjectDesc *v5; // ebx@1
Ritor1
parents:
diff changeset
580 stru6_stru2 *v6; // eax@2
Ritor1
parents:
diff changeset
581 double v7; // st6@2
Ritor1
parents:
diff changeset
582 double v8; // st5@2
Ritor1
parents:
diff changeset
583 double v9; // st4@2
Ritor1
parents:
diff changeset
584 char v10; // al@2
Ritor1
parents:
diff changeset
585 double v11; // st7@2
Ritor1
parents:
diff changeset
586 double v12; // st7@3
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
587 Particle_sw local_0; // [sp+Ch] [bp-68h]@1
0
Ritor1
parents:
diff changeset
588 float a2a; // [sp+7Ch] [bp+8h]@2
Ritor1
parents:
diff changeset
589
Ritor1
parents:
diff changeset
590 v2 = this;
Ritor1
parents:
diff changeset
591 memset(&local_0, 0, 0x68u);
Ritor1
parents:
diff changeset
592 v3 = a2;
Ritor1
parents:
diff changeset
593 v4 = a2->field_54;
Ritor1
parents:
diff changeset
594 v5 = &pObjectList->pObjects[a2->uObjectDescID];
Ritor1
parents:
diff changeset
595 if ( v4 )
Ritor1
parents:
diff changeset
596 {
486
Nomad
parents: 430
diff changeset
597 v6 = &v2->array_4[v4 & 0x1F];
Nomad
parents: 430
diff changeset
598 v7 = ((double)a2->vPosition.x - v6->flt_0_x) * 0.5 + v6->flt_0_x;
Nomad
parents: 430
diff changeset
599 v8 = ((double)a2->vPosition.y - v6->flt_4_y) * 0.5 + v6->flt_4_y;
Nomad
parents: 430
diff changeset
600 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
601 local_0.type = ParticleType_Sprite;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
602 local_0.uDiffuse = 0xFFFFFF;
0
Ritor1
parents:
diff changeset
603 a2a = v9;
Ritor1
parents:
diff changeset
604 local_0.x = v7;
Ritor1
parents:
diff changeset
605 local_0.z = a2a;
Ritor1
parents:
diff changeset
606 local_0.y = v8;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
607 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
608 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
609 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
610 v10 = rand();
Ritor1
parents:
diff changeset
611 LODWORD(local_0.flt_28) = 0x40400000u;
Ritor1
parents:
diff changeset
612 local_0.timeToLive = (v10 & 0x3F) + 64;
Ritor1
parents:
diff changeset
613 local_0.uTextureID = pSpriteFrameTable->GetFrame(v5->uSpriteID, v3->uSpriteFrameID)->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
614 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
615 v11 = (double)v3->vPosition.x;
Ritor1
parents:
diff changeset
616 LODWORD(local_0.flt_28) = 0x40800000u;
Ritor1
parents:
diff changeset
617 local_0.x = v11;
Ritor1
parents:
diff changeset
618 local_0.y = (double)v3->vPosition.y;
Ritor1
parents:
diff changeset
619 local_0.z = (double)v3->vPosition.z;
Ritor1
parents:
diff changeset
620 local_0.timeToLive = (rand() & 0x3F) + 64;
Ritor1
parents:
diff changeset
621 pGame->pParticleEngine->AddParticle(&local_0);
486
Nomad
parents: 430
diff changeset
622 v2->array_4[v3->field_54 & 0x1F].flt_0_x = (double)v3->vPosition.x;
Nomad
parents: 430
diff changeset
623 v2->array_4[v3->field_54 & 0x1F].flt_4_y = (double)v3->vPosition.y;
Nomad
parents: 430
diff changeset
624 v2->array_4[v3->field_54 & 0x1F].flt_8_z = (double)v3->vPosition.z;
0
Ritor1
parents:
diff changeset
625 }
Ritor1
parents:
diff changeset
626 else
Ritor1
parents:
diff changeset
627 {
486
Nomad
parents: 430
diff changeset
628 a2->field_54 = v2->field_0++;
Nomad
parents: 430
diff changeset
629 v2->array_4[a2->field_54 & 0x1F].flt_0_x = (double)a2->vPosition.x;
Nomad
parents: 430
diff changeset
630 v2->array_4[a2->field_54 & 0x1F].flt_4_y = (double)a2->vPosition.y;
Nomad
parents: 430
diff changeset
631 v2->array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
0
Ritor1
parents:
diff changeset
632 v12 = (double)a2->vPosition.x;
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
633 local_0.type = ParticleType_Sprite;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
634 local_0.uDiffuse = 0xFFFFFF;
0
Ritor1
parents:
diff changeset
635 LODWORD(local_0.flt_28) = 0x40000000u;
Ritor1
parents:
diff changeset
636 local_0.x = v12;
Ritor1
parents:
diff changeset
637 local_0.y = (double)a2->vPosition.y;
Ritor1
parents:
diff changeset
638 local_0.z = (double)a2->vPosition.z;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
639 local_0.r = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
640 local_0.g = 0.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
641 local_0.b = 0.0;
0
Ritor1
parents:
diff changeset
642 local_0.timeToLive = (rand() & 0x3F) + 64;
Ritor1
parents:
diff changeset
643 local_0.uTextureID = pSpriteFrameTable->GetFrame(v5->uSpriteID, a2->uSpriteFrameID)->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
644 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
645 }
Ritor1
parents:
diff changeset
646 }
Ritor1
parents:
diff changeset
647
Ritor1
parents:
diff changeset
648 //----- (004A7E05) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
649 void stru6::AddProjectile(SpriteObject *a2, int a3, unsigned int uTextureID)
0
Ritor1
parents:
diff changeset
650 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
651 if (a2->field_54)
0
Ritor1
parents:
diff changeset
652 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
653 DoAddProjectile(array_4[a2->field_54 & 0x1F].flt_0_x,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
654 array_4[a2->field_54 & 0x1F].flt_4_y,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
655 array_4[a2->field_54 & 0x1F].flt_8_z,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
656 a2->vPosition.x,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
657 a2->vPosition.y,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
658 a2->vPosition.z,
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
659 uTextureID);
0
Ritor1
parents:
diff changeset
660 }
Ritor1
parents:
diff changeset
661 else
Ritor1
parents:
diff changeset
662 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
663 a2->field_54 = field_0++;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
664 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
665 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
666 array_4[a2->field_54 & 0x1F].flt_8_z = (double)a2->vPosition.z;
0
Ritor1
parents:
diff changeset
667 }
Ritor1
parents:
diff changeset
668 }
Ritor1
parents:
diff changeset
669
Ritor1
parents:
diff changeset
670 //----- (004A7E89) --------------------------------------------------------
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
671 void stru6::_4A7E89_sparkles_on_actor_after_it_casts_buff(Actor *pActor, unsigned int uDiffuse)
0
Ritor1
parents:
diff changeset
672 {
Ritor1
parents:
diff changeset
673 Actor *v3; // edi@1
Ritor1
parents:
diff changeset
674 int v4; // ebx@3
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
675 //int result; // eax@5
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
676 Particle_sw Dst; // [sp+Ch] [bp-6Ch]@1
0
Ritor1
parents:
diff changeset
677 int v7; // [sp+74h] [bp-4h]@2
Ritor1
parents:
diff changeset
678 signed int pActora; // [sp+80h] [bp+8h]@1
Ritor1
parents:
diff changeset
679
Ritor1
parents:
diff changeset
680 memset(&Dst, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
681 Dst.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_8;
0
Ritor1
parents:
diff changeset
682 Dst.timeToLive = (rand() & 0x7F) + 128;
Ritor1
parents:
diff changeset
683 v3 = pActor;
Ritor1
parents:
diff changeset
684 Dst.uTextureID = pBitmaps_LOD->LoadTexture("effpar02", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
685 pActora = 50;
Ritor1
parents:
diff changeset
686 Dst.flt_28 = 1.0;
Ritor1
parents:
diff changeset
687 do
Ritor1
parents:
diff changeset
688 {
Ritor1
parents:
diff changeset
689 v7 = (unsigned __int8)rand() + v3->vPosition.x - 127;
Ritor1
parents:
diff changeset
690 Dst.x = (double)v7;
Ritor1
parents:
diff changeset
691 v7 = (unsigned __int8)rand() + v3->vPosition.y - 127;
Ritor1
parents:
diff changeset
692 Dst.y = (double)v7;
Ritor1
parents:
diff changeset
693 v7 = v3->vPosition.z + (unsigned __int8)rand();
Ritor1
parents:
diff changeset
694 Dst.z = (double)v7;
Ritor1
parents:
diff changeset
695 if ( uDiffuse )
Ritor1
parents:
diff changeset
696 {
Ritor1
parents:
diff changeset
697 Dst.uDiffuse = uDiffuse;
Ritor1
parents:
diff changeset
698 }
Ritor1
parents:
diff changeset
699 else
Ritor1
parents:
diff changeset
700 {
Ritor1
parents:
diff changeset
701 v4 = rand() << 16;
Ritor1
parents:
diff changeset
702 Dst.uDiffuse = rand() | v4;
Ritor1
parents:
diff changeset
703 }
Ritor1
parents:
diff changeset
704 pGame->pParticleEngine->AddParticle(&Dst);
Ritor1
parents:
diff changeset
705 --pActora;
Ritor1
parents:
diff changeset
706 }
Ritor1
parents:
diff changeset
707 while ( pActora );
Ritor1
parents:
diff changeset
708 }
Ritor1
parents:
diff changeset
709
Ritor1
parents:
diff changeset
710 //----- (004A7F74) --------------------------------------------------------
Ritor1
parents:
diff changeset
711 void stru6::_4A7F74(int x, int y, int z)
Ritor1
parents:
diff changeset
712 {
Ritor1
parents:
diff changeset
713 stru6 *v4; // esi@1
Ritor1
parents:
diff changeset
714 char v5; // al@1
Ritor1
parents:
diff changeset
715 signed int v6; // edi@1
Ritor1
parents:
diff changeset
716 unsigned int v7; // eax@1
Ritor1
parents:
diff changeset
717 double v8; // st7@2
Ritor1
parents:
diff changeset
718 double v9; // st7@2
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
719 Particle_sw local_0; // [sp+8h] [bp-78h]@1
0
Ritor1
parents:
diff changeset
720 double v11; // [sp+70h] [bp-10h]@1
Ritor1
parents:
diff changeset
721 double v12; // [sp+78h] [bp-8h]@1
Ritor1
parents:
diff changeset
722 float z1; // [sp+88h] [bp+8h]@2
Ritor1
parents:
diff changeset
723
Ritor1
parents:
diff changeset
724 v4 = this;
Ritor1
parents:
diff changeset
725 memset(&local_0, 0, 0x68u);
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
726 local_0.type = ParticleType_Bitmap | ParticleType_Rotating | ParticleType_1;
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 567
diff changeset
727 local_0.uDiffuse = 0x7E7E7E;
0
Ritor1
parents:
diff changeset
728 v5 = rand();
Ritor1
parents:
diff changeset
729 local_0.flt_28 = 1.0;
Ritor1
parents:
diff changeset
730 v6 = 8;
Ritor1
parents:
diff changeset
731 local_0.timeToLive = (v5 & 0x7F) + 128;
Ritor1
parents:
diff changeset
732 v7 = v4->uTextureID_effpar1;
Ritor1
parents:
diff changeset
733 v12 = (double)x;
Ritor1
parents:
diff changeset
734 local_0.uTextureID = v7;
Ritor1
parents:
diff changeset
735 v11 = (double)y;
Ritor1
parents:
diff changeset
736 do
Ritor1
parents:
diff changeset
737 {
Ritor1
parents:
diff changeset
738 v8 = pRnd->GetRandom();
Ritor1
parents:
diff changeset
739 local_0.x = v8 * 40.0 - 20.0 + v12;
Ritor1
parents:
diff changeset
740 v9 = pRnd->GetRandom();
Ritor1
parents:
diff changeset
741 z1 = (double)z;
Ritor1
parents:
diff changeset
742 local_0.z = z1;
Ritor1
parents:
diff changeset
743 local_0.y = v9 * 40.0 - 20.0 + v11;
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
744 local_0.r = pRnd->GetRandom() * 400.0 - 200.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
745 local_0.g = pRnd->GetRandom() * 400.0 - 200.0;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
746 local_0.b = pRnd->GetRandom() * 150.0 + 50.0;
0
Ritor1
parents:
diff changeset
747 pGame->pParticleEngine->AddParticle(&local_0);
Ritor1
parents:
diff changeset
748 --v6;
Ritor1
parents:
diff changeset
749 }
Ritor1
parents:
diff changeset
750 while ( v6 );
Ritor1
parents:
diff changeset
751 }
Ritor1
parents:
diff changeset
752
Ritor1
parents:
diff changeset
753 //----- (004A806F) --------------------------------------------------------
Ritor1
parents:
diff changeset
754 int stru6::_4A806F(Actor *pActor)
Ritor1
parents:
diff changeset
755 {
Ritor1
parents:
diff changeset
756 int v2; // ecx@1
Ritor1
parents:
diff changeset
757 unsigned int v3; // eax@1
Ritor1
parents:
diff changeset
758 double v4; // st7@2
Ritor1
parents:
diff changeset
759 float v5; // ST00_4@6
Ritor1
parents:
diff changeset
760
Ritor1
parents:
diff changeset
761 v2 = (int)pActor;
1954
730166317ed0 pActorBuffs[10] to pActorBuffs[ACTOR_BUFF_MASS_DISTORTION]
Grumpy7
parents: 1705
diff changeset
762 v3 = LODWORD(pActor->pActorBuffs[ACTOR_BUFF_MASS_DISTORTION].uExpireTime) - pMiscTimer->uTotalGameTimeElapsed;
0
Ritor1
parents:
diff changeset
763 if ( (signed int)v3 <= 64 )
Ritor1
parents:
diff changeset
764 {
Ritor1
parents:
diff changeset
765 if ( (v3 & 0x80000000u) != 0 )
Ritor1
parents:
diff changeset
766 {
1954
730166317ed0 pActorBuffs[10] to pActorBuffs[ACTOR_BUFF_MASS_DISTORTION]
Grumpy7
parents: 1705
diff changeset
767 pActor->pActorBuffs[ACTOR_BUFF_MASS_DISTORTION].uExpireTime = 0i64;
0
Ritor1
parents:
diff changeset
768 v4 = 1.0;
Ritor1
parents:
diff changeset
769 }
Ritor1
parents:
diff changeset
770 else
Ritor1
parents:
diff changeset
771 {
Ritor1
parents:
diff changeset
772 v2 = v3 * v3;
Ritor1
parents:
diff changeset
773 v4 = 1.0 - (double)(signed int)(v3 * v3) * 0.0001953125;
Ritor1
parents:
diff changeset
774 }
Ritor1
parents:
diff changeset
775 }
Ritor1
parents:
diff changeset
776 else
Ritor1
parents:
diff changeset
777 {
Ritor1
parents:
diff changeset
778 v2 = (v3 - 64) * (v3 - 64);
Ritor1
parents:
diff changeset
779 v4 = (double)v2 * 0.0001953125 + 0.2;
Ritor1
parents:
diff changeset
780 }
Ritor1
parents:
diff changeset
781 v5 = v4;
1029
c94d6a37d298 Pointing a face with mouse fixed.
Nomad
parents: 1016
diff changeset
782 return fixpoint_from_float(v5);
0
Ritor1
parents:
diff changeset
783 }
Ritor1
parents:
diff changeset
784
Ritor1
parents:
diff changeset
785 //----- (004A81CA) --------------------------------------------------------
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
786 bool stru6::_4A81CA(SpriteObject *a2)
0
Ritor1
parents:
diff changeset
787 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
788 //stru6 *v2; // ebx@1
0
Ritor1
parents:
diff changeset
789 int result; // eax@1
Ritor1
parents:
diff changeset
790 int v4; // eax@27
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
791 //unsigned int diffuse; // esi@41
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
792 //int v6; // ecx@49
0
Ritor1
parents:
diff changeset
793 int v7; // eax@54
Ritor1
parents:
diff changeset
794 int v8; // eax@55
Ritor1
parents:
diff changeset
795 char v9; // zf@56
Ritor1
parents:
diff changeset
796 int v10; // eax@59
Ritor1
parents:
diff changeset
797 int v11; // eax@61
Ritor1
parents:
diff changeset
798 int v12; // eax@85
Ritor1
parents:
diff changeset
799 int v13; // eax@86
Ritor1
parents:
diff changeset
800 int v14; // eax@96
Ritor1
parents:
diff changeset
801 int v15; // eax@111
Ritor1
parents:
diff changeset
802 int v16; // eax@118
Ritor1
parents:
diff changeset
803 int v17; // eax@139
Ritor1
parents:
diff changeset
804 int v18; // eax@140
Ritor1
parents:
diff changeset
805 int v19; // eax@141
Ritor1
parents:
diff changeset
806 int v20; // eax@151
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
807 //unsigned int v21; // [sp-8h] [bp-20h]@66
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
808 //SpriteObject *v22; // [sp-8h] [bp-20h]@81
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
809 //unsigned int v23; // [sp-4h] [bp-1Ch]@4
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
810 //unsigned int v24; // [sp-4h] [bp-1Ch]@5
0
Ritor1
parents:
diff changeset
811 unsigned int v25; // [sp-4h] [bp-1Ch]@30
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
812 //unsigned int v26; // [sp-4h] [bp-1Ch]@57
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
813 //unsigned int v27; // [sp-4h] [bp-1Ch]@66
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
814 //int v28; // [sp-4h] [bp-1Ch]@81
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
815 //unsigned int v29; // [sp+0h] [bp-18h]@4
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
816 //unsigned int v30; // [sp+0h] [bp-18h]@5
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
817 //int v31; // [sp+0h] [bp-18h]@30
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
818 //unsigned int v32; // [sp+0h] [bp-18h]@45
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
819 //float v33; // [sp+0h] [bp-18h]@57
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
820 //float v34; // [sp+0h] [bp-18h]@66
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
821 //signed int v35; // [sp+0h] [bp-18h]@81
0
Ritor1
parents:
diff changeset
822 char pContainer[7]; // [sp+10h] [bp-8h]@81
Ritor1
parents:
diff changeset
823
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
824 //__debugbreak(); // need to refactor carefully & collect data
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
825 //v2 = this;
515
cb0ad52d6a26 LayingItem -> SpriteObject (long-waited rename, old name was inaccurate and confused people)
Nomad
parents: 502
diff changeset
826 result = a2->uType;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
827
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
828 switch (a2->uType)
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
829 {
796
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
830 case 500: // blue rat bolt for example
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
831 case 530:
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
832 _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
833 return false;
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
834
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
835 case 510: // dragon fire for example
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
836 _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
837 return false;
14beae4f1723 Last observable issues with walking in dragon cave fixed.
Nomad
parents: 733
diff changeset
838
567
f51373466911 Pedestals hint string fixed
Nomad
parents: 564
diff changeset
839 case 545:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
840 case 550:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
841 case 555: return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
842
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
843 case 556:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
844 AddMobileLight(a2, 0xFF0000, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
845 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
846
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
847 case 600:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
848 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
849 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
850
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
851 case 1010: // Fire Bolt
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
852 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
853 _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
854 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
855 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
856 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
857
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
858 case 1011: // Fire Bolt impact
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
859 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
860 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
861 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
862 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
863 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
864
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
865 case 1050: // Fireball
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
866 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
867 _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
868 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
869 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
870 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
871
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
872 case 1051: // Fireball hit
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
873 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
874 AddMobileLight(a2, 0xFF3C1E, 256);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
875 //if (pRenderer->pRenderD3D)
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
876 {
848
ceef50611567 * AI fixed (temporary)
zipi
parents: 828
diff changeset
877 result = PID_TYPE(a2->spell_caster_pid);
828
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 822
diff changeset
878 if (PID_TYPE(a2->spell_caster_pid) != OBJECT_Actor &&
0f56abdcce94 Massive refactors of spells + PID (packed id) macros introduced.
Nomad
parents: 822
diff changeset
879 PID_TYPE(a2->spell_caster_pid) != OBJECT_Item)
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
880 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
881 if (field_204 != 4)
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
882 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
883 field_204++;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
884 _4A7688_fireball_collision_particle(a2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
885 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
886 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
887 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
888 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
889 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
890 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
891
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
892 case 1081:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
893 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
894 _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
895 _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
896 _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
897 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
898 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
899 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
900
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
901 case 2101:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
902 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
903 _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
904 AddMobileLight(a2, 0xC8C814, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
905 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
906 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
907
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
908 case 3060: // Acid Burst
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
909 _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
910 AddMobileLight(a2, 0x0AB450, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
911 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
912
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
913 case 9000: return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
914 }
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
915
567
f51373466911 Pedestals hint string fixed
Nomad
parents: 564
diff changeset
916 if ( result < 545 )
0
Ritor1
parents:
diff changeset
917 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1459
diff changeset
918 //__debugbreak(); // find out what kind of spells are these
1102
79010db96ade some spell fixes
zipi
parents: 1051
diff changeset
919 // when summoned light elemental attacks
1424
5930342f092b fall to the water
Ritor1
parents: 1390
diff changeset
920 //cast spell from trees in Avlee
0
Ritor1
parents:
diff changeset
921 result -= 500;
Ritor1
parents:
diff changeset
922 switch ( result )
Ritor1
parents:
diff changeset
923 {
Ritor1
parents:
diff changeset
924 case 1:
Ritor1
parents:
diff changeset
925 case 31:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
926 _4A75CC_single_spell_collision_particle(a2, 0xAAAFF, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
927 return true;
0
Ritor1
parents:
diff changeset
928 case 5:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
929 _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
930 return false;
0
Ritor1
parents:
diff changeset
931 case 15:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
932 _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
933 return false;
0
Ritor1
parents:
diff changeset
934 case 16:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
935 _4A75CC_single_spell_collision_particle(a2, 0x0062D0, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
936 return false;
0
Ritor1
parents:
diff changeset
937 case 20:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
938 _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
939 return false;
0
Ritor1
parents:
diff changeset
940 case 21:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
941 _4A75CC_single_spell_collision_particle(a2, 0x0AB450, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
942 return false;
0
Ritor1
parents:
diff changeset
943 case 25:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
944 _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
945 return false;
0
Ritor1
parents:
diff changeset
946 case 26:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
947 _4A75CC_single_spell_collision_particle(a2, 0xC8C805, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
948 return false;
0
Ritor1
parents:
diff changeset
949 case 35:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
950 _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
951 return false;
0
Ritor1
parents:
diff changeset
952 case 36:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
953 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
954 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
955
0
Ritor1
parents:
diff changeset
956 case 40:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
957 _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
958 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
959
0
Ritor1
parents:
diff changeset
960 case 11:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
961 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
962 return false;
0
Ritor1
parents:
diff changeset
963 case 6:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
964 _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
965 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
966
0
Ritor1
parents:
diff changeset
967 case 41:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
968 _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
969 return false;
0
Ritor1
parents:
diff changeset
970 default:
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
971 return false;
0
Ritor1
parents:
diff changeset
972 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
973 return false;
0
Ritor1
parents:
diff changeset
974 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
975
0
Ritor1
parents:
diff changeset
976 if ( result <= 4051 )
Ritor1
parents:
diff changeset
977 {
Ritor1
parents:
diff changeset
978 if ( result != 4051 )
Ritor1
parents:
diff changeset
979 {
Ritor1
parents:
diff changeset
980 if ( result <= 2031 )
Ritor1
parents:
diff changeset
981 {
Ritor1
parents:
diff changeset
982 if ( result != 2031 )
Ritor1
parents:
diff changeset
983 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
984 if ( result < 1051 )
0
Ritor1
parents:
diff changeset
985 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
986 if ( result < 600 )
0
Ritor1
parents:
diff changeset
987 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
988 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
989 return false;
0
Ritor1
parents:
diff changeset
990 }
Ritor1
parents:
diff changeset
991 if ( result < 811 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
992 return false;
0
Ritor1
parents:
diff changeset
993 if ( result <= 814 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
994 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
995 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
996
0
Ritor1
parents:
diff changeset
997 }
Ritor1
parents:
diff changeset
998 if ( result <= 1081 )
Ritor1
parents:
diff changeset
999 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1000 if (result != 1081)
0
Ritor1
parents:
diff changeset
1001 {
Ritor1
parents:
diff changeset
1002 result -= 1060;
Ritor1
parents:
diff changeset
1003 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1004 return true;
0
Ritor1
parents:
diff changeset
1005 v7 = result - 1;
Ritor1
parents:
diff changeset
1006 if ( v7 )
Ritor1
parents:
diff changeset
1007 {
Ritor1
parents:
diff changeset
1008 v8 = v7 - 9;
Ritor1
parents:
diff changeset
1009 if ( !v8 )
Ritor1
parents:
diff changeset
1010 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1011 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1012 return false;
0
Ritor1
parents:
diff changeset
1013 }
Ritor1
parents:
diff changeset
1014 result = v8 - 10;
Ritor1
parents:
diff changeset
1015 v9 = result == 0;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1016 //LABEL_129:
0
Ritor1
parents:
diff changeset
1017 if ( v9 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1018 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1019 return false;
0
Ritor1
parents:
diff changeset
1020 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1021 _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
1022 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1023 return false;
0
Ritor1
parents:
diff changeset
1024 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1025 //LABEL_84:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1026 // _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
1027 //goto LABEL_43;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1028 return false;
0
Ritor1
parents:
diff changeset
1029 }
Ritor1
parents:
diff changeset
1030 v10 = result - 1090;
Ritor1
parents:
diff changeset
1031 if ( v10 )
Ritor1
parents:
diff changeset
1032 {
Ritor1
parents:
diff changeset
1033 result = v10 - 10;
Ritor1
parents:
diff changeset
1034 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1035 return true;
0
Ritor1
parents:
diff changeset
1036 v11 = result - 1;
Ritor1
parents:
diff changeset
1037 if ( !v11 )
Ritor1
parents:
diff changeset
1038 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1039 //diffuse = 0xFF3C1E;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1040 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1041 //v32 = v2->uTextureID_effpar1;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1042 _4A75CC_single_spell_collision_particle(a2, 0xFF3C1E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1043 //goto LABEL_43;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1044 AddMobileLight(a2, 0xFF3C1E, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1045 return false;
0
Ritor1
parents:
diff changeset
1046 }
Ritor1
parents:
diff changeset
1047 result = v11 - 929;
Ritor1
parents:
diff changeset
1048 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1049 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1050 //LABEL_63:
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1051 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1052 // return true;
0
Ritor1
parents:
diff changeset
1053 _4A78AE_sparks_spell(a2);
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1054 AddMobileLight(a2, 0x64640F, 128);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1055 return false;
0
Ritor1
parents:
diff changeset
1056 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1057
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1058 _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
1059 return false;
0
Ritor1
parents:
diff changeset
1060 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1061 //goto LABEL_67;
0
Ritor1
parents:
diff changeset
1062 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1063 if ( result < 3060 )
0
Ritor1
parents:
diff changeset
1064 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1065 if ( result < 2101 )
0
Ritor1
parents:
diff changeset
1066 {
Ritor1
parents:
diff changeset
1067 if ( result != 2060 )
Ritor1
parents:
diff changeset
1068 {
Ritor1
parents:
diff changeset
1069 if ( result != 2061 )
Ritor1
parents:
diff changeset
1070 {
Ritor1
parents:
diff changeset
1071 if ( result <= 2079 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1072 return false;
0
Ritor1
parents:
diff changeset
1073 if ( result <= 2081 )
Ritor1
parents:
diff changeset
1074 {
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1075 //if ( pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1076 _4A77FD_implosion_particle_d3d(a2);
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1077 /*else
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1078 _4A80DC_implosion_particle_sw(a2);*/
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1079 return false;
0
Ritor1
parents:
diff changeset
1080 }
Ritor1
parents:
diff changeset
1081 v9 = result == 2100;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1082 if ( v9 )
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1083 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1084 return false;
0
Ritor1
parents:
diff changeset
1085 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1086 _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
1087 AddMobileLight(a2, 0xC8C814, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1088 return false;
0
Ritor1
parents:
diff changeset
1089 }
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1090 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1091 // return true;
0
Ritor1
parents:
diff changeset
1092 memcpy(pContainer, "sp18h1", 7);
Ritor1
parents:
diff changeset
1093 pRnd->SetRange(1, 6);
Ritor1
parents:
diff changeset
1094 pContainer[5] = pRnd->GetInRange() + '0';
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1095 AddProjectile(a2, 100, pBitmaps_LOD->LoadTexture(pContainer));
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1096 return false;
0
Ritor1
parents:
diff changeset
1097 }
Ritor1
parents:
diff changeset
1098 v12 = result - 3010;
Ritor1
parents:
diff changeset
1099 if ( !v12 )
Ritor1
parents:
diff changeset
1100 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1101 _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
1102 AddMobileLight(a2, 0xAB450, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1103 return false;
0
Ritor1
parents:
diff changeset
1104 }
Ritor1
parents:
diff changeset
1105 v13 = v12 - 1;
Ritor1
parents:
diff changeset
1106 if ( !v13 )
Ritor1
parents:
diff changeset
1107 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1108 _4A75CC_single_spell_collision_particle(a2, 0xAB450, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1109 AddMobileLight(a2, 0xAB450, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1110 return false;
0
Ritor1
parents:
diff changeset
1111 }
Ritor1
parents:
diff changeset
1112 result = v13 - 19;
Ritor1
parents:
diff changeset
1113 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1114 return true;
0
Ritor1
parents:
diff changeset
1115 --result;
Ritor1
parents:
diff changeset
1116 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1117 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1118
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1119 _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1120 AddMobileLight(a2, 0x9EB9F1, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1121 return false;
0
Ritor1
parents:
diff changeset
1122 }
Ritor1
parents:
diff changeset
1123 if ( result > 4000 )
Ritor1
parents:
diff changeset
1124 {
Ritor1
parents:
diff changeset
1125 result -= 4030;
Ritor1
parents:
diff changeset
1126 if ( !result || (--result, !result) )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1127 return true;
0
Ritor1
parents:
diff changeset
1128 result -= 19;
Ritor1
parents:
diff changeset
1129 v9 = result == 0;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1130 if ( v9 )
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1131 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1132 return false;
0
Ritor1
parents:
diff changeset
1133 }
Ritor1
parents:
diff changeset
1134 if ( result == 4000 )
Ritor1
parents:
diff changeset
1135 {
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1136 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1137 // return true;
0
Ritor1
parents:
diff changeset
1138 _4A7C07(a2);
564
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 result -= 3061;
Ritor1
parents:
diff changeset
1142 if ( !result || (result -= 29) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1143 return true;
0
Ritor1
parents:
diff changeset
1144 v14 = result - 1;
Ritor1
parents:
diff changeset
1145 if ( !v14 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1146 {
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1147 _4A75CC_single_spell_collision_particle(a2, 0x9EB9F1, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1148 AddMobileLight(a2, 0x9EB9F1, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1149 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1150 }
0
Ritor1
parents:
diff changeset
1151 result = v14 - 1;
Ritor1
parents:
diff changeset
1152 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1153 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1154 _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
1155 return false;
0
Ritor1
parents:
diff changeset
1156 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1157 _4A7948_mind_blast_after_effect(a2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1158 return false;
0
Ritor1
parents:
diff changeset
1159 }
Ritor1
parents:
diff changeset
1160 if ( result <= 7090 )
Ritor1
parents:
diff changeset
1161 {
Ritor1
parents:
diff changeset
1162 if ( result == 7090 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1163 return true;
0
Ritor1
parents:
diff changeset
1164 if ( result > 6030 )
Ritor1
parents:
diff changeset
1165 {
Ritor1
parents:
diff changeset
1166 if ( result > 6091 )
Ritor1
parents:
diff changeset
1167 {
Ritor1
parents:
diff changeset
1168 result -= 6100;
Ritor1
parents:
diff changeset
1169 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1170 return true;
0
Ritor1
parents:
diff changeset
1171 result -= 930;
Ritor1
parents:
diff changeset
1172 if ( result )
Ritor1
parents:
diff changeset
1173 {
Ritor1
parents:
diff changeset
1174 --result;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1175 if (!result)
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1176 _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1177 return false;
0
Ritor1
parents:
diff changeset
1178 }
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1179 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1180 // return true;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1181 _4A78AE_sparks_spell(a2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1182 AddMobileLight(a2, 0x64640F, 128);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1183 return false;
0
Ritor1
parents:
diff changeset
1184 }
Ritor1
parents:
diff changeset
1185 if ( result != 6091 )
Ritor1
parents:
diff changeset
1186 {
Ritor1
parents:
diff changeset
1187 result -= 6040;
Ritor1
parents:
diff changeset
1188 if ( !result || (result -= 20) == 0 || (result -= 10) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1189 return true;
0
Ritor1
parents:
diff changeset
1190 result -= 20;
Ritor1
parents:
diff changeset
1191 v9 = result == 0;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1192 if ( v9 )
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1193 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1194 return false;
0
Ritor1
parents:
diff changeset
1195 }
Ritor1
parents:
diff changeset
1196 }
Ritor1
parents:
diff changeset
1197 else
Ritor1
parents:
diff changeset
1198 {
Ritor1
parents:
diff changeset
1199 if ( result == 6030 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1200 return true;
0
Ritor1
parents:
diff changeset
1201 if ( result <= 4091 )
Ritor1
parents:
diff changeset
1202 {
Ritor1
parents:
diff changeset
1203 if ( result != 4091 )
Ritor1
parents:
diff changeset
1204 {
Ritor1
parents:
diff changeset
1205 result -= 4070;
Ritor1
parents:
diff changeset
1206 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1207 return true;
0
Ritor1
parents:
diff changeset
1208 v15 = result - 1;
Ritor1
parents:
diff changeset
1209 if ( v15 )
Ritor1
parents:
diff changeset
1210 {
Ritor1
parents:
diff changeset
1211 result = v15 - 9;
Ritor1
parents:
diff changeset
1212 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1213 return true;
0
Ritor1
parents:
diff changeset
1214 result -= 10;
Ritor1
parents:
diff changeset
1215 if ( !result )
Ritor1
parents:
diff changeset
1216 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1217 _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
1218 return true;
0
Ritor1
parents:
diff changeset
1219 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1220 return false;
0
Ritor1
parents:
diff changeset
1221 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1222 _4A75CC_single_spell_collision_particle(a2, 0x5C310E, uTextureID_effpar1);
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 _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
1226 return false;
0
Ritor1
parents:
diff changeset
1227 }
Ritor1
parents:
diff changeset
1228 v16 = result - 4092;
Ritor1
parents:
diff changeset
1229 if ( !v16 )
Ritor1
parents:
diff changeset
1230 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1231 _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
1232 return false;
0
Ritor1
parents:
diff changeset
1233 }
Ritor1
parents:
diff changeset
1234 result = v16 - 8;
Ritor1
parents:
diff changeset
1235 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1236 return false;
0
Ritor1
parents:
diff changeset
1237 result -= 1910;
Ritor1
parents:
diff changeset
1238 if ( !result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1239 return true;
0
Ritor1
parents:
diff changeset
1240 --result;
Ritor1
parents:
diff changeset
1241 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1242 return false;
0
Ritor1
parents:
diff changeset
1243 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1244 //LABEL_122:
0
Ritor1
parents:
diff changeset
1245 _4A7948_mind_blast_after_effect(a2);
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1246 return false;
0
Ritor1
parents:
diff changeset
1247 }
Ritor1
parents:
diff changeset
1248 if ( result <= 9000 )
Ritor1
parents:
diff changeset
1249 {
Ritor1
parents:
diff changeset
1250 if ( result <= 8030 )
Ritor1
parents:
diff changeset
1251 {
Ritor1
parents:
diff changeset
1252 if ( result == 8030 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1253 return true;
0
Ritor1
parents:
diff changeset
1254 v17 = result - 7091;
Ritor1
parents:
diff changeset
1255 if ( v17 )
Ritor1
parents:
diff changeset
1256 {
Ritor1
parents:
diff changeset
1257 v18 = v17 - 909;
Ritor1
parents:
diff changeset
1258 if ( !v18 )
Ritor1
parents:
diff changeset
1259 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1260 _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
1261 AddMobileLight(a2, 0xFFFFFF, 128);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1262 return false;
0
Ritor1
parents:
diff changeset
1263 }
Ritor1
parents:
diff changeset
1264 v19 = v18 - 1;
Ritor1
parents:
diff changeset
1265 if ( v19 )
Ritor1
parents:
diff changeset
1266 {
Ritor1
parents:
diff changeset
1267 result = v19 - 9;
Ritor1
parents:
diff changeset
1268 if ( !result )
Ritor1
parents:
diff changeset
1269 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1270 AddMobileLight(a2, 0xFFFFFF, 64);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1271 return false;
0
Ritor1
parents:
diff changeset
1272 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1273 return false;
0
Ritor1
parents:
diff changeset
1274 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1275 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar2);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1276 AddMobileLight(a2, 0xFFFFFF, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1277 return false;
0
Ritor1
parents:
diff changeset
1278 }
Ritor1
parents:
diff changeset
1279 else
Ritor1
parents:
diff changeset
1280 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1281 _4A75CC_single_spell_collision_particle(a2, 0xF00000, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1282 AddMobileLight(a2, 0xF00000, 256);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1283 return false;
0
Ritor1
parents:
diff changeset
1284 }
Ritor1
parents:
diff changeset
1285 }
Ritor1
parents:
diff changeset
1286 result -= 8040;
Ritor1
parents:
diff changeset
1287 if ( !result || (result -= 20) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1288 return true;
0
Ritor1
parents:
diff changeset
1289 v20 = result - 30;
Ritor1
parents:
diff changeset
1290 if ( v20 )
Ritor1
parents:
diff changeset
1291 {
Ritor1
parents:
diff changeset
1292 result = v20 - 1;
Ritor1
parents:
diff changeset
1293 if ( result )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1294 return false;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1295
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1296 _4A75CC_single_spell_collision_particle(a2, 0xFFFFFF, uTextureID_effpar3);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1297 return false;
0
Ritor1
parents:
diff changeset
1298 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1299 AddMobileLight(a2, 0xFFFFFFu, 128);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1300 //if ( !pRenderer->pRenderD3D )
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1301 // return true;
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1302 AddProjectile(a2, 100, -1);
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 if ( result > 9050 )
Ritor1
parents:
diff changeset
1306 {
Ritor1
parents:
diff changeset
1307 result -= 9070;
Ritor1
parents:
diff changeset
1308 if ( !result || (result -= 10) == 0 || (--result, !result) )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1309 return true;
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1310 return false;
0
Ritor1
parents:
diff changeset
1311 }
Ritor1
parents:
diff changeset
1312 if ( result == 9050 || (result -= 9010) == 0 || (result -= 20) == 0 || (result -= 10) == 0 )
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1313 return true;
0
Ritor1
parents:
diff changeset
1314 --result;
Ritor1
parents:
diff changeset
1315 if ( !result )
Ritor1
parents:
diff changeset
1316 {
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1317 //LABEL_164:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1318 _4A75CC_single_spell_collision_particle(a2, 0x7E7E7E, uTextureID_effpar1);
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1319 return false;
0
Ritor1
parents:
diff changeset
1320 }
564
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1321 //LABEL_168:
8b77231088d8 Moon Temple doesn't crash
Nomad
parents: 515
diff changeset
1322 return false;
0
Ritor1
parents:
diff changeset
1323 }
Ritor1
parents:
diff changeset
1324
Ritor1
parents:
diff changeset
1325 //----- (004A89BD) --------------------------------------------------------
486
Nomad
parents: 430
diff changeset
1326 void stru6::SetPlayerBuffAnim(unsigned __int16 uSpellID, unsigned __int16 uPlayerID)
0
Ritor1
parents:
diff changeset
1327 {
486
Nomad
parents: 430
diff changeset
1328 //stru6 *v3; // edi@1
0
Ritor1
parents:
diff changeset
1329 PlayerBuffAnim *v4; // esi@1
Ritor1
parents:
diff changeset
1330 const char *v6; // [sp-4h] [bp-10h]@2
Ritor1
parents:
diff changeset
1331
486
Nomad
parents: 430
diff changeset
1332 v4 = &pPlayerBuffs[uPlayerID];
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1333 v4->uSpellAnimTimeElapsed = 0;
486
Nomad
parents: 430
diff changeset
1334 v4->bRender = uSpellID != 0;
Nomad
parents: 430
diff changeset
1335
Nomad
parents: 430
diff changeset
1336 switch (uSpellID)
0
Ritor1
parents:
diff changeset
1337 {
920
34ed2d5e7cfb MagicShopDialog clean and other
Ritor1
parents: 900
diff changeset
1338 case SPELL_DISEASE:
0
Ritor1
parents:
diff changeset
1339 v6 = "zapp";
486
Nomad
parents: 430
diff changeset
1340 break;
Nomad
parents: 430
diff changeset
1341
495
90fdb47bfcba guilds ...
Gloval
parents: 491
diff changeset
1342 case BECOME_MAGIC_GUILD_MEMBER:
0
Ritor1
parents:
diff changeset
1343 case SPELL_AIR_FEATHER_FALL:
Ritor1
parents:
diff changeset
1344 case SPELL_SPIRIT_DETECT_LIFE:
486
Nomad
parents: 430
diff changeset
1345 case SPELL_SPIRIT_FATE:
0
Ritor1
parents:
diff changeset
1346 v6 = "spboost1";
486
Nomad
parents: 430
diff changeset
1347 break;
Nomad
parents: 430
diff changeset
1348
501
6fa3ff8ef729 SubtractVariables
Ritor1
parents: 491
diff changeset
1349 case SPELL_QUEST_COMPLETED:
486
Nomad
parents: 430
diff changeset
1350 case SPELL_AIR_INVISIBILITY:
0
Ritor1
parents:
diff changeset
1351 case SPELL_WATER_WATER_WALK:
486
Nomad
parents: 430
diff changeset
1352 case SPELL_SPIRIT_PRESERVATION:
0
Ritor1
parents:
diff changeset
1353 v6 = "spboost2";
486
Nomad
parents: 430
diff changeset
1354 break;
Nomad
parents: 430
diff changeset
1355
488
Nomad
parents: 486
diff changeset
1356 case SPELL_152:
486
Nomad
parents: 430
diff changeset
1357 __debugbreak(); // spell id == 152 wtf
Nomad
parents: 430
diff changeset
1358 case SPELL_LIGHT_HOUR_OF_POWER:
Nomad
parents: 430
diff changeset
1359 case SPELL_LIGHT_DAY_OF_THE_GODS:
Nomad
parents: 430
diff changeset
1360 case SPELL_LIGHT_DAY_OF_PROTECTION:
Nomad
parents: 430
diff changeset
1361 case SPELL_LIGHT_DIVINE_INTERVENTION:
0
Ritor1
parents:
diff changeset
1362 v6 = "spboost3";
486
Nomad
parents: 430
diff changeset
1363 break;
Nomad
parents: 430
diff changeset
1364
Nomad
parents: 430
diff changeset
1365 case SPELL_SPIRIT_REMOVE_CURSE:
0
Ritor1
parents:
diff changeset
1366 case SPELL_MIND_REMOVE_FEAR:
Ritor1
parents:
diff changeset
1367 case SPELL_BODY_CURE_WEAKNESS:
Ritor1
parents:
diff changeset
1368 v6 = "spheal1";
486
Nomad
parents: 430
diff changeset
1369 break;
Nomad
parents: 430
diff changeset
1370
Nomad
parents: 430
diff changeset
1371 case SPELL_SPIRIT_SHARED_LIFE:
0
Ritor1
parents:
diff changeset
1372 case SPELL_MIND_CURE_PARALYSIS:
486
Nomad
parents: 430
diff changeset
1373 case SPELL_MIND_CURE_INSANITY:
0
Ritor1
parents:
diff changeset
1374 case SPELL_BODY_FIRST_AID:
Ritor1
parents:
diff changeset
1375 case SPELL_BODY_CURE_POISON:
Ritor1
parents:
diff changeset
1376 case SPELL_BODY_CURE_DISEASE:
486
Nomad
parents: 430
diff changeset
1377 case SPELL_DARK_SACRIFICE:
0
Ritor1
parents:
diff changeset
1378 v6 = "spheal2";
486
Nomad
parents: 430
diff changeset
1379 break;
Nomad
parents: 430
diff changeset
1380
Nomad
parents: 430
diff changeset
1381 case SPELL_BODY_POWER_CURE:
Nomad
parents: 430
diff changeset
1382 case SPELL_DARK_SOULDRINKER:
0
Ritor1
parents:
diff changeset
1383 v6 = "spheal3";
486
Nomad
parents: 430
diff changeset
1384 break;
Nomad
parents: 430
diff changeset
1385
0
Ritor1
parents:
diff changeset
1386 case SPELL_FIRE_PROTECTION_FROM_FIRE:
486
Nomad
parents: 430
diff changeset
1387 case SPELL_FIRE_IMMOLATION:
0
Ritor1
parents:
diff changeset
1388 v6 = "spell03";
486
Nomad
parents: 430
diff changeset
1389 break;
Nomad
parents: 430
diff changeset
1390
Nomad
parents: 430
diff changeset
1391 case SPELL_FIRE_HASTE: v6 = "spell05"; break;
Nomad
parents: 430
diff changeset
1392 case SPELL_AIR_PROTECTION_FROM_AIR: v6 = "spell14"; break;
Nomad
parents: 430
diff changeset
1393 case SPELL_AIR_SHIELD: v6 = "spell17"; break;
Nomad
parents: 430
diff changeset
1394 case SPELL_WATER_PROTECTION_FROM_WATER: v6 = "spell25"; break;
Nomad
parents: 430
diff changeset
1395 case SPELL_EARTH_PROTECTION_FROM_EARTH: v6 = "spell36"; break;
Nomad
parents: 430
diff changeset
1396 case SPELL_EARTH_STONESKIN: v6 = "spell38"; break;
Nomad
parents: 430
diff changeset
1397 case SPELL_SPIRIT_BLESS: v6 = "spell46"; break;
Nomad
parents: 430
diff changeset
1398 case SPELL_SPIRIT_HEROISM: v6 = "spell51"; break;
Nomad
parents: 430
diff changeset
1399 case SPELL_SPIRIT_RESSURECTION: v6 = "spell55"; break;
Nomad
parents: 430
diff changeset
1400 case SPELL_MIND_PROTECTION_FROM_MIND: v6 = "spell58"; break;
Nomad
parents: 430
diff changeset
1401 case SPELL_BODY_PROTECTION_FROM_BODY: v6 = "spell69"; break;
Nomad
parents: 430
diff changeset
1402 case SPELL_BODY_REGENERATION: v6 = "spell71"; break;
Nomad
parents: 430
diff changeset
1403 case SPELL_BODY_HAMMERHANDS: v6 = "spell73"; break;
Nomad
parents: 430
diff changeset
1404 case SPELL_BODY_PROTECTION_FROM_MAGIC: v6 = "spell75"; break;
Nomad
parents: 430
diff changeset
1405
0
Ritor1
parents:
diff changeset
1406 default:
486
Nomad
parents: 430
diff changeset
1407 v4->bRender = false;
Nomad
parents: 430
diff changeset
1408 return;
0
Ritor1
parents:
diff changeset
1409 }
486
Nomad
parents: 430
diff changeset
1410
Nomad
parents: 430
diff changeset
1411 v4->uSpellIconID = pIconsFrameTable->FindIcon(v6);
Nomad
parents: 430
diff changeset
1412 if (v4->bRender)
Nomad
parents: 430
diff changeset
1413 v4->uSpellAnimTime = 8 * pIconsFrameTable->pIcons[v4->uSpellIconID].uAnimLength;
0
Ritor1
parents:
diff changeset
1414 }
Ritor1
parents:
diff changeset
1415
Ritor1
parents:
diff changeset
1416 //----- (004A8BDF) --------------------------------------------------------
Ritor1
parents:
diff changeset
1417 void stru6::FadeScreen__like_Turn_Undead_and_mb_Armageddon(unsigned int uDiffuseColor, unsigned int uFadeTime)
Ritor1
parents:
diff changeset
1418 {
Ritor1
parents:
diff changeset
1419 this->uFadeTime = uFadeTime;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1420 this->uFadeLength = uFadeTime;
0
Ritor1
parents:
diff changeset
1421 this->uFadeColor = uDiffuseColor;
Ritor1
parents:
diff changeset
1422 }
Ritor1
parents:
diff changeset
1423
Ritor1
parents:
diff changeset
1424 //----- (004A8BFC) --------------------------------------------------------
Ritor1
parents:
diff changeset
1425 int stru6::_4A8BFC()
Ritor1
parents:
diff changeset
1426 {
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1427 uAnimLength = 8 * pSpriteFrameTable->pSpriteSFrames[pSpriteFrameTable->FastFindSprite("spell84")].uAnimLength;
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1428 return uAnimLength;
0
Ritor1
parents:
diff changeset
1429 }
Ritor1
parents:
diff changeset
1430
Ritor1
parents:
diff changeset
1431 //----- (004A8C27) --------------------------------------------------------
Ritor1
parents:
diff changeset
1432 void stru6::RenderSpecialEffects()
Ritor1
parents:
diff changeset
1433 {
Ritor1
parents:
diff changeset
1434 double v4; // st7@4
Ritor1
parents:
diff changeset
1435 double v5; // st6@4
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1436 //double v6; // st7@4
0
Ritor1
parents:
diff changeset
1437 float v7; // ST14_4@6
Ritor1
parents:
diff changeset
1438 unsigned int v8; // ST14_4@8
Ritor1
parents:
diff changeset
1439 unsigned int v9; // eax@8
Ritor1
parents:
diff changeset
1440 SpriteFrame *v10; // eax@8
Ritor1
parents:
diff changeset
1441 int v11; // edi@8
Ritor1
parents:
diff changeset
1442 double v12; // st7@9
Ritor1
parents:
diff changeset
1443 double v13; // st7@9
Ritor1
parents:
diff changeset
1444 double v14; // st7@9
Ritor1
parents:
diff changeset
1445 double v15; // st6@9
Ritor1
parents:
diff changeset
1446 HRESULT v16; // eax@9
Ritor1
parents:
diff changeset
1447 HRESULT v17; // eax@9
Ritor1
parents:
diff changeset
1448 signed __int64 v18; // qtt@10
Ritor1
parents:
diff changeset
1449 const char *v19; // [sp+4h] [bp-E8h]@0
Ritor1
parents:
diff changeset
1450 int v20; // [sp+8h] [bp-E4h]@0
Ritor1
parents:
diff changeset
1451 unsigned int v21; // [sp+Ch] [bp-E0h]@0
Ritor1
parents:
diff changeset
1452 RenderVertexD3D3 vd3d[4]; // [sp+60h] [bp-8Ch]@9
Ritor1
parents:
diff changeset
1453 int v24; // [sp+E0h] [bp-Ch]@10
Ritor1
parents:
diff changeset
1454 SpriteFrame *v70; // [sp+E4h] [bp-8h]@8
Ritor1
parents:
diff changeset
1455 unsigned int v26; // [sp+E8h] [bp-4h]@3
Ritor1
parents:
diff changeset
1456
Ritor1
parents:
diff changeset
1457 if (uNumProjectiles)
Ritor1
parents:
diff changeset
1458 {
Ritor1
parents:
diff changeset
1459 DrawProjectiles();
Ritor1
parents:
diff changeset
1460 uNumProjectiles = 0;
Ritor1
parents:
diff changeset
1461 }
Ritor1
parents:
diff changeset
1462
Ritor1
parents:
diff changeset
1463 field_204 = 0;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1464 if ( uFadeTime > 0 )
0
Ritor1
parents:
diff changeset
1465 {
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1466 v4 = (double)uFadeTime / (double)uFadeLength;
0
Ritor1
parents:
diff changeset
1467 v5 = 1.0 - v4 * v4;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1468 //v6 = v5;
0
Ritor1
parents:
diff changeset
1469 if ( v5 > 0.9 )
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1470 v5 = 1.0 - (v5 - 0.9) * 10.0;
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1471 v7 = v5;
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1472 pRenderer->ScreenFade(uFadeColor, v7);
0
Ritor1
parents:
diff changeset
1473 uFadeTime -= pEventTimer->uTimeElapsed;
Ritor1
parents:
diff changeset
1474 }
Ritor1
parents:
diff changeset
1475
Ritor1
parents:
diff changeset
1476 if (uAnimLength > 0)
Ritor1
parents:
diff changeset
1477 {
Ritor1
parents:
diff changeset
1478 v8 = 8
Ritor1
parents:
diff changeset
1479 * pSpriteFrameTable->pSpriteSFrames[pSpriteFrameTable->FastFindSprite("spell84")].uAnimLength
Ritor1
parents:
diff changeset
1480 - uAnimLength;
Ritor1
parents:
diff changeset
1481 v9 = pSpriteFrameTable->FastFindSprite("spell84");
Ritor1
parents:
diff changeset
1482 v10 = pSpriteFrameTable->GetFrame(v9, v8);
Ritor1
parents:
diff changeset
1483 v11 = v10->pHwSpriteIDs[0];
Ritor1
parents:
diff changeset
1484 v70 = v10;
Ritor1
parents:
diff changeset
1485 uAnimLength -= pEventTimer->uTimeElapsed;
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1486 //if ( pRenderer->pRenderD3D )
0
Ritor1
parents:
diff changeset
1487 {
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1488 v12 = (double)(signed int)pViewport->uViewportTL_X;
0
Ritor1
parents:
diff changeset
1489 vd3d[0].pos.x = v12;
Ritor1
parents:
diff changeset
1490 vd3d[1].pos.x = v12;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1491 v13 = (double)(signed int)pViewport->uViewportBR_X;
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1492 v26 = pViewport->uViewportBR_Y + 1;
0
Ritor1
parents:
diff changeset
1493 vd3d[0].diffuse = 0x7F7F7Fu;
Ritor1
parents:
diff changeset
1494 vd3d[1].diffuse = 0x7F7F7Fu;
Ritor1
parents:
diff changeset
1495 vd3d[2].pos.x = v13;
Ritor1
parents:
diff changeset
1496 vd3d[3].pos.x = v13;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1497 v14 = (double)(signed int)pViewport->uViewportTL_Y;
0
Ritor1
parents:
diff changeset
1498 vd3d[2].diffuse = 0x7F7F7Fu;
Ritor1
parents:
diff changeset
1499 vd3d[3].diffuse = 0x7F7F7Fu;
Ritor1
parents:
diff changeset
1500 vd3d[0].specular = 0;
Ritor1
parents:
diff changeset
1501 vd3d[1].specular = 0;
Ritor1
parents:
diff changeset
1502 vd3d[0].pos.y = v14;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1503 v15 = (double)(pViewport->uViewportBR_Y + 1);
0
Ritor1
parents:
diff changeset
1504 vd3d[2].specular = 0;
Ritor1
parents:
diff changeset
1505 vd3d[3].specular = 0;
Ritor1
parents:
diff changeset
1506 vd3d[1].pos.y = v15;
Ritor1
parents:
diff changeset
1507 vd3d[2].pos.y = v15;
Ritor1
parents:
diff changeset
1508 vd3d[3].pos.y = v14;
Ritor1
parents:
diff changeset
1509 vd3d[0].pos.z = 0.0;
Ritor1
parents:
diff changeset
1510 vd3d[1].pos.z = 0.0;
Ritor1
parents:
diff changeset
1511 vd3d[2].pos.z = 0.0;
Ritor1
parents:
diff changeset
1512 vd3d[3].pos.z = 0.0;
Ritor1
parents:
diff changeset
1513 vd3d[0].rhw = 1.0;
Ritor1
parents:
diff changeset
1514 vd3d[1].rhw = 1.0;
Ritor1
parents:
diff changeset
1515 vd3d[2].rhw = 1.0;
Ritor1
parents:
diff changeset
1516 vd3d[3].rhw = 1.0;
Ritor1
parents:
diff changeset
1517 vd3d[0].texcoord.x = 0.0;
Ritor1
parents:
diff changeset
1518 vd3d[1].texcoord.x = 0.0;
Ritor1
parents:
diff changeset
1519 vd3d[2].texcoord.x = 1.0;
Ritor1
parents:
diff changeset
1520 vd3d[3].texcoord.x = 1.0;
Ritor1
parents:
diff changeset
1521 vd3d[0].texcoord.y = 0.0;
Ritor1
parents:
diff changeset
1522 vd3d[1].texcoord.y = 1.0;
Ritor1
parents:
diff changeset
1523 vd3d[2].texcoord.y = 1.0;
Ritor1
parents:
diff changeset
1524 vd3d[3].texcoord.y = 0.0;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1525
0a1438c16c2b Render decoupling.
Nomad
parents: 2154
diff changeset
1526 pRenderer->DrawSpecialEffectsQuad(vd3d, pSprites_LOD->pHardwareSprites[v11].pTexture);
0
Ritor1
parents:
diff changeset
1527 }
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1528 /*else
0
Ritor1
parents:
diff changeset
1529 {
Ritor1
parents:
diff changeset
1530 vsr.pTarget = pRenderer->pTargetSurface;
2002
2e6c63bdcfa9 RenderBillboardD3D initialization
zipi
parents: 1980
diff changeset
1531 vsr.sParentBillboardID = -1;
0
Ritor1
parents:
diff changeset
1532 vsr.pTargetZ = pRenderer->pActiveZBuffer;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1533 vsr.uScreenSpaceX = (signed int)(pViewport->uViewportBR_X - pViewport->uViewportTL_X) / 2;
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1534 vsr.uScreenSpaceY = pViewport->uViewportBR_Y;
0
Ritor1
parents:
diff changeset
1535 v24 = 16777216;
Ritor1
parents:
diff changeset
1536 LODWORD(v18) = 0;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1537 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
1538 vsr._screenspace_x_scaler_packedfloat = v18 / 0x1000000;
0
Ritor1
parents:
diff changeset
1539 LODWORD(v18) = 0;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1540 HIDWORD(v18) = (signed __int16)(LOWORD(pViewport->uViewportBR_Y) - LOWORD(pViewport->uViewportTL_Y));
0
Ritor1
parents:
diff changeset
1541 v26 = v18 / 16777216;
144
8ab4484c22e0 Billboard drawing's up (actors, decorations, misc sprites)
Nomad
parents: 142
diff changeset
1542 vsr._screenspace_y_scaler_packedfloat = v18 / 0x1000000;
0
Ritor1
parents:
diff changeset
1543 vsr.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v70->uPaletteIndex, 0, 1);
Ritor1
parents:
diff changeset
1544 vsr.uTargetPitch = pRenderer->uTargetSurfacePitch;
2002
2e6c63bdcfa9 RenderBillboardD3D initialization
zipi
parents: 1980
diff changeset
1545 vsr.sParentBillboardID = -1;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1546 vsr.uViewportX = pViewport->uViewportTL_X;
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1547 vsr.uViewportZ = pViewport->uViewportBR_X;
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1548 vsr.uViewportY = pViewport->uViewportTL_Y;
0
Ritor1
parents:
diff changeset
1549 vsr.sZValue = 0;
693
e0a1fccc89b1 map render fixes
Gloval
parents: 619
diff changeset
1550 vsr.uViewportW = pViewport->uViewportBR_Y;
0
Ritor1
parents:
diff changeset
1551 vsr.uFlags = 0;
Ritor1
parents:
diff changeset
1552 if ( v11 >= 0 )
733
700b58aac975 MonsterPopup preview doll fixed
Nomad
parents: 719
diff changeset
1553 pSprites_LOD->pSpriteHeaders[v11].DrawSprite_sw(&vsr, 1);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2152
diff changeset
1554 }*/
0
Ritor1
parents:
diff changeset
1555 }
Ritor1
parents:
diff changeset
1556 }
Ritor1
parents:
diff changeset
1557
Ritor1
parents:
diff changeset
1558 //----- (004A902A) --------------------------------------------------------
Ritor1
parents:
diff changeset
1559 void stru6::DrawPlayerBuffAnims()
Ritor1
parents:
diff changeset
1560 {
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1561 for (uint i = 0; i < 4; ++i)
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1562 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1954
diff changeset
1563 PlayerBuffAnim* buff = &pPlayerBuffs[i];
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1564 if (!buff->bRender)
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1565 continue;
0
Ritor1
parents:
diff changeset
1566
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1567 buff->uSpellAnimTimeElapsed += pEventTimer->uTimeElapsed;
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1568 if (buff->uSpellAnimTimeElapsed >= buff->uSpellAnimTime)
0
Ritor1
parents:
diff changeset
1569 {
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1570 buff->bRender = false;
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1571 continue;
0
Ritor1
parents:
diff changeset
1572 }
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1573
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1954
diff changeset
1574 IconFrame* icon = pIconsFrameTable->GetFrame(buff->uSpellIconID, buff->uSpellAnimTimeElapsed);
491
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1575 pRenderer->DrawTextureTransparent(pPlayerPortraitsXCoords_For_PlayerBuffAnimsDrawing[i], 385, pIcons_LOD->GetTexture(icon->uTextureID));
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1576
e01730a207c3 Spell animations on portraits drawn when casting
Nomad
parents: 488
diff changeset
1577 pOtherOverlayList->bRedraw = true;
0
Ritor1
parents:
diff changeset
1578 }
Ritor1
parents:
diff changeset
1579 }
Ritor1
parents:
diff changeset
1580
Ritor1
parents:
diff changeset
1581 //----- (004A90A0) --------------------------------------------------------
Ritor1
parents:
diff changeset
1582 void stru6::LoadAnimations()
Ritor1
parents:
diff changeset
1583 {
Ritor1
parents:
diff changeset
1584 uTextureID_effpar1 = pBitmaps_LOD->LoadTexture("effpar01", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
1585 uTextureID_effpar2 = pBitmaps_LOD->LoadTexture("effpar02", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
1586 uTextureID_effpar3 = pBitmaps_LOD->LoadTexture("effpar03", TEXTURE_DEFAULT);
Ritor1
parents:
diff changeset
1587 uSpriteID_sp57c = pSprites_LOD->LoadSprite("sp57c", 6);
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1588
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1589 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("zapp"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1590 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal1"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1591 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal2"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1592 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spheal3"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1593 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost1"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1594 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost2"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1595 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spboost3"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1596 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell03"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1597 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell05"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1598 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell14"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1599 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell17"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1600 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell21"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1601 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell25"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1602 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell27"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1603 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell36"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1604 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell38"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1605 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell46"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1606 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell51"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1607 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell55"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1608 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell58"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1609 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell69"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1610 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell71"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1611 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell73"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1612 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell75"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1613 pIconsFrameTable->InitializeAnimation(pIconsFrameTable->FindIcon("spell96"));
0
Ritor1
parents:
diff changeset
1614
1390
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1615 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell01"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1616 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell02"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1617 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell03"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1618 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell09"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1619 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell11"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1620 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell18"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1621 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell22"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1622 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell26"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1623 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell29"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1624 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell39"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1625 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell39c"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1626 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell41"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1627 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell57c"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1628 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell62"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1629 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell65"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1630 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell66"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1631 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell70"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1632 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell76"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1633 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell84"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1634 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell90"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1635 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell92"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1636 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell93"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1637 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1638 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97c"));
613c77e51e38 Messed with spell effects drawing a bit.
Nomad
parents: 1262
diff changeset
1639 pSpriteFrameTable->InitializeSprite(pSpriteFrameTable->FastFindSprite("spell97c"));
0
Ritor1
parents:
diff changeset
1640 }