ELEC2645 (2018/19) / Mbed 2 deprecated el17aio

Dependencies:   mbed

RosenEngine/RosenEngine.h

Committer:
ikenna1
Date:
2019-04-18
Revision:
25:faba9eb44514
Parent:
21:628fb703188f
Child:
26:a53d41adf40b

File content as of revision 25:faba9eb44514:

#ifndef ROSENENGINE_H
#define ROSENENGINE_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Ship.h"
#include "Weapons.h"
#include "Menu.h"
#include "Enemy.h"
#include "Health.h"

class RosenEngine
{

public:
   RosenEngine();
    ~RosenEngine();
    
    void init(int ship_width,int ship_height,int ship_speed,int ship_xpos,int ship_ypos);
    void read_input(Gamepad &pad);
    void update(Gamepad &pad);
    void draw(N5110 &lcd, Gamepad &pad);
    void get_pos();
    void title(N5110 &lcd);
    int get_ycursor();
    int get_shipno();
    void ship_select(N5110 &lcd);
    
    int ship_xpos; 
    int ship_ypos; 
    int ship_width;
    int ship_height;
    //*** note: add ship width and ship heirgth in place of 6 and 9 to generalize arrays after they are finished
    
private:
    void check_ship_projectile_collision();
    void check_enemy_ship_collision();
    void check_enemy_projectile_collision();   
    
    // Variables
    Ship _ship;
    Weapons _weapons;
    Menu _menu;
    Enemy _enemy;
    Health _health;
    float _xjoystick;
    float _yjoystick;
    Direction _d;
    int _ycursor;
    int _shipno;
    

};
/************STUFF TO FIX******************************
it seems that the weapons function and the enemy function thinks that the ship is locked to the top of the screen at 0,0. so while the ship can move
the seeker does not follow the ship and the weapon firing sprites are drawn wrongly
*/
#endif