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.
Map/Map.h@4:3446009e2f38, 2019-05-07 (annotated)
- Committer:
- el17ttds
- Date:
- Tue May 07 19:25:20 2019 +0000
- Revision:
- 4:3446009e2f38
- Parent:
- 3:3d35ab70b565
- Child:
- 6:e8c03f264ffc
Free movement from engine not map
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17ttds | 2:ee9b361ba6df | 1 | #include "mbed.h" |
el17ttds | 2:ee9b361ba6df | 2 | #include "N5110.h" |
el17ttds | 2:ee9b361ba6df | 3 | #include "Gamepad.h" |
el17ttds | 2:ee9b361ba6df | 4 | |
el17ttds | 2:ee9b361ba6df | 5 | class Map { |
el17ttds | 3:3d35ab70b565 | 6 | |
el17ttds | 2:ee9b361ba6df | 7 | public: |
el17ttds | 4:3446009e2f38 | 8 | Map(); |
el17ttds | 4:3446009e2f38 | 9 | void init(int width, int height, int swidth, int sheight); |
el17ttds | 4:3446009e2f38 | 10 | void write(int x1, int y1); |
el17ttds | 4:3446009e2f38 | 11 | void draw(N5110 &lcd); |
el17ttds | 2:ee9b361ba6df | 12 | private: |
el17ttds | 4:3446009e2f38 | 13 | void map_parameters(); |
el17ttds | 4:3446009e2f38 | 14 | void horizontal(); |
el17ttds | 4:3446009e2f38 | 15 | void veritical(); |
el17ttds | 4:3446009e2f38 | 16 | int _w; // changing dimensions of top and left sides of map |
el17ttds | 4:3446009e2f38 | 17 | int _h; |
el17ttds | 4:3446009e2f38 | 18 | int _x1; // origin locations of map corners |
el17ttds | 4:3446009e2f38 | 19 | int _y1; |
el17ttds | 4:3446009e2f38 | 20 | int _x2; |
el17ttds | 4:3446009e2f38 | 21 | int _y2; |
el17ttds | 4:3446009e2f38 | 22 | int _swidth; // dimensions of screen |
el17ttds | 4:3446009e2f38 | 23 | int _sheight; |
el17ttds | 4:3446009e2f38 | 24 | int _width; // dimensions of avaliable space in game |
el17ttds | 4:3446009e2f38 | 25 | int _height; |
el17ttds | 4:3446009e2f38 | 26 | int _x1_pos; |
el17ttds | 4:3446009e2f38 | 27 | int _y1_pos; |
el17ttds | 4:3446009e2f38 | 28 | }; |