Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Game::render()
- {
- window.clear();
- //this rebuilds the terrain vertex array
- if (!mapObj.tmap.load(mapObj.tmap.getTileSet(),
- sf::Vector2u(64, 64),
- mapObj.getTerrainType(),
- mapObj.getMapWidth(),
- mapObj.getMapHeight()));
- //this rebuilds the npc vertex array
- if (!mapObj.tmap.load(mapObj.tmap.getTileSet(),
- sf::Vector2u(64, 64),
- mapObj.getNpcType(),
- mapObj.getMapWidth(),
- mapObj.getMapHeight()));
- window.draw(mapObj.tmap);
- window.draw(mapObj.nmap);
- window.display();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement