Revert to scrolling characters from first column

main
Michael Hayes 14 years ago
parent a305cdacd3
commit d6cec3f386

@ -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));
}

Loading…
Cancel
Save