Fixed VisualStudio .NET warnings in TXP plugin.
This commit is contained in:
parent
ab64566b61
commit
4b5e4904ac
@ -144,9 +144,9 @@ void trpgGeometry::SetVertices(int num,const float64 *data)
|
||||
void trpgGeometry::AddVertex(DataType type,trpg3dPoint &pt)
|
||||
{
|
||||
if (type == FloatData) {
|
||||
vertDataFloat.push_back(pt.x);
|
||||
vertDataFloat.push_back(pt.y);
|
||||
vertDataFloat.push_back(pt.z);
|
||||
vertDataFloat.push_back(static_cast<float>(pt.x));
|
||||
vertDataFloat.push_back(static_cast<float>(pt.y));
|
||||
vertDataFloat.push_back(static_cast<float>(pt.z));
|
||||
} else {
|
||||
vertDataDouble.push_back(pt.x);
|
||||
vertDataDouble.push_back(pt.y);
|
||||
@ -178,9 +178,9 @@ void trpgGeometry::SetNormals(int num,BindType bind,const float64 *data)
|
||||
void trpgGeometry::AddNormal(DataType type,trpg3dPoint &pt)
|
||||
{
|
||||
if (type == FloatData) {
|
||||
normDataFloat.push_back(pt.x);
|
||||
normDataFloat.push_back(pt.y);
|
||||
normDataFloat.push_back(pt.z);
|
||||
normDataFloat.push_back(static_cast<float>(pt.x));
|
||||
normDataFloat.push_back(static_cast<float>(pt.y));
|
||||
normDataFloat.push_back(static_cast<float>(pt.z));
|
||||
} else {
|
||||
normDataDouble.push_back(pt.x);
|
||||
normDataDouble.push_back(pt.y);
|
||||
@ -270,8 +270,8 @@ void trpgGeometry::AddTexCoord(DataType type,trpg2dPoint &pt)
|
||||
trpgTexData *td = &texData[0];
|
||||
|
||||
if (type == FloatData) {
|
||||
td->floatData.push_back(pt.x);
|
||||
td->floatData.push_back(pt.y);
|
||||
td->floatData.push_back(static_cast<float>(pt.x));
|
||||
td->floatData.push_back(static_cast<float>(pt.y));
|
||||
} else {
|
||||
td->doubleData.push_back(pt.x);
|
||||
td->doubleData.push_back(pt.y);
|
||||
@ -349,7 +349,7 @@ bool trpgGeometry::GetVertices(float32 *v) const
|
||||
v[i] = vertDataFloat[i];
|
||||
else
|
||||
for (i=0;i<vertDataDouble.size();i++)
|
||||
v[i] = vertDataDouble[i];
|
||||
v[i] = static_cast<float>(vertDataDouble[i]);
|
||||
return true;
|
||||
}
|
||||
bool trpgGeometry::GetVertices(float64 *v) const
|
||||
@ -383,9 +383,9 @@ bool trpgGeometry::GetVertices(osg::Vec3* v) const
|
||||
{
|
||||
for (i=0;i<vertDataDouble.size()/3;i++ )
|
||||
{
|
||||
v[i].x() = vertDataDouble[3*i+0];
|
||||
v[i].y() = vertDataDouble[3*i+1];
|
||||
v[i].z() = vertDataDouble[3*i+2];
|
||||
v[i].x() = static_cast<float>(vertDataDouble[3*i+0]);
|
||||
v[i].y() = static_cast<float>(vertDataDouble[3*i+1]);
|
||||
v[i].z() = static_cast<float>(vertDataDouble[3*i+2]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -427,7 +427,7 @@ bool trpgGeometry::GetNormals(float32 *v) const
|
||||
v[i] = normDataFloat[i];
|
||||
else
|
||||
for (i=0;i<normDataDouble.size();i++)
|
||||
v[i] = normDataDouble[i];
|
||||
v[i] = static_cast<float>(normDataDouble[i]);
|
||||
return true;
|
||||
}
|
||||
bool trpgGeometry::GetNormals(float64 *v) const
|
||||
@ -462,9 +462,9 @@ bool trpgGeometry::GetNormals(osg::Vec3* v) const
|
||||
{
|
||||
for (i=0;i<normDataDouble.size()/3;i++)
|
||||
{
|
||||
v[i].x() = normDataDouble[3*i+0];
|
||||
v[i].y() = normDataDouble[3*i+1];
|
||||
v[i].z() = normDataDouble[3*i+2];
|
||||
v[i].x() = static_cast<float>(normDataDouble[3*i+0]);
|
||||
v[i].y() = static_cast<float>(normDataDouble[3*i+1]);
|
||||
v[i].z() = static_cast<float>(normDataDouble[3*i+2]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -55,7 +55,7 @@ bool trpgReadBuffer::Get(int64 &ret)
|
||||
|
||||
if (!GetData((char *)&val,sizeof(int64))) return false;
|
||||
if (ness != cpuNess)
|
||||
ret = trpg_byteswap_long(val);
|
||||
ret = trpg_byteswap_llong(val);
|
||||
else
|
||||
ret = val;
|
||||
|
||||
|
@ -445,7 +445,7 @@ bool trpgwArchive::WriteTile(unsigned int x,unsigned int y,unsigned int lod, flo
|
||||
return false;
|
||||
}
|
||||
|
||||
int32 pos = tileFile->Pos();
|
||||
int32 pos = static_cast<int32>(tileFile->Pos());
|
||||
if (!tileFile->Append(head,buf))
|
||||
return false;
|
||||
// Keep track of the fact that this went here
|
||||
@ -1031,7 +1031,7 @@ bool trpgwImageHelper::WriteToArchive(const trpgTexture &tex,char *data,trpgwApp
|
||||
|
||||
// Get the current address
|
||||
addr.file = texFileIDs[texFileIDs.size()-1];
|
||||
addr.offset = texFile->Pos();
|
||||
addr.offset = static_cast<int32>(texFile->Pos());
|
||||
|
||||
// Write the data out to the archive.
|
||||
int totSize = tex.CalcTotalSize();
|
||||
|
@ -131,7 +131,7 @@ void trpgMemWriteBuffer::Add(int32 val)
|
||||
void trpgMemWriteBuffer::Add(int64 val)
|
||||
{
|
||||
if (ness != cpuNess)
|
||||
val = trpg_byteswap_long(val);
|
||||
val = trpg_byteswap_llong(val);
|
||||
append(sizeof(int64),(const char *)&val);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user