Game For ECE 2035

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Committer:
nasiromar
Date:
Sat Nov 20 03:37:50 2021 +0000
Revision:
7:862062ffca62
Parent:
6:c9695079521d
Child:
10:e18685911e84
Base Model without game over

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rconnorlawson 0:35660d7952f7 1 #ifndef GRAPHICS_H
rconnorlawson 0:35660d7952f7 2 #define GRAPHICS_H
rconnorlawson 0:35660d7952f7 3
rconnorlawson 0:35660d7952f7 4
nasiromar 6:c9695079521d 5
rconnorlawson 0:35660d7952f7 6 /**
rconnorlawson 0:35660d7952f7 7 * Draws the player. This depends on the player state, so it is not a DrawFunc.
rconnorlawson 0:35660d7952f7 8 */
rconnorlawson 0:35660d7952f7 9 void draw_player(int u, int v, int key);
rconnorlawson 0:35660d7952f7 10
rconnorlawson 0:35660d7952f7 11 /**
rconnorlawson 0:35660d7952f7 12 * Takes a string image and draws it to the screen. The string is 121 characters
rconnorlawson 0:35660d7952f7 13 * long, and represents an 11x11 tile in row-major ordering (across, then down,
rconnorlawson 0:35660d7952f7 14 * like a regular multi-dimensional array). The available colors are:
rconnorlawson 0:35660d7952f7 15 * R = Red
rconnorlawson 0:35660d7952f7 16 * Y = Yellow
rconnorlawson 0:35660d7952f7 17 * G = Green
rconnorlawson 0:35660d7952f7 18 * D = Brown ("dirt")
rconnorlawson 0:35660d7952f7 19 * 5 = Light grey (50%)
rconnorlawson 0:35660d7952f7 20 * 3 = Dark grey (30%)
rconnorlawson 0:35660d7952f7 21 * Any other character is black
rconnorlawson 0:35660d7952f7 22 * More colors can be easily added by following the pattern already given.
rconnorlawson 0:35660d7952f7 23 */
rconnorlawson 0:35660d7952f7 24 void draw_img(int u, int v, const char* img);
rconnorlawson 0:35660d7952f7 25
rconnorlawson 0:35660d7952f7 26 /**
rconnorlawson 0:35660d7952f7 27 * DrawFunc functions.
rconnorlawson 0:35660d7952f7 28 * These can be used as the MapItem draw functions.
rconnorlawson 0:35660d7952f7 29 */
rconnorlawson 0:35660d7952f7 30 void draw_nothing(int u, int v);
rconnorlawson 0:35660d7952f7 31 void draw_wall(int u, int v);
rconnorlawson 0:35660d7952f7 32 void draw_plant(int u, int v);
rconnorlawson 0:35660d7952f7 33
rconnorlawson 0:35660d7952f7 34 /**
rconnorlawson 0:35660d7952f7 35 * Draw the upper status bar.
rconnorlawson 0:35660d7952f7 36 */
nasiromar 6:c9695079521d 37 void draw_upper_status(int x, int y);
rconnorlawson 0:35660d7952f7 38
rconnorlawson 0:35660d7952f7 39 /**
rconnorlawson 0:35660d7952f7 40 * Draw the lower status bar.
rconnorlawson 0:35660d7952f7 41 */
nasiromar 6:c9695079521d 42 void draw_lower_status(int hp, int mp);
rconnorlawson 0:35660d7952f7 43
rconnorlawson 0:35660d7952f7 44 /**
rconnorlawson 0:35660d7952f7 45 * Draw the border for the map.
rconnorlawson 0:35660d7952f7 46 */
rconnorlawson 0:35660d7952f7 47 void draw_border();
rconnorlawson 0:35660d7952f7 48
nasiromar 7:862062ffca62 49 void draw_gameover();
nasiromar 7:862062ffca62 50
nasiromar 6:c9695079521d 51 void draw_npc(int u, int v);
nasiromar 6:c9695079521d 52
nasiromar 6:c9695079521d 53 void draw_chest(int u , int v);
nasiromar 6:c9695079521d 54
nasiromar 6:c9695079521d 55 void draw_castle(int u, int v);
nasiromar 6:c9695079521d 56
nasiromar 7:862062ffca62 57 void draw_kindom(int u, int v);
nasiromar 7:862062ffca62 58
nasiromar 6:c9695079521d 59 void draw_portal(int u, int v);
nasiromar 6:c9695079521d 60
nasiromar 7:862062ffca62 61 void draw_door(int u, int v);
nasiromar 7:862062ffca62 62
nasiromar 7:862062ffca62 63 void draw_dragon(int u, int v);
nasiromar 7:862062ffca62 64
nasiromar 7:862062ffca62 65 void draw_portal2(int u, int v);
nasiromar 7:862062ffca62 66
nasiromar 6:c9695079521d 67
rconnorlawson 0:35660d7952f7 68 #endif // GRAPHICS_H