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: GraphicEngine/GraphicEngine.cpp
- Revision:
- 18:6be4c3c94a3d
- Parent:
- 17:67dbdfcdcec2
- Child:
- 19:6d9721ffc078
diff -r 67dbdfcdcec2 -r 6be4c3c94a3d GraphicEngine/GraphicEngine.cpp
--- a/GraphicEngine/GraphicEngine.cpp Thu May 14 01:07:27 2020 +0000
+++ b/GraphicEngine/GraphicEngine.cpp Thu May 14 03:53:16 2020 +0000
@@ -171,6 +171,23 @@
lcd.drawRect(size.x, size.y, size.width, size.height, FILL_TRANSPARENT);
}
+void GraphicEngine::getRoadObjects(const std::vector<Background>& road_lanes)
+{
+ DrawRoad road;
+
+ for(unsigned int i = 0; i < road_lanes.size(); i++)
+ {
+ road.x = road_lanes[i].x;
+ road.row = road_lanes[i].row;
+ drawIndividualRoadObj(road);
+ }
+}
+
+void GraphicEngine::drawIndividualRoadObj(DrawRoad &obj)
+{
+ lcd.drawSprite(obj.x, 48 - 4*obj.y, 4, 4, (int *) road);
+}
+
void GraphicEngine::printTest(){
lcd.printString("SQUISHED", 1, 1);
}