Fix scaling
not happy with having to do this, but whatever
This commit is contained in:
parent
398a5655f4
commit
7999442f01
@ -66,7 +66,6 @@ LuaAnimationComponent<Base>::LuaAnimationComponent() {
|
||||
if (renderLayerName)
|
||||
renderLayer = parseRenderLayer(*renderLayerName);
|
||||
|
||||
drawable.scale(1.0f / TilePixels);
|
||||
m_drawables.append({move(drawable), renderLayer});
|
||||
});
|
||||
animationCallbacks.registerCallback("clearLightSources", [this]() {
|
||||
|
@ -449,7 +449,12 @@ Maybe<Drawable> LuaConverter<Drawable>::to(LuaEngine& engine, LuaValue const& v)
|
||||
else if (auto poly = table->get<Maybe<PolyF>>("poly"))
|
||||
drawable = Drawable::makePoly(poly.take(), color);
|
||||
else if (auto image = table->get<Maybe<String>>("image"))
|
||||
drawable = Drawable::makeImage(image.take(), 1.0f, table->get<Maybe<bool>>("centered").value(true), Vec2F(), color);
|
||||
drawable = Drawable::makeImage(
|
||||
image.take(),
|
||||
table->get<Maybe<bool>>("screenSpace").value(false) ? 1.0f : 1.0f / TilePixels,
|
||||
table->get<Maybe<bool>>("centered").value(true),
|
||||
Vec2F(),
|
||||
color);
|
||||
else
|
||||
return {}; // throw LuaAnimationComponentException("Drawable table must have 'line', 'poly', or 'image'");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user