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@7:ed5870cfb3e0, 2019-03-05 (annotated)
- Committer:
- ikenna1
- Date:
- Tue Mar 05 13:24:15 2019 +0000
- Revision:
- 7:ed5870cfb3e0
- Parent:
- 5:bb6edc5b5be3
- Child:
- 8:87a845b8575e
Have started to integrate ship with RosenEngine
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 | 4:740e14ebbc97 | 8 | #include "Mission1.h" |
ikenna1 | 2:66a4e5d7a7cd | 9 | |
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 | 7:ed5870cfb3e0 | 18 | void RosenEngine::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 | 2:66a4e5d7a7cd | 21 | void draw(N5110 &lcd); |
ikenna1 | 4:740e14ebbc97 | 22 | |
ikenna1 | 2:66a4e5d7a7cd | 23 | private: |
ikenna1 | 4:740e14ebbc97 | 24 | void check_ship_projectile_collision(); |
ikenna1 | 4:740e14ebbc97 | 25 | void check_enemy_ship_collision(); |
ikenna1 | 4:740e14ebbc97 | 26 | void check_enemy_projectile_collision(); |
ikenna1 | 4:740e14ebbc97 | 27 | |
ikenna1 | 4:740e14ebbc97 | 28 | // Variables |
ikenna1 | 7:ed5870cfb3e0 | 29 | /* |
ikenna1 | 4:740e14ebbc97 | 30 | int _ship_speed; |
ikenna1 | 4:740e14ebbc97 | 31 | int _ship_width; |
ikenna1 | 4:740e14ebbc97 | 32 | int _ship_xpos; |
ikenna1 | 5:bb6edc5b5be3 | 33 | int _ship_ypos; |
ikenna1 | 7:ed5870cfb3e0 | 34 | */ |
ikenna1 | 4:740e14ebbc97 | 35 | |
ikenna1 | 4:740e14ebbc97 | 36 | float _xjoystick; |
ikenna1 | 4:740e14ebbc97 | 37 | float _yjoystick; |
ikenna1 | 2:66a4e5d7a7cd | 38 | |
ikenna1 | 2:66a4e5d7a7cd | 39 | |
ikenna1 | 2:66a4e5d7a7cd | 40 | }; |
ikenna1 | 2:66a4e5d7a7cd | 41 | |
ikenna1 | 2:66a4e5d7a7cd | 42 | #endif |