move sprite to a use future loading

This commit is contained in:
Konstantin Käfer
2014-07-31 18:14:26 +02:00
parent fa3a41136c
commit 75c079adb1
14 changed files with 144 additions and 146 deletions

View File

@@ -71,10 +71,10 @@ void Painter::renderFill(FillBucket& bucket, const FillProperties& properties, c
}
if ((fill_color[3] >= 1.0f) == (pass == Opaque)) {
const std::shared_ptr<Sprite> &sprite = map.getStyle()->sprite;
Sprite &sprite = *map.getSprite();
if (properties.image.size() && sprite) {
SpriteAtlas &spriteAtlas = *map.getSpriteAtlas();
Rect<uint16_t> imagePos = spriteAtlas.getImage(properties.image, *sprite);
Rect<uint16_t> imagePos = spriteAtlas.getImage(properties.image, sprite);
float factor = 8.0 / std::pow(2, map.getState().getIntegerZoom() - id.z);