[nostalgia,studio] Fixes for Ox changes

This commit is contained in:
Gary Talent 2024-05-03 00:00:05 -05:00
parent d2a3cfa72e
commit 6a4b48221f
2 changed files with 6 additions and 3 deletions

View File

@ -32,8 +32,7 @@ void panic(const char *file, int line, const char *panicMsg, ox::Error const&err
std::ignore = initConsole(*ctx);
setBgStatus(*ctx, 0, true);
clearBg(*ctx, 0);
ox::IString<23> serr = "Error code: ";
serr += static_cast<int64_t>(err);
auto const serr = ox::sfmt<ox::IString<23>>("Error code: {}", static_cast<int64_t>(err));
puts(*ctx, 32 + 1, 1, "SADNESS...");
puts(*ctx, 32 + 1, 4, "UNEXPECTED STATE:");
puts(*ctx, 32 + 2, 6, panicMsg);

View File

@ -8,6 +8,8 @@
#include <ox/std/point.hpp>
#include <keel/media.hpp>
#include "ox/std/buffer.hpp"
#include "ox/std/cstrops.hpp"
#include "tilesheeteditor-imgui.hpp"
namespace nostalgia::core {
@ -440,7 +442,9 @@ void TileSheetEditorImGui::drawPaletteSelector() noexcept {
ImGui::PushID(static_cast<int>(i));
// Column: color idx
ImGui::TableNextColumn();
auto const label = ox::IString<8>() + (i + 1);
ox::IString<8> label;
ox::CharBuffWriter w(label.data(), label.bytes());
std::ignore = ox::writeItoa(i + 1, w);
auto const rowSelected = i == m_view.palIdx();
if (ImGui::Selectable(label.c_str(), rowSelected, ImGuiSelectableFlags_SpanAllColumns)) {
m_view.setPalIdx(i);