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
Diff: RosenEngine/RosenEngine.h
- Revision:
- 41:e1fa36c0492e
- Parent:
- 40:90c7a893d513
- Child:
- 42:ee13e1d103d8
- Child:
- 43:500b8cff3715
diff -r 90c7a893d513 -r e1fa36c0492e RosenEngine/RosenEngine.h --- a/RosenEngine/RosenEngine.h Tue May 07 10:01:34 2019 +0000 +++ b/RosenEngine/RosenEngine.h Wed May 08 09:22:16 2019 +0000 @@ -35,15 +35,12 @@ void intro(N5110 &lcd); Vector2D get_enemynum(); - - 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 update_shooter_weapon(Gamepad &pad); + void draw_ship(N5110 &lcd, Gamepad &pad); + 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); @@ -74,19 +71,18 @@ Enemy _enemy; Health _health; Lore _lore; - float _xjoystick; - float _yjoystick; + Vector2D _joystick; Direction _d; int _ycursor; int _shipno; int _score; int _shno; - Vector2D _shooter1_pos; - Vector2D _shooter2_pos; - Vector2D _shooter3_pos; - Vector2D _seeker1_pos; - Vector2D _seeker2_pos; - Vector2D _seeker3_pos; + int _shipWidth; + int _shipHeight; + Vector2D _shipPos; + Vector2D _shooterPos[3]; + Vector2D _shooterWPos[3]; + Vector2D _seekerPos[3]; Vector2D _coloc; bool _dead; int _times_run;