Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Gamepad Joystick
homepage.h
00001 #ifndef Homepage_H 00002 #define Homepage_H 00003 00004 #include "mbed.h" 00005 #include "N5110.h" 00006 #include "Joystick.h" 00007 #include "Bitmap.h" 00008 #include "bgm.h" 00009 /** Homepage Class 00010 @brief Library for different pages in the screen of mbed, University of Leeds 00011 @author Li Ruofan 00012 @date May 2020 00013 */ 00014 class Homepage{ 00015 00016 public: 00017 /** Constructor */ 00018 Homepage(); 00019 /** Destructor */ 00020 ~Homepage(); 00021 /** The welcome functions including lcd,leds and sound 00022 * @param lcd (N5110) 00023 * @param stream of output bits to control leds (Busout) 00024 * @param the welcome song (Sound) 00025 */ 00026 void welcome(N5110 &lcd,BusOut &output,Bgm &bgm); 00027 00028 /** The over functions including lcd and leds 00029 * @param lcd (N5110) 00030 * @param a stream of output bits to control leds (Busout) 00031 */ 00032 void over(N5110 &lcd,BusOut &output); 00033 00034 /** The over functions including lcd and leds 00035 * @param lcd (N5110) 00036 * @param the button A (InterruptIn) 00037 * @param the button B (InterruptIn) 00038 * @param the start button (InterruptIn) 00039 */ 00040 void homepage(N5110 &lcd,InterruptIn &buttonB, InterruptIn &start, int *score,int n); 00041 00042 /** The rangking lists 00043 * @param lcd (N5110) 00044 * @param the vector of scores in the history (int) 00045 * @param the size of score vector (int) 00046 */ 00047 00048 void displayCurScore(N5110 &lcd,int score); 00049 00050 /** Draw images including a plane, a bullet and an enemy in the welcome page 00051 * @param lcd (N5110) 00052 * @param the value of score (int) 00053 */ 00054 00055 00056 /** Display rules of the game 00057 * @param lcd (N5110) 00058 * @param the button B (InterruptIn) 00059 */ 00060 void rules(N5110 &lcd,InterruptIn &buttonB); 00061 00062 00063 /**Play again the game when score > 10 00064 * Back when score <=10 00065 * @param lcd (N5110) 00066 * @param total score in one game (int) 00067 * @param the button X (InterruptIn) 00068 * @param the button Y (InterruptIn) 00069 * @return the score that need to be added to the previous one 00070 */ 00071 int again(N5110 &lcd,int score,InterruptIn &buttonX,InterruptIn &buttonY); 00072 private: 00073 }; 00074 #endif
Generated on Thu Jul 14 2022 01:43:57 by
1.7.2