[jasper/world] Fix compiler warnings
All checks were successful
Build / build (push) Successful in 3m49s
All checks were successful
Build / build (push) Successful in 3m49s
This commit is contained in:
parent
1d185e2036
commit
3fdcf49b65
@ -17,20 +17,16 @@ namespace jasper::world {
|
|||||||
namespace ncore = nostalgia::core;
|
namespace ncore = nostalgia::core;
|
||||||
|
|
||||||
constexpr void setTopEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
constexpr void setTopEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
||||||
auto const val8 = static_cast<uint8_t>(val);
|
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b11111100) | val);
|
||||||
layerAttachments = (layerAttachments & 0b11111100) | val8;
|
|
||||||
}
|
}
|
||||||
constexpr void setBottomEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
constexpr void setBottomEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
||||||
auto const val8 = static_cast<uint8_t>(val);
|
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b11110011) | (val << 2));
|
||||||
layerAttachments = (layerAttachments & 0b11110011) | (val8 << 2);
|
|
||||||
}
|
}
|
||||||
constexpr void setLeftEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
constexpr void setLeftEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
||||||
auto const val8 = static_cast<uint8_t>(val);
|
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b11001111) | (val << 4));
|
||||||
layerAttachments = (layerAttachments & 0b11001111) | (val8 << 4);
|
|
||||||
}
|
}
|
||||||
constexpr void setRightEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
constexpr void setRightEdge(uint8_t &layerAttachments, uint8_t const val) noexcept {
|
||||||
auto const val8 = static_cast<uint8_t>(val);
|
layerAttachments = static_cast<uint8_t>((layerAttachments & 0b00111111) | (val << 6));
|
||||||
layerAttachments = (layerAttachments & 0b00111111) | (val8 << 6);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
@ -161,7 +157,7 @@ constexpr size_t layers(WorldStatic const&ws) noexcept {
|
|||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
auto &tile(
|
auto &tile(
|
||||||
ox::CommonRefWith<WorldStatic> auto&ws,
|
ox::CommonRefWith<WorldStatic> auto&ws,
|
||||||
size_t lyr,
|
size_t const lyr,
|
||||||
ox::IntegerRange_c<500> auto col,
|
ox::IntegerRange_c<500> auto col,
|
||||||
ox::IntegerRange_c<500> auto row) noexcept {
|
ox::IntegerRange_c<500> auto row) noexcept {
|
||||||
auto const idx = static_cast<size_t>(row) * static_cast<size_t>(ws.columns) + static_cast<size_t>(col);
|
auto const idx = static_cast<size_t>(row) * static_cast<size_t>(ws.columns) + static_cast<size_t>(col);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user