mirror of
https://github.com/HarbourMasters/2ship2harkinian.git
synced 2024-11-27 00:00:32 +00:00
Fix cycle animated textures (#57)
This commit is contained in:
parent
b84550e1df
commit
5133d29c01
@ -1 +1 @@
|
||||
Subproject commit 1bf5103559090d4e2ad5be88f9177aac0ca91d71
|
||||
Subproject commit 3502a0b7c526651836e23068aa9c7e8f2ff82dfd
|
2
ZAPDTR
2
ZAPDTR
@ -1 +1 @@
|
||||
Subproject commit d77bf8826e6a2dfa2554e7b53aa1cc5a460d5e63
|
||||
Subproject commit aaf3714f239b80e86ad508b1a715506589624ef2
|
@ -36,7 +36,7 @@ void LUS::TextureAnimationFactoryV0::ParseFileBinary(std::shared_ptr<BinaryReade
|
||||
for (size_t i = 0; i < numEntries; i++) {
|
||||
AnimatedMaterial anim;
|
||||
anim.segment = reader->ReadInt8();
|
||||
anim.type = reader->ReadInt8();
|
||||
anim.type = reader->ReadInt16();
|
||||
|
||||
switch ((TextureAnimationParamsType)anim.type) {
|
||||
case TextureAnimationParamsType::SingleScroll: {
|
||||
@ -103,8 +103,11 @@ void LUS::TextureAnimationFactoryV0::ParseFileBinary(std::shared_ptr<BinaryReade
|
||||
e->textureList = new void*[e->keyFrameLength];
|
||||
e->textureIndexList = new uint8_t[e->keyFrameLength];
|
||||
|
||||
tAnim->textureCycleTextures.reserve(e->keyFrameLength);
|
||||
|
||||
for (size_t i = 0; i < e->keyFrameLength; i++) {
|
||||
e->textureList[i] = ResourceGetDataByName(reader->ReadString().c_str());
|
||||
tAnim->textureCycleTextures.emplace_back("__OTR__" + reader->ReadString());
|
||||
e->textureList[i] = (Gfx*)tAnim->textureCycleTextures[i].c_str();
|
||||
}
|
||||
for (size_t i = 0; i < e->keyFrameLength; i++) {
|
||||
e->textureIndexList[i] = reader->ReadUByte();
|
||||
|
@ -100,5 +100,6 @@ class TextureAnimation : public Resource<AnimatedMaterial> {
|
||||
size_t GetPointerSize();
|
||||
|
||||
std::vector<AnimatedMaterial> anims;
|
||||
std::vector<std::string> textureCycleTextures;
|
||||
};
|
||||
} // namespace LUS
|
Loading…
Reference in New Issue
Block a user