Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Schniz/robotikka. Lee Ve Tom Ve Ani Doin our Robottttt
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243#pragma once#include <vector>#include "../Managers/ConfigurationManager.h"#include "../Utils/pngUtil.h"#include <math.h>#include "Cell.h"#include "../lib/lodepng.h"
using namespace std;using namespace Managers;
class Map{public: unsigned m_Rows; unsigned m_Cols; Map(const char* filename); Map(unsigned Rows,unsigned Cols); ~Map();
void PrintMap(const char* filename);
inline unsigned getCols() { return m_Cols; };
inline unsigned getRows() { return m_Rows; };
Cell* getCell(int row, int col) const;
protected:
vector<vector<Cell*> > m_Cells; std::vector<unsigned char> FatGrid; std::vector<unsigned char> RegGrid;
private: void initMap(const char* filename); std::vector<unsigned char> CreatGridFromMap(std::vector<unsigned char> PngMap,unsigned MapHeight,unsigned MapWidth, float GridResolutionCm, float PixelPerCm, unsigned &GridCols, unsigned &GridRows);};