-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManager.cpp
More file actions
117 lines (106 loc) · 6.63 KB
/
Manager.cpp
File metadata and controls
117 lines (106 loc) · 6.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#include "Manager.h"
#include"Console.h"
#include<iostream>
using namespace std;
void Clear() // 전체 삭제
{
Gotoxy(0, 0);
for (int i = 0; i < 30; i++) {
for (int j = 0; j < 30; j++) {
cout << " ";
}
cout << endl;
}
}
void Clear(int startX, int startY, int endX, int endY) // 일정 범뷔 삭제
{
int x = (endX - startX) / 2;
int y = endY - startY;
for (int i = 0; i < y; i++) {
for (int j = 0; j < x; j++) {
cout << " ";
}
Gotoxy(startX, startY + i + 1);
}
}
void Init()
{
SetConsoleTitle(L"POKEMON GAME");
system("mode con lines=31 cols=122"); // 콘솔 창 사이즈 조절
HWND console = GetConsoleWindow();
// 윈도우 리사이즈 불가하게 끔.
SetWindowLong(console, GWL_STYLE, GetWindowLong(console, GWL_STYLE) & ~WS_MAXIMIZEBOX & ~WS_SIZEBOX);
HANDLE consoleHandle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO consoleCursor;
consoleCursor.bVisible = false;
consoleCursor.dwSize = 1;
SetConsoleCursorInfo(consoleHandle, &consoleCursor);
}
void PrintTitleScreen()
{
Gotoxy(0, 0);
cout << "■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl; // 10
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl; // 14
cout << "■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■ ■" << endl;
cout << "■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■" << endl;
/*_setmode(_fileno(stdout), _O_U8TEXT);
wcout << L"█████╗ ██████╗ ██╗ ██╗███████╗███╗ ███╗ ██████╗ ███╗ ██╗" << endl;
wcout << L"██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝████╗ ████║██╔═══██╗████╗ ██║" << endl;
wcout << L"██████╔╝██║ ██║█████╔╝ █████╗ ██╔████╔██║██║ ██║██╔██╗ ██║" << endl;
wcout << L"██╔═══╝ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╔╝██║██║ ██║██║╚██╗██║" << endl;
wcout << L"██║ ╚██████╔╝██║ ██╗███████╗██║ ╚═╝ ██║╚██████╔╝██║ ╚████║" << endl;
wcout << L"╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝" << endl;
_setmode(_fileno(stdout), _O_TEXT);
cout << endl;
_setmode(_fileno(stdout), _O_U8TEXT);
wcout << L"██████╗ ██╗██████╗ █████╗ ████████╗██╗███╗ ██╗ █████╗" << endl;
wcout << L"██╔════╝ ██║██╔══██╗██╔══██╗╚══██╔══╝██║████╗ ██║██╔══██╗" << endl;
wcout << L"██║ ███╗██║██████╔╝███████║ ██║ ██║██╔██╗ ██║███████║" << endl;
wcout << L"██║ ██║██║██╔══██╗██╔══██║ ██║ ██║██║╚██╗██║██╔══██║" << endl;
wcout << L"╚██████╔╝██║██║ ██║██║ ██║ ██║ ██║██║ ╚████║██║ ██║" << endl;
wcout << L"╚═════╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝" << endl;*/
_setmode(_fileno(stdout), _O_U8TEXT);
Gotoxy(15, 5);
wcout << L"█▀█ █▀█ █▄▀ █▀▀ █▀▄▀█ █▀█ █▄░█";
Gotoxy(15, 6);
wcout << L"█▀▀ █▄█ █░█ ██▄ █░▀░█ █▄█ █░▀█";
Gotoxy(16, 8);
wcout << L"█▀▀ █ █▀█ ▄▀█ ▀█▀ █ █▄░█ ▄▀█";
Gotoxy(16, 9);
wcout << L"█▄█ █ █▀▄ █▀█ ░█░ █ █░▀█ █▀█";
_setmode(_fileno(stdout), _O_TEXT);
// 게임의 목표 적기
Gotoxy(15, 19);
cout << "전설의 포켓몬 기라티나를 잡아라!";
// 도움말 적기
Gotoxy(10, 21);
cout << "이동 : →↑←↓, 상호작용 : Space or Enter";
Gotoxy(15, 23); // 위치 더 아래쪽 으로 옴기기
cout << "아무 키나 눌러주세요.";
}