[nostalgia/core] Cleanup

This commit is contained in:
Gary Talent 2021-05-30 15:52:05 -05:00
parent bae1f05038
commit faf8fa0668
3 changed files with 6 additions and 5 deletions

View File

@ -26,10 +26,10 @@ using Color32 = uint32_t;
[[nodiscard]]
constexpr Color32 toColor32(Color16 nc) noexcept {
Color32 r = static_cast<Color32>(((nc & 0b0000000000011111) >> 0) * 8);
Color32 g = static_cast<Color32>(((nc & 0b0000001111100000) >> 5) * 8);
Color32 b = static_cast<Color32>(((nc & 0b0111110000000000) >> 10) * 8);
Color32 a = 255;
const auto r = static_cast<Color32>(((nc & 0b0000000000011111) >> 0) * 8);
const auto g = static_cast<Color32>(((nc & 0b0000001111100000) >> 5) * 8);
const auto b = static_cast<Color32>(((nc & 0b0111110000000000) >> 10) * 8);
const auto a = static_cast<Color32>(255);
return r | (g << 8) | (b << 16) | (a << 24);
}

View File

@ -39,6 +39,8 @@ ox::Error initGfx(Context *ctx) noexcept {
glfwSetWindowUserPointer(id->window, ctx);
glfwMakeContextCurrent(id->window);
oxReturnError(renderer::init(ctx));
oxReturnError(OxError(glfwInit() != 0));
ImGui::CreateContext();
ImGui_ImplGlfw_InitForOpenGL(id->window, true);
return OxError(0);
}

View File

@ -8,7 +8,6 @@
#include <ox/claw/claw.hpp>
#include <nostalgia/core/gfx.hpp>
#include <nostalgia/core/gfx.hpp>
#include "gfx.hpp"