|
@@ -32,7 +32,7 @@ public class cubeWorker {
|
32
|
32
|
// Definitions
|
33
|
33
|
// --------------------
|
34
|
34
|
|
35
|
|
- final int UP = 0;
|
|
35
|
+ final int UP = 0;
|
36
|
36
|
final int DOWN = 1;
|
37
|
37
|
|
38
|
38
|
// --------------------
|
|
@@ -41,7 +41,7 @@ public class cubeWorker {
|
41
|
41
|
|
42
|
42
|
// --------------------
|
43
|
43
|
|
44
|
|
- cubeWorker() {
|
|
44
|
+ cubeWorker() {
|
45
|
45
|
|
46
|
46
|
}
|
47
|
47
|
|
|
@@ -49,7 +49,7 @@ public class cubeWorker {
|
49
|
49
|
// Misc. Methods
|
50
|
50
|
// --------------------
|
51
|
51
|
|
52
|
|
- // Returns how many animations are defined
|
|
52
|
+ // Returns how many animations are defined
|
53
|
53
|
public int numOfAnimations() {
|
54
|
54
|
|
55
|
55
|
return 3;
|
|
@@ -61,7 +61,7 @@ public class cubeWorker {
|
61
|
61
|
return 3;
|
62
|
62
|
}
|
63
|
63
|
|
64
|
|
- // Tells how many Frames you can add until you reached 1 Mbit...
|
|
64
|
+ // Tells how many Frames you can add until you reached 1 Mbit...
|
65
|
65
|
public int framesRemaining() {
|
66
|
66
|
|
67
|
67
|
return 0;
|
|
@@ -72,15 +72,15 @@ public class cubeWorker {
|
72
|
72
|
// Animation Specific
|
73
|
73
|
// --------------------
|
74
|
74
|
|
75
|
|
- // Selects an animation on wich the animation specific functions operate
|
|
75
|
+ // Selects an animation on wich the animation specific functions operate
|
76
|
76
|
// Returns -1 if it does not exist, else its index
|
77
|
77
|
public int selectAnimation(int index) {
|
78
|
78
|
System.out.println("Animation " + index + " selected.");
|
79
|
79
|
|
80
|
|
- return index;
|
|
80
|
+ return index;
|
81
|
81
|
}
|
82
|
82
|
|
83
|
|
- // Adds a new Animation
|
|
83
|
+ // Adds a new Animation
|
84
|
84
|
// Returns id if ok, -1 if error or not enough space for
|
85
|
85
|
// another animation
|
86
|
86
|
public int addAnimation() {
|
|
@@ -93,38 +93,38 @@ public class cubeWorker {
|
93
|
93
|
|
94
|
94
|
}
|
95
|
95
|
|
96
|
|
- public String getAnimationName() {
|
|
96
|
+ public String getAnimationName() {
|
97
|
97
|
|
98
|
98
|
return "TestAnim";
|
99
|
99
|
}
|
100
|
100
|
|
101
|
|
- public void setAnimationName(String s) {
|
|
101
|
+ public void setAnimationName(String s) {
|
102
|
102
|
|
103
|
103
|
}
|
104
|
104
|
|
105
|
|
- public void moveAnimation(int dir) {
|
106
|
|
- if (dir == UP){
|
107
|
|
- //animation moved up
|
108
|
|
-
|
109
|
|
- } else if (dir == DOWN){
|
110
|
|
- //animation moved down
|
|
105
|
+ public void moveAnimation(int dir) {
|
|
106
|
+ if (dir == UP){
|
|
107
|
+ //animation moved up
|
|
108
|
+
|
|
109
|
+ } else if (dir == DOWN){
|
|
110
|
+ //animation moved down
|
111
|
111
|
|
112
|
|
- }
|
113
|
|
- }
|
|
112
|
+ }
|
|
113
|
+ }
|
114
|
114
|
|
115
|
115
|
// --------------------
|
116
|
116
|
// Frame Specific
|
117
|
117
|
// --------------------
|
118
|
|
-
|
119
|
|
- // Selects an animation on wich the frame specific functions operate
|
|
118
|
+
|
|
119
|
+ // Selects an animation on wich the frame specific functions operate
|
120
|
120
|
// Returns -1 if it does not exist, else its index
|
121
|
|
- public int selectFrame(int index) {
|
122
|
|
- System.out.println("Frame " + index + " selected.");
|
|
121
|
+ public int selectFrame(int index) {
|
|
122
|
+ System.out.println("Frame " + index + " selected.");
|
123
|
123
|
|
124
|
|
- return index;
|
125
|
|
- }
|
|
124
|
+ return index;
|
|
125
|
+ }
|
126
|
126
|
|
127
|
|
- public String getFrameName() {
|
|
127
|
+ public String getFrameName() {
|
128
|
128
|
|
129
|
129
|
return "Test";
|
130
|
130
|
}
|
|
@@ -155,15 +155,15 @@ public class cubeWorker {
|
155
|
155
|
|
156
|
156
|
}
|
157
|
157
|
|
158
|
|
- public void moveFrame(int dir){
|
159
|
|
- if (dir == UP){
|
160
|
|
- // frame moved up
|
|
158
|
+ public void moveFrame(int dir){
|
|
159
|
+ if (dir == UP){
|
|
160
|
+ // frame moved up
|
161
|
161
|
|
162
|
|
- } else if (dir == DOWN){
|
163
|
|
- // frame moved down
|
|
162
|
+ } else if (dir == DOWN){
|
|
163
|
+ // frame moved down
|
164
|
164
|
|
165
|
|
- }
|
166
|
|
- }
|
|
165
|
+ }
|
|
166
|
+ }
|
167
|
167
|
|
168
|
168
|
// --------------------
|
169
|
169
|
// File Specific
|
|
@@ -181,11 +181,18 @@ public class cubeWorker {
|
181
|
181
|
return 0;
|
182
|
182
|
}
|
183
|
183
|
|
184
|
|
- // Returns true if last saved state != current state
|
|
184
|
+ // Returns true if last saved state != current state
|
185
|
185
|
public boolean changedStateSinceSave() {
|
186
|
186
|
|
187
|
187
|
return true;
|
188
|
188
|
}
|
|
189
|
+// --------------------
|
|
190
|
+// File Specific
|
|
191
|
+// --------------------
|
|
192
|
+
|
|
193
|
+ public byte[] getLayer(int index){
|
|
194
|
+ return null;
|
|
195
|
+ }
|
189
|
196
|
|
190
|
197
|
// --------------------
|
191
|
198
|
// Serial Port Specific
|