Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. class GameStateGamePlay :public GameState
  2. {
  3.     Player m_player;// player object with information about him and everything related
  4.     Map m_Map;// World map
  5. };
  6.  
  7. class Player
  8. {
  9. public:
  10.     std::vector<bool>* GetMapRevealed() { return &m_mapRevealed; }
  11. private:
  12.     std::vector<bool> m_mapRevealed;
  13. };
  14.  
  15. class Map
  16. {
  17. public:
  18.     void Draw(Graphics& gfx);
  19.     void InitMapFog(std::vector<bool>* data);
  20. private:
  21.     std::vector<bool>* m_discovered;// layout of discovered map
  22. };
  23.  
  24. void Map::InitMapFog(std::vector<bool>* data)
  25. {
  26.     m_discovered = data;
  27. }
  28.  
  29. void Map::Draw(Graphics& gfx)
  30. {
  31.     if (!m_discovered[at + x]) // error here because of pointer i guess
  32.     {
  33.         //draw rect
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement