From 2cdb6a4da4ef7e28b2e1f7266b0fd4445f0b68d4 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Thu, 8 Feb 2018 00:29:32 +0100 Subject: [PATCH] Load_IFF() properly set frame duration for animations --- src/fileformats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fileformats.c b/src/fileformats.c index 58e99723..0c375781 100644 --- a/src/fileformats.c +++ b/src/fileformats.c @@ -766,6 +766,8 @@ void Load_IFF(T_IO_Context * context) if ((aheader.bits & 0xffffffc0) != 0) // invalid ? => clearing aheader.bits = 0; + if (aheader.operation == 0) // ANHD for 1st frame (BODY) + Set_frame_duration(context, (aheader.reltime * 50) / 3); // convert 1/60th sec in msec fseek(IFF_file, (section_size+1)&~1, SEEK_CUR); // Skip remaining bytes } else if (memcmp(section, "DPAN", 4) == 0) // Deluxe Paint ANimation @@ -818,6 +820,7 @@ void Load_IFF(T_IO_Context * context) } Set_loading_layer(context, ++current_frame); + Set_frame_duration(context, (aheader.reltime * 50) / 3 ); // convert 1/60th sec in msec frame = previous_frame; if(aheader.operation == 5) // Byte Vertical Delta mode