all DECLARE_IMAGEASSET refactored

This commit is contained in:
marauder2k7 2024-12-21 17:34:16 +00:00
parent 24b374f545
commit fa8110ce8f
44 changed files with 248 additions and 306 deletions

View file

@ -742,11 +742,11 @@ bool ParticleEmitterData::preload(bool server, String &errorStr)
// otherwise, check that all particles refer to the same texture
else if (particleDataBlocks.size() > 1)
{
StringTableEntry txr_name = particleDataBlocks[0]->getTexture();
StringTableEntry txr_name = particleDataBlocks[0]->getTextureAsset()->getImageFile();
for (S32 i = 1; i < particleDataBlocks.size(); i++)
{
// warn if particle textures are inconsistent
if (particleDataBlocks[i]->getTexture() != txr_name)
if (particleDataBlocks[i]->getTextureAsset()->getImageFile() != txr_name)
{
Con::warnf(ConsoleLogEntry::General, "ParticleEmitterData(%s) particles reference different textures.", getName());
break;
@ -1227,7 +1227,7 @@ void ParticleEmitter::prepRenderImage(SceneRenderState* state)
if (mDataBlock->textureHandle)
ri->diffuseTex = &*(mDataBlock->textureHandle);
else
ri->diffuseTex = &*(part_list_head.next->dataBlock->getTextureResource());
ri->diffuseTex = &*(part_list_head.next->dataBlock->getTexture());
ri->softnessDistance = mDataBlock->softnessDistance;