progagate type information through to get rid of warning

This commit is contained in:
Ryan1729
2019-10-06 02:13:37 -06:00
parent d53eb3a3fe
commit b010da744c

View File

@@ -687,7 +687,7 @@ public class GifDecoder {
} while ((blockSize > 0) && !err()); } while ((blockSize > 0) && !err());
} }
public Animation getAnimation(PlayMode playType) { private Animation<TextureRegion> getAnimation(PlayMode playType) {
int nrFrames = getFrameCount(); int nrFrames = getFrameCount();
Pixmap frame = getFrame(0); Pixmap frame = getFrame(0);
int width = frame.getWidth(); int width = frame.getWidth();
@@ -725,12 +725,11 @@ public class GifDecoder {
} }
float frameDuration = (float)getDelay(0); float frameDuration = (float)getDelay(0);
frameDuration /= 1000; // convert milliseconds into seconds frameDuration /= 1000; // convert milliseconds into seconds
Animation result = new Animation(frameDuration, texReg, playType);
return result; return new Animation<>(frameDuration, texReg, playType);
} }
public static Animation loadGIFAnimation(PlayMode playType, InputStream is) { public static Animation<TextureRegion> loadGIFAnimation(PlayMode playType, InputStream is) {
GifDecoder gdec = new GifDecoder(); GifDecoder gdec = new GifDecoder();
gdec.read(is); gdec.read(is);
return gdec.getAnimation(playType); return gdec.getAnimation(playType);