diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2021-06-04 12:52:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-04 12:52:38 -0400 |
| commit | 726ff528a3ab66afde92b5b6e70a96f168fee041 (patch) | |
| tree | ba3ff371bc2fd89a448ea6914b45dea10c8ca20c /ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp | |
| parent | ca229f19b991c613c29afade3d70b100522cece1 (diff) | |
Optimize RAM usage and performance by removing redundant `rawData` (#148)
* Remove rawData from ZResource
* Remove dlistRawData and some leftovers extra params
* Run format
* Unused variable warning
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp b/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp index de0d05b..6bf8c8a 100644 --- a/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp +++ b/ZAPD/ZRoom/Commands/SetAnimatedMaterialList.cpp @@ -255,12 +255,12 @@ std::string FlashingTexture::GenerateSourceCode(ZRoom* zRoom, uint32_t baseAddre index++; } - zRoom->parent->AddDeclarationArray( - primColorSegmentOffset, DeclarationAlignment::Align4, primColors.size() * 5, - "F3DPrimColor", - StringHelper::Sprintf("%sAnimatedMaterialPrimColor_%06X", zRoom->GetName().c_str(), - primColorSegmentOffset), - primColors.size(), declaration); + zRoom->parent->AddDeclarationArray(primColorSegmentOffset, DeclarationAlignment::Align4, + primColors.size() * 5, "F3DPrimColor", + StringHelper::Sprintf("%sAnimatedMaterialPrimColor_%06X", + zRoom->GetName().c_str(), + primColorSegmentOffset), + primColors.size(), declaration); } if (envColorSegmentOffset != 0) @@ -400,7 +400,8 @@ std::string AnimatedMatTexCycleParams::GenerateSourceCode(ZRoom* zRoom, uint32_t textureIndices.size(), declaration); } - std::string segmName = zRoom->parent->GetDeclarationPtrName(textureSegmentOffsetsSegmentAddress); + std::string segmName = + zRoom->parent->GetDeclarationPtrName(textureSegmentOffsetsSegmentAddress); std::string indexesName = zRoom->parent->GetDeclarationPtrName(textureIndicesSegmentAddress); return StringHelper::Sprintf("%i, %s, %s", cycleLength, segmName.c_str(), indexesName.c_str()); |
