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
Levelengine.cpp@15:2bda80896a84, 2019-03-29 (annotated)
- Committer:
- el17arm
- Date:
- Fri Mar 29 19:03:10 2019 +0000
- Revision:
- 15:2bda80896a84
- Parent:
- 14:dc3524d11921
- Child:
- 16:8384e9a480ef
major restructuring of classes and functions so no need for global variables anymore.; ; added collision with specific blocks on level.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17arm | 2:725c213b2396 | 1 | #include "Levelengine.h" |
| el17arm | 2:725c213b2396 | 2 | |
| el17arm | 2:725c213b2396 | 3 | Levelengine::Levelengine() |
| el17arm | 2:725c213b2396 | 4 | { |
| el17arm | 2:725c213b2396 | 5 | } |
| el17arm | 2:725c213b2396 | 6 | |
| el17arm | 2:725c213b2396 | 7 | Levelengine::~Levelengine() |
| el17arm | 2:725c213b2396 | 8 | { |
| el17arm | 2:725c213b2396 | 9 | } |
| el17arm | 2:725c213b2396 | 10 | |
| el17arm | 15:2bda80896a84 | 11 | void Levelengine::level_one(N5110 &lcd) |
| el17arm | 3:d27ee2440829 | 12 | { |
| el17arm | 3:d27ee2440829 | 13 | //platforms |
| el17arm | 8:9bc80e40ac0d | 14 | |
| el17arm | 11:61f28e3448d3 | 15 | lcd.drawRect(0,HEIGHT -1,84,1,FILL_BLACK); |
| el17arm | 14:dc3524d11921 | 16 | lcd.drawRect(11,HEIGHT - 9, 38, 2, FILL_TRANSPARENT); |
| el17arm | 11:61f28e3448d3 | 17 | lcd.drawRect(55,HEIGHT - 11, 30, 2, FILL_TRANSPARENT); |
| el17arm | 11:61f28e3448d3 | 18 | lcd.drawRect(WIDTH - 9,HEIGHT - 19, 8, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 19 | lcd.drawRect(22, 25, 48, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 20 | lcd.drawRect(0, 25, 12, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 21 | lcd.drawRect(0, 17, 8, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 22 | lcd.drawRect(0, 9, 84, 2, FILL_BLACK); |
| el17arm | 14:dc3524d11921 | 23 | |
| el17arm | 14:dc3524d11921 | 24 | //solid blocks |
| el17arm | 14:dc3524d11921 | 25 | |
| el17arm | 14:dc3524d11921 | 26 | lcd.drawSprite(49,37,3,3,(int *)solid_block); |
| el17arm | 14:dc3524d11921 | 27 | lcd.drawSprite(52,37,3,3,(int *)solid_block); |
| el17arm | 15:2bda80896a84 | 28 | lcd.drawSprite(45,22,3,3,(int *)solid_block); |
| el17arm | 15:2bda80896a84 | 29 | lcd.drawSprite(42,22,3,3,(int *)solid_block); |
| el17arm | 10:65a6866d418b | 30 | } |
| el17arm | 8:9bc80e40ac0d | 31 |