mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Fixed maps extractor. Patch provided by andstan. Not tested.
This commit is contained in:
parent
e58df484a2
commit
4c4f80df5a
3 changed files with 224 additions and 215 deletions
|
|
@ -10,34 +10,31 @@ typedef unsigned short uint16;
|
|||
typedef unsigned int uint32;
|
||||
class Liquid;
|
||||
typedef struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
}svec;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
} svec;
|
||||
|
||||
typedef struct {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
}vec;
|
||||
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;
|
||||
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;
|
||||
//Liquid *lq;
|
||||
float waterlevel[9][9];
|
||||
uint8 flag;
|
||||
}chunk;
|
||||
uint16 area_id;
|
||||
} chunk;
|
||||
|
||||
class WMO;
|
||||
class WMOManager;
|
||||
|
|
@ -45,9 +42,72 @@ void fixname(std::string &name);
|
|||
|
||||
typedef struct
|
||||
{
|
||||
chunk ch[16][16];
|
||||
}mcell;
|
||||
chunk ch[16][16];
|
||||
} mcell;
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
uint32 offsData1;
|
||||
uint32 used;
|
||||
uint32 offsData2;
|
||||
} MH2O_offsData;
|
||||
|
||||
typedef struct {
|
||||
uint16 flags;
|
||||
uint16 type;
|
||||
float heightLevel1;
|
||||
float heightLevel2;
|
||||
byte xOffset;
|
||||
byte yOffset;
|
||||
byte width;
|
||||
byte height;
|
||||
uint32 ofsData2a;
|
||||
uint32 ofsData2b;
|
||||
} MH2O_Data1;
|
||||
|
||||
class MPQFile;
|
||||
void LoadMapChunk(MPQFile &,chunk*);
|
||||
|
||||
bool MH2O_presence;
|
||||
MH2O_offsData *LiqOffsData;
|
||||
MH2O_Data1 *LiqChunkData1;
|
||||
float *ChunkLiqHeght, *MapLiqHeight;
|
||||
char* MapLiqFlag;
|
||||
uint32 k, m, chunk_num;
|
||||
void LoadMapChunk(MPQFile &, chunk*);
|
||||
bool LoadWMO(char* filename);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue