aboutsummaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-08-22 17:26:53 -0500
committerSubv <s.v.h21@hotmail.com>2012-08-22 17:26:53 -0500
commitdc95ce61b46ce2d542ee4c4dbdf35a9e854c4316 (patch)
treee673101dc6554a76dfacb5cf3497dd1d2bde4f41 /src/tools
parentcecaab7948d5289439d1334d7bedcaae90e1fe3a (diff)
parent85ed0e32a9b2b029c1db3cf1a914b3940cf72b9b (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts: dep/PackageList.txt src/server/game/Movement/MotionMaster.cpp src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp src/server/game/Movement/MovementGenerators/PointMovementGenerator.h src/server/game/Movement/Spline/MoveSplineInit.h src/server/game/World/World.h
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/map_extractor/System.cpp28
-rw-r--r--src/tools/map_extractor/mpq_libmpq04.h4
-rw-r--r--src/tools/vmap4_extractor/mpq_libmpq04.h6
-rw-r--r--src/tools/vmap4_extractor/vmapexport.cpp22
4 files changed, 30 insertions, 30 deletions
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index 29836506861..e34bc4221e7 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -48,9 +48,9 @@ char output_path[128] = ".";
char input_path[128] = ".";
uint32 maxAreaId = 0;
-//**************************************************
+// **************************************************
// Extractor options
-//**************************************************
+// **************************************************
enum Extract
{
EXTRACT_MAP = 1,
@@ -71,7 +71,7 @@ float CONF_flat_height_delta_limit = 0.005f; // If max - min less this value - s
float CONF_flat_liquid_delta_limit = 0.001f; // If max - min less this value - liquid surface is flat
// List MPQ for extract from
-char *CONF_mpq_list[]={
+const char *CONF_mpq_list[]={
"common.MPQ",
"common-2.MPQ",
"lichking.MPQ",
@@ -83,7 +83,7 @@ char *CONF_mpq_list[]={
"patch-5.MPQ",
};
-static char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
+static const char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
#define LANG_COUNT 12
void CreateDir( const std::string& Path )
@@ -221,7 +221,7 @@ uint32 ReadMapDBC()
map_ids[x].id = dbc.getRecord(x).getUInt(0);
strcpy(map_ids[x].name, dbc.getRecord(x).getString(1));
}
- printf("Done! (%u maps loaded)\n", map_count);
+ printf("Done! (%zu maps loaded)\n", map_count);
return map_count;
}
@@ -246,7 +246,7 @@ void ReadAreaTableDBC()
maxAreaId = dbc.getMaxId();
- printf("Done! (%u areas loaded)\n", area_count);
+ printf("Done! (%zu areas loaded)\n", area_count);
}
void ReadLiquidTypeTableDBC()
@@ -259,15 +259,15 @@ void ReadLiquidTypeTableDBC()
exit(1);
}
- size_t LiqType_count = dbc.getRecordCount();
- size_t LiqType_maxid = dbc.getMaxId();
- LiqType = new uint16[LiqType_maxid + 1];
- memset(LiqType, 0xff, (LiqType_maxid + 1) * sizeof(uint16));
+ size_t liqTypeCount = dbc.getRecordCount();
+ size_t liqTypeMaxId = dbc.getMaxId();
+ LiqType = new uint16[liqTypeMaxId + 1];
+ memset(LiqType, 0xff, (liqTypeMaxId + 1) * sizeof(uint16));
- for(uint32 x = 0; x < LiqType_count; ++x)
+ for(uint32 x = 0; x < liqTypeCount; ++x)
LiqType[dbc.getRecord(x).getUInt(0)] = dbc.getRecord(x).getUInt(3);
- printf("Done! (%u LiqTypes loaded)\n", LiqType_count);
+ printf("Done! (%zu LiqTypes loaded)\n", liqTypeCount);
}
//
@@ -366,7 +366,7 @@ uint8 liquid_flags[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID];
bool liquid_show[ADT_GRID_SIZE][ADT_GRID_SIZE];
float liquid_height[ADT_GRID_SIZE+1][ADT_GRID_SIZE+1];
-bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32 build)
+bool ConvertADT(char *filename, char *filename2, int /*cell_y*/, int /*cell_x*/, uint32 build)
{
ADT_file adt;
@@ -574,7 +574,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32
// Try store as packed in uint16 or uint8 values
if (!(heightHeader.flags & MAP_HEIGHT_NO_HEIGHT))
{
- float step;
+ float step = 0;
// Try Store as uint values
if (CONF_allow_float_to_int)
{
diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h
index 1f3b259bbfc..89f715e9e87 100644
--- a/src/tools/map_extractor/mpq_libmpq04.h
+++ b/src/tools/map_extractor/mpq_libmpq04.h
@@ -60,8 +60,8 @@ class MPQFile
libmpq__off_t pointer,size;
// disable copying
- MPQFile(const MPQFile &f) {}
- void operator=(const MPQFile &f) {}
+ MPQFile(const MPQFile& /*f*/) {}
+ void operator=(const MPQFile& /*f*/) {}
public:
MPQFile(const char* filename); // filenames are not case sensitive
diff --git a/src/tools/vmap4_extractor/mpq_libmpq04.h b/src/tools/vmap4_extractor/mpq_libmpq04.h
index ed51022de78..89f715e9e87 100644
--- a/src/tools/vmap4_extractor/mpq_libmpq04.h
+++ b/src/tools/vmap4_extractor/mpq_libmpq04.h
@@ -24,7 +24,7 @@ public:
void close();
void GetFileListTo(vector<string>& filelist) {
- uint32 filenum;
+ uint32_t filenum;
if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return;
libmpq__off_t size, transferred;
libmpq__file_unpacked_size(mpq_a, filenum, &size);
@@ -60,8 +60,8 @@ class MPQFile
libmpq__off_t pointer,size;
// disable copying
- MPQFile(const MPQFile &f) {}
- void operator=(const MPQFile &f) {}
+ MPQFile(const MPQFile& /*f*/) {}
+ void operator=(const MPQFile& /*f*/) {}
public:
MPQFile(const char* filename); // filenames are not case sensitive
diff --git a/src/tools/vmap4_extractor/vmapexport.cpp b/src/tools/vmap4_extractor/vmapexport.cpp
index e60a773c6de..126a543400c 100644
--- a/src/tools/vmap4_extractor/vmapexport.cpp
+++ b/src/tools/vmap4_extractor/vmapexport.cpp
@@ -382,9 +382,9 @@ bool processArgv(int argc, char ** argv, const char *versionString)
{
bool result = true;
hasInputPathParam = false;
- bool preciseVectorData = false;
+ preciseVectorData = false;
- for(int i=1; i< argc; ++i)
+ for(int i = 1; i < argc; ++i)
{
if(strcmp("-s",argv[i]) == 0)
{
@@ -447,7 +447,7 @@ int main(int argc, char ** argv)
const char *versionString = "V4.00 2012_02";
// Use command line arguments, when some
- if(!processArgv(argc, argv, versionString))
+ if (!processArgv(argc, argv, versionString))
return 1;
// some simple check if working dir is dirty
@@ -469,7 +469,7 @@ int main(int argc, char ** argv)
printf("Extract %s. Beginning work ....\n",versionString);
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// Create the working directory
- if(mkdir(szWorkDirWmo
+ if (mkdir(szWorkDirWmo
#ifdef __linux__
, 0711
#endif
@@ -482,11 +482,11 @@ int main(int argc, char ** argv)
for (size_t i=0; i < archiveNames.size(); ++i)
{
MPQArchive *archive = new MPQArchive(archiveNames[i].c_str());
- if(!gOpenArchives.size() || gOpenArchives.front() != archive)
+ if (gOpenArchives.empty() || gOpenArchives.front() != archive)
delete archive;
}
- if(gOpenArchives.empty())
+ if (gOpenArchives.empty())
{
printf("FATAL ERROR: None MPQ archive found by path '%s'. Use -d option with proper path.\n",input_path);
return 1;
@@ -494,15 +494,15 @@ int main(int argc, char ** argv)
ReadLiquidTypeTableDBC();
// extract data
- if(success)
+ if (success)
success = ExtractWmo();
//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
//map.dbc
- if(success)
+ if (success)
{
DBCFile * dbc = new DBCFile("DBFilesClient\\Map.dbc");
- if(!dbc->open())
+ if (!dbc->open())
{
delete dbc;
printf("FATAL ERROR: Map.dbc not found in data file.\n");
@@ -510,7 +510,7 @@ int main(int argc, char ** argv)
}
map_count=dbc->getRecordCount ();
map_ids=new map_id[map_count];
- for(unsigned int x=0;x<map_count;++x)
+ for (unsigned int x=0;x<map_count;++x)
{
map_ids[x].id=dbc->getRecord (x).getUInt(0);
strcpy(map_ids[x].name,dbc->getRecord(x).getString(1));
@@ -527,7 +527,7 @@ int main(int argc, char ** argv)
}
printf("\n");
- if(!success)
+ if (!success)
{
printf("ERROR: Extract %s. Work NOT complete.\n Precise vector data=%d.\nPress any key.\n",versionString, preciseVectorData);
getchar();