From e78c4050462c2ae4fa4347af7f1236763d2b8f8f Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 31 May 2025 01:53:59 -0500 Subject: [PATCH] [nostalgia/gfx] Cleanup --- src/nostalgia/modules/gfx/include/nostalgia/gfx/color.hpp | 6 +++--- .../gfx/src/studio/paletteeditor/paletteeditor-imgui.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nostalgia/modules/gfx/include/nostalgia/gfx/color.hpp b/src/nostalgia/modules/gfx/include/nostalgia/gfx/color.hpp index 68f17a59..f59dc82c 100644 --- a/src/nostalgia/modules/gfx/include/nostalgia/gfx/color.hpp +++ b/src/nostalgia/modules/gfx/include/nostalgia/gfx/color.hpp @@ -142,9 +142,9 @@ constexpr Color16 color16(int r, int g, int b, int a = 0) noexcept { [[nodiscard]] constexpr Color16 color16(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 0) noexcept { return static_cast(ox::min(r, 31)) - | static_cast(ox::min(g, 31) << 5) - | static_cast(ox::min(b, 31) << 10) - | static_cast(a << 15); + | static_cast(ox::min(g, 31) << 5) + | static_cast(ox::min(b, 31) << 10) + | static_cast(a << 15); } static_assert(color16(0, 31, 0) == 992); diff --git a/src/nostalgia/modules/gfx/src/studio/paletteeditor/paletteeditor-imgui.cpp b/src/nostalgia/modules/gfx/src/studio/paletteeditor/paletteeditor-imgui.cpp index d133843c..af8d051e 100644 --- a/src/nostalgia/modules/gfx/src/studio/paletteeditor/paletteeditor-imgui.cpp +++ b/src/nostalgia/modules/gfx/src/studio/paletteeditor/paletteeditor-imgui.cpp @@ -311,7 +311,7 @@ void PaletteEditorImGui::drawColorEditor() noexcept { { ImGui::PushStyleColor( ImGuiCol_ChildBg, - color32(color16(static_cast(r), static_cast(g), static_cast(b))) | 0xff'00'00'00); + color32(color16(r, g, b)) | 0xff'00'00'00); ImGui::BeginChild("ColorPreview", {0, 25}); ImGui::EndChild(); ImGui::PopStyleColor();