ELEC2645 (2018/19) / Mbed 2 deprecated el17aio

Dependencies:   mbed

Revision:
45:fe5fc85a5c73
Parent:
44:a6a361bea806
Child:
49:aa204bf7ee2e
--- a/RosenEngine/RosenEngine.cpp	Wed May 08 16:46:21 2019 +0000
+++ b/RosenEngine/RosenEngine.cpp	Thu May 09 03:56:41 2019 +0000
@@ -75,22 +75,22 @@
         // Draw ships and weapons depending on the ship being used
         switch (_shipUsed) {
         case kestrel:
-            _ship.set_dimensions(9,6);
+            _ship.set_parameters(9,6,4);
             _ship.draw_ship(lcd,_shipUsed);
             _weapons.draw(lcd,pad,_shipUsed,closest);
             break;
         case imperion:
-            _ship.set_dimensions(7,10);
+            _ship.set_parameters(7,10,2);
             _ship.draw_ship(lcd,_shipUsed);
             _weapons.draw(lcd,pad,_shipUsed,closest);
             break;
         case orion:
-            _ship.set_dimensions(7,10);
+            _ship.set_parameters(7,10,3);
             _ship.draw_ship(lcd,_shipUsed);
             _weapons.draw(lcd,pad,_shipUsed,closest);
             break;
     }
-    printf("_shipUsed = %d\n",_shipUsed);
+    //printf("_shipUsed = %d\n",_shipUsed);
 }
 
 void RosenEngine::update(Gamepad &pad)
@@ -168,7 +168,7 @@
 void RosenEngine::title(N5110 &lcd)
 {
     _menu.title(lcd,_shipUsed);
-    _menu.update(_d);
+    _menu.update(_d,_joystick);
 }
 int RosenEngine::get_ycursor()
 {
@@ -182,7 +182,7 @@
 }
 void RosenEngine::ship_select(N5110 &lcd)
 {
-    _menu.update(_d);
+    _menu.update(_d,_joystick);
     _menu.disp_ships(lcd);
 }
 bool RosenEngine::check_collision(int xpos1, int ypos1,int width1,int height1,int xpos2, int ypos2,int width2,int height2)