Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GameStateGamePlay :public GameState
- {
- Player m_player;// player object with information about him and everything related
- Map m_Map;// World map
- };
- class Player
- {
- public:
- std::vector<bool>* GetMapRevealed() { return &m_mapRevealed; }
- private:
- std::vector<bool> m_mapRevealed;
- };
- class Map
- {
- public:
- void Draw(Graphics& gfx);
- void InitMapFog(std::vector<bool>* data);
- private:
- std::vector<bool>* m_discovered;// layout of discovered map
- };
- void Map::InitMapFog(std::vector<bool>* data)
- {
- m_discovered = data;
- }
- void Map::Draw(Graphics& gfx)
- {
- if (!m_discovered[at + x]) // error here because of pointer i guess
- {
- //draw rect
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement