[nostalgia/core] Cleanup
This commit is contained in:
parent
bae1f05038
commit
faf8fa0668
@ -26,10 +26,10 @@ using Color32 = uint32_t;
|
|||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
constexpr Color32 toColor32(Color16 nc) noexcept {
|
constexpr Color32 toColor32(Color16 nc) noexcept {
|
||||||
Color32 r = static_cast<Color32>(((nc & 0b0000000000011111) >> 0) * 8);
|
const auto r = static_cast<Color32>(((nc & 0b0000000000011111) >> 0) * 8);
|
||||||
Color32 g = static_cast<Color32>(((nc & 0b0000001111100000) >> 5) * 8);
|
const auto g = static_cast<Color32>(((nc & 0b0000001111100000) >> 5) * 8);
|
||||||
Color32 b = static_cast<Color32>(((nc & 0b0111110000000000) >> 10) * 8);
|
const auto b = static_cast<Color32>(((nc & 0b0111110000000000) >> 10) * 8);
|
||||||
Color32 a = 255;
|
const auto a = static_cast<Color32>(255);
|
||||||
return r | (g << 8) | (b << 16) | (a << 24);
|
return r | (g << 8) | (b << 16) | (a << 24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@ ox::Error initGfx(Context *ctx) noexcept {
|
|||||||
glfwSetWindowUserPointer(id->window, ctx);
|
glfwSetWindowUserPointer(id->window, ctx);
|
||||||
glfwMakeContextCurrent(id->window);
|
glfwMakeContextCurrent(id->window);
|
||||||
oxReturnError(renderer::init(ctx));
|
oxReturnError(renderer::init(ctx));
|
||||||
|
oxReturnError(OxError(glfwInit() != 0));
|
||||||
|
ImGui::CreateContext();
|
||||||
ImGui_ImplGlfw_InitForOpenGL(id->window, true);
|
ImGui_ImplGlfw_InitForOpenGL(id->window, true);
|
||||||
return OxError(0);
|
return OxError(0);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include <ox/claw/claw.hpp>
|
#include <ox/claw/claw.hpp>
|
||||||
#include <nostalgia/core/gfx.hpp>
|
#include <nostalgia/core/gfx.hpp>
|
||||||
#include <nostalgia/core/gfx.hpp>
|
|
||||||
|
|
||||||
#include "gfx.hpp"
|
#include "gfx.hpp"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user