mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core: Fix some silly warnings (some stupid remnants from old times that has bugged me enough)
No need to recompiling anything, it's just a visual change to make the compilers STFU about variable initializations
This commit is contained in:
@@ -123,7 +123,8 @@
|
||||
#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;
|
||||
}
|
||||
@@ -131,6 +132,7 @@ static uint32_t func1(uint32_t x) {
|
||||
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,
|
||||
|
||||
@@ -59,8 +59,8 @@ public:
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -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();
|
||||
@@ -126,11 +131,6 @@ public:
|
||||
return Mcell;
|
||||
}
|
||||
*/
|
||||
private:
|
||||
//size_t mcnk_offsets[256], mcnk_sizes[256];
|
||||
MPQFile ADT;
|
||||
//mcell Mcell;
|
||||
string Adtfilename;
|
||||
};
|
||||
|
||||
const char * GetPlainName(const char * FileName);
|
||||
|
||||
@@ -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;
|
||||
@@ -40,17 +49,6 @@ public:
|
||||
|
||||
Model(std::string& filename);
|
||||
~Model() { _unload(); }
|
||||
|
||||
private:
|
||||
void _unload()
|
||||
{
|
||||
delete[] vertices;
|
||||
delete[] indices;
|
||||
vertices = NULL;
|
||||
indices = NULL;
|
||||
}
|
||||
|
||||
std::string filename;
|
||||
};
|
||||
|
||||
class ModelInstance
|
||||
@@ -63,7 +61,7 @@ public:
|
||||
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);
|
||||
|
||||
};
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -10,6 +10,9 @@ class ADTFile;
|
||||
|
||||
class WDTFile
|
||||
{
|
||||
private:
|
||||
MPQFile WDT;
|
||||
string filename;
|
||||
public:
|
||||
WDTFile(char* file_name, char* file_name1);
|
||||
~WDTFile(void);
|
||||
@@ -19,10 +22,6 @@ public:
|
||||
int gnWMO;
|
||||
|
||||
ADTFile* GetMap(int x, int z);
|
||||
|
||||
private:
|
||||
MPQFile WDT;
|
||||
string filename;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -55,8 +57,6 @@ public:
|
||||
|
||||
bool open();
|
||||
bool ConvertToVMAPRootWmo(FILE* output);
|
||||
private:
|
||||
std::string filename;
|
||||
};
|
||||
|
||||
struct WMOLiquidHeader
|
||||
@@ -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;
|
||||
@@ -92,15 +105,6 @@ public:
|
||||
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);
|
||||
@@ -108,9 +112,6 @@ public:
|
||||
|
||||
bool open();
|
||||
int ConvertToVMAPGroupWmo(FILE* output, WMORoot* rootWMO, bool preciseVectorData);
|
||||
|
||||
private:
|
||||
std::string filename;
|
||||
};
|
||||
|
||||
class WMOInstance
|
||||
@@ -121,10 +122,10 @@ public:
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user