Permalink
Browse files

Huge commit after awful lot of hacking

  • Loading branch information...
1 parent 1c0b633 commit 0d7a61b61a25fe112a2c89089f57ba40fabb2296 @armageddon421 committed Jan 13, 2013
Showing with 2,439,778 additions and 286 deletions.
  1. BIN blinkenfont
  2. BIN blinkenlongfont
  3. BIN blinkennyan
  4. BIN blinkenpi
  5. +1 −1 build.sh
  6. +3 −0 build_nyan.sh
  7. +230 −0 effects/effects.c
  8. +226 −0 effects/effects.c.bak
  9. +40 −0 effects/effects.h
  10. +258 −258 font.h
  11. +258 −0 font10.h
  12. BIN gamelib/.main.c.swp
  13. BIN gamelib/.menu.c.swp
  14. BIN gamelib/.menu.h.swp
  15. BIN gamelib/blinkenpi
  16. +3 −0 gamelib/build.sh
  17. +337 −0 gamelib/gamelib.c
  18. +27 −0 gamelib/main.c
  19. +268 −0 gamelib/main.c~
  20. +57 −0 gamelib/menu.c
  21. +22 −0 gamelib/menu.h
  22. +22 −0 gamelib/snakelog.txt
  23. BIN gamelib/test
  24. +42 −0 gamelib/test.c
  25. +60 −26 main.c
  26. +138 −0 main_blinkenfont.c
  27. +173 −0 main_nyan.c
  28. BIN nyan/nyblack.bmp
  29. BIN nyan/nyblack2.bmp
  30. +33 −0 program2.sh
  31. +1 −1 rgblib.h
  32. +120 −0 screenlib.c
  33. +14 −0 screenlib.h
  34. BIN snake_nunchuck/.snakelog.txt.swp
  35. BIN snake_nunchuck/blinkenpi
  36. +3 −0 snake_nunchuck/build.sh
  37. +2,433,476 −0 snake_nunchuck/dbglog.txt
  38. +1,096 −0 snake_nunchuck/main.c
  39. +476 −0 snake_nunchuck/main.c.predijkstra
  40. +268 −0 snake_nunchuck/main.c~
  41. +10 −0 snake_nunchuck/scores.txt
  42. BIN snake_nunchuck/snake_standalone
  43. BIN snake_nunchuck/snake_standalone.old
  44. +919 −0 snake_nunchuck/snakelog.txt
  45. BIN snake_nunchuck/test
  46. +42 −0 snake_nunchuck/test.c
  47. +1 −0 spien.sh
  48. BIN test/blinkenpi
  49. +3 −0 test/build.sh
  50. +287 −0 test/main.c
  51. +268 −0 test/main.c~
  52. BIN test/test
  53. +42 −0 test/test.c
  54. BIN test_nun/blinkenpi
  55. +3 −0 test_nun/build.sh
  56. +241 −0 test_nun/main.c
  57. +268 −0 test_nun/main.c~
  58. BIN test_nun/test
  59. +42 −0 test_nun/test.c
View
BIN blinkenfont
Binary file not shown.
View
BIN blinkenlongfont
Binary file not shown.
View
BIN blinkennyan
Binary file not shown.
View
BIN blinkenpi
Binary file not shown.
View
2 build.sh
@@ -1,3 +1,3 @@
-cc -o blinkenpi main.c rgblib.c -I/usr/local/include -L/usr/local/lib -lwiringPi -lm
+cc -o blinkenpi main.c rgblib.c screenlib.c -I/usr/local/include -L/usr/local/lib -lwiringPi -lm
View
3 build_nyan.sh
@@ -0,0 +1,3 @@
+
+
+cc -o blinkennyan main_nyan.c rgblib.c -I/usr/local/include -L/usr/local/lib -lwiringPi -lm
View
230 effects/effects.c
@@ -0,0 +1,230 @@
+
+#include <stdio.h>
+
+#include "../rgblib.h"
+#include "../screenlib.h"
+
+#include "effects.h"
+
+//private prototypes
+void effect_draw_delay(int time, int ef);
+void effect_draw_strobe(int time, int ef);
+void effect_draw_fadein(int time, int ef);
+void effect_draw_fadeout(int time, int ef);
+void effect_draw_explosion_plus(int time, int ef);
+void effect_draw_explosion_x(int time, int ef);
+
+
+extern unsigned char buffer[LED_NUM];
+
+struct effect eflist[EFFECT_BUFSIZE];
+
+
+void effect_init(){
+
+
+}
+
+
+int effect_create(int type, int pos, int red, int green, int blue, int parameter, int time, int duration){
+ int i;
+ for(i=0;i<EFFECT_BUFSIZE;i++){
+ if (!eflist[i].active){
+ eflist[i].active = 1;
+ eflist[i].type = type;
+ eflist[i].pos = pos;
+ eflist[i].red = red;
+ eflist[i].green = green;
+ eflist[i].blue = blue;
+ eflist[i].parameter = parameter;
+ eflist[i].starttime = time;
+ eflist[i].duration = duration;
+ return 0;
+ }
+ }
+ return 1;
+}
+
+void effect_reset(){
+ int i;
+ for (i=0;i<EFFECT_BUFSIZE;i++){
+ eflist[i].active = 0;
+ }
+
+}
+
+int effect_draw(int time){
+ int i;
+ for (i=0;i<EFFECT_BUFSIZE;i++){
+ if(eflist[i].active){
+ switch(eflist[i].type){
+ case(EFFECT_TYPE_DELAY):
+ effect_draw_delay(time, i);
+ break;
+ case(EFFECT_TYPE_STROBE):
+ effect_draw_strobe(time, i);
+ break;
+ case(EFFECT_TYPE_FADEIN):
+ effect_draw_fadein(time, i);
+ break;
+ case(EFFECT_TYPE_FADEOUT):
+ effect_draw_fadeout(time, i);
+ break;
+
+ case(EFFECT_TYPE_EXPLOSION):
+ effect_draw_explosion_plus(time, i);
+ effect_draw_explosion_x(time, i);
+ break;
+ case(EFFECT_TYPE_EXPLOSION_PLUS):
+ effect_draw_explosion_plus(time, i);
+ break;
+ case(EFFECT_TYPE_EXPLOSION_X):
+ effect_draw_explosion_x(time, i);
+ break;
+
+
+ }
+ }
+ }
+
+}
+
+void effect_draw_delay(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue;
+
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+void effect_draw_strobe(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+ if ((time-eflist[ef].starttime)%(eflist[ef].parameter*2) < eflist[ef].parameter){
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue;
+ }
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+void effect_draw_fadein(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+ double f = (time-eflist[ef].starttime)/(double)eflist[ef].duration;
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red*f;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green*f;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue*f;
+
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+void effect_draw_fadeout(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+ double f = 1.0 - (time-eflist[ef].starttime)/(double)eflist[ef].duration;
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red*f;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green*f;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue*f;
+
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+
+void effect_draw_explosion_plus(int time, int ef){
+ struct effect e = eflist[ef];
+
+ if( time == e.starttime){
+ int i;
+ int iter_duration = e.duration/(e.parameter+1);
+ for (i=1;i<e.parameter+1;i++){
+ effect_create(EFFECT_TYPE_STROBE, e.pos+i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos+i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos+i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, e.pos-i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos-i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos-i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, e.pos+WIDTH*i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos+WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos+WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, e.pos-WIDTH*i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos-WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos-WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+ }
+ }
+ if( time > e.starttime){
+ eflist[ef].active = 0;
+ }
+
+}
+
+void effect_draw_explosion_x(int time, int ef){
+ struct effect e = eflist[ef];
+
+ if( time == e.starttime){
+ int i;
+ int iter_duration = e.duration/(e.parameter+1);
+ for (i=1;i<e.parameter+1;i++){
+ effect_create(EFFECT_TYPE_STROBE, e.pos+i+WIDTH*i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos+i+WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos+i+WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, e.pos-i+WIDTH*i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos-i+WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos-i+WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, e.pos-i-WIDTH*i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos-i-WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos-i-WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, e.pos+i-WIDTH*i, e.red, e.green, e.blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, e.pos+i-WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, e.pos+i-WIDTH*i, -e.red, -e.green, -e.blue, 0, time+iter_duration*(i), iter_duration);
+ }
+ }
+ if( time > e.starttime){
+ eflist[ef].active = 0;
+ }
+
+}
+
+
+
+
+
+
+
View
226 effects/effects.c.bak
@@ -0,0 +1,226 @@
+
+#include <stdio.h>
+
+#include "../rgblib.h"
+#include "../screenlib.h"
+
+#include "effects.h"
+
+//private prototypes
+void effect_draw_delay(int time, int ef);
+void effect_draw_strobe(int time, int ef);
+void effect_draw_fadein(int time, int ef);
+void effect_draw_fadeout(int time, int ef);
+int effect_create_explosion_plus(int pos, int red, int green, int blue, int parameter, int time, int duration);
+int effect_create_explosion_x(int pos, int red, int green, int blue, int parameter, int time, int duration);
+
+
+extern unsigned char buffer[LED_NUM];
+
+struct effect eflist[EFFECT_BUFSIZE];
+
+int i;
+
+void effect_init(){
+
+
+}
+
+
+int effect_create(int type, int pos, int red, int green, int blue, int parameter, int time, int duration){
+ printf(" %d %d %d %d %d %d %d %d\r\n", type, pos, red ,green, blue, parameter, time ,duration);
+ if ( type == EFFECT_TYPE_EXPLOSION ){
+
+ return effect_create(EFFECT_TYPE_EXPLOSION_PLUS, pos, red, green, blue, parameter, time, duration)
+ && effect_create(EFFECT_TYPE_EXPLOSION_X, pos, red, green, blue, parameter, time, duration);
+
+
+ }
+
+ if ( type == EFFECT_TYPE_EXPLOSION_PLUS ){
+ effect_create_explosion_x(pos, red, green, blue, parameter, time, duration);
+ }
+ if ( type == EFFECT_TYPE_EXPLOSION_X ){
+ effect_create_explosion_x(pos, red, green, blue, parameter, time, duration);
+ }
+
+ int i;
+ for(i=0;i<EFFECT_BUFSIZE;i++){
+ if (!eflist[i].active){
+ eflist[i].active = 1;
+ eflist[i].type = type;
+ eflist[i].pos = pos;
+ eflist[i].red = red;
+ eflist[i].green = green;
+ eflist[i].blue = blue;
+ eflist[i].parameter = parameter;
+ eflist[i].starttime = time;
+ eflist[i].duration = duration;
+ return 0;
+ }
+ }
+ return 1;
+}
+
+int effect_draw(int time){
+ for (i=0;i<EFFECT_BUFSIZE;i++){
+ if(eflist[i].active){
+ switch(eflist[i].type){
+ case(EFFECT_TYPE_DELAY):
+ effect_draw_delay(time, i);
+ break;
+ case(EFFECT_TYPE_STROBE):
+ effect_draw_strobe(time, i);
+ break;
+ case(EFFECT_TYPE_FADEIN):
+ effect_draw_fadein(time, i);
+ break;
+ case(EFFECT_TYPE_FADEOUT):
+ effect_draw_fadeout(time, i);
+ break;
+
+
+
+ }
+ }
+ }
+
+}
+
+void effect_draw_delay(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue;
+
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+void effect_draw_strobe(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+ if ((time-eflist[ef].starttime)%(eflist[ef].parameter*2) < eflist[ef].parameter){
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue;
+ }
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+void effect_draw_fadein(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+ double f = (time-eflist[ef].starttime)/(double)eflist[ef].duration;
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red*f;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green*f;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue*f;
+
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+void effect_draw_fadeout(int time, int ef){
+
+ if( time >= eflist[ef].starttime && time < eflist[ef].starttime + eflist[ef].duration){
+ if(eflist[ef].pos < 0 || eflist[ef].pos >= LED_NUM){
+ eflist[ef].active = 0;
+ return;
+ }
+ double f = 1.0 - (time-eflist[ef].starttime)/(double)eflist[ef].duration;
+ buffer[eflist[ef].pos*3 + 0] += eflist[ef].red*f;
+ buffer[eflist[ef].pos*3 + 1] += eflist[ef].green*f;
+ buffer[eflist[ef].pos*3 + 2] += eflist[ef].blue*f;
+
+ }
+ else if (time >= eflist[ef].starttime + eflist[ef].duration){
+ eflist[ef].active = 0;
+ }
+}
+
+
+int effect_create_explosion_plus(int pos, int red, int green, int blue, int parameter, int time, int duration){
+
+ int iter_duration = duration/(parameter+1);
+ int i;
+ for (i=1;i<parameter+1;i++){
+ effect_create(EFFECT_TYPE_STROBE, pos+i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, pos+i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, pos+i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, pos-i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, pos-i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, pos-i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, pos+WIDTH*i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, pos+WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, pos+WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+
+ effect_create(EFFECT_TYPE_STROBE, pos-WIDTH*i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ effect_create(EFFECT_TYPE_FADEOUT, pos-WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ effect_create(EFFECT_TYPE_FADEIN, pos-WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+ }
+}
+
+int effect_create_explosion_x(int pos, int red, int green, int blue, int parameter, int time, int duration){
+ int iter_duration = duration/(parameter+1);
+ int i;
+ for (i=1;i<parameter+1;i++){
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_STROBE, pos+i+WIDTH*i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEOUT, pos+i+WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEIN, pos+i+WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+ printf("%d", i);
+
+ effect_create(EFFECT_TYPE_STROBE, pos-i+WIDTH*i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEOUT, pos-i+WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEIN, pos-i+WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+ printf("%d", i);
+
+ effect_create(EFFECT_TYPE_STROBE, pos-i-WIDTH*i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEOUT, pos-i-WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEIN, pos-i-WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+ printf("%d", i);
+
+ effect_create(EFFECT_TYPE_STROBE, pos+i-WIDTH*i, red, green, blue, 1, time+iter_duration*(i-1), iter_duration*2);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEOUT, pos+i-WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i-1), iter_duration);
+ printf("%d", i);
+ effect_create(EFFECT_TYPE_FADEIN, pos+i-WIDTH*i, -red, -green, -blue, 0, time+iter_duration*(i), iter_duration);
+ printf("%d", i);
+ }
+}
+
+
+
+
+
+
+
View
40 effects/effects.h
@@ -0,0 +1,40 @@
+
+
+
+
+#define EFFECT_BUFSIZE 1000
+
+
+#define EFFECT_TYPE_DELAY 0
+#define EFFECT_TYPE_STROBE 10
+#define EFFECT_TYPE_FADEIN 20
+#define EFFECT_TYPE_FADEOUT 21
+#define EFFECT_TYPE_EXPLOSION 100
+#define EFFECT_TYPE_EXPLOSION_PLUS 101
+#define EFFECT_TYPE_EXPLOSION_X 102
+
+struct effect{
+ int active;
+ int type;
+ int pos;
+ int red;
+ int green;
+ int blue;
+ int parameter;
+ int starttime;
+ int duration;
+};
+
+
+
+
+void effect_init();
+void effect_reset();
+int effect_create(int type, int pos, int red, int green, int blue, int parameter, int time, int duration);
+int effect_draw(int time);
+
+
+
+
+
+
View
516 font.h
@@ -1,258 +1,258 @@
-const char font[256][6]={
-{0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
-{0x40,0xA0,0xE0,0xA0,0x40,0x00}, // 0x01
-{0x40,0xE0,0xA0,0xE0,0x40,0x00}, // 0x02
-{0x00,0xA0,0xE0,0xE0,0x40,0x00}, // 0x03
-{0x00,0x40,0xE0,0xE0,0x40,0x00}, // 0x04
-{0x40,0xE0,0xE0,0x40,0xE0,0x00}, // 0x05
-{0x40,0x40,0xE0,0x40,0xE0,0x00}, // 0x06
-{0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
-{0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
-{0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
-{0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
-{0x00,0xC0,0x80,0x60,0x60,0x00}, // 0x0B
-{0x40,0xA0,0x40,0xE0,0x40,0x00}, // 0x0C
-{0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
-{0x40,0xC0,0xA0,0x80,0x40,0x00}, // 0x0E
-{0x40,0xE0,0xA0,0xE0,0x40,0x00}, // 0x0F
-{0x20,0x60,0xE0,0x60,0x20,0x00}, // 0x10
-{0x80,0xC0,0xE0,0xC0,0x80,0x00}, // 0x11
-{0x40,0xE0,0x40,0xE0,0x40,0x00}, // 0x12
-{0xA0,0xA0,0xA0,0x00,0xA0,0x00}, // 0x13
-{0x00,0x80,0x40,0x40,0x40,0x40}, // 0x14
-{0x40,0x40,0x40,0x40,0x20,0x00}, // 0x15
-{0x00,0x00,0x00,0x00,0xE0,0x00}, // 0x16
-{0x40,0xE0,0x40,0xE0,0x40,0xE0}, // 0x17
-{0x40,0xE0,0x40,0x40,0x40,0x00}, // 0x18
-{0x40,0x40,0x40,0xE0,0x40,0x00}, // 0x19
-{0x00,0x40,0xF0,0x40,0x00,0x00}, // 0x1A
-{0x00,0x20,0xF0,0x20,0x00,0x00}, // 0x1B
-{0x00,0x00,0x20,0xE0,0x00,0x00}, // 0x1C
-{0x00,0xA0,0xE0,0xA0,0x00,0x00}, // 0x1D
-{0x00,0x40,0xE0,0xE0,0x00,0x00}, // 0x1E
-{0x00,0xE0,0xE0,0x40,0x00,0x00}, // 0x1F
-{0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
-{0x40,0x40,0x40,0x00,0x40,0x00}, // 0x21
-{0xA0,0xA0,0x00,0x00,0x00,0x00}, // 0x22
-{0xA0,0xE0,0xA0,0xE0,0xA0,0x00}, // 0x23
-{0x40,0xC0,0x60,0xC0,0x60,0x40}, // 0x24
-{0x20,0x80,0x40,0x20,0x80,0x00}, // 0x25
-{0x40,0xA0,0xC0,0xA0,0xE0,0x00}, // 0x26
-{0x60,0x20,0x00,0x00,0x00,0x00}, // 0x27
-{0x40,0x20,0x20,0x20,0x40,0x00}, // 0x28
-{0x20,0x40,0x40,0x40,0x20,0x00}, // 0x29
-{0xA0,0x40,0xE0,0x40,0xA0,0x00}, // 0x2A
-{0x00,0x40,0xE0,0x40,0x00,0x00}, // 0x2B
-{0x00,0x00,0x00,0x00,0x60,0x20}, // 0x2C
-{0x00,0x00,0xE0,0x00,0x00,0x00}, // 0x2D
-{0x00,0x00,0x00,0x00,0x40,0x00}, // 0x2E
-{0x80,0x80,0x40,0x20,0x20,0x00}, // 0x2F
-{0xC0,0xA0,0xA0,0xA0,0x60,0x00}, // 0x30
-{0x40,0x60,0x40,0x40,0xE0,0x00}, // 0x31
-{0x60,0x80,0x40,0x20,0xE0,0x00}, // 0x32
-{0x60,0x80,0x40,0x80,0x60,0x00}, // 0x33
-{0x80,0xA0,0xE0,0x80,0x80,0x00}, // 0x34
-{0xE0,0x20,0x60,0x80,0x60,0x00}, // 0x35
-{0x40,0x20,0x60,0xA0,0x40,0x00}, // 0x36
-{0xE0,0x80,0xC0,0x40,0x40,0x00}, // 0x37
-{0x40,0xA0,0x40,0xA0,0x40,0x00}, // 0x38
-{0x40,0xA0,0xC0,0x80,0x40,0x00}, // 0x39
-{0x00,0x00,0x40,0x00,0x40,0x00}, // 0x3A
-{0x00,0x00,0x40,0x00,0x60,0x20}, // 0x3B
-{0x80,0x40,0x20,0x40,0x80,0x00}, // 0x3C
-{0x00,0x00,0xE0,0x00,0xE0,0x00}, // 0x3D
-{0x20,0x40,0x80,0x40,0x20,0x00}, // 0x3E
-{0x60,0x80,0x40,0x00,0x40,0x00}, // 0x3F
-{0xE0,0xA0,0xA0,0x20,0xE0,0x00}, // 0x40
-{0x40,0xA0,0xE0,0xA0,0xA0,0x00}, // 0x41
-{0x60,0xA0,0x60,0xA0,0x60,0x00}, // 0x42
-{0xC0,0x20,0x20,0x20,0xC0,0x00}, // 0x43
-{0x60,0xA0,0xA0,0xA0,0x60,0x00}, // 0x44
-{0xE0,0x20,0x60,0x20,0xE0,0x00}, // 0x45
-{0xE0,0x20,0x60,0x20,0x20,0x00}, // 0x46
-{0xC0,0x20,0xA0,0xA0,0xC0,0x00}, // 0x47
-{0xA0,0xA0,0xE0,0xA0,0xA0,0x00}, // 0x48
-{0xE0,0x40,0x40,0x40,0xE0,0x00}, // 0x49
-{0x80,0x80,0x80,0xA0,0x40,0x00}, // 0x4A
-{0xA0,0xA0,0x60,0xA0,0xA0,0x00}, // 0x4B
-{0x20,0x20,0x20,0x20,0xE0,0x00}, // 0x4C
-{0xA0,0xE0,0xE0,0xA0,0xA0,0x00}, // 0x4D
-{0xA0,0xE0,0xA0,0xA0,0xA0,0x00}, // 0x4E
-{0x40,0xA0,0xA0,0xA0,0x40,0x00}, // 0x4F
-{0x60,0xA0,0x60,0x20,0x20,0x00}, // 0x50
-{0x40,0xA0,0xA0,0xE0,0xC0,0x00}, // 0x51
-{0x60,0xA0,0x60,0xA0,0xA0,0x00}, // 0x52
-{0xC0,0x20,0xE0,0x80,0x60,0x00}, // 0x53
-{0xE0,0x40,0x40,0x40,0x40,0x00}, // 0x54
-{0xA0,0xA0,0xA0,0xA0,0xE0,0x00}, // 0x55
-{0xA0,0xA0,0xA0,0xA0,0x40,0x00}, // 0x56
-{0xA0,0xA0,0xE0,0xE0,0xA0,0x00}, // 0x57
-{0xA0,0xA0,0x40,0xA0,0xA0,0x00}, // 0x58
-{0xA0,0xA0,0x40,0x40,0x40,0x00}, // 0x59
-{0xE0,0x80,0x40,0x20,0xE0,0x00}, // 0x5A
-{0x60,0x20,0x20,0x20,0x60,0x00}, // 0x5B
-{0x20,0x20,0x40,0x80,0x80,0x00}, // 0x5C
-{0x60,0x40,0x40,0x40,0x60,0x00}, // 0x5D
-{0x40,0xA0,0x00,0x00,0x00,0x00}, // 0x5E
-{0x00,0x00,0x00,0x00,0x00,0xF0}, // 0x5F
-{0x60,0x40,0x00,0x00,0x00,0x00}, // 0x60
-{0x00,0x00,0xC0,0xA0,0xE0,0x00}, // 0x61
-{0x20,0x20,0x60,0xA0,0x60,0x00}, // 0x62
-{0x00,0x00,0xC0,0x20,0xC0,0x00}, // 0x63
-{0x80,0x80,0xC0,0xA0,0xC0,0x00}, // 0x64
-{0x00,0x00,0xE0,0x60,0xC0,0x00}, // 0x65
-{0x80,0x40,0xE0,0x40,0x40,0x00}, // 0x66
-{0x00,0x00,0xE0,0xA0,0x80,0xE0}, // 0x67
-{0x20,0x20,0x60,0xA0,0xA0,0x00}, // 0x68
-{0x40,0x00,0x40,0x40,0x40,0x00}, // 0x69
-{0x40,0x00,0x40,0x40,0x40,0x60}, // 0x6A
-{0x20,0x20,0xA0,0x60,0xA0,0x00}, // 0x6B
-{0x40,0x40,0x40,0x40,0x40,0x00}, // 0x6C
-{0x00,0x00,0xE0,0xE0,0xA0,0x00}, // 0x6D
-{0x00,0x00,0x60,0xA0,0xA0,0x00}, // 0x6E
-{0x00,0x00,0x40,0xA0,0x40,0x00}, // 0x6F
-{0x00,0x00,0x60,0xA0,0x60,0x20}, // 0x70
-{0x00,0x00,0xC0,0xA0,0xC0,0x80}, // 0x71
-{0x00,0x00,0x60,0x20,0x20,0x00}, // 0x72
-{0x00,0x00,0xC0,0x40,0x60,0x00}, // 0x73
-{0x00,0x40,0xE0,0x40,0xC0,0x00}, // 0x74
-{0x00,0x00,0xA0,0xA0,0xE0,0x00}, // 0x75
-{0x00,0x00,0xA0,0xA0,0x40,0x00}, // 0x76
-{0x00,0x00,0xA0,0xE0,0xE0,0x00}, // 0x77
-{0x00,0x00,0xA0,0x40,0xA0,0x00}, // 0x78
-{0x00,0x00,0xA0,0xA0,0x40,0x20}, // 0x79
-{0x00,0x00,0x60,0x40,0xC0,0x00}, // 0x7A
-{0xC0,0x40,0x60,0x40,0xC0,0x00}, // 0x7B
-{0x40,0x40,0x40,0x40,0x40,0x00}, // 0x7C
-{0x60,0x40,0xC0,0x40,0x60,0x00}, // 0x7D
-{0xA0,0x50,0x00,0x00,0x00,0x00}, // 0x7E
-{0x00,0x40,0xA0,0xE0,0x00,0x00}, // 0x7F
-{0xC0,0x20,0x20,0xE0,0x40,0x20}, // 0x80
-{0xA0,0x00,0xA0,0xA0,0xC0,0x00}, // 0x81
-{0x80,0x40,0xE0,0x60,0xC0,0x00}, // 0x82
-{0x40,0xA0,0xC0,0xA0,0xE0,0x00}, // 0x83
-{0xA0,0x00,0xC0,0xA0,0xE0,0x00}, // 0x84
-{0x20,0x40,0xC0,0xA0,0xE0,0x00}, // 0x85
-{0x40,0x00,0xC0,0xA0,0xE0,0x00}, // 0x86
-{0x00,0xE0,0x20,0xE0,0x40,0x60}, // 0x87
-{0x40,0xA0,0xE0,0x60,0xC0,0x00}, // 0x88
-{0xA0,0x00,0xE0,0x60,0xC0,0x00}, // 0x89
-{0x20,0x40,0xE0,0x60,0xC0,0x00}, // 0x8A
-{0xA0,0x00,0x40,0x40,0x40,0x00}, // 0x8B
-{0x40,0xA0,0x00,0x40,0x40,0x00}, // 0x8C
-{0x20,0x40,0x00,0x40,0x40,0x00}, // 0x8D
-{0xA0,0x40,0xA0,0xE0,0xA0,0x00}, // 0x8E
-{0x40,0x40,0xA0,0xE0,0xA0,0x00}, // 0x8F
-{0x80,0x40,0xE0,0x60,0xE0,0x00}, // 0x90
-{0x00,0x00,0xC0,0xE0,0x60,0x00}, // 0x91
-{0xC0,0x60,0xE0,0x60,0xE0,0x00}, // 0x92
-{0x40,0xA0,0x40,0xA0,0x40,0x00}, // 0x93
-{0xA0,0x00,0x40,0xA0,0x40,0x00}, // 0x94
-{0x20,0x40,0x40,0xA0,0x40,0x00}, // 0x95
-{0x40,0xA0,0x00,0xA0,0xE0,0x00}, // 0x96
-{0x20,0x40,0xA0,0xA0,0xE0,0x00}, // 0x97
-{0xA0,0x00,0xA0,0xA0,0x40,0x20}, // 0x98
-{0xA0,0x40,0xA0,0xA0,0x40,0x00}, // 0x99
-{0xA0,0x00,0xA0,0xA0,0xE0,0x00}, // 0x9A
-{0x40,0xE0,0x20,0xE0,0x40,0x00}, // 0x9B
-{0x80,0x40,0xE0,0x40,0xE0,0x00}, // 0x9C
-{0xA0,0xE0,0x40,0xE0,0x40,0x00}, // 0x9D
-{0x00,0x60,0x60,0xA0,0xA0,0x00}, // 0x9E
-{0xC0,0x40,0xC0,0x40,0x60,0x00}, // 0x9F
-{0x80,0x40,0xC0,0xA0,0xE0,0x00}, // 0xA0
-{0x80,0x40,0x00,0x40,0x40,0x00}, // 0xA1
-{0x80,0x40,0xE0,0xA0,0xE0,0x00}, // 0xA2
-{0x80,0x40,0x00,0xA0,0xE0,0x00}, // 0xA3
-{0xE0,0x00,0xE0,0xA0,0xA0,0x00}, // 0xA4
-{0xE0,0x00,0xA0,0xE0,0xA0,0x00}, // 0xA5
-{0xC0,0xA0,0xE0,0x00,0xE0,0x00}, // 0xA6
-{0x40,0xA0,0x40,0x00,0xE0,0x00}, // 0xA7
-{0x40,0x00,0x40,0x20,0xC0,0x00}, // 0xA8
-{0x00,0xE0,0x20,0x20,0x00,0x00}, // 0xA9
-{0x00,0x70,0x40,0x40,0x00,0x00}, // 0xAA
-{0x20,0xA0,0x40,0xA0,0xC0,0x00}, // 0xAB
-{0x20,0xA0,0x40,0xE0,0x80,0x00}, // 0xAC
-{0x40,0x00,0x40,0x40,0x40,0x00}, // 0xAD
-{0x00,0xA0,0x50,0xA0,0x00,0x00}, // 0xAE
-{0x00,0x50,0xA0,0x50,0x00,0x00}, // 0xAF
-{0x20,0x80,0x20,0x80,0x20,0x80}, // 0xB0
-{0xA0,0x50,0xA0,0x50,0xA0,0x50}, // 0xB1
-{0xD0,0x70,0xD0,0x70,0xD0,0x70}, // 0xB2
-{0x40,0x40,0x40,0x40,0x40,0x40}, // 0xB3
-{0x40,0x40,0x70,0x40,0x40,0x40}, // 0xB4
-{0x40,0x70,0x40,0x70,0x40,0x40}, // 0xB5
-{0xA0,0xA0,0xB0,0xA0,0xA0,0xA0}, // 0xB6
-{0x00,0x00,0xF0,0xA0,0xA0,0xA0}, // 0xB7
-{0x00,0x70,0x40,0x70,0x40,0x40}, // 0xB8
-{0xA0,0xB0,0x80,0xB0,0xA0,0xA0}, // 0xB9
-{0xA0,0xA0,0xA0,0xA0,0xA0,0xA0}, // 0xBA
-{0x00,0xF0,0x80,0xB0,0xA0,0xA0}, // 0xBB
-{0xA0,0xB0,0x80,0xF0,0x00,0x00}, // 0xBC
-{0xA0,0xA0,0xF0,0x00,0x00,0x00}, // 0xBD
-{0x40,0x70,0x40,0x70,0x00,0x00}, // 0xBE
-{0x00,0x00,0x70,0x40,0x40,0x40}, // 0xBF
-{0x40,0x40,0xC0,0x00,0x00,0x00}, // 0xC0
-{0x40,0x40,0xF0,0x00,0x00,0x00}, // 0xC1
-{0x00,0x00,0xF0,0x40,0x40,0x40}, // 0xC2
-{0x40,0x40,0xC0,0x40,0x40,0x40}, // 0xC3
-{0x00,0x00,0xF0,0x00,0x00,0x00}, // 0xC4
-{0x40,0x40,0xF0,0x40,0x40,0x40}, // 0xC5
-{0x40,0xC0,0x40,0xC0,0x40,0x40}, // 0xC6
-{0xA0,0xA0,0xA0,0xA0,0xA0,0xA0}, // 0xC7
-{0xA0,0xA0,0x20,0xE0,0x00,0x00}, // 0xC8
-{0x00,0xE0,0x20,0xA0,0xA0,0xA0}, // 0xC9
-{0xA0,0xB0,0x00,0xF0,0x00,0x00}, // 0xCA
-{0x00,0xF0,0x00,0xB0,0xA0,0xA0}, // 0xCB
-{0xA0,0xA0,0x20,0xA0,0xA0,0xA0}, // 0xCC
-{0x00,0xF0,0x00,0xF0,0x00,0x00}, // 0xCD
-{0xA0,0xB0,0x00,0xB0,0xA0,0xA0}, // 0xCE
-{0x40,0xF0,0x00,0xF0,0x00,0x00}, // 0xCF
-{0xA0,0xA0,0xF0,0x00,0x00,0x00}, // 0xD0
-{0x00,0xF0,0x00,0xF0,0x40,0x40}, // 0xD1
-{0x00,0x00,0xF0,0xA0,0xA0,0xA0}, // 0xD2
-{0xA0,0xA0,0xE0,0x00,0x00,0x00}, // 0xD3
-{0x40,0xC0,0x40,0xC0,0x00,0x00}, // 0xD4
-{0x00,0xC0,0x40,0xC0,0x40,0x40}, // 0xD5
-{0x00,0x00,0xE0,0xA0,0xA0,0xA0}, // 0xD6
-{0xA0,0xA0,0xB0,0xA0,0xA0,0xA0}, // 0xD7
-{0x40,0xF0,0x00,0xF0,0x40,0x40}, // 0xD8
-{0x40,0x40,0x70,0x00,0x00,0x00}, // 0xD9
-{0x00,0x00,0xC0,0x40,0x40,0x40}, // 0xDA
-{0xF0,0xF0,0xF0,0xF0,0xF0,0xF0}, // 0xDB
-{0x00,0x00,0x00,0xF0,0xF0,0xF0}, // 0xDC
-{0x30,0x30,0x30,0x30,0x30,0x30}, // 0xDD
-{0xC0,0xC0,0xC0,0xC0,0xC0,0xC0}, // 0xDE
-{0xF0,0xF0,0xF0,0x00,0x00,0x00}, // 0xDF
-{0x00,0x00,0xE0,0x60,0xE0,0x00}, // 0xE0
-{0x40,0xA0,0x60,0xA0,0x60,0x20}, // 0xE1
-{0xE0,0xA0,0x20,0x20,0x20,0x00}, // 0xE2
-{0xE0,0xA0,0xA0,0xA0,0xA0,0x00}, // 0xE3
-{0xE0,0x20,0x40,0x20,0xE0,0x00}, // 0xE4
-{0x00,0x00,0xC0,0xA0,0x40,0x00}, // 0xE5
-{0x00,0x00,0xA0,0xA0,0xE0,0x20}, // 0xE6
-{0x00,0x80,0x60,0x40,0x40,0x00}, // 0xE7
-{0xE0,0x40,0xA0,0x40,0xE0,0x00}, // 0xE8
-{0x40,0xA0,0xE0,0xA0,0x40,0x00}, // 0xE9
-{0x00,0x40,0xA0,0xA0,0xA0,0x00}, // 0xEA
-{0xC0,0x20,0x40,0xA0,0x40,0x00}, // 0xEB
-{0x00,0x00,0xE0,0xA0,0xE0,0x00}, // 0xEC
-{0x40,0xE0,0xA0,0xE0,0x40,0x00}, // 0xED
-{0xC0,0x20,0xE0,0x20,0xC0,0x00}, // 0xEE
-{0x40,0xA0,0xA0,0xA0,0xA0,0x00}, // 0xEF
-{0xE0,0x00,0xE0,0x00,0xE0,0x00}, // 0xF0
-{0x40,0xE0,0x40,0x00,0xE0,0x00}, // 0xF1
-{0x60,0x80,0x60,0x00,0xE0,0x00}, // 0xF2
-{0xC0,0x20,0xC0,0x00,0xE0,0x00}, // 0xF3
-{0x00,0x80,0x40,0x40,0x40,0x40}, // 0xF4
-{0x40,0x40,0x40,0x40,0x20,0x00}, // 0xF5
-{0x40,0x00,0xE0,0x00,0x40,0x00}, // 0xF6
-{0x00,0xA0,0x50,0xA0,0x50,0x00}, // 0xF7
-{0x40,0xA0,0x40,0x00,0x00,0x00}, // 0xF8
-{0x00,0x40,0xE0,0x40,0x00,0x00}, // 0xF9
-{0x00,0x00,0x40,0x00,0x00,0x00}, // 0xFA
-{0xC0,0x40,0x40,0x60,0x40,0x00}, // 0xFB
-{0xE0,0xA0,0xA0,0x00,0x00,0x00}, // 0xFC
-{0x60,0x40,0x20,0x60,0x00,0x00}, // 0xFD
-{0x00,0x00,0x60,0x60,0x00,0x00}, // 0xFE
-{0x00,0x00,0x00,0x00,0x00,0x00} // 0xFF
-};
+const char font[256][12]={
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
+{0x00,0x38,0x44,0xAA,0x82,0xC6,0xBA,0x44,0x38,0x00,0x00,0x00}, // 0x01
+{0x00,0x38,0x7C,0xD6,0xFE,0xBA,0xC6,0x7C,0x38,0x00,0x00,0x00}, // 0x02
+{0x00,0x6C,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00}, // 0x03
+{0x00,0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00}, // 0x04
+{0x38,0x38,0x38,0x54,0xFE,0xFE,0x6C,0x10,0x7C,0x00,0x00,0x00}, // 0x05
+{0x10,0x38,0x7C,0xFE,0xFE,0xFE,0x6C,0x10,0x7C,0x00,0x00,0x00}, // 0x06
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
+{0x00,0x70,0x60,0x50,0x1C,0x22,0x22,0x22,0x1C,0x00,0x00,0x00}, // 0x0B
+{0x38,0x44,0x44,0x44,0x38,0x10,0x7C,0x10,0x10,0x00,0x00,0x00}, // 0x0C
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
+{0xE0,0x98,0xE8,0x98,0x88,0x88,0xE8,0x6E,0x06,0x00,0x00,0x00}, // 0x0E
+{0x10,0x54,0x38,0x44,0xC6,0x44,0x38,0x54,0x10,0x00,0x00,0x00}, // 0x0F
+{0x00,0x00,0x08,0x18,0x38,0x78,0x38,0x18,0x08,0x00,0x00,0x00}, // 0x10
+{0x00,0x00,0x20,0x30,0x38,0x3C,0x38,0x30,0x20,0x00,0x00,0x00}, // 0x11
+{0x10,0x38,0x7C,0x10,0x10,0x10,0x7C,0x38,0x10,0x00,0x00,0x00}, // 0x12
+{0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x6C,0x6C,0x00,0x00,0x00}, // 0x13
+{0xF8,0xAC,0xAC,0xAC,0xB8,0xA0,0xA0,0xA0,0xA0,0x00,0x00,0x00}, // 0x14
+{0x78,0x6C,0x0C,0x3C,0x28,0x78,0x60,0x6C,0x3C,0x00,0x00,0x00}, // 0x15
+{0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x7C,0x7C,0x00,0x00,0x00}, // 0x16
+{0x10,0x38,0x7C,0x10,0x10,0x7C,0x38,0x10,0x7C,0x00,0x00,0x00}, // 0x17
+{0x10,0x38,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x18
+{0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x38,0x10,0x00,0x00,0x00}, // 0x19
+{0x00,0x00,0x00,0x10,0x30,0x7E,0x30,0x10,0x00,0x00,0x00,0x00}, // 0x1A
+{0x00,0x00,0x00,0x08,0x0C,0x7E,0x0C,0x08,0x00,0x00,0x00,0x00}, // 0x1B
+{0x00,0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0x1C
+{0x00,0x00,0x00,0x28,0x6C,0xFE,0x6C,0x28,0x00,0x00,0x00,0x00}, // 0x1D
+{0x10,0x10,0x38,0x38,0x7C,0x7C,0xFE,0xFE,0x00,0x00,0x00,0x00}, // 0x1E
+{0x00,0xFE,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x10,0x00,0x00,0x00}, // 0x1F
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
+{0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00}, // 0x21
+{0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x22
+{0x00,0x28,0x28,0x7C,0x28,0x28,0x7C,0x28,0x28,0x00,0x00,0x00}, // 0x23
+{0x10,0x38,0x4C,0x0C,0x38,0x60,0x64,0x38,0x10,0x10,0x00,0x00}, // 0x24
+{0xC8,0xD4,0xD4,0x68,0x30,0x58,0xAC,0xAC,0x4C,0x00,0x00,0x00}, // 0x25
+{0x38,0x6C,0x6C,0x38,0xB8,0xEC,0x6C,0x6C,0xD8,0x00,0x00,0x00}, // 0x26
+{0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x27
+{0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00}, // 0x28
+{0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00}, // 0x29
+{0x00,0x00,0x6C,0x38,0xFE,0x38,0x6C,0x00,0x00,0x00,0x00,0x00}, // 0x2A
+{0x00,0x00,0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0x00,0x00,0x00}, // 0x2B
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x30,0x18,0x00}, // 0x2C
+{0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2D
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x00}, // 0x2E
+{0x60,0x60,0x30,0x30,0x18,0x18,0x0C,0x0C,0x06,0x00,0x00,0x00}, // 0x2F
+{0x78,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x3C,0x00,0x00,0x00}, // 0x30
+{0x30,0x38,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x00}, // 0x31
+{0x38,0x6C,0x6C,0x60,0x30,0x30,0x18,0x0C,0x7C,0x00,0x00,0x00}, // 0x32
+{0x38,0x6C,0x60,0x60,0x38,0x60,0x60,0x6C,0x38,0x00,0x00,0x00}, // 0x33
+{0x18,0x18,0x18,0x6C,0x6C,0x6C,0xFC,0x60,0x60,0x00,0x00,0x00}, // 0x34
+{0x7C,0x0C,0x0C,0x0C,0x3C,0x60,0x60,0x6C,0x38,0x00,0x00,0x00}, // 0x35
+{0x30,0x18,0x18,0x0C,0x3C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x36
+{0x7C,0x60,0x60,0x30,0x30,0x30,0x18,0x18,0x18,0x00,0x00,0x00}, // 0x37
+{0x38,0x6C,0x6C,0x6C,0x38,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x38
+{0x38,0x6C,0x6C,0x6C,0x78,0x30,0x30,0x18,0x0C,0x00,0x00,0x00}, // 0x39
+{0x00,0x00,0x38,0x38,0x00,0x00,0x00,0x38,0x38,0x00,0x00,0x00}, // 0x3A
+{0x00,0x00,0x38,0x38,0x00,0x00,0x00,0x38,0x38,0x30,0x18,0x00}, // 0x3B
+{0x40,0x60,0x30,0x18,0x0C,0x18,0x30,0x60,0x40,0x00,0x00,0x00}, // 0x3C
+{0x00,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00}, // 0x3D
+{0x04,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x04,0x00,0x00,0x00}, // 0x3E
+{0x38,0x6C,0x6C,0x60,0x30,0x18,0x00,0x18,0x18,0x00,0x00,0x00}, // 0x3F
+{0x70,0x98,0xCC,0xAC,0xAC,0xAC,0x4C,0x18,0xF0,0x00,0x00,0x00}, // 0x40
+{0x10,0x38,0x6C,0x6C,0x6C,0x7C,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x41
+{0x3C,0x6C,0x6C,0x6C,0x3C,0x6C,0x6C,0x6C,0x3C,0x00,0x00,0x00}, // 0x42
+{0x38,0x6C,0x6C,0x0C,0x0C,0x0C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x43
+{0x3C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x3C,0x00,0x00,0x00}, // 0x44
+{0x7C,0x0C,0x0C,0x0C,0x3C,0x0C,0x0C,0x0C,0x7C,0x00,0x00,0x00}, // 0x45
+{0x7C,0x0C,0x0C,0x0C,0x3C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00}, // 0x46
+{0x38,0x6C,0x0C,0x0C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x47
+{0x6C,0x6C,0x6C,0x6C,0x7C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x48
+{0x78,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00}, // 0x49
+{0x60,0x60,0x60,0x60,0x60,0x60,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x4A
+{0x6C,0x6C,0x6C,0x3C,0x1C,0x3C,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x4B
+{0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x7C,0x00,0x00,0x00}, // 0x4C
+{0xC6,0xC6,0xEE,0xEE,0xFE,0xD6,0xD6,0xC6,0xC6,0x00,0x00,0x00}, // 0x4D
+{0xCC,0xCC,0xDC,0xDC,0xFC,0xEC,0xCC,0xCC,0xCC,0x00,0x00,0x00}, // 0x4E
+{0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x4F
+{0x3C,0x6C,0x6C,0x6C,0x3C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00}, // 0x50
+{0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x30,0x60,0x00}, // 0x51
+{0x3C,0x6C,0x6C,0x6C,0x3C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x52
+{0x38,0x6C,0x4C,0x1C,0x38,0x70,0x64,0x6C,0x38,0x00,0x00,0x00}, // 0x53
+{0xFC,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x00}, // 0x54
+{0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x55
+{0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x10,0x00,0x00,0x00}, // 0x56
+{0xC6,0xC6,0xD6,0xD6,0xD6,0xD6,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x57
+{0x6C,0x6C,0x6C,0x38,0x10,0x38,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x58
+{0xCC,0xCC,0xCC,0xCC,0x78,0x30,0x30,0x30,0x30,0x00,0x00,0x00}, // 0x59
+{0x7C,0x60,0x30,0x30,0x18,0x18,0x0C,0x0C,0x7C,0x00,0x00,0x00}, // 0x5A
+{0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x00}, // 0x5B
+{0x0C,0x0C,0x18,0x18,0x30,0x30,0x60,0x60,0xC0,0x00,0x00,0x00}, // 0x5C
+{0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00}, // 0x5D
+{0x10,0x38,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x5E
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00}, // 0x5F
+{0x18,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x60
+{0x00,0x00,0x00,0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x61
+{0x0C,0x0C,0x0C,0x3C,0x6C,0x6C,0x6C,0x6C,0x3C,0x00,0x00,0x00}, // 0x62
+{0x00,0x00,0x00,0x38,0x6C,0x0C,0x0C,0x6C,0x38,0x00,0x00,0x00}, // 0x63
+{0x60,0x60,0x60,0x78,0x6C,0x6C,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x64
+{0x00,0x00,0x00,0x38,0x6C,0x7C,0x0C,0x4C,0x38,0x00,0x00,0x00}, // 0x65
+{0x70,0x18,0x18,0x7C,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00}, // 0x66
+{0x00,0x00,0x00,0x78,0x6C,0x6C,0x6C,0x78,0x60,0x64,0x38,0x00}, // 0x67
+{0x0C,0x0C,0x0C,0x3C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x68
+{0x30,0x00,0x00,0x38,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00}, // 0x69
+{0x30,0x00,0x00,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x1C,0x00}, // 0x6A
+{0x0C,0x0C,0x0C,0x6C,0x3C,0x1C,0x3C,0x6C,0x6C,0x00,0x00,0x00}, // 0x6B
+{0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00}, // 0x6C
+{0x00,0x00,0x00,0x6E,0xFE,0xD6,0xD6,0xD6,0xC6,0x00,0x00,0x00}, // 0x6D
+{0x00,0x00,0x00,0x3C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0x6E
+{0x00,0x00,0x00,0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x6F
+{0x00,0x00,0x00,0x3C,0x6C,0x6C,0x6C,0x6C,0x3C,0x0C,0x0C,0x00}, // 0x70
+{0x00,0x00,0x00,0x78,0x6C,0x6C,0x6C,0x6C,0x78,0x60,0x60,0x00}, // 0x71
+{0x00,0x00,0x00,0x6C,0x7C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00}, // 0x72
+{0x00,0x00,0x00,0x78,0x0C,0x3C,0x78,0x60,0x3C,0x00,0x00,0x00}, // 0x73
+{0x00,0x18,0x18,0x3C,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00}, // 0x74
+{0x00,0x00,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x75
+{0x00,0x00,0x00,0x6C,0x6C,0x6C,0x6C,0x38,0x10,0x00,0x00,0x00}, // 0x76
+{0x00,0x00,0x00,0xC6,0xD6,0xD6,0xD6,0x7C,0x6C,0x00,0x00,0x00}, // 0x77
+{0x00,0x00,0x00,0x6C,0x6C,0x38,0x38,0x6C,0x6C,0x00,0x00,0x00}, // 0x78
+{0x00,0x00,0x00,0x6C,0x6C,0x6C,0x6C,0x38,0x30,0x18,0x0C,0x00}, // 0x79
+{0x00,0x00,0x00,0x7C,0x60,0x30,0x18,0x0C,0x7C,0x00,0x00,0x00}, // 0x7A
+{0x70,0x18,0x18,0x18,0x0C,0x18,0x18,0x18,0x70,0x00,0x00,0x00}, // 0x7B
+{0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00}, // 0x7C
+{0x0C,0x18,0x18,0x18,0x30,0x18,0x18,0x18,0x0C,0x00,0x00,0x00}, // 0x7D
+{0x58,0x7C,0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x7E
+{0x00,0x00,0x10,0x38,0x6C,0x44,0x44,0x7C,0x7C,0x00,0x00,0x00}, // 0x7F
+{0x38,0x6C,0x6C,0x0C,0x0C,0x0C,0x6C,0x6C,0x38,0x10,0x20,0x18}, // 0x80
+{0x6C,0x6C,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x81
+{0x70,0x18,0x00,0x38,0x6C,0x7C,0x0C,0x4C,0x38,0x00,0x00,0x00}, // 0x82
+{0x38,0x6C,0x00,0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x83
+{0x6C,0x6C,0x00,0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x84
+{0x1C,0x30,0x00,0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x85
+{0x18,0x24,0x18,0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x86
+{0x00,0x00,0x00,0x38,0x6C,0x0C,0x0C,0x6C,0x38,0x10,0x20,0x18}, // 0x87
+{0x38,0x6C,0x00,0x38,0x6C,0x7C,0x0C,0x4C,0x38,0x00,0x00,0x00}, // 0x88
+{0x6C,0x6C,0x00,0x38,0x6C,0x7C,0x0C,0x4C,0x38,0x00,0x00,0x00}, // 0x89
+{0x1C,0x30,0x00,0x38,0x6C,0x7C,0x0C,0x4C,0x38,0x00,0x00,0x00}, // 0x8A
+{0x6C,0x6C,0x00,0x38,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00}, // 0x8B
+{0x38,0x6C,0x00,0x1C,0x18,0x18,0x18,0x18,0x7C,0x00,0x00,0x00}, // 0x8C
+{0x1C,0x30,0x00,0x38,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00}, // 0x8D
+{0x6C,0x6C,0x10,0x38,0x6C,0x6C,0x7C,0x6C,0x6C,0x00,0x00,0x00}, // 0x8E
+{0x10,0x28,0x10,0x38,0x6C,0x6C,0x7C,0x6C,0x6C,0x00,0x00,0x00}, // 0x8F
+{0x70,0x18,0x00,0x7C,0x0C,0x3C,0x0C,0x0C,0x7C,0x00,0x00,0x00}, // 0x90
+{0x00,0x00,0x00,0x7C,0xB0,0xB8,0xF4,0x34,0xD8,0x00,0x00,0x00}, // 0x91
+{0xF8,0x3C,0x34,0x34,0xF4,0x3C,0x34,0x34,0xF4,0x00,0x00,0x00}, // 0x92
+{0x38,0x6C,0x00,0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x93
+{0x6C,0x6C,0x00,0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x94
+{0x1C,0x30,0x00,0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x95
+{0x38,0x6C,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x96
+{0x1C,0x30,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0x97
+{0x6C,0x6C,0x00,0x6C,0x6C,0x6C,0x6C,0x38,0x30,0x18,0x0C,0x00}, // 0x98
+{0x6C,0x00,0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x99
+{0x6C,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0x9A
+{0x00,0x00,0x40,0x78,0x6C,0x7C,0x7C,0x6C,0x3C,0x04,0x00,0x00}, // 0x9B
+{0x38,0x6C,0x0C,0x0C,0x3E,0x0C,0x0C,0x06,0x7E,0x00,0x00,0x00}, // 0x9C
+{0x40,0x78,0x6C,0x6C,0x7C,0x7C,0x6C,0x6C,0x3C,0x04,0x00,0x00}, // 0x9D
+{0x00,0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00,0x00,0x00,0x00}, // 0x9E
+{0x70,0x18,0x18,0x7C,0x18,0x18,0x18,0x18,0x18,0x0C,0x00,0x00}, // 0x9F
+{0x70,0x18,0x00,0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0xA0
+{0x70,0x18,0x00,0x38,0x30,0x30,0x30,0x30,0x78,0x00,0x00,0x00}, // 0xA1
+{0x70,0x18,0x00,0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xA2
+{0x70,0x18,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0xA3
+{0x58,0x34,0x00,0x3C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00}, // 0xA4
+{0x58,0x34,0x00,0xCC,0xDC,0xFC,0xEC,0xCC,0xCC,0x00,0x00,0x00}, // 0xA5
+{0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x7C,0x00,0x00,0x00,0x00}, // 0xA6
+{0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,0x00,0x00}, // 0xA7
+{0x30,0x30,0x00,0x30,0x18,0x0C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xA8
+{0x38,0x44,0x9A,0xAA,0x9A,0xAA,0xAA,0x44,0x38,0x00,0x00,0x00}, // 0xA9
+{0x00,0x00,0x00,0x00,0x7C,0x40,0x40,0x40,0x40,0x00,0x00,0x00}, // 0xAA
+{0x08,0x0C,0x48,0x28,0x70,0x88,0x44,0x60,0xE0,0x00,0x00,0x00}, // 0xAB
+{0x08,0x0C,0x48,0x28,0x90,0xC8,0xA4,0xF0,0x80,0x00,0x00,0x00}, // 0xAC
+{0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00}, // 0xAD
+{0x00,0x00,0xD8,0x6C,0x36,0x36,0x6C,0xD8,0x00,0x00,0x00,0x00}, // 0xAE
+{0x00,0x00,0x36,0x6C,0xD8,0xD8,0x6C,0x36,0x00,0x00,0x00,0x00}, // 0xAF
+{0x48,0x00,0x12,0x00,0x48,0x00,0x12,0x00,0x48,0x00,0x12,0x00}, // 0xB0
+{0x48,0x12,0x48,0x12,0x48,0x12,0x48,0x12,0x48,0x12,0x48,0x12}, // 0xB1
+{0xAC,0x52,0xAC,0x52,0xAC,0x52,0xAC,0x52,0xAC,0x52,0xAC,0x52}, // 0xB2
+{0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xB3
+{0x10,0x10,0x10,0x10,0x10,0x1E,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xB4
+{0x70,0x18,0x10,0x38,0x6C,0x6C,0x7C,0x6C,0x6C,0x00,0x00,0x00}, // 0xB5
+{0x38,0x6C,0x10,0x38,0x6C,0x6C,0x7C,0x6C,0x6C,0x00,0x00,0x00}, // 0xB6
+{0x1C,0x30,0x10,0x38,0x6C,0x6C,0x7C,0x6C,0x6C,0x00,0x00,0x00}, // 0xB7
+{0x38,0x44,0x92,0xAA,0x8A,0xAA,0x92,0x44,0x38,0x00,0x00,0x00}, // 0xB8
+{0x28,0x28,0x28,0x28,0x2E,0x20,0x2E,0x28,0x28,0x28,0x28,0x28}, // 0xB9
+{0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28}, // 0xBA
+{0x00,0x00,0x00,0x00,0x3E,0x20,0x2E,0x28,0x28,0x28,0x28,0x28}, // 0xBB
+{0x28,0x28,0x28,0x28,0x2E,0x20,0x3E,0x00,0x00,0x00,0x00,0x00}, // 0xBC
+{0x20,0x20,0x78,0x0C,0x0C,0x0C,0x78,0x20,0x20,0x00,0x00,0x00}, // 0xBD
+{0xCC,0xCC,0xCC,0x78,0x30,0xFC,0x30,0xFC,0x30,0x00,0x00,0x00}, // 0xBE
+{0x00,0x00,0x00,0x00,0x00,0x1E,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xBF
+{0x10,0x10,0x10,0x10,0x10,0xF0,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xC0
+{0x10,0x10,0x10,0x10,0x10,0xFE,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xC1
+{0x00,0x00,0x00,0x00,0x00,0xFE,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xC2
+{0x10,0x10,0x10,0x10,0x10,0xF0,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xC3
+{0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xC4
+{0x10,0x10,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xC5
+{0x58,0x34,0x00,0x38,0x60,0x78,0x6C,0x6C,0x78,0x00,0x00,0x00}, // 0xC6
+{0x58,0x34,0x10,0x38,0x6C,0x6C,0x7C,0x6C,0x6C,0x00,0x00,0x00}, // 0xC7
+{0x28,0x28,0x28,0x28,0xE8,0x08,0xF8,0x00,0x00,0x00,0x00,0x00}, // 0xC8
+{0x00,0x00,0x00,0x00,0xF8,0x08,0xE8,0x28,0x28,0x28,0x28,0x28}, // 0xC9
+{0x28,0x28,0x28,0x28,0xEE,0x00,0xFE,0x00,0x00,0x00,0x00,0x00}, // 0xCA
+{0x00,0x00,0x00,0x00,0xFE,0x00,0xEE,0x28,0x28,0x28,0x28,0x28}, // 0xCB
+{0x28,0x28,0x28,0x28,0xE8,0x08,0xE8,0x28,0x28,0x28,0x28,0x28}, // 0xCC
+{0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x00,0x00,0x00,0x00,0x00}, // 0xCD
+{0x28,0x28,0x28,0x28,0xEE,0x00,0xEE,0x28,0x28,0x28,0x28,0x28}, // 0xCE
+{0x00,0x00,0x5A,0x24,0x42,0x42,0x42,0x24,0x5A,0x00,0x00,0x00}, // 0xCF
+{0x78,0x0C,0x18,0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xD0
+{0x3C,0x6C,0x6C,0x6C,0x7E,0x6C,0x6C,0x6C,0x3C,0x00,0x00,0x00}, // 0xD1
+{0x38,0x6C,0x00,0x7C,0x0C,0x3C,0x0C,0x0C,0x7C,0x00,0x00,0x00}, // 0xD2
+{0x6C,0x6C,0x00,0x7C,0x0C,0x3C,0x0C,0x0C,0x7C,0x00,0x00,0x00}, // 0xD3
+{0x1C,0x30,0x00,0x7C,0x0C,0x3C,0x0C,0x0C,0x7C,0x00,0x00,0x00}, // 0xD4
+{0x00,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xD5
+{0x70,0x18,0x00,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00}, // 0xD6
+{0x1C,0x36,0x00,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00}, // 0xD7
+{0x6C,0x6C,0x00,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00}, // 0xD8
+{0x10,0x10,0x10,0x10,0x10,0x1E,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xD9
+{0x00,0x00,0x00,0x00,0x00,0xF0,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xDA
+{0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE}, // 0xDB
+{0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE}, // 0xDC
+{0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00}, // 0xDD
+{0x0E,0x18,0x00,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00}, // 0xDE
+{0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xDF
+{0x38,0x0C,0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xE0
+{0x38,0x6C,0x6C,0x6C,0x3C,0x6C,0x6C,0x6C,0x3C,0x0C,0x00,0x00}, // 0xE1
+{0x38,0x6C,0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xE2
+{0x38,0x60,0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xE3
+{0x58,0x34,0x00,0x38,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xE4
+{0x58,0x34,0x38,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xE5
+{0x00,0x00,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0xDC,0x0C,0x0C,0x00}, // 0xE6
+{0x00,0x1E,0x0C,0x3C,0x6C,0x6C,0x3C,0x0C,0x1E,0x00,0x00,0x00}, // 0xE7
+{0x1E,0x0C,0x3C,0x6C,0x6C,0x6C,0x3C,0x0C,0x1E,0x00,0x00,0x00}, // 0xE8
+{0x70,0x18,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xE9
+{0x38,0x6C,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xEA
+{0x1C,0x30,0x00,0x6C,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00}, // 0xEB
+{0x70,0x18,0x00,0x6C,0x6C,0x6C,0x6C,0x38,0x30,0x18,0x0C,0x00}, // 0xEC
+{0x70,0x18,0xCC,0xCC,0xCC,0x78,0x30,0x30,0x30,0x00,0x00,0x00}, // 0xED
+{0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEE
+{0x70,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEF
+{0x00,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF0
+{0x00,0x00,0x30,0x30,0xFC,0x30,0x30,0x00,0xFC,0x00,0x00,0x00}, // 0xF1
+{0x00,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00}, // 0xF2
+{0x1C,0x0C,0x58,0x2C,0x90,0xC8,0xA4,0xF0,0x80,0x00,0x00,0x00}, // 0xF3
+{0xF8,0xAC,0xAC,0xAC,0xB8,0xA0,0xA0,0xA0,0xA0,0x00,0x00,0x00}, // 0xF4
+{0x78,0x6C,0x0C,0x3C,0x28,0x78,0x60,0x6C,0x3C,0x00,0x00,0x00}, // 0xF5
+{0x00,0x00,0x30,0x30,0x00,0xFC,0x00,0x30,0x30,0x00,0x00,0x00}, // 0xF6
+{0x00,0x00,0x00,0x00,0x00,0x68,0x70,0x00,0x00,0x00,0x00,0x00}, // 0xF7
+{0x38,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF8
+{0x00,0x00,0x00,0x00,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF9
+{0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFA
+{0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFB
+{0x1C,0x30,0x18,0x30,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFC
+{0x1C,0x30,0x18,0x0C,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFD
+{0x00,0x00,0x00,0x78,0x78,0x78,0x78,0x00,0x00,0x00,0x00,0x00}, // 0xFE
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} // 0xFF
+};
View
258 font10.h
@@ -0,0 +1,258 @@
+const char font[256][12]={
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x00
+{0x00,0x00,0x00,0x38,0xC6,0xAA,0xFE,0xC6,0x38,0x00,0x00,0x00}, // 0x01
+{0x00,0x00,0x00,0x38,0xFE,0xD6,0xFE,0xC6,0x38,0x00,0x00,0x00}, // 0x02
+{0x00,0x6C,0xFE,0xFE,0xFE,0x7C,0x7C,0x38,0x10,0x00,0x00,0x00}, // 0x03
+{0x00,0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x10,0x00,0x00,0x00}, // 0x04
+{0x00,0x38,0x38,0x38,0xFE,0xFE,0xFE,0x30,0x30,0x00,0x00,0x00}, // 0x05
+{0x00,0x10,0x38,0x7C,0xFE,0xFE,0xFE,0x30,0x30,0x00,0x00,0x00}, // 0x06
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x07
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x08
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x09
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0A
+{0x00,0x60,0xC0,0x3C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0x0B
+{0x00,0x3C,0x42,0x42,0x42,0x3C,0x10,0x38,0x10,0x00,0x00,0x00}, // 0x0C
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x0D
+{0x00,0x40,0x70,0x58,0x48,0x48,0x48,0x78,0x38,0x0E,0x06,0x00}, // 0x0E
+{0x00,0x00,0x10,0x7C,0x44,0xC6,0x44,0x7C,0x10,0x00,0x00,0x00}, // 0x0F
+{0x00,0x00,0x02,0x0E,0x3E,0xFE,0x3E,0x0E,0x02,0x00,0x00,0x00}, // 0x10
+{0x00,0x00,0x80,0xE0,0xF8,0xFE,0xF8,0xE0,0x80,0x00,0x00,0x00}, // 0x11
+{0x00,0x10,0x10,0x38,0x10,0x10,0x10,0x10,0x10,0x38,0x10,0x00}, // 0x12
+{0x00,0x24,0x24,0x24,0x24,0x24,0x24,0x00,0x24,0x00,0x00,0x00}, // 0x13
+{0x00,0x7C,0x5C,0x5C,0x58,0x50,0x50,0x50,0x50,0x50,0x50,0x00}, // 0x14
+{0x00,0x78,0x04,0x0C,0x38,0x44,0x4C,0x38,0x40,0x40,0x3C,0x00}, // 0x15
+{0x00,0x00,0x00,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x16
+{0x10,0x10,0x38,0x10,0x10,0x10,0x10,0x38,0x10,0x00,0x38,0x00}, // 0x17
+{0x00,0x10,0x10,0x38,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00}, // 0x18
+{0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x38,0x10,0x00}, // 0x19
+{0x00,0x00,0x00,0x00,0x10,0x7C,0x10,0x00,0x00,0x00,0x00,0x00}, // 0x1A
+{0x00,0x00,0x00,0x00,0x08,0x7C,0x08,0x00,0x00,0x00,0x00,0x00}, // 0x1B
+{0x00,0x00,0x00,0x04,0x04,0x04,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0x1C
+{0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x1D
+{0x00,0x00,0x10,0x10,0x38,0x38,0x7C,0x7C,0xFE,0x00,0x00,0x00}, // 0x1E
+{0x00,0x00,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x10,0x00,0x00,0x00}, // 0x1F
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x20
+{0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x10,0x00,0x00,0x00}, // 0x21
+{0x24,0x24,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x22
+{0x00,0x50,0x50,0xFC,0x28,0x28,0x7E,0x14,0x14,0x00,0x00,0x00}, // 0x23
+{0x10,0x78,0x14,0x14,0x18,0x30,0x50,0x50,0x3C,0x10,0x00,0x00}, // 0x24
+{0x00,0x8C,0x52,0x32,0x1C,0x70,0x98,0x94,0x62,0x00,0x00,0x00}, // 0x25
+{0x00,0x70,0x48,0x68,0x18,0x96,0xA2,0x66,0xFC,0x00,0x00,0x00}, // 0x26
+{0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x27
+{0x60,0x30,0x10,0x08,0x08,0x08,0x08,0x08,0x10,0x30,0x60,0x00}, // 0x28
+{0x04,0x18,0x10,0x20,0x20,0x20,0x20,0x20,0x10,0x18,0x0C,0x00}, // 0x29
+{0x00,0x10,0x6C,0x18,0x28,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2A
+{0x00,0x00,0x00,0x10,0x10,0xFE,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x2B
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x10,0x08,0x00}, // 0x2C
+{0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x2D
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00}, // 0x2E
+{0x80,0x40,0x40,0x20,0x20,0x10,0x08,0x08,0x04,0x04,0x02,0x00}, // 0x2F
+{0x00,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,0x00}, // 0x30
+{0x00,0x10,0x1C,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00}, // 0x31
+{0x00,0x3C,0x40,0x40,0x60,0x10,0x08,0x04,0x7C,0x00,0x00,0x00}, // 0x32
+{0x00,0x3C,0x20,0x20,0x18,0x20,0x20,0x20,0x1C,0x00,0x00,0x00}, // 0x33
+{0x00,0x20,0x30,0x28,0x24,0x22,0x7E,0x20,0x20,0x00,0x00,0x00}, // 0x34
+{0x00,0x3C,0x04,0x04,0x1C,0x20,0x20,0x20,0x1C,0x00,0x00,0x00}, // 0x35
+{0x00,0x70,0x08,0x04,0x34,0x4C,0x44,0x44,0x38,0x00,0x00,0x00}, // 0x36
+{0x00,0x7C,0x40,0x20,0x10,0x08,0x08,0x04,0x04,0x00,0x00,0x00}, // 0x37
+{0x00,0x38,0x44,0x44,0x38,0x24,0x44,0x44,0x38,0x00,0x00,0x00}, // 0x38
+{0x00,0x38,0x44,0x44,0x44,0x78,0x40,0x20,0x1C,0x00,0x00,0x00}, // 0x39
+{0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x30,0x30,0x00,0x00,0x00}, // 0x3A
+{0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x10,0x08,0x00}, // 0x3B
+{0x00,0x00,0x00,0x40,0x30,0x08,0x08,0x30,0x40,0x00,0x00,0x00}, // 0x3C
+{0x00,0x00,0x00,0x00,0x7C,0x00,0x7C,0x00,0x00,0x00,0x00,0x00}, // 0x3D
+{0x00,0x00,0x00,0x04,0x18,0x20,0x20,0x18,0x04,0x00,0x00,0x00}, // 0x3E
+{0x00,0x3C,0x44,0x40,0x20,0x10,0x10,0x00,0x10,0x00,0x00,0x00}, // 0x3F
+{0x00,0x38,0x44,0x72,0x4A,0x6A,0xDA,0x04,0x38,0x00,0x00,0x00}, // 0x40
+{0x00,0x10,0x28,0x28,0x28,0x44,0x7C,0x44,0x82,0x00,0x00,0x00}, // 0x41
+{0x00,0x3C,0x44,0x44,0x3C,0x44,0x44,0x44,0x3C,0x00,0x00,0x00}, // 0x42
+{0x00,0x78,0x04,0x02,0x02,0x02,0x02,0x04,0x78,0x00,0x00,0x00}, // 0x43
+{0x00,0x1E,0x22,0x42,0x42,0x42,0x42,0x22,0x1E,0x00,0x00,0x00}, // 0x44
+{0x00,0x7C,0x04,0x04,0x04,0x3C,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0x45
+{0x00,0x7C,0x04,0x04,0x04,0x3C,0x04,0x04,0x04,0x00,0x00,0x00}, // 0x46
+{0x00,0x78,0x04,0x02,0x02,0x72,0x42,0x44,0x78,0x00,0x00,0x00}, // 0x47
+{0x00,0x44,0x44,0x44,0x7C,0x44,0x44,0x44,0x44,0x00,0x00,0x00}, // 0x48
+{0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00}, // 0x49
+{0x00,0x3C,0x20,0x20,0x20,0x20,0x20,0x20,0x1E,0x00,0x00,0x00}, // 0x4A
+{0x00,0x44,0x24,0x14,0x0C,0x0C,0x14,0x24,0x44,0x00,0x00,0x00}, // 0x4B
+{0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0x4C
+{0x00,0x66,0x66,0x56,0x5A,0x5A,0x4A,0x42,0x42,0x00,0x00,0x00}, // 0x4D
+{0x00,0x44,0x4C,0x4C,0x54,0x54,0x64,0x64,0x44,0x00,0x00,0x00}, // 0x4E
+{0x00,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,0x00}, // 0x4F
+{0x00,0x3C,0x44,0x44,0x44,0x3C,0x04,0x04,0x04,0x00,0x00,0x00}, // 0x50
+{0x00,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x38,0x20,0xC0,0x00}, // 0x51
+{0x00,0x3C,0x44,0x44,0x24,0x1C,0x14,0x24,0x44,0x00,0x00,0x00}, // 0x52
+{0x00,0x78,0x04,0x04,0x18,0x20,0x40,0x40,0x3C,0x00,0x00,0x00}, // 0x53
+{0x00,0xFE,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x54
+{0x00,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00}, // 0x55
+{0x00,0x82,0x44,0x44,0x44,0x28,0x28,0x38,0x10,0x00,0x00,0x00}, // 0x56
+{0x00,0x82,0x82,0x92,0x92,0xAC,0x6C,0x6C,0x44,0x00,0x00,0x00}, // 0x57
+{0x00,0x82,0x44,0x28,0x10,0x10,0x28,0x44,0x82,0x00,0x00,0x00}, // 0x58
+{0x00,0x82,0x44,0x28,0x28,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x59
+{0x00,0x7E,0x40,0x20,0x10,0x08,0x04,0x02,0x7E,0x00,0x00,0x00}, // 0x5A
+{0xF0,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0xF0,0x00}, // 0x5B
+{0x02,0x04,0x04,0x08,0x08,0x10,0x20,0x20,0x40,0x40,0x80,0x00}, // 0x5C
+{0x3C,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3C,0x00}, // 0x5D
+{0x10,0x10,0x18,0x28,0x28,0x24,0x44,0x00,0x00,0x00,0x00,0x00}, // 0x5E
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00}, // 0x5F
+{0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0x60
+{0x00,0x00,0x00,0x38,0x40,0x78,0x44,0x44,0xF8,0x00,0x00,0x00}, // 0x61
+{0x04,0x04,0x04,0x34,0x4C,0x44,0x44,0x44,0x3C,0x00,0x00,0x00}, // 0x62
+{0x00,0x00,0x00,0x78,0x04,0x04,0x04,0x04,0x78,0x00,0x00,0x00}, // 0x63
+{0x40,0x40,0x40,0x78,0x44,0x44,0x44,0x64,0x58,0x00,0x00,0x00}, // 0x64
+{0x00,0x00,0x00,0x38,0x44,0x7C,0x04,0x04,0x78,0x00,0x00,0x00}, // 0x65
+{0x70,0x08,0x08,0x7E,0x08,0x08,0x08,0x08,0x08,0x00,0x00,0x00}, // 0x66
+{0x00,0x00,0x00,0x78,0x44,0x44,0x44,0x44,0x78,0x40,0x38,0x00}, // 0x67
+{0x04,0x04,0x04,0x74,0x4C,0x44,0x44,0x44,0x44,0x00,0x00,0x00}, // 0x68
+{0x10,0x00,0x00,0x1C,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x69
+{0x20,0x00,0x00,0x3C,0x20,0x20,0x20,0x20,0x20,0x20,0x1C,0x00}, // 0x6A
+{0x04,0x04,0x04,0x44,0x24,0x1C,0x14,0x24,0x44,0x00,0x00,0x00}, // 0x6B
+{0x1C,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x6C
+{0x00,0x00,0x00,0xDA,0xB6,0x92,0x92,0x92,0x92,0x00,0x00,0x00}, // 0x6D
+{0x00,0x00,0x00,0x74,0x4C,0x44,0x44,0x44,0x44,0x00,0x00,0x00}, // 0x6E
+{0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0x6F
+{0x00,0x00,0x00,0x34,0x4C,0x44,0x44,0x44,0x3C,0x04,0x04,0x00}, // 0x70
+{0x00,0x00,0x00,0x78,0x44,0x44,0x44,0x44,0x78,0x40,0x40,0x00}, // 0x71
+{0x00,0x00,0x00,0x74,0x4C,0x04,0x04,0x04,0x04,0x00,0x00,0x00}, // 0x72
+{0x00,0x00,0x00,0x78,0x04,0x1C,0x60,0x40,0x3C,0x00,0x00,0x00}, // 0x73
+{0x00,0x08,0x08,0x7E,0x08,0x08,0x08,0x08,0x70,0x00,0x00,0x00}, // 0x74
+{0x00,0x00,0x00,0x44,0x44,0x44,0x44,0x64,0x5C,0x00,0x00,0x00}, // 0x75
+{0x00,0x00,0x00,0x82,0x44,0x44,0x28,0x28,0x10,0x00,0x00,0x00}, // 0x76
+{0x00,0x00,0x00,0x82,0x92,0xAA,0xAA,0x6C,0x44,0x00,0x00,0x00}, // 0x77
+{0x00,0x00,0x00,0x42,0x24,0x18,0x18,0x24,0x42,0x00,0x00,0x00}, // 0x78
+{0x00,0x00,0x00,0x42,0x24,0x24,0x18,0x18,0x08,0x08,0x06,0x00}, // 0x79
+{0x00,0x00,0x00,0x7E,0x20,0x10,0x08,0x04,0x7E,0x00,0x00,0x00}, // 0x7A
+{0x70,0x10,0x10,0x10,0x10,0x0C,0x10,0x10,0x10,0x10,0x60,0x00}, // 0x7B
+{0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x00}, // 0x7C
+{0x0C,0x10,0x10,0x10,0x10,0x60,0x10,0x10,0x10,0x10,0x1C,0x00}, // 0x7D
+{0x00,0x00,0x00,0x00,0x00,0x9C,0x72,0x00,0x00,0x00,0x00,0x00}, // 0x7E
+{0x00,0x00,0x10,0x28,0x6C,0x44,0x44,0x44,0x7C,0x00,0x00,0x00}, // 0x7F
+{0x00,0x78,0x04,0x02,0x02,0x02,0x02,0x04,0x78,0x20,0x40,0x60}, // 0x80
+{0x00,0x28,0x00,0x44,0x44,0x44,0x44,0x64,0x5C,0x00,0x00,0x00}, // 0x81
+{0x20,0x10,0x00,0x38,0x44,0x7C,0x04,0x04,0x78,0x00,0x00,0x00}, // 0x82
+{0x30,0x48,0x00,0x38,0x40,0x78,0x44,0x44,0xF8,0x00,0x00,0x00}, // 0x83
+{0x00,0x28,0x00,0x38,0x40,0x78,0x44,0x44,0xF8,0x00,0x00,0x00}, // 0x84
+{0x08,0x10,0x00,0x38,0x40,0x78,0x44,0x44,0xF8,0x00,0x00,0x00}, // 0x85
+{0x10,0x28,0x10,0x38,0x40,0x78,0x44,0x44,0xF8,0x00,0x00,0x00}, // 0x86
+{0x00,0x00,0x00,0x78,0x04,0x04,0x04,0x04,0x78,0x10,0x20,0x30}, // 0x87
+{0x30,0x48,0x00,0x38,0x44,0x7C,0x04,0x04,0x78,0x00,0x00,0x00}, // 0x88
+{0x00,0x28,0x00,0x38,0x44,0x7C,0x04,0x04,0x78,0x00,0x00,0x00}, // 0x89
+{0x08,0x10,0x00,0x38,0x44,0x7C,0x04,0x04,0x78,0x00,0x00,0x00}, // 0x8A
+{0x00,0x28,0x00,0x1C,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x8B
+{0x30,0x48,0x00,0x1C,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x8C
+{0x08,0x10,0x00,0x1C,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0x8D
+{0x24,0x10,0x28,0x28,0x28,0x44,0x7C,0x44,0x82,0x00,0x00,0x00}, // 0x8E
+{0x38,0x10,0x28,0x28,0x28,0x44,0x7C,0x44,0x82,0x00,0x00,0x00}, // 0x8F
+{0x20,0x7C,0x04,0x04,0x04,0x3C,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0x90
+{0x00,0x00,0x00,0x6E,0x90,0xFC,0x12,0x12,0xEC,0x00,0x00,0x00}, // 0x91
+{0x00,0xF0,0x30,0x28,0x28,0x64,0x3C,0x24,0xE2,0x00,0x00,0x00}, // 0x92
+{0x30,0x48,0x00,0x3C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0x93
+{0x00,0x28,0x00,0x3C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0x94
+{0x08,0x10,0x00,0x3C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0x95
+{0x30,0x48,0x00,0x44,0x44,0x44,0x44,0x64,0x5C,0x00,0x00,0x00}, // 0x96
+{0x04,0x08,0x00,0x44,0x44,0x44,0x44,0x64,0x5C,0x00,0x00,0x00}, // 0x97
+{0x00,0x28,0x00,0x42,0x24,0x24,0x18,0x18,0x08,0x08,0x06,0x00}, // 0x98
+{0x24,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,0x00}, // 0x99
+{0x24,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00}, // 0x9A
+{0x00,0x00,0x00,0x7C,0x62,0x52,0x4A,0x46,0x3E,0x00,0x00,0x00}, // 0x9B
+{0x00,0x60,0x10,0x10,0x38,0x10,0x10,0x08,0x78,0x00,0x00,0x00}, // 0x9C
+{0x00,0x7C,0x24,0x62,0x52,0x4A,0x46,0x24,0x3E,0x00,0x00,0x00}, // 0x9D
+{0x00,0x00,0x00,0x42,0x24,0x18,0x18,0x24,0x42,0x00,0x00,0x00}, // 0x9E
+{0xE0,0x10,0x10,0x78,0x10,0x10,0x10,0x10,0x10,0x10,0x0E,0x00}, // 0x9F
+{0x20,0x10,0x00,0x38,0x40,0x78,0x44,0x44,0xF8,0x00,0x00,0x00}, // 0xA0
+{0x20,0x10,0x00,0x1C,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0xA1
+{0x20,0x10,0x00,0x3C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0xA2
+{0x20,0x10,0x00,0x44,0x44,0x44,0x44,0x64,0x5C,0x00,0x00,0x00}, // 0xA3
+{0x50,0x28,0x00,0x74,0x4C,0x44,0x44,0x44,0x44,0x00,0x00,0x00}, // 0xA4
+{0x50,0x6C,0x4C,0x4C,0x54,0x54,0x64,0x64,0x44,0x00,0x00,0x00}, // 0xA5
+{0x00,0x3C,0x20,0x38,0x24,0x7C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xA6
+{0x00,0x38,0x44,0x44,0x44,0x38,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xA7
+{0x00,0x00,0x00,0x10,0x00,0x10,0x10,0x08,0x04,0x44,0x78,0x00}, // 0xA8
+{0x00,0x3C,0x42,0x5A,0x5A,0x42,0x3C,0x00,0x00,0x00,0x00,0x00}, // 0xA9
+{0x00,0x00,0x00,0x00,0x7E,0x40,0x40,0x00,0x00,0x00,0x00,0x00}, // 0xAA
+{0x00,0x46,0x24,0x14,0xF4,0x88,0x48,0x24,0xE2,0x00,0x00,0x00}, // 0xAB
+{0x00,0x46,0x24,0x14,0x54,0x68,0x58,0xF4,0x42,0x00,0x00,0x00}, // 0xAC
+{0x00,0x00,0x00,0x10,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x00}, // 0xAD
+{0x00,0x00,0x00,0x50,0x28,0x14,0x28,0x50,0x00,0x00,0x00,0x00}, // 0xAE
+{0x00,0x00,0x00,0x14,0x28,0x50,0x28,0x14,0x00,0x00,0x00,0x00}, // 0xAF
+{0x4A,0x00,0x4A,0x00,0x00,0x4A,0x00,0x4A,0x00,0x00,0x4A,0x00}, // 0xB0
+{0xA4,0x4A,0xA4,0x00,0x4A,0xA4,0x4A,0xA4,0x4A,0x00,0xA4,0x4A}, // 0xB1
+{0xFE,0x4A,0xFE,0x4A,0x4A,0xFE,0x4A,0xFE,0x4A,0x4A,0xFE,0x4A}, // 0xB2
+{0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xB3
+{0x10,0x10,0x10,0x10,0x10,0x1E,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xB4
+{0x10,0x18,0x28,0x28,0x28,0x44,0x7C,0x44,0x82,0x00,0x00,0x00}, // 0xB5
+{0x18,0x34,0x28,0x28,0x28,0x44,0x7C,0x44,0x82,0x00,0x00,0x00}, // 0xB6
+{0x04,0x18,0x28,0x28,0x28,0x44,0x7C,0x44,0x82,0x00,0x00,0x00}, // 0xB7
+{0x00,0x38,0x44,0xB2,0x8A,0x8A,0xB2,0x44,0x38,0x00,0x00,0x00}, // 0xB8
+{0x28,0x28,0x28,0x28,0x2E,0x20,0x2E,0x28,0x28,0x28,0x28,0x28}, // 0xB9
+{0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28}, // 0xBA
+{0x00,0x00,0x00,0x00,0x3E,0x20,0x2E,0x28,0x28,0x28,0x28,0x28}, // 0xBB
+{0x28,0x28,0x28,0x28,0x2E,0x20,0x3E,0x00,0x00,0x00,0x00,0x00}, // 0xBC
+{0x00,0x20,0x78,0x2C,0x24,0x24,0x2C,0x78,0x20,0x00,0x00,0x00}, // 0xBD
+{0x00,0x82,0x44,0x28,0x10,0x7C,0x10,0x7C,0x10,0x00,0x00,0x00}, // 0xBE
+{0x00,0x00,0x00,0x00,0x00,0x1E,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xBF
+{0x10,0x10,0x10,0x10,0x10,0xF0,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xC0
+{0x10,0x10,0x10,0x10,0x10,0xFE,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xC1
+{0x00,0x00,0x00,0x00,0x00,0xFE,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xC2
+{0x10,0x10,0x10,0x10,0x10,0xF0,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xC3
+{0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xC4
+{0x10,0x10,0x10,0x10,0x10,0xFE,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xC5
+{0x50,0x28,0x00,0x38,0x40,0x78,0x44,0x44,0xF8,0x00,0x00,0x00}, // 0xC6
+{0x50,0x38,0x28,0x28,0x28,0x44,0x7C,0x44,0x82,0x00,0x00,0x00}, // 0xC7
+{0x28,0x28,0x28,0x28,0xE8,0x08,0xF8,0x00,0x00,0x00,0x00,0x00}, // 0xC8
+{0x00,0x00,0x00,0x00,0xF8,0x08,0xE8,0x28,0x28,0x28,0x28,0x28}, // 0xC9
+{0x28,0x28,0x28,0x28,0xEE,0x00,0xFE,0x00,0x00,0x00,0x00,0x00}, // 0xCA
+{0x00,0x00,0x00,0x00,0xFE,0x00,0xEE,0x28,0x28,0x28,0x28,0x28}, // 0xCB
+{0x28,0x28,0x28,0x28,0xE8,0x08,0xE8,0x28,0x28,0x28,0x28,0x28}, // 0xCC
+{0x00,0x00,0x00,0x00,0xFE,0x00,0xFE,0x00,0x00,0x00,0x00,0x00}, // 0xCD
+{0x28,0x28,0x28,0x28,0xEE,0x00,0xEE,0x28,0x28,0x28,0x28,0x28}, // 0xCE
+{0x00,0x82,0x7C,0x44,0x44,0x44,0x7C,0x82,0x00,0x00,0x00,0x00}, // 0xCF
+{0x16,0x18,0x34,0x7C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0xD0
+{0x00,0x1E,0x22,0x42,0x46,0x42,0x42,0x22,0x1E,0x00,0x00,0x00}, // 0xD1
+{0x18,0x7C,0x04,0x04,0x04,0x3C,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0xD2
+{0x24,0x7C,0x04,0x04,0x04,0x3C,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0xD3
+{0x08,0x7C,0x04,0x04,0x04,0x3C,0x04,0x04,0x7C,0x00,0x00,0x00}, // 0xD4
+{0x00,0x00,0x00,0x1C,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0xD5
+{0x20,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00}, // 0xD6
+{0x18,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00}, // 0xD7
+{0x24,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00}, // 0xD8
+{0x10,0x10,0x10,0x10,0x10,0x1E,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xD9
+{0x00,0x00,0x00,0x00,0x00,0xF0,0x10,0x10,0x10,0x10,0x10,0x10}, // 0xDA
+{0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE}, // 0xDB
+{0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE}, // 0xDC
+{0x10,0x10,0x10,0x10,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x00}, // 0xDD
+{0x08,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00,0x00}, // 0xDE
+{0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xDF
+{0x20,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,0x00}, // 0xE0
+{0x3C,0x24,0x24,0x14,0x14,0x24,0x44,0x84,0x74,0x00,0x00,0x00}, // 0xE1
+{0x18,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,0x00}, // 0xE2
+{0x08,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,0x00}, // 0xE3
+{0x50,0x28,0x00,0x3C,0x42,0x42,0x42,0x42,0x3C,0x00,0x00,0x00}, // 0xE4
+{0x50,0x3C,0x24,0x42,0x42,0x42,0x42,0x24,0x3C,0x00,0x00,0x00}, // 0xE5
+{0x00,0x00,0x00,0x44,0x44,0x44,0x44,0x64,0x5C,0x04,0x04,0x00}, // 0xE6
+{0x04,0x04,0x04,0x34,0x4C,0x44,0x44,0x44,0x3C,0x04,0x04,0x00}, // 0xE7
+{0x00,0x04,0x3C,0x44,0x44,0x44,0x44,0x3C,0x04,0x00,0x00,0x00}, // 0xE8
+{0x20,0x54,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00}, // 0xE9
+{0x18,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00}, // 0xEA
+{0x08,0x54,0x44,0x44,0x44,0x44,0x44,0x44,0x38,0x00,0x00,0x00}, // 0xEB
+{0x20,0x10,0x00,0x42,0x24,0x24,0x18,0x18,0x08,0x08,0x06,0x00}, // 0xEC
+{0x20,0x92,0x44,0x28,0x28,0x10,0x10,0x10,0x10,0x00,0x00,0x00}, // 0xED
+{0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEE
+{0x10,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xEF
+{0x00,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF0
+{0x00,0x00,0x10,0x10,0x7C,0x10,0x10,0x00,0x7C,0x00,0x00,0x00}, // 0xF1
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0xFE}, // 0xF2
+{0x00,0x8E,0x4E,0x28,0x5E,0x70,0x58,0xF4,0x42,0x00,0x00,0x00}, // 0xF3
+{0x00,0x7C,0x5C,0x5C,0x58,0x50,0x50,0x50,0x50,0x50,0x50,0x00}, // 0xF4
+{0x00,0x78,0x04,0x0C,0x38,0x44,0x4C,0x38,0x40,0x40,0x3C,0x00}, // 0xF5
+{0x00,0x00,0x00,0x08,0x00,0x7E,0x00,0x00,0x08,0x00,0x00,0x00}, // 0xF6
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x20,0x30}, // 0xF7
+{0x00,0x10,0x28,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF8
+{0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xF9
+{0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00}, // 0xFA
+{0x00,0x18,0x10,0x10,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFB
+{0x00,0x78,0x70,0x40,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFC
+{0x00,0x78,0x40,0x30,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, // 0xFD
+{0x00,0x00,0x00,0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0x00,0x00,0x00}, // 0xFE
+{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00} // 0xFF
+};
View
BIN gamelib/.main.c.swp
Binary file not shown.
View
BIN gamelib/.menu.c.swp
Binary file not shown.
View
BIN gamelib/.menu.h.swp
Binary file not shown.
View
BIN gamelib/blinkenpi
Binary file not shown.
View
3 gamelib/build.sh
@@ -0,0 +1,3 @@
+
+
+cc -o blinkenpi main.c ../rgblib.c ../screenlib.c ../../nunchuck/test.c ../effects/effects.c -I/usr/local/include -L/usr/local/lib -lwiringPi -lm -lncurses
View
337 gamelib/gamelib.c
@@ -0,0 +1,337 @@
+
+#include <ncurses.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/spi/spidev.h>
+#include <string.h>
+#include <math.h>
+#include <time.h>
+
+#include "../rgblib.h"
+#include "../screenlib.h"
+#include "../../nunchuck/test.h"
+#include "../effects/effects.h"
+
+#define XCENTER 131
+#define YCENTER 121
+#define JOYDEADZONE 50
+
+extern int joyX;
+extern int joyY;
+extern int accelX;
+extern int accelY;
+extern int accelZ;
+extern int buttonC;
+extern int buttonZ;
+
+extern unsigned char buffer[];
+
+FILE *logfile;
+
+int i;
+
+
+void gamelib_mainmenu(){
+ int n,j;
+ int t = 0;
+ double d=0;
+ char *text;
+
+ time_t current_time;
+ struct tm * time_info;
+ char timeString[8];
+
+
+
+ while(nunchuck_read()){
+ nunchuck_init();
+ //nunchuck_read();
+ mvprintw(6,0,"nunchuck reinited\n");
+ }
+ while(buttonC && buttonZ){
+ while(nunchuck_read()){
+ nunchuck_init();
+ //nunchuck_read();
+ mvprintw(6,0,"nunchuck reinited\n");
+ }
+
+ if(t%800 < 100){
+ text = "PLAY";
+ d = 3.03;
+ }
+ else if(t%800 < 200) {
+ text = "GAMES";
+ d = 0.03;
+ }
+ else{
+ time(&current_time);
+ time_info = localtime(&current_time);
+ strftime(timeString, 8, "%H:%M", time_info);
+
+ if(current_time%2){
+ timeString[2] = ' ';
+ }
+ text = timeString;
+ d=0.03;
+ }
+
+ n=0;
+ while(text[n] && n < 6){
+ draw_char(n*6+d, text[n]);
+ n++;
+ }
+ blit();
+ update();
+
+ t++;
+ }
+
+
+}
+
+void loose2(){
+ effect_reset();
+ int j;
+ for(j=0;j<snakelen*5+50; j++){
+ if(j%5==0 && j<snakelen*5){
+ effect_create(EFFECT_TYPE_STROBE , snake[j/5], -63-32*(sin(j/5)+1),0,-32*(sin(j/5+3.14159)+1), 2, j, 30);
+ effect_create(EFFECT_TYPE_FADEIN , snake[j/5], -63-32*(sin(j/5)+1),0,-32*(sin(j/5+3.14159)+1), 2, j, 30);
+ effect_create(EFFECT_TYPE_DELAY , snake[j/5], -63-32*(sin(j/5)+1),0,-32*(sin(j/5+3.14159)+1), 2, j+30, snakelen*5+50);
+ }
+ snake_draw();
+ effect_draw(j);
+ blit();
+ update();
+ //usleep(10000);
+ }
+ calc_score();
+ display_score();
+ welcome();
+}
+
+void display_score(){
+ int i,j, n;
+
+ time_t current_time;
+ struct tm * time_info;
+ char timeString[20];
+
+ time(&current_time);
+ time_info = localtime(&current_time);
+ strftime(timeString, 20, "%d.%m.%y %H:%M:%S", time_info);
+
+ fprintf(logfile, "time: %s, score: %d, snakelen: %d, ctr: %d, speed: %d\n", timeString, score, snakelen, ctr, tick_delay);
+
+ effect_reset();
+ for (j=0;j<400;j++){
+ char buf[10];
+ sprintf(buf, "%d", score);
+ n=0;
+ while(buf[n] && n < 6){
+ draw_char(n*6+sin(j/20.0), buf[n]);
+ n++;
+ }
+ blit();
+ update();
+ }
+}
+
+void snakesetup(){
+ score = 0;
+ ctr = 0;
+ lastmove = 0;
+ pos = WIDTH*4+4;
+ dir = 0;
+ nextdir = 0;
+ snakelen = 3;
+ snakeadd = 0;
+ snake[0] = WIDTH*4+4;
+ snake[1] = WIDTH*4+5;
+ snake[2] = WIDTH*4+6;
+ snakenom = snakelen+1;
+ place_nom();
+ effect_reset();
+}
+
+bool isonsnake(int x){
+ for (i=0;i<snakelen;i++){
+ if(snake[i] == x) return true;
+ }
+ return false;
+}
+
+void place_nom(){
+
+ int tmp;
+ do{
+ tmp = rand() % LED_NUM;
+ } while(isonsnake(tmp));
+ nompos = tmp;
+}
+
+void snake_draw(){
+ for (i=0;i<snakelen;i++){
+ buffer[snake[i]*3] += 63+32*(sin(i)+1);
+ buffer[snake[i]*3+2] += 32*(sin(i+3.14159)+1);
+ }
+ if (snakenom <= 3){
+ buffer[snake[snakenom]*3+1] += (unsigned char)(40.0*(1.0-((double)snakenom)/3));
+ }
+}
+
+void snake_do(int dir){
+
+
+
+ if (dir == 0){
+ pos--;
+ if( (pos%WIDTH)==WIDTH-1) pos += WIDTH;
+ }
+ else if (dir == 1){
+ pos++;
+ if( (pos%WIDTH)==0) pos -= WIDTH;
+ }
+ else if (dir == 2){
+ pos-=WIDTH;
+ }
+ else if (dir == 3){
+ pos+=WIDTH;
+ }
+ if(pos<0) pos += LED_NUM;
+ if(pos>=LED_NUM) pos -= LED_NUM;
+
+
+ if(isonsnake(pos)){
+ loose2();
+ snakesetup();
+ }
+
+ for(i=snakelen;i>0;i--){
+ snake[i] = snake[i-1];
+ }
+ snake[0] = pos;
+
+ if(snakeadd >0){
+ snakeadd--;
+ snakelen++;
+ }
+ if (snakenom <= snakelen){
+ snakenom++;
+ }
+
+ if(isonsnake(nompos)){
+ effect_create(EFFECT_TYPE_EXPLOSION , nompos, 0,100,0, 3, ctr, 40);
+ place_nom();
+ snakeadd+=2;
+ snakenom=0;
+ }
+
+}
+
+
+
+#define STEP 0.15;
+int main(void){
+
+ int in;
+
+ ctr = 0;
+ lastmove = 0;
+
+ pos = 0;
+ dir = 0;
+ nextdir = 0;
+
+ tick_delay = 10;
+
+ spi_init();
+
+ initscr(); /* Start curses mode */
+ keypad(stdscr, TRUE);
+ nodelay(stdscr, TRUE);
+ cbreak();
+ noecho();
+
+ nunchuck_init();
+ effect_init();
+
+ welcome();
+
+ snakesetup();
+
+
+ logfile = fopen("snakelog.txt","a+");
+ fprintf(logfile, "snake inited\n");
+
+ while(42){
+ in = getch();
+ do{
+ while(nunchuck_read()){
+ nunchuck_init();
+ //nunchuck_read();
+ mvprintw(6,0,"nunchuck reinited\n");
+ }
+ }while(joyX < 10 || joyX == 255 || joyY < 10 || joyY == 255);
+ if (dir != 1 && (in == KEY_LEFT || (joyX < XCENTER - JOYDEADZONE && joyX > 10 ))){
+ nextdir = 0;
+ }
+ else if (dir != 0 && (in == KEY_RIGHT || (joyX > XCENTER + JOYDEADZONE && joyX < 240))){
+ nextdir = 1;
+ }
+ else if (dir != 3 && (in == KEY_UP || joyY > YCENTER + JOYDEADZONE)){
+ nextdir = 2;
+ }
+ else if (dir != 2 && (in == KEY_DOWN || (joyY < YCENTER - JOYDEADZONE && joyY > 10))){
+ nextdir = 3;
+ }
+
+ if (joyX > 150){
+
+ }
+
+
+ if(lastmove+tick_delay <= ctr){
+ lastmove = ctr;
+ dir = nextdir;
+ snake_do(dir);
+
+ //if(!buttonC && tick_delay > 0) tick_delay--;
+ //if(!buttonZ && tick_delay < 30) tick_delay++;
+ }
+
+
+
+ //setpixel((accelX-512)/10+WIDTH/2,(accelY-512)/20+6,127,32,16);
+
+
+ mvprintw(0,2,"pos: %d\n", pos);
+ mvprintw(1,0,"joy X,Y: %d, %d\n", joyX, joyY);
+ mvprintw(2,0,"Accel X,Y,Z: %d, %d, %d\n", accelX, accelY, accelZ);
+ mvprintw(3,0,"Button C,Z: %d, %d\n", buttonC, buttonZ);
+ calc_score();
+ mvprintw(4,5,"Score: %d ", score);
+ refresh(); //ncurses
+
+ snake_draw();
+ effect_draw(ctr);
+ buffer[nompos*3+1] = 127;
+
+ blit();
+ update();
+ ctr++;
+ }
+
+
+ endwin(); /* End curses mode */
+
+ return 0;
+
+
+}
+
+
+
View
27 gamelib/main.c
@@ -0,0 +1,27 @@
+
+#include <stdio.h>
+
+#include "../rgblib.h"
+#include "../screenlib.h"
+
+#include "menu.h"
+
+
+int main(void){
+ double ts = 0.0;
+
+
+ spi_init();
+
+
+
+ while (draw_string(ts, "teststring") <= 1.0){
+ printf("ts: %f\n", ts);
+
+ blit();
+ update();
+
+ ts += 0.1;
+ }
+
+}
View
268 gamelib/main.c~
@@ -0,0 +1,268 @@
+
+#include <ncurses.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/spi/spidev.h>
+#include <string.h>
+#include <math.h>
+
+#include "../rgblib.h"
+#include "../font10.h"
+
+void draw_char(double xo, char c);
+void setpixel(int x, int y, unsigned char r, unsigned char g, unsigned char b);
+void aapixel(double x, double y, unsigned char r, unsigned char g, unsigned char b);
+
+unsigned char buffer[LED_NUM*3];
+int snake[LED_NUM];
+int snakelen;
+
+unsigned int width;
+
+int i;
+
+double ctr;
+
+int dir;
+
+
+char tr[] = {255, 0, 0, 255, 255, 0, 128 };
+char tg[] = {0, 255, 0, 255, 0, 255, 64 };
+char tb[] = {0, 0, 255, 0, 255, 255, 192 };
+
+
+void snake_draw(){
+ for (i=0;i<snakelen;i++){
+ buffer[i*3] = 127;
+ }
+}
+
+void snake_do(int dir){
+
+
+
+
+}
+
+void bufclear(){
+ for(i=0; i<LED_NUM;i++){
+ buffer[i*3+0] = 0;
+ buffer[i*3+1] = 0;
+ buffer[i*3+2] = 0;
+ }
+}
+
+void bufblit(){
+ for(i=0; i<LED_NUM;i++){
+ led_set(i,buffer[i*3+0],buffer[i*3+1],buffer[i*3+2]);
+ }
+ bufclear();
+}
+
+
+
+#define STEP 0.15;
+int main(void){
+
+ int in;
+
+ int ctr = 0, lastmove = 0;
+
+ int pos = 0;
+ dir = 0;
+
+ width = 40;
+
+ spi_init();
+
+ initscr(); /* Start curses mode */
+ keypad(stdscr, TRUE);
+ nodelay(stdscr, TRUE);
+ cbreak();
+ noecho();
+
+
+ printw("Hello World !!!"); /* Print Hello World */
+ refresh(); /* Print it on to the real screen */
+
+
+
+
+ while(42){
+ in = getch();
+
+ if (in == KEY_LEFT){
+ dir = 0;
+ }
+ else if (in == KEY_RIGHT){
+ dir = 1;
+ }
+ else if (in == KEY_UP){
+ dir = 2;
+ }
+ else if (in == KEY_DOWN){
+ dir = 3;
+ }
+
+
+
+
+
+ if(lastmove+20 <= ctr){
+ lastmove = ctr;
+ snake_do(dir);
+ }
+
+
+
+
+
+
+ if(pos<0) pos += LED_NUM;
+ if(pos>=LED_NUM) pos -= LED_NUM;
+ mvprintw(0,2,"pos: %d\n", pos);
+ refresh();
+ buffer[pos*3] = 127;
+ bufblit();
+ update();
+ ctr++;
+ }
+
+
+ endwin(); /* End curses mode */
+
+ return 0;
+
+
+}
+
+
+/*
+int main(int argc, char *argv[]){
+
+ width = 40;
+ ctr = 0;
+
+ spi_init();
+
+ char *text;
+
+ int donum = -1;
+
+ if (argc >= 2){
+ text = argv[argc-1];
+ }
+ else{
+ text = "29c3";
+ }
+
+ if (argc == 3){
+ donum = argv[1][0]-'0'+1;
+ printf("doing only %d times\n", donum-1);
+ }
+
+ while(donum != 0){
+ unsigned int tctr = 0;
+ while (text[tctr]){
+ draw_char((ctr-strlen(text)*6) + tctr*6,text[tctr]);
+ tctr++;
+ }
+
+ //blank columns
+ for (i=0;i<10;i++){
+ unsigned int pos = (i*width+(39%width));
+ buffer[pos*3+0] = 0;
+ buffer[pos*3+1] = 0;
+ buffer[pos*3+2] = 0;
+
+ pos = (i*width+(0%width));
+ buffer[pos*3+0] = 0;
+ buffer[pos*3+1] = 0;
+ buffer[pos*3+2] = 0;
+
+
+ }
+
+ blit();
+ update();
+
+
+ ctr-= STEP;
+
+ if (ctr <= 0){
+ ctr = strlen(text)*6+width;
+ if (donum > 0) donum--;
+
+ }
+
+
+ //if (strlen(text)*4<width){
+ // if (ctr > width-1) ctr = 0;
+ //}
+ //else{
+ // if (ctr > strlen(text)*4 + width) ctr = 0;
+ //}
+
+//usleep(3000);
+ }
+}
+*/
+
+void draw_char(double xo, char c){
+ int ix, iy;
+ for(iy=0;iy<10;iy++){
+ for(ix=0;ix<6;ix++){
+ double xpos = (ix+xo) * 1.1;
+ if(xpos < width && xpos >= 0){
+ unsigned char active = font[c][iy] & (1<<(ix+2));
+
+ if(active >1) active = 1;
+
+ aapixel((xpos),iy, active*(tr[c%7]/2), active*(tg[c%7]/2), active*(tb[c%7]/2) );
+ }
+ }
+ //printf("\n");
+ }
+}
+
+
+double dist(double a, double b){
+ return sqrt(a*a+b*b);
+}
+
+void aapixel(double x, double y, unsigned char r, unsigned char g, unsigned char b){
+
+ while(x<0) x += width;
+ double xf = x - ((int)x);
+
+ //while(y<0) x += width;
+ //double yf = y - ((int)y);
+
+ setpixel((int)x, (int)y, r*(1.0-xf), g*(1.0-xf), b*(1.0-xf));
+ setpixel((int)x+1, (int)y, r*xf, g*xf, b*xf);
+
+
+ //setpixel((int)x, (int)y+1, r*(1.0-yf), g*(1.0-yf), b*(1.0-yf));
+ //setpixel((int)x+1, (int)y+1, r*xf, g*xf, b*xf);
+
+
+ //setpixel((int)x, (int)y, r*dist(int(x)-x,int(y)-y, g*xf, b*xf);
+
+}
+
+void setpixel(int x, int y, unsigned char r, unsigned char g, unsigned char b){
+
+ unsigned int pos = (y*width+(x%width));
+ while(pos<0) pos += LED_NUM;
+ if (pos < LED_NUM && pos >= 0){
+ //led_set(pos, r, g, b);
+ buffer[pos*3+0] += r;
+ buffer[pos*3+1] += g;
+ buffer[pos*3+2] += b;
+ }
+}
+
View
57 gamelib/menu.c
@@ -0,0 +1,57 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "../rgblib.h"
+#include "../screenlib.h"
+
+#include "menu.h"
+
+
+struct menu* menu_create(){
+
+ struct menu* new = (struct menu *)malloc(sizeof(struct menu));
+
+ new->selected = 0;
+ new->length = 0;
+ new->animation = 0.0;
+ new->entries = (struct menu_entry *)malloc(sizeof(struct menu_entry)*MENU_MAXSIZE);
+}
+
+struct menu_entry* menu_entry(struct menu* m){
+ if (m->length >= MENU_MAXSIZE) return;
+ m->length++;
+
+ return &(m->entries[m->length-1]);
+}
+
+
+void menu_show(struce menu* ){
+
+
+
+
+
+
+
+}
+
+
+int main(void){
+ double ts = 0.0;
+
+
+ spi_init();
+
+
+
+ while (draw_string(ts, "teststring") <= 1.0){
+ printf("ts: %f\n", ts);
+
+ blit();
+ update();
+
+ ts += 0.1;
+ }
+
+}
View
22 gamelib/menu.h
@@ -0,0 +1,22 @@
+
+#define MENU_MAXSIZE 10;
+
+
+
+struct menu {
+ int selected;
+ int length;
+ struct menu_entry entries*;
+ double animation;
+};
+
+
+
+
+struct menu_entry {
+ char* (* gettext)();
+ void (* upaction)();
+ void (* downaction)();
+ void (* caction)();
+ void (* zaction)();
+};
View
22 gamelib/snakelog.txt
@@ -0,0 +1,22 @@
+snake inited
+score: 2510, snakelen: 25, ctr: 2400, speed: 10
+snake inited
+time: 05.01.13 12:07:09, score: 2306, snakelen: 23, ctr: 1510, speed: 10
+snake inited
+time: 05.01.13 19:19:24, score: 6587, snakelen: 65, ctr: 7430, speed: 10
+time: 05.01.13 19:20:20, score: 2512, snakelen: 25, ctr: 2710, speed: 10
+time: 05.01.13 19:21:49, score: 2715, snakelen: 27, ctr: 3220, speed: 10
+time: 05.01.13 19:21:57, score: 300, snakelen: 3, ctr: 10, speed: 10
+time: 05.01.13 19:22:03, score: 300, snakelen: 3, ctr: 10, speed: 10
+time: 05.01.13 19:23:01, score: 3121, snakelen: 31, ctr: 3860, speed: 10
+time: 05.01.13 19:24:45, score: 4762, snakelen: 47, ctr: 7300, speed: 10
+time: 05.01.13 19:26:02, score: 3936, snakelen: 39, ctr: 5130, speed: 10
+time: 05.01.13 19:32:05, score: 300, snakelen: 3, ctr: 10, speed: 10
+time: 05.01.13 19:32:11, score: 300, snakelen: 3, ctr: 10, speed: 10
+time: 05.01.13 19:32:17, score: 300, snakelen: 3, ctr: 10, speed: 10
+time: 05.01.13 19:32:44, score: 2105, snakelen: 21, ctr: 1530, speed: 10
+snake inited
+time: 06.01.13 19:10:27, score: 1101, snakelen: 11, ctr: 770, speed: 10
+time: 06.01.13 19:12:04, score: 6777, snakelen: 67, ctr: 6340, speed: 10
+snake inited
+time: 06.01.13 19:20:07, score: 8244, snakelen: 81, ctr: 9790, speed: 10
View
BIN gamelib/test
Binary file not shown.
View
42 gamelib/test.c
@@ -0,0 +1,42 @@
+
+
+#include <ncurses.h>
+
+
+
+
+int main(void){
+
+ int in;
+
+ initscr(); /* Start curses mode */
+ keypad(stdscr, TRUE);
+ nodelay(stdscr, TRUE);
+ cbreak();
+ noecho();
+
+
+ printw("Hello World !!!"); /* Print Hello World */
+ refresh(); /* Print it on to the real screen */
+
+
+
+
+ while(42){
+ in = getch();
+ if (in == KEY_LEFT){
+ printw("left!"); /* Wait for user input */
+ refresh();
+ }
+ }
+
+
+ endwin(); /* End curses mode */
+
+ return 0;
+
+
+
+
+
+}
View
86 main.c
@@ -11,48 +11,82 @@
#include <math.h>
#include "rgblib.h"
+#include "screenlib.h"
-void setpixel(unsigned int x, unsigned int y, unsigned char r, unsigned char g, unsigned char b);
+int i;
+double ctr;
-unsigned int width;
+extern unsigned char buffer[];
-int i;
-int main(void){
-
- width = 10;
+
+#define STEP 0.3;
+int main(int argc, char *argv[]){
+
+ ctr = 0;
+
spi_init();
-
- int i,t=0;
+
+ char *text;
- while(42){
-
- for(i=0;i<LED_NUM;i++){
- led_set(i,0,0,0); //245-152-157
- }
- update();
- usleep(100000);
+ int donum = -1;
+
+ if (argc >= 2){
+ text = argv[argc-1];
+ }
+ else{
+ text = "29c3";
+ }
+
+ if (argc == 3){
+ donum = argv[1][0]-'0'+1;
+ printf("doing only %d times\n", donum-1);
+ }
+ ctr=0;
+ while (0){
+ for (i=0;i<LED_NUM;i++){
+ buffer[i*3+0] = 63*(0.0+sin(((double)ctr*8+i+32*(i%WIDTH))/50.0));
+ buffer[i*3+1] = 63*(0.0+sin(((double)ctr*8+i+32*(i%WIDTH))/50.0+3.14159*2/3));
+ buffer[i*3+2] = 63*(0.0+sin(((double)ctr*8+i+32*(i%WIDTH))/50.0+3.14159*4/3));
+ }
+ ctr++;
+ blit();
+ update();
+ }
- for(i=0;i<LED_NUM;i+=1){
- led_set(i,127,127,127);
-
+ while(donum != 0){
+ unsigned int tctr = 0;
+ while (text[tctr]){
+ draw_char((ctr-strlen(text)*6) + tctr*6,text[tctr]);
+ tctr++;
}
+
+ blit();
update();
- usleep(2000);
- }
+
+
+ ctr-= STEP;
-}
+ if (ctr <= 0){
+ ctr = strlen(text)*6+WIDTH;
+ if (donum > 0) donum--;
+ }
-void setpixel(unsigned int x, unsigned int y, unsigned char r, unsigned char g, unsigned char b){
-
- unsigned int pos = y*width+(x%width);
- if (pos < LED_NUM){
- led_set(pos, r, g, b);
+
+ //if (strlen(text)*4<WIDTH){
+ // if (ctr > WIDTH-1) ctr = 0;
+ //}
+ //else{
+ // if (ctr > strlen(text)*4 + WIDTH) ctr = 0;
+ //}
+
+//usleep(3000);
}
}
+
View
138 main_blinkenfont.c
@@ -0,0 +1,138 @@
+
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/spi/spidev.h>
+#include <string.h>
+#include <math.h>
+
+#include "rgblib.h"
+#include "font10.h"
+
+void draw_char(double xo, char c);
+void setpixel(int x, int y, unsigned char r, unsigned char g, unsigned char b);
+void aapixel(double x, double y, unsigned char r, unsigned char g, unsigned char b);
+
+unsigned char buffer[LED_NUM*3];
+
+unsigned int width;
+
+int i;
+
+double ctr;
+
+char tr[] = {255, 0, 0, 255, 255, 0, 128 };
+char tg[] = {0, 255, 0, 255, 0, 255, 64 };
+char tb[] = {0, 0, 255, 0, 255, 255, 192 };
+
+void blit(){
+ for(i=0; i<LED_NUM;i++){
+ led_set(i,buffer[i*3+0],buffer[i*3+1],buffer[i*3+2]);
+ buffer[i*3+0] = 0;
+ buffer[i*3+1] = 0;
+ buffer[i*3+2] = 0;
+ }
+
+}
+
+
+
+#define STEP 0.15;
+
+
+int main(int argc, char *argv[]){
+
+ width = 40;
+ ctr = 0;
+
+ spi_init();
+
+ char *text;
+
+ if (argc == 2){
+ text = argv[1];
+ }
+ else{
+ text = "29c3";
+ }
+
+ while(42){
+ unsigned int tctr = 0;
+ while (text[tctr]){
+ draw_char((-ctr) + tctr*6,text[tctr]);
+ tctr++;
+ }
+ blit();
+ update();
+
+
+ ctr+= STEP;
+ //if (strlen(text)*4<width){
+ // if (ctr > width-1) ctr = 0;
+ //}
+ //else{
+ // if (ctr > strlen(text)*4 + width) ctr = 0;
+ //}
+
+//usleep(3000);
+ }
+}
+
+
+void draw_char(double xo, char c){
+ int ix, iy;
+ for(iy=0;iy<10;iy++){
+ for(ix=0;ix<6;ix++){
+ if(ix+xo < width || 1){
+ unsigned char active = font[c][iy] & (1<<(ix+2));
+ if(active >1) active = 1;
+ //aapixel((ix+xo)*1.15,iy,active*(c*c)%127,active*(5*c)%127,active*(44137*c)%127);
+ aapixel((ix+xo)*1.1,iy, active*(tr[c%7]/2), active*(tg[c%7]/2), active*(tb[c%7]/2) );
+ //printf("%d",active);
+ }
+ }
+ //printf("\n");
+ }
+}
+
+
+double dist(double a, double b){
+ return sqrt(a*a+b*b);
+}
+
+void aapixel(double x, double y, unsigned char r, unsigned char g, unsigned char b){
+
+ while(x<0) x += width;
+ double xf = x - ((int)x);
+
+ //while(y<0) x += width;
+ //double yf = y - ((int)y);
+
+ setpixel((int)x, (int)y, r*(1.0-xf), g*(1.0-xf), b*(1.0-xf));
+ setpixel((int)x+1, (int)y, r*xf, g*xf, b*xf);
+
+
+ //setpixel((int)x, (int)y+1, r*(1.0-yf), g*(1.0-yf), b*(1.0-yf));
+ //setpixel((int)x+1, (int)y+1, r*xf, g*xf, b*xf);
+
+
+ //setpixel((int)x, (int)y, r*dist(int(x)-x,int(y)-y, g*xf, b*xf);
+
+}
+
+void setpixel(int x, int y, unsigned char r, unsigned char g, unsigned char b){
+
+ unsigned int pos = (y*width+(x%width));
+ while(pos<0) pos += LED_NUM;
+ if (pos < LED_NUM && pos >= 0){
+ //led_set(pos, r, g, b);
+ buffer[pos*3+0] += r;
+ buffer[pos*3+1] += g;
+ buffer[pos*3+2] += b;
+ }
+}
+
View
173 main_nyan.c
@@ -0,0 +1,173 @@
+
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+#include <linux/spi/spidev.h>
+#include <string.h>
+#include <math.h>
+
+#include "rgblib.h"
+#include "font10.h"