diff options
author | megamage <none@none> | 2008-12-24 09:58:26 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-24 09:58:26 -0600 |
commit | 3cb4e7c716b11f357b3265257c51e7b6cc5c36f9 (patch) | |
tree | ed8ffaba5cf5c5149c413935b76de800198b7903 /contrib/extractor/adt.h | |
parent | c81299e6536e249ca05eebf100f3f350522da7da (diff) |
*Update to Mangos 6938. (Only build for VC9)
--HG--
branch : trunk
Diffstat (limited to 'contrib/extractor/adt.h')
-rw-r--r-- | contrib/extractor/adt.h | 141 |
1 files changed, 108 insertions, 33 deletions
diff --git a/contrib/extractor/adt.h b/contrib/extractor/adt.h index 6e079461a66..ec607c9d7bc 100644 --- a/contrib/extractor/adt.h +++ b/contrib/extractor/adt.h @@ -9,46 +9,121 @@ typedef unsigned char uint8; typedef unsigned short uint16; typedef unsigned int uint32; class Liquid; -typedef struct { -float x; -float y; -float z; -}svec; - -typedef struct { -double x; -double y; -double z; -}vec; - -typedef struct{ +typedef struct +{ + float x; + float y; + float z; +} svec; + +typedef struct +{ + double x; + double y; + double z; +} vec; + +typedef struct +{ vec v[3]; -}triangle; +} triangle; + +typedef struct +{ + float v9[16 * 8 + 1][16 * 8 + 1]; + float v8[16 * 8][16 * 8]; +} Cell; + +typedef struct +{ + double v9[9][9]; + double v8[8][8]; + uint16 area_id; +} chunk; -typedef struct{ -float v9[16*8+1][16*8+1]; -float v8[16*8][16*8]; -}Cell; +typedef struct +{ + chunk ch[16][16]; +} mcell; -typedef struct{ -double v9[9][9]; -double v8[8][8]; -uint16 area_id; -//Liquid *lq; -float waterlevel[9][9]; -uint8 flag; -}chunk; +struct MapChunkHeader +{ + uint32 flags; + uint32 ix; + uint32 iy; + uint32 nLayers; + uint32 nDoodadRefs; + uint32 ofsHeight; + uint32 ofsNormal; + uint32 ofsLayer; + uint32 ofsRefs; + uint32 ofsAlpha; + uint32 sizeAlpha; + uint32 ofsShadow; + uint32 sizeShadow; + uint32 areaid; + uint32 nMapObjRefs; + uint32 holes; + uint16 s1; + uint16 s2; + uint32 d1; + uint32 d2; + uint32 d3; + uint32 predTex; + uint32 nEffectDoodad; + uint32 ofsSndEmitters; + uint32 nSndEmitters; + uint32 ofsLiquid; // not use in WotLK + uint32 sizeLiquid; // not use in WotLK + float zpos; + float xpos; + float ypos; + uint32 textureId; // new offsColorValues in WotLK + uint32 props; + uint32 effectId; +}; -class WMO; -class WMOManager; -void fixname(std::string &name); +typedef struct +{ + uint32 offsData1; + uint32 used; + uint32 offsData2; +} MH2O_offsData; typedef struct { -chunk ch[16][16]; -}mcell; + uint16 LiquidTypeId; + uint16 type; + float heightLevel1; + float heightLevel2; + uint8 xOffset; + uint8 yOffset; + uint8 width; + uint8 height; + uint32 ofsData2a; + uint32 ofsData2b; +} MH2O_Data1; + +typedef struct +{ + uint16 unk1; + uint16 unk2; + float height; +} LiqData; + +enum LiquidType +{ + LIQUID_TYPE_WATER = 0, + LIQUID_TYPE_OCEAN = 1, + LIQUID_TYPE_MAGMA = 2, + LIQUID_TYPE_SLIME = 3 +}; + class MPQFile; -void LoadMapChunk(MPQFile &,chunk*); -bool LoadWMO(char* filename); + +float *MapLiqHeight; +uint8 *MapLiqFlag; +uint32 k, m, chunk_num; +void LoadMapChunk(MPQFile &, chunk*); #endif |