view Outdoor.h @ 123:05b2d9653abc

15.11.12
author Ritor1
date Thu, 15 Nov 2012 16:36:30 +0600
parents 62772029b56d
children
line wrap: on
line source

#pragma
#include "BSPModel.h"
#include "OutdoorCamera.h"
#include "Indoor.h"



/*  256 */
#pragma pack(push, 1)
struct ODMHeader
{
  int uVersion;
  char pMagic[4];
  unsigned int uCompressedSize;
  unsigned int uDecompressedSize;
};
#pragma pack(pop)



/*   78 */
#pragma pack(push, 1)
struct OutdoorLocationTileType
{
  unsigned __int16 uTileGroup;
  unsigned __int16 uTileID;
};
#pragma pack(pop)




/*   79 */
#pragma pack(push, 1)
struct OutdoorLocationTerrain
{
  //----- (0047C794) --------------------------------------------------------
  inline OutdoorLocationTerrain()
  {
    this->pHeightmap = 0;
    this->pTilemap = 0;
    this->ptr_C = 0;
    this->field_10 = 0;
    this->field_12 = 0;

    pAttributemap = nullptr;
  }

  void _47C7A9();
  void Release();
  int _47C80A(int a2, int a3, int a4, int a5);
  int _47CB57(int a1, int a2, int a3);
  bool ZeroLandscape();
  bool Initialize();


  unsigned __int8 *pHeightmap;
  unsigned __int8 *pTilemap;
  unsigned __int8 *pAttributemap;
  void *ptr_C;
  __int16 field_10;
  __int16 field_12;
  __int16 field_14;
  __int16 field_16;
  int field_18;
  int field_1C;
};
#pragma pack(pop)


/*   81 */
#pragma pack(push, 1)
struct ODMFace
{
  bool HasEventHint();

  
  static bool IsBackfaceCulled(struct ODMFace *a1, struct RenderVertexSoft *a2, struct stru148 *a3);
  
  inline bool Invisible() const {return uAttributes & FACE_INVISIBLE;}
  inline bool Visible() const   {return !Invisible();}
  inline bool TwoSided() const  {return uAttributes & FACE_TWO_SIDED;}

  struct Plane_int_ pFacePlane;
  int zCalc1;
  int zCalc2;
  int zCalc3;
  unsigned int uAttributes;
  unsigned __int16 pVertexIDs[20];
  unsigned __int16 pTextureUIDs[20];
  unsigned __int16 pTextureVIDs[20];
  unsigned __int16 pXInterceptDisplacements[20];
  unsigned __int16 pYInterceptDisplacements[20];
  unsigned __int16 pZInterceptDisplacements[20];
  unsigned __int16 uTextureID;
  __int16 sTextureDeltaU;
  __int16 sTextureDeltaV;
  struct BBox_short_ pBoundingBox;
  __int16 sCogNumber;
  __int16 sCogTriggeredID;
  __int16 sCogTriggerType;
  char field_128;
  char field_129;
  unsigned __int8 uGradientVertex1;
  unsigned __int8 uGradientVertex2;
  unsigned __int8 uGradientVertex3;
  unsigned __int8 uGradientVertex4;
  unsigned __int8 uNumVertices;
  unsigned __int8 uPolygonType;
  unsigned __int8 uShadeType;
  unsigned __int8 bVisible;
  char field_132;
  char field_133;
};
#pragma pack(pop)



#pragma pack(push, 1)
struct OutdoorLocation
{
  //----- (004626BA) --------------------------------------------------------
  OutdoorLocation()
  {
    subconstuctor();
    uLastSunlightUpdateMinute = 0;
  }
  //----- (004626CD) --------------------------------------------------------
  void subconstuctor()
  {
    //OutdoorLocationTerrain::OutdoorLocationTerrain(&this->pTerrain);
    field_F0 = 0;
    field_F4 = 0x40000000u;
    //DLVHeader::DLVHeader(&v1->ddm);
    pSpawnPoints = 0;
    pBModels = 0;
    ptr_D4 = 0;
    pFaceIDLIST = 0;
    pOMAP = 0;
  }

  void ExecDraw(unsigned int bRedraw);
  unsigned int DrawActors();
  void CreateDebugLocation();
  void Release();
  bool Load(char *pFilename, ODMFace *File, size_t a4, int thisa);
  int _47ECC1(signed int a2);
  unsigned int DoGetTileTexture(unsigned int uX, unsigned int uZ);
  int _47ED83(signed int a2, signed int a3);
  int ActuallyGetSomeOtherTileInfo(unsigned int uX, unsigned int uY);
  int DoGetHeightOnTerrain(unsigned int uX, unsigned int uZ);
  int _47EE49(signed int a2, signed int a3, int a4);
  int _47EF60(int a2, int a3, int a4);
  bool _47F04C(signed int a2, signed int a3);
  bool _47F097(signed int a2, signed int a3);
  bool _47F0E2();
  bool PrepareDecorations();
  int _47F223_LooksLikeGenerateMonsterLoot();
  bool InitalizeActors(int a1);
  bool _47F3EA();
  bool LoadTileGroupIds();
  double GetFogDensityByTime();
  int GetSomeOtherTileInfo(int sX, int sY);
  unsigned int GetTileTexture(int sX, int sZ);
  int GetHeightOnTerrain(int sX, int sZ);
  bool Initialize(const char *pFilename, int File, size_t uRespawnInterval, int thisa);
  bool Release2();
  bool GetTravelDestination(signed int sPartyX, signed int sPartyZ, char *pOut, signed int a5);
  void MessWithLUN();
  unsigned int UpdateSunlightVectors();
  void UpdateFog();
  int GetNumFoodRequiredToRestInCurrentPos(int x, signed int y, int z);
  int SetFog();
  void Draw();


  char pLevelFilename[32];
  char pLocationFileName[32];
  char pLocationFileDescription[32];
  char pSkyTextureName[32];
  char pGroundTileset[32];
  OutdoorLocationTileType pTileTypes[4];
  unsigned int uNumBModels;
  struct OutdoorLocationTerrain pTerrain;
  void *ptr_D4;
  struct BSPModel *pBModels;
  unsigned int numFaceIDListElems;
  unsigned __int16 *pFaceIDLIST;
  unsigned int *pOMAP;
  unsigned int uSky_TextureID;
  unsigned int uMainTile_BitmapID;
  __int16 field_F0;
  __int16 field_F2;
  int field_F4;
  char field_F8[968];
  unsigned int uNumSpawnPoints;
  struct SpawnPointMM7 *pSpawnPoints;
  struct DDM_DLV_Header ddm;
  unsigned __int64 uLastVisitDay;
  char field_4F8[12];
  int day_attrib;
  int day_fogrange_1;
  int day_fogrange_2;
  char field_510[24];
  char array_528[968];
  char array_8F0[968];
  int field_CB8;
  int field_CBC_terrain_triangles_shade_type;
  int field_CC0;
  unsigned int pSpriteIDs_LUN[8];
  unsigned int uSpriteID_LUNFULL;
  int field_CE8;
  unsigned int uSpriteID_LUN3_4_cp;
  int field_CF0;
  unsigned int uSpriteID_LUN1_2_cp;
  int field_CF8;
  unsigned int uSpriteID_LUN1_4_cp;
  int field_D00;
  unsigned __int16 uSpriteID_LUN_SUN;
  __int16 field_D06;
  int field_D08;
  int field_D0C;
  int field_D10;
  int field_D14;
  int field_D18;
  int field_D1C;
  int field_D20;
  int field_D24;
  int field_D28;
  int field_D2C;
  Vec3_int_ vSunlight;
  int field_D3C;
  int field_D40;
  int field_D44;
  int field_D48;
  int field_D4C;
  float field_D50;
  int field_D54;
  int field_D58;
  int field_D5C;
  int field_D60;
  int field_D64;
  char field_D68[111900];
  float fFogDensity;
  int uLastSunlightUpdateMinute;
};
#pragma pack(pop)


extern struct OutdoorLocation *pOutdoor;













#include "Outdoor_stuff.h"