annotate DecalBuilder.h @ 2039:6971834a0d81

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