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
- Committer:
- el17ttds
- Date:
- 2019-05-12
- Revision:
- 11:fd7f7b531e50
- Parent:
- 9:3a0194c87afe
File content as of revision 11:fd7f7b531e50:
/** My Map Class * @brief Stores and draws all map parameters. * @author Thomas Foster * @date May, 2019 */ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" class Map { public: /** Constructor */ Map(); /** Initialises Maps's variables * @param width (int) * @param width (int) * @param screen width (int) * @param screen height (int) */ void init(int width, int height, int swidth, int sheight); /** Re writes Maps parameters * @param x position (int) * @param y position (int) */ void write(int x1, int y1); /** Draws four rectangles on screen * @param The N5110 library (N5110) */ void draw(N5110 &lcd); private: void map_parameters(); void horizontal(); void veritical(); int _w; // changing dimensions of top and left sides of map int _h; int _x1; // origin locations of map corners int _y1; int _x2; int _y2; int _swidth; // dimensions of screen int _sheight; int _width; // dimensions of avaliable space in game int _height; int _x1_pos; int _y1_pos; };