Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: main.cpp
- Revision:
- 3:664c79e2ceb5
- Parent:
- 2:06c63d567719
- Child:
- 4:af9d6e3b8a29
diff -r 06c63d567719 -r 664c79e2ceb5 main.cpp
--- a/main.cpp Fri Nov 30 02:53:05 2018 +0000
+++ b/main.cpp Fri Nov 30 03:46:39 2018 +0000
@@ -388,20 +388,20 @@
}
else if(checkType(TELEPORT)){
Inventory.has_teleport = true;
- if(boi = find_type(TELEPORT)) deleteItem(get_active_map()->items, XY_KEY(boi->x, boi->y));
+ if(boi = find_type(TELEPORT)) map_erase(boi->x, boi->y);
}
else if(checkType(KILL)){
Inventory.has_gun = true;
- if(boi = find_type(KILL)) deleteItem(get_active_map()->items, XY_KEY(boi->x, boi->y));
+ if(boi = find_type(KILL)) map_erase(boi->x, boi->y);
}
else if(checkType(BOOTS)){
Inventory.has_boots = true;
Player.speed = 2;
- if(boi = find_type(BOOTS)) deleteItem(get_active_map()->items, XY_KEY(boi->x, boi->y));
+ if(boi = find_type(BOOTS)) map_erase(boi->x, boi->y);
}
else if(checkType(PRINTER)){
Inventory.has_printer = true;
- if(boi = find_type(PRINTER)) deleteItem(get_active_map()->items, XY_KEY(boi->x, boi->y));
+ if(boi = find_type(PRINTER)) map_erase(boi->x, boi->y);
}
break;
case MENU_BUTTON: