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.
Dependencies: mbed N5110 ShiftReg PinDetect
State.cpp@8:9ac6a428fa26, 2015-05-02 (annotated)
- Committer:
- Siriagus
- Date:
- Sat May 02 00:22:43 2015 +0000
- Revision:
- 8:9ac6a428fa26
- Parent:
- 7:678873947b29
- Child:
- 12:8178fad5e660
Added Splash/Title Screen + Prototyping player movement
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Siriagus | 4:d6661b976359 | 1 | #include "State.h" |
| Siriagus | 4:d6661b976359 | 2 | #include "StateManager.h" |
| Siriagus | 4:d6661b976359 | 3 | |
| Siriagus | 4:d6661b976359 | 4 | // Request the fsm to change to a new state |
| Siriagus | 7:678873947b29 | 5 | void State::requestStateChange(MainState newState) |
| Siriagus | 4:d6661b976359 | 6 | { |
| Siriagus | 7:678873947b29 | 7 | fsm->requestStateChange(newState); |
| Siriagus | 8:9ac6a428fa26 | 8 | } |
| Siriagus | 8:9ac6a428fa26 | 9 | |
| Siriagus | 8:9ac6a428fa26 | 10 | void State::drawImage(const int img[HEIGHT][WIDTH]) |
| Siriagus | 8:9ac6a428fa26 | 11 | { |
| Siriagus | 8:9ac6a428fa26 | 12 | for (int i = 0; i < HEIGHT; ++i) |
| Siriagus | 8:9ac6a428fa26 | 13 | { |
| Siriagus | 8:9ac6a428fa26 | 14 | for (int j = 0; j < WIDTH; ++j) |
| Siriagus | 8:9ac6a428fa26 | 15 | { |
| Siriagus | 8:9ac6a428fa26 | 16 | if (img[i][j]) |
| Siriagus | 8:9ac6a428fa26 | 17 | lcd->setPixel(j,i); |
| Siriagus | 8:9ac6a428fa26 | 18 | } |
| Siriagus | 8:9ac6a428fa26 | 19 | } |
| Siriagus | 4:d6661b976359 | 20 | } |