SNAKE GAME
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: graphics.h
- Revision:
- 0:24041b847eb5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graphics.h Wed Nov 25 04:25:25 2020 +0000 @@ -0,0 +1,48 @@ +// Copyright 2020 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); + +/** + * DrawFunc functions. + * These can be used as the MapItem draw functions. + */ + +void draw_nothing(int u, int v); +void draw_plant(int u, int v); +void draw_wall(int u, int v); +void draw_goodie(int u, int v); +void draw_snake_body(int u, int v); +void draw_snake_head(int u, int v); +void draw_snake_tail(int u, int v); +//new buffs/debuffs/extra stuff below +void draw_poison(int u, int v); +void draw_speedup(int u, int v); +void draw_slowdown(int u, int v); +void draw_decrease_length(int u, int v); +void draw_random(int u, int v); +void draw_moving(int u, int v); +void draw_invinc(int u, int v); +void draw_welcome(int d, int f); +void draw_inclength(int u, int v); + +#endif // GRAPHICS_H