Advertisement
sebasvp2005

Untitled

Apr 24th, 2024
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.42 KB | None | 0 0
  1. #pragma once
  2.  
  3. using namespace std;
  4. using namespace System;
  5.  
  6. https://pastebin.com/
  7.  
  8.  
  9.  
  10.  
  11.  
  12. char animation[3][30][200] = {
  13.      {
  14.      "                        ##                         ",
  15.      "                     ,###.                         ",
  16.      "        #           #####*                 #       ",
  17.      "     .#/           #######                  /#.    ",
  18.      "   ##*             #########.                *##   ",
  19.      " .###              ###########                ###. ",
  20.      " ###(              #############(             (### ",
  21.      "#####               #############(            #####",
  22.      "#####                *#############           #####",
  23.      "######                  ##########.          ######",
  24.      "#######                   ########          #######",
  25.      "(########                 (#####          ########(",
  26.      " ###########               ####         ########## ",
  27.      "  #############           (##      #############   ",
  28.      "   /###########################################/   ",
  29.      "     (########################################(    ",
  30.      "        ####################################       ",
  31.      "           (############################(          ",
  32.      "                  /###############/                "
  33. },
  34.  {
  35.      "                        ##                         ",
  36.      "                     ,###.                         ",
  37.      "        #           #####*                 #       ",
  38.      "     .#/           #######                  /#.    ",
  39.      "   ##*             #########.                *##   ",
  40.      " .###              ###########                ###. ",
  41.      " ###(              #############(             (### ",
  42.      "#####               #####HOLA####(            #####",
  43.      "#####                *#############           #####",
  44.      "######                  ##########.          ######",
  45.      "#######                   ########          #######",
  46.      "(########                 (#####          ########(",
  47.      " ###########               ####         ########## ",
  48.      "  #############           (##      #############   ",
  49.      "   /###########################################/   ",
  50.      "     (########################################(    ",
  51.      "        ####################################       ",
  52.      "           (############################(          ",
  53.      "                  /###############/                "
  54. },
  55.  {
  56.      "                        ##                         ",
  57.      "                     ,###.                         ",
  58.      "        #           #####*                 #       ",
  59.      "     .#/           #######                  /#.    ",
  60.      "   ##*             #########.                *##   ",
  61.      " .###              ###########                ###. ",
  62.      " ###(              #############(             (### ",
  63.      "#####               ###BUENAS####(            #####",
  64.      "#####                *#############           #####",
  65.      "######                  ##########.          ######",
  66.      "#######                   ########          #######",
  67.      "(########                 (#####          ########(",
  68.      " ###########               ####         ########## ",
  69.      "  #############           (##      #############   ",
  70.      "   /###########################################/   ",
  71.      "     (########################################(    ",
  72.      "        ####################################       ",
  73.      "           (############################(          ",
  74.      "                  /###############/                "
  75. }
  76.  
  77. };
  78.  
  79.  
  80. void render(char logo[][200], int x, int y) {
  81.     int width = strlen(logo[0]);
  82.     int height = 19;
  83.     for (int i = 0; i < height; i++) {
  84.         for (int j = 0; j < width; j++) {
  85.             Console::SetCursorPosition(x + j, y + i);
  86.             cout << logo[i][j];
  87.         }
  88.     }
  89. }
  90.  
  91. void erase(char logo[][200], int x, int y) {
  92.     int width = strlen(logo[0]);
  93.     int height = 19;
  94.     for (int i = 0; i < height; i++) {
  95.         for (int j = 0; j < width; j++) {
  96.             Console::SetCursorPosition(x + j, y + i);
  97.             cout << " ";
  98.         }
  99.     }
  100. }
  101.  
  102.  
  103. void animate(char anim[][30][200], int x, int y, int sprites,  ConsoleColor colors []) {
  104.     for (int i = 0; i < sprites; i++) {
  105.        
  106.         Console::ForegroundColor =colors[i];
  107.         erase(anim[i], x, y);
  108.         render(anim[i], x, y);
  109.         _sleep(10);
  110.     }
  111. }
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement