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 Gamepad N5110
Entrance/Entrance.cpp@10:75de0f4da176, 2019-05-08 (annotated)
- Committer:
- rafeh
- Date:
- Wed May 08 20:59:02 2019 +0000
- Revision:
- 10:75de0f4da176
- Parent:
- 7:05f433e196d6
doxygen comments added
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rafeh | 7:05f433e196d6 | 1 | #include "Entrance.h" |
rafeh | 7:05f433e196d6 | 2 | |
rafeh | 10:75de0f4da176 | 3 | Entrance::Entrance() |
rafeh | 10:75de0f4da176 | 4 | { |
rafeh | 10:75de0f4da176 | 5 | |
rafeh | 10:75de0f4da176 | 6 | } |
rafeh | 10:75de0f4da176 | 7 | Entrance::~Entrance() |
rafeh | 10:75de0f4da176 | 8 | { |
rafeh | 10:75de0f4da176 | 9 | |
rafeh | 10:75de0f4da176 | 10 | } |
rafeh | 10:75de0f4da176 | 11 | |
rafeh | 10:75de0f4da176 | 12 | |
rafeh | 7:05f433e196d6 | 13 | void Entrance::welcome_page(N5110 &lcd, Gamepad &pad) { |
rafeh | 7:05f433e196d6 | 14 | |
rafeh | 7:05f433e196d6 | 15 | const int intro_shape [40][40] = |
rafeh | 7:05f433e196d6 | 16 | { |
rafeh | 7:05f433e196d6 | 17 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 18 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 19 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,1,1,1,1,1,0,1,0,1,1,1,1,1,0,1,1,1,1,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 50 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 51 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 52 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 53 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 54 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 55 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 56 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, |
rafeh | 7:05f433e196d6 | 57 | |
rafeh | 7:05f433e196d6 | 58 | }; |
rafeh | 7:05f433e196d6 | 59 | |
rafeh | 7:05f433e196d6 | 60 | |
rafeh | 7:05f433e196d6 | 61 | |
rafeh | 7:05f433e196d6 | 62 | |
rafeh | 7:05f433e196d6 | 63 | lcd.drawSprite(0,0,40,40,(int*)intro_shape); |
rafeh | 7:05f433e196d6 | 64 | lcd.printString(" Flappy ",40,0); |
rafeh | 7:05f433e196d6 | 65 | lcd.printString(" Bird ",40,1); |
rafeh | 7:05f433e196d6 | 66 | lcd.printString(" Press ",40,3); |
rafeh | 7:05f433e196d6 | 67 | lcd.printString(" Start ",40,4); |
rafeh | 7:05f433e196d6 | 68 | lcd.refresh(); |
rafeh | 7:05f433e196d6 | 69 | while ( pad.check_event(Gamepad::START_PRESSED) == false) { |
rafeh | 7:05f433e196d6 | 70 | pad.leds_on(); |
rafeh | 7:05f433e196d6 | 71 | wait(0.1); |
rafeh | 7:05f433e196d6 | 72 | pad.leds_off(); |
rafeh | 7:05f433e196d6 | 73 | wait(0.1); |
rafeh | 7:05f433e196d6 | 74 | } |
rafeh | 7:05f433e196d6 | 75 | } |
rafeh | 7:05f433e196d6 | 76 | |
rafeh | 7:05f433e196d6 | 77 | |
rafeh | 7:05f433e196d6 | 78 |