2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 03:07:41 +00:00

Signed read bug fix

This commit is contained in:
Jack Andersen
2016-08-28 16:28:55 -10:00
parent 7953ca4828
commit e2f342d107
3 changed files with 26 additions and 24 deletions

View File

@@ -386,16 +386,17 @@ void ANIM::ANIM2::write(athena::io::IStreamWriter& writer) const
size_t frameCount = 0;
for (atUint32 frame : frames)
{
while (keyBmp.getBit(frame))
++frame;
keyBmp.setBit(frame);
frameCount = frame + 1;
if (!keyBmp.getBit(frame))
{
keyBmp.setBit(frame);
frameCount += 1;
}
}
head.keyBitmapBitCount = frameCount;
head.duration = frameCount * mainInterval;
head.boneChannelCount = bones.size();
size_t keyframeCount = frames.size();
size_t keyframeCount = frameCount - 1;
std::vector<DNAANIM::Channel> qChannels = channels;
DNAANIM::BitstreamWriter bsWriter;
size_t bsSize;