annotate DecalBuilder.h @ 44:968e681bcceb

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