view DecalBuilder.h @ 1035:306ec23b37df

004C1EE5 & other stuff
author Nomad
date Wed, 22 May 2013 14:12:51 +0200
parents ccf8b4815a1f
children 1e38e5c049f3
line wrap: on
line source

#pragma once
#include "Render.h"


#pragma pack(push, 1)
struct DecalBuilder_stru0
{
  double _43B570_get_color_mult_by_time();

  int field_0;
  int field_4;
  int field_8;
  int field_C;
  int field_10;
  int field_14;
  int field_18;
  int field_1C_flags;
  __int64 field_20_time;
};
#pragma pack(pop)



/*  181 */
#pragma pack(push, 1)
struct Decal
{
  void Decal_base_ctor();
  //----- (0043B60C) --------------------------------------------------------
  inline Decal()
  {
    Decal_base_ctor();
    field_C1C = 0;
  }

  //----- (0043B625) --------------------------------------------------------
  //void __thiscall Decal::vdtor(Decal *this, bool a2)
  //----- (0043B641) --------------------------------------------------------
  virtual ~Decal()
  {
  }

  //void (__thiscall ***vdestructor_ptr)(Decal *, bool);
  int uNumVertices;
  RenderVertexSoft pVertices[64];
  __int16 field_C08;
  __int16 field_C0A;
  __int16 field_C0C;
  __int16 field_C0E;
  uint uColorMultiplier;
  int field_C14;
  DecalBuilder_stru0 *field_C18;
  int field_C1C;
};
#pragma pack(pop)

/*  180 */
#pragma pack(push, 1)
struct DecalBuilder
{
  //----- (0049B408) --------------------------------------------------------
  DecalBuilder()
  {
    char *v2; // eax@1
    signed int v3; // ecx@1

    auto v1 = this;
    /*_eh_vector_constructor_iterator_(
    this->std__vector_pDecals,
    3104,
    1024,
    (void (__thiscall *)(void *))Decal::Decal,
    (void (__thiscall *)(void *))Decal::dtor);*/
  v1->std__vector_pDecals_size = 0;
  v1->field_308008 = 0;
  v2 = (char *)&v1->pVertices[0].flt_2C;
  v3 = 256;
  do
  {
    *(float *)v2 = 0.0;
    v2 += 48;
    --v3;
  }
  while ( v3 );
  }

  //----- (0049B471) --------------------------------------------------------
  virtual ~DecalBuilder()
  {}


  bool AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9);
  void Reset(unsigned int bPreserveBloodsplats);
  char ApplyDecals(int light_level, char a3, struct stru154 *a4, int a5, struct RenderVertexSoft *a6, struct IndoorCameraD3D_Vec4 *a7, char a8, unsigned int uSectorID);
  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);
  bool ApplyBloodsplatDecals_IndoorFace(unsigned int uFaceID);
  char ApplyDecals_OutdoorFace(ODMFace *pFace);
  bool _49BE8A(struct stru148 *a2, float a3, int a4, struct RenderVertexSoft *a5, unsigned int uStripType, char a7);
  void DrawDecal(Decal *pDecal, float z_bias);
  void DrawDecals(float z_bias);
  void DrawBloodsplats();
  void DrawDecalDebugOutlines();



  //void (__thiscall ***vdestructor_ptr)(DecalBuilder *, bool);
  Decal std__vector_pDecals[1024];
  unsigned int std__vector_pDecals_size;
  int field_308008;
  RenderVertexSoft pVertices[256];
  int std__vector_30B00C[1024];
  int uNumDecals;
  float field_30C010;
  float field_30C014;
  float field_30C018;
  float field_30C01C;
  float field_30C020;
  float field_30C024;
  int field_30C028;
  int field_30C02C;
  float flt_30C030;
  float field_30C034;
};
#pragma pack(pop)

extern struct DecalBuilder *pDecalBuilder;





/*  158 */
#pragma pack(push, 1)
struct Bloodsplat
{
  //----- (0043B538) --------------------------------------------------------
  inline Bloodsplat()
  {
    this->field_1C = 0;
    this->field_20 = 0;
    this->field_24 = 0;
    //this->vdestructor_ptr = &Bloodsplat_pvdtor;
  }

  //----- (0043B54C) --------------------------------------------------------
  //void __thiscall Bloodsplat::vdtor(Bloodsplat *this, char a2)

  //----- (0043B569) --------------------------------------------------------
  virtual ~Bloodsplat()
  {
  }

  //void (__thiscall ***vdestructor_ptr)(Bloodsplat *, bool);
  float x;
  float y;
  float z;
  float radius;
  float dot_dist;
  char r;
  char g;
  char b;
  char field_1B;
  int field_1C;
  int field_20;
  int field_24;
};
#pragma pack(pop)

/*  159 */
#pragma pack(push, 1)
struct BloodsplatContainer
{
  //----- (0043B688) --------------------------------------------------------
  inline BloodsplatContainer()
  {
  /*_eh_vector_constructor_iterator_(
    this->std__vector_pBloodsplats,
    40,
    64,
    (void (__thiscall *)(void *))Bloodsplat::Bloodsplat,
    (void (__thiscall *)(void *))Bloodsplat::dtor);
  v1->std__vector_pBloodsplats_size = 0;*/
    uNumBloodsplats = 0;
  }
  //----- (0043B6D6) --------------------------------------------------------
  virtual ~BloodsplatContainer()
  {
    //this->vdestructor_ptr = &BloodsplatContainer_pvdtor;
    //_eh_vector_destructor_iterator_(this->std__vector_pBloodsplats, 40, 64, Bloodsplat::dtor);
  }


  bool AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9);
  bool AddBloodsplat(float x, float y, float z, float radius, char r, char g, char b);


  //void (__thiscall ***vdestructor_ptr)(BloodsplatContainer *, bool);
  Bloodsplat std__vector_pBloodsplats[64];
  unsigned int std__vector_pBloodsplats_size;
  int uNumBloodsplats;
};
#pragma pack(pop)



extern struct BloodsplatContainer *pBloodsplatContainer; // idb