2496
|
1 #pragma once
|
|
2 #include "Render.h"
|
|
3
|
|
4
|
|
5
|
|
6 enum ParticleType: unsigned __int32
|
|
7 {
|
|
8 ParticleType_Invalid = 0,
|
|
9 ParticleType_1 = 0x0001,
|
|
10 ParticleType_Rotating = 0x0004,
|
|
11 ParticleType_8 = 0x0008,
|
|
12 ParticleType_Diffuse = 0x0100, // colored plane
|
|
13 ParticleType_Line = 0x0200, // line
|
|
14 ParticleType_Bitmap = 0x0400, // textured planed
|
|
15 ParticleType_Sprite = 0x0800
|
|
16 };
|
|
17
|
|
18 /* 305 */
|
|
19 #pragma pack(push, 1)
|
|
20 struct Particle_sw
|
|
21 {
|
|
22 unsigned int type;
|
|
23 float x;
|
|
24 float y;
|
|
25 float z;
|
|
26 float r;
|
|
27 float g;
|
|
28 float b;
|
|
29 unsigned int uDiffuse;
|
|
30 int timeToLive;
|
|
31 unsigned int uTextureID;
|
|
32 float flt_28;
|
|
33 int field_2C;
|
|
34 int field_30;
|
|
35 int field_34;
|
|
36 int field_38[12];
|
|
37 };
|
|
38 #pragma pack(pop)
|
|
39
|
|
40
|
|
41
|
|
42 /* 109 */
|
|
43 #pragma pack(push, 1)
|
|
44 struct Particle
|
|
45 {
|
|
46 unsigned int type;
|
|
47 float x;
|
|
48 float y;
|
|
49 float z;
|
|
50 float flt_10;
|
|
51 float flt_14;
|
|
52 float flt_18;
|
|
53 union
|
|
54 {
|
|
55 struct
|
|
56 {
|
|
57 unsigned char r, g, b, a;
|
|
58 };
|
|
59 unsigned int uParticleColor;
|
|
60 };
|
|
61 int timeToLive;
|
|
62 unsigned int uTextureID;
|
|
63 float flt_28;
|
|
64 float _x;
|
|
65 float _y;
|
|
66 float _z;
|
|
67 int rotation_speed;
|
|
68 int angle;
|
|
69 int uScreenSpaceX;
|
|
70 int uScreenSpaceY;
|
|
71 int uScreenSpaceZ; // line end x
|
|
72 int uScreenSpaceW; // line end y
|
|
73 union
|
|
74 {
|
|
75 int sZValue;
|
|
76 struct
|
|
77 {
|
|
78 unsigned short object_pid;
|
|
79 short zbuffer_depth;
|
|
80 };
|
|
81 };
|
|
82 int sZValue2; // line end z
|
|
83 int _screenspace_scale;
|
|
84 float flt_5C;
|
|
85 float flt_60;
|
|
86 int uLightColor_bgr;
|
|
87 };
|
|
88 #pragma pack(pop)
|
|
89
|
|
90
|
|
91
|
|
92 /* 111 */
|
|
93 #pragma pack(push, 1)
|
|
94 struct stru2_LineList
|
|
95 {
|
|
96 unsigned int uNumLines;
|
|
97 RenderVertexD3D3 pLineVertices[48];
|
|
98 char field_604[60];
|
|
99 };
|
|
100 #pragma pack(pop)
|
|
101
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106 /* 110 */
|
|
107 #pragma pack(push, 1)
|
|
108 class ParticleEngine
|
|
109 {
|
|
110 public:
|
|
111 ParticleEngine();
|
|
112
|
|
113 void ResetParticles();
|
|
114 void AddParticle(Particle_sw *a2);
|
|
115 void Draw();
|
|
116 void UpdateParticles();
|
|
117 bool ViewProject_TrueIfStillVisible_BLV(unsigned int uParticleID);
|
|
118 bool ViewProject_TrueIfStillVisible_ODM(unsigned int uID);
|
|
119 void DrawParticles_BLV();
|
|
120 void DrawParticles_ODM();
|
|
121
|
|
122 Particle pParticles[500];
|
|
123 stru2_LineList pLines;
|
|
124 char field_D160[4800];
|
|
125 float field_E420;
|
|
126 int uStartParticle;
|
|
127 int uEndParticle;
|
|
128 int uTimeElapsed;
|
|
129 };
|
|
130 #pragma pack(pop)
|
|
131
|
|
132
|
|
133
|
|
134
|
|
135
|
|
136
|
|
137
|
|
138
|
|
139
|
|
140
|
|
141
|
|
142 /* 160 */
|
|
143 #pragma pack(push, 1)
|
|
144 struct TrailParticle // stru167
|
|
145 {
|
|
146 inline TrailParticle()
|
|
147 {
|
|
148 x = 0;
|
|
149 y = 0;
|
|
150 z = 0;
|
|
151 time_left = 0;
|
|
152 time_to_live = 0;
|
|
153 bgr16 = 0;
|
|
154 }
|
|
155
|
|
156 char field_0;
|
|
157 char field_1;
|
|
158 char field_2;
|
|
159 char field_3;
|
|
160 char field_4;
|
|
161 char field_5;
|
|
162 __int16 x;
|
|
163 __int16 y;
|
|
164 __int16 z;
|
|
165 __int16 time_left;
|
|
166 __int16 time_to_live;
|
|
167 char field_10;
|
|
168 char field_11;
|
|
169 char field_12;
|
|
170 char field_13;
|
|
171 __int16 bgr16;
|
|
172 char field_16;
|
|
173 char field_17;
|
|
174 };
|
|
175 #pragma pack(pop)
|
|
176
|
|
177
|
|
178 /* 363 */
|
|
179 #pragma pack(push, 1)
|
|
180 struct TrailParticleGenerator // stru167_wrap
|
|
181 {
|
|
182 public:
|
|
183 inline TrailParticleGenerator()
|
|
184 {
|
|
185 num_particles = 0;
|
|
186 }
|
|
187
|
|
188 void GenerateTrailParticles(int x, int y, int z, int bgr16);
|
|
189 void UpdateParticles();
|
|
190
|
|
191 protected:
|
|
192 void AddParticle(int x, int y, int z, int bgr16);
|
|
193
|
|
194 TrailParticle particles[100];
|
|
195 int num_particles;
|
|
196 int field_964;
|
|
197 };
|
|
198 #pragma pack(pop)
|
|
199 extern TrailParticleGenerator trail_particle_generator; // 005118E8 |