RicoHeartless

posdots.h

Apr 23rd, 2016
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. #include <windows.h>
  4. using namespace std;
  5.  
  6. #define WIDTH 80
  7. #define HEIGHT 22
  8.  
  9. int curs(COORD cPos){
  10. HANDLE hCon;
  11.  
  12. hCon = GetStdHandle(STD_OUTPUT_HANDLE);
  13. SetConsoleCursorPosition(hCon, cPos);
  14.  
  15. return 0;
  16. }
  17.  
  18.  
  19. void dots(int repeats, int x, int y){
  20. char dots[4]{"..."};
  21. int k(0), rep(0), m(0);
  22. curs({ x, y });
  23. do{
  24. if (rep > 0 && k == 0){ curs({ x, y }); }
  25. dots[k] = '.';
  26. cout << dots[k];
  27. Sleep(200);
  28. if (k == 2){
  29. k = -1;
  30. curs({ x, y });
  31. for (m; m <= 2; m++){
  32. dots[m] = ' '; cout << dots[m]; Sleep(200);
  33. }
  34. m = 0;
  35. rep++;
  36. }
  37. k++;
  38. } while (rep != repeats);
  39. }
Add Comment
Please, Sign In to add comment