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: SpaceInvaderEngine/SpaceInvaderEngine.h
- Revision:
- 15:dde4ce4bf7fe
- Parent:
- 14:e88bcf5c0887
- Child:
- 16:987f72d9bb8f
--- a/SpaceInvaderEngine/SpaceInvaderEngine.h Fri Apr 03 11:19:53 2020 +0000
+++ b/SpaceInvaderEngine/SpaceInvaderEngine.h Mon Apr 06 15:37:02 2020 +0000
@@ -7,6 +7,7 @@
#include "BulletS.h"
#include "Ship.h"
#include "Armada.h"
+#include "Cover.h"
#include <vector>
#define BORDER 2
@@ -17,19 +18,25 @@
public:
SpaceInvaderEngine();
~SpaceInvaderEngine();
- void init(int ship_height, int ship_width, int alien_size, int no_aliens, int column_size, int row_size);
+ void init(int ship_height, int ship_width, int alien_size, int no_aliens, int armada_column_size, int armada_row_size, int cover_y, int cover1_x, int cover2_x, int cover3_x, int no_rocks);
void read_input(Gamepad &pad);
void update(Gamepad &pad, N5110 &lcd);
void render(N5110 &lcd);
void shoot_bullet();
void get_ship_pos();
void ship_bullet_alien_collision(Gamepad &pad, N5110 &lcd);
+ void ship_bullet_cover1_collision(Gamepad &pad, N5110 &lcd);
+ void ship_bullet_cover2_collision(Gamepad &pad, N5110 &lcd);
+ void ship_bullet_cover3_collision(Gamepad &pad, N5110 &lcd);
private:
Armada A1;
Ship S1;
BulletS BS1;
+ Cover C1;
+ Cover C2;
+ Cover C3;
int S1_height;
int S1_width;
@@ -41,6 +48,11 @@
int A1y;
int S1x;
int S1y;
+ int Cy;
+ int C1x;
+ int C2x;
+ int C3x;
+ int NR;
Direction D;