Repo created

This commit is contained in:
Fr4nz D13trich 2025-11-22 13:58:55 +01:00
parent 4af19165ec
commit 68073add76
12458 changed files with 12350765 additions and 2 deletions

View file

@ -0,0 +1,36 @@
#pragma once
#include "scales.hpp"
namespace scales
{
#ifdef BUILD_DESIGNER
uint8_t constexpr kPatchScaleShift = 3;
inline uint32_t PatchMinDrawableScale(uint32_t s)
{
return (s < kPatchScaleShift ? 0 : s - kPatchScaleShift);
}
inline uint32_t PatchMaxDrawableScale(uint32_t s)
{
std::min(s + kPatchScaleShift, static_cast<uint32_t>(GetUpperStyleScale()));
}
#else // BUILD_DESIGNER
inline uint32_t PatchMinDrawableScale(uint32_t s)
{
return s;
}
inline uint32_t PatchMaxDrawableScale(uint32_t s)
{
// Some features can start drawing after indexer's GetUpperScale(),
// so extend upper bound for valid IsDrawableInRange check.
return (s == GetUpperScale()) ? GetUpperStyleScale() : s;
}
#endif // BUILD_DESIGNER
} // namespace scales