![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
hgftf
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
graphics.h@10:0b2f37cef9b9, 2021-04-17 (annotated)
- Committer:
- ajorgih3
- Date:
- Sat Apr 17 14:09:46 2021 +0000
- Revision:
- 10:0b2f37cef9b9
- Parent:
- 9:d09b96b6c39c
huhu
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DCchico | 2:4947d6a82971 | 1 | // Copyright 2020 Georgia Tech. All rights reserved. |
DCchico | 2:4947d6a82971 | 2 | // The materials provided by the instructor in this course are for |
DCchico | 2:4947d6a82971 | 3 | // the use of the students currently enrolled in the course. |
DCchico | 2:4947d6a82971 | 4 | // Copyrighted course materials may not be further disseminated. |
DCchico | 2:4947d6a82971 | 5 | // This file must not be made publicly available anywhere. |
DCchico | 2:4947d6a82971 | 6 | |
DCchico | 1:10330bce85cb | 7 | #ifndef GRAPHICS_H |
DCchico | 1:10330bce85cb | 8 | #define GRAPHICS_H |
DCchico | 1:10330bce85cb | 9 | |
DCchico | 1:10330bce85cb | 10 | /** |
DCchico | 1:10330bce85cb | 11 | * Takes a string image and draws it to the screen. The string is 121 characters |
DCchico | 1:10330bce85cb | 12 | * long, and represents an 11x11 tile in row-major ordering (across, then down, |
DCchico | 1:10330bce85cb | 13 | * like a regular multi-dimensional array). The available colors are: |
DCchico | 1:10330bce85cb | 14 | * R = Red |
DCchico | 1:10330bce85cb | 15 | * Y = Yellow |
DCchico | 1:10330bce85cb | 16 | * G = Green |
DCchico | 1:10330bce85cb | 17 | * D = Brown ("dirt") |
DCchico | 1:10330bce85cb | 18 | * 5 = Light grey (50%) |
DCchico | 1:10330bce85cb | 19 | * 3 = Dark grey (30%) |
DCchico | 1:10330bce85cb | 20 | * Any other character is black |
DCchico | 1:10330bce85cb | 21 | * More colors can be easily added by following the pattern already given. |
DCchico | 1:10330bce85cb | 22 | */ |
DCchico | 1:10330bce85cb | 23 | void draw_img(int u, int v, const char* img); |
DCchico | 1:10330bce85cb | 24 | |
DCchico | 1:10330bce85cb | 25 | /** |
DCchico | 1:10330bce85cb | 26 | * DrawFunc functions. |
DCchico | 1:10330bce85cb | 27 | * These can be used as the MapItem draw functions. |
DCchico | 1:10330bce85cb | 28 | */ |
DCchico | 1:10330bce85cb | 29 | |
DCchico | 1:10330bce85cb | 30 | void draw_nothing(int u, int v); |
DCchico | 1:10330bce85cb | 31 | void draw_plant(int u, int v); |
DCchico | 1:10330bce85cb | 32 | void draw_wall(int u, int v); |
DCchico | 1:10330bce85cb | 33 | void draw_goodie(int u, int v); |
DCchico | 1:10330bce85cb | 34 | void draw_snake_body(int u, int v); |
DCchico | 1:10330bce85cb | 35 | void draw_snake_head(int u, int v); |
DCchico | 1:10330bce85cb | 36 | void draw_snake_tail(int u, int v); |
ajorgih3 | 3:bb6f73642f01 | 37 | void draw_shield(int u, int v); |
ajorgih3 | 3:bb6f73642f01 | 38 | void draw_life(int u, int v); |
ajorgih3 | 3:bb6f73642f01 | 39 | void draw_snowflake(int u, int v); |
ajorgih3 | 3:bb6f73642f01 | 40 | void draw_sword(int u, int v); |
ajorgih3 | 4:697e1120f821 | 41 | void draw_arrow_down(int u, int v); |
ajorgih3 | 4:697e1120f821 | 42 | void draw_arrow_up(int u, int v); |
ajorgih3 | 4:697e1120f821 | 43 | void draw_arrow_left(int u, int v); |
ajorgih3 | 4:697e1120f821 | 44 | void draw_arrow_right(int u, int v); |
ajorgih3 | 5:5953ca12205d | 45 | void draw_lightspeed(int u, int v); |
ajorgih3 | 5:5953ca12205d | 46 | void draw_blue_wall(int u, int v); |
ajorgih3 | 6:fbaee888e5ea | 47 | void draw_reverse(int u, int v); |
ajorgih3 | 7:7ab2f4b09196 | 48 | void draw_red_potion(int u, int v); |
ajorgih3 | 7:7ab2f4b09196 | 49 | void draw_blue_potion(int u, int v); |
ajorgih3 | 9:d09b96b6c39c | 50 | void draw_portal(int u, int v); |
DCchico | 1:10330bce85cb | 51 | |
DCchico | 1:10330bce85cb | 52 | #endif // GRAPHICS_H |