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.
Controls.h
00001 #ifndef CONTROLS_H 00002 #define CONTROLS_H 00003 00004 #include "mbed.h" 00005 #include "N5110.h" 00006 #include "Gamepad.h" 00007 00008 /** Controls Class 00009 *@brief This class is for the controls menu screen 00010 *@author Kern Fowler 00011 *@version 1.0 00012 *@date May 2019 00013 */ 00014 00015 class Controls { 00016 00017 public: 00018 /** Controls Constructor 00019 @brief Builds my default Controls contructor. 00020 @details This does not have any setup. 00021 */ 00022 Controls(); 00023 /** Controls Destructor 00024 @brief Builds my default Controls Destructor. 00025 @details This does not have any setup. 00026 */ 00027 ~Controls(); 00028 // Mutators 00029 00030 /** 00031 *@brief Prints the Controls menu. 00032 *@param pad The Gamepad class is used. 00033 *@param lcd The N5110 class is used. 00034 *@return None. 00035 *@details Prints various text to screen relating to the game controls. 00036 *@code 00037 void Controls::controls_run(Gamepad &pad, N5110 &lcd) { 00038 wait_ms(250); 00039 while (pad.check_event(Gamepad::BACK_PRESSED) == false) { // Continues to show this screen until BACK button pressed. 00040 //printf("Control State"); 00041 lcd.clear(); 00042 lcd.printString("Controls",19,0); 00043 lcd.printString("Move Joystick ",0,2); 00044 lcd.printString("Left or Right ",0,3); 00045 lcd.printString(" to move ",0,4); 00046 lcd.printString(" Donkey Kong ",0,5); 00047 lcd.refresh(); 00048 wait_ms(1.0f/24); 00049 } 00050 } 00051 @endcode 00052 */ 00053 void controls_run(Gamepad &pad, N5110 &lcd); 00054 }; 00055 00056 #endif
Generated on Tue Jul 12 2022 18:21:51 by
1.7.2