We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I created 2 items with the top flag. When moving between them, a character appears "for a moment" and then hides behind the "top" sprite.
is it supposed to be like this or is it a bug?
`void Tile::drawCreatures(const Point& dest, LightView* lightView) { if (m_fill != Color::alpha) return; if (m_topDraws < m_topCorrection) return; // walking creatures for (const CreaturePtr& creature : m_walkingCreatures) { if (creature->isHidden()) continue; Point creatureDest(dest.x + ((creature->getPrewalkingPosition().x - m_position.x) * g_sprites.spriteSize() - m_drawElevation * g_sprites.getOffsetFactor()), dest.y + ((creature->getPrewalkingPosition().y - m_position.y) * g_sprites.spriteSize() - m_drawElevation * g_sprites.getOffsetFactor())); creature->draw(creatureDest, true, lightView); } // creatures std::vector<CreaturePtr> creaturesToDraw; int limit = g_adaptiveRenderer.creaturesLimit(); for (auto& thing : m_things) { if (!thing->isCreature() || thing->isHidden()) continue; if (limit-- <= 0) break; CreaturePtr creature = thing->static_self_cast<Creature>(); if (!creature || creature->isWalking()) continue; creature->draw(dest - m_drawElevation * g_sprites.getOffsetFactor(), true, lightView); } }
void Tile::drawTop(const Point& dest, LightView* lightView) { if (m_fill != Color::alpha) return; if (m_topDraws++ < m_topCorrection) return; // walking creatures for (const CreaturePtr& creature : m_walkingCreatures) { if (creature->isHidden()) continue; Point creatureDest(dest.x + ((creature->getPrewalkingPosition().x - m_position.x) * g_sprites.spriteSize() - m_drawElevation * g_sprites.getOffsetFactor()), dest.y + ((creature->getPrewalkingPosition().y - m_position.y) * g_sprites.spriteSize() - m_drawElevation * g_sprites.getOffsetFactor())); creature->draw(creatureDest, true, lightView); } // creatures std::vector<CreaturePtr> creaturesToDraw; int limit = g_adaptiveRenderer.creaturesLimit(); for (auto& thing : m_things) { if (!thing->isCreature() || thing->isHidden()) continue; if (limit-- <= 0) break; CreaturePtr creature = thing->static_self_cast<Creature>(); if (!creature || creature->isWalking()) continue; creature->draw(dest - m_drawElevation * g_sprites.getOffsetFactor(), true, lightView); } // effects limit = std::min<int>((int)m_effects.size() - 1, g_adaptiveRenderer.effetsLimit()); for (int i = limit; i >= 0; --i) { if (m_effects[i]->isHidden()) continue; m_effects[i]->draw(dest - m_drawElevation * g_sprites.getOffsetFactor(), m_position.x - g_map.getCentralPosition().x, m_position.y - g_map.getCentralPosition().y, true, lightView); } // top for (const ThingPtr& thing : m_things) { if (!thing->isOnTop() || thing->isHidden()) continue; thing->draw(dest, true, lightView); } }`
under the comment "// walking creatures" there is the code responsible for this. there is the same code in 2 functions.
The text was updated successfully, but these errors were encountered:
the idea of item on top is to Cover anything under neath it. you can change it in spr dat flags.
Sorry, something went wrong.
No branches or pull requests
I created 2 items with the top flag. When moving between them, a character appears "for a moment" and then hides behind the "top" sprite.
is it supposed to be like this or is it a bug?
under the comment "// walking creatures" there is the code responsible for this. there is the same code in 2 functions.
The text was updated successfully, but these errors were encountered: