Last active
August 29, 2015 14:03
-
-
Save Gallefray/6efe1fd13634d9dd01ae to your computer and use it in GitHub Desktop.
Delay string drawing -- Psuedocode/C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// give it a character string, the length of the line and time to wait before drawing the next char | |
void draw_string(int delay, int line_length, char str[]) | |
{ | |
int i, j; | |
for (i = 0, j = 0; str[i] < string_length(str); i++, j++) | |
if (j > line_length) { | |
draw_char(NEWLINE); | |
j = 0; | |
} | |
draw_char(str[i]); | |
wait(delay); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WHOOPS. THIS HAS A BUG. Rewriting.