summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6b8ffe7)
raw | patch | inline | side by side (parent: 6b8ffe7)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 24 Apr 2016 08:45:39 +0000 (11:45 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Sun, 24 Apr 2016 08:45:39 +0000 (11:45 +0300) |
src/game/g_map.pas | patch | blob | history |
diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index a05a2cf405d1c1a07751fca69af1a424d56b7866..5bca6b012ad82226e39827f88ec5c92fd89d7add 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
ia: TDynImageDataArray = nil;
il: TImageFileFormat = nil;
meta: TMetadata = nil;
- f: Integer;
+ f, c: Integer;
gf: TGIFFileFormat;
pf: TPNGFileFormat;
begin
//writeln(' frame delay: ', meta.MetaItems[SMetaFrameDelay]);
try
f := meta.MetaItems[SMetaFrameDelay];
- f := f div 27;
+ if f < 0 then f := 0;
+ // rounding ;-)
+ c := f mod 27;
+ if c < 13 then c := 0 else c := 1;
+ f := (f div 27)+c;
if f < 1 then f := 1 else if f > 255 then f := 255;
_speed := f;
except