RUOFAN LI / Mbed 2 deprecated el17rl

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Homepage Class Reference

Homepage Class Reference

Homepage Class. More...

#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

Author:
Li Ruofan
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)
totalscore in one game (int)
thebutton X (InterruptIn)
thebutton 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)
thevector of scores in the history (int)
thesize 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)
thevalue 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)
thebutton A (InterruptIn)
thebutton B (InterruptIn)
thestart button (InterruptIn)
void over ( N5110 lcd,
BusOut &  output 
)

The over functions including lcd and leds.

Parameters:
lcd(N5110)
astream 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)
thebutton B (InterruptIn)
void welcome ( N5110 lcd,
BusOut &  output,
Bgm &  bgm 
)

The welcome functions including lcd,leds and sound.

Parameters:
lcd(N5110)
streamof output bits to control leds (Busout)
thewelcome song (Sound)

Definition at line 10 of file homepage.cpp.