Last active
June 21, 2022 07:04
-
-
Save KartikShrivastava/e76bdb3bf6a7ff564f9003dbb05c2d3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtual bool for_each(pugi::xml_node& node) { | |
for(pugi::xml_attribute attr : node.attributes()) { | |
if(strcmp(node.name(),"tileset") == 0){ | |
if(strcmp(attr.name(),"tilewidth") == 0) | |
background->set_tile_width(std::stoi(attr.value())); | |
else if(strcmp(attr.name(),"tileheight") == 0) | |
background->set_tile_height(std::stoi(attr.value())); | |
// truncated code ... | |
} | |
// truncated code ... | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment