A complex 2D-dungeon game on LPC1768 in SWJTU-Leeds Joint School XJEL2645 project. Referenced from the framework contributed by https://os.mbed.com/users/Siriagus/code/SimplePlatformGame/
Dependencies: mbed N5110 ShiftReg PinDetect
CoverPage.cpp
- Committer:
- hugohu
- Date:
- 2021-03-25
- Branch:
- BRAVEHEART
- Revision:
- 21:e19709a07756
- Parent:
- 19:89c3eeb3761b
File content as of revision 21:e19709a07756:
#include "CoverPage.h" /// @file CoverPage.cpp void CoverPage::update(float dt) { // Change to main menu if a button press was detected if (btnWasPressed) requestStateChange(MAIN_MENU); } void CoverPage::render() { drawImage(splashScreen); } bool CoverPage::btnWasPressed = false;// static member, set to false at init void CoverPage::btnPress() { btnWasPressed = true; } void CoverPage::init() { input->addBtnPressInterrupt(Input::ButtonA, &btnPress); input->addBtnPressInterrupt(Input::ButtonB, &btnPress); input->addBtnPressInterrupt(Input::ButtonC, &btnPress); input->addBtnPressInterrupt(Input::ButtonD, &btnPress); } // Splash screen const bool CoverPage::splashScreen[48][84] = { {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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