ELEC2645 (2018/19) / Mbed 2 deprecated el17aio

Dependencies:   mbed

RosenEngine/RosenEngine.cpp

Committer:
ikenna1
Date:
2019-03-05
Revision:
7:ed5870cfb3e0
Parent:
5:bb6edc5b5be3
Child:
8:87a845b8575e

File content as of revision 7:ed5870cfb3e0:

#include "RosenEngine.h"

// Constructor
RosenEngine::RosenEngine()
{

}
// Destructor
RosenEngine::~RosenEngine()
{

}


// 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_height,int ship_xpos,int ship_ypos)
{
    // initialise the game parameters
    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;
}

void RosenEngine::draw(N5110 &lcd)
{
    Ship.draw_ship(lcd);
}

void RosenEngine::update(Gamepad &pad)
{
    Ship.update_ship(_xjoystick,_yjoystick);
}