Game For ECE 2035
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: map.cpp
- Revision:
- 14:7225da81314a
- Parent:
- 13:798a4dd14c7e
- Child:
- 16:06a88c0110ff
--- a/map.cpp Thu Dec 02 20:16:28 2021 +0000 +++ b/map.cpp Fri Dec 03 08:45:49 2021 +0000 @@ -328,6 +328,17 @@ if (val) free(val); } +void add_chest2(int x, int y) +{ + MapItem*chest = (MapItem*) malloc(sizeof(MapItem)); + chest->type = CHESTT; + chest->draw = draw_chest; + chest->walkable = false; + chest->data = NULL; + void* val = insertItem(get_active_map()->items,XY_KEY(x,y),chest); + if (val) free(val); +} + void add_door(int x, int y) { MapItem*w1 = (MapItem*) malloc(sizeof(MapItem));