[nostalgia/core/userland] Fix CLion warnnings

This commit is contained in:
Gary Talent 2022-08-03 00:38:01 -05:00
parent 41b1c6eb25
commit ef04e03d11

View File

@ -19,13 +19,13 @@ void ImGui_Impl_NewFrame() noexcept;
namespace renderer { namespace renderer {
constexpr auto TileRows = 128; constexpr uint64_t TileRows = 128;
constexpr auto TileColumns = 128; constexpr uint64_t TileColumns = 128;
constexpr auto TileCount = TileRows * TileColumns; constexpr uint64_t TileCount = TileRows * TileColumns;
constexpr unsigned BgVertexVboRows = 4; constexpr uint64_t BgVertexVboRows = 4;
constexpr unsigned BgVertexVboRowLength = 4; constexpr uint64_t BgVertexVboRowLength = 4;
constexpr unsigned BgVertexVboLength = BgVertexVboRows * BgVertexVboRowLength; constexpr uint64_t BgVertexVboLength = BgVertexVboRows * BgVertexVboRowLength;
constexpr unsigned BgVertexEboLength = 6; constexpr uint64_t BgVertexEboLength = 6;
struct CBB: public glutils::BufferSet { struct CBB: public glutils::BufferSet {
bool updated = false; bool updated = false;
@ -179,7 +179,8 @@ static void drawBackgrounds(GlImplData *id) noexcept {
for (auto &bg : id->backgrounds) { for (auto &bg : id->backgrounds) {
if (bg.enabled) { if (bg.enabled) {
auto &cbb = id->cbbs[bg.cbbIdx]; auto &cbb = id->cbbs[bg.cbbIdx];
glUniform1f(uniformTileHeight, 1.0f / static_cast<float>(cbb.tex.height / 8)); const auto tileRows = cbb.tex.height / TileHeight;
glUniform1f(uniformTileHeight, 1.0f / static_cast<float>(tileRows));
drawBackground(&cbb); drawBackground(&cbb);
} }
} }