project for 2035
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: map.cpp
- Revision:
- 5:cd2bdbfedd21
- Parent:
- 4:b687219ae447
- Child:
- 6:492048165bba
--- a/map.cpp Tue Nov 24 10:26:05 2020 +0000 +++ b/map.cpp Tue Nov 24 10:59:59 2020 +0000 @@ -85,49 +85,49 @@ int map_width() { - + return get_active_map()->w; } int map_height() { - + return get_active_map()->h; } int map_area() { - + return map_height()*map_width(); } MapItem* get_current(int x, int y) { - + return getItem(get_active_map()->items, XY_KEY(x,y)); } MapItem* get_north(int x, int y) { - + return getItem(get_active_map()->items, XY_KEY(x,y+1)); } MapItem* get_south(int x, int y) { - + return getItem(get_active_map()->items, XY_KEY(x,y-1)); } MapItem* get_east(int x, int y) { - + return getItem(get_active_map()->items, XY_KEY(x+1,y)); } MapItem* get_west(int x, int y) { - + return getItem(get_active_map()->items, XY_KEY(x-1,y)); } MapItem* get_here(int x, int y) { - + return getItem(get_active_map()->items, XY_KEY(x,y)); } void map_erase(int x, int y) { - + deleteItem(get_active_map()->items, XY_KEY(x,y)); } void add_wall(int x, int y, int dir, int len)