Skip to content

Commit

Permalink
fix: incorrect big items drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
nekiro authored Jan 13, 2025
1 parent 69352a9 commit 50cfc90
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/framework/graphics/drawpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ void DrawPool::add(const Color& color, const TexturePtr& texture, DrawMethod&& m
if (!updateHash(method, texture, color, coordsBuffer != nullptr))
return;

bool agroup = m_alwaysGroupDrawings || conductor.agroup;

uint8_t order = conductor.order;
if (m_type == DrawPoolType::FOREGROUND)
if (m_type == DrawPoolType::FOREGROUND) {
order = FIRST;
else if (m_type == DrawPoolType::MAP && order == FIRST && !conductor.agroup)
agroup = false;
} else if (m_type == DrawPoolType::MAP && order == FIRST && !conductor.agroup)
order = THIRD;

if (m_alwaysGroupDrawings || conductor.agroup) {
if (agroup) {
auto& coords = m_coords.try_emplace(getCurrentState().hash, nullptr).first->second;
if (!coords) {
auto state = getState(texture, color);
Expand Down

0 comments on commit 50cfc90

Please sign in to comment.