Game For ECE 2035
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: map.cpp
- Revision:
- 10:e18685911e84
- Parent:
- 9:cbb9cfb1f6c5
- Child:
- 11:6cd02a8539d1
--- a/map.cpp Tue Nov 30 00:48:48 2021 +0000 +++ b/map.cpp Wed Dec 01 22:07:24 2021 +0000 @@ -79,6 +79,12 @@ return &map[active_map]; } +int get_current_map(){ + + return active_map; + + } + Map* set_active_map(int m) { active_map = m; @@ -159,7 +165,7 @@ { unsigned int key = XY_KEY(x,y); - destroyHashTable(get_active_map()->items); + removeItem(get_active_map()->items,key); } void add_wall(int x, int y, int dir, int len) @@ -206,9 +212,8 @@ void delete_npc(int x, int y) { - npc->draw = draw_nothing; - deleteItem(get_active_map()->items,XY_KEY(x,y)); - } + map_erase(x,y); +} void add_portal(int x, int y) {