(String resource, int imageCount, int frameCount)
| 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; |
nothing calls this directly
no test coverage detected