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.
Level/Level.h@6:2ca1516ec1e2, 2019-04-10 (annotated)
- Committer:
- joshdavy
- Date:
- Wed Apr 10 11:03:07 2019 +0000
- Revision:
- 6:2ca1516ec1e2
- Child:
- 7:68e06dda79f7
Began implementing "levels" which store the blocks/enemies of each stage
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joshdavy | 6:2ca1516ec1e2 | 1 | #ifndef LEVEL_H |
joshdavy | 6:2ca1516ec1e2 | 2 | #define LEVEL_H |
joshdavy | 6:2ca1516ec1e2 | 3 | |
joshdavy | 6:2ca1516ec1e2 | 4 | #include "mbed.h" |
joshdavy | 6:2ca1516ec1e2 | 5 | #include "N5110.h" |
joshdavy | 6:2ca1516ec1e2 | 6 | #include "Gamepad.h" |
joshdavy | 6:2ca1516ec1e2 | 7 | #include "Bitmap.h" |
joshdavy | 6:2ca1516ec1e2 | 8 | |
joshdavy | 6:2ca1516ec1e2 | 9 | #define GRAVITY 2 |
joshdavy | 6:2ca1516ec1e2 | 10 | /*Level Class*/ |
joshdavy | 6:2ca1516ec1e2 | 11 | |
joshdavy | 6:2ca1516ec1e2 | 12 | |
joshdavy | 6:2ca1516ec1e2 | 13 | class Level { |
joshdavy | 6:2ca1516ec1e2 | 14 | |
joshdavy | 6:2ca1516ec1e2 | 15 | public: |
joshdavy | 6:2ca1516ec1e2 | 16 | Level(); |
joshdavy | 6:2ca1516ec1e2 | 17 | ~Level(); |
joshdavy | 6:2ca1516ec1e2 | 18 | void init(Vector2D blocks [][2],int number_of_blocks); |
joshdavy | 6:2ca1516ec1e2 | 19 | void render(N5110 &lcd); |
joshdavy | 6:2ca1516ec1e2 | 20 | |
joshdavy | 6:2ca1516ec1e2 | 21 | |
joshdavy | 6:2ca1516ec1e2 | 22 | |
joshdavy | 6:2ca1516ec1e2 | 23 | private: |
joshdavy | 6:2ca1516ec1e2 | 24 | Vector2D _blocks [][2] ; |
joshdavy | 6:2ca1516ec1e2 | 25 | int _number_of_blocks; |
joshdavy | 6:2ca1516ec1e2 | 26 | }; |
joshdavy | 6:2ca1516ec1e2 | 27 | |
joshdavy | 6:2ca1516ec1e2 | 28 | #endif |