mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Fix case sensitivity and Platform::fileDelete
for linux and OSX. Correct a couple of warnings and errors preventing builds on linux.
This commit is contained in:
parent
45a19453ee
commit
4c17d4bb49
11 changed files with 24 additions and 14 deletions
|
|
@ -39,7 +39,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _TSSHAPE_H_
|
#ifndef _TSSHAPE_H_
|
||||||
#include "ts/TSShape.h"
|
#include "ts/tsShape.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef __RESOURCE_H__
|
#ifndef __RESOURCE_H__
|
||||||
#include "core/resource.h"
|
#include "core/resource.h"
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ bool Stream::writeFormattedBuffer(const char *format, ...)
|
||||||
char buffer[4096];
|
char buffer[4096];
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
const S32 length = vsprintf(buffer, format, args);
|
const S32 length = dVsprintf(buffer, sizeof(buffer), format, args);
|
||||||
|
|
||||||
// Sanity!
|
// Sanity!
|
||||||
AssertFatal(length <= sizeof(buffer), "writeFormattedBuffer - String format exceeded buffer size. This will cause corruption.");
|
AssertFatal(length <= sizeof(buffer), "writeFormattedBuffer - String format exceeded buffer size. This will cause corruption.");
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ GFXDevice::GFXDevice()
|
||||||
mGlobalAmbientColor = ColorF(0.0f, 0.0f, 0.0f, 1.0f);
|
mGlobalAmbientColor = ColorF(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
|
|
||||||
mLightMaterialDirty = false;
|
mLightMaterialDirty = false;
|
||||||
dMemset(&mCurrentLightMaterial, NULL, sizeof(GFXLightMaterial));
|
dMemset(&mCurrentLightMaterial, 0, sizeof(GFXLightMaterial));
|
||||||
|
|
||||||
// State block
|
// State block
|
||||||
mStateBlockDirty = false;
|
mStateBlockDirty = false;
|
||||||
|
|
|
||||||
|
|
@ -1847,7 +1847,7 @@ U32 extrudePolygonEdgesFromPoint( const Point3F* vertices, U32 numVertices, cons
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
void MathUtils::mBuildHull2D(const Vector<Point2F> _inPoints, Vector<Point2F> &hullPoints)
|
void mBuildHull2D(const Vector<Point2F> _inPoints, Vector<Point2F> &hullPoints)
|
||||||
{
|
{
|
||||||
/// Andrew's monotone chain convex hull algorithm implementation
|
/// Andrew's monotone chain convex hull algorithm implementation
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ bool fsTiXmlDocument::LoadFile( const char * pFilename, TiXmlEncoding encoding )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// File open for read?
|
// File open for read?
|
||||||
if ( !stream.open( filenameBuffer, Torque::FS::File::AccessMode::Read ) )
|
if ( !stream.open( filenameBuffer, Torque::FS::File::Read ) )
|
||||||
{
|
{
|
||||||
// No, so warn.
|
// No, so warn.
|
||||||
Con::warnf("TamlXmlParser::parse() - Could not open filename '%s' for parse.", filenameBuffer );
|
Con::warnf("TamlXmlParser::parse() - Could not open filename '%s' for parse.", filenameBuffer );
|
||||||
|
|
@ -67,7 +67,7 @@ bool fsTiXmlDocument::SaveFile( const char * pFilename ) const
|
||||||
FileStream stream;
|
FileStream stream;
|
||||||
|
|
||||||
// File opened?
|
// File opened?
|
||||||
if ( !stream.open( filenameBuffer, Torque::FS::File::AccessMode::Write ) )
|
if ( !stream.open( filenameBuffer, Torque::FS::File::Write ) )
|
||||||
{
|
{
|
||||||
// No, so warn.
|
// No, so warn.
|
||||||
Con::warnf("Taml::writeFile() - Could not open filename '%s' for write.", filenameBuffer );
|
Con::warnf("Taml::writeFile() - Could not open filename '%s' for write.", filenameBuffer );
|
||||||
|
|
@ -744,4 +744,4 @@ return 0;
|
||||||
// All is well.
|
// All is well.
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
|
|
||||||
#ifndef TINYXML_INCLUDED
|
#ifndef TINYXML_INCLUDED
|
||||||
#include "tinyXML/tinyxml.h"
|
#include "tinyxml/tinyxml.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "platform/platform.h"
|
#include "platform/platform.h"
|
||||||
|
|
@ -245,4 +245,4 @@ static bool AttemptPrintTiNode(class fsTiXmlDocument* node, FileStream& stream,
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif //_FSTINYXML_H_
|
#endif //_FSTINYXML_H_
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TINYXML_INCLUDED
|
#ifndef TINYXML_INCLUDED
|
||||||
#include "tinyXML/tinyxml.h"
|
#include "tinyxml/tinyxml.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -54,4 +54,4 @@ private:
|
||||||
bool mDocumentDirty;
|
bool mDocumentDirty;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _TAML_XMLPARSER_H_
|
#endif // _TAML_XMLPARSER_H_
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
// Debug Profiling.
|
// Debug Profiling.
|
||||||
#include "platform/profiler.h"
|
#include "platform/profiler.h"
|
||||||
#include "persistence/taml/fsTinyxml.h"
|
#include "persistence/taml/fsTinyXml.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
// Debug Profiling.
|
// Debug Profiling.
|
||||||
#include "platform/profiler.h"
|
#include "platform/profiler.h"
|
||||||
#include "persistence/taml/fsTinyxml.h"
|
#include "persistence/taml/fsTinyXml.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -724,6 +724,11 @@ bool Platform::hasSubDirectory(const char *path)
|
||||||
return false; // either this dir had no subdirectories, or they were all on the exclude list.
|
return false; // either this dir had no subdirectories, or they were all on the exclude list.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Platform::fileDelete(const char * name)
|
||||||
|
{
|
||||||
|
return dFileDelete(name);
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool recurseDumpDirectories(const char *basePath, const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath)
|
bool recurseDumpDirectories(const char *basePath, const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
if (modType == TOUCH)
|
if (modType == TOUCH)
|
||||||
return(utime(prefPathName, 0) != -1);
|
return(utime(prefPathName, 0) != -1);
|
||||||
else if (modType == DELETE)
|
else if (modType == DELETE)
|
||||||
return (remove(prefPathName) != -1);
|
return (remove(prefPathName) == 0);
|
||||||
else
|
else
|
||||||
AssertFatal(false, "Unknown File Mod type");
|
AssertFatal(false, "Unknown File Mod type");
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1140,6 +1140,11 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Platform::fileDelete(const char * name)
|
||||||
|
{
|
||||||
|
return ModifyFile(name, DELETE);
|
||||||
|
}
|
||||||
|
|
||||||
static bool recurseDumpDirectories(const char *basePath, const char *subPath, Vector<StringTableEntry> &directoryVector, S32 currentDepth, S32 recurseDepth, bool noBasePath)
|
static bool recurseDumpDirectories(const char *basePath, const char *subPath, Vector<StringTableEntry> &directoryVector, S32 currentDepth, S32 recurseDepth, bool noBasePath)
|
||||||
{
|
{
|
||||||
char Path[1024];
|
char Path[1024];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue