parse the json stylesheet

This commit is contained in:
Konstantin Käfer
2014-03-12 11:23:01 +01:00
parent 60229ed7db
commit 91d42911fb
12 changed files with 301 additions and 674 deletions

View File

@@ -30,8 +30,7 @@ void Map::setup(float pixelRatio) {
style.sprite = std::make_shared<Sprite>();
style.sprite->load(kSpriteURL, pixel_ratio);
style.load(resources::style, resources::style_size);
// style.loadJSON((const char *)resources::style, resources::style_size);
style.loadJSON(resources::style, resources::style_size);
}
void Map::loadSprite(const std::string& url) {
@@ -39,7 +38,7 @@ void Map::loadSprite(const std::string& url) {
}
void Map::loadStyle(const uint8_t *const data, uint32_t bytes) {
style.load(data, bytes);
style.loadJSON(data, bytes);
update();
}