|
@@ -51,6 +51,7 @@ void simpleAnimation(void) {
|
51
|
51
|
|
52
|
52
|
buff = buffNew();
|
53
|
53
|
|
|
54
|
+ //Up-wave
|
54
|
55
|
for(y = 0; y < 8; y++) {
|
55
|
56
|
for(x = 0; x < 8; x++) {
|
56
|
57
|
for(z = 0; z < 8; z++) {
|
|
@@ -63,11 +64,7 @@ void simpleAnimation(void) {
|
63
|
64
|
wdt_reset();
|
64
|
65
|
}
|
65
|
66
|
|
66
|
|
- for(x = 0; x < 8; x++) {
|
67
|
|
- for(z = 0; z < 8; z++) {
|
68
|
|
- buffClearPixel(buff, x, y, z);
|
69
|
|
- }
|
70
|
|
- }
|
|
67
|
+ buffClearAllPixels(buff);
|
71
|
68
|
}
|
72
|
69
|
|
73
|
70
|
// Down-wave (Frames 9-15 of showoff.cube)
|
|
@@ -83,12 +80,71 @@ void simpleAnimation(void) {
|
83
|
80
|
wdt_reset();
|
84
|
81
|
}
|
85
|
82
|
|
86
|
|
- for(x = 0; x < 8; x++) {
|
|
83
|
+ buffClearAllPixels(buff);
|
|
84
|
+ }
|
|
85
|
+
|
|
86
|
+ //x-axis wave
|
|
87
|
+ for(x = 0; x < 8; x++) {
|
|
88
|
+ for(y = 0; y < 8; y++) {
|
87
|
89
|
for(z = 0; z < 8; z++) {
|
88
|
|
- buffClearPixel(buff, x, y, z);
|
|
90
|
+ buffSetPixel(buff, x, y, z);
|
89
|
91
|
}
|
90
|
92
|
}
|
91
|
|
- }
|
|
93
|
+
|
|
94
|
+ setImage(buff);
|
|
95
|
+ while(!isFinished()) {
|
|
96
|
+ wdt_reset();
|
|
97
|
+ }
|
|
98
|
+
|
|
99
|
+ buffClearAllPixels(buff);
|
|
100
|
+ }
|
|
101
|
+
|
|
102
|
+ for(x = 7; x >= 0; x--) {
|
|
103
|
+ for(y = 0; y < 8; y++) {
|
|
104
|
+ for(z = 0; z < 8; z++) {
|
|
105
|
+ buffSetPixel(buff, x, y, z);
|
|
106
|
+ }
|
|
107
|
+ }
|
|
108
|
+
|
|
109
|
+ setImage(buff);
|
|
110
|
+ while(!isFinished()) {
|
|
111
|
+ wdt_reset();
|
|
112
|
+ }
|
|
113
|
+
|
|
114
|
+ ClearAllPixels(buff)
|
|
115
|
+ }
|
|
116
|
+
|
|
117
|
+ //z-axis-wave
|
|
118
|
+ for(z = 0; z < 8; z++) {
|
|
119
|
+ for(y = 0; y < 8; y++) {
|
|
120
|
+ for(x = 0; x < 8; x++) {
|
|
121
|
+ buffSetPixel(buff, x, y, z);
|
|
122
|
+ }
|
|
123
|
+ }
|
|
124
|
+
|
|
125
|
+ setImage(buff);
|
|
126
|
+ while(!isFinished()) {
|
|
127
|
+ wdt_reset();
|
|
128
|
+ }
|
|
129
|
+
|
|
130
|
+ buffClearAllPixels(buff);
|
|
131
|
+ }
|
|
132
|
+
|
|
133
|
+ for(z = 7; z >= 0; z--) {
|
|
134
|
+ for(x = 0; x < 8; x++) {
|
|
135
|
+ for(y = 0; y < 8; y++) {
|
|
136
|
+ buffSetPixel(buff, x, y, z);
|
|
137
|
+ }
|
|
138
|
+ }
|
|
139
|
+
|
|
140
|
+ setImage(buff);
|
|
141
|
+ while(!isFinished()) {
|
|
142
|
+ wdt_reset();
|
|
143
|
+ }
|
|
144
|
+
|
|
145
|
+ ClearAllPixels(buff)
|
|
146
|
+ }
|
|
147
|
+
|
92
|
148
|
}
|
93
|
149
|
|
94
|
150
|
void anotherAnimation(void) {
|