annotate ParticleEngine.h @ 2072:2737276390ff

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