
hgftf
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: map.cpp
- Revision:
- 6:fbaee888e5ea
- Parent:
- 5:5953ca12205d
- Child:
- 7:7ab2f4b09196
--- a/map.cpp Wed Nov 18 19:47:54 2020 +0000 +++ b/map.cpp Thu Nov 19 04:33:29 2020 +0000 @@ -341,7 +341,7 @@ MapItem* w1 = (MapItem*) malloc(sizeof(MapItem)); w1->type = SWORD; w1->draw = draw_sword; - w1->walkable = false; + w1->walkable = true; w1->data = NULL; void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); if (val) free(val); // If something is already there, free it @@ -428,3 +428,13 @@ } } +void add_reverse(int x, int y) +{ + MapItem* w1 = (MapItem*) malloc(sizeof(MapItem)); + w1->type = REVERSE; + w1->draw = draw_reverse; + w1->walkable = true; + w1->data = NULL; + void* val = insertItem(get_active_map()->items, XY_KEY(x, y), w1); + if (val) free(val); // If something is already there, free it +}