diff options
author | Elena of Valhalla'' Grandi <valhalla.trueelena.org> | 2013-04-11 17:13:46 +0200 |
---|---|---|
committer | Elena of Valhalla'' Grandi <valhalla.trueelena.org> | 2013-04-11 17:13:46 +0200 |
commit | 791585c2a1b298bd4c949179c5e4e15a41660c6f (patch) | |
tree | 5ba6bdea4e6d3758766dffb93fd73a6f1f1059e9 | |
parent | 869ba10ee0f05a331dfc7be224a70ca678659d84 (diff) |
removed screen flickering
-rw-r--r-- | arduino_sketch/arcerino/arcerino.ino | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arduino_sketch/arcerino/arcerino.ino b/arduino_sketch/arcerino/arcerino.ino index 32af3f9..80f08a3 100644 --- a/arduino_sketch/arcerino/arcerino.ino +++ b/arduino_sketch/arcerino/arcerino.ino @@ -140,6 +140,9 @@ void draw_wait() { delay(100); } +void draw_clean() { +} + #else /* TV */ void output_init() { @@ -159,11 +162,12 @@ void draw_board() { } void draw_game() { - TV.clear_screen(); draw_board(); - TV.draw_line(x+LCD_0X,y-4+LCD_0Y,x+LCD_0X,y+4+LCD_0Y,WHITE); - TV.draw_line(x-4+LCD_0X,y+LCD_0Y,x+4+LCD_0X,y+LCD_0Y,WHITE); + TV.draw_line(x+LCD_0X,y-4+LCD_0Y,x+LCD_0X,y+4+LCD_0Y,INVERT); + TV.draw_line(x-4+LCD_0X,y+LCD_0Y,x+4+LCD_0X,y+LCD_0Y,INVERT); TV.delay(100); + TV.draw_line(x+LCD_0X,y-4+LCD_0Y,x+LCD_0X,y+4+LCD_0Y,INVERT); + TV.draw_line(x-4+LCD_0X,y+LCD_0Y,x+4+LCD_0X,y+LCD_0Y,INVERT); } void draw_score() { @@ -171,6 +175,7 @@ void draw_score() { draw_board(); TV.draw_circle(x+LCD_0X,y+LCD_0Y,6,WHITE,WHITE); TV.delay(3000); + TV.clear_screen(); } void draw_title() { @@ -180,10 +185,10 @@ void draw_title() { TV.select_font(FONT_SMALL); TV.print(LOAD_TEXT_X,BOTTOM_TEXT_Y,"Loading..."); TV.delay(4000); + TV.clear_screen(); } void draw_wait() { - TV.clear_screen(); TV.select_font(FONT_SMALL); TV.print(0,TOP_TEXT_Y,"Your score: "); TV.print(0,TOP_TEXT_Y+13,score,DEC); @@ -206,6 +211,10 @@ void draw_wait() { TV.delay(100); } +void draw_clean() { + TV.clear_screen(); +} + #endif /* LCD/TV */ void update_position() { @@ -248,6 +257,7 @@ void new_arrow() { void new_round() { arrows = 10; score = 0; + draw_clean(); } void setup() { |