diff --git a/src/osgPlugins/txp/trpage_geom.cpp b/src/osgPlugins/txp/trpage_geom.cpp index 77aebaebf..3debbd0b6 100644 --- a/src/osgPlugins/txp/trpage_geom.cpp +++ b/src/osgPlugins/txp/trpage_geom.cpp @@ -142,9 +142,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(pt.x)); + vertDataFloat.push_back(static_cast(pt.y)); + vertDataFloat.push_back(static_cast(pt.z)); } else { vertDataDouble.push_back(pt.x); vertDataDouble.push_back(pt.y); @@ -176,9 +176,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(pt.x)); + normDataFloat.push_back(static_cast(pt.y)); + normDataFloat.push_back(static_cast(pt.z)); } else { normDataDouble.push_back(pt.x); normDataDouble.push_back(pt.y); @@ -268,8 +268,8 @@ void trpgGeometry::AddTexCoord(DataType type,trpg2dPoint &pt, int n) trpgTexData *td = &texData[n]; if (type == FloatData) { - td->floatData.push_back(pt.x); - td->floatData.push_back(pt.y); + td->floatData.push_back(static_cast(pt.x)); + td->floatData.push_back(static_cast(pt.y)); } else { td->doubleData.push_back(pt.x); td->doubleData.push_back(pt.y); @@ -284,8 +284,8 @@ void trpgGeometry::AddTexCoord(DataType type,std::vector &pts) trpgTexData *td = &texData[loop]; if (type == FloatData) { - td->floatData.push_back(pts[loop].x); - td->floatData.push_back(pts[loop].y); + td->floatData.push_back(static_cast(pts[loop].x)); + td->floatData.push_back(static_cast(pts[loop].y)); } else { td->doubleData.push_back(pts[loop].x); td->doubleData.push_back(pts[loop].y); @@ -364,7 +364,7 @@ bool trpgGeometry::GetVertices(float32 *v) const v[i] = vertDataFloat[i]; else for (i=0;i(vertDataDouble[i]); return true; } bool trpgGeometry::GetVertices(float64 *v) const @@ -417,7 +417,7 @@ bool trpgGeometry::GetNormals(float32 *v) const v[i] = normDataFloat[i]; else for (i=0;i(normDataDouble[i]); return true; } bool trpgGeometry::GetNormals(float64 *v) const diff --git a/src/osgPlugins/txp/trpage_readbuf.cpp b/src/osgPlugins/txp/trpage_readbuf.cpp index dbb1ce694..c92df987c 100644 --- a/src/osgPlugins/txp/trpage_readbuf.cpp +++ b/src/osgPlugins/txp/trpage_readbuf.cpp @@ -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; diff --git a/src/osgPlugins/txp/trpage_warchive.cpp b/src/osgPlugins/txp/trpage_warchive.cpp index c83f10232..c7fb5a098 100644 --- a/src/osgPlugins/txp/trpage_warchive.cpp +++ b/src/osgPlugins/txp/trpage_warchive.cpp @@ -677,7 +677,7 @@ bool trpgwArchive::WriteTile(unsigned int x,unsigned int y,unsigned int lod, flo return false; } - int32 pos = tileFile->Pos(); + int64 pos = tileFile->Pos(); if (!tileFile->Append(head,buf)) return false; // Keep track of the fact that this went here diff --git a/src/osgPlugins/txp/trpage_write.h b/src/osgPlugins/txp/trpage_write.h index 3b82a26cc..f6daaba9a 100644 --- a/src/osgPlugins/txp/trpage_write.h +++ b/src/osgPlugins/txp/trpage_write.h @@ -273,7 +273,7 @@ public: public: int x,y,lod; // Identifying info for tile float zmin,zmax; - uint32 offset; // Offset into file + int64 offset; // Offset into file }; class TileFile { public: