annotate ParticleEngine.h @ 1004:eac5af72b614

UI cleans
author Nomad
date Thu, 16 May 2013 15:14:58 +0200
parents 710cf848ad24
children db395ce89ede
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;
Ritor1
parents:
diff changeset
26 float flt_10;
Ritor1
parents:
diff changeset
27 float flt_14;
Ritor1
parents:
diff changeset
28 float flt_18;
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)
Ritor1
parents:
diff changeset
108 struct ParticleEngine
Ritor1
parents:
diff changeset
109 {
Ritor1
parents:
diff changeset
110 ParticleEngine();
Ritor1
parents:
diff changeset
111
Ritor1
parents:
diff changeset
112 void ResetParticles();
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 144
diff changeset
113 void AddParticle(Particle_sw *a2);
0
Ritor1
parents:
diff changeset
114 void Draw();
619
574cc56e05e9 ParticleEngine crash in temple
Nomad
parents: 144
diff changeset
115 void UpdateParticles();
871
710cf848ad24 Particle engine made working.
Nomad
parents: 619
diff changeset
116 bool ViewProject_TrueIfStillVisible_BLV(unsigned int uParticleID);
710cf848ad24 Particle engine made working.
Nomad
parents: 619
diff changeset
117 bool ViewProject_TrueIfStillVisible_ODM(unsigned int uID);
0
Ritor1
parents:
diff changeset
118 void DrawParticles_BLV();
Ritor1
parents:
diff changeset
119 void DrawParticles_ODM();
Ritor1
parents:
diff changeset
120
Ritor1
parents:
diff changeset
121 Particle pParticles[500];
Ritor1
parents:
diff changeset
122 stru2_LineList pLines;
Ritor1
parents:
diff changeset
123 char field_D160[4800];
Ritor1
parents:
diff changeset
124 float field_E420;
Ritor1
parents:
diff changeset
125 int uStartParticle;
Ritor1
parents:
diff changeset
126 int uEndParticle;
Ritor1
parents:
diff changeset
127 int uTimeElapsed;
Ritor1
parents:
diff changeset
128 };
Ritor1
parents:
diff changeset
129 #pragma pack(pop)