Guest User

Untitled

a guest
Oct 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. // Animation.cpp : Defines the entry point for the console application.
  2. //Brandon Foley
  3.  
  4. #include "stdafx.h"
  5. #include <windows.h>
  6. #include <iostream>
  7. #include <conio.h>
  8. #include <iomanip>
  9. #define BRIGHT 1
  10. #define RED 31
  11. #define BG_BLACK 40
  12. using namespace std;
  13.  
  14. void gotoxy()
  15. {
  16. printf("Hello", 0x1B, BRIGHT, RED, BG_BLACK);
  17. }
  18. int main()
  19. {
  20. HANDLE hConsole;
  21. hColnsole = GetStdHandle(STD_OUTPUT_HADNLE);
  22.  
  23.  
  24. printf("HELLO\n");
  25. while (counter >= 0)
  26. {
  27.  
  28. for (int z = 0;; z++)
  29. {
  30.  
  31.  
  32.  
  33. for (int x = 0; x <= 10; x++)
  34. {
  35. SetConsoleTextAttribute(hConsole, i);
  36. cout << setw(x + 60) << "|-----------------|" << endl;
  37. cout << setw(60 - x) << "|-----------------|" << endl;
  38. Sleep(15);
  39.  
  40. }
  41. for (int y = 10; y >= 0; y--)
  42. {
  43. cout << setw(y + 60) << "|-----------------|" << endl;
  44. cout << setw(60 - y) << "|-----------------|" << endl;
  45. Sleep(15);
  46.  
  47. }
  48. }
  49. counter--;
  50.  
  51. }
  52. return 0;
  53. }
Add Comment
Please, Sign In to add comment