-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLetter.h
More file actions
69 lines (59 loc) · 1.98 KB
/
Copy pathLetter.h
File metadata and controls
69 lines (59 loc) · 1.98 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
/* AUTHORS: Chris Helms
* Adam Naumann
* Garrett Yero,
* Stirling Strafford
* Gilbert Tao
* ASSIGNMENT TITLE: Pac-Man
* ASSIGNMENT DESCIRPTION: Emulates Pac-Man in C++
* DATE CREATED: 11/2/2017
* DUE DATE: 12/4/2017
* DATE LAST MODIFIED: 12/3/2017
*/
#ifndef LETTER_H_INCLUDED
#define LETTER_H_INCLUDED
#include <fstream>
#include "Shapes.h"
using namespace std;
const int ROW = 12,
COL = 13,
MAXS = 20;
struct Letter{
char letter;
int scale;
Point topLeftCorner;
Color color;
char pixel[ROW][COL], scaled[ROW*MAXS][COL*MAXS];
/*
*DESCRIPTION: constructor for the letter object
*RETURN: N/A
*PRECONDITION: Letter.h is included in the implementation file
*POSTCONDITION: letter object is created with specified parameters
*/
Letter(char let = 'A', Color c = Color(), int s = 1, Point p = Point());
/*
*DESCRIPTION: searches for specified character in Alphabet.txt file
*RETURN: void
*PRECONDITION: Alphabet.txt is the in the project path and a letter
object exists
*POSTCONDITION: the letter is located in the file, and the pixelated version
of the letter is loaded into the pixed array
*/
void findLetter(char let);
/*
*DESCRIPTION: scales the letter array based on the scale variable
*RETURN: void
*PRECONDITION: letter object with pixel array of letter exists
and scale is known
*POSTCONDITION: the scaled version of the pixel array is loaded into scaled array
*/
void scaleLetter();
/*
*DESCRIPTION: draws the scaled array letter to an SDL_Plotter
*RETURN: void
*PRECONDITION: letter object exists
*POSTCONDITION: letter is printed to the SDL_Plotter according to scale,
point, and color
*/
void draw(SDL_Plotter& g);
};
#endif // LETTER_H_INCLUDED