Carter Montgomery / Mbed 2 deprecated 2035_Final_Project

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers graphics.h Source File

graphics.h

00001 #ifndef GRAPHICS_H
00002 #define GRAPHICS_H
00003 
00004 #define PINK1 0xF442EB //P
00005 #define LIGHTPINK 0xF2B0EE //V
00006 #define YELLOW 0xFFFF00
00007 
00008 
00009 
00010 
00011 
00012 /**
00013  * Draws the player. This depends on the player state, so it is not a DrawFunc.
00014  */
00015 void draw_player(int u, int v, int key);
00016 void draw_npc(int u, int v);
00017 void draw_rock(int u, int v);
00018 void draw_door(int u, int v);
00019 void draw_goal(int u, int v);
00020 void draw_game_over();
00021 void draw_house_floor(int u, int v);
00022 void draw_road(int u, int v);
00023 void draw_lbush(int u, int v);
00024 void draw_gem1(int u, int v);
00025 void draw_gem2(int u, int v);
00026 void draw_gem3(int u, int v);
00027 void draw_rhouse1(int u, int v);
00028 void draw_rhouse2(int u, int v);
00029 void draw_bhouse1(int u, int v);
00030 void draw_bhouse2(int u, int v);
00031 
00032 /**
00033  * Takes a string image and draws it to the screen. The string is 121 characters
00034  * long, and represents an 11x11 tile in row-major ordering (across, then down,
00035  * like a regular multi-dimensional array). The available colors are:
00036  *      R = Red
00037  *      Y = Yellow
00038  *      G = Green
00039  *      D = Brown ("dirt")
00040  *      5 = Light grey (50%)
00041  *      3 = Dark grey (30%)
00042  *      Any other character is black
00043  * More colors can be easily added by following the pattern already given.
00044  */
00045 void draw_img(int u, int v, const char* img);
00046 
00047 /**
00048  * DrawFunc functions. 
00049  * These can be used as the MapItem draw functions.
00050  */
00051 void draw_nothing(int u, int v);
00052 void draw_wall(int u, int v);
00053 void draw_plant(int u, int v);
00054 void draw_spike(int u, int v);
00055 
00056 /**
00057  * Draw the upper status bar.
00058  */
00059 void draw_upper_status(int health);
00060 
00061 /**
00062  * Draw the lower status bar.
00063  */ 
00064 void draw_lower_status(int x, int y);
00065 
00066 /**
00067  * Draw the border for the map.
00068  */
00069 void draw_border();
00070 
00071 #endif // GRAPHICS_H