solocraft + dynamicxp
This commit is contained in:
44
src/tools/map_extractor/CMakeLists.txt
Normal file
44
src/tools/map_extractor/CMakeLists.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
# Copyright (C) 2005-2009 MaNGOS project <http://getmangos.com/>
|
||||
# Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
file(GLOB_RECURSE sources *.cpp *.h)
|
||||
|
||||
include_directories (
|
||||
${CMAKE_SOURCE_DIR}/src/server/shared
|
||||
${CMAKE_SOURCE_DIR}/dep/CascLib/src
|
||||
${CMAKE_SOURCE_DIR}/dep/cppformat
|
||||
${CMAKE_SOURCE_DIR}/dep/g3dlite/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/loadlib
|
||||
)
|
||||
|
||||
include_directories(${include_Dirs})
|
||||
|
||||
add_executable(mapextractor
|
||||
${sources}
|
||||
)
|
||||
|
||||
target_link_libraries(mapextractor
|
||||
casc
|
||||
common
|
||||
g3dlib
|
||||
${BZIP2_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
|
||||
add_dependencies(mapextractor casc)
|
||||
|
||||
if( UNIX )
|
||||
install(TARGETS mapextractor DESTINATION bin)
|
||||
elseif( WIN32 )
|
||||
install(TARGETS mapextractor DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
endif()
|
||||
1161
src/tools/map_extractor/System.cpp
Normal file
1161
src/tools/map_extractor/System.cpp
Normal file
File diff suppressed because it is too large
Load Diff
240
src/tools/map_extractor/adt.h
Normal file
240
src/tools/map_extractor/adt.h
Normal file
@@ -0,0 +1,240 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ADT_H
|
||||
#define ADT_H
|
||||
|
||||
#include "loadlib.h"
|
||||
|
||||
#define TILESIZE (533.33333f)
|
||||
#define CHUNKSIZE ((TILESIZE) / 16.0f)
|
||||
#define UNITSIZE (CHUNKSIZE / 8.0f)
|
||||
|
||||
enum LiquidType
|
||||
{
|
||||
LIQUID_TYPE_WATER = 0,
|
||||
LIQUID_TYPE_OCEAN = 1,
|
||||
LIQUID_TYPE_MAGMA = 2,
|
||||
LIQUID_TYPE_SLIME = 3
|
||||
};
|
||||
|
||||
//**************************************************************************************
|
||||
// ADT file class
|
||||
//**************************************************************************************
|
||||
#define ADT_CELLS_PER_GRID 16
|
||||
#define ADT_CELL_SIZE 8
|
||||
#define ADT_GRID_SIZE (ADT_CELLS_PER_GRID*ADT_CELL_SIZE)
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
//
|
||||
// Adt file height map chunk
|
||||
//
|
||||
struct adt_MCVT
|
||||
{
|
||||
union{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
float height_map[(ADT_CELL_SIZE+1)*(ADT_CELL_SIZE+1)+ADT_CELL_SIZE*ADT_CELL_SIZE];
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file liquid map chunk (old)
|
||||
//
|
||||
struct adt_MCLQ
|
||||
{
|
||||
union{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
float height1;
|
||||
float height2;
|
||||
struct liquid_data{
|
||||
uint32 light;
|
||||
float height;
|
||||
} liquid[ADT_CELL_SIZE+1][ADT_CELL_SIZE+1];
|
||||
|
||||
// 1<<0 - ochen
|
||||
// 1<<1 - lava/slime
|
||||
// 1<<2 - water
|
||||
// 1<<6 - all water
|
||||
// 1<<7 - dark water
|
||||
// == 0x0F - not show liquid
|
||||
uint8 flags[ADT_CELL_SIZE][ADT_CELL_SIZE];
|
||||
uint8 data[84];
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file cell chunk
|
||||
//
|
||||
struct adt_MCNK
|
||||
{
|
||||
union{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
uint32 flags;
|
||||
uint32 ix;
|
||||
uint32 iy;
|
||||
uint32 nLayers;
|
||||
uint32 nDoodadRefs;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint32 offsMCVT; // height map
|
||||
uint32 offsMCNR; // Normal vectors for each vertex
|
||||
} offsets;
|
||||
uint8 HighResHoles[8];
|
||||
} union_5_3_0;
|
||||
uint32 offsMCLY; // Texture layer definitions
|
||||
uint32 offsMCRF; // A list of indices into the parent file's MDDF chunk
|
||||
uint32 offsMCAL; // Alpha maps for additional texture layers
|
||||
uint32 sizeMCAL;
|
||||
uint32 offsMCSH; // Shadow map for static shadows on the terrain
|
||||
uint32 sizeMCSH;
|
||||
uint32 areaid;
|
||||
uint32 nMapObjRefs;
|
||||
uint32 holes;
|
||||
uint16 s[2];
|
||||
uint32 data1;
|
||||
uint32 data2;
|
||||
uint32 data3;
|
||||
uint32 predTex;
|
||||
uint32 nEffectDoodad;
|
||||
uint32 offsMCSE;
|
||||
uint32 nSndEmitters;
|
||||
uint32 offsMCLQ; // Liqid level (old)
|
||||
uint32 sizeMCLQ; //
|
||||
float zpos;
|
||||
float xpos;
|
||||
float ypos;
|
||||
uint32 offsMCCV; // offsColorValues in WotLK
|
||||
uint32 props;
|
||||
uint32 effectId;
|
||||
};
|
||||
|
||||
#define ADT_LIQUID_HEADER_FULL_LIGHT 0x01
|
||||
#define ADT_LIQUID_HEADER_NO_HIGHT 0x02
|
||||
|
||||
struct adt_liquid_header
|
||||
{
|
||||
uint16 liquidType; // Index from LiquidType.dbc
|
||||
uint16 formatFlags;
|
||||
float heightLevel1;
|
||||
float heightLevel2;
|
||||
uint8 xOffset;
|
||||
uint8 yOffset;
|
||||
uint8 width;
|
||||
uint8 height;
|
||||
uint32 offsData2a;
|
||||
uint32 offsData2b;
|
||||
};
|
||||
|
||||
//
|
||||
// Adt file liquid data chunk (new)
|
||||
//
|
||||
struct adt_MH2O
|
||||
{
|
||||
union{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
|
||||
struct adt_LIQUID{
|
||||
uint32 offsData1;
|
||||
uint32 used;
|
||||
uint32 offsData2;
|
||||
} liquid[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
|
||||
|
||||
adt_liquid_header *getLiquidData(int x, int y)
|
||||
{
|
||||
if (liquid[x][y].used && liquid[x][y].offsData1)
|
||||
return (adt_liquid_header *)((uint8*)this + 8 + liquid[x][y].offsData1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
float *getLiquidHeightMap(adt_liquid_header *h)
|
||||
{
|
||||
if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
|
||||
return 0;
|
||||
if (h->offsData2b)
|
||||
return (float *)((uint8*)this + 8 + h->offsData2b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint8 *getLiquidLightMap(adt_liquid_header *h)
|
||||
{
|
||||
if (h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT)
|
||||
return 0;
|
||||
if (h->offsData2b)
|
||||
{
|
||||
if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
|
||||
return (uint8 *)((uint8*)this + 8 + h->offsData2b);
|
||||
return (uint8 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 *getLiquidFullLightMap(adt_liquid_header *h)
|
||||
{
|
||||
if (!(h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT))
|
||||
return 0;
|
||||
if (h->offsData2b)
|
||||
{
|
||||
if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT)
|
||||
return (uint32 *)((uint8*)this + 8 + h->offsData2b);
|
||||
return (uint32 *)((uint8*)this + 8 + h->offsData2b + (h->width+1)*(h->height+1)*4);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 getLiquidShowMap(adt_liquid_header *h)
|
||||
{
|
||||
if (h->offsData2a)
|
||||
return *((uint64 *)((uint8*)this + 8 + h->offsData2a));
|
||||
else
|
||||
return 0xFFFFFFFFFFFFFFFFuLL;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
struct adt_MFBO
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
struct plane
|
||||
{
|
||||
int16 coords[9];
|
||||
};
|
||||
plane max;
|
||||
plane min;
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
209
src/tools/map_extractor/dbcfile.cpp
Normal file
209
src/tools/map_extractor/dbcfile.cpp
Normal file
@@ -0,0 +1,209 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "dbcfile.h"
|
||||
|
||||
DBCFile::DBCFile(char const* file, char const* fmt)
|
||||
{
|
||||
_file = file;
|
||||
_fmt = fmt;
|
||||
recordTable = nullptr;
|
||||
stringTable = nullptr;
|
||||
fieldsOffset = nullptr;
|
||||
|
||||
header.RecordSize = 0;
|
||||
header.RecordCount = 0;
|
||||
header.FieldCount = 0;
|
||||
header.BlockValue = 0;
|
||||
header.Signature = 0;
|
||||
header.Hash = 0;
|
||||
header.Build = 0;
|
||||
header.TimeStamp = 0;
|
||||
header.Min = 0;
|
||||
header.Max = 0;
|
||||
header.Locale = 0;
|
||||
header.ReferenceDataSize = 0;
|
||||
header.MetaFlags = 0;
|
||||
}
|
||||
|
||||
bool DBCFile::open()
|
||||
{
|
||||
if (recordTable)
|
||||
{
|
||||
delete[] recordTable;
|
||||
recordTable = nullptr;
|
||||
}
|
||||
|
||||
FILE* f = fopen(_file, "rb");
|
||||
if (!f)
|
||||
return false;
|
||||
|
||||
if (fread(&header.Signature, sizeof(uint32), 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fread(&header.RecordCount, sizeof(uint32), 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fread(&header.FieldCount, sizeof(uint32), 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fread(&header.RecordSize, sizeof(uint32), 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fread(&header.BlockValue, sizeof(uint32), 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
fread(&header.Hash, sizeof(uint32), 1, f);
|
||||
fread(&header.Build, sizeof(uint32), 1, f);
|
||||
fread(&header.TimeStamp, sizeof(uint32), 1, f);
|
||||
fread(&header.Min, sizeof(uint32), 1, f);
|
||||
fread(&header.Max, sizeof(uint32), 1, f);
|
||||
fread(&header.Locale, sizeof(uint32), 1, f);
|
||||
fread(&header.ReferenceDataSize, sizeof(uint32), 1, f);
|
||||
//fread(&header.MetaFlags, sizeof(uint32), 1, f);
|
||||
|
||||
recordTable = new unsigned char[header.RecordSize * header.RecordCount + header.BlockValue];
|
||||
stringTable = recordTable + header.RecordSize * header.RecordCount;
|
||||
|
||||
if (fread(recordTable, header.RecordSize * header.RecordCount + header.BlockValue, 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
fieldsOffset = new uint32[header.FieldCount];
|
||||
fieldsOffset[0] = 0;
|
||||
for (uint32 i = 1; i < header.FieldCount; i++)
|
||||
{
|
||||
fieldsOffset[i] = fieldsOffset[i - 1];
|
||||
switch (_fmt[i - 1])
|
||||
{
|
||||
case 'l':
|
||||
fieldsOffset[i] += sizeof(uint64);
|
||||
break;
|
||||
case 'n':
|
||||
case 'i':
|
||||
case 'f':
|
||||
fieldsOffset[i] += sizeof(uint32);
|
||||
break;
|
||||
case 't':
|
||||
fieldsOffset[i] += sizeof(uint16);
|
||||
break;
|
||||
case 'b':
|
||||
fieldsOffset[i] += sizeof(uint8);
|
||||
break;
|
||||
case 's':
|
||||
fieldsOffset[i] += 4/*sizeof(char*)*/; //! WARNING! Size 4
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
DBCFile::~DBCFile()
|
||||
{
|
||||
delete[] recordTable;
|
||||
}
|
||||
|
||||
DBCFile::Record DBCFile::getRecord(size_t id)
|
||||
{
|
||||
assert(recordTable);
|
||||
return Record(*this, recordTable + id * header.RecordSize);
|
||||
}
|
||||
|
||||
float DBCFile::Record::getFloat(size_t field) const
|
||||
{
|
||||
assert(field < file.header.FieldCount);
|
||||
return *reinterpret_cast<float*>(offset + file.GetOffset(field));
|
||||
}
|
||||
|
||||
uint32 DBCFile::Record::getUInt(size_t field) const
|
||||
{
|
||||
assert(field < file.header.FieldCount);
|
||||
return *reinterpret_cast<uint32*>(offset + file.GetOffset(field));
|
||||
}
|
||||
|
||||
uint8 DBCFile::Record::getUInt8(size_t field) const
|
||||
{
|
||||
assert(field < file.header.FieldCount);
|
||||
return *reinterpret_cast<uint8*>(offset + file.GetOffset(field));
|
||||
}
|
||||
|
||||
uint16 DBCFile::Record::getUInt16(size_t field) const
|
||||
{
|
||||
assert(field < file.header.FieldCount);
|
||||
return *reinterpret_cast<uint16*>(offset + file.GetOffset(field));
|
||||
}
|
||||
|
||||
uint64 DBCFile::Record::getUInt64(size_t field) const
|
||||
{
|
||||
assert(field < file.header.FieldCount);
|
||||
return *reinterpret_cast<uint64*>(offset + file.GetOffset(field));
|
||||
}
|
||||
|
||||
char const* DBCFile::Record::getString(size_t field) const
|
||||
{
|
||||
assert(field < file.header.FieldCount);
|
||||
return reinterpret_cast<char*>(file.stringTable + getUInt(field));
|
||||
}
|
||||
|
||||
size_t DBCFile::getMaxId()
|
||||
{
|
||||
assert(recordTable);
|
||||
|
||||
size_t maxId = 0;
|
||||
for (size_t i = 0; i < getRecordCount(); ++i)
|
||||
if (maxId < getRecord(i).getUInt(0))
|
||||
maxId = getRecord(i).getUInt(0);
|
||||
|
||||
return maxId;
|
||||
}
|
||||
|
||||
DBCFile::Iterator DBCFile::begin()
|
||||
{
|
||||
assert(recordTable);
|
||||
return Iterator(*this, recordTable);
|
||||
}
|
||||
|
||||
DBCFile::Iterator DBCFile::end()
|
||||
{
|
||||
assert(recordTable);
|
||||
return Iterator(*this, stringTable);
|
||||
}
|
||||
110
src/tools/map_extractor/dbcfile.h
Normal file
110
src/tools/map_extractor/dbcfile.h
Normal file
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DBCFILE_H
|
||||
#define DBCFILE_H
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
class DBCFile
|
||||
{
|
||||
public:
|
||||
DBCFile(char const* file, char const* fmt);
|
||||
~DBCFile();
|
||||
|
||||
bool open();
|
||||
|
||||
class Iterator;
|
||||
class Record
|
||||
{
|
||||
public:
|
||||
float getFloat(size_t field) const;
|
||||
uint32 getUInt(size_t field) const;
|
||||
uint8 getUInt8(size_t field) const;
|
||||
uint16 getUInt16(size_t field) const;
|
||||
uint64 getUInt64(size_t field) const;
|
||||
char const* getString(size_t field) const;
|
||||
|
||||
private:
|
||||
Record(DBCFile& file, unsigned char* offset) : file(file), offset(offset) { }
|
||||
DBCFile& file;
|
||||
unsigned char* offset;
|
||||
|
||||
friend class DBCFile;
|
||||
friend class DBCFile::Iterator;
|
||||
|
||||
Record& operator=(Record const& right);
|
||||
};
|
||||
|
||||
class Iterator
|
||||
{
|
||||
public:
|
||||
Iterator(DBCFile &file, unsigned char* offset) : record(file, offset) { }
|
||||
Iterator& operator++()
|
||||
{
|
||||
record.offset += record.file.header.RecordSize;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Record const& operator*() const { return record; }
|
||||
Record const* operator->() const { return &record; }
|
||||
bool operator==(Iterator const& b) const { return record.offset == b.record.offset; }
|
||||
bool operator!=(Iterator const& b) const { return record.offset != b.record.offset; }
|
||||
|
||||
private:
|
||||
Record record;
|
||||
Iterator& operator=(Iterator const& right);
|
||||
};
|
||||
|
||||
Record getRecord(size_t id);
|
||||
uint32 GetOffset(size_t id) const { return (fieldsOffset != nullptr && id < header.FieldCount) ? fieldsOffset[id] : 0; }
|
||||
Iterator begin();
|
||||
Iterator end();
|
||||
size_t getRecordCount() const { return header.RecordCount; }
|
||||
size_t getFieldCount() const { return header.FieldCount; }
|
||||
size_t getMaxId();
|
||||
|
||||
private:
|
||||
uint32* fieldsOffset;
|
||||
char const* _file;
|
||||
unsigned char* recordTable;
|
||||
unsigned char* stringTable;
|
||||
char const* _fmt;
|
||||
|
||||
struct
|
||||
{
|
||||
uint32 Signature;
|
||||
uint32 RecordCount;
|
||||
uint32 FieldCount;
|
||||
uint32 RecordSize;
|
||||
uint32 BlockValue;
|
||||
uint32 Hash;
|
||||
uint32 Build;
|
||||
uint32 TimeStamp;
|
||||
uint32 Min;
|
||||
uint32 Max;
|
||||
uint32 Locale;
|
||||
uint32 ReferenceDataSize;
|
||||
uint32 MetaFlags;
|
||||
} header;
|
||||
};
|
||||
|
||||
#endif
|
||||
201
src/tools/map_extractor/loadlib.cpp
Normal file
201
src/tools/map_extractor/loadlib.cpp
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "loadlib.h"
|
||||
#include <cstdio>
|
||||
|
||||
u_map_fcc MverMagic = { { 'R','E','V','M' } };
|
||||
|
||||
ChunkedFile::ChunkedFile()
|
||||
{
|
||||
data = 0;
|
||||
data_size = 0;
|
||||
}
|
||||
|
||||
ChunkedFile::~ChunkedFile()
|
||||
{
|
||||
free();
|
||||
}
|
||||
|
||||
bool ChunkedFile::loadFile(std::string const& fileName, bool log)
|
||||
{
|
||||
free();
|
||||
FILE* f = fopen(fileName.c_str(), "rb");
|
||||
if (!f)
|
||||
{
|
||||
if (log)
|
||||
printf("No such file %s\n", fileName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
fseek(f, 0, SEEK_END);
|
||||
data_size = ftell(f);
|
||||
rewind(f);
|
||||
|
||||
data = new uint8[data_size];
|
||||
if (fread(data, data_size, 1, f) != 1)
|
||||
{
|
||||
fprintf(stderr, "ChunkedFile::loadFile Can't read %s, size=%u ferror %s\n", fileName.c_str(), uint32(data_size), strerror(ferror(f)));
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
|
||||
parseChunks();
|
||||
if (prepareLoadedData())
|
||||
{
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
printf("ChunkedFile::loadFile Error loading %s\n", fileName.c_str());
|
||||
fclose(f);
|
||||
free();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChunkedFile::prepareLoadedData()
|
||||
{
|
||||
FileChunk* chunk = GetChunk("MVER");
|
||||
if (!chunk)
|
||||
return false;
|
||||
|
||||
// Check version
|
||||
file_MVER* version = chunk->As<file_MVER>();
|
||||
if (version->fcc != MverMagic.fcc)
|
||||
return false;
|
||||
if (version->ver != FILE_FORMAT_VERSION)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void ChunkedFile::free()
|
||||
{
|
||||
for (auto chunk : chunks)
|
||||
delete chunk.second;
|
||||
|
||||
chunks.clear();
|
||||
|
||||
delete[] data;
|
||||
data = 0;
|
||||
data_size = 0;
|
||||
}
|
||||
|
||||
u_map_fcc InterestingChunks[] =
|
||||
{
|
||||
{ { 'R', 'E', 'V', 'M' } },
|
||||
{ { 'N', 'I', 'A', 'M' } },
|
||||
{ { 'O', '2', 'H', 'M' } },
|
||||
{ { 'K', 'N', 'C', 'M' } },
|
||||
{ { 'T', 'V', 'C', 'M' } },
|
||||
{ { 'O', 'M', 'W', 'M' } },
|
||||
{ { 'Q', 'L', 'C', 'M' } },
|
||||
{ { 'O', 'B', 'F', 'M' } }
|
||||
};
|
||||
|
||||
bool IsInterestingChunk(u_map_fcc const& fcc)
|
||||
{
|
||||
for (u_map_fcc const& f : InterestingChunks)
|
||||
if (f.fcc == fcc.fcc)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ChunkedFile::parseChunks()
|
||||
{
|
||||
uint8* ptr = GetData();
|
||||
// Make sure there's enough data to read u_map_fcc struct and the uint32 size after it
|
||||
while (ptr <= GetData() + GetDataSize() - 8)
|
||||
{
|
||||
u_map_fcc header = *(u_map_fcc*)ptr;
|
||||
if (IsInterestingChunk(header))
|
||||
{
|
||||
uint32 size = *(uint32*)(ptr + 4);
|
||||
if (size <= data_size)
|
||||
{
|
||||
std::swap(header.fcc_txt[0], header.fcc_txt[3]);
|
||||
std::swap(header.fcc_txt[1], header.fcc_txt[2]);
|
||||
|
||||
FileChunk* chunk = new FileChunk(ptr, size);
|
||||
chunk->parseSubChunks();
|
||||
chunks.insert({ std::string(header.fcc_txt, 4), chunk });
|
||||
}
|
||||
|
||||
// move to next chunk
|
||||
ptr += size + 8;
|
||||
}
|
||||
else
|
||||
++ptr;
|
||||
}
|
||||
}
|
||||
|
||||
FileChunk* ChunkedFile::GetChunk(std::string const& name)
|
||||
{
|
||||
auto range = chunks.equal_range(name);
|
||||
if (std::distance(range.first, range.second) == 1)
|
||||
return range.first->second;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FileChunk::~FileChunk()
|
||||
{
|
||||
for (auto subchunk : subchunks)
|
||||
delete subchunk.second;
|
||||
|
||||
subchunks.clear();
|
||||
}
|
||||
|
||||
void FileChunk::parseSubChunks()
|
||||
{
|
||||
uint8* ptr = data + 8; // skip self
|
||||
while (ptr < data + size)
|
||||
{
|
||||
u_map_fcc header = *(u_map_fcc*)ptr;
|
||||
if (IsInterestingChunk(header))
|
||||
{
|
||||
uint32 subsize = *(uint32*)(ptr + 4);
|
||||
if (subsize < size)
|
||||
{
|
||||
std::swap(header.fcc_txt[0], header.fcc_txt[3]);
|
||||
std::swap(header.fcc_txt[1], header.fcc_txt[2]);
|
||||
|
||||
FileChunk* chunk = new FileChunk(ptr, subsize);
|
||||
chunk->parseSubChunks();
|
||||
subchunks.insert({ std::string(header.fcc_txt, 4), chunk });
|
||||
}
|
||||
|
||||
// move to next chunk
|
||||
ptr += subsize + 8;
|
||||
}
|
||||
else
|
||||
++ptr;
|
||||
}
|
||||
}
|
||||
|
||||
FileChunk* FileChunk::GetSubChunk(std::string const& name)
|
||||
{
|
||||
auto range = subchunks.equal_range(name);
|
||||
if (std::distance(range.first, range.second) == 1)
|
||||
return range.first->second;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
599
src/tools/map_extractor/loadlib/DBFilesClientList.h
Normal file
599
src/tools/map_extractor/loadlib/DBFilesClientList.h
Normal file
@@ -0,0 +1,599 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DBFilesClientList_h__
|
||||
#define DBFilesClientList_h__
|
||||
|
||||
char const* DBFilesClientList[] =
|
||||
{
|
||||
"DBFilesClient\\Achievement",
|
||||
"DBFilesClient\\Achievement_Category",
|
||||
"DBFilesClient\\AdventureJournal",
|
||||
"DBFilesClient\\AnimKit",
|
||||
"DBFilesClient\\AnimKitBoneSet",
|
||||
"DBFilesClient\\AnimKitBoneSetAlias",
|
||||
"DBFilesClient\\AnimKitConfig",
|
||||
"DBFilesClient\\AnimKitConfigBoneSet",
|
||||
"DBFilesClient\\AnimKitPriority",
|
||||
"DBFilesClient\\AnimKitSegment",
|
||||
"DBFilesClient\\AnimReplacement",
|
||||
"DBFilesClient\\AnimReplacementSet",
|
||||
"DBFilesClient\\AnimationData",
|
||||
"DBFilesClient\\AreaGroup",
|
||||
"DBFilesClient\\AreaGroupMember",
|
||||
"DBFilesClient\\AreaPOI",
|
||||
"DBFilesClient\\AreaPOIState",
|
||||
"DBFilesClient\\AreaTable",
|
||||
"DBFilesClient\\AreaTrigger",
|
||||
"DBFilesClient\\AreaTriggerActionSet",
|
||||
"DBFilesClient\\AreaTriggerBox",
|
||||
"DBFilesClient\\AreaTriggerCylinder",
|
||||
"DBFilesClient\\AreaTriggerSphere",
|
||||
"DBFilesClient\\ArmorLocation",
|
||||
"DBFilesClient\\AuctionHouse",
|
||||
"DBFilesClient\\BankBagSlotPrices",
|
||||
"DBFilesClient\\BannedAddOns",
|
||||
"DBFilesClient\\BarberShopStyle",
|
||||
"DBFilesClient\\BattlePetAbility",
|
||||
"DBFilesClient\\BattlePetAbilityEffect",
|
||||
"DBFilesClient\\BattlePetAbilityState",
|
||||
"DBFilesClient\\BattlePetAbilityTurn",
|
||||
"DBFilesClient\\BattlePetBreedQuality",
|
||||
"DBFilesClient\\BattlePetBreedState",
|
||||
"DBFilesClient\\BattlePetEffectProperties",
|
||||
"DBFilesClient\\BattlePetNPCTeamMember",
|
||||
"DBFilesClient\\BattlePetSpecies",
|
||||
"DBFilesClient\\BattlePetSpeciesState",
|
||||
"DBFilesClient\\BattlePetSpeciesXAbility",
|
||||
"DBFilesClient\\BattlePetState",
|
||||
"DBFilesClient\\BattlePetVisual",
|
||||
"DBFilesClient\\BattlemasterList",
|
||||
"DBFilesClient\\BroadcastText",
|
||||
"DBFilesClient\\CameraMode",
|
||||
"DBFilesClient\\CameraShakes",
|
||||
"DBFilesClient\\CastableRaidBuffs",
|
||||
"DBFilesClient\\Cfg_Categories",
|
||||
"DBFilesClient\\Cfg_Configs",
|
||||
"DBFilesClient\\Cfg_Regions",
|
||||
"DBFilesClient\\CharBaseInfo",
|
||||
"DBFilesClient\\CharBaseSection",
|
||||
"DBFilesClient\\CharComponentTextureLayouts",
|
||||
"DBFilesClient\\CharComponentTextureSections",
|
||||
"DBFilesClient\\CharHairGeosets",
|
||||
"DBFilesClient\\CharSections",
|
||||
"DBFilesClient\\CharShipment",
|
||||
"DBFilesClient\\CharShipmentContainer",
|
||||
"DBFilesClient\\CharStartOutfit",
|
||||
"DBFilesClient\\CharTitles",
|
||||
"DBFilesClient\\CharacterFaceBoneSet",
|
||||
"DBFilesClient\\CharacterFacialHairStyles",
|
||||
"DBFilesClient\\CharacterLoadout",
|
||||
"DBFilesClient\\CharacterLoadoutItem",
|
||||
"DBFilesClient\\ChatChannels",
|
||||
"DBFilesClient\\ChatProfanity",
|
||||
"DBFilesClient\\ChrClasses",
|
||||
"DBFilesClient\\ChrClassesXPowerTypes",
|
||||
"DBFilesClient\\ChrRaces",
|
||||
"DBFilesClient\\ChrSpecialization",
|
||||
"DBFilesClient\\ChrUpgradeBucket",
|
||||
"DBFilesClient\\ChrUpgradeBucketSpell",
|
||||
"DBFilesClient\\ChrUpgradeTier",
|
||||
"DBFilesClient\\CinematicCamera",
|
||||
"DBFilesClient\\CinematicSequences",
|
||||
"DBFilesClient\\CombatCondition",
|
||||
"DBFilesClient\\Creature",
|
||||
"DBFilesClient\\CreatureDifficulty",
|
||||
"DBFilesClient\\CreatureDisplayInfo",
|
||||
"DBFilesClient\\CreatureDisplayInfoExtra",
|
||||
"DBFilesClient\\CreatureDisplayInfoTrn",
|
||||
"DBFilesClient\\CreatureFamily",
|
||||
"DBFilesClient\\CreatureImmunities",
|
||||
"DBFilesClient\\CreatureModelData",
|
||||
"DBFilesClient\\CreatureMovementInfo",
|
||||
"DBFilesClient\\CreatureSoundData",
|
||||
"DBFilesClient\\CreatureType",
|
||||
"DBFilesClient\\Criteria",
|
||||
"DBFilesClient\\CriteriaTree",
|
||||
"DBFilesClient\\CriteriaTreeXEffect",
|
||||
"DBFilesClient\\CurrencyCategory",
|
||||
"DBFilesClient\\CurrencyTypes",
|
||||
"DBFilesClient\\Curve",
|
||||
"DBFilesClient\\CurvePoint",
|
||||
"DBFilesClient\\DeathThudLookups",
|
||||
"DBFilesClient\\DeclinedWord",
|
||||
"DBFilesClient\\DeclinedWordCases",
|
||||
"DBFilesClient\\DestructibleModelData",
|
||||
"DBFilesClient\\DeviceBlacklist",
|
||||
"DBFilesClient\\DeviceDefaultSettings",
|
||||
"DBFilesClient\\Difficulty",
|
||||
"DBFilesClient\\DriverBlacklist",
|
||||
"DBFilesClient\\DungeonEncounter",
|
||||
"DBFilesClient\\DungeonMap",
|
||||
"DBFilesClient\\DungeonMapChunk",
|
||||
"DBFilesClient\\DurabilityCosts",
|
||||
"DBFilesClient\\DurabilityQuality",
|
||||
"DBFilesClient\\Emotes",
|
||||
"DBFilesClient\\EmotesText",
|
||||
"DBFilesClient\\EmotesTextData",
|
||||
"DBFilesClient\\EmotesTextSound",
|
||||
"DBFilesClient\\EnvironmentalDamage",
|
||||
"DBFilesClient\\Exhaustion",
|
||||
"DBFilesClient\\Faction",
|
||||
"DBFilesClient\\FactionGroup",
|
||||
"DBFilesClient\\FactionTemplate",
|
||||
"DBFilesClient\\FileData",
|
||||
"DBFilesClient\\FileDataComplete",
|
||||
"DBFilesClient\\FootprintTextures",
|
||||
"DBFilesClient\\FootstepTerrainLookup",
|
||||
"DBFilesClient\\FriendshipRepReaction",
|
||||
"DBFilesClient\\FriendshipReputation",
|
||||
"DBFilesClient\\GMSurveyAnswers",
|
||||
"DBFilesClient\\GMSurveyCurrentSurvey",
|
||||
"DBFilesClient\\GMSurveyQuestions",
|
||||
"DBFilesClient\\GMSurveySurveys",
|
||||
"DBFilesClient\\GMTicketCategory",
|
||||
"DBFilesClient\\GameObjectArtKit",
|
||||
"DBFilesClient\\GameObjectDiffAnimMap",
|
||||
"DBFilesClient\\GameObjectDisplayInfo",
|
||||
"DBFilesClient\\GameObjects",
|
||||
"DBFilesClient\\GameTables",
|
||||
"DBFilesClient\\GameTips",
|
||||
"DBFilesClient\\GarrAbility",
|
||||
"DBFilesClient\\GarrAbilityCategory",
|
||||
"DBFilesClient\\GarrAbilityEffect",
|
||||
"DBFilesClient\\GarrBuilding",
|
||||
"DBFilesClient\\GarrBuildingDoodadSet",
|
||||
"DBFilesClient\\GarrBuildingPlotInst",
|
||||
"DBFilesClient\\GarrClassSpec",
|
||||
"DBFilesClient\\GarrEncounter",
|
||||
"DBFilesClient\\GarrEncounterXMechanic",
|
||||
"DBFilesClient\\GarrFollItemSet",
|
||||
"DBFilesClient\\GarrFollItemSetMember",
|
||||
"DBFilesClient\\GarrFollower",
|
||||
"DBFilesClient\\GarrFollowerLevelXP",
|
||||
"DBFilesClient\\GarrFollowerQuality",
|
||||
"DBFilesClient\\GarrFollowerType",
|
||||
"DBFilesClient\\GarrFollowerXAbility",
|
||||
"DBFilesClient\\GarrMechanic",
|
||||
"DBFilesClient\\GarrMechanicType",
|
||||
"DBFilesClient\\GarrMission",
|
||||
"DBFilesClient\\GarrMissionReward",
|
||||
"DBFilesClient\\GarrMissionTexture",
|
||||
"DBFilesClient\\GarrMissionType",
|
||||
"DBFilesClient\\GarrMissionXEncounter",
|
||||
"DBFilesClient\\GarrMssnBonusAbility",
|
||||
"DBFilesClient\\GarrPlot",
|
||||
"DBFilesClient\\GarrPlotBuilding",
|
||||
"DBFilesClient\\GarrPlotInstance",
|
||||
"DBFilesClient\\GarrPlotUICategory",
|
||||
"DBFilesClient\\GarrSiteLevel",
|
||||
"DBFilesClient\\GarrSiteLevelPlotInst",
|
||||
"DBFilesClient\\GarrSpecialization",
|
||||
"DBFilesClient\\GarrUiAnimClassInfo",
|
||||
"DBFilesClient\\GarrUiAnimRaceInfo",
|
||||
"DBFilesClient\\GemProperties",
|
||||
"DBFilesClient\\GlueScreenEmote",
|
||||
"DBFilesClient\\GlyphExclusiveCategory",
|
||||
"DBFilesClient\\GlyphProperties",
|
||||
"DBFilesClient\\GlyphRequiredSpec",
|
||||
"DBFilesClient\\GlyphSlot",
|
||||
"DBFilesClient\\GroundEffectDoodad",
|
||||
"DBFilesClient\\GroundEffectTexture",
|
||||
"DBFilesClient\\GroupFinderActivity",
|
||||
"DBFilesClient\\GroupFinderActivityGrp",
|
||||
"DBFilesClient\\GroupFinderCategory",
|
||||
"DBFilesClient\\GuildColorBackground",
|
||||
"DBFilesClient\\GuildColorBorder",
|
||||
"DBFilesClient\\GuildColorEmblem",
|
||||
"DBFilesClient\\GuildPerkSpells",
|
||||
"DBFilesClient\\Heirloom",
|
||||
"DBFilesClient\\HelmetAnimScaling",
|
||||
"DBFilesClient\\HelmetGeosetVisData",
|
||||
"DBFilesClient\\HighlightColor",
|
||||
"DBFilesClient\\HolidayDescriptions",
|
||||
"DBFilesClient\\HolidayNames",
|
||||
"DBFilesClient\\Holidays",
|
||||
"DBFilesClient\\ImportPriceArmor",
|
||||
"DBFilesClient\\ImportPriceQuality",
|
||||
"DBFilesClient\\ImportPriceShield",
|
||||
"DBFilesClient\\ImportPriceWeapon",
|
||||
"DBFilesClient\\Item-sparse",
|
||||
"DBFilesClient\\Item",
|
||||
"DBFilesClient\\ItemAppearance",
|
||||
"DBFilesClient\\ItemArmorQuality",
|
||||
"DBFilesClient\\ItemArmorShield",
|
||||
"DBFilesClient\\ItemArmorTotal",
|
||||
"DBFilesClient\\ItemBagFamily",
|
||||
"DBFilesClient\\ItemBonus",
|
||||
"DBFilesClient\\ItemBonusTreeNode",
|
||||
"DBFilesClient\\ItemClass",
|
||||
"DBFilesClient\\ItemCurrencyCost",
|
||||
"DBFilesClient\\ItemDamageAmmo",
|
||||
"DBFilesClient\\ItemDamageOneHand",
|
||||
"DBFilesClient\\ItemDamageOneHandCaster",
|
||||
"DBFilesClient\\ItemDamageRanged",
|
||||
"DBFilesClient\\ItemDamageThrown",
|
||||
"DBFilesClient\\ItemDamageTwoHand",
|
||||
"DBFilesClient\\ItemDamageTwoHandCaster",
|
||||
"DBFilesClient\\ItemDamageWand",
|
||||
"DBFilesClient\\ItemDisenchantLoot",
|
||||
"DBFilesClient\\ItemDisplayInfo",
|
||||
"DBFilesClient\\ItemEffect",
|
||||
"DBFilesClient\\ItemExtendedCost",
|
||||
"DBFilesClient\\ItemGroupSounds",
|
||||
"DBFilesClient\\ItemLimitCategory",
|
||||
"DBFilesClient\\ItemModifiedAppearance",
|
||||
"DBFilesClient\\ItemNameDescription",
|
||||
"DBFilesClient\\ItemPetFood",
|
||||
"DBFilesClient\\ItemPriceBase",
|
||||
"DBFilesClient\\ItemPurchaseGroup",
|
||||
"DBFilesClient\\ItemRandomProperties",
|
||||
"DBFilesClient\\ItemRandomSuffix",
|
||||
"DBFilesClient\\ItemSet",
|
||||
"DBFilesClient\\ItemSetSpell",
|
||||
"DBFilesClient\\ItemSpec",
|
||||
"DBFilesClient\\ItemSpecOverride",
|
||||
"DBFilesClient\\ItemSubClass",
|
||||
"DBFilesClient\\ItemSubClassMask",
|
||||
"DBFilesClient\\ItemToBattlePetSpecies",
|
||||
"DBFilesClient\\ItemToMountSpell",
|
||||
"DBFilesClient\\ItemUpgrade",
|
||||
"DBFilesClient\\ItemUpgradePath",
|
||||
"DBFilesClient\\ItemVisualEffects",
|
||||
"DBFilesClient\\ItemVisuals",
|
||||
"DBFilesClient\\ItemXBonusTree",
|
||||
"DBFilesClient\\JournalEncounter",
|
||||
"DBFilesClient\\JournalEncounterCreature",
|
||||
"DBFilesClient\\JournalEncounterItem",
|
||||
"DBFilesClient\\JournalEncounterSection",
|
||||
"DBFilesClient\\JournalEncounterXDifficulty",
|
||||
"DBFilesClient\\JournalInstance",
|
||||
"DBFilesClient\\JournalItemXDifficulty",
|
||||
"DBFilesClient\\JournalSectionXDifficulty",
|
||||
"DBFilesClient\\JournalTier",
|
||||
"DBFilesClient\\JournalTierXInstance",
|
||||
"DBFilesClient\\KeyChain",
|
||||
"DBFilesClient\\LanguageWords",
|
||||
"DBFilesClient\\Languages",
|
||||
"DBFilesClient\\LfgDungeonExpansion",
|
||||
"DBFilesClient\\LfgDungeonGroup",
|
||||
"DBFilesClient\\LfgDungeons",
|
||||
"DBFilesClient\\LfgDungeonsGroupingMap",
|
||||
"DBFilesClient\\LfgRoleRequirement",
|
||||
"DBFilesClient\\Light",
|
||||
"DBFilesClient\\LightData",
|
||||
"DBFilesClient\\LightParams",
|
||||
"DBFilesClient\\LightSkybox",
|
||||
"DBFilesClient\\LiquidMaterial",
|
||||
"DBFilesClient\\LiquidObject",
|
||||
"DBFilesClient\\LiquidType",
|
||||
"DBFilesClient\\LoadingScreenTaxiSplines",
|
||||
"DBFilesClient\\LoadingScreens",
|
||||
"DBFilesClient\\Locale",
|
||||
"DBFilesClient\\Location",
|
||||
"DBFilesClient\\Lock",
|
||||
"DBFilesClient\\LockType",
|
||||
"DBFilesClient\\LookAtController",
|
||||
"DBFilesClient\\MailTemplate",
|
||||
"DBFilesClient\\ManifestInterfaceActionIcon",
|
||||
"DBFilesClient\\ManifestInterfaceData",
|
||||
"DBFilesClient\\ManifestInterfaceItemIcon",
|
||||
"DBFilesClient\\ManifestInterfaceTOCData",
|
||||
"DBFilesClient\\ManifestMP3",
|
||||
"DBFilesClient\\Map",
|
||||
"DBFilesClient\\MapChallengeMode",
|
||||
"DBFilesClient\\MapDifficulty",
|
||||
"DBFilesClient\\MarketingPromotionsXLocale",
|
||||
"DBFilesClient\\Material",
|
||||
"DBFilesClient\\MinorTalent",
|
||||
"DBFilesClient\\ModelFileData",
|
||||
"DBFilesClient\\ModelManifest",
|
||||
"DBFilesClient\\ModelNameToManifest",
|
||||
"DBFilesClient\\ModifierTree",
|
||||
"DBFilesClient\\Mount",
|
||||
"DBFilesClient\\MountCapability",
|
||||
"DBFilesClient\\MountType",
|
||||
"DBFilesClient\\MountTypeXCapability",
|
||||
"DBFilesClient\\Movie",
|
||||
"DBFilesClient\\MovieFileData",
|
||||
"DBFilesClient\\MovieOverlays",
|
||||
"DBFilesClient\\MovieVariation",
|
||||
"DBFilesClient\\NPCSounds",
|
||||
"DBFilesClient\\NameGen",
|
||||
"DBFilesClient\\NamesProfanity",
|
||||
"DBFilesClient\\NamesReserved",
|
||||
"DBFilesClient\\NamesReservedLocale",
|
||||
"DBFilesClient\\ObjectEffect",
|
||||
"DBFilesClient\\ObjectEffectGroup",
|
||||
"DBFilesClient\\ObjectEffectModifier",
|
||||
"DBFilesClient\\ObjectEffectPackage",
|
||||
"DBFilesClient\\ObjectEffectPackageElem",
|
||||
"DBFilesClient\\OverrideSpellData",
|
||||
"DBFilesClient\\PageTextMaterial",
|
||||
"DBFilesClient\\PaperDollItemFrame",
|
||||
"DBFilesClient\\ParticleColor",
|
||||
"DBFilesClient\\Path",
|
||||
"DBFilesClient\\PathNode",
|
||||
"DBFilesClient\\PathNodeProperty",
|
||||
"DBFilesClient\\PathProperty",
|
||||
"DBFilesClient\\Phase",
|
||||
"DBFilesClient\\PhaseShiftZoneSounds",
|
||||
"DBFilesClient\\PhaseXPhaseGroup",
|
||||
"DBFilesClient\\PlayerCondition",
|
||||
"DBFilesClient\\PowerDisplay",
|
||||
"DBFilesClient\\PvpDifficulty",
|
||||
"DBFilesClient\\PvpItem",
|
||||
"DBFilesClient\\QuestFactionReward",
|
||||
"DBFilesClient\\QuestFeedbackEffect",
|
||||
"DBFilesClient\\QuestInfo",
|
||||
"DBFilesClient\\QuestLine",
|
||||
"DBFilesClient\\QuestLineXQuest",
|
||||
"DBFilesClient\\QuestMoneyReward",
|
||||
"DBFilesClient\\QuestObjectiveCliTask",
|
||||
"DBFilesClient\\QuestPOIBlob",
|
||||
"DBFilesClient\\QuestPOIPoint",
|
||||
"DBFilesClient\\QuestPOIPointCliTask",
|
||||
"DBFilesClient\\QuestPackageItem",
|
||||
"DBFilesClient\\QuestSort",
|
||||
"DBFilesClient\\QuestV2",
|
||||
"DBFilesClient\\QuestV2CliTask",
|
||||
"DBFilesClient\\QuestXP",
|
||||
"DBFilesClient\\RacialMounts",
|
||||
"DBFilesClient\\RandPropPoints",
|
||||
"DBFilesClient\\ResearchBranch",
|
||||
"DBFilesClient\\ResearchField",
|
||||
"DBFilesClient\\ResearchProject",
|
||||
"DBFilesClient\\ResearchSite",
|
||||
"DBFilesClient\\Resistances",
|
||||
"DBFilesClient\\RulesetItemUpgrade",
|
||||
"DBFilesClient\\RulesetRaidLootUpgrade",
|
||||
"DBFilesClient\\RulesetRaidOverride",
|
||||
"DBFilesClient\\ScalingStatDistribution",
|
||||
"DBFilesClient\\Scenario",
|
||||
"DBFilesClient\\ScenarioEventEntry",
|
||||
"DBFilesClient\\ScenarioStep",
|
||||
"DBFilesClient\\SceneScript",
|
||||
"DBFilesClient\\SceneScriptPackage",
|
||||
"DBFilesClient\\SceneScriptPackageMember",
|
||||
"DBFilesClient\\ScreenEffect",
|
||||
"DBFilesClient\\ScreenLocation",
|
||||
"DBFilesClient\\ServerMessages",
|
||||
"DBFilesClient\\SkillLine",
|
||||
"DBFilesClient\\SkillLineAbility",
|
||||
"DBFilesClient\\SkillLineAbilitySortedSpell",
|
||||
"DBFilesClient\\SkillRaceClassInfo",
|
||||
"DBFilesClient\\SoundAmbience",
|
||||
"DBFilesClient\\SoundAmbienceFlavor",
|
||||
"DBFilesClient\\SoundBus",
|
||||
"DBFilesClient\\SoundBusName",
|
||||
"DBFilesClient\\SoundEmitterPillPoints",
|
||||
"DBFilesClient\\SoundEmitters",
|
||||
"DBFilesClient\\SoundEntries",
|
||||
"DBFilesClient\\SoundEntriesAdvanced",
|
||||
"DBFilesClient\\SoundEntriesFallbacks",
|
||||
"DBFilesClient\\SoundFilter",
|
||||
"DBFilesClient\\SoundFilterElem",
|
||||
"DBFilesClient\\SoundOverride",
|
||||
"DBFilesClient\\SoundProviderPreferences",
|
||||
"DBFilesClient\\SpamMessages",
|
||||
"DBFilesClient\\SpecializationSpells",
|
||||
"DBFilesClient\\Spell",
|
||||
"DBFilesClient\\SpellActionBarPref",
|
||||
"DBFilesClient\\SpellActivationOverlay",
|
||||
"DBFilesClient\\SpellAuraOptions",
|
||||
"DBFilesClient\\SpellAuraRestrictions",
|
||||
"DBFilesClient\\SpellAuraRestrictionsDifficulty",
|
||||
"DBFilesClient\\SpellAuraVisXChrSpec",
|
||||
"DBFilesClient\\SpellAuraVisibility",
|
||||
"DBFilesClient\\SpellCastTimes",
|
||||
"DBFilesClient\\SpellCastingRequirements",
|
||||
"DBFilesClient\\SpellCategories",
|
||||
"DBFilesClient\\SpellCategory",
|
||||
"DBFilesClient\\SpellChainEffects",
|
||||
"DBFilesClient\\SpellClassOptions",
|
||||
"DBFilesClient\\SpellCooldowns",
|
||||
"DBFilesClient\\SpellDescriptionVariables",
|
||||
"DBFilesClient\\SpellDispelType",
|
||||
"DBFilesClient\\SpellDuration",
|
||||
"DBFilesClient\\SpellEffect",
|
||||
"DBFilesClient\\SpellEffectCameraShakes",
|
||||
"DBFilesClient\\SpellEffectGroupSize",
|
||||
"DBFilesClient\\SpellEffectScaling",
|
||||
"DBFilesClient\\SpellEquippedItems",
|
||||
"DBFilesClient\\SpellFlyout",
|
||||
"DBFilesClient\\SpellFlyoutItem",
|
||||
"DBFilesClient\\SpellFocusObject",
|
||||
"DBFilesClient\\SpellIcon",
|
||||
"DBFilesClient\\SpellInterrupts",
|
||||
"DBFilesClient\\SpellItemEnchantment",
|
||||
"DBFilesClient\\SpellItemEnchantmentCondition",
|
||||
"DBFilesClient\\SpellKeyboundOverride",
|
||||
"DBFilesClient\\SpellLearnSpell",
|
||||
"DBFilesClient\\SpellLevels",
|
||||
"DBFilesClient\\SpellMechanic",
|
||||
"DBFilesClient\\SpellMisc",
|
||||
"DBFilesClient\\SpellMiscDifficulty",
|
||||
"DBFilesClient\\SpellMissile",
|
||||
"DBFilesClient\\SpellMissileMotion",
|
||||
"DBFilesClient\\SpellPower",
|
||||
"DBFilesClient\\SpellPowerDifficulty",
|
||||
"DBFilesClient\\SpellProcsPerMinute",
|
||||
"DBFilesClient\\SpellProcsPerMinuteMod",
|
||||
"DBFilesClient\\SpellRadius",
|
||||
"DBFilesClient\\SpellRange",
|
||||
"DBFilesClient\\SpellReagents",
|
||||
"DBFilesClient\\SpellReagentsCurrency",
|
||||
"DBFilesClient\\SpellRuneCost",
|
||||
"DBFilesClient\\SpellScaling",
|
||||
"DBFilesClient\\SpellShapeshift",
|
||||
"DBFilesClient\\SpellShapeshiftForm",
|
||||
"DBFilesClient\\SpellSpecialUnitEffect",
|
||||
"DBFilesClient\\SpellTargetRestrictions",
|
||||
"DBFilesClient\\SpellTotems",
|
||||
"DBFilesClient\\SpellVisual",
|
||||
"DBFilesClient\\SpellVisualColorEffect",
|
||||
"DBFilesClient\\SpellVisualEffectName",
|
||||
"DBFilesClient\\SpellVisualKit",
|
||||
"DBFilesClient\\SpellVisualKitAreaModel",
|
||||
"DBFilesClient\\SpellVisualKitModelAttach",
|
||||
"DBFilesClient\\SpellVisualMissile",
|
||||
"DBFilesClient\\SpellXSpellVisual",
|
||||
"DBFilesClient\\Startup_Strings",
|
||||
"DBFilesClient\\Stationery",
|
||||
"DBFilesClient\\StringLookups",
|
||||
"DBFilesClient\\SummonProperties",
|
||||
"DBFilesClient\\Talent",
|
||||
"DBFilesClient\\TaxiNodes",
|
||||
"DBFilesClient\\TaxiPath",
|
||||
"DBFilesClient\\TaxiPathNode",
|
||||
"DBFilesClient\\TerrainMaterial",
|
||||
"DBFilesClient\\TerrainType",
|
||||
"DBFilesClient\\TerrainTypeSounds",
|
||||
"DBFilesClient\\TextureFileData",
|
||||
"DBFilesClient\\TotemCategory",
|
||||
"DBFilesClient\\Toy",
|
||||
"DBFilesClient\\TradeSkillCategory",
|
||||
"DBFilesClient\\TransportAnimation",
|
||||
"DBFilesClient\\TransportPhysics",
|
||||
"DBFilesClient\\TransportRotation",
|
||||
"DBFilesClient\\Trophy",
|
||||
"DBFilesClient\\TrophyInstance",
|
||||
"DBFilesClient\\TrophyType",
|
||||
"DBFilesClient\\UiTextureAtlas",
|
||||
"DBFilesClient\\UiTextureAtlasMember",
|
||||
"DBFilesClient\\UiTextureKit",
|
||||
"DBFilesClient\\UnitBlood",
|
||||
"DBFilesClient\\UnitBloodLevels",
|
||||
"DBFilesClient\\UnitCondition",
|
||||
"DBFilesClient\\UnitPowerBar",
|
||||
"DBFilesClient\\Vehicle",
|
||||
"DBFilesClient\\VehicleSeat",
|
||||
"DBFilesClient\\VehicleUIIndSeat",
|
||||
"DBFilesClient\\VehicleUIIndicator",
|
||||
"DBFilesClient\\VideoHardware",
|
||||
"DBFilesClient\\Vignette",
|
||||
"DBFilesClient\\VocalUISounds",
|
||||
"DBFilesClient\\WMOAreaTable",
|
||||
"DBFilesClient\\WbAccessControlList",
|
||||
"DBFilesClient\\WbCertBlacklist",
|
||||
"DBFilesClient\\WbCertWhitelist",
|
||||
"DBFilesClient\\WbPermissions",
|
||||
"DBFilesClient\\WeaponImpactSounds",
|
||||
"DBFilesClient\\WeaponSwingSounds2",
|
||||
"DBFilesClient\\WeaponTrail",
|
||||
"DBFilesClient\\Weather",
|
||||
"DBFilesClient\\WindSettings",
|
||||
"DBFilesClient\\WorldBossLockout",
|
||||
"DBFilesClient\\WorldChunkSounds",
|
||||
"DBFilesClient\\WorldEffect",
|
||||
"DBFilesClient\\WorldElapsedTimer",
|
||||
"DBFilesClient\\WorldMapArea",
|
||||
"DBFilesClient\\WorldMapContinent",
|
||||
"DBFilesClient\\WorldMapOverlay",
|
||||
"DBFilesClient\\WorldMapTransforms",
|
||||
"DBFilesClient\\WorldSafeLocs",
|
||||
"DBFilesClient\\WorldState",
|
||||
"DBFilesClient\\WorldStateExpression",
|
||||
"DBFilesClient\\WorldStateUI",
|
||||
"DBFilesClient\\WorldStateZoneSounds",
|
||||
"DBFilesClient\\World_PVP_Area",
|
||||
"DBFilesClient\\ZoneIntroMusicTable",
|
||||
"DBFilesClient\\ZoneLight",
|
||||
"DBFilesClient\\ZoneLightPoint",
|
||||
"DBFilesClient\\ZoneMusic",
|
||||
"DBFilesClient\\gtArmorMitigationByLvl",
|
||||
"DBFilesClient\\gtAttackPower",
|
||||
"DBFilesClient\\gtAttackPowerRanged",
|
||||
"DBFilesClient\\gtAvoidanceDim",
|
||||
"DBFilesClient\\gtBarberShopCostBase",
|
||||
"DBFilesClient\\gtBattlePetTypeDamageMod",
|
||||
"DBFilesClient\\gtBattlePetXP",
|
||||
"DBFilesClient\\gtChanceToDodgeBase",
|
||||
"DBFilesClient\\gtChanceToMeleeCrit",
|
||||
"DBFilesClient\\gtChanceToMeleeCritBase",
|
||||
"DBFilesClient\\gtChanceToParryBase",
|
||||
"DBFilesClient\\gtChanceToSpellCrit",
|
||||
"DBFilesClient\\gtChanceToSpellCritBase",
|
||||
"DBFilesClient\\gtCombatRatings",
|
||||
"DBFilesClient\\gtItemLevelByLevel",
|
||||
"DBFilesClient\\gtItemSocketCostPerLevel",
|
||||
"DBFilesClient\\gtNPCExpectedResistPhysExp1",
|
||||
"DBFilesClient\\gtNPCExpectedResistPhysExp2",
|
||||
"DBFilesClient\\gtNPCExpectedResistPhysExp3",
|
||||
"DBFilesClient\\gtNPCExpectedResistPhysExp4",
|
||||
"DBFilesClient\\gtNPCExpectedResistPhysExp5",
|
||||
"DBFilesClient\\gtNPCManaCostScaler",
|
||||
"DBFilesClient\\gtNpcDamageByClass",
|
||||
"DBFilesClient\\gtNpcDamageByClassExp1",
|
||||
"DBFilesClient\\gtNpcDamageByClassExp2",
|
||||
"DBFilesClient\\gtNpcDamageByClassExp3",
|
||||
"DBFilesClient\\gtNpcDamageByClassExp4",
|
||||
"DBFilesClient\\gtNpcDamageByClassExp5",
|
||||
"DBFilesClient\\gtNpcGuildExperience",
|
||||
"DBFilesClient\\gtNpcTotalHp",
|
||||
"DBFilesClient\\gtNpcTotalHpExp1",
|
||||
"DBFilesClient\\gtNpcTotalHpExp2",
|
||||
"DBFilesClient\\gtNpcTotalHpExp3",
|
||||
"DBFilesClient\\gtNpcTotalHpExp4",
|
||||
"DBFilesClient\\gtNpcTotalHpExp5",
|
||||
"DBFilesClient\\gtNpcTotalMp",
|
||||
"DBFilesClient\\gtOCTBaseHPByClass",
|
||||
"DBFilesClient\\gtOCTBaseMPByClass",
|
||||
"DBFilesClient\\gtOCTChanceToDodge",
|
||||
"DBFilesClient\\gtOCTChanceToParry",
|
||||
"DBFilesClient\\gtOCTClassCombatRatingScalar",
|
||||
"DBFilesClient\\gtOCTClassStats",
|
||||
"DBFilesClient\\gtOCTHPFromItems",
|
||||
"DBFilesClient\\gtOCTHpPerStamina",
|
||||
"DBFilesClient\\gtOCTLevelExperience",
|
||||
"DBFilesClient\\gtOCTMPFromItems",
|
||||
"DBFilesClient\\gtOCTMPPerIntellect",
|
||||
"DBFilesClient\\gtOCTNPCDpsScaler",
|
||||
"DBFilesClient\\gtOCTNPCExpectedAgility",
|
||||
"DBFilesClient\\gtOCTNPCExpectedIntellect",
|
||||
"DBFilesClient\\gtOCTNPCExpectedResistPhysical",
|
||||
"DBFilesClient\\gtOCTNPCExpectedSpirit",
|
||||
"DBFilesClient\\gtOCTNPCExpectedStamina",
|
||||
"DBFilesClient\\gtOCTNPCExpectedStrength",
|
||||
"DBFilesClient\\gtOCTNPCHPScaler",
|
||||
"DBFilesClient\\gtOCTRaceStats",
|
||||
"DBFilesClient\\gtPCBaseAgility",
|
||||
"DBFilesClient\\gtPCBaseIntellect",
|
||||
"DBFilesClient\\gtPCBaseSpirit",
|
||||
"DBFilesClient\\gtPCBaseStamina",
|
||||
"DBFilesClient\\gtPCBaseStrength",
|
||||
"DBFilesClient\\gtPCExpectedAgility",
|
||||
"DBFilesClient\\gtPCExpectedIntellect",
|
||||
"DBFilesClient\\gtPCExpectedSpirit",
|
||||
"DBFilesClient\\gtPCExpectedStamina",
|
||||
"DBFilesClient\\gtPCExpectedStrength",
|
||||
"DBFilesClient\\gtPVPRanks",
|
||||
"DBFilesClient\\gtRageGenScaler",
|
||||
"DBFilesClient\\gtRegenMPPerSpt",
|
||||
"DBFilesClient\\gtResilienceDR",
|
||||
"DBFilesClient\\gtResistanceInnateFire",
|
||||
"DBFilesClient\\gtResistanceInnateFrost",
|
||||
"DBFilesClient\\gtResistanceInnateHoly",
|
||||
"DBFilesClient\\gtResistanceInnateNature",
|
||||
"DBFilesClient\\gtResistanceInnateShadow",
|
||||
"DBFilesClient\\gtShieldBlockRegular",
|
||||
"DBFilesClient\\gtSpellScaling",
|
||||
"DBFilesClient\\gtXPGroupBonus",
|
||||
nullptr // terminator
|
||||
};
|
||||
|
||||
#endif // DBFilesClientList_h__
|
||||
102
src/tools/map_extractor/loadlib/loadlib.h
Normal file
102
src/tools/map_extractor/loadlib/loadlib.h
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LOAD_LIB_H
|
||||
#define LOAD_LIB_H
|
||||
|
||||
#include "Define.h"
|
||||
#ifdef TC_PLATFORM_WINDOWS
|
||||
#undef TC_PLATFORM_WINDOWS
|
||||
#endif
|
||||
#include <map>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#ifndef _WIN32
|
||||
int GetLastError();
|
||||
#endif
|
||||
|
||||
#define FILE_FORMAT_VERSION 18
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
union u_map_fcc
|
||||
{
|
||||
char fcc_txt[4];
|
||||
uint32 fcc;
|
||||
};
|
||||
|
||||
//
|
||||
// File version chunk
|
||||
//
|
||||
struct file_MVER
|
||||
{
|
||||
union{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
uint32 size;
|
||||
uint32 ver;
|
||||
};
|
||||
|
||||
struct file_MWMO
|
||||
{
|
||||
u_map_fcc fcc;
|
||||
uint32 size;
|
||||
char FileList[1];
|
||||
};
|
||||
|
||||
class FileChunk
|
||||
{
|
||||
public:
|
||||
FileChunk(uint8* data_, uint32 size_) : data(data_), size(size_) { }
|
||||
~FileChunk();
|
||||
|
||||
uint8* data;
|
||||
uint32 size;
|
||||
|
||||
template<class T>
|
||||
T* As() { return (T*)data; }
|
||||
void parseSubChunks();
|
||||
std::multimap<std::string, FileChunk*> subchunks;
|
||||
FileChunk* GetSubChunk(std::string const& name);
|
||||
};
|
||||
|
||||
class ChunkedFile
|
||||
{
|
||||
public:
|
||||
uint8 *data;
|
||||
uint32 data_size;
|
||||
|
||||
uint8 *GetData() { return data; }
|
||||
uint32 GetDataSize() { return data_size; }
|
||||
|
||||
ChunkedFile();
|
||||
virtual ~ChunkedFile();
|
||||
bool prepareLoadedData();
|
||||
bool loadFile(std::string const& fileName, bool log = true);
|
||||
void free();
|
||||
|
||||
void parseChunks();
|
||||
std::multimap<std::string, FileChunk*> chunks;
|
||||
FileChunk* GetChunk(std::string const& name);
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
50
src/tools/map_extractor/wdt.h
Normal file
50
src/tools/map_extractor/wdt.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WDT_H
|
||||
#define WDT_H
|
||||
#include "loadlib.h"
|
||||
|
||||
//**************************************************************************************
|
||||
// WDT file class and structures
|
||||
//**************************************************************************************
|
||||
#define WDT_MAP_SIZE 64
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
|
||||
class wdt_MAIN
|
||||
{
|
||||
union
|
||||
{
|
||||
uint32 fcc;
|
||||
char fcc_txt[4];
|
||||
};
|
||||
public:
|
||||
uint32 size;
|
||||
|
||||
struct adtData
|
||||
{
|
||||
uint32 flag;
|
||||
uint32 data1;
|
||||
} adt_list[64][64];
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user