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
RosenEngine/RosenEngine.h
- Committer:
- ikenna1
- Date:
- 2019-05-08
- Revision:
- 42:ee13e1d103d8
- Parent:
- 41:e1fa36c0492e
File content as of revision 42:ee13e1d103d8:
#ifndef ROSENENGINE_H #define ROSENENGINE_H #include "mbed.h" #include <ctime> #include "N5110.h" #include "Gamepad.h" #include "Ship.h" #include "Weapons.h" #include "Menu.h" #include "Enemy.h" #include "Health.h" #include "Lore.h" class RosenEngine { public: RosenEngine(); ~RosenEngine(); void init(int ship_width,int ship_height,int ship_speed,int ship_xpos,int ship_ypos,N5110 *lcd, Gamepad *pad); void reset(); void read_input(); void update(); void draw(); void get_pos(); void title(); int get_ycursor(); int get_shipno(); void ship_select(); void check_health(); float timer(int fps); bool dead(); void intro(); Vector2D get_enemynum(); //*** note: add ship width and ship heirgth in place of 6 and 9 to generalize arrays after they are finished private: void update_shooter_weapon(); void draw_ship(); void set_ship_size(); void score(int points); bool check_collision(int xpos1, int ypos1,int width1,int height1,int xpos2, int ypos2,int width2,int height2); bool check_collision1(int xpos1,int width1,int xpos2,int width2); void test(); void seeker_ship_collision(); void shooter_ship_collision(); void shooterw_ship_collision(); void kestrelw_seeker_collision(); void imperionw_seeker_collision(); void kestrelw_shooter_collision(); void imperionw_shooter_collision(); void orionw_collision(); void scaling(float time_elapsed); int rand_no(); void game_over(); void disp_points(); void check_se_health(); void check_sh_health(); int range(int x1, int y1, float x2, float y2); Vector2D find_closest1(); Vector2D find_closest2(int index); // Variables Ship _ship; Weapons _weapons; Menu _menu; Enemy _enemy; Health _health; Lore _lore; Vector2D _joystick; Direction _d; int _ycursor; int _shipno; int _score; int _shno; int _shipWidth; int _shipHeight; Vector2D _shipPos; Vector2D _shooterPos[3]; Vector2D _shooterWPos[3]; Vector2D _seekerPos[3]; Vector2D _coloc; bool _dead; int _times_run; int _no_shooters; int _no_seekers; bool _intro; float _wait_time; Gamepad *_pad; N5110 *_lcd; }; #endif