Initial display of the characters via "type effect"
modified: src/nms.c
This commit is contained in:
parent
906fb5af2d
commit
b1d29cd6fe
12
src/nms.c
12
src/nms.c
@ -86,10 +86,20 @@ int main(void) {
|
|||||||
|
|
||||||
clearTermWindow(termSizeRows, termSizeCols);
|
clearTermWindow(termSizeRows, termSizeCols);
|
||||||
|
|
||||||
// TODO: Data should initially 'type' itself on to the screen
|
// Initially display the characters in the terminal with a 'type effect'.
|
||||||
|
ms = 5; // miliseconds, used for usleep()
|
||||||
|
list_pointer = start;
|
||||||
|
while (list_pointer != NULL && list_pointer->row <= termSizeRows) {
|
||||||
|
printf("\033[%i;%iH%c", list_pointer->row, list_pointer->col, list_pointer->mask);
|
||||||
|
list_pointer->mask = getMaskChar();
|
||||||
|
list_pointer = list_pointer->next;
|
||||||
|
fflush(stdout);
|
||||||
|
usleep(ms * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: pause with getchar() - something about the input stream being redirected
|
// TODO: pause with getchar() - something about the input stream being redirected
|
||||||
// to a file is causing getchar() to immediately return here.
|
// to a file is causing getchar() to immediately return here.
|
||||||
|
sleep(1);
|
||||||
|
|
||||||
// Jumble loop
|
// Jumble loop
|
||||||
ms = 35; // miliseconds, used for usleep()
|
ms = 35; // miliseconds, used for usleep()
|
||||||
|
Loading…
Reference in New Issue
Block a user