diff options
author | Alexander Kauerz <kauerz@informatik.uni-luebeck.de> | 2011-12-29 23:27:37 +0100 |
---|---|---|
committer | Alexander Kauerz <kauerz@informatik.uni-luebeck.de> | 2011-12-30 03:21:33 +0100 |
commit | 9d19a4dfbc5d6a161b4c18d6fd0555c6f4d306a5 (patch) | |
tree | 9165d9e130fe2cec727fcd675348f57d17d0fe9e | |
parent | 89e175fd9e4226c31c4f9e498ec2ca9e191d932b (diff) | |
download | ledmatrix-9d19a4dfbc5d6a161b4c18d6fd0555c6f4d306a5.tar ledmatrix-9d19a4dfbc5d6a161b4c18d6fd0555c6f4d306a5.zip |
Es gibt jetzt auch eine Mauer.
-rw-r--r-- | Matrix_5x6/Charlie/Charlie.pde | 62 |
1 files changed, 56 insertions, 6 deletions
diff --git a/Matrix_5x6/Charlie/Charlie.pde b/Matrix_5x6/Charlie/Charlie.pde index 4648d73..ad2b5d3 100644 --- a/Matrix_5x6/Charlie/Charlie.pde +++ b/Matrix_5x6/Charlie/Charlie.pde @@ -139,7 +139,7 @@ void schnecke(int s) { i++; if (scr[x][y]) break; - scr[x][y] = w?20:i+5; + scr[x][y] = w?20:i+5; // Wenn w ungleich 0, dann dann wird scr = 20, sonst i+5 drawscr(2); fadescr_down(); @@ -210,13 +210,63 @@ void lauftext(char *text) { } +void mauer(int dir) { + /* + 0=up 1=down 2=right 3=left + */ + int x=6,y=5; + + switch(dir){ + case 0: + for (int i=0;i<y;i++) + for (int j=0;j<x;j++) { + scr[j][i] = 30; + drawscr(2); + } + break; + case 1: + for (int i=y-1;i>=0;i--) + for (int j=0;j<x;j++) { + scr[j][i] = 30; + drawscr(2); + } + break; + case 2: + for (int i=0;i<x;i++) + for (int j=0;j<y;j++) { + scr[i][j] = 30; + drawscr(2); + } + break; + case 3: + for (int i=x-1;i>=0;i--) + for (int j=0;j<y;j++) { + scr[i][j] = 20; + drawscr(5); + fadescr_down(); + + } + break; + + + + } + + +} + + + void loop() { // zufall_fading_up(); // zufall_fading_down(); -zufall_fading_up(); -lauftext(" META MEUTE#"); -zufall_fading_down(); -schnecke(random(4)); - +// zufall_fading_up(); +// lauftext(" META MEUTE#"); +// zufall_fading_down(); +// schnecke(random(4)); +// clrscr(); +// mauer(0); +clrscr(); +mauer(3); } |