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

@ -920,9 +920,9 @@ MeshRoad::MeshRoad()
mTriangleCount[i] = 0;
}
initMaterialAsset(TopMaterial);
initMaterialAsset(BottomMaterial);
initMaterialAsset(SideMaterial);
INIT_MATERIALASSET(TopMaterial);
INIT_MATERIALASSET(BottomMaterial);
INIT_MATERIALASSET(SideMaterial);
mSideProfile.mRoad = this;
}
@ -937,14 +937,9 @@ void MeshRoad::initPersistFields()
{
addGroup( "MeshRoad" );
addProtectedField("TopMaterial", TypeMaterialName, Offset(mTopMaterialName, MeshRoad), MeshRoad::_setTopMaterialName, & defaultProtectedGetFn, "Material for the upper surface of the road.", AbstractClassRep::FIELD_HideInInspectors); \
addProtectedField("TopMaterialAsset", TypeMaterialAssetId, Offset(mTopMaterialAssetId, MeshRoad), MeshRoad::_setTopMaterialAsset, & defaultProtectedGetFn, "Material for the upper surface of the road.");
addProtectedField("BottomMaterial", TypeMaterialName, Offset(mBottomMaterialName, MeshRoad), MeshRoad::_setBottomMaterialName, & defaultProtectedGetFn, "Material for the bottom surface of the road.", AbstractClassRep::FIELD_HideInInspectors); \
addProtectedField("BottomMaterialAsset", TypeMaterialAssetId, Offset(mBottomMaterialAssetId, MeshRoad), MeshRoad::_setBottomMaterialAsset, & defaultProtectedGetFn, "Material for the bottom surface of the road.");
addProtectedField("SideMaterial", TypeMaterialName, Offset(mSideMaterialName, MeshRoad), MeshRoad::_setSideMaterialName, & defaultProtectedGetFn, "Material for the left, right, front, and back surfaces of the road.", AbstractClassRep::FIELD_HideInInspectors); \
addProtectedField("SideMaterialAsset", TypeMaterialAssetId, Offset(mSideMaterialAssetId, MeshRoad), MeshRoad::_setSideMaterialAsset, & defaultProtectedGetFn, "Material for the left, right, front, and back surfaces of the road.");
INITPERSISTFIELD_MATERIALASSET(TopMaterial, MeshRoad, "Material for the upper surface of the road.");
INITPERSISTFIELD_MATERIALASSET(BottomMaterial, MeshRoad, "Material for the bottom surface of the road.");
INITPERSISTFIELD_MATERIALASSET(SideMaterial, MeshRoad, "Material for the side surface of the road.");
addField( "textureLength", TypeF32, Offset( mTextureLength, MeshRoad ),
"The length in meters of textures mapped to the MeshRoad." );
@ -1421,9 +1416,9 @@ U32 MeshRoad::packUpdate(NetConnection * con, U32 mask, BitStream * stream)
stream->writeAffineTransform( mObjToWorld );
// Write Materials
packMaterialAsset(con, TopMaterial);
packMaterialAsset(con, BottomMaterial);
packMaterialAsset(con, SideMaterial);
PACK_MATERIALASSET(con, TopMaterial);
PACK_MATERIALASSET(con, BottomMaterial);
PACK_MATERIALASSET(con, SideMaterial);
stream->write( mTextureLength );
stream->write( mBreakAngle );
@ -1520,9 +1515,9 @@ void MeshRoad::unpackUpdate(NetConnection * con, BitStream * stream)
stream->readAffineTransform(&ObjectMatrix);
Parent::setTransform(ObjectMatrix);
unpackMaterialAsset(con, TopMaterial);
unpackMaterialAsset(con, BottomMaterial);
unpackMaterialAsset(con, SideMaterial);
UNPACK_MATERIALASSET(con, TopMaterial);
UNPACK_MATERIALASSET(con, BottomMaterial);
UNPACK_MATERIALASSET(con, SideMaterial);
if ( isProperlyAdded() )
_initMaterial();