diff --git a/animations/programm.c b/animations/programm.c index f4a824a..877e54d 100644 --- a/animations/programm.c +++ b/animations/programm.c @@ -87,6 +87,15 @@ void off() #endif #ifdef ANIMATION_SPIRALE + +void walk(cursor* cur, unsigned char steps, unsigned int delay){ + unsigned char x; + for(x=0;xpos, cur->dir)); + wait(delay); + } +} + void spirale(unsigned int delay){ clear_screen(0); diff --git a/display_loop.c b/display_loop.c index 421b4d5..b6b0596 100644 --- a/display_loop.c +++ b/display_loop.c @@ -1,5 +1,6 @@ #include +#include #include "config.h" #include "scrolltext/scrolltext.h" @@ -33,10 +34,6 @@ void display_loop(){ #ifdef ANIMATION_SCROLLTEXT case 1: scrolltext(scrolltext_text); - { char a[14]; - sprintf(a," +#else + #define PROGMEM + #define strcpy_P strcpy + #define memcpy_P memcpy + #define pgm_read_byte(a) ((*(uint8_t*)(a))) + #define pgm_read_word(a) ((*(uint16_t*)(a))) +#endif diff --git a/scrolltext/font.h b/scrolltext/font.h index 904e134..580a616 100644 --- a/scrolltext/font.h +++ b/scrolltext/font.h @@ -1,12 +1,7 @@ #ifndef FONT_H #define FONT_H -#ifdef AVR -# include -#else -# define PROGMEM -# define pgm_read_byte(B) *(B) -# define pgm_read_word(B) *(B) -#endif + +#include "../pgmspace.h" typedef struct{ unsigned char fontHeight; diff --git a/scrolltext/scrolltext3.c b/scrolltext/scrolltext3.c index e071b30..a8d3e7d 100644 --- a/scrolltext/scrolltext3.c +++ b/scrolltext/scrolltext3.c @@ -6,12 +6,10 @@ #include "../config.h" #include "scrolltext.h" -#ifdef AVR -# include "../borg_hw/borg_hw.h" -#endif #include "../pixel.h" #include "../util.h" +#include "../pgmspace.h" #include "font_arial8.h" #include "font_small6.h" #include "font_uni53.h" diff --git a/simulator/main.c b/simulator/main.c index 30bf3ff..1da7b0a 100644 --- a/simulator/main.c +++ b/simulator/main.c @@ -197,6 +197,7 @@ void timf(int value) { void *display_loop_run(void * unused) { display_loop(); + return 0; } int main(int argc, char **argv){