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.cpp
00001 /* 00002 ELEC2645 Project 00003 Controls.cpp 00004 Class file for Controls in Donkey Kong game. 00005 */ 00006 00007 #include "Controls.h" 00008 00009 // Constructor - Doesn't require any setup. 00010 Controls::Controls() 00011 { 00012 00013 } 00014 00015 // Deconstructor - Doesn't require any setup. 00016 Controls::~Controls() 00017 { 00018 00019 } 00020 00021 // Prints various text to screen relating to the game controls. 00022 void Controls::controls_run(Gamepad &pad, N5110 &lcd) { 00023 wait_ms(250); 00024 while (pad.check_event(Gamepad::BACK_PRESSED) == false) { // Continues to show this screen until BACK button pressed. 00025 //printf("Control State"); 00026 lcd.clear(); 00027 lcd.printString("Controls",19,0); 00028 lcd.printString("Move Joystick ",0,2); 00029 lcd.printString("Left or Right ",0,3); 00030 lcd.printString(" to move ",0,4); 00031 lcd.printString(" Donkey Kong ",0,5); 00032 lcd.refresh(); // Reloads screen on every cycle, controlled by fps. Default set to 24. 00033 wait_ms(1.0f/24); 00034 } 00035 }
Generated on Tue Jul 12 2022 18:21:51 by
1.7.2