diff Indoor.h @ 0:8b8875f5b359

Initial commit
author Nomad
date Fri, 05 Oct 2012 16:07:14 +0200
parents
children 540178ef9b18
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Indoor.h	Fri Oct 05 16:07:14 2012 +0200
@@ -0,0 +1,535 @@
+#pragma once
+#include "VectorTypes.h"
+#include "IndoorCameraD3D.h"
+
+
+
+
+/*  319 */
+enum LEVEL_TYPE
+{
+  LEVEL_Indoor = 0x1,
+  LEVEL_Outdoor = 0x2,
+};
+extern LEVEL_TYPE uCurrentlyLoadedLevelType;
+
+
+
+
+
+/*   74 */
+#pragma pack(push, 1)
+struct LevelDecoration
+{
+  LevelDecoration();
+  int GetGlobalEvent();
+  int IsInteractive();
+  bool _47A825();
+
+
+  unsigned __int16 uDecorationDescID;
+  __int16 field_2;
+  struct Vec3_int_ vPosition;
+  int field_10_y_rot;
+  __int16 uCog;
+  __int16 field_16_event_id;
+  __int16 field_18;
+  __int16 field_1A;
+  __int16 field_1C;
+  __int16 field_1E;
+};
+#pragma pack(pop)
+extern LevelDecoration pLevelDecorations[3000];
+extern size_t uNumLevelDecorations;
+extern LevelDecoration *_5C3420_pDecoration;
+
+
+
+
+
+
+
+
+/*   86 */
+#pragma pack(push, 1)
+struct SpawnPointMM6
+{
+  Vec3_int_ vPosition;
+  unsigned __int16 uRadius;
+  unsigned __int16 uKind;
+  unsigned __int16 uIndex;
+  unsigned __int16 uAttributes;
+};
+#pragma pack(pop)
+
+
+
+/*  102 */
+#pragma pack(push, 1)
+struct SpawnPointMM7
+{
+  //----- (00448DD6) --------------------------------------------------------
+  SpawnPointMM7()
+  {
+    uRadius = 32;
+    uAttributes = 0;
+    uIndex = 0;
+    uKind = 0;
+    uGroup = 0;
+  }
+
+
+  Vec3_int_ vPosition;
+  unsigned __int16 uRadius;
+  unsigned __int16 uKind;
+  unsigned __int16 uIndex;
+  unsigned __int16 uAttributes;
+  unsigned int uGroup;
+};
+#pragma pack(pop)
+
+
+
+
+
+
+
+
+
+
+#pragma pack(push, 1)
+struct DDM_DLV_Header
+{
+  //----- (00462607) --------------------------------------------------------
+  inline DDM_DLV_Header()
+  {
+    this->uLastRepawnDay = 0;
+    this->uNumRespawns = 0;
+    this->uReputation = 0;
+    this->field_C_alert = 0;
+    this->uNumFacesInBModels = 0;
+    this->uNumDecorations = 0;
+    this->uNumBModels = 0;
+  }
+
+
+  int uNumRespawns;
+  int uLastRepawnDay;
+  int uReputation;
+  int field_C_alert;
+  unsigned int uNumFacesInBModels;
+  unsigned int uNumDecorations;
+  unsigned int uNumBModels;
+  int field_1C;
+  int field_20;
+  int field_24;
+};
+#pragma pack(pop)
+
+
+
+/*  291 */
+enum PolygonType : __int8
+{
+  POLYGON_Invalid = 0x0,
+  POLYGON_VerticalWall = 0x1,
+  POLYGON_unk = 0x2,
+  POLYGON_Floor = 0x3,
+  POLYGON_InBetweenFloorAndWall = 0x4,
+  POLYGON_Ceiling = 0x5,
+  POLYGON_InBetweenCeilingAndWall = 0x6,
+};
+
+/*   90 */
+#pragma pack(push, 1)
+struct BLVHeader
+{
+  char field_0[104];
+  unsigned int uFaces_fdata_Size;
+  unsigned int uSector_rdata_Size;
+  unsigned int uSector_lrdata_Size;
+  unsigned int uDoors_ddata_Size;
+  char field_78[16];
+};
+#pragma pack(pop)
+
+
+
+/*   96 */
+#pragma pack(push, 1)
+struct BLVSectorMM8
+{
+  int dword_000074;
+};
+#pragma pack(pop)
+
+/*   97 */
+#pragma pack(push, 1)
+struct BLVLightMM6
+{
+  Vec3_short_ vPosition;
+  __int16 uRadius;
+  __int16 uAttributes;
+  unsigned __int16 uBrightness;
+};
+#pragma pack(pop)
+
+/*   98 */
+#pragma pack(push, 1)
+struct BLVLightMM7
+{
+  struct Vec3_short_ vPosition;
+  __int16 uRadius;
+  char uRed;
+  char uGreen;
+  char uBlue;
+  char uType;
+  __int16 uAtributes;
+  __int16 uBrightness;
+};
+#pragma pack(pop)
+
+/*   99 */
+#pragma pack(push, 1)
+struct BLVLightMM8
+{
+  int uID;
+};
+#pragma pack(pop)
+
+/*  100 */
+#pragma pack(push, 1)
+struct BLVDoor
+{
+  unsigned int uAttributes;
+  unsigned int uDoorID;
+  unsigned int uTimeSinceTriggered;
+  Vec3_int_ vDirection;
+  int uMoveLength;
+  int uOpenSpeed;
+  int uCloseSpeed;
+  unsigned __int16 *pVertexIDs;
+  unsigned __int16 *pFaceIDs;
+  unsigned __int16 *pSectorIDs;
+  __int16 *pDeltaUs;
+  __int16 *pDeltaVs;
+  unsigned __int16 *pXOffsets;
+  unsigned __int16 *pYOffsets;
+  unsigned __int16 *pZOffsets;
+  unsigned __int16 uNumVertices;
+  unsigned __int16 uNumFaces;
+  __int16 field_48;
+  unsigned __int16 uNumOffsets;
+  unsigned __int16 uState;
+  __int16 field_4E;
+};
+#pragma pack(pop)
+
+/*  101 */
+#pragma pack(push, 1)
+struct BLVMapVertex
+{
+  unsigned __int16 uVertex1ID;
+  unsigned __int16 uVertex2ID;
+  unsigned __int16 uFace1ID;
+  unsigned __int16 uFace2ID;
+  __int16 sZ;
+  unsigned __int16 uFlags;
+};
+#pragma pack(pop)
+
+
+
+/*   93 */
+#pragma pack(push, 1)
+struct BLVFace
+{
+  //----- (0046ED02) --------------------------------------------------------
+  inline BLVFace()
+  {
+    this->uNumVertices = 0;
+    this->uAttributes = 0;
+    this->uFaceExtraID = 0;
+    this->pVertexIDs = 0;
+    this->pZInterceptDisplacements = 0;
+    this->pYInterceptDisplacements = 0;
+    this->pXInterceptDisplacements = 0;
+  }
+
+  char _get_normals(Vec3_int_ *a2, Vec3_int_ *a3);
+  struct Texture *GetTexture();
+  void FromODM(struct ODMFace *a2);
+
+
+  struct Plane_float_ pFacePlane;
+  struct Plane_int_ pFacePlane_old;
+  int zCalc1;
+  int zCalc2;
+  int zCalc3;
+  unsigned int uAttributes;
+  unsigned __int16 *pVertexIDs;
+  unsigned __int16 *pXInterceptDisplacements;
+  unsigned __int16 *pYInterceptDisplacements;
+  unsigned __int16 *pZInterceptDisplacements;
+  unsigned __int16 *pVertexUIDs;
+  unsigned __int16 *pVertexVIDs;
+  unsigned __int16 uFaceExtraID;
+  unsigned __int16 uBitmapID;
+  unsigned __int16 uSectorID;
+  __int16 uBackSectorID;
+  struct BBox_short_ pBounding;
+  PolygonType uPolygonType;
+  unsigned __int8 uNumVertices;
+  char field_5E;
+  char field_5F;
+};
+#pragma pack(pop)
+
+/*   94 */
+#pragma pack(push, 1)
+struct BLVFaceExtra
+{
+  int HasEventint();
+
+  __int16 field_0;
+  __int16 field_2;
+  __int16 field_4;
+  __int16 field_6;
+  __int16 field_8;
+  __int16 field_A;
+  __int16 field_C;
+  unsigned __int16 uAdditionalBitmapID;
+  __int16 field_10;
+  __int16 field_12;
+  __int16 sTextureDeltaU;
+  __int16 sTextureDeltaV;
+  __int16 sCogNumber;
+  unsigned __int16 uEventID;
+  __int16 field_1C;
+  __int16 field_1E;
+  __int16 field_20;
+  __int16 field_22;
+};
+#pragma pack(pop)
+
+/*   95 */
+#pragma pack(push, 1)
+struct BLVSector
+{
+  int field_0;
+  __int16 field_4;
+  __int16 field_6;
+  unsigned __int16 *pFloors;
+  __int16 field_C;
+  __int16 field_E;
+  unsigned __int16 *pWalls;
+  __int16 field_14;
+  __int16 field_16;
+  unsigned __int16 *pCeilings;
+  __int16 field_1C;
+  __int16 field_1E;
+  unsigned __int16 *pFluids;
+  __int16 uNumPortals;
+  __int16 field_26;
+  unsigned __int16 *pPortals;
+  __int16 field_2C;
+  __int16 uNumNonBSPFaces;
+  unsigned __int16 *pFaceIDs;
+  __int16 uNumCylinderFaces;
+  __int16 field_36;
+  int pCylinderFaces;
+  __int16 field_3C;
+  __int16 field_3E;
+  unsigned __int16 *pCogs;
+  unsigned __int16 uNumDecorations;
+  __int16 field_46;
+  unsigned __int16 *pDecorationIDs;
+  __int16 field_4C;
+  __int16 field_4E;
+  unsigned __int16 *pMarkers;
+  __int16 uNumLights;
+  __int16 field_56;
+  BLVLightMM7 *pLights;
+  __int16 uWaterLevel;
+  __int16 uMistLevel;
+  __int16 uLightDistanceMultiplier;
+  __int16 uMinAmbientLightLevel;
+  __int16 uFirstBSPNode;
+  __int16 exit_tag;
+  BBox_short_ pBounding;
+};
+#pragma pack(pop)
+
+
+
+
+
+
+
+/*   89 */
+#pragma pack(push, 1)
+struct IndoorLocation
+{
+  //----- (00462592) --------------------------------------------------------
+  inline IndoorLocation()
+  {
+    bLoaded = 0;
+    ptr_0002B8_sector_lrdata = 0;
+    ptr_0002B4_doors_ddata = 0;
+    ptr_0002B0_sector_rdata = 0;
+    ptr_2AC = 0;
+    pVertices = 0;
+    pFaces = 0;
+    pFaceExtras = 0;
+    pSectors = 0;
+    pLights = 0;
+    pDoors = 0;
+    pNodes = 0;
+    pMapVertices = 0;
+    uNumSpawnPoints = 0;
+    pSpawnPoints = 0;
+  }
+
+  int GetSector(int sX, int sY, int sZ);
+  void Release();
+  int Alloc();
+  bool Load(char *pFilename, int a3, size_t i, char *pDest);
+  void Draw();
+  void ToggleLight(unsigned int uLightID, unsigned int bToggle);
+
+  static unsigned int GetLocationIndex(const char *Str1);
+  static void ExecDraw(char a1);
+  static void ExecDraw_sub1(unsigned int uFaceID);
+  static void ExecDraw_sub0(unsigned int uFaceID, struct IndoorCameraD3D_Vec4 *pVertices, unsigned int uNumVertices, struct RenderVertexSoft *a4);
+
+  char pFilename[32];
+  char field_20[48];
+  unsigned int bLoaded;
+  char field_54[404];
+  struct BLVHeader blv;
+  unsigned int uNumVertices;
+  struct Vec3_short_ *pVertices;
+  unsigned int uNumFaces;
+  struct BLVFace *pFaces;
+  unsigned int uNumFaceExtras;
+  struct BLVFaceExtra *pFaceExtras;
+  int uNumSectors;
+  struct BLVSector *pSectors;
+  int uNumLights;
+  struct BLVLightMM7 *pLights;
+  int uNumDoors;
+  struct BLVDoor *pDoors;
+  unsigned int uNumNodes;
+  struct BSPNode *pNodes;
+  unsigned int *pMapVertices;
+  unsigned __int16 *ptr_2AC;
+  unsigned __int16 *ptr_0002B0_sector_rdata;
+  unsigned __int16 *ptr_0002B4_doors_ddata;
+  unsigned __int16 *ptr_0002B8_sector_lrdata;
+  unsigned int uNumSpawnPoints;
+  struct SpawnPointMM7 *pSpawnPoints;
+  struct DDM_DLV_Header dlv;
+  unsigned __int64 uLastVisitDay;
+  char field_2F4[48];
+  char _visible_outlines[876];
+};
+#pragma pack(pop)
+
+extern IndoorLocation *pIndoor;
+
+
+
+
+
+
+
+
+
+
+
+
+/*  263 */
+#pragma pack(push, 1)
+struct IndoorLocation_drawstru
+{
+  int field_0_timer;
+  int uFlags;
+  Vec3_int_ vPosition;
+  int sRotationY;
+  int sRotationX;
+  int field_1C_mb_fov;
+  unsigned __int16 *pRenderTarget;
+  unsigned int uTargetWidth;
+  unsigned int uTargetHeight;
+  unsigned int uViewportX;
+  unsigned int uViewportY;
+  unsigned int uViewportZ;
+  unsigned int uViewportW;
+  int field_3C;
+  int *pTargetZ;
+};
+#pragma pack(pop)
+
+
+
+
+
+
+
+
+
+
+
+
+/*  162 */
+#pragma pack(push, 1)
+struct BLVRenderParams
+{
+  int Set(struct IndoorLocation_drawstru *a2);
+
+  int field_0_timer_;
+  int uFlags;
+  Vec3_int_ vPartyPos;
+  int sPartyRotY;
+  int sPartyRotX;
+  int uRadius;
+  int sCosineY;
+  int sSineY;
+  int sCosineNegX;
+  int sSineNegX;
+  float fCosineY;
+  float fSineY;
+  float fCosineNegX;
+  float fSineNegX;
+  int field_40;
+  float field_44;
+  unsigned __int16 *pRenderTarget;
+  unsigned int uTargetWidth;
+  unsigned int uTargetHeight;
+  unsigned int uViewportX;
+  unsigned int uViewportY;
+  unsigned int uViewportZ;
+  unsigned int uViewportW;
+  int field_64;
+  int *pTargetZBuffer;
+  int uViewportHeight;
+  int field_70;
+  int uViewportCenterX;
+  int uViewportCenterY;
+  struct stru170_stru2 *field_7C;
+  int field_80;
+  int field_84;
+  int field_88;
+  int field_8C;
+  int field_90;
+  int field_94;
+};
+#pragma pack(pop)
+
+extern struct BLVRenderParams *pBLVRenderParams;
+
+
+
+
+
+#include "Indoor_stuff.h"
\ No newline at end of file