Converts all game, gui editor, and system classes to utilize assets

Processed core, tools and default modules to utilize assets
Converted all console types that were string based, such as TypeImageFilename to utilize const char*/the string table, which avoids a lot of type swapping shenanigans and avoids string corruption
Removed unneeded MainEditor mockup module
Removed some unused/duplicate image assets from the tools
This commit is contained in:
Areloch 2021-07-19 01:07:08 -05:00
parent 83b0432283
commit 5525f8ecdd
1708 changed files with 19619 additions and 4596 deletions

View file

@ -339,11 +339,12 @@ void SimObject::writeFields(Stream &stream, U32 tabStop)
// detect and collapse relative path information
char fnBuf[1024];
if (f->type == TypeFilename ||
if (f->type == TypeFilename ||
f->type == TypeStringFilename ||
f->type == TypeImageFilename ||
f->type == TypeImageFilename ||
f->type == TypePrefabFilename ||
f->type == TypeShapeFilename)
f->type == TypeShapeFilename ||
f->type == TypeSoundFilename )
{
Con::collapseScriptFilename(fnBuf, 1024, val);
val = fnBuf;
@ -919,7 +920,15 @@ void SimObject::assignFieldsFrom(SimObject *parent)
dMemset( bufferSecure, 0, 2048 );
dMemcpy( bufferSecure, szBuffer, dStrlen( szBuffer ) );
if((*f->setDataFn)( this, NULL, bufferSecure ) )
//If we have an index worth mentioning, process it for pass-along as well to ensure we set stuff correctly
char* elementIdxBuffer = nullptr;
if (f->elementCount > 1)
{
elementIdxBuffer = Con::getArgBuffer(256);
dSprintf(elementIdxBuffer, 256, "%i", j);
}
if((*f->setDataFn)( this, elementIdxBuffer, bufferSecure ) )
Con::setData(f->type, (void *) (((const char *)this) + f->offset), j, 1, &fieldVal, f->table);
if (f->networkMask != 0)