diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-12-25 14:18:13 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-12-25 14:18:13 +0100 |
commit | b12eef1d56575206538abed426a296fefe22e90e (patch) | |
tree | a029f5ec513ec487d477d791e21f90ae1287965a /src/animation/AnimManager.cpp | |
parent | Fix debug menu memory leak (diff) | |
download | re3-b12eef1d56575206538abed426a296fefe22e90e.tar re3-b12eef1d56575206538abed426a296fefe22e90e.tar.gz re3-b12eef1d56575206538abed426a296fefe22e90e.tar.bz2 re3-b12eef1d56575206538abed426a296fefe22e90e.tar.lz re3-b12eef1d56575206538abed426a296fefe22e90e.tar.xz re3-b12eef1d56575206538abed426a296fefe22e90e.tar.zst re3-b12eef1d56575206538abed426a296fefe22e90e.zip |
Diffstat (limited to 'src/animation/AnimManager.cpp')
-rw-r--r-- | src/animation/AnimManager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/animation/AnimManager.cpp b/src/animation/AnimManager.cpp index 8d442b72..557bd842 100644 --- a/src/animation/AnimManager.cpp +++ b/src/animation/AnimManager.cpp @@ -810,11 +810,11 @@ CAnimManager::LoadAnimFile(int fd, bool compress) float *fbuf = (float*)buf; CFileMgr::Read(fd, (char*)&anpk, sizeof(IfpHeader)); - if(strncmp(anpk.ident, "ANLF", 4) == 0){ + if(!CGeneral::faststrncmp(anpk.ident, "ANLF", 4)) { ROUNDSIZE(anpk.size); CFileMgr::Read(fd, buf, anpk.size); numANPK = *(int*)buf; - }else if(strncmp(anpk.ident, "ANPK", 4) == 0){ + } else if(!CGeneral::faststrncmp(anpk.ident, "ANPK", 4)) { CFileMgr::Seek(fd, -8, 1); numANPK = 1; } @@ -870,13 +870,13 @@ CAnimManager::LoadAnimFile(int fd, bool compress) bool hasScale = false; bool hasTranslation = false; CFileMgr::Read(fd, (char*)&info, sizeof(info)); - if(strncmp(info.ident, "KRTS", 4) == 0){ + if(!CGeneral::faststrncmp(info.ident, "KRTS", 4)) { hasScale = true; seq->SetNumFrames(numFrames, true); - }else if(strncmp(info.ident, "KRT0", 4) == 0){ + }else if(!CGeneral::faststrncmp(info.ident, "KRT0", 4)) { hasTranslation = true; seq->SetNumFrames(numFrames, true); - }else if(strncmp(info.ident, "KR00", 4) == 0){ + }else if(!CGeneral::faststrncmp(info.ident, "KR00", 4)){ seq->SetNumFrames(numFrames, false); } |