-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphics.h
79 lines (71 loc) · 2.22 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
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
// ============================================
// The graphics header file
//
// Copyright 2023 Georgia Tech. All rights reserved.
// The materials provided by the instructor in this course are for
// the use of the students currently enrolled in the course.
// Copyrighted course materials may not be further disseminated.
// This file must NOT be made publicly available anywhere.
//==================================================================
#ifndef GRAPHICS_H
#define GRAPHICS_H
/**
* Takes a string image and draws it to the screen. The string is 121 characters
* long, and represents an 11x11 tile in row-major ordering (across, then down,
* like a regular multi-dimensional array). The available colors are:
* R = Red
* Y = Yellow
* G = Green
* D = Brown ("dirt")
* 5 = Light grey (50%)
* 3 = Dark grey (30%)
* Any other character is black
* More colors can be easily added by following the pattern already given.
*/
void draw_img(int u, int v, const char* img);
/**
* Draws the player. This depends on the player state, so it is not a DrawFunc.
*/
void draw_player(int u, int v, int key);
/**
* Draw the upper status bar.
*/
void draw_upper_status();
/**
* Draw the lower status bar.
*/
void draw_lower_status();
/**
* Draw the border for the map.
*/
void draw_border();
/**
* DrawFunc functions.
* These can be used as the MapItem draw functions.
*/
void draw_nothing(int u, int v);
void draw_wall(int u, int v);
void draw_plant(int u, int v);
void draw_mud(int u, int v);
void draw_door(int u, int v);
void draw_npc(int u, int v);
void draw_stairs(int u, int v);
void draw_cave1(int u, int v);
void draw_cave2(int u, int v);
void draw_cave3(int u, int v);
void draw_cave4(int u, int v);
void draw_water(int u , int v);
void draw_fire(int u , int v);
void draw_earth(int u , int v);
void draw_buzz(int u, int v);
void draw_chest(int u, int v);
void draw_white_block(int u, int v);
void draw_key(int u, int v);
void draw_hearts(int u, int v, int num_lives);
void draw_spikes(int u, int v);
void draw_big_tree1(int u, int v);
void draw_big_tree2(int u, int v);
void draw_big_tree3(int u, int v);
void draw_big_tree4(int u, int v);
void draw_fire_buzz(int u, int v);
#endif // GRAPHICS_H