mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
* BugFix: Clear some MSVC compiler warnings.
This commit is contained in:
parent
026409ed7f
commit
5d26dba7da
|
|
@ -222,7 +222,6 @@ bool ConvexShape::protectedSetSurface( void *object, const char *index, const ch
|
|||
*/
|
||||
|
||||
String t = data;
|
||||
S32 len = t.length();
|
||||
|
||||
dSscanf( data, "%g %g %g %g %g %g %g %i %g %g %g %g %f", &quat.x, &quat.y, &quat.z, &quat.w, &pos.x, &pos.y, &pos.z,
|
||||
&matID, &offset.x, &offset.y, &scale.x, &scale.y, &rot);
|
||||
|
|
@ -961,17 +960,6 @@ bool ConvexShape::castRay( const Point3F &start, const Point3F &end, RayInfo *in
|
|||
VectorF rayDir( end - start );
|
||||
rayDir.normalizeSafe();
|
||||
|
||||
if ( false )
|
||||
{
|
||||
PlaneF plane( Point3F(0,0,0), Point3F(0,0,1) );
|
||||
Point3F sp( 0,0,-1 );
|
||||
Point3F ep( 0,0,1 );
|
||||
|
||||
F32 t = plane.intersect( sp, ep );
|
||||
Point3F hitPnt;
|
||||
hitPnt.interpolate( sp, ep, t );
|
||||
}
|
||||
|
||||
for ( S32 i = 0; i < planeCount; i++ )
|
||||
{
|
||||
// Don't hit the back-side of planes.
|
||||
|
|
@ -1376,8 +1364,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
|
|||
{
|
||||
U32 count = faceList[i].triangles.size();
|
||||
|
||||
S32 matID = mSurfaceUVs[i].matID;
|
||||
|
||||
mSurfaceBuffers[mSurfaceUVs[i].matID].mPrimCount += count;
|
||||
mSurfaceBuffers[mSurfaceUVs[i].matID].mVertCount += count * 3;
|
||||
}
|
||||
|
|
@ -1429,9 +1415,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
|
|||
{
|
||||
if (mSurfaceBuffers[i].mVertCount > 0)
|
||||
{
|
||||
U32 primCount = mSurfaceBuffers[i].mPrimCount;
|
||||
U32 vertCount = mSurfaceBuffers[i].mVertCount;
|
||||
|
||||
mSurfaceBuffers[i].mVertexBuffer.set(GFX, mSurfaceBuffers[i].mVertCount, GFXBufferTypeStatic);
|
||||
VertexType *pVert = mSurfaceBuffers[i].mVertexBuffer.lock();
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ namespace IBLUtilities
|
|||
}
|
||||
|
||||
GFXShaderConstBufferRef irrConsts = irrShader->allocConstBuffer();
|
||||
GFXShaderConstHandle* irrEnvMapSC = irrShader->getShaderConstHandle("$environmentMap");
|
||||
GFXShaderConstHandle* irrFaceSC = irrShader->getShaderConstHandle("$face");
|
||||
|
||||
GFXStateBlockDesc desc;
|
||||
|
|
@ -132,7 +131,6 @@ namespace IBLUtilities
|
|||
}
|
||||
|
||||
GFXShaderConstBufferRef prefilterConsts = prefilterShader->allocConstBuffer();
|
||||
GFXShaderConstHandle* prefilterEnvMapSC = prefilterShader->getShaderConstHandle("$environmentMap");
|
||||
GFXShaderConstHandle* prefilterFaceSC = prefilterShader->getShaderConstHandle("$face");
|
||||
GFXShaderConstHandle* prefilterRoughnessSC = prefilterShader->getShaderConstHandle("$roughness");
|
||||
GFXShaderConstHandle* prefilterMipSizeSC = prefilterShader->getShaderConstHandle("$mipSize");
|
||||
|
|
|
|||
|
|
@ -407,7 +407,6 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr)
|
|||
{
|
||||
if (!Parent::preload(server, errorStr))
|
||||
return false;
|
||||
bool shapeError = false;
|
||||
|
||||
// Resolve objects transmitted from server
|
||||
if (!server) {
|
||||
|
|
|
|||
|
|
@ -827,7 +827,6 @@ void SimXMLDocument::setObjectAttributes(const char* objectID)
|
|||
|
||||
char textbuf[1024];
|
||||
tinyxml2::XMLElement* field = m_qDocument->NewElement("Field");
|
||||
tinyxml2::XMLElement* group = m_qDocument->NewElement("FieldGroup");
|
||||
pElement->SetAttribute( "Name", pObject->getName() );
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ void StmtNode::addBreakLine(CodeStream& code)
|
|||
|
||||
//------------------------------------------------------------
|
||||
|
||||
StmtNode::StmtNode()
|
||||
StmtNode::StmtNode() : dbgLineNumber(0)
|
||||
{
|
||||
next = NULL;
|
||||
dbgFileName = CodeBlock::smCurrentParser->getCurrentFile();
|
||||
|
|
@ -84,12 +84,12 @@ void StmtNode::setPackage(StringTableEntry)
|
|||
{
|
||||
}
|
||||
|
||||
void StmtNode::append(StmtNode* next)
|
||||
void StmtNode::append(StmtNode* appended)
|
||||
{
|
||||
StmtNode* walk = this;
|
||||
while (walk->next)
|
||||
walk = walk->next;
|
||||
walk->next = next;
|
||||
walk->next = appended;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -717,7 +717,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
|||
TelDebugger->pushStackFrame();
|
||||
|
||||
StringTableEntry var, objParent;
|
||||
U32 failJump;
|
||||
U32 failJump = 0;
|
||||
StringTableEntry fnName;
|
||||
StringTableEntry fnNamespace, fnPackage;
|
||||
|
||||
|
|
@ -776,7 +776,6 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
|||
fnNamespace = CodeToSTE(code, ip + 2);
|
||||
fnPackage = CodeToSTE(code, ip + 4);
|
||||
bool hasBody = (code[ip + 6] & 0x01) != 0;
|
||||
U32 lineNumber = code[ip + 6] >> 1;
|
||||
|
||||
Namespace::unlinkPackages();
|
||||
if (fnNamespace == NULL && fnPackage == NULL)
|
||||
|
|
@ -1819,8 +1818,6 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
|||
// it handles this method. It is set to an enum from the table
|
||||
// above indicating whether it handles it on a component it owns
|
||||
// or just on the object.
|
||||
S32 routingId = 0;
|
||||
|
||||
fnName = CodeToSTE(code, ip);
|
||||
fnNamespace = CodeToSTE(code, ip + 2);
|
||||
U32 callType = code[ip + 4];
|
||||
|
|
|
|||
|
|
@ -278,7 +278,6 @@ void CloudLayer::unpackUpdate( NetConnection *conn, BitStream *stream )
|
|||
|
||||
stream->read( &mBaseColor );
|
||||
|
||||
F32 oldCoverage = mCoverage;
|
||||
stream->read( &mCoverage );
|
||||
stream->read( &mExposure );
|
||||
|
||||
|
|
|
|||
|
|
@ -2896,7 +2896,6 @@ void MeshRoad::_generateVerts()
|
|||
|
||||
// Make Primitive Buffers
|
||||
U32 p00, p01, p11, p10;
|
||||
U32 pb00, pb01, pb11, pb10;
|
||||
U32 offset = 0;
|
||||
U16 *pIdx = NULL;
|
||||
U32 curIdx = 0;
|
||||
|
|
|
|||
|
|
@ -190,8 +190,6 @@ void ForestItemData::unpackData(BitStream* stream)
|
|||
stream->read( &localName );
|
||||
setInternalName( localName );
|
||||
|
||||
char readBuffer[1024];
|
||||
|
||||
UNPACKDATA_SHAPEASSET(Shape);
|
||||
|
||||
mCollidable = stream->readFlag();
|
||||
|
|
|
|||
|
|
@ -528,9 +528,6 @@ void GFXD3D11CubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSiz
|
|||
|
||||
void GFXD3D11CubemapArray::updateTexture(const GFXCubemapHandle &cubemap, const U32 slot)
|
||||
{
|
||||
U32 cubeMapSz = cubemap->getSize();
|
||||
U32 cubeMapSize = cubemap->getMipMapLevels();
|
||||
|
||||
AssertFatal(slot <= mNumCubemaps, "GFXD3D11CubemapArray::updateTexture - trying to update a cubemap texture that is out of bounds!");
|
||||
AssertFatal(mFormat == cubemap->getFormat(), "GFXD3D11CubemapArray::updateTexture - Destination format doesn't match");
|
||||
AssertFatal(mSize == cubemap->getSize(), "GFXD3D11CubemapArray::updateTexture - Destination size doesn't match");
|
||||
|
|
|
|||
|
|
@ -275,8 +275,6 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
|
|||
Point2I arrowOffset;
|
||||
S32 columnSplit = profile->mColumnSplit * xScale;
|
||||
|
||||
S32 iconIndex;
|
||||
|
||||
bool isRowSelected = (getSelected() != NO_ROW) && (row == mRows[getSelected()]);
|
||||
bool isRowHighlighted = (getHighlighted() != NO_ROW) ? ((row == mRows[getHighlighted()]) && (row->mEnabled)) : false;
|
||||
/*if (profileHasArrows)
|
||||
|
|
@ -384,8 +382,6 @@ void GuiGameListMenuCtrl::onRenderKeybindOption(Row* row, Point2I currentOffset)
|
|||
|
||||
S32 rowHeight = profile->getRowHeight();
|
||||
|
||||
S32 optionWidth = xScale - columnSplit;
|
||||
|
||||
GFXDrawUtil* drawer = GFX->getDrawUtil();
|
||||
//drawer->drawBitmap(row->mBitmap, )
|
||||
|
||||
|
|
@ -1048,7 +1044,6 @@ RectI GuiGameListMenuCtrl::getRowBounds(S32 rowIndex)
|
|||
{
|
||||
GuiGameListMenuProfile* profile = (GuiGameListMenuProfile*)mProfile;
|
||||
|
||||
F32 xScale = (float)getWidth() / profile->getRowWidth();
|
||||
S32 rowHeight = profile->getRowHeight();
|
||||
|
||||
Point2I currentOffset = Point2I::Zero;
|
||||
|
|
@ -1375,9 +1370,6 @@ void GuiGameListMenuCtrl::clickKeybind(Row* row, S32 xPos)
|
|||
|
||||
S32 rowHeight = profile->getRowHeight();
|
||||
|
||||
S32 optionWidth = xScale - columnSplit;
|
||||
|
||||
GFXDrawUtil* drawer = GFX->getDrawUtil();
|
||||
//drawer->drawBitmap(row->mBitmap, )
|
||||
|
||||
Point2I button;
|
||||
|
|
@ -1388,7 +1380,6 @@ void GuiGameListMenuCtrl::clickKeybind(Row* row, S32 xPos)
|
|||
buttonSize.x = rowHeight / 2;
|
||||
buttonSize.y = rowHeight / 2;
|
||||
|
||||
GFXTextureObject* texture = row->mBitmapTex;
|
||||
RectI rect(button, buttonSize);
|
||||
|
||||
if (rect.pointInRect(Point2I(xPos, rowHeight / 2)))
|
||||
|
|
|
|||
|
|
@ -311,7 +311,6 @@ void GuiPopUpMenuCtrl::initPersistFields(void)
|
|||
|
||||
bool GuiPopUpMenuCtrl::_setBitmaps(void* obj, const char* index, const char* data)
|
||||
{
|
||||
bool ret = false;
|
||||
GuiPopUpMenuCtrl* object = static_cast<GuiPopUpMenuCtrl*>(obj);
|
||||
|
||||
object->setBitmap(data);
|
||||
|
|
|
|||
|
|
@ -365,7 +365,6 @@ void GuiPopUpMenuCtrlEx::initPersistFields(void)
|
|||
|
||||
bool GuiPopUpMenuCtrlEx::_setBitmaps(void* obj, const char* index, const char* data)
|
||||
{
|
||||
bool ret = false;
|
||||
GuiPopUpMenuCtrlEx* object = static_cast<GuiPopUpMenuCtrlEx*>(obj);
|
||||
|
||||
object->setBitmap(data);
|
||||
|
|
|
|||
|
|
@ -102,8 +102,6 @@ void GuiRenderTargetVizCtrl::onRender(Point2I offset,
|
|||
|
||||
camObject = dynamic_cast<Camera*>(camObject->getClientObject());
|
||||
|
||||
bool servObj = camObject->isServerObject();
|
||||
|
||||
if (camObject)
|
||||
{
|
||||
GFXTexHandle targ = camObject->getCameraRenderTarget();
|
||||
|
|
|
|||
|
|
@ -323,8 +323,6 @@ void AdvancedLightBinManager::_scoreLights(const MatrixF& cameraTrans)
|
|||
{
|
||||
if (dist > smLightFadeStart)
|
||||
{
|
||||
F32 brightness = light.lightInfo->getBrightness();
|
||||
|
||||
float fadeOutAmt = (dist - smLightFadeStart) / (smLightFadeEnd - smLightFadeStart);
|
||||
fadeOutAmt = 1 - fadeOutAmt;
|
||||
|
||||
|
|
|
|||
|
|
@ -1290,16 +1290,9 @@ void ProcessedShaderMaterial::setCustomShaderData(Vector<CustomShaderBindingData
|
|||
|
||||
for (U32 i = 0; i < shaderData.size(); i++)
|
||||
{
|
||||
for (U32 h = 0; h < handles->mCustomHandles.size(); ++h)
|
||||
{
|
||||
StringTableEntry handleName = shaderData[i].getHandleName();
|
||||
bool tmp = true;
|
||||
}
|
||||
//roll through and try setting our data!
|
||||
for (U32 h = 0; h < handles->mCustomHandles.size(); ++h)
|
||||
{
|
||||
StringTableEntry handleName = shaderData[i].getHandleName();
|
||||
StringTableEntry rpdHandleName = handles->mCustomHandles[h].handleName;
|
||||
if (handles->mCustomHandles[h].handleName == shaderData[i].getHandleName())
|
||||
{
|
||||
if (handles->mCustomHandles[h].handle->isValid())
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ ImplementEnumType(_TamlFormatMode,
|
|||
|
||||
// Iterate fields.
|
||||
U8 arrayDepth = 0;
|
||||
TamlCustomNode* currentArrayNode;
|
||||
TamlCustomNode* currentArrayNode = NULL;
|
||||
for (U32 index = 0; index < fieldCount; ++index)
|
||||
{
|
||||
// Fetch field.
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ void AsyncPacketBufferedInputStream< Stream, Packet >::_requestNext()
|
|||
if( resettable )
|
||||
{
|
||||
IPositionable< U32 >* positionable = dynamic_cast< IPositionable< U32 >* >( &Deref( stream ) );
|
||||
U32 pos;
|
||||
U32 pos = 0;
|
||||
if(positionable)
|
||||
pos = positionable->getPosition();
|
||||
|
||||
|
|
|
|||
|
|
@ -95,36 +95,6 @@ typedef int SOCKET;
|
|||
|
||||
#endif
|
||||
|
||||
#if defined(TORQUE_USE_WINSOCK)
|
||||
static const char* strerror_wsa( S32 code )
|
||||
{
|
||||
switch( code )
|
||||
{
|
||||
#define E( name ) case name: return #name;
|
||||
E( WSANOTINITIALISED );
|
||||
E( WSAENETDOWN );
|
||||
E( WSAEADDRINUSE );
|
||||
E( WSAEINPROGRESS );
|
||||
E( WSAEALREADY );
|
||||
E( WSAEADDRNOTAVAIL );
|
||||
E( WSAEAFNOSUPPORT );
|
||||
E( WSAEFAULT );
|
||||
E( WSAEINVAL );
|
||||
E( WSAEISCONN );
|
||||
E( WSAENETUNREACH );
|
||||
E( WSAEHOSTUNREACH );
|
||||
E( WSAENOBUFS );
|
||||
E( WSAENOTSOCK );
|
||||
E( WSAETIMEDOUT );
|
||||
E( WSAEWOULDBLOCK );
|
||||
E( WSAEACCES );
|
||||
#undef E
|
||||
default:
|
||||
return "Unknown";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "core/util/tVector.h"
|
||||
#include "platform/platformNetAsync.h"
|
||||
#include "console/console.h"
|
||||
|
|
@ -1243,7 +1213,8 @@ void Net::process()
|
|||
}
|
||||
break;
|
||||
case PolledSocket::NameLookupRequired:
|
||||
U32 newState;
|
||||
{
|
||||
U32 newState = Net::NoError;
|
||||
|
||||
// is the lookup complete?
|
||||
if (!gNetAsync.checkLookup(
|
||||
|
|
@ -1262,7 +1233,7 @@ void Net::process()
|
|||
{
|
||||
// try to connect
|
||||
out_h_addr.port = currentSock->remotePort;
|
||||
const sockaddr *ai_addr = NULL;
|
||||
const sockaddr* ai_addr = NULL;
|
||||
int ai_addrlen = 0;
|
||||
sockaddr_in socketAddress;
|
||||
sockaddr_in6 socketAddress6;
|
||||
|
|
@ -1304,7 +1275,7 @@ void Net::process()
|
|||
else
|
||||
{
|
||||
Con::errorf("Error connecting to %s: Invalid Protocol",
|
||||
currentSock->remoteAddr);
|
||||
currentSock->remoteAddr);
|
||||
newState = Net::ConnectFailed;
|
||||
removeSock = true;
|
||||
removeSockHandle = currentSock->handleFd;
|
||||
|
|
@ -1319,7 +1290,7 @@ void Net::process()
|
|||
if (err != Net::WouldBlock)
|
||||
{
|
||||
Con::errorf("Error connecting to %s: %u",
|
||||
currentSock->remoteAddr, err);
|
||||
currentSock->remoteAddr, err);
|
||||
newState = Net::ConnectFailed;
|
||||
removeSock = true;
|
||||
removeSockHandle = currentSock->handleFd;
|
||||
|
|
@ -1340,6 +1311,7 @@ void Net::process()
|
|||
|
||||
smConnectionNotify->trigger(currentSock->handleFd, newState);
|
||||
break;
|
||||
}
|
||||
case PolledSocket::Listening:
|
||||
NetAddress incomingAddy;
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,6 @@ void RenderTranslucentMgr::render( SceneRenderState *state )
|
|||
GFXTextureObject *lastLM = NULL;
|
||||
GFXCubemap *lastCubemap = NULL;
|
||||
GFXTextureObject *lastReflectTex = NULL;
|
||||
GFXTextureObject *lastMiscTex = NULL;
|
||||
GFXTextureObject *lastAccuTex = NULL;
|
||||
|
||||
// Find the particle render manager (if we don't have it)
|
||||
|
|
|
|||
|
|
@ -615,8 +615,6 @@ bool TerrainCellMaterial::_initShader(bool deferredMat,
|
|||
mOrmTexArrayConst = mShader->getShaderConstHandle("$ormMapSampler");
|
||||
if (mOrmTexArrayConst->isValid())
|
||||
{
|
||||
GFXTextureProfile* profile = &GFXStaticTextureProfile;
|
||||
|
||||
const S32 sampler = mOrmTexArrayConst->getSamplerRegister();
|
||||
|
||||
desc.samplers[sampler] = GFXSamplerStateDesc::getWrapLinear();
|
||||
|
|
|
|||
|
|
@ -992,8 +992,6 @@ void TerrainBlock::addMaterial( const String &name, U32 insertAt )
|
|||
mFile->mMaterials.push_back( mat );
|
||||
mFile->_initMaterialInstMapping();
|
||||
|
||||
bool isSrv = isServerObject();
|
||||
|
||||
//now we update our asset
|
||||
if (mTerrainAsset)
|
||||
{
|
||||
|
|
@ -1418,7 +1416,6 @@ void TerrainBlock::unpackUpdate(NetConnection* con, BitStream *stream)
|
|||
|
||||
char buffer[256];
|
||||
stream->readString(buffer);
|
||||
bool validAsset = setTerrainAsset(StringTable->insert(buffer));
|
||||
}
|
||||
if (baseTexSizeChanged && isProperlyAdded())
|
||||
_updateBaseTexture(NONE);
|
||||
|
|
|
|||
|
|
@ -1044,9 +1044,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
|||
// We need the default mesh transform.
|
||||
MatrixF localXfm;
|
||||
getNodeWorldTransform( object.nodeIndex, &localXfm );
|
||||
Point3F t = localXfm.getPosition();
|
||||
t.convolve(scale);
|
||||
localXfm.setPosition(t);
|
||||
Point3F nodeWorldPosition = localXfm.getPosition();
|
||||
nodeWorldPosition.convolve(scale);
|
||||
localXfm.setPosition(nodeWorldPosition);
|
||||
|
||||
// We have some sort of collision shape... so allocate it.
|
||||
if ( !colShape )
|
||||
|
|
@ -1061,9 +1061,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
|||
// Add the offset to the center of the bounds
|
||||
// into the local space transform.
|
||||
MatrixF centerXfm( true );
|
||||
Point3F t = mesh->getBounds().getCenter();
|
||||
t.convolve(scale);
|
||||
centerXfm.setPosition(t);
|
||||
Point3F meshBoundsCenter = mesh->getBounds().getCenter();
|
||||
meshBoundsCenter.convolve(scale);
|
||||
centerXfm.setPosition(meshBoundsCenter);
|
||||
localXfm.mul( centerXfm );
|
||||
|
||||
colShape->addBox( halfWidth, localXfm );
|
||||
|
|
@ -1077,9 +1077,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
|||
// Add the offset to the center of the bounds
|
||||
// into the local space transform.
|
||||
MatrixF primXfm( true );
|
||||
Point3F t = mesh->getBounds().getCenter();
|
||||
t.convolve(scale);
|
||||
primXfm.setPosition(t);
|
||||
Point3F meshBoundsCenter = mesh->getBounds().getCenter();
|
||||
meshBoundsCenter.convolve(scale);
|
||||
primXfm.setPosition(meshBoundsCenter);
|
||||
localXfm.mul( primXfm );
|
||||
|
||||
colShape->addSphere( radius, localXfm );
|
||||
|
|
@ -1092,9 +1092,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
|||
|
||||
// We need to center the capsule and align it to the Y axis.
|
||||
MatrixF primXfm( true );
|
||||
Point3F t = mesh->getBounds().getCenter();
|
||||
t.convolve(scale);
|
||||
primXfm.setPosition(t);
|
||||
Point3F meshBoundsCenter = mesh->getBounds().getCenter();
|
||||
meshBoundsCenter.convolve(scale);
|
||||
primXfm.setPosition(meshBoundsCenter);
|
||||
|
||||
// Use the longest axis as the capsule height.
|
||||
F32 height = -radius * 2.0f;
|
||||
|
|
|
|||
Loading…
Reference in a new issue