Skip to content

Instantly share code, notes, and snippets.

@Gallefray
Last active August 29, 2015 14:03
Show Gist options
  • Save Gallefray/6efe1fd13634d9dd01ae to your computer and use it in GitHub Desktop.
Save Gallefray/6efe1fd13634d9dd01ae to your computer and use it in GitHub Desktop.
Delay string drawing -- Psuedocode/C
// 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);
}
}
@Gallefray
Copy link
Author

WHOOPS. THIS HAS A BUG. Rewriting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment