![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
201199550 Li Boyuan PlaneWar Game on K64f
Dependencies: mbed Gamepad N5110
plane.h@0:36c99c50e688, 2020-05-14 (annotated)
- Committer:
- LBY
- Date:
- Thu May 14 10:14:48 2020 +0000
- Revision:
- 0:36c99c50e688
From:201199550 Li Boyuan; Game name: PlaneWar
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
LBY | 0:36c99c50e688 | 1 | #ifndef PLANE_H |
LBY | 0:36c99c50e688 | 2 | #define PLANE_H |
LBY | 0:36c99c50e688 | 3 | |
LBY | 0:36c99c50e688 | 4 | #include "Bitmap.h" |
LBY | 0:36c99c50e688 | 5 | #include "N5110.h" |
LBY | 0:36c99c50e688 | 6 | #include "Gamepad.h" |
LBY | 0:36c99c50e688 | 7 | |
LBY | 0:36c99c50e688 | 8 | |
LBY | 0:36c99c50e688 | 9 | struct xy{ |
LBY | 0:36c99c50e688 | 10 | int x; |
LBY | 0:36c99c50e688 | 11 | int y; |
LBY | 0:36c99c50e688 | 12 | }; |
LBY | 0:36c99c50e688 | 13 | |
LBY | 0:36c99c50e688 | 14 | class plane{ |
LBY | 0:36c99c50e688 | 15 | public: |
LBY | 0:36c99c50e688 | 16 | void init(); |
LBY | 0:36c99c50e688 | 17 | void update(Gamepad &pad); |
LBY | 0:36c99c50e688 | 18 | void display(N5110 &lcd); |
LBY | 0:36c99c50e688 | 19 | xy getxy(); |
LBY | 0:36c99c50e688 | 20 | int getwidth(); |
LBY | 0:36c99c50e688 | 21 | int getheight(); |
LBY | 0:36c99c50e688 | 22 | |
LBY | 0:36c99c50e688 | 23 | private: |
LBY | 0:36c99c50e688 | 24 | int _height; |
LBY | 0:36c99c50e688 | 25 | int _width; |
LBY | 0:36c99c50e688 | 26 | int data[56]; |
LBY | 0:36c99c50e688 | 27 | xy _xy; |
LBY | 0:36c99c50e688 | 28 | }; |
LBY | 0:36c99c50e688 | 29 | #endif |