Scuffed lambda function passing for tile group handling. Need to prep multi-layer rendering for tile groups.

This commit is contained in:
2023-09-07 03:28:37 -05:00
parent c75e56d642
commit d601f0945a
6 changed files with 61 additions and 76 deletions
+4 -4
View File
@@ -324,7 +324,7 @@ namespace olc
olc::vf2d TransformedView::WorldToScreen(const olc::vf2d& vWorldPos) const
{
olc::vf2d vFloat = ((vWorldPos - m_vWorldOffset) * m_vWorldScale);
olc::vf2d vFloat = ((vd2d(vWorldPos) - vd2d(m_vWorldOffset)) * vd2d(m_vWorldScale));
//vFloat = { std::floor(vFloat.x + 0.5f), std::floor(vFloat.y + 0.5f) };
return vFloat;
}
@@ -551,17 +551,17 @@ namespace olc
void TransformedView::DrawDecal(const olc::vf2d & pos, olc::Decal * decal, const olc::vf2d & scale, const olc::Pixel & tint)
{
pge->DrawDecal(WorldToScreen(pos), decal, scale * m_vWorldScale * m_vRecipPixel, tint);
pge->DrawDecal(WorldToScreen(pos), decal, vd2d(scale) * vd2d(m_vWorldScale) * vd2d(m_vRecipPixel), tint);
}
void TransformedView::DrawPartialDecal(const olc::vf2d & pos, olc::Decal * decal, const olc::vf2d & source_pos, const olc::vf2d & source_size, const olc::vf2d & scale, const olc::Pixel & tint)
{
pge->DrawPartialDecal(WorldToScreen(pos), decal, source_pos, source_size, scale * m_vWorldScale * m_vRecipPixel, tint);
pge->DrawPartialDecal(WorldToScreen(pos), decal, source_pos, source_size, vd2d(scale)* vd2d(m_vWorldScale) * vd2d(m_vRecipPixel), tint);
}
void TransformedView::DrawPartialDecal(const olc::vf2d & pos, const olc::vf2d & size, olc::Decal * decal, const olc::vf2d & source_pos, const olc::vf2d & source_size, const olc::Pixel & tint)
{
pge->DrawPartialDecal(WorldToScreen(pos), size * m_vWorldScale * m_vRecipPixel, decal, source_pos, source_size, tint);
pge->DrawPartialDecal(WorldToScreen(pos), vd2d(size)* vd2d(m_vWorldScale) * vd2d(m_vRecipPixel), decal, source_pos, source_size, tint);
}
void TransformedView::DrawExplicitDecal(olc::Decal* decal, const olc::vf2d* pos, const olc::vf2d* uv, const olc::Pixel* col, uint32_t elements)