MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / AniIcon

Method AniIcon

src/main/java/images/AniIcon.java:73–89  ·  view source on GitHub ↗
(String resource, int imageCount, int frameCount)

Source from the content-addressed store, hash-verified

71 public int getHeight() {return height;}
72 public int getWidth() {return width;}
73 public AniIcon(String resource, int imageCount, int frameCount) {
74 frames = new short[frameCount];
75 delays = new int[frameCount];
76 try {
77 resImage = Image.createImage(resource);
78 width = resImage.getWidth() / imageCount;
79 height = resImage.getHeight();
80 } catch (OutOfMemoryError memory) {
81 if (StaticData.Debug)
82 System.out.println("Memory error on " + resource);
83 } catch (Exception e) {
84 if (StaticData.Debug) {
85 System.out.println("Can't load " + resource);
86 e.printStackTrace();
87 }
88 }
89 }
90 void addFrame(int num, int iconIndex, int dalay) {
91 frames[num] = (short)iconIndex;
92 delays[num] = dalay;

Callers

nothing calls this directly

Calls 3

createImageMethod · 0.95
getWidthMethod · 0.65
getHeightMethod · 0.65

Tested by

no test coverage detected