diff --git a/src/jasper/modules/world/include/jasper/world/worldstatic.hpp b/src/jasper/modules/world/include/jasper/world/worldstatic.hpp index 35c310b..a0e88ad 100644 --- a/src/jasper/modules/world/include/jasper/world/worldstatic.hpp +++ b/src/jasper/modules/world/include/jasper/world/worldstatic.hpp @@ -17,20 +17,16 @@ namespace jasper::world { namespace ncore = nostalgia::core; constexpr void setTopEdge(uint8_t &layerAttachments, uint8_t const val) noexcept { - auto const val8 = static_cast(val); - layerAttachments = (layerAttachments & 0b11111100) | val8; + layerAttachments = static_cast((layerAttachments & 0b11111100) | val); } constexpr void setBottomEdge(uint8_t &layerAttachments, uint8_t const val) noexcept { - auto const val8 = static_cast(val); - layerAttachments = (layerAttachments & 0b11110011) | (val8 << 2); + layerAttachments = static_cast((layerAttachments & 0b11110011) | (val << 2)); } constexpr void setLeftEdge(uint8_t &layerAttachments, uint8_t const val) noexcept { - auto const val8 = static_cast(val); - layerAttachments = (layerAttachments & 0b11001111) | (val8 << 4); + layerAttachments = static_cast((layerAttachments & 0b11001111) | (val << 4)); } constexpr void setRightEdge(uint8_t &layerAttachments, uint8_t const val) noexcept { - auto const val8 = static_cast(val); - layerAttachments = (layerAttachments & 0b00111111) | (val8 << 6); + layerAttachments = static_cast((layerAttachments & 0b00111111) | (val << 6)); } [[nodiscard]] @@ -161,7 +157,7 @@ constexpr size_t layers(WorldStatic const&ws) noexcept { [[nodiscard]] auto &tile( ox::CommonRefWith auto&ws, - size_t lyr, + size_t const lyr, ox::IntegerRange_c<500> auto col, ox::IntegerRange_c<500> auto row) noexcept { auto const idx = static_cast(row) * static_cast(ws.columns) + static_cast(col);