mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Rename local variable to prevent confusion with member variable.
This commit is contained in:
parent
a7756b5591
commit
6d176cf8db
8 changed files with 42 additions and 42 deletions
|
|
@ -403,14 +403,14 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st)
|
||||||
for(U32 i = 0; i < size; i++)
|
for(U32 i = 0; i < size; i++)
|
||||||
st.read(&functionFloats[i]);
|
st.read(&functionFloats[i]);
|
||||||
}
|
}
|
||||||
U32 codeSize;
|
U32 codeLength;
|
||||||
st.read(&codeSize);
|
st.read(&codeLength);
|
||||||
st.read(&lineBreakPairCount);
|
st.read(&lineBreakPairCount);
|
||||||
|
|
||||||
U32 totSize = codeSize + lineBreakPairCount * 2;
|
U32 totSize = codeLength + lineBreakPairCount * 2;
|
||||||
code = new U32[totSize];
|
code = new U32[totSize];
|
||||||
|
|
||||||
for(i = 0; i < codeSize; i++)
|
for(i = 0; i < codeLength; i++)
|
||||||
{
|
{
|
||||||
U8 b;
|
U8 b;
|
||||||
st.read(&b);
|
st.read(&b);
|
||||||
|
|
@ -420,10 +420,10 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st)
|
||||||
code[i] = b;
|
code[i] = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = codeSize; i < totSize; i++)
|
for(i = codeLength; i < totSize; i++)
|
||||||
st.read(&code[i]);
|
st.read(&code[i]);
|
||||||
|
|
||||||
lineBreakPairs = code + codeSize;
|
lineBreakPairs = code + codeLength;
|
||||||
|
|
||||||
// StringTable-ize our identifiers.
|
// StringTable-ize our identifiers.
|
||||||
U32 identCount;
|
U32 identCount;
|
||||||
|
|
|
||||||
|
|
@ -1011,8 +1011,8 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
localStart.x = getWidth() - mBitmapBounds[2].extent.x - txt_w;
|
localStart.x = getWidth() - bitmapBounds[2].extent.x - txt_w;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1024,8 +1024,8 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
localStart.x = (getWidth() - mBitmapBounds[2].extent.x - txt_w) / 2;
|
localStart.x = (getWidth() - bitmapBounds[2].extent.x - txt_w) / 2;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
|
@ -1043,8 +1043,8 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
localStart.x = getWidth() - mBitmapBounds[2].extent.x - txt_w;
|
localStart.x = getWidth() - bitmapBounds[2].extent.x - txt_w;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1095,8 +1095,8 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect )
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
Point2I textpos = localToGlobalCoord( Point2I( getWidth() - txt_w - mBitmapBounds[2].extent.x, localStart.y ) );
|
Point2I textpos = localToGlobalCoord( Point2I( getWidth() - txt_w - bitmapBounds[2].extent.x, localStart.y ) );
|
||||||
GFX->getDrawUtil()->drawText( mProfile->mFont, textpos, buff, mProfile->mFontColors );
|
GFX->getDrawUtil()->drawText( mProfile->mFont, textpos, buff, mProfile->mFontColors );
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
|
|
@ -1167,8 +1167,8 @@ void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect)
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
localStart.x = getWidth() - mBitmapBounds[2].extent.x - txt_w;
|
localStart.x = getWidth() - bitmapBounds[2].extent.x - txt_w;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1180,8 +1180,8 @@ void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect)
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
localStart.x = (getWidth() - mBitmapBounds[2].extent.x - txt_w) / 2;
|
localStart.x = (getWidth() - bitmapBounds[2].extent.x - txt_w) / 2;
|
||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
|
@ -1199,8 +1199,8 @@ void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect)
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
localStart.x = getWidth() - mBitmapBounds[2].extent.x - txt_w;
|
localStart.x = getWidth() - bitmapBounds[2].extent.x - txt_w;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1251,8 +1251,8 @@ void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect)
|
||||||
{
|
{
|
||||||
// We're making use of a bitmap border, so take into account the
|
// We're making use of a bitmap border, so take into account the
|
||||||
// right cap of the border.
|
// right cap of the border.
|
||||||
RectI* mBitmapBounds = mProfile->mBitmapArrayRects.address();
|
RectI* bitmapBounds = mProfile->mBitmapArrayRects.address();
|
||||||
Point2I textpos = localToGlobalCoord( Point2I( getWidth() - txt_w - mBitmapBounds[2].extent.x, localStart.y ) );
|
Point2I textpos = localToGlobalCoord( Point2I( getWidth() - txt_w - bitmapBounds[2].extent.x, localStart.y ) );
|
||||||
GFX->getDrawUtil()->drawText( mProfile->mFont, textpos, buff, mProfile->mFontColors );
|
GFX->getDrawUtil()->drawText( mProfile->mFont, textpos, buff, mProfile->mFontColors );
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
|
|
@ -623,7 +623,7 @@ void ColladaAppMesh::getPrimitives(const domGeometry* geometry)
|
||||||
delete meshPrims[iPrim];
|
delete meshPrims[iPrim];
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const MatrixF& objectOffset,
|
void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const MatrixF& objOffset,
|
||||||
Vector<Point3F>& v_points,
|
Vector<Point3F>& v_points,
|
||||||
Vector<Point3F>& v_norms,
|
Vector<Point3F>& v_norms,
|
||||||
Vector<ColorI>& v_colors,
|
Vector<ColorI>& v_colors,
|
||||||
|
|
@ -693,7 +693,7 @@ void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const
|
||||||
if (appNode->invertMeshes)
|
if (appNode->invertMeshes)
|
||||||
points_array[iVert].z = -points_array[iVert].z;
|
points_array[iVert].z = -points_array[iVert].z;
|
||||||
|
|
||||||
objectOffset.mulP(points_array[iVert]);
|
objOffset.mulP(points_array[iVert]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (appendValues || ((tuple.uv >= 0) && (tuple.uv < streams.uvs.size()))) {
|
if (appendValues || ((tuple.uv >= 0) && (tuple.uv < streams.uvs.size()))) {
|
||||||
|
|
@ -755,7 +755,7 @@ void ColladaAppMesh::getVertexData(const domGeometry* geometry, F32 time, const
|
||||||
delete meshPrims[iPrim];
|
delete meshPrims[iPrim];
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const MatrixF& objectOffset,
|
void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const MatrixF& objOffset,
|
||||||
Vector<Point3F>& v_points,
|
Vector<Point3F>& v_points,
|
||||||
Vector<Point3F>& v_norms,
|
Vector<Point3F>& v_norms,
|
||||||
Vector<ColorI>& v_colors,
|
Vector<ColorI>& v_colors,
|
||||||
|
|
@ -807,7 +807,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
||||||
return;
|
return;
|
||||||
|
|
||||||
getPrimitives(baseGeometry);
|
getPrimitives(baseGeometry);
|
||||||
getVertexData(baseGeometry, time, objectOffset, v_points, v_norms, v_colors, v_uvs, v_uv2s, true);
|
getVertexData(baseGeometry, time, objOffset, v_points, v_norms, v_colors, v_uvs, v_uv2s, true);
|
||||||
|
|
||||||
// Get pointers to the arrays of base geometry data
|
// Get pointers to the arrays of base geometry data
|
||||||
Point3F* points_array = &v_points[v_points.size() - vertTuples.size()];
|
Point3F* points_array = &v_points[v_points.size() - vertTuples.size()];
|
||||||
|
|
@ -863,7 +863,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
||||||
if (uv2s_array)
|
if (uv2s_array)
|
||||||
targetUv2s.set(uv2s_array, vertTuples.size());
|
targetUv2s.set(uv2s_array, vertTuples.size());
|
||||||
|
|
||||||
getVertexData(targetGeoms[iTarget], time, objectOffset, targetPoints, targetNorms, targetColors, targetUvs, targetUv2s, false);
|
getVertexData(targetGeoms[iTarget], time, objOffset, targetPoints, targetNorms, targetColors, targetUvs, targetUv2s, false);
|
||||||
|
|
||||||
// Combine with base geometry
|
// Combine with base geometry
|
||||||
for (int iVert = 0; iVert < vertTuples.size(); iVert++) {
|
for (int iVert = 0; iVert < vertTuples.size(); iVert++) {
|
||||||
|
|
@ -883,7 +883,7 @@ void ColladaAppMesh::getMorphVertexData(const domMorph* morph, F32 time, const M
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColladaAppMesh::lockMesh(F32 t, const MatrixF& objectOffset)
|
void ColladaAppMesh::lockMesh(F32 t, const MatrixF& objOffset)
|
||||||
{
|
{
|
||||||
// Find the geometry element for this mesh. Could be one of 3 things:
|
// Find the geometry element for this mesh. Could be one of 3 things:
|
||||||
// 1) a simple static mesh (Collada <geometry> element)
|
// 1) a simple static mesh (Collada <geometry> element)
|
||||||
|
|
@ -923,10 +923,10 @@ void ColladaAppMesh::lockMesh(F32 t, const MatrixF& objectOffset)
|
||||||
// Now get the vertex data at the specified time
|
// Now get the vertex data at the specified time
|
||||||
if (geometry->getElementType() == COLLADA_TYPE::GEOMETRY) {
|
if (geometry->getElementType() == COLLADA_TYPE::GEOMETRY) {
|
||||||
getPrimitives(daeSafeCast<domGeometry>(geometry));
|
getPrimitives(daeSafeCast<domGeometry>(geometry));
|
||||||
getVertexData(daeSafeCast<domGeometry>(geometry), t, objectOffset, points, normals, colors, uvs, uv2s, true);
|
getVertexData(daeSafeCast<domGeometry>(geometry), t, objOffset, points, normals, colors, uvs, uv2s, true);
|
||||||
}
|
}
|
||||||
else if (geometry->getElementType() == COLLADA_TYPE::MORPH) {
|
else if (geometry->getElementType() == COLLADA_TYPE::MORPH) {
|
||||||
getMorphVertexData(daeSafeCast<domMorph>(geometry), t, objectOffset, points, normals, colors, uvs, uv2s);
|
getMorphVertexData(daeSafeCast<domMorph>(geometry), t, objOffset, points, normals, colors, uvs, uv2s);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
daeErrorHandler::get()->handleWarning(avar("Unsupported geometry type "
|
daeErrorHandler::get()->handleWarning(avar("Unsupported geometry type "
|
||||||
|
|
|
||||||
|
|
@ -109,11 +109,11 @@ protected:
|
||||||
bool checkGeometryType(const daeElement* element);
|
bool checkGeometryType(const daeElement* element);
|
||||||
void getPrimitives(const domGeometry* geometry);
|
void getPrimitives(const domGeometry* geometry);
|
||||||
|
|
||||||
void getVertexData( const domGeometry* geometry, F32 time, const MatrixF& objectOffset,
|
void getVertexData( const domGeometry* geometry, F32 time, const MatrixF& objOffset,
|
||||||
Vector<Point3F>& points, Vector<Point3F>& norms, Vector<ColorI>& colors,
|
Vector<Point3F>& points, Vector<Point3F>& norms, Vector<ColorI>& colors,
|
||||||
Vector<Point2F>& uvs, Vector<Point2F>& uv2s, bool appendValues);
|
Vector<Point2F>& uvs, Vector<Point2F>& uv2s, bool appendValues);
|
||||||
|
|
||||||
void getMorphVertexData( const domMorph* morph, F32 time, const MatrixF& objectOffset,
|
void getMorphVertexData( const domMorph* morph, F32 time, const MatrixF& objOffset,
|
||||||
Vector<Point3F>& points, Vector<Point3F>& norms, Vector<ColorI>& colors,
|
Vector<Point3F>& points, Vector<Point3F>& norms, Vector<ColorI>& colors,
|
||||||
Vector<Point2F>& uvs, Vector<Point2F>& uv2s );
|
Vector<Point2F>& uvs, Vector<Point2F>& uv2s );
|
||||||
|
|
||||||
|
|
@ -211,8 +211,8 @@ public:
|
||||||
/// Generate the vertex, normal and triangle data for the mesh.
|
/// Generate the vertex, normal and triangle data for the mesh.
|
||||||
///
|
///
|
||||||
/// @param time Time at which to generate the mesh data
|
/// @param time Time at which to generate the mesh data
|
||||||
/// @param objectOffset Transform to apply to the generated data (bounds transform)
|
/// @param objOffset Transform to apply to the generated data (bounds transform)
|
||||||
void lockMesh(F32 time, const MatrixF& objectOffset);
|
void lockMesh(F32 time, const MatrixF& objOffset);
|
||||||
|
|
||||||
/// Get the transform of this mesh at a certain time
|
/// Get the transform of this mesh at a certain time
|
||||||
///
|
///
|
||||||
|
|
|
||||||
|
|
@ -1225,7 +1225,7 @@ void TSShape::assembleShape()
|
||||||
if (smReadVersion<23)
|
if (smReadVersion<23)
|
||||||
{
|
{
|
||||||
// get detail information about skins...
|
// get detail information about skins...
|
||||||
S32 * detailFirstSkin = tsalloc.getPointer32(numDetails);
|
S32 * detFirstSkin = tsalloc.getPointer32(numDetails);
|
||||||
S32 * detailNumSkins = tsalloc.getPointer32(numDetails);
|
S32 * detailNumSkins = tsalloc.getPointer32(numDetails);
|
||||||
|
|
||||||
tsalloc.checkGuard();
|
tsalloc.checkGuard();
|
||||||
|
|
@ -1257,7 +1257,7 @@ void TSShape::assembleShape()
|
||||||
ptr32 = tsalloc.allocShape32(numSkins);
|
ptr32 = tsalloc.allocShape32(numSkins);
|
||||||
for (i=0; i<numSkins; i++)
|
for (i=0; i<numSkins; i++)
|
||||||
{
|
{
|
||||||
bool skip = i<detailFirstSkin[skipDL];
|
bool skip = i<detFirstSkin[skipDL];
|
||||||
TSSkinMesh * skin = (TSSkinMesh*)TSMesh::assembleMesh(TSMesh::SkinMeshType,skip);
|
TSSkinMesh * skin = (TSSkinMesh*)TSMesh::assembleMesh(TSMesh::SkinMeshType,skip);
|
||||||
if (meshes.address())
|
if (meshes.address())
|
||||||
{
|
{
|
||||||
|
|
@ -1286,7 +1286,7 @@ void TSShape::assembleShape()
|
||||||
tsalloc.checkGuard();
|
tsalloc.checkGuard();
|
||||||
|
|
||||||
// we now have skins in mesh list...add skin objects to object list and patch things up
|
// we now have skins in mesh list...add skin objects to object list and patch things up
|
||||||
fixupOldSkins(numMeshes,numSkins,numDetails,detailFirstSkin,detailNumSkins);
|
fixupOldSkins(numMeshes,numSkins,numDetails,detFirstSkin,detailNumSkins);
|
||||||
}
|
}
|
||||||
|
|
||||||
// allocate storage space for some arrays (filled in during Shape::init)...
|
// allocate storage space for some arrays (filled in during Shape::init)...
|
||||||
|
|
|
||||||
|
|
@ -597,7 +597,7 @@ class TSShape
|
||||||
/// mem buffer transfer helper (indicate when we don't want to include a particular mesh/decal)
|
/// mem buffer transfer helper (indicate when we don't want to include a particular mesh/decal)
|
||||||
bool checkSkip(S32 meshNum, S32 & curObject, S32 skipDL);
|
bool checkSkip(S32 meshNum, S32 & curObject, S32 skipDL);
|
||||||
|
|
||||||
void fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detailFirstSkin, S32 * detailNumSkins);
|
void fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detFirstSkin, S32 * detailNumSkins);
|
||||||
|
|
||||||
/// @name Shape Editing
|
/// @name Shape Editing
|
||||||
/// @{
|
/// @{
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
// put old skins into object list
|
// put old skins into object list
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detailFirstSkin, S32 * detailNumSkins)
|
void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * detFirstSkin, S32 * detailNumSkins)
|
||||||
{
|
{
|
||||||
#if !defined(TORQUE_MAX_LIB)
|
#if !defined(TORQUE_MAX_LIB)
|
||||||
// this method not necessary in exporter, and a couple lines won't compile for exporter
|
// this method not necessary in exporter, and a couple lines won't compile for exporter
|
||||||
|
|
@ -63,9 +63,9 @@ void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * d
|
||||||
// find one mesh per detail to add to this object
|
// find one mesh per detail to add to this object
|
||||||
// don't really need to be versions of the same object
|
// don't really need to be versions of the same object
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i<detailFirstSkin[dl] || detailFirstSkin[dl]<0)
|
while (i<detFirstSkin[dl] || detFirstSkin[dl]<0)
|
||||||
i++;
|
i++;
|
||||||
for (; i<numSkins && i<detailFirstSkin[dl]+detailNumSkins[dl]; i++)
|
for (; i<numSkins && i<detFirstSkin[dl]+detailNumSkins[dl]; i++)
|
||||||
{
|
{
|
||||||
if (skins[i])
|
if (skins[i])
|
||||||
{
|
{
|
||||||
|
|
@ -77,7 +77,7 @@ void TSShape::fixupOldSkins(S32 numMeshes, S32 numSkins, S32 numDetails, S32 * d
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i==numSkins || i==detailFirstSkin[dl]+detailNumSkins[dl])
|
if (i==numSkins || i==detFirstSkin[dl]+detailNumSkins[dl])
|
||||||
{
|
{
|
||||||
skinsCopy.push_back(NULL);
|
skinsCopy.push_back(NULL);
|
||||||
object.numMeshes++;
|
object.numMeshes++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue