SHARE
TWEET

Untitled

a guest Dec 13th, 2013 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #pragma once
  2.  
  3. #include <map>
  4. #include <string>
  5. #include <fstream>
  6.  
  7. //klasa MMPMap
  8. //laduje i zapisuje pliki map MMP
  9. class MMPMap
  10. {
  11. private:
  12.         int sizeX, sizeY; //rozmiar mapy
  13.         int* mapData; //dane mapy
  14.         std::map<std::string, std::string> properties;
  15.  
  16. public:
  17.         MMPMap(int sizeX, int sizeY); //konstruktor - tworzy pusta mape o rozmiarze x * y
  18.         MMPMap(std::string fileName); //konstruktor - laduje mape z pliku
  19.         ~MMPMap(); //destruktor
  20.  
  21.         int getSizeX(); //pobranie szerokosci mapy
  22.         int getSizeY(); //pobranie wysokosci mapy
  23.         int getField(int x, int y); //pobranie pola mapy
  24.         void setField(int x, int y, int value); //ustawienie pola mapy
  25.  
  26.         void setProperty(std::string propertyName, std::string propertyValue); //ustawia wlasciwosc mapy
  27.         std::string getProperty(std::string propertyName); //pobiera wlasciwosc mapy
  28.  
  29.         bool saveToFile(std::string fileName); //zapisuje mape do pliku
  30. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top