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@12:adf4ec04ced2, 2019-03-28 (annotated)
- Committer:
- el17arm
- Date:
- Thu Mar 28 22:30:56 2019 +0000
- Revision:
- 12:adf4ec04ced2
- Parent:
- 11:61f28e3448d3
- Child:
- 13:3bf02cb26d6d
not ideal but made x & y coords global. ; ; This is because in levelengine I am getting p.x = 0 and is not updating in line with p.x in minerengine. This is holding me back so will proceed as above and will hopefully fix at later date
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 | 12:adf4ec04ced2 | 3 | extern int _x; |
| el17arm | 12:adf4ec04ced2 | 4 | extern int _y; |
| el17arm | 12:adf4ec04ced2 | 5 | |
| el17arm | 2:725c213b2396 | 6 | Levelengine::Levelengine() |
| el17arm | 2:725c213b2396 | 7 | { |
| el17arm | 2:725c213b2396 | 8 | } |
| el17arm | 2:725c213b2396 | 9 | |
| el17arm | 2:725c213b2396 | 10 | Levelengine::~Levelengine() |
| el17arm | 2:725c213b2396 | 11 | { |
| el17arm | 2:725c213b2396 | 12 | } |
| el17arm | 2:725c213b2396 | 13 | |
| el17arm | 11:61f28e3448d3 | 14 | void Levelengine::central_cavern(N5110 &lcd) |
| el17arm | 3:d27ee2440829 | 15 | { |
| el17arm | 3:d27ee2440829 | 16 | //platforms |
| el17arm | 8:9bc80e40ac0d | 17 | |
| el17arm | 11:61f28e3448d3 | 18 | lcd.drawRect(0,HEIGHT -1,84,1,FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 19 | lcd.drawRect(11,HEIGHT - 9, 44, 2, FILL_TRANSPARENT); |
| el17arm | 11:61f28e3448d3 | 20 | lcd.drawRect(55,HEIGHT - 11, 30, 2, FILL_TRANSPARENT); |
| el17arm | 11:61f28e3448d3 | 21 | lcd.drawRect(WIDTH - 9,HEIGHT - 19, 8, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 22 | lcd.drawRect(22, 25, 48, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 23 | lcd.drawRect(0, 25, 12, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 24 | lcd.drawRect(0, 17, 8, 2, FILL_BLACK); |
| el17arm | 11:61f28e3448d3 | 25 | lcd.drawRect(0, 9, 84, 2, FILL_BLACK); |
| el17arm | 6:866281ce2b44 | 26 | |
| el17arm | 12:adf4ec04ced2 | 27 | int miner_pos = miner.test(); |
| el17arm | 12:adf4ec04ced2 | 28 | |
| el17arm | 12:adf4ec04ced2 | 29 | |
| el17arm | 12:adf4ec04ced2 | 30 | printf("level = %i \n", _x); |
| el17arm | 10:65a6866d418b | 31 | } |
| el17arm | 8:9bc80e40ac0d | 32 | |
| el17arm | 8:9bc80e40ac0d | 33 |