ELEC2645 (2018/19) / Mbed 2 deprecated el17aio

Dependencies:   mbed

Revision:
8:87a845b8575e
Parent:
7:ed5870cfb3e0
Child:
9:241a1a7d8527
--- a/RosenEngine/RosenEngine.cpp	Tue Mar 05 13:24:15 2019 +0000
+++ b/RosenEngine/RosenEngine.cpp	Tue Mar 12 10:53:11 2019 +0000
@@ -1,5 +1,6 @@
 #include "RosenEngine.h"
 
+
 // Constructor
 RosenEngine::RosenEngine()
 {
@@ -17,23 +18,23 @@
 void RosenEngine::init(int ship_speed,int ship_width,int ship_height,int ship_xpos,int ship_ypos)
 {
     // initialise the game parameters
-    Ship.init(ship_speed,ship_width,ship_height,ship_xpos,ship_ypos);
+    _ship.init(ship_speed,ship_width,ship_height,ship_xpos,ship_ypos);
     
 }
 
 void RosenEngine::read_input(Gamepad &pad)
 {
     Vector2D mapped_coord = pad.get_coord();
-    float _xjoystick = mapped_coord.x;
-    float _yjoystick = mapped_coord.y;
+    _xjoystick = mapped_coord.x;
+    _yjoystick = mapped_coord.y;
 }
 
 void RosenEngine::draw(N5110 &lcd)
 {
-    Ship.draw_ship(lcd);
+    _ship.draw_ship(lcd);
 }
 
 void RosenEngine::update(Gamepad &pad)
 {
-    Ship.update_ship(_xjoystick,_yjoystick);
+    _ship.update_ship(_xjoystick,_yjoystick);
 }