![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
27
Monster/monster.h@0:ef959ad27a16, 2021-04-08 (annotated)
- Committer:
- cbs27
- Date:
- Thu Apr 08 02:09:25 2021 +0000
- Revision:
- 0:ef959ad27a16
- Child:
- 1:48a028c4089e
Monster
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cbs27 | 0:ef959ad27a16 | 1 | #ifndef MONSTER_H |
cbs27 | 0:ef959ad27a16 | 2 | #define MONSTER_H |
cbs27 | 0:ef959ad27a16 | 3 | |
cbs27 | 0:ef959ad27a16 | 4 | #include "shapes.h" |
cbs27 | 0:ef959ad27a16 | 5 | #include "main.h" |
cbs27 | 0:ef959ad27a16 | 6 | |
cbs27 | 0:ef959ad27a16 | 7 | #include "mbed.h" |
cbs27 | 0:ef959ad27a16 | 8 | #include "N5110.h" |
cbs27 | 0:ef959ad27a16 | 9 | |
cbs27 | 0:ef959ad27a16 | 10 | class Monster { |
cbs27 | 0:ef959ad27a16 | 11 | |
cbs27 | 0:ef959ad27a16 | 12 | public: |
cbs27 | 0:ef959ad27a16 | 13 | |
cbs27 | 0:ef959ad27a16 | 14 | Monster(); |
cbs27 | 0:ef959ad27a16 | 15 | void monster_main(N5110 &lcd, DigitalIn &button_A, DigitalIn &button_B, DigitalIn &button_C, DigitalIn &button_D); |
cbs27 | 0:ef959ad27a16 | 16 | |
cbs27 | 0:ef959ad27a16 | 17 | private: |
cbs27 | 0:ef959ad27a16 | 18 | |
cbs27 | 0:ef959ad27a16 | 19 | void drawbackground1(N5110 &lcd); |
cbs27 | 0:ef959ad27a16 | 20 | void drawlifes(N5110 &lcd); |
cbs27 | 0:ef959ad27a16 | 21 | void drawscores(N5110 &lcd); |
cbs27 | 0:ef959ad27a16 | 22 | |
cbs27 | 0:ef959ad27a16 | 23 | void draw_blackmonsters(N5110 &lcd); |
cbs27 | 0:ef959ad27a16 | 24 | void draw_jewels(N5110 &lcd); |
cbs27 | 0:ef959ad27a16 | 25 | |
cbs27 | 0:ef959ad27a16 | 26 | void draw_monster(N5110 &lcd, DigitalIn &button_A, DigitalIn &button_B, DigitalIn &button_C, DigitalIn &button_D); |
cbs27 | 0:ef959ad27a16 | 27 | |
cbs27 | 0:ef959ad27a16 | 28 | int monster_x1, monster_y1, turn1; |
cbs27 | 0:ef959ad27a16 | 29 | int monster_x2, monster_y2, turn2; |
cbs27 | 0:ef959ad27a16 | 30 | int monster_x3, monster_y3, turn3; |
cbs27 | 0:ef959ad27a16 | 31 | |
cbs27 | 0:ef959ad27a16 | 32 | int monster_x0, monster_y0; |
cbs27 | 0:ef959ad27a16 | 33 | |
cbs27 | 0:ef959ad27a16 | 34 | int jewels_on1, jewels_on2, jewels_on3, jewels_on4, jewels_on5, jewels_on6, jewels_on7; |
cbs27 | 0:ef959ad27a16 | 35 | |
cbs27 | 0:ef959ad27a16 | 36 | }; |
cbs27 | 0:ef959ad27a16 | 37 | |
cbs27 | 0:ef959ad27a16 | 38 | |
cbs27 | 0:ef959ad27a16 | 39 | #endif |