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 MotionSensor
Diff: main.cpp
- Revision:
- 40:cbcbf6fc1421
- Parent:
- 36:92d131695e7c
- Child:
- 41:0697508a28ba
--- a/main.cpp Tue May 07 09:43:36 2019 +0000 +++ b/main.cpp Tue May 07 12:42:12 2019 +0000 @@ -50,14 +50,18 @@ while(1) { // Gameloop title.main(lcd, gamepad, global_contrast); - delete player; srand(title.get_seed()); player = new Player(39, 27); - room_engine = new RoomEngine(global_contrast); + room_engine = new RoomEngine(global_contrast, player); game_loop(); game_over(); + for (int i = 0; i < MAX_ROOMS_MAP_X; i++) { + for (int j = 0; j < MAX_ROOMS_MAP_Y; j++) { + delete rooms[j][i]; + } + } delete room_engine; delete player; } @@ -105,7 +109,6 @@ lcd.printString("Game Over", 0, 0); lcd.printString("Retry?", 0, 1); lcd.refresh(); - wait(0.05); while(!gamepad.check_event(Gamepad::A_PRESSED)) { } wait(0.05);