Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void een_voor_een()
- {
- pos_x = rand() % 15;
- pos_y = rand() % 10;
- color = rand() % 7 + 31;
- lengte = (int) strlen(text);
- iprintf("\x1b[2J"); // Clear screen
- iprintf("\x1b[%i;%iH", pos_x, pos_y); // Set pos
- iprintf("\x1b[%im", color); // Set graphics
- for (a = 0; a < lengte; a++)
- {
- color = rand() % 7 + 31;
- iprintf("\x1b[%im", color); // Set graphics
- iprintf("%c", text[a]); // Print text
- for (i = 0; i < 50; i++)
- {
- swiWaitForVBlank();
- }
- if (a == lengte - 1)
- {
- // usleep(10000); werkt niet helaas
- for (i = 0; i < 500; i++)
- {
- swiWaitForVBlank(); // dus gewoon even 500x op een nieuw frame wachten ;)
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment