|
@@ -132,7 +132,7 @@ public class cubeWorker {
|
132
|
132
|
//animation moved down
|
133
|
133
|
if (selectedAnimation < (animations.size() - 1)) {
|
134
|
134
|
Collections.swap(animations, selectedAnimation, selectedAnimation + 1);
|
135
|
|
- }
|
|
135
|
+ }
|
136
|
136
|
}
|
137
|
137
|
}
|
138
|
138
|
|
|
@@ -214,7 +214,7 @@ public class cubeWorker {
|
214
|
214
|
try {
|
215
|
215
|
animations = AnimationUtility.readFile(path);
|
216
|
216
|
} catch (Exception e) {
|
217
|
|
- System.out.println("Did not load!");
|
|
217
|
+ System.out.println("Did not load!");
|
218
|
218
|
e.printStackTrace(System.out);
|
219
|
219
|
return -1;
|
220
|
220
|
}
|
|
@@ -279,13 +279,13 @@ class AnimationUtility {
|
279
|
279
|
ArrayList<Animation> animations = new ArrayList<Animation>();
|
280
|
280
|
|
281
|
281
|
do {
|
282
|
|
- Animation tmp = readAnimation(sc);
|
283
|
|
- if (tmp == null) {
|
284
|
|
- return animations;
|
285
|
|
- }
|
286
|
|
- if (sc.hasNextLine()) {
|
287
|
|
- sc.nextLine();
|
288
|
|
- }
|
|
282
|
+ Animation tmp = readAnimation(sc);
|
|
283
|
+ if (tmp == null) {
|
|
284
|
+ return animations;
|
|
285
|
+ }
|
|
286
|
+ if (sc.hasNextLine()) {
|
|
287
|
+ sc.nextLine();
|
|
288
|
+ }
|
289
|
289
|
animations.add(tmp);
|
290
|
290
|
} while (sc.hasNextLine());
|
291
|
291
|
|
|
@@ -335,7 +335,7 @@ class AnimationUtility {
|
335
|
335
|
int index = 0;
|
336
|
336
|
String tmpSize = sc.nextLine().replaceAll("\\n", "");
|
337
|
337
|
if (tmpSize.equals("")) {
|
338
|
|
- return null;
|
|
338
|
+ return null;
|
339
|
339
|
}
|
340
|
340
|
Integer tmpSizeAgain = new Integer(tmpSize);
|
341
|
341
|
int size = tmpSizeAgain.intValue();
|
|
@@ -383,13 +383,13 @@ class AnimationUtility {
|
383
|
383
|
writeFrame(anim.get(i), f);
|
384
|
384
|
}
|
385
|
385
|
if (!last) {
|
386
|
|
- f.write("\n");
|
387
|
|
- }
|
|
386
|
+ f.write("\n");
|
|
387
|
+ }
|
388
|
388
|
}
|
389
|
389
|
|
390
|
390
|
private static void writeFrame(AFrame fr, FileWriter f) throws IOException {
|
391
|
391
|
f.write(fr.getName() + "\n");
|
392
|
|
- for (int i = 0; i < 8; i++) {
|
|
392
|
+ for (int i = 0; i < 8; i++) {
|
393
|
393
|
writeLayer(fr.getLayer(i), f);
|
394
|
394
|
}
|
395
|
395
|
f.write(Integer.toString( (fr.getTime() & 0xff) + 0x100, 16).substring(1) + "\n");
|
|
@@ -424,7 +424,6 @@ class AFrame {
|
424
|
424
|
}
|
425
|
425
|
|
426
|
426
|
byte[] getData() {
|
427
|
|
- data[0] = 3;
|
428
|
427
|
return data;
|
429
|
428
|
}
|
430
|
429
|
|