|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <cstdio>#include <iostream>#include <vector>#include <list>#include <errno.h>#include <sys/stat.h>#include <map>#include "adtfile.h"#include "wdtfile.h"#include "dbcfile.h"#include "wmo.h"#include "mpqfile.h"#include "vmapexport.h"Go to the source code of this file.
Classes | |
| struct | map_id |
Macros | |
| #define | _CRT_SECURE_NO_DEPRECATE |
| #define | ERROR_PATH_NOT_FOUND ERROR_FILE_NOT_FOUND |
| #define | LAST_DBC_IN_DATA_BUILD 15595 |
| #define | LOCALES_COUNT 15 |
| #define | MPQ_BLOCK_SIZE 0x1000 |
| #define | NEW_BASE_SET_BUILD 16016 |
Functions | |
| bool | ExtractSingleWmo (std::string &fname) |
| bool | ExtractWmo () |
| bool | FileExists (const char *file) |
| void | getGamePath () |
| void | LoadCommonMPQFiles (uint32 build) |
| bool | LoadLocaleMPQFile (int locale) |
| int | main (int argc, char **argv) |
| void | ParsMapFiles () |
| bool | processArgv (int argc, char **argv, const char *versionString) |
| bool | ReadLiquidTypeTableDBC (int locale) |
| void | strToLower (char *str) |
Variables | |
| uint32 const | Builds [] = {16016, 16048, 16057, 16309, 16357, 16516, 16650, 16844, 16965, 17116, 17266, 17325, 17345, 17538, 17645, 17688, 17898, 18273, 0} |
| char const * | CONF_mpq_list [] |
| uint32 | CONF_TargetBuild = 18273 |
| char | input_path [1024] ="." |
| uint16 * | LiqType = 0 |
| HANDLE | LocaleMpq = NULL |
| char const * | Locales [LOCALES_COUNT] |
| TCHAR const * | LocalesT [LOCALES_COUNT] |
| uint32 | map_count |
| map_id * | map_ids |
| char | output_path [128] ="." |
| bool | preciseVectorData = false |
| const char * | szRawVMAPMagic = "VMAP053" |
| const char * | szWorkDirWmo = "./Buildings" |
| HANDLE | WorldMpq = NULL |
| #define _CRT_SECURE_NO_DEPRECATE |
Definition at line 6 of file vmapexport.cpp.
| #define ERROR_PATH_NOT_FOUND ERROR_FILE_NOT_FOUND |
Definition at line 25 of file vmapexport.cpp.
| #define LAST_DBC_IN_DATA_BUILD 15595 |
Definition at line 70 of file vmapexport.cpp.
Referenced by LoadCommonMPQFiles(), and LoadLocaleMPQFile().
| #define LOCALES_COUNT 15 |
Definition at line 73 of file vmapexport.cpp.
| #define MPQ_BLOCK_SIZE 0x1000 |
Definition at line 48 of file vmapexport.cpp.
| #define NEW_BASE_SET_BUILD 16016 |
Definition at line 71 of file vmapexport.cpp.
| bool ExtractSingleWmo | ( | std::string & | fname | ) |
Definition at line 327 of file vmapexport.cpp.
References WMOGroup::ConvertToVMAPGroupWmo(), WMORoot::ConvertToVMAPRootWmo(), FileExists(), FixNameCase(), GetPlainName(), WMORoot::nGroups, WMOGroup::open(), WMORoot::open(), preciseVectorData, and szWorkDirWmo.
Referenced by ExtractGameobjectModels(), and ExtractWmo().
| bool ExtractWmo | ( | ) |
Definition at line 301 of file vmapexport.cpp.
References ExtractSingleWmo(), and WorldMpq.
Referenced by main().
| bool FileExists | ( | const char * | file | ) |
Definition at line 234 of file vmapexport.cpp.
Referenced by ExtractSingleWmo(), and ReadLiquidTypeTableDBC().
| void getGamePath | ( | ) |
| void LoadCommonMPQFiles | ( | uint32 | build | ) |
Definition at line 166 of file vmapexport.cpp.
References Builds, CONF_mpq_list, CONF_TargetBuild, ERROR_PATH_NOT_FOUND, input_path, LAST_DBC_IN_DATA_BUILD, NEW_BASE_SET_BUILD, and WorldMpq.
Referenced by main().
| bool LoadLocaleMPQFile | ( | int | locale | ) |
Definition at line 118 of file vmapexport.cpp.
References Builds, CONF_TargetBuild, ERROR_PATH_NOT_FOUND, input_path, LAST_DBC_IN_DATA_BUILD, LocaleMpq, Locales, LocalesT, and NEW_BASE_SET_BUILD.
Referenced by main().
| int main | ( | int | argc, |
| char ** | argv ) |
Definition at line 525 of file vmapexport.cpp.
References CONF_TargetBuild, ERROR_PATH_NOT_FOUND, ExtractGameobjectModels(), ExtractWmo(), DBCFile::getRecord(), DBCFile::getRecordCount(), DBCFile::Record::getString(), DBCFile::Record::getUInt(), LiqType, LoadCommonMPQFiles(), LoadLocaleMPQFile(), LocaleMpq, Locales, LOCALES_COUNT, map_count, map_ids, DBCFile::open(), ParsMapFiles(), preciseVectorData, processArgv(), ReadLiquidTypeTableDBC(), szWorkDirWmo, and WorldMpq.
| void ParsMapFiles | ( | ) |
Definition at line 408 of file vmapexport.cpp.
References WDTFile::GetMap(), WDTFile::init(), map_count, and map_ids.
Referenced by main().
| bool processArgv | ( | int | argc, |
| char ** | argv, | ||
| const char * | versionString ) |
Definition at line 449 of file vmapexport.cpp.
References CONF_TargetBuild, getGamePath(), input_path, and preciseVectorData.
Referenced by main().
| bool ReadLiquidTypeTableDBC | ( | int | locale | ) |
Definition at line 254 of file vmapexport.cpp.
References FileExists(), DBCFile::getMaxId(), DBCFile::getRecord(), DBCFile::getRecordCount(), DBCFile::Record::getUInt(), input_path, LiqType, LocalesT, and DBCFile::open().
| void strToLower | ( | char * | str | ) |
Definition at line 244 of file vmapexport.cpp.
Referenced by ExtractGameobjectModels().
| uint32 const Builds[] = {16016, 16048, 16057, 16309, 16357, 16516, 16650, 16844, 16965, 17116, 17266, 17325, 17345, 17538, 17645, 17688, 17898, 18273, 0} |
Definition at line 69 of file vmapexport.cpp.
| char const* CONF_mpq_list[] |
Definition at line 58 of file vmapexport.cpp.
| uint32 CONF_TargetBuild = 18273 |
Definition at line 55 of file vmapexport.cpp.
| char input_path[1024] ="." |
Definition at line 109 of file vmapexport.cpp.
| uint16* LiqType = 0 |
Definition at line 106 of file vmapexport.cpp.
| HANDLE LocaleMpq = NULL |
Definition at line 53 of file vmapexport.cpp.
| char const* Locales[LOCALES_COUNT] |
Definition at line 75 of file vmapexport.cpp.
| TCHAR const* LocalesT[LOCALES_COUNT] |
Definition at line 87 of file vmapexport.cpp.
| uint32 map_count |
Definition at line 107 of file vmapexport.cpp.
Referenced by ExtractMapsFromMpq(), main(), ParsMapFiles(), and ReadMapDBC().
| map_id* map_ids |
Definition at line 105 of file vmapexport.cpp.
| char output_path[128] ="." |
Definition at line 108 of file vmapexport.cpp.
| bool preciseVectorData = false |
Definition at line 110 of file vmapexport.cpp.
Referenced by WMOGroup::ConvertToVMAPGroupWmo(), ExtractSingleWmo(), main(), and processArgv().
| const char* szRawVMAPMagic = "VMAP053" |
Definition at line 116 of file vmapexport.cpp.
Referenced by Model::ConvertToVMAPModel(), and WMORoot::ConvertToVMAPRootWmo().
| const char* szWorkDirWmo = "./Buildings" |
Definition at line 115 of file vmapexport.cpp.
Referenced by ExtractGameobjectModels(), ExtractSingleModel(), ExtractSingleWmo(), ADTFile::init(), WDTFile::init(), main(), ModelInstance::ModelInstance(), and WMOInstance::WMOInstance().
| HANDLE WorldMpq = NULL |
Definition at line 52 of file vmapexport.cpp.