ELEC2645 (2018/19) / Mbed 2 deprecated el17ttds

Dependencies:   mbed N5110_tf

Map/Map.h

Committer:
el17ttds
Date:
2019-05-08
Revision:
6:e8c03f264ffc
Parent:
4:3446009e2f38
Child:
9:3a0194c87afe

File content as of revision 6:e8c03f264ffc:

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"

class Map { // Deals with information regarding the maps outer walls

public:
  Map();
  void init(int width, int height, int swidth, int sheight);
  void write(int x1, int y1);
  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;
};