annotate DecalBuilder.h @ 1408:204cce84300b

FindSound
author Ritor1
date Fri, 26 Jul 2013 18:11:36 +0600
parents cc9a3a24d61d
children 934074e7fcc1
rev   line source
0
Ritor1
parents:
diff changeset
1 #pragma once
Ritor1
parents:
diff changeset
2 #include "Render.h"
Ritor1
parents:
diff changeset
3
1077
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
4 /* 158 */
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
5 #pragma pack(push, 1)
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
6 struct Bloodsplat
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
7 {
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
8 //----- (0043B538) --------------------------------------------------------
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
9 inline Bloodsplat()
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
10 {
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
11 this->field_1C = 0;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
12 this->field_20 = 0;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
13 //this->field_24 = 0;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
14 //this->vdestructor_ptr = &Bloodsplat_pvdtor;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
15 }
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
16
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
17 //----- (0043B54C) --------------------------------------------------------
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
18 //void __thiscall Bloodsplat::vdtor(Bloodsplat *this, char a2)
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
19
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
20 //----- (0043B569) --------------------------------------------------------
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
21 virtual ~Bloodsplat()
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
22 {
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
23 }
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
24
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
25 //void (__thiscall ***vdestructor_ptr)(Bloodsplat *, bool);
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
26 float x;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
27 float y;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
28 float z;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
29 float radius;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
30 float dot_dist;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
31 char r;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
32 char g;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
33 char b;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
34 char field_1B;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
35 int field_1C;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
36 unsigned long long field_20;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
37 //int field_24;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
38 };
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
39 #pragma pack(pop)
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
40
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
41 /* 159 */
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
42 #pragma pack(push, 1)
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
43 struct BloodsplatContainer
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
44 {
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
45 //----- (0043B688) --------------------------------------------------------
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
46 inline BloodsplatContainer()
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
47 {
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
48 /*_eh_vector_constructor_iterator_(
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
49 this->std__vector_pBloodsplats,
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
50 40,
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
51 64,
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
52 (void (__thiscall *)(void *))Bloodsplat::Bloodsplat,
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
53 (void (__thiscall *)(void *))Bloodsplat::dtor);
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
54 v1->std__vector_pBloodsplats_size = 0;*/
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
55 uNumBloodsplats = 0;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
56 }
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
57 //----- (0043B6D6) --------------------------------------------------------
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
58 virtual ~BloodsplatContainer()
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
59 {
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
60 //this->vdestructor_ptr = &BloodsplatContainer_pvdtor;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
61 //_eh_vector_destructor_iterator_(this->std__vector_pBloodsplats, 40, 64, Bloodsplat::dtor);
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
62 }
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
63
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
64
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
65 bool AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9);
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
66 bool AddBloodsplat(float x, float y, float z, float radius, char r, char g, char b);
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
67
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
68
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
69 //void (__thiscall ***vdestructor_ptr)(BloodsplatContainer *, bool);
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
70 Bloodsplat std__vector_pBloodsplats[64];
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
71 unsigned int std__vector_pBloodsplats_size;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
72 int uNumBloodsplats;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
73 };
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
74 #pragma pack(pop)
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
75
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
76 extern struct BloodsplatContainer *pBloodsplatContainer; // idb
0
Ritor1
parents:
diff changeset
77
Ritor1
parents:
diff changeset
78 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
79 struct DecalBuilder_stru0
Ritor1
parents:
diff changeset
80 {
Ritor1
parents:
diff changeset
81 double _43B570_get_color_mult_by_time();
Ritor1
parents:
diff changeset
82
Ritor1
parents:
diff changeset
83 int field_0;
Ritor1
parents:
diff changeset
84 int field_4;
Ritor1
parents:
diff changeset
85 int field_8;
Ritor1
parents:
diff changeset
86 int field_C;
Ritor1
parents:
diff changeset
87 int field_10;
Ritor1
parents:
diff changeset
88 int field_14;
Ritor1
parents:
diff changeset
89 int field_18;
Ritor1
parents:
diff changeset
90 int field_1C_flags;
Ritor1
parents:
diff changeset
91 __int64 field_20_time;
Ritor1
parents:
diff changeset
92 };
Ritor1
parents:
diff changeset
93 #pragma pack(pop)
Ritor1
parents:
diff changeset
94
Ritor1
parents:
diff changeset
95
Ritor1
parents:
diff changeset
96
Ritor1
parents:
diff changeset
97 /* 181 */
Ritor1
parents:
diff changeset
98 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
99 struct Decal
Ritor1
parents:
diff changeset
100 {
Ritor1
parents:
diff changeset
101 void Decal_base_ctor();
Ritor1
parents:
diff changeset
102 //----- (0043B60C) --------------------------------------------------------
Ritor1
parents:
diff changeset
103 inline Decal()
Ritor1
parents:
diff changeset
104 {
Ritor1
parents:
diff changeset
105 Decal_base_ctor();
Ritor1
parents:
diff changeset
106 field_C1C = 0;
Ritor1
parents:
diff changeset
107 }
Ritor1
parents:
diff changeset
108
Ritor1
parents:
diff changeset
109 //----- (0043B625) --------------------------------------------------------
Ritor1
parents:
diff changeset
110 //void __thiscall Decal::vdtor(Decal *this, bool a2)
Ritor1
parents:
diff changeset
111 //----- (0043B641) --------------------------------------------------------
Ritor1
parents:
diff changeset
112 virtual ~Decal()
Ritor1
parents:
diff changeset
113 {
Ritor1
parents:
diff changeset
114 }
Ritor1
parents:
diff changeset
115
522
61343380715b Origianl structures integrity test added
Nomad
parents: 0
diff changeset
116 //void (__thiscall ***vdestructor_ptr)(Decal *, bool);
0
Ritor1
parents:
diff changeset
117 int uNumVertices;
Ritor1
parents:
diff changeset
118 RenderVertexSoft pVertices[64];
Ritor1
parents:
diff changeset
119 __int16 field_C08;
Ritor1
parents:
diff changeset
120 __int16 field_C0A;
Ritor1
parents:
diff changeset
121 __int16 field_C0C;
Ritor1
parents:
diff changeset
122 __int16 field_C0E;
Ritor1
parents:
diff changeset
123 uint uColorMultiplier;
Ritor1
parents:
diff changeset
124 int field_C14;
Ritor1
parents:
diff changeset
125 DecalBuilder_stru0 *field_C18;
Ritor1
parents:
diff changeset
126 int field_C1C;
Ritor1
parents:
diff changeset
127 };
Ritor1
parents:
diff changeset
128 #pragma pack(pop)
Ritor1
parents:
diff changeset
129
Ritor1
parents:
diff changeset
130 /* 180 */
Ritor1
parents:
diff changeset
131 #pragma pack(push, 1)
Ritor1
parents:
diff changeset
132 struct DecalBuilder
Ritor1
parents:
diff changeset
133 {
Ritor1
parents:
diff changeset
134 //----- (0049B408) --------------------------------------------------------
Ritor1
parents:
diff changeset
135 DecalBuilder()
Ritor1
parents:
diff changeset
136 {
Ritor1
parents:
diff changeset
137 char *v2; // eax@1
Ritor1
parents:
diff changeset
138 signed int v3; // ecx@1
Ritor1
parents:
diff changeset
139
Ritor1
parents:
diff changeset
140 auto v1 = this;
Ritor1
parents:
diff changeset
141 /*_eh_vector_constructor_iterator_(
Ritor1
parents:
diff changeset
142 this->std__vector_pDecals,
Ritor1
parents:
diff changeset
143 3104,
Ritor1
parents:
diff changeset
144 1024,
Ritor1
parents:
diff changeset
145 (void (__thiscall *)(void *))Decal::Decal,
Ritor1
parents:
diff changeset
146 (void (__thiscall *)(void *))Decal::dtor);*/
Ritor1
parents:
diff changeset
147 v1->std__vector_pDecals_size = 0;
Ritor1
parents:
diff changeset
148 v1->field_308008 = 0;
Ritor1
parents:
diff changeset
149 v2 = (char *)&v1->pVertices[0].flt_2C;
Ritor1
parents:
diff changeset
150 v3 = 256;
Ritor1
parents:
diff changeset
151 do
Ritor1
parents:
diff changeset
152 {
Ritor1
parents:
diff changeset
153 *(float *)v2 = 0.0;
Ritor1
parents:
diff changeset
154 v2 += 48;
Ritor1
parents:
diff changeset
155 --v3;
Ritor1
parents:
diff changeset
156 }
Ritor1
parents:
diff changeset
157 while ( v3 );
Ritor1
parents:
diff changeset
158 }
Ritor1
parents:
diff changeset
159
Ritor1
parents:
diff changeset
160 //----- (0049B471) --------------------------------------------------------
Ritor1
parents:
diff changeset
161 virtual ~DecalBuilder()
Ritor1
parents:
diff changeset
162 {}
Ritor1
parents:
diff changeset
163
Ritor1
parents:
diff changeset
164
Ritor1
parents:
diff changeset
165 bool AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9);
Ritor1
parents:
diff changeset
166 void Reset(unsigned int bPreserveBloodsplats);
638
ccf8b4815a1f GetActorTintColor fixed
Nomad
parents: 522
diff changeset
167 char ApplyDecals(int light_level, char a3, struct stru154 *a4, int a5, struct RenderVertexSoft *a6, struct IndoorCameraD3D_Vec4 *a7, char a8, unsigned int uSectorID);
1077
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
168 char _49B790_build_decal_geometry(int a2, char a3, DecalBuilder_stru0 *a4, int a5, float a6, unsigned int uColorMultiplier, float a8, struct stru314 *a9, signed int a10, struct RenderVertexSoft *a11, char uClipFlags);
0
Ritor1
parents:
diff changeset
169 bool ApplyBloodsplatDecals_IndoorFace(unsigned int uFaceID);
Ritor1
parents:
diff changeset
170 char ApplyDecals_OutdoorFace(ODMFace *pFace);
1391
cc9a3a24d61d Moved stru11, stru12 and some SW Rendering stuff to the archives.
Nomad
parents: 1077
diff changeset
171 bool _49BE8A(struct Polygon *a2, Vec3_float_ *a3, float *a4, struct RenderVertexSoft *a5, unsigned int uStripType, char a7);
0
Ritor1
parents:
diff changeset
172 void DrawDecal(Decal *pDecal, float z_bias);
Ritor1
parents:
diff changeset
173 void DrawDecals(float z_bias);
Ritor1
parents:
diff changeset
174 void DrawBloodsplats();
Ritor1
parents:
diff changeset
175 void DrawDecalDebugOutlines();
Ritor1
parents:
diff changeset
176
Ritor1
parents:
diff changeset
177
Ritor1
parents:
diff changeset
178
522
61343380715b Origianl structures integrity test added
Nomad
parents: 0
diff changeset
179 //void (__thiscall ***vdestructor_ptr)(DecalBuilder *, bool);
0
Ritor1
parents:
diff changeset
180 Decal std__vector_pDecals[1024];
Ritor1
parents:
diff changeset
181 unsigned int std__vector_pDecals_size;
Ritor1
parents:
diff changeset
182 int field_308008;
Ritor1
parents:
diff changeset
183 RenderVertexSoft pVertices[256];
Ritor1
parents:
diff changeset
184 int std__vector_30B00C[1024];
Ritor1
parents:
diff changeset
185 int uNumDecals;
Ritor1
parents:
diff changeset
186 float field_30C010;
Ritor1
parents:
diff changeset
187 float field_30C014;
Ritor1
parents:
diff changeset
188 float field_30C018;
Ritor1
parents:
diff changeset
189 float field_30C01C;
Ritor1
parents:
diff changeset
190 float field_30C020;
Ritor1
parents:
diff changeset
191 float field_30C024;
1077
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
192 float field_30C028;
2210109f280d DecalBuilder, AI_SpellAttack sparkles
zipi
parents: 1075
diff changeset
193 float field_30C02C;
0
Ritor1
parents:
diff changeset
194 float flt_30C030;
Ritor1
parents:
diff changeset
195 float field_30C034;
Ritor1
parents:
diff changeset
196 };
Ritor1
parents:
diff changeset
197 #pragma pack(pop)
Ritor1
parents:
diff changeset
198
Ritor1
parents:
diff changeset
199 extern struct DecalBuilder *pDecalBuilder;
Ritor1
parents:
diff changeset
200
Ritor1
parents:
diff changeset
201
Ritor1
parents:
diff changeset
202
Ritor1
parents:
diff changeset
203
Ritor1
parents:
diff changeset
204