forked from lanmonster/frogger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraphics.h
49 lines (38 loc) · 1.03 KB
/
Graphics.h
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
/*
$file: graphics class
$purpose: console stuff to colour, reposition cursor etc.
$author: Kyle Lanmon / Michael Boyle (Softrix)
*/
#ifndef _H_GRAPHICS
#define _H_GRAPHICS
#include <Windows.h>
#include <iostream>
const unsigned char SQUARE = 219;
const unsigned char LEFT = 221;
const unsigned char RIGHT = 222;
const unsigned char TOP = 223;
const unsigned char BOTTOM = 220;
const unsigned char BLANK = ' ';
const unsigned char SNOWMAN = '*';
enum colour
{
black = 0x00, darkblue = 0x01, darkgreen = 0x02, darkcyan = 0x03,
darkred = 0x04, purple = 0x05, darkyellow = 0x06, lightgrey = 0x07,
grey = 0x08, blue = 0x09, green = 0x0A, cyan = 0x0B,
red = 0x0C, magenta = 0x0D, yellow = 0x0E, white = 0x0F
};
class Graphics
{
protected:
COORD coordScreen;
HANDLE hConsoleOutput;
private:
public:
Graphics();
void setConsoleSize(int, int);
void setColour(colour);
void draw(int, int, colour, char);
void drawWorld();
void move(int, int);
};
#endif // !_H_GRAPHICS