Merge branch 'Preview4_0_DevHead' into tsneo

This commit is contained in:
Jeff Hutchinson 2021-08-16 22:50:02 -04:00
commit ada1c5a021
521 changed files with 259 additions and 162 deletions

View file

@ -2381,11 +2381,25 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
}
else if (activeImportConfig->DuplicateAutoResolution == String("FolderPrefix"))
{
//Set trailing number
String renamedAssetName = assetItem->assetName;
String owningFolder = assetItem->filePath.getDirectory(assetItem->filePath.getDirectoryCount() - 1);
renamedAssetName = owningFolder + "_" + renamedAssetName;
//Set trailing number
S32 dirIndex = assetItem->filePath.getDirectoryCount() - 1;
while (dirIndex > -1)
{
renamedAssetName = assetItem->assetName;
String owningFolder = assetItem->filePath.getDirectory(dirIndex);
renamedAssetName = owningFolder + "_" + renamedAssetName;
if (AssetDatabase.isDeclaredAsset(renamedAssetName))
{
dirIndex--;
continue;
}
break;
}
//Log it's renaming
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was renamed due to %s as part of the Import Configuration", assetItem->assetName.c_str(), humanReadableReason.c_str());

View file

@ -574,6 +574,40 @@ DefineEngineFunction( stripChars, const char*, ( const char* str, const char* ch
return( ret );
}
//-----------------------------------------------------------------------------
DefineEngineFunction(sanitizeString, const char*, (const char* str), ,
"Sanitizes a string of common name issues, such as:\n"
"Starting with numbers, replacing spaces with _, and removing any name un-compliant characters such as .,- etc\n"
"@param str The string to sanitize.\n"
"@return A version of @a str with all occurrences of invalid characters removed.\n\n"
"@tsexample\n"
"cleanString( \"123 .-_abc\"); // Returns \"__abc\"."
"@endtsexample\n"
"@ingroup Strings")
{
String processedString = str;
U32 start;
U32 end;
String firstNumber = String::GetFirstNumber(processedString, start, end);
if (!firstNumber.isEmpty() && processedString.startsWith(firstNumber.c_str()))
processedString = processedString.replace(firstNumber, "");
processedString = processedString.replace(" ", "_");
U32 len = processedString.length() + 1;
char* ret = Con::getReturnBuffer(len);
dStrcpy(ret, processedString.c_str(), len);
U32 pos = dStrcspn(ret, "-+*/%$&<26>=()[].?\\\"#,;!~<>|<7C>^{}");
while (pos < dStrlen(ret))
{
dStrcpy(ret + pos, ret + pos + 1, len - pos);
pos = dStrcspn(ret, "-+*/%$&<26>=()[].?\\\"#,;!~<>|<7C>^{}");
}
return(ret);
}
//-----------------------------------------------------------------------------
DefineEngineFunction( strlwr, const char*, ( const char* str ),,

View file

@ -1284,7 +1284,7 @@ bool dPathCopy(const char *fromName, const char *toName, bool nooverwrite)
bool Platform::dumpDirectories(const char *path, Vector<StringTableEntry> &directoryVector, S32 depth, bool noBasePath)
{
bool retVal = recurseDumpDirectories(path, "", directoryVector, 0, depth, noBasePath);
bool retVal = recurseDumpDirectories(path, "", directoryVector, -1, depth, noBasePath);
clearExcludedDirectories();
return retVal;
}

View file

@ -40,9 +40,9 @@ ALboolean LoadOAL10Library(char *szOALFullPathName, LPOPENALFNTABLE lpOALFnTable
return AL_FALSE;
if (szOALFullPathName)
openal_library = dlopen(szOALFullPathName, RTLD_LAZY);
openal_library = dlopen(szOALFullPathName, RTLD_NOW);
else
openal_library = dlopen("libopenal.so", RTLD_LAZY);
openal_library = dlopen("libopenal.so.1", RTLD_NOW);
if (openal_library == NULL) {
Con::errorf("Failed to load OpenAL shared library. Sound will not be available");

View file

@ -125,7 +125,8 @@ void TSShapeLoader::updateProgress(S32 major, const char* msg, S32 numMinor, S32
progressMsg = avar("%s (%d of %d)", msg, minor + 1, numMinor);
}
Con::executef("updateTSShapeLoadProgress", Con::getFloatArg(progress), progressMsg);
if(Con::isFunction("updateTSShapeLoadProgress"))
Con::executef("updateTSShapeLoadProgress", Con::getFloatArg(progress), progressMsg);
}
//-----------------------------------------------------------------------------
@ -1353,4 +1354,4 @@ DefineEngineFunction( getFormatFilters, const char*, ( ),,
DefineEngineFunction(isSupportedFormat, bool, (const char* extension), , "")
{
return TSShapeLoader::isSupportedFormat(extension);
}
}

View file

@ -96,6 +96,13 @@ bool Platform::displaySplashWindow( String path )
SDL_RenderCopy(gSplashRenderer, gSplashTexture, NULL, NULL);
SDL_RenderPresent(gSplashRenderer);
SDL_DestroyTexture(gSplashTexture);
gSplashTexture = nullptr;
SDL_DestroyRenderer(gSplashRenderer);
gSplashRenderer = nullptr;
}
return true;

View file

Before

Width:  |  Height:  |  Size: 659 KiB

After

Width:  |  Height:  |  Size: 659 KiB

Some files were not shown because too many files have changed in this diff Show more