Harry Rance 200925395 Embedded Systems Project

Dependencies:   mbed

Committer:
harryrance
Date:
Sun Apr 30 15:30:30 2017 +0000
Revision:
4:107bdbbf78bf
Parent:
3:43970d8d642e
Child:
6:dca8b5e2ebe5
Full game engine and menu system complete. Need to go through and improve commenting;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
harryrance 3:43970d8d642e 1 #ifndef MENU_H
harryrance 3:43970d8d642e 2 #define MENU_H
harryrance 3:43970d8d642e 3
harryrance 3:43970d8d642e 4 #include "mbed.h"
harryrance 3:43970d8d642e 5 #include "N5110.h"
harryrance 3:43970d8d642e 6 #include "Gamepad.h"
harryrance 3:43970d8d642e 7 #include "Boss.h"
harryrance 3:43970d8d642e 8 #include "Bullet.h"
harryrance 3:43970d8d642e 9
harryrance 3:43970d8d642e 10 class Menu
harryrance 3:43970d8d642e 11 {
harryrance 3:43970d8d642e 12 public:
harryrance 3:43970d8d642e 13 Menu();
harryrance 3:43970d8d642e 14 ~Menu();
harryrance 3:43970d8d642e 15 void initialise(int square_pos, int all_coins);
harryrance 3:43970d8d642e 16 void draw(N5110 &lcd);
harryrance 3:43970d8d642e 17 void read_input(Gamepad &pad);
harryrance 4:107bdbbf78bf 18 void update(Gamepad &pad, N5110 &lcd);
harryrance 3:43970d8d642e 19 void move_selection_square_y(Direction d);
harryrance 3:43970d8d642e 20 void move_selection_square_x(Direction d);
harryrance 3:43970d8d642e 21 int total_coins();
harryrance 3:43970d8d642e 22
harryrance 3:43970d8d642e 23 void run_game();
harryrance 3:43970d8d642e 24 void stop_game();
harryrance 3:43970d8d642e 25 int is_game_active();
harryrance 3:43970d8d642e 26
harryrance 3:43970d8d642e 27 private:
harryrance 3:43970d8d642e 28 void draw_initial_screen(N5110 &lcd);
harryrance 3:43970d8d642e 29 void draw_selection_square(N5110 &lcd);
harryrance 3:43970d8d642e 30 void page_selection(Gamepad &pad);
harryrance 3:43970d8d642e 31 void step_back(Gamepad &pad);
harryrance 3:43970d8d642e 32 void initial_screen_selection(Gamepad &pad);
harryrance 3:43970d8d642e 33 void draw_shop(N5110 &lcd);
harryrance 3:43970d8d642e 34 void draw_shop_ship_1(N5110 &lcd);
harryrance 3:43970d8d642e 35 void draw_shop_ship_2(N5110 &lcd);
harryrance 3:43970d8d642e 36 void draw_shop_ship_3(N5110 &lcd);
harryrance 3:43970d8d642e 37 void draw_shop_ship_4(N5110 &lcd);
harryrance 3:43970d8d642e 38 void draw_heart(N5110 &lcd);
harryrance 4:107bdbbf78bf 39 void exit_game(N5110 &lcd, Gamepad &pad);
harryrance 3:43970d8d642e 40
harryrance 3:43970d8d642e 41 int _square_pos_x;
harryrance 3:43970d8d642e 42 int _square_pos_y;
harryrance 3:43970d8d642e 43 int _square_active;
harryrance 3:43970d8d642e 44 int _is_game_active;
harryrance 3:43970d8d642e 45 int _all_coins;
harryrance 3:43970d8d642e 46 int _page_index;
harryrance 3:43970d8d642e 47
harryrance 3:43970d8d642e 48 Boss _boss;
harryrance 3:43970d8d642e 49 Bullet _bullet;
harryrance 3:43970d8d642e 50
harryrance 3:43970d8d642e 51 Direction _d;
harryrance 3:43970d8d642e 52
harryrance 3:43970d8d642e 53 };
harryrance 3:43970d8d642e 54
harryrance 3:43970d8d642e 55 #endif
harryrance 3:43970d8d642e 56