Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
graphics.h
00001 #ifndef GRAPHICS_H 00002 #define GRAPHICS_H 00003 00004 00005 00006 /** 00007 * Draws the player. This depends on the player state, so it is not a DrawFunc. 00008 */ 00009 void draw_player(int u, int v, int key); 00010 00011 /** 00012 * Takes a string image and draws it to the screen. The string is 121 characters 00013 * long, and represents an 11x11 tile in row-major ordering (across, then down, 00014 * like a regular multi-dimensional array). The available colors are: 00015 * R = Red 00016 * Y = Yellow 00017 * G = Green 00018 * D = Brown ("dirt") 00019 * 5 = Light grey (50%) 00020 * 3 = Dark grey (30%) 00021 * Any other character is black 00022 * More colors can be easily added by following the pattern already given. 00023 */ 00024 void draw_img(int u, int v, const char* img); 00025 00026 /** 00027 * DrawFunc functions. 00028 * These can be used as the MapItem draw functions. 00029 */ 00030 void draw_nothing(int u, int v); 00031 void draw_wall(int u, int v); 00032 void draw_plant(int u, int v); 00033 00034 /** 00035 * Draw the upper status bar. 00036 */ 00037 void draw_upper_status(int x, int y, int coin); 00038 00039 /** 00040 * Draw the lower status bar. 00041 */ 00042 void draw_lower_status(int hp, int mp); 00043 00044 void draw_spell(char spell); 00045 00046 /** 00047 * Draw the border for the map. 00048 */ 00049 00050 void draw_start(); 00051 00052 void draw_border(); 00053 00054 void draw_gameover(); 00055 00056 void draw_win(); 00057 00058 void draw_fire(int u, int v); 00059 00060 void draw_key(int u, int v); 00061 00062 void draw_npc(int u, int v); 00063 00064 void draw_npc2(int u, int v); 00065 00066 void draw_goblin(int u, int v); 00067 00068 void draw_eye(int u, int v); 00069 00070 void draw_store(int u, int v); 00071 00072 void draw_merch(int u, int v); 00073 00074 void draw_chest(int u , int v); 00075 00076 void draw_castle(int u, int v); 00077 00078 void draw_kindom(int u, int v); 00079 00080 void draw_portal(int u, int v); 00081 00082 void draw_door(int u, int v); 00083 00084 void draw_dragon(int u, int v); 00085 00086 void draw_portal2(int u, int v); 00087 00088 00089 #endif // GRAPHICS_H
Generated on Wed Jul 27 2022 10:35:26 by
1.7.2