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.
Homepage Class Reference
#include <homepage.h>
Public Member Functions | |
Homepage () | |
Constructor. | |
~Homepage () | |
Destructor. | |
void | welcome (N5110 &lcd, BusOut &output, Bgm &bgm) |
The welcome functions including lcd,leds and sound. | |
void | over (N5110 &lcd, BusOut &output) |
The over functions including lcd and leds. | |
void | homepage (N5110 &lcd, InterruptIn &buttonA, InterruptIn &buttonB, InterruptIn &start, int *score, int n) |
The over functions including lcd and leds. | |
void | displayCurScore (N5110 &lcd, int score) |
The rangking lists. | |
void | drawEverything (N5110 &lcd) |
Draw images including a plane, a bullet and an enemy in the welcome page. | |
void | rules (N5110 &lcd, InterruptIn &buttonA, InterruptIn &buttonB) |
Display rules of the game. | |
int | again (N5110 &lcd, int score, InterruptIn &buttonX, InterruptIn &buttonY) |
Play again the game when score > 10 Back when score <=10. |
Detailed Description
Homepage Class.
Library for different pages in the screen of mbed, University of Leeds
- Date:
- May 2020
Definition at line 14 of file homepage.h.
Constructor & Destructor Documentation
Homepage | ( | ) |
Constructor.
~Homepage | ( | ) |
Destructor.
Member Function Documentation
int again | ( | N5110 & | lcd, |
int | score, | ||
InterruptIn & | buttonX, | ||
InterruptIn & | buttonY | ||
) |
Play again the game when score > 10 Back when score <=10.
- Parameters:
-
lcd (N5110) total score in one game (int) the button X (InterruptIn) the button Y (InterruptIn)
- Returns:
- the score that need to be added to the previous one
void displayCurScore | ( | N5110 & | lcd, |
int | score | ||
) |
The rangking lists.
- Parameters:
-
lcd (N5110) the vector of scores in the history (int) the size of score vector (int)
Definition at line 60 of file homepage.cpp.
void drawEverything | ( | N5110 & | lcd ) |
Draw images including a plane, a bullet and an enemy in the welcome page.
- Parameters:
-
lcd (N5110) the value of score (int)
Definition at line 65 of file homepage.cpp.
void homepage | ( | N5110 & | lcd, |
InterruptIn & | buttonA, | ||
InterruptIn & | buttonB, | ||
InterruptIn & | start, | ||
int * | score, | ||
int | n | ||
) |
The over functions including lcd and leds.
- Parameters:
-
lcd (N5110) the button A (InterruptIn) the button B (InterruptIn) the start button (InterruptIn)
void over | ( | N5110 & | lcd, |
BusOut & | output | ||
) |
The over functions including lcd and leds.
- Parameters:
-
lcd (N5110) a stream of output bits to control leds (Busout)
Definition at line 24 of file homepage.cpp.
void rules | ( | N5110 & | lcd, |
InterruptIn & | buttonA, | ||
InterruptIn & | buttonB | ||
) |
Display rules of the game.
- Parameters:
-
lcd (N5110) the button B (InterruptIn)
void welcome | ( | N5110 & | lcd, |
BusOut & | output, | ||
Bgm & | bgm | ||
) |
The welcome functions including lcd,leds and sound.
- Parameters:
-
lcd (N5110) stream of output bits to control leds (Busout) the welcome song (Sound)
Definition at line 10 of file homepage.cpp.
Generated on Wed Jul 13 2022 13:02:18 by
