World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
DecalBuilder.h
См. документацию.
1 #pragma once
2 
3 #include "Engine/IocContainer.h"
4 
7 
9 
10 
11 /* 158 */
12 #pragma pack(push, 1)
13 struct Bloodsplat {
14  inline Bloodsplat() {
15  this->x = 0;
16  this->y = 0;
17  this->z = 0;
18  this->radius = 0;
19  this->dot_dist = 0;
20  this->r = 0;
21  this->g = 0;
22  this->b = 0;
23  this->field_1B = 0;
24  this->field_1C = 0;
25  this->field_20 = 0;
26  // this->field_24 = 0;
27  // this->vdestructor_ptr = &Bloodsplat_pvdtor;
28  }
29 
30  virtual ~Bloodsplat() {}
31 
32  // void ( ***vdestructor_ptr)(Bloodsplat *, bool);
33  float x;
34  float y;
35  float z;
36  float radius;
37  float dot_dist;
38  unsigned char r;
39  unsigned char g;
40  unsigned char b;
41  char field_1B;
42  int field_1C; // flags
43  unsigned long long field_20; // fade time
44  // int field_24;
45 };
46 #pragma pack(pop)
47 
48 /* 159 */
49 #pragma pack(push, 1)
52  /*_eh_vector_constructor_iterator_(
53  this->std__vector_pBloodsplats,
54  40,
55  64,
56  (void ( *)(void *))Bloodsplat::Bloodsplat,
57  (void ( *)(void *))Bloodsplat::dtor);
58  v1->std__vector_pBloodsplats_size = 0;*/
59  uNumBloodsplats = 0;
60  }
61 
63  // this->vdestructor_ptr = &BloodsplatContainer_pvdtor;
64  // _eh_vector_destructor_iterator_(this->std__vector_pBloodsplats, 40,
65  // 64, Bloodsplat::dtor);
66  }
67 
68  void AddBloodsplat(float x, float y, float z, float r, float g, float b,
69  float radius, int a8, int a9);
70  void AddBloodsplat(float x, float y, float z, float radius, unsigned char r,
71  unsigned char g, unsigned char b);
72 
73  // void ( ***vdestructor_ptr)(BloodsplatContainer *, bool);
77 };
78 #pragma pack(pop)
79 
80 #pragma pack(push, 1)
83 
84  int field_0;
85  int field_4;
86  int field_8;
87  int field_C;
88  int field_10;
89  int field_14;
90  int field_18;
93 };
94 #pragma pack(pop)
95 
96 /* 181 */
97 #pragma pack(push, 1)
98 struct Decal {
99  void Decal_base_ctor();
100  inline Decal() {
101  Decal_base_ctor();
102  field_C1C = 0;
103  }
104 
105  virtual ~Decal() {}
106 
107  // void ( ***vdestructor_ptr)(Decal *, bool);
118 };
119 #pragma pack(pop)
120 
121 /* 180 */
122 #pragma pack(push, 1)
123 struct DecalBuilder {
125  this->log = EngineIoc::ResolveLogger();
127 
128  this->DecalsCount = 0;
129  this->curent_decal_id = 0;
130  for (unsigned int i = 0; i < 256; ++i) {
131  this->pVertices[i].flt_2C = 0.0f;
132  }
133  }
134 
135  virtual ~DecalBuilder() {}
136 
137  void AddBloodsplat(float x, float y, float z, float r, float g, float b,
138  float radius, int a8, int a9);
139  void Reset(bool bPreserveBloodsplats);
140  char ApplyDecals(int light_level, char a3, struct stru154 *a4, int a5,
141  struct RenderVertexSoft *a6,
142  struct IndoorCameraD3D_Vec4 *a7, char a8,
143  unsigned int uSectorID);
144  char _49B790_build_decal_geometry(int a2, char a3, Bloodsplat *a4, int a5,
145  float a6, unsigned int uColorMultiplier,
146  float a8, struct stru314 *a9,
147  signed int a10,
148  struct RenderVertexSoft *a11,
149  char uClipFlags);
150  bool ApplyBloodsplatDecals_IndoorFace(unsigned int uFaceID);
151  char ApplyDecals_OutdoorFace(ODMFace *pFace);
152  bool ApplyBloodSplatToTerrain(struct Polygon *a2, Vec3_float_ *a3, float *a4,
153  struct RenderVertexSoft *a5, unsigned int uStripType, char a7);
154  void DrawDecals(float z_bias);
155  void DrawBloodsplats();
156  void DrawDecalDebugOutlines();
157 
158  // void ( ***vdestructor_ptr)(DecalBuilder *, bool);
159  Decal Decals[1024];
160  unsigned int DecalsCount;
161  int curent_decal_id; // field_308008
163  int std__vector_30B00C[1024]; // outdoor bloodsplats/decals
164  int uNumDecals = 0;
165  float field_30C010 = 0;
166  float field_30C014 = 0;
167  float field_30C018 = 0;
168  float field_30C01C = 0;
169  float field_30C020 = 0;
170  float field_30C024 = 0;
171  float field_30C028 = 0;
172  float field_30C02C = 0;
173  float flt_30C030 = 0;
174  float field_30C034 = 0;
175 
178 };
179 #pragma pack(pop)
DecalBuilder::log
Log * log
Definition: DecalBuilder.h:176
Bloodsplat::field_1C
int field_1C
Definition: DecalBuilder.h:42
DecalBuilder::field_30C020
float field_30C020
Definition: DecalBuilder.h:169
Vec3_float_
Definition: VectorTypes.h:74
Decal::~Decal
virtual ~Decal()
Definition: DecalBuilder.h:105
Engine_::IocContainer
Definition: IocContainer.h:15
stru154
Definition: Indoor.h:229
Decal::uNumVertices
int uNumVertices
Definition: DecalBuilder.h:108
IocContainer.h
Bloodsplat::dot_dist
float dot_dist
Definition: DecalBuilder.h:37
int16_t
signed __int16 int16_t
Definition: SDL_config.h:36
Decal::Decal_base_ctor
void Decal_base_ctor()
Definition: DecalBuilder.cpp:535
DecalBuilder_stru0::field_10
int field_10
Definition: DecalBuilder.h:88
DecalBuilder::ApplyBloodSplatToTerrain
bool ApplyBloodSplatToTerrain(struct Polygon *a2, Vec3_float_ *a3, float *a4, struct RenderVertexSoft *a5, unsigned int uStripType, char a7)
Definition: DecalBuilder.cpp:392
DecalBuilder::field_30C010
float field_30C010
Definition: DecalBuilder.h:165
DecalBuilder_stru0::field_8
int field_8
Definition: DecalBuilder.h:86
Decal::DecalYPos
int16_t DecalYPos
Definition: DecalBuilder.h:111
Bloodsplat::field_1B
char field_1B
Definition: DecalBuilder.h:41
Polygon
Definition: Polygon.h:14
DecalBuilder_stru0::field_14
int field_14
Definition: DecalBuilder.h:89
Bloodsplat::b
unsigned char b
Definition: DecalBuilder.h:40
DecalBuilder::ApplyBloodsplatDecals_IndoorFace
bool ApplyBloodsplatDecals_IndoorFace(unsigned int uFaceID)
Definition: DecalBuilder.cpp:325
Bloodsplat::Bloodsplat
Bloodsplat()
Definition: DecalBuilder.h:14
Engine_::IocContainer::ResolveBloodsplatContainer
static BloodsplatContainer * ResolveBloodsplatContainer()
Definition: IocContainer.cpp:67
DecalBuilder_stru0::field_0
int field_0
Definition: DecalBuilder.h:84
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:407
DecalBuilder::AddBloodsplat
void AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9)
Definition: DecalBuilder.cpp:50
Engine_::IocContainer::ResolveLogger
static Log * ResolveLogger()
Definition: IocContainer.cpp:51
Decal
Definition: DecalBuilder.h:98
Bloodsplat::x
float x
Definition: DecalBuilder.h:33
Decal::pVertices
RenderVertexSoft pVertices[64]
Definition: DecalBuilder.h:109
int64_t
__int64 int64_t
Definition: alext.h:31
Bloodsplat::g
unsigned char g
Definition: DecalBuilder.h:39
IndoorCameraD3D_Vec4
Definition: IndoorCameraD3D.h:32
Log
Definition: Log.h:3
Decal::Decal
Decal()
Definition: DecalBuilder.h:100
DecalBuilder_stru0::field_18
int field_18
Definition: DecalBuilder.h:90
DecalBuilder::field_30C02C
float field_30C02C
Definition: DecalBuilder.h:172
Bloodsplat::z
float z
Definition: DecalBuilder.h:35
BloodsplatContainer::uNumBloodsplats
int uNumBloodsplats
Definition: DecalBuilder.h:76
BloodsplatContainer::~BloodsplatContainer
virtual ~BloodsplatContainer()
Definition: DecalBuilder.h:62
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
DecalBuilder::Reset
void Reset(bool bPreserveBloodsplats)
Definition: DecalBuilder.cpp:58
DecalBuilder::DrawDecalDebugOutlines
void DrawDecalDebugOutlines()
Definition: DecalBuilder.cpp:528
DecalBuilder::field_30C014
float field_30C014
Definition: DecalBuilder.h:166
DecalBuilder::field_30C018
float field_30C018
Definition: DecalBuilder.h:167
Decal::field_C18
DecalBuilder_stru0 * field_C18
Definition: DecalBuilder.h:116
Bloodsplat::radius
float radius
Definition: DecalBuilder.h:36
DecalBuilder_stru0::field_20_time
int64_t field_20_time
Definition: DecalBuilder.h:92
IRender.h
DecalBuilder::Decals
Decal Decals[1024]
Definition: DecalBuilder.h:159
Bloodsplat::r
unsigned char r
Definition: DecalBuilder.h:38
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
DecalBuilder_stru0::_43B570_get_color_mult_by_time
double _43B570_get_color_mult_by_time()
Definition: DecalBuilder.cpp:17
BloodsplatContainer::std__vector_pBloodsplats
Bloodsplat std__vector_pBloodsplats[64]
Definition: DecalBuilder.h:74
BloodsplatContainer::AddBloodsplat
void AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9)
DecalBuilder::DecalBuilder
DecalBuilder()
Definition: DecalBuilder.h:124
DecalBuilder::ApplyDecals
char ApplyDecals(int light_level, char a3, struct stru154 *a4, int a5, struct RenderVertexSoft *a6, struct IndoorCameraD3D_Vec4 *a7, char a8, unsigned int uSectorID)
Definition: DecalBuilder.cpp:67
DecalBuilder::ApplyDecals_OutdoorFace
char ApplyDecals_OutdoorFace(ODMFace *pFace)
Definition: DecalBuilder.cpp:358
DecalBuilder::field_30C028
float field_30C028
Definition: DecalBuilder.h:171
Decal::field_C1C
int field_C1C
Definition: DecalBuilder.h:117
Bloodsplat
Definition: DecalBuilder.h:13
Decal::field_C0E
int16_t field_C0E
Definition: DecalBuilder.h:113
DecalBuilder::flt_30C030
float flt_30C030
Definition: DecalBuilder.h:173
Bloodsplat::~Bloodsplat
virtual ~Bloodsplat()
Definition: DecalBuilder.h:30
DecalBuilder_stru0::field_C
int field_C
Definition: DecalBuilder.h:87
DecalBuilder::curent_decal_id
int curent_decal_id
Definition: DecalBuilder.h:161
DecalBuilder::field_30C024
float field_30C024
Definition: DecalBuilder.h:170
DecalBuilder::uNumDecals
int uNumDecals
Definition: DecalBuilder.h:164
Decal::uColorMultiplier
uint32_t uColorMultiplier
Definition: DecalBuilder.h:114
BSPModel.h
Decal::DecalZPos
int16_t DecalZPos
Definition: DecalBuilder.h:112
RenderVertexSoft::flt_2C
float flt_2C
Definition: IRender.h:123
DecalBuilder::_49B790_build_decal_geometry
char _49B790_build_decal_geometry(int a2, char a3, Bloodsplat *a4, int a5, float a6, unsigned int uColorMultiplier, float a8, struct stru314 *a9, signed int a10, struct RenderVertexSoft *a11, char uClipFlags)
Definition: DecalBuilder.cpp:165
BloodsplatContainer::BloodsplatContainer
BloodsplatContainer()
Definition: DecalBuilder.h:51
DecalBuilder::bloodsplat_container
BloodsplatContainer * bloodsplat_container
Definition: DecalBuilder.h:177
BloodsplatContainer
Definition: DecalBuilder.h:50
Bloodsplat::field_20
unsigned long long field_20
Definition: DecalBuilder.h:43
b
GLboolean GLboolean GLboolean b
Definition: SDL_opengl_glext.h:1112
r
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
DecalBuilder_stru0::field_4
int field_4
Definition: DecalBuilder.h:85
DecalBuilder::pVertices
RenderVertexSoft pVertices[256]
Definition: DecalBuilder.h:162
ODMFace
Definition: BSPModel.h:93
DecalBuilder::field_30C034
float field_30C034
Definition: DecalBuilder.h:174
DecalBuilder::DecalsCount
unsigned int DecalsCount
Definition: DecalBuilder.h:160
DecalBuilder_stru0::field_1C_flags
int field_1C_flags
Definition: DecalBuilder.h:91
stru314
Definition: stru314.h:5
Decal::field_C14
int field_C14
Definition: DecalBuilder.h:115
Bloodsplat::y
float y
Definition: DecalBuilder.h:34
DecalBuilder_stru0
Definition: DecalBuilder.h:81
DecalBuilder::DrawDecals
void DrawDecals(float z_bias)
Definition: DecalBuilder.cpp:511
RenderVertexSoft
Definition: IRender.h:113
DecalBuilder::~DecalBuilder
virtual ~DecalBuilder()
Definition: DecalBuilder.h:135
BloodsplatContainer::std__vector_pBloodsplats_size
unsigned int std__vector_pBloodsplats_size
Definition: DecalBuilder.h:75
DecalBuilder::DrawBloodsplats
void DrawBloodsplats()
Definition: DecalBuilder.cpp:517
g
GLboolean GLboolean g
Definition: SDL_opengl_glext.h:1112
uint32_t
unsigned __int32 uint32_t
Definition: SDL_config.h:39
Decal::DecalXPos
int16_t DecalXPos
Definition: DecalBuilder.h:110
DecalBuilder::field_30C01C
float field_30C01C
Definition: DecalBuilder.h:168
DecalBuilder
Definition: DecalBuilder.h:123
DecalBuilder::std__vector_30B00C
int std__vector_30B00C[1024]
Definition: DecalBuilder.h:163