Skip to content

Commit

Permalink
Core: Fix some silly warnings (some stupid remnants from old times th…
Browse files Browse the repository at this point in the history
…at has bugged me enough)

No need to recompiling anything, it's just a visual change to make the compilers STFU about variable initializations
  • Loading branch information
click committed Nov 27, 2012
1 parent 8ef48ec commit 1d71059
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 41 deletions.
4 changes: 3 additions & 1 deletion dep/SFMT/SFMT.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,16 @@
#define SFMT_PARITY 0x00000001, 0x00000000, 0x00000000, 0x5986f054 // Period certification vector
#endif

// Functions used by SFMTRand::RandomInitByArray
// Functions used by SFMTRand::RandomInitByArray (UNUSED AND COMMENTED OUT)
/*
static uint32_t func1(uint32_t x) {
return (x ^ (x >> 27)) * 1664525U;
}
static uint32_t func2(uint32_t x) {
return (x ^ (x >> 27)) * 1566083941U;
}
*/

// Subfunction for the sfmt algorithm
static inline __m128i sfmt_recursion(__m128i const &a, __m128i const &b,
Expand Down
2 changes: 1 addition & 1 deletion src/tools/map_extractor/dbcfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class DBCFile
}
private:
Record(DBCFile &file, unsigned char *offset): file(file), offset(offset) {}
unsigned char *offset;
DBCFile &file;
unsigned char *offset;

friend class DBCFile;
friend class DBCFile::Iterator;
Expand Down
10 changes: 5 additions & 5 deletions src/tools/vmap4_extractor/adtfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ struct MapChunkHeader

class ADTFile
{
private:
//size_t mcnk_offsets[256], mcnk_sizes[256];
MPQFile ADT;
//mcell Mcell;
string Adtfilename;
public:
ADTFile(char* filename);
~ADTFile();
Expand All @@ -126,11 +131,6 @@ class ADTFile
return Mcell;
}
*/
private:
//size_t mcnk_offsets[256], mcnk_sizes[256];
MPQFile ADT;
//mcell Mcell;
string Adtfilename;
};

const char * GetPlainName(const char * FileName);
Expand Down
22 changes: 10 additions & 12 deletions src/tools/vmap4_extractor/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ Vec3D fixCoordSystem(Vec3D v);

class Model
{
private:
void _unload()
{
delete[] vertices;
delete[] indices;
vertices = NULL;
indices = NULL;
}
std::string filename;
public:
ModelHeader header;
Vec3D* vertices;
Expand All @@ -40,17 +49,6 @@ class Model

Model(std::string& filename);
~Model() { _unload(); }

private:
void _unload()
{
delete[] vertices;
delete[] indices;
vertices = NULL;
indices = NULL;
}

std::string filename;
};

class ModelInstance
Expand All @@ -63,7 +61,7 @@ class ModelInstance
unsigned int d1, scale;
float w, sc;

ModelInstance() : model(NULL), d1(0), scale(0), w(0.0f), sc(0.0f), id(0) {}
ModelInstance() : model(NULL), id(0), d1(0), scale(0), w(0.0f), sc(0.0f) {}
ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);

};
Expand Down
2 changes: 1 addition & 1 deletion src/tools/vmap4_extractor/wdtfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ WDTFile::WDTFile(char* file_name, char* file_name1) : WDT(file_name), gWmoInstan
filename.append(file_name1,strlen(file_name1));
}

bool WDTFile::init(char *map_id, unsigned int mapID)
bool WDTFile::init(char */*map_id*/, unsigned int mapID)
{
if (WDT.isEof())
{
Expand Down
7 changes: 3 additions & 4 deletions src/tools/vmap4_extractor/wdtfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class ADTFile;

class WDTFile
{
private:
MPQFile WDT;
string filename;
public:
WDTFile(char* file_name, char* file_name1);
~WDTFile(void);
Expand All @@ -19,10 +22,6 @@ class WDTFile
int gnWMO;

ADTFile* GetMap(int x, int z);

private:
MPQFile WDT;
string filename;
};

#endif
35 changes: 18 additions & 17 deletions src/tools/vmap4_extractor/wmo.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ static inline Vec3D fixCoords(const Vec3D &v){ return Vec3D(v.z, v.x, v.y); }

class WMORoot
{
private:
std::string filename;
public:
uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
unsigned int col;
uint32 nTextures, nGroups, nP, nLights, nModels, nDoodads, nDoodadSets, RootWMOID, liquidType;
float bbcorn1[3];
float bbcorn2[3];

Expand All @@ -55,8 +57,6 @@ class WMORoot

bool open();
bool ConvertToVMAPRootWmo(FILE* output);
private:
std::string filename;
};

struct WMOLiquidHeader
Expand All @@ -77,9 +77,22 @@ struct WMOLiquidVert

class WMOGroup
{
private:
std::string filename;
public:
// MOGP
int groupName, descGroupName, mogpFlags;

char* MOPY;
uint16* MOVI;
uint16* MoviEx;
float* MOVT;
uint16* MOBA;
int* MobaEx;
WMOLiquidHeader* hlq;
WMOLiquidVert* LiquEx;
char* LiquBytes;
int groupName, descGroupName;
int mogpFlags;
float bbcorn1[3];
float bbcorn2[3];
uint16 moprIdx;
Expand All @@ -92,25 +105,13 @@ class WMOGroup
int LiquEx_size;
unsigned int nVertices; // number when loaded
int nTriangles; // number when loaded
char* MOPY;
uint16* MOVI;
uint16* MoviEx;
float* MOVT;
uint16* MOBA;
int* MobaEx;
WMOLiquidHeader* hlq;
WMOLiquidVert* LiquEx;
char* LiquBytes;
uint32 liquflags;

WMOGroup(std::string const& filename);
~WMOGroup();

bool open();
int ConvertToVMAPGroupWmo(FILE* output, WMORoot* rootWMO, bool preciseVectorData);

private:
std::string filename;
};

class WMOInstance
Expand All @@ -121,10 +122,10 @@ class WMOInstance
int currx;
int curry;
WMOGroup* wmo;
int doodadset;
Vec3D pos;
Vec3D pos2, pos3, rot;
uint32 indx, id, d2, d3;
int doodadset;

WMOInstance(MPQFile&f , char const* WmoInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);

Expand Down

0 comments on commit 1d71059

Please sign in to comment.