Revert tinygl_text API and add tinygl_draw_message

This commit is contained in:
Michael Hayes
2011-09-24 21:25:49 +00:00
parent cc3347edd4
commit 76665cbc7f
26 changed files with 65 additions and 52 deletions
+14 -1
View File
@@ -263,7 +263,7 @@ static void tinygl_text_advance (void)
/** Display a message repeatedly.
@param string null terminated message to display
@param pos position on screen. */
void tinygl_text (const char *string, tinygl_point_t pos)
void tinygl_draw_message (const char *string, tinygl_point_t pos)
{
tinygl.message_index = 0;
tinygl.scroll_pos = 0;
@@ -296,6 +296,19 @@ void tinygl_text (const char *string, tinygl_point_t pos)
}
/** Display a message repeatedly.
@param string null terminated message to display. */
void tinygl_text (const char *string)
{
tinygl_point_t pos;
pos.x = 0;
pos.y = (tinygl.dir == TINYGL_TEXT_DIR_ROTATE) ? TINYGL_HEIGHT - 1 : 0;
tinygl_draw_message (string, pos);
}
/** Set the message update speed.
@param speed text advance speed (characters per 10 s). */
void tinygl_text_speed_set (uint8_t speed)
+11 -6
View File
@@ -136,12 +136,6 @@ static inline tinygl_point_t tinygl_point (tinygl_coord_t x, tinygl_coord_t y)
}
/** Display a message repeatedly.
@param string null terminated message to display
@param pos position on screen. */
void tinygl_text (const char *string, tinygl_point_t pos);
/** Set the message update speed.
@param speed text advance speed (characters per 10 s). */
void tinygl_text_speed_set (uint8_t speed);
@@ -176,6 +170,17 @@ tinygl_point_t tinygl_draw_char (char ch, tinygl_point_t pos);
uint8_t tinygl_draw_string (const char *str, tinygl_point_t pos);
/** Display a message repeatedly.
@param string null terminated message to display
@param pos position on screen. */
void tinygl_draw_message (const char *string, tinygl_point_t pos);
/** Display a message repeatedly.
@param string null terminated message to display. */
void tinygl_text (const char *string);
/** Draw point.
@param pos coordinates of point
@param pixel_value pixel value to draw point. */