Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- using namespace std;
- using namespace System;
- https://pastebin.com/
- char animation[3][30][200] = {
- {
- " ## ",
- " ,###. ",
- " # #####* # ",
- " .#/ ####### /#. ",
- " ##* #########. *## ",
- " .### ########### ###. ",
- " ###( #############( (### ",
- "##### #############( #####",
- "##### *############# #####",
- "###### ##########. ######",
- "####### ######## #######",
- "(######## (##### ########(",
- " ########### #### ########## ",
- " ############# (## ############# ",
- " /###########################################/ ",
- " (########################################( ",
- " #################################### ",
- " (############################( ",
- " /###############/ "
- },
- {
- " ## ",
- " ,###. ",
- " # #####* # ",
- " .#/ ####### /#. ",
- " ##* #########. *## ",
- " .### ########### ###. ",
- " ###( #############( (### ",
- "##### #####HOLA####( #####",
- "##### *############# #####",
- "###### ##########. ######",
- "####### ######## #######",
- "(######## (##### ########(",
- " ########### #### ########## ",
- " ############# (## ############# ",
- " /###########################################/ ",
- " (########################################( ",
- " #################################### ",
- " (############################( ",
- " /###############/ "
- },
- {
- " ## ",
- " ,###. ",
- " # #####* # ",
- " .#/ ####### /#. ",
- " ##* #########. *## ",
- " .### ########### ###. ",
- " ###( #############( (### ",
- "##### ###BUENAS####( #####",
- "##### *############# #####",
- "###### ##########. ######",
- "####### ######## #######",
- "(######## (##### ########(",
- " ########### #### ########## ",
- " ############# (## ############# ",
- " /###########################################/ ",
- " (########################################( ",
- " #################################### ",
- " (############################( ",
- " /###############/ "
- }
- };
- void render(char logo[][200], int x, int y) {
- int width = strlen(logo[0]);
- int height = 19;
- for (int i = 0; i < height; i++) {
- for (int j = 0; j < width; j++) {
- Console::SetCursorPosition(x + j, y + i);
- cout << logo[i][j];
- }
- }
- }
- void erase(char logo[][200], int x, int y) {
- int width = strlen(logo[0]);
- int height = 19;
- for (int i = 0; i < height; i++) {
- for (int j = 0; j < width; j++) {
- Console::SetCursorPosition(x + j, y + i);
- cout << " ";
- }
- }
- }
- void animate(char anim[][30][200], int x, int y, int sprites, ConsoleColor colors []) {
- for (int i = 0; i < sprites; i++) {
- Console::ForegroundColor =colors[i];
- erase(anim[i], x, y);
- render(anim[i], x, y);
- _sleep(10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement