![](/media/cache/profiles/LinkedIn_0NghoZJ.jpeg.50x50_q85.jpg)
Snake vs Block Game to be run upon K64F.
StartScreen/StartScreen.h@3:fbb1fa853f09, 2019-03-17 (annotated)
- Committer:
- AhmedPlaymaker
- Date:
- Sun Mar 17 09:54:49 2019 +0000
- Revision:
- 3:fbb1fa853f09
- Child:
- 4:1fe015b66bb8
Converted all my menu functions from the main.cpp to a class called StartScreen.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AhmedPlaymaker | 3:fbb1fa853f09 | 1 | #ifndef StartScreen_H |
AhmedPlaymaker | 3:fbb1fa853f09 | 2 | #define StartScreen_H |
AhmedPlaymaker | 3:fbb1fa853f09 | 3 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 4 | #include "mbed.h" |
AhmedPlaymaker | 3:fbb1fa853f09 | 5 | #include "N5110.h" |
AhmedPlaymaker | 3:fbb1fa853f09 | 6 | #include "Gamepad.h" |
AhmedPlaymaker | 3:fbb1fa853f09 | 7 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 8 | class StartScreen |
AhmedPlaymaker | 3:fbb1fa853f09 | 9 | { |
AhmedPlaymaker | 3:fbb1fa853f09 | 10 | public: |
AhmedPlaymaker | 3:fbb1fa853f09 | 11 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 12 | StartScreen(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 13 | ~StartScreen(); |
AhmedPlaymaker | 3:fbb1fa853f09 | 14 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 15 | /** Initialise StartScreen |
AhmedPlaymaker | 3:fbb1fa853f09 | 16 | * |
AhmedPlaymaker | 3:fbb1fa853f09 | 17 | * This function initialises the Game Interface and restarts the display. |
AhmedPlaymaker | 3:fbb1fa853f09 | 18 | */ |
AhmedPlaymaker | 3:fbb1fa853f09 | 19 | void screen_saver(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 3:fbb1fa853f09 | 20 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 21 | /** Draw |
AhmedPlaymaker | 3:fbb1fa853f09 | 22 | * |
AhmedPlaymaker | 3:fbb1fa853f09 | 23 | * This function draws the Sprite onto the screen. |
AhmedPlaymaker | 3:fbb1fa853f09 | 24 | */ |
AhmedPlaymaker | 3:fbb1fa853f09 | 25 | void instruct(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 3:fbb1fa853f09 | 26 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 27 | /** Instruct |
AhmedPlaymaker | 3:fbb1fa853f09 | 28 | * |
AhmedPlaymaker | 3:fbb1fa853f09 | 29 | * This function updates the user about how to progress after the game banner has been displayed.. |
AhmedPlaymaker | 3:fbb1fa853f09 | 30 | */ |
AhmedPlaymaker | 3:fbb1fa853f09 | 31 | void info(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 3:fbb1fa853f09 | 32 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 33 | /** Display userID |
AhmedPlaymaker | 3:fbb1fa853f09 | 34 | * |
AhmedPlaymaker | 3:fbb1fa853f09 | 35 | * This function shows who the author of the game is before showing the menu screen. |
AhmedPlaymaker | 3:fbb1fa853f09 | 36 | */ |
AhmedPlaymaker | 3:fbb1fa853f09 | 37 | void menu_screen1(N5110 &lcd, Gamepad &pad); |
AhmedPlaymaker | 3:fbb1fa853f09 | 38 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 39 | /** The First Menu Screen |
AhmedPlaymaker | 3:fbb1fa853f09 | 40 | * |
AhmedPlaymaker | 3:fbb1fa853f09 | 41 | * This function obtains the user input on how they want to progress. |
AhmedPlaymaker | 3:fbb1fa853f09 | 42 | */ |
AhmedPlaymaker | 3:fbb1fa853f09 | 43 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 44 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 45 | |
AhmedPlaymaker | 3:fbb1fa853f09 | 46 | }; |
AhmedPlaymaker | 3:fbb1fa853f09 | 47 | #endif |