Просмотр исходного кода

Fixed bug while loading from a file

Max Nuding 12 лет назад
Родитель
Сommit
6313cf0ed5
1 измененных файлов: 7 добавлений и 8 удалений
  1. 7
    8
      Cube Control/AnimationUtility.java

+ 7
- 8
Cube Control/AnimationUtility.java Просмотреть файл

136
     short[] d = {};
136
     short[] d = {};
137
     for (int i = 0; i < 8; i++) {
137
     for (int i = 0; i < 8; i++) {
138
       short[] data = hexConvert(sc.nextLine());
138
       short[] data = hexConvert(sc.nextLine());
139
-      d = concat(data, d);
139
+      d = concat(d, data);
140
     }
140
     }
141
   
141
   
142
-  d = invert(d);
143
-  frame.setData(d);
144
-  d = hexConvert(sc.nextLine());
145
-  frame.setTime(d[0]);
146
-  return frame;
142
+    frame.setData(d);
143
+    d = hexConvert(sc.nextLine());
144
+    frame.setTime(d[0]);
145
+    return frame;
147
   }
146
   }
148
   
147
   
149
-  private static short[] invert(short[] a){
148
+  /*private static short[] invert(short[] a){
150
     short[] tmp = new short[a.length];
149
     short[] tmp = new short[a.length];
151
     int j = 0;
150
     int j = 0;
152
     for(int i = a.length-1; i >= 0; i--){
151
     for(int i = a.length-1; i >= 0; i--){
154
       j++;
153
       j++;
155
     }
154
     }
156
     return tmp;
155
     return tmp;
157
-  }
156
+  }*/
158
 
157
 
159
   private static short[] concat(short[] a, short[] b) {
158
   private static short[] concat(short[] a, short[] b) {
160
   short[] c = new short[a.length + b.length];
159
   short[] c = new short[a.length + b.length];

Загрузка…
Отмена
Сохранить