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@14:88ca5b1a111a, 2019-04-10 (annotated)
- Committer:
- ikenna1
- Date:
- Wed Apr 10 18:50:17 2019 +0000
- Revision:
- 14:88ca5b1a111a
- Parent:
- 13:e114d362186d
- Child:
- 15:009ccc07bb57
* made changes to imperions' weapons by adding delays;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ikenna1 | 2:66a4e5d7a7cd | 1 | #ifndef ROSENENGINE_H |
ikenna1 | 2:66a4e5d7a7cd | 2 | #define ROSENENGINE_H |
ikenna1 | 2:66a4e5d7a7cd | 3 | |
ikenna1 | 2:66a4e5d7a7cd | 4 | #include "mbed.h" |
ikenna1 | 2:66a4e5d7a7cd | 5 | #include "N5110.h" |
ikenna1 | 2:66a4e5d7a7cd | 6 | #include "Gamepad.h" |
ikenna1 | 7:ed5870cfb3e0 | 7 | #include "Ship.h" |
ikenna1 | 9:241a1a7d8527 | 8 | #include "Weapons.h" |
ikenna1 | 9:241a1a7d8527 | 9 | #include "Menu.h" |
ikenna1 | 2:66a4e5d7a7cd | 10 | |
ikenna1 | 2:66a4e5d7a7cd | 11 | class RosenEngine |
ikenna1 | 2:66a4e5d7a7cd | 12 | { |
ikenna1 | 2:66a4e5d7a7cd | 13 | |
ikenna1 | 2:66a4e5d7a7cd | 14 | public: |
ikenna1 | 2:66a4e5d7a7cd | 15 | RosenEngine(); |
ikenna1 | 2:66a4e5d7a7cd | 16 | ~RosenEngine(); |
ikenna1 | 3:f9cd1a38d5c6 | 17 | |
ikenna1 | 8:87a845b8575e | 18 | void init(int ship_width,int ship_height,int ship_speed,int ship_xpos,int ship_ypos); |
ikenna1 | 2:66a4e5d7a7cd | 19 | void read_input(Gamepad &pad); |
ikenna1 | 2:66a4e5d7a7cd | 20 | void update(Gamepad &pad); |
ikenna1 | 14:88ca5b1a111a | 21 | void draw(N5110 &lcd, Gamepad &pad); |
ikenna1 | 9:241a1a7d8527 | 22 | void get_pos(); |
ikenna1 | 10:c33d7593a275 | 23 | void title(N5110 &lcd); |
ikenna1 | 13:e114d362186d | 24 | int get_ycursor(); |
ikenna1 | 13:e114d362186d | 25 | int get_xcursor(); |
ikenna1 | 12:47578eb9ea73 | 26 | void ship_select(N5110 &lcd); |
ikenna1 | 9:241a1a7d8527 | 27 | |
ikenna1 | 9:241a1a7d8527 | 28 | int ship_xpos; |
ikenna1 | 9:241a1a7d8527 | 29 | int ship_ypos; |
ikenna1 | 9:241a1a7d8527 | 30 | int ship_width; |
ikenna1 | 9:241a1a7d8527 | 31 | |
ikenna1 | 4:740e14ebbc97 | 32 | |
ikenna1 | 10:c33d7593a275 | 33 | |
ikenna1 | 2:66a4e5d7a7cd | 34 | private: |
ikenna1 | 4:740e14ebbc97 | 35 | void check_ship_projectile_collision(); |
ikenna1 | 4:740e14ebbc97 | 36 | void check_enemy_ship_collision(); |
ikenna1 | 4:740e14ebbc97 | 37 | void check_enemy_projectile_collision(); |
ikenna1 | 4:740e14ebbc97 | 38 | |
ikenna1 | 4:740e14ebbc97 | 39 | // Variables |
ikenna1 | 8:87a845b8575e | 40 | Ship _ship; |
ikenna1 | 9:241a1a7d8527 | 41 | Weapons _weapons; |
ikenna1 | 9:241a1a7d8527 | 42 | Menu _menu; |
ikenna1 | 4:740e14ebbc97 | 43 | float _xjoystick; |
ikenna1 | 4:740e14ebbc97 | 44 | float _yjoystick; |
ikenna1 | 9:241a1a7d8527 | 45 | Direction _d; |
ikenna1 | 10:c33d7593a275 | 46 | int _ycursor; |
ikenna1 | 13:e114d362186d | 47 | int _xcursor; |
ikenna1 | 2:66a4e5d7a7cd | 48 | |
ikenna1 | 2:66a4e5d7a7cd | 49 | }; |
ikenna1 | 2:66a4e5d7a7cd | 50 | |
ikenna1 | 2:66a4e5d7a7cd | 51 | #endif |