Page 1 of 1

Frame delay of the first frame with FromDisk anim

Posted: Sun Mar 19, 2017 12:22 pm
by jPV
Frame delay of the very first animation frame seems to change if I stream animation from the disk and display some already shown frame (except frames 1 or 2).

Code: Select all

LoadAnim(1,"Hollywood:MUIRoyale/Examples/Hollywood/Anim/Amy_Walks.anim", {FromDisk=True})
For i=1 To 5
    DisplayAnimFrame(1,0,0,i)
    DebugPrint("Delay of frame 1:",GetAttribute(#ANIM,1,#ATTRFRAMEDELAY, 1))
Next
DisplayAnimFrame(1,0,0,3)
DebugPrint("Delay of frame 1:",GetAttribute(#ANIM,1,#ATTRFRAMEDELAY, 1))
This example outputs:
Delay of frame 1: 0
Delay of frame 1: 0
Delay of frame 1: 0
Delay of frame 1: 0
Delay of frame 1: 0
Delay of frame 1: 16

Displaying the frame 3 will change the frame delay of the first frame to 16 when it really should be 0. In this animation the first frame has delay 0 and other frames have delay 16, so it copies it from some other frame (next?). Same happens with other animation with different delays.. for example I have animation of delay 1000 for the first frame and it also changes to value of the next frame, so delay being 0 isn't the reason either.

This doesn't happen when animation is loaded to memory, but only with the FromDisk option. And I haven't seen any changes to any other but the very first frame.

Interestingly if you go back to frames 1 or 2 after showing other frames, it doesn't seem to happen. Only if you go back to frame 3 or later...

Re: Frame delay of the first frame with FromDisk anim

Posted: Tue Mar 21, 2017 12:07 am
by airsoftsoftwair
Alright, thanks for the report! Will be fixed.

Re: Frame delay of the first frame with FromDisk anim

Posted: Thu Apr 27, 2017 9:04 pm
by airsoftsoftwair

Code: Select all

- Fix: Opening IFF ANIMs using "FromDisk=True" and forcing the anim reader to skip frames by
  using non-sequential frame access messed up internal delay values