mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Handle animated texture cycle lists not being the same size as keyframes (#91)
This commit is contained in:
+1
-1
Submodule OTRExporter updated: ed1bcb6959...91615dd1c1
@@ -100,12 +100,13 @@ void LUS::TextureAnimationFactoryV0::ParseFileBinary(std::shared_ptr<BinaryReade
|
||||
auto* e = new AnimatedMatTexCycleParams;
|
||||
|
||||
e->keyFrameLength = reader->ReadUInt16();
|
||||
e->textureList = new void*[e->keyFrameLength];
|
||||
uint32_t textureListSize = reader->ReadUInt32();
|
||||
e->textureList = new void*[textureListSize];
|
||||
e->textureIndexList = new uint8_t[e->keyFrameLength];
|
||||
|
||||
tAnim->textureCycleTextures.reserve(e->keyFrameLength);
|
||||
tAnim->textureCycleTextures.reserve(textureListSize);
|
||||
|
||||
for (size_t i = 0; i < e->keyFrameLength; i++) {
|
||||
for (size_t i = 0; i < textureListSize; i++) {
|
||||
tAnim->textureCycleTextures.emplace_back("__OTR__" + reader->ReadString());
|
||||
e->textureList[i] = (Gfx*)tAnim->textureCycleTextures[i].c_str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user