From d6cec3f38611ff959558e7db1e1d1cc676af5453 Mon Sep 17 00:00:00 2001 From: Michael Hayes Date: Fri, 2 Sep 2011 05:25:25 +0000 Subject: [PATCH] Revert to scrolling characters from first column --- utils/tinygl.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/utils/tinygl.c b/utils/tinygl.c index 68d3a23..85f7548 100644 --- a/utils/tinygl.c +++ b/utils/tinygl.c @@ -16,7 +16,6 @@ static font_t *font; static tinygl_text_mode_t text_mode = TINYGL_TEXT_MODE_STEP; static uint8_t message_index; static uint8_t scroll_pos = 0; -static uint8_t display_pos = 0; static char message1[32] = ""; @@ -245,13 +244,6 @@ static bool tinygl_display_char (char ch) break; case TINYGL_TEXT_MODE_ROTATE_SCROLL_DOWN: - if ((display_pos + font->width) < TINYGL_WIDTH) - { - tinygl_draw_char (ch, tinygl_point (0, display_pos), 1); - display_pos += font->width + 1; - break; - } - display_scroll_down (); for (x = 0; x < font->height; x++) @@ -265,13 +257,7 @@ static bool tinygl_display_char (char ch) if (scroll_pos != 0) break; - if ((display_pos + font->width) > TINYGL_HEIGHT) - display_pos = 0; - - tinygl_draw_char (ch, tinygl_point (0, display_pos), 1); - display_pos += font->width + 1; - if ((display_pos + font->width) < TINYGL_WIDTH) - return 1; + tinygl_draw_char (ch, tinygl_point (0, 0), 1); break; } @@ -288,7 +274,6 @@ static void tinygl_text_advance (void) if (!message1[message_index]) { message_index = 0; - display_pos = 0; } if (message1[message_index]) @@ -305,7 +290,6 @@ void tinygl_text (const char *string) { message_index = 0; scroll_pos = 0; - display_pos = 0; strncpy (message1, string, sizeof (message1)); }