-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtility.h
More file actions
62 lines (48 loc) · 2.01 KB
/
Utility.h
File metadata and controls
62 lines (48 loc) · 2.01 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
#ifndef CONSOLE_ROGUELIKE_CPP_UTILITY_H
#define CONSOLE_ROGUELIKE_CPP_UTILITY_H
#include <typeinfo>
#include <string>
#include <iostream>
#include <windows.h>
#include <chrono>
#include <vector>
#include <conio.h>
#include <thread>
#include <future>
#include <cstdlib>
#include <algorithm>
#include <vector>
using namespace std::this_thread; // sleep_for, sleep_until
using namespace std::chrono; // nanoseconds, system_clock, seconds
using namespace std::literals; //future - Enable standard literals as 2s and ""s.
using namespace std;
#define TurnBlack SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 0)
#define TurnBlue SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 1)
#define TurnGreen SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 2)
#define TurnAqua SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 3)
#define TurnLightRed SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 4)
#define TurnMagenta SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 5)
#define TurnYellow SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 6)
#define TurnWhite SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 7)
#define TurnGrey SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 8) //BrightBlack
#define TurnBrightBlue SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 9)
#define TurnBrightGreen SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 10)
#define TurnBrightAqua SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 11)
#define TurnBrightWhite SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 15)
#define TurnBackGreen SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 32)
// >15 changes font background add if u want
typedef struct InvSlot {
string Name;
int Point;
int Price=0;
} InvSlot;
typedef struct Coords {
int x;
int y;
} Coords;
void InitializeSettings();
void gotoxy(int x, int y);
void wait();
int KeyCheck(int Key);
int Random(int First, int Second);
#endif //CONSOLE_ROGUELIKE_CPP_UTILITY_H