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
Diff: Levelengine.cpp
- Revision:
- 3:d27ee2440829
- Parent:
- 2:725c213b2396
- Child:
- 4:b92da6a09c8b
--- a/Levelengine.cpp Wed Mar 20 01:32:31 2019 +0000
+++ b/Levelengine.cpp Wed Mar 20 18:32:25 2019 +0000
@@ -10,22 +10,17 @@
}
void Levelengine::test_level(N5110 &lcd)
-{
-
- lcd.drawRect(0,HEIGHT-3,WIDTH,3,FILL_BLACK);
- lcd.drawRect(0,30,40,10,FILL_BLACK);
-
-
+{
- if(lcd.getPixel(engine._x, engine._y))
- {
- printf("collision detected\n");
+ //Border
+ lcd.drawRect(0,0,1,HEIGHT,FILL_BLACK);
+ lcd.drawRect(0,0,WIDTH,1,FILL_BLACK);
+ lcd.drawRect(WIDTH -1,0,1,WIDTH,FILL_BLACK);
+ lcd.drawRect(0,HEIGHT -1,WIDTH,1,FILL_BLACK);
- }
- else
- {
- printf("collision not detected\n");
-
- }
+ //platforms
+ lcd.drawRect(0,34,30,1,FILL_BLACK);
+ lcd.drawRect(40,42,30,1,FILL_BLACK);
+ lcd.drawRect(0,22,15,1,FILL_BLACK);
}
\ No newline at end of file