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: RosenEngine/RosenEngine.cpp
- Revision:
- 7:ed5870cfb3e0
- Parent:
- 5:bb6edc5b5be3
- Child:
- 8:87a845b8575e
--- a/RosenEngine/RosenEngine.cpp Tue Mar 05 09:57:55 2019 +0000 +++ b/RosenEngine/RosenEngine.cpp Tue Mar 05 13:24:15 2019 +0000 @@ -14,13 +14,10 @@ // Checks if a mission has been completed and if it has return new mission number -void RosenEngine::init(int ship_speed,int ship_width,int ship_xpos,int ship_ypos) +void RosenEngine::init(int ship_speed,int ship_width,int ship_height,int ship_xpos,int ship_ypos) { // initialise the game parameters - _ship_speed = ship_speed; - _ship_width = ship_width; - _ship_xpos = ship_xpos; - _ship_ypos = ship_ypos; + Ship.init(ship_speed,ship_width,ship_height,ship_xpos,ship_ypos); } @@ -31,3 +28,12 @@ float _yjoystick = mapped_coord.y; } +void RosenEngine::draw(N5110 &lcd) +{ + Ship.draw_ship(lcd); +} + +void RosenEngine::update(Gamepad &pad) +{ + Ship.update_ship(_xjoystick,_yjoystick); +}