diff --git a/contrib/vmap_extractor_v3/.gitignore b/contrib/vmap_extractor_v3/.gitignore
deleted file mode 100644
index ee7b95b83..000000000
--- a/contrib/vmap_extractor_v3/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# NOTE! Don't add files that are generated in specific
-# subdirectories here. Add them in the ".gitignore" file
-# in that subdirectory instead.
-#
-# NOTE! Please use 'git-ls-files -i --exclude-standard'
-# command after changing this file, to see if there are
-# any tracked files which get ignored after the change.
-#
-# MaNGOS generated files at Windows build
-#
-
-bin
diff --git a/contrib/vmap_extractor_v3/CMakeLists.txt b/contrib/vmap_extractor_v3/CMakeLists.txt
deleted file mode 100644
index a7c085c43..000000000
--- a/contrib/vmap_extractor_v3/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2005-2012 MaNGOS project
-#
-# 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.
-
-cmake_minimum_required (VERSION 2.6)
-project (MANGOS_VMAP_EXTRACT_IO)
-
-
-# uncomment next line to disable debug mode
-ADD_DEFINITIONS("-DIOMAP_DEBUG")
-# build setup currently only supports libmpq 0.4.x
-ADD_DEFINITIONS("-DUSE_LIBMPQ04")
-ADD_DEFINITIONS("-Wall")
-ADD_DEFINITIONS("-ggdb")
-ADD_DEFINITIONS("-O3")
-
-include_directories(../../dep/libmpq)
-
-add_subdirectory(vmapextract)
diff --git a/contrib/vmap_extractor_v3/README b/contrib/vmap_extractor_v3/README
deleted file mode 100644
index 5c58b697c..000000000
--- a/contrib/vmap_extractor_v3/README
+++ /dev/null
@@ -1,42 +0,0 @@
-Linux:
-
-1. Building
-
- Because vmap_extractor depends on libmpq for reading mpq files, you will have
- to build libmpq prior to vmap_extractor. Therefore cd to dep/libmpq and execute:
-
- $ ./autogen.sh
- $ ./configure
- $ make
-
- After that, cd to contrib/vmap_extractor_v2/ and execute:
-
- $ cmake .
- $ make
-
- You should now have an executable file at vmapextract/vmapextractor
-
-2. Extracting
-
- Use the created executable to extract model information. Change the data path if
- needed.
-
- $ vmapextract/vmapextractor -d /mnt/windows/games/wow/Data/
-
- Resulting files will be in ./Buildings
-
-###########################
-Windows:
-
-1. Building
-
- Just build the solution in contrib\vmap_extractor_v2\win
- Resulting binaries will be in contrib\vmap_extractor_v2\bin\$(PlatformName)_$(ConfigurationName)
-
-2. Extracting
-
- Use the created executable (from command prompt) to extract model information.
- It should find the data path for your client installation through the windows registry,
- but the data path can be specified with the -d option.
-
- Resulting files will be in .\Buildings
diff --git a/contrib/vmap_extractor_v3/make_vmaps.bat b/contrib/vmap_extractor_v3/make_vmaps.bat
deleted file mode 100644
index 8100709d6..000000000
--- a/contrib/vmap_extractor_v3/make_vmaps.bat
+++ /dev/null
@@ -1,46 +0,0 @@
-@echo off
-cls
-echo.
-echo Welcome to the vmaps extractor and assembler
-echo.
-echo You need 2GB of free space in disk, CTRL+C to stop process
-echo Hit Enter to start . . .
-pause>nul
-cls
-echo.
-echo.
-echo.
-IF EXIST buildings\dir (ECHO The buildings folder already exist do you want to delete it?
-echo If YES hit Enter to continue if no CLOSE the program now! . . .
-pause>nul
-DEL /S /Q buildings)
-vmapExtractor3.exe
-cls
-echo.
-echo.
-echo.
-IF NOT %ERRORLEVEL% LEQ 1 (echo The vmap extract tool finalized with errors.
-echo Hit Enter to continue . . .
-pause>nul)
-cls
-echo.
-echo.
-echo.
-echo Vmaps extracted check log.txt for errors, now it's time to assemble the vmaps press any key to continue . . .
-pause>nul
-md vmaps
-vmap_assembler.exe buildings vmaps
-cls
-echo.
-echo.
-echo.
-IF NOT %ERRORLEVEL% LEQ 1 (echo The vmap assembler tool finalized with errors.
-echo Hit Enter to continue . . .
-pause>nul)
-cls
-echo.
-echo.
-echo.
-echo Process done! copy vmaps folder to the MaNGOS main directory
-echo Press any key to exit . . .
-pause>nul
diff --git a/contrib/vmap_extractor_v3/vmapextract/CMakeLists.txt b/contrib/vmap_extractor_v3/vmapextract/CMakeLists.txt
deleted file mode 100644
index 9217b79da..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-# Copyright (C) 2005-2012 MaNGOS project
-#
-# 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.
-
-cmake_minimum_required (VERSION 2.6)
-project (MANGOS_IOMAP_EXTRACTOR)
-
-LINK_DIRECTORIES( ${LINK_DIRECTORIES} ../../../dep/libmpq/libmpq/.libs/ )
-add_executable(vmapextractor adtfile.cpp dbcfile.cpp model.cpp mpq_libmpq.cpp vmapexport.cpp wdtfile.cpp wmo.cpp)
-target_link_libraries(vmapextractor libmpq.a bz2 z)
diff --git a/contrib/vmap_extractor_v3/vmapextract/adtfile.cpp b/contrib/vmap_extractor_v3/vmapextract/adtfile.cpp
deleted file mode 100644
index cdafb8095..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/adtfile.cpp
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright (C) 2005-2012 MaNGOS
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "vmapexport.h"
-#include "adtfile.h"
-
-#include
-#include
-
-#ifdef WIN32
-#define snprintf _snprintf
-#endif
-
-char * GetPlainName(char * FileName)
-{
- char * szTemp;
-
- if((szTemp = strrchr(FileName, '\\')) != NULL)
- FileName = szTemp + 1;
- return FileName;
-}
-
-void fixnamen(char *name, size_t len)
-{
- for (size_t i=0; i0 && name[i]>='A' && name[i]<='Z' && isalpha(name[i-1]))
- {
- name[i] |= 0x20;
- } else if ((i==0 || !isalpha(name[i-1])) && name[i]>='a' && name[i]<='z')
- {
- name[i] &= ~0x20;
- }
- }
- //extension in lowercase
- for(size_t i=len-3; i= 4 ? path.substr(path.size()-4,4) : "";
- std::transform( ext3.begin(), ext3.end(), ext3.begin(), ::tolower );
- if(ext3 == ".mdx")
- {
- // replace .mdx -> .m2
- path.erase(path.length()-2,2);
- path.append("2");
- }
- // >= 3.1.0 ADT MMDX section store filename.m2 filenames for corresponded .m2 file
- // nothing do
-
- char szLocalFile[1024];
- snprintf(szLocalFile, 1024, "%s/%s", szWorkDirWmo, s);
- FILE * output = fopen(szLocalFile,"rb");
- if(!output)
- {
- Model m2(path);
- if(m2.open())
- m2.ConvertToVMAPModel(szLocalFile);
- }
- else
- fclose(output);
- }
- delete[] buf;
- }
- }
- else if (!strcmp(fourcc,"MWMO"))
- {
- if (size)
- {
- char *buf = new char[size];
- ADT.read(buf, size);
- char *p=buf;
- int q = 0;
- WmoInstansName = new string[size];
- while (p
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef ADT_H
-#define ADT_H
-
-#include "mpq_libmpq04.h"
-#include "wmo.h"
-#include "model.h"
-
-#define TILESIZE (533.33333f)
-#define CHUNKSIZE ((TILESIZE) / 16.0f)
-#define UNITSIZE (CHUNKSIZE / 8.0f)
-
-class Liquid;
-
-typedef struct
-{
- float x;
- float y;
- float z;
-}svec;
-
-struct vec
-{
- double x;
- double y;
- double z;
-};
-
-struct triangle
-{
- vec v[3];
-};
-
-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;
- //Liquid *lq;
- float waterlevel[9][9];
- uint8 flag;
-}chunk;
-
-typedef struct
-{
- 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;
- uint32 sizeLiquid;
- float zpos;
- float xpos;
- float ypos;
- uint32 textureId;
- uint32 props;
- uint32 effectId;
-};
-
-
-class ADTFile
-{
-public:
- ADTFile(char* filename);
- ~ADTFile();
- int nWMO;
- int nMDX;
- string* WmoInstansName;
- string* ModelInstansName;
- bool init(uint32 map_num, uint32 tileX, uint32 tileY);
- //void LoadMapChunks();
-
- //uint32 wmo_count;
-/*
- const mcell& Getmcell() const
- {
- return Mcell;
- }
-*/
-private:
- //size_t mcnk_offsets[256], mcnk_sizes[256];
- MPQFile ADT;
- //mcell Mcell;
- string Adtfilename;
-};
-
-void fixnamen(char *name, size_t len);
-//void fixMapNamen(char *name, size_t len);
-
-#endif
diff --git a/contrib/vmap_extractor_v3/vmapextract/dbcfile.cpp b/contrib/vmap_extractor_v3/vmapextract/dbcfile.cpp
deleted file mode 100644
index 0dce4ff87..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/dbcfile.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 2005-2012 MaNGOS
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "dbcfile.h"
-#include "mpq_libmpq04.h"
-#undef min
-#undef max
-
-#include
-
-DBCFile::DBCFile(const std::string &filename) : filename(filename)
-{
- data = NULL;
-}
-
-bool DBCFile::open()
-{
- MPQFile f(filename.c_str());
-
- // Need some error checking, otherwise an unhandled exception error occurs
- // if people screw with the data path.
- if (f.isEof() == true)
- return false;
-
- unsigned char header[4];
- unsigned int na,nb,es,ss;
-
- f.read(header,4); // File Header
-
- if (header[0]!='W' || header[1]!='D' || header[2]!='B' || header[3] != 'C')
- {
- f.close();
- data = NULL;
- printf("Critical Error: An error occured while trying to read the DBCFile %s.", filename.c_str());
- return false;
- }
-
- //assert(header[0]=='W' && header[1]=='D' && header[2]=='B' && header[3] == 'C');
-
- f.read(&na,4); // Number of records
- f.read(&nb,4); // Number of fields
- f.read(&es,4); // Size of a record
- f.read(&ss,4); // String size
-
- recordSize = es;
- recordCount = na;
- fieldCount = nb;
- stringSize = ss;
- //assert(fieldCount*4 == recordSize);
- assert(fieldCount*4 >= recordSize);
-
- data = new unsigned char[recordSize*recordCount+stringSize];
- stringTable = data + recordSize*recordCount;
- f.read(data,recordSize*recordCount+stringSize);
- f.close();
- return true;
-}
-
-DBCFile::~DBCFile()
-{
- delete [] data;
-}
-
-DBCFile::Record DBCFile::getRecord(size_t id)
-{
- assert(data);
- return Record(*this, data + id*recordSize);
-}
-
-DBCFile::Iterator DBCFile::begin()
-{
- assert(data);
- return Iterator(*this, data);
-}
-
-DBCFile::Iterator DBCFile::end()
-{
- assert(data);
- return Iterator(*this, stringTable);
-}
diff --git a/contrib/vmap_extractor_v3/vmapextract/dbcfile.h b/contrib/vmap_extractor_v3/vmapextract/dbcfile.h
deleted file mode 100644
index 527f96031..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/dbcfile.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2005-2012 MaNGOS
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef DBCFILE_H
-#define DBCFILE_H
-
-#include
-#include
-
-class DBCFile
-{
-public:
- DBCFile(const std::string &filename);
- ~DBCFile();
-
- // Open database. It must be openened before it can be used.
- bool open();
-
- // TODO: Add a close function?
-
- // Database exceptions
- class Exception
- {
- public:
- Exception(const std::string &message): message(message)
- { }
- virtual ~Exception()
- { }
- const std::string &getMessage() {return message;}
- private:
- std::string message;
- };
-
- //
- class NotFound: public Exception
- {
- public:
- NotFound(): Exception("Key was not found")
- { }
- };
-
- // Iteration over database
- class Iterator;
- class Record
- {
- public:
- Record& operator= (const Record& r)
- {
- file = r.file;
- offset = r.offset;
- return *this;
- }
- float getFloat(size_t field) const
- {
- assert(field < file.fieldCount);
- return *reinterpret_cast(offset+field*4);
- }
- unsigned int getUInt(size_t field) const
- {
- assert(field < file.fieldCount);
- return *reinterpret_cast(offset+(field*4));
- }
- int getInt(size_t field) const
- {
- assert(field < file.fieldCount);
- return *reinterpret_cast(offset+field*4);
- }
- unsigned char getByte(size_t ofs) const
- {
- assert(ofs < file.recordSize);
- return *reinterpret_cast(offset+ofs);
- }
- const char *getString(size_t field) const
- {
- assert(field < file.fieldCount);
- size_t stringOffset = getUInt(field);
- assert(stringOffset < file.stringSize);
- //char * tmp = (char*)file.stringTable + stringOffset;
- //unsigned char * tmp2 = file.stringTable + stringOffset;
- return reinterpret_cast(file.stringTable + stringOffset);
- }
- private:
- Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {}
- DBCFile &file;
- unsigned char *offset;
-
- friend class DBCFile;
- friend class Iterator;
- };
-
- /* Iterator that iterates over records */
- class Iterator
- {
- public:
- Iterator(DBCFile &file, unsigned char *offset):
- record(file, offset) {}
- /// Advance (prefix only)
- Iterator & operator++() {
- record.offset += record.file.recordSize;
- return *this;
- }
- /// Return address of current instance
- Record const & operator*() const { return record; }
- const Record* operator->() const {
- return &record;
- }
- /// Comparison
- bool operator==(const Iterator &b) const
- {
- return record.offset == b.record.offset;
- }
- bool operator!=(const Iterator &b) const
- {
- return record.offset != b.record.offset;
- }
- private:
- Record record;
- };
-
- // Get record by id
- Record getRecord(size_t id);
- /// Get begin iterator over records
- Iterator begin();
- /// Get begin iterator over records
- Iterator end();
- /// Trivial
- size_t getRecordCount() const { return recordCount;}
- size_t getFieldCount() const { return fieldCount; }
-
-private:
- std::string filename;
- size_t recordSize;
- size_t recordCount;
- size_t fieldCount;
- size_t stringSize;
- unsigned char *data;
- unsigned char *stringTable;
-};
-
-#endif
diff --git a/contrib/vmap_extractor_v3/vmapextract/loadlib/loadlib.h b/contrib/vmap_extractor_v3/vmapextract/loadlib/loadlib.h
deleted file mode 100644
index 31fa7a476..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/loadlib/loadlib.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2005-2012 MaNGOS
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef LOAD_LIB_H
-#define LOAD_LIB_H
-
-#ifdef WIN32
-typedef __int64 int64;
-typedef __int32 int32;
-typedef __int16 int16;
-typedef __int8 int8;
-typedef unsigned __int64 uint64;
-typedef unsigned __int32 uint32;
-typedef unsigned __int16 uint16;
-typedef unsigned __int8 uint8;
-#else
-#include
-#ifndef uint64_t
-#ifdef __linux__
-#include
-#endif
-#endif
-typedef int64_t int64;
-typedef int32_t int32;
-typedef int16_t int16;
-typedef int8_t int8;
-typedef uint64_t uint64;
-typedef uint32_t uint32;
-typedef uint16_t uint16;
-typedef uint8_t uint8;
-#endif
-
-#define FILE_FORMAT_VERSION 18
-
-//
-// File version chunk
-//
-struct file_MVER
-{
- union{
- uint32 fcc;
- char fcc_txt[4];
- };
- uint32 size;
- uint32 ver;
-};
-
-class FileLoader{
- uint8 *data;
- uint32 data_size;
-public:
- virtual bool prepareLoadedData();
- uint8 *GetData() {return data;}
- uint32 GetDataSize() {return data_size;}
-
- file_MVER *version;
- FileLoader();
- ~FileLoader();
- bool loadFile(char *filename, bool log = true);
- virtual void free();
-};
-#endif
diff --git a/contrib/vmap_extractor_v3/vmapextract/model.cpp b/contrib/vmap_extractor_v3/vmapextract/model.cpp
deleted file mode 100644
index 4b7d62941..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/model.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (C) 2005-2012 MaNGOS
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "vmapexport.h"
-#include "model.h"
-#include "wmo.h"
-#include "mpq_libmpq04.h"
-#include
-#include
-#include
-
-Model::Model(std::string &filename) : filename(filename)
-{
-}
-
-bool Model::open()
-{
- MPQFile f(filename.c_str());
-
- ok = !f.isEof();
-
- if (!ok)
- {
- f.close();
- printf("Error loading model %s\n", filename.c_str());
- return false;
- }
-
- memcpy(&header, f.getBuffer(), sizeof(ModelHeader));
- if(header.nBoundingTriangles > 0)
- {
- f.seek(0);
- f.seekRelative(header.ofsBoundingVertices);
- vertices = new Vec3D[header.nBoundingVertices];
- f.read(vertices,header.nBoundingVertices*12);
- for (uint32 i=0; i0)
- {
- fwrite(indices, sizeof(unsigned short), nIndexes, output);
- }
- fwrite("VERT",4, 1, output);
- wsize = sizeof(int) + sizeof(float) * 3 * nVertices;
- fwrite(&wsize, sizeof(int), 1, output);
- fwrite(&nVertices, sizeof(int), 1, output);
- if(nVertices >0)
- {
- for(uint32 vpos=0; vpos
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef MODEL_H
-#define MODEL_H
-
-#include "loadlib/loadlib.h"
-#include "vec3d.h"
-//#include "mpq.h"
-#include "modelheaders.h"
-#include
-
-class Model;
-class WMOInstance;
-class MPQFile;
-
-Vec3D fixCoordSystem(Vec3D v);
-
-class Model
-{
-public:
- ModelHeader header;
- uint32 offsBB_vertices, offsBB_indices;
- Vec3D *BB_vertices, *vertices;
- uint16 *BB_indices, *indices;
- size_t nIndices;
-
- bool open();
- bool ConvertToVMAPModel(char * outfilename);
-
- bool ok;
-
- Model(std::string &filename);
- ~Model();
-
-private:
- std::string filename;
- char outfilename;
-};
-
-class ModelInstance
-{
-public:
- Model *model;
-
- uint32 id;
- Vec3D pos, rot;
- unsigned int d1, scale;
- float w,sc;
-
- ModelInstance() {}
- ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile);
-
-};
-
-#endif
diff --git a/contrib/vmap_extractor_v3/vmapextract/modelheaders.h b/contrib/vmap_extractor_v3/vmapextract/modelheaders.h
deleted file mode 100644
index 46ab200b7..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/modelheaders.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2005-2012 MaNGOS
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef MODELHEADERS_H
-#define MODELHEADERS_H
-
-/* typedef unsigned char uint8;
-typedef char int8;
-typedef unsigned short uint16;
-typedef short int16;
-typedef unsigned int uint32;
-typedef int int32; */
-
-#pragma pack(push,1)
-
-struct ModelHeader
-{
- char id[4];
- uint8 version[4];
- uint32 nameLength;
- uint32 nameOfs;
- uint32 type;
- uint32 nGlobalSequences;
- uint32 ofsGlobalSequences;
- uint32 nAnimations;
- uint32 ofsAnimations;
- uint32 nAnimationLookup;
- uint32 ofsAnimationLookup;
- uint32 nBones;
- uint32 ofsBones;
- uint32 nKeyBoneLookup;
- uint32 ofsKeyBoneLookup;
- uint32 nVertices;
- uint32 ofsVertices;
- uint32 nViews;
- uint32 nColors;
- uint32 ofsColors;
- uint32 nTextures;
- uint32 ofsTextures;
- uint32 nTransparency;
- uint32 ofsTransparency;
- uint32 nTextureanimations;
- uint32 ofsTextureanimations;
- uint32 nTexReplace;
- uint32 ofsTexReplace;
- uint32 nRenderFlags;
- uint32 ofsRenderFlags;
- uint32 nBoneLookupTable;
- uint32 ofsBoneLookupTable;
- uint32 nTexLookup;
- uint32 ofsTexLookup;
- uint32 nTexUnits;
- uint32 ofsTexUnits;
- uint32 nTransLookup;
- uint32 ofsTransLookup;
- uint32 nTexAnimLookup;
- uint32 ofsTexAnimLookup;
- float floats[14];
- uint32 nBoundingTriangles;
- uint32 ofsBoundingTriangles;
- uint32 nBoundingVertices;
- uint32 ofsBoundingVertices;
- uint32 nBoundingNormals;
- uint32 ofsBoundingNormals;
- uint32 nAttachments;
- uint32 ofsAttachments;
- uint32 nAttachLookup;
- uint32 ofsAttachLookup;
- uint32 nAttachments_2;
- uint32 ofsAttachments_2;
- uint32 nLights;
- uint32 ofsLights;
- uint32 nCameras;
- uint32 ofsCameras;
- uint32 nCameraLookup;
- uint32 ofsCameraLookup;
- uint32 nRibbonEmitters;
- uint32 ofsRibbonEmitters;
- uint32 nParticleEmitters;
- uint32 ofsParticleEmitters;
-};
-
-#pragma pack(pop)
-#endif
diff --git a/contrib/vmap_extractor_v3/vmapextract/mpq_libmpq.cpp b/contrib/vmap_extractor_v3/vmapextract/mpq_libmpq.cpp
deleted file mode 100644
index 528b9679a..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/mpq_libmpq.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-#include "mpq_libmpq04.h"
-#include
-#include
-
-ArchiveSet gOpenArchives;
-
-MPQArchive::MPQArchive(const char* filename)
-{
- int result = libmpq__archive_open(&mpq_a, filename, -1);
- printf("Opening %s\n", filename);
- if(result) {
- switch(result) {
- case LIBMPQ_ERROR_OPEN :
- printf("Error opening archive '%s': Does file really exist?\n", filename);
- break;
- case LIBMPQ_ERROR_FORMAT : /* bad file format */
- printf("Error opening archive '%s': Bad file format\n", filename);
- break;
- case LIBMPQ_ERROR_SEEK : /* seeking in file failed */
- printf("Error opening archive '%s': Seeking in file failed\n", filename);
- break;
- case LIBMPQ_ERROR_READ : /* Read error in archive */
- printf("Error opening archive '%s': Read error in archive\n", filename);
- break;
- case LIBMPQ_ERROR_MALLOC : /* maybe not enough memory? :) */
- printf("Error opening archive '%s': Maybe not enough memory\n", filename);
- break;
- default:
- printf("Error opening archive '%s': Unknown error\n", filename);
- break;
- }
- return;
- }
- gOpenArchives.push_front(this);
-}
-
-void MPQArchive::close()
-{
- //gOpenArchives.erase(erase(&mpq_a);
- libmpq__archive_close(mpq_a);
-}
-
-MPQFile::MPQFile(const char* filename):
- eof(false),
- buffer(0),
- pointer(0),
- size(0)
-{
- for(ArchiveSet::iterator i=gOpenArchives.begin(); i!=gOpenArchives.end();++i)
- {
- mpq_archive *mpq_a = (*i)->mpq_a;
-
- uint32 filenum;
- if(libmpq__file_number(mpq_a, filename, &filenum)) continue;
- libmpq__off_t transferred;
- libmpq__file_unpacked_size(mpq_a, filenum, &size);
-
- // HACK: in patch.mpq some files don't want to open and give 1 for filesize
- if (size<=1) {
- // printf("info: file %s has size %d; considered dummy file.\n", filename, size);
- eof = true;
- buffer = 0;
- return;
- }
- buffer = new char[size];
-
- //libmpq_file_getdata
- libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
- /*libmpq_file_getdata(&mpq_a, hash, fileno, (unsigned char*)buffer);*/
- return;
-
- }
- eof = true;
- buffer = 0;
-}
-
-size_t MPQFile::read(void* dest, size_t bytes)
-{
- if (eof) return 0;
-
- size_t rpos = pointer + bytes;
- if (rpos > size) {
- bytes = size - pointer;
- eof = true;
- }
-
- memcpy(dest, &(buffer[pointer]), bytes);
-
- pointer = rpos;
-
- return bytes;
-}
-
-void MPQFile::seek(int offset)
-{
- pointer = offset;
- eof = (pointer >= size);
-}
-
-void MPQFile::seekRelative(int offset)
-{
- pointer += offset;
- eof = (pointer >= size);
-}
-
-void MPQFile::close()
-{
- if (buffer) delete[] buffer;
- buffer = 0;
- eof = true;
-}
diff --git a/contrib/vmap_extractor_v3/vmapextract/mpq_libmpq04.h b/contrib/vmap_extractor_v3/vmapextract/mpq_libmpq04.h
deleted file mode 100644
index 4b0a2465b..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/mpq_libmpq04.h
+++ /dev/null
@@ -1,91 +0,0 @@
-#define _CRT_SECURE_NO_DEPRECATE
-#define _CRT_SECURE_NO_WARNINGS
-
-#ifndef MPQ_H
-#define MPQ_H
-
-#include "loadlib/loadlib.h"
-#include "libmpq/mpq.h"
-#include
-#include
-#include
-#include
-#include
-
-using namespace std;
-
-class MPQArchive
-{
-
-public:
- mpq_archive_s *mpq_a;
-
- MPQArchive(const char* filename);
- void close();
-
- void GetFileListTo(vector& filelist) {
- uint32 filenum;
- if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return;
- libmpq__off_t size, transferred;
- libmpq__file_unpacked_size(mpq_a, filenum, &size);
-
- char *buffer = new char[size];
-
- libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred);
-
- char seps[] = "\n";
- char *token;
-
- token = strtok( buffer, seps );
- uint32 counter = 0;
- while ((token != NULL) && (counter < size)) {
- //cout << token << endl;
- token[strlen(token) - 1] = 0;
- string s = token;
- filelist.push_back(s);
- counter += strlen(token) + 2;
- token = strtok(NULL, seps);
- }
-
- delete[] buffer;
- }
-};
-typedef std::deque ArchiveSet;
-
-class MPQFile
-{
- //MPQHANDLE handle;
- bool eof;
- char *buffer;
- libmpq__off_t pointer,size;
-
- // disable copying
- MPQFile(const MPQFile &f) {}
- void operator=(const MPQFile &f) {}
-
-public:
- MPQFile(const char* filename); // filenames are not case sensitive
- ~MPQFile() { close(); }
- size_t read(void* dest, size_t bytes);
- size_t getSize() { return size; }
- size_t getPos() { return pointer; }
- char* getBuffer() { return buffer; }
- char* getPointer() { return buffer + pointer; }
- bool isEof() { return eof; }
- void seek(int offset);
- void seekRelative(int offset);
- void close();
-};
-
-inline void flipcc(char *fcc)
-{
- char t;
- t=fcc[0];
- fcc[0]=fcc[3];
- fcc[3]=t;
- t=fcc[1];
- fcc[1]=fcc[2];
- fcc[2]=t;
-}
-
-#endif
diff --git a/contrib/vmap_extractor_v3/vmapextract/vec3d.h b/contrib/vmap_extractor_v3/vmapextract/vec3d.h
deleted file mode 100644
index 06a5b730f..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/vec3d.h
+++ /dev/null
@@ -1,230 +0,0 @@
-#ifndef VEC3D_H
-#define VEC3D_H
-
-#include
-#include
-
-class Vec3D
-{
-public:
- float x,y,z;
-
- Vec3D(float x0 = 0.0f, float y0 = 0.0f, float z0 = 0.0f) : x(x0), y(y0), z(z0) {}
-
- Vec3D(const Vec3D& v) : x(v.x), y(v.y), z(v.z) {}
-
- Vec3D& operator= (const Vec3D &v) {
- x = v.x;
- y = v.y;
- z = v.z;
- return *this;
- }
-
- Vec3D operator+ (const Vec3D &v) const
- {
- Vec3D r(x+v.x,y+v.y,z+v.z);
- return r;
- }
-
- Vec3D operator- (const Vec3D &v) const
- {
- Vec3D r(x-v.x,y-v.y,z-v.z);
- return r;
- }
-
- float operator* (const Vec3D &v) const
- {
- return x*v.x + y*v.y + z*v.z;
- }
-
- Vec3D operator* (float d) const
- {
- Vec3D r(x*d,y*d,z*d);
- return r;
- }
-
- friend Vec3D operator* (float d, const Vec3D& v)
- {
- return v * d;
- }
-
- Vec3D operator% (const Vec3D &v) const
- {
- Vec3D r(y*v.z-z*v.y, z*v.x-x*v.z, x*v.y-y*v.x);
- return r;
- }
-
- Vec3D& operator+= (const Vec3D &v)
- {
- x += v.x;
- y += v.y;
- z += v.z;
- return *this;
- }
-
- Vec3D& operator-= (const Vec3D &v)
- {
- x -= v.x;
- y -= v.y;
- z -= v.z;
- return *this;
- }
-
- Vec3D& operator*= (float d)
- {
- x *= d;
- y *= d;
- z *= d;
- return *this;
- }
-
- float lengthSquared() const
- {
- return x*x+y*y+z*z;
- }
-
- float length() const
- {
- return sqrt(x*x+y*y+z*z);
- }
-
- Vec3D& normalize()
- {
- this->operator*= (1.0f/length());
- return *this;
- }
-
- Vec3D operator~ () const
- {
- Vec3D r(*this);
- r.normalize();
- return r;
- }
-
- friend std::istream& operator>>(std::istream& in, Vec3D& v)
- {
- in >> v.x >> v.y >> v.z;
- return in;
- }
-
- friend std::ostream& operator<<(std::ostream& out, const Vec3D& v)
- {
- out << v.x << " " << v.y << " " << v.z;
- return out;
- }
-
- operator float*()
- {
- return (float*)this;
- }
-};
-
-
-class Vec2D
-{
-public:
- float x,y;
-
- Vec2D(float x0 = 0.0f, float y0 = 0.0f) : x(x0), y(y0) {}
-
- Vec2D(const Vec2D& v) : x(v.x), y(v.y) {}
-
- Vec2D& operator= (const Vec2D &v) {
- x = v.x;
- y = v.y;
- return *this;
- }
-
- Vec2D operator+ (const Vec2D &v) const
- {
- Vec2D r(x+v.x,y+v.y);
- return r;
- }
-
- Vec2D operator- (const Vec2D &v) const
- {
- Vec2D r(x-v.x,y-v.y);
- return r;
- }
-
- float operator* (const Vec2D &v) const
- {
- return x*v.x + y*v.y;
- }
-
- Vec2D operator* (float d) const
- {
- Vec2D r(x*d,y*d);
- return r;
- }
-
- friend Vec2D operator* (float d, const Vec2D& v)
- {
- return v * d;
- }
-
- Vec2D& operator+= (const Vec2D &v)
- {
- x += v.x;
- y += v.y;
- return *this;
- }
-
- Vec2D& operator-= (const Vec2D &v)
- {
- x -= v.x;
- y -= v.y;
- return *this;
- }
-
- Vec2D& operator*= (float d)
- {
- x *= d;
- y *= d;
- return *this;
- }
-
- float lengthSquared() const
- {
- return x*x+y*y;
- }
-
- float length() const
- {
- return sqrt(x*x+y*y);
- }
-
- Vec2D& normalize()
- {
- this->operator*= (1.0f/length());
- return *this;
- }
-
- Vec2D operator~ () const
- {
- Vec2D r(*this);
- r.normalize();
- return r;
- }
-
-
- friend std::istream& operator>>(std::istream& in, Vec2D& v)
- {
- in >> v.x >> v.y;
- return in;
- }
-
- operator float*()
- {
- return (float*)this;
- }
-};
-
-inline void rotate(float x0, float y0, float *x, float *y, float angle)
-{
- float xa = *x - x0, ya = *y - y0;
- *x = xa*cosf(angle) - ya*sinf(angle) + x0;
- *y = xa*sinf(angle) + ya*cosf(angle) + y0;
-}
-
-#endif
diff --git a/contrib/vmap_extractor_v3/vmapextract/vmapexport.cpp b/contrib/vmap_extractor_v3/vmapextract/vmapexport.cpp
deleted file mode 100644
index 3d88b1de5..000000000
--- a/contrib/vmap_extractor_v3/vmapextract/vmapexport.cpp
+++ /dev/null
@@ -1,522 +0,0 @@
-/*
- * Copyright (C) 2005-2012 MaNGOS
- *
- * 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, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#define _CRT_SECURE_NO_DEPRECATE
-#include
-#include
-#include
-#include
-#include
-
-#ifdef WIN32
- #include
- #include
- #include
- #define mkdir _mkdir
-#else
- #include
-#endif
-
-#undef min
-#undef max
-
-//#pragma warning(disable : 4505)
-//#pragma comment(lib, "Winmm.lib")
-
-#include