Li Boyuan / Mbed 2 deprecated PlaneWar

Dependencies:   mbed Gamepad N5110

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers engine.h Source File

engine.h

00001 #ifndef ENGINE_H
00002 #define ENGINE_H
00003 
00004 #include "plane.h"
00005 #include "life.h"
00006 #include "Bitmap.h"
00007 #include "N5110.h"
00008 #include "Gamepad.h"
00009 
00010 
00011 struct bomb{
00012     int x;
00013     int y;
00014     int width;
00015     int height;
00016     int *data;
00017 };
00018 struct bullet{
00019     int x;
00020     int y;
00021 };
00022 
00023 enum events{
00024     DEAD,
00025     FIRE,
00026     ELMININATE,
00027     NONE,
00028 };
00029 class engine{
00030     public:
00031     void init();
00032     events evet_check(plane &p, bomb &b, Gamepad &pad, bullet &bu);
00033     void fire(int x,int y, bullet &b);
00034     int randombomb();
00035 };
00036 #endif