[nostalgia,olympic] Fixes for Ox update
All checks were successful
Build / build (push) Successful in 2m25s
All checks were successful
Build / build (push) Successful in 2m25s
This commit is contained in:
parent
a20d7fd923
commit
3b8d13dce3
@ -70,7 +70,7 @@ void PaletteEditorImGui::drawColumn(ox::CStringView txt) noexcept {
|
||||
|
||||
void PaletteEditorImGui::drawColumn(uint64_t i) noexcept {
|
||||
ox::Array<char, 10> numStr;
|
||||
ox_itoa(i, numStr.data());
|
||||
ox::itoa(i, numStr.data());
|
||||
drawColumn(numStr.data());
|
||||
}
|
||||
|
||||
|
@ -410,12 +410,12 @@ void TileSheetEditorImGui::drawPaletteSelector() noexcept {
|
||||
if (pages > 1) {
|
||||
ImGui::Indent(20);
|
||||
ox::Array<char, 10> numStr;
|
||||
ox_itoa(m_model.palettePage() + 1, numStr.data());
|
||||
ox::itoa(m_model.palettePage() + 1, numStr.data());
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x - comboWidthSub);
|
||||
if (ImGui::BeginCombo("Page", numStr.data(), 0)) {
|
||||
for (auto n = 0u; n < pages; ++n) {
|
||||
auto const selected = (m_model.palettePage() == n);
|
||||
ox_itoa(n + 1, numStr.data());
|
||||
ox::itoa(n + 1, numStr.data());
|
||||
if (ImGui::Selectable(numStr.data(), selected) && m_model.palettePage() != n) {
|
||||
m_model.setPalettePage(n);
|
||||
}
|
||||
|
@ -134,12 +134,12 @@ ox::Result<char*> loadRom(ox::CRStringView) noexcept {
|
||||
// media section
|
||||
constexpr auto headerP2 = "R_______________";
|
||||
constexpr auto headerP1 = "KEEL_MEDIA_HEADE";
|
||||
constexpr auto headerP1Len = ox_strlen(headerP2);
|
||||
constexpr auto headerP2Len = ox_strlen(headerP1);
|
||||
constexpr auto headerP1Len = ox::strlen(headerP2);
|
||||
constexpr auto headerP2Len = ox::strlen(headerP1);
|
||||
constexpr auto headerLen = headerP1Len + headerP2Len;
|
||||
for (auto current = MEM_ROM; current < reinterpret_cast<char*>(0x0a000000); current += headerLen) {
|
||||
if (ox_memcmp(current, headerP1, headerP1Len) == 0 &&
|
||||
ox_memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
|
||||
if (ox::memcmp(current, headerP1, headerP1Len) == 0 &&
|
||||
ox::memcmp(current + headerP1Len, headerP2, headerP2Len) == 0) {
|
||||
return current + headerLen;
|
||||
}
|
||||
}
|
||||
|
@ -13,9 +13,9 @@ namespace studio {
|
||||
|
||||
FDFilterItem::FDFilterItem(ox::CRStringView pName, ox::CRStringView pSpec) noexcept {
|
||||
name.resize(pName.len() + 1);
|
||||
ox_strncpy(name.data(), pName.data(), pName.len());
|
||||
ox::strncpy(name.data(), pName.data(), pName.len());
|
||||
spec.resize(pSpec.len() + 1);
|
||||
ox_strncpy(spec.data(), pSpec.data(), pSpec.len());
|
||||
ox::strncpy(spec.data(), pSpec.data(), pSpec.len());
|
||||
}
|
||||
|
||||
static ox::Result<ox::String> toResult(nfdresult_t r, NFD::UniquePathN const&path) noexcept {
|
||||
|
@ -43,8 +43,8 @@ static ox::Result<std::size_t> findPreloadSection() noexcept {
|
||||
// media section
|
||||
constexpr auto headerP2 = "DER_____________";
|
||||
constexpr auto headerP1 = "KEEL_PRELOAD_HEA";
|
||||
constexpr auto headerP1Len = ox_strlen(headerP2);
|
||||
constexpr auto headerP2Len = ox_strlen(headerP1);
|
||||
constexpr auto headerP1Len = ox::strlen(headerP2);
|
||||
constexpr auto headerP2Len = ox::strlen(headerP1);
|
||||
constexpr auto headerLen = headerP1Len + headerP2Len;
|
||||
for (auto current = MEM_ROM; current < reinterpret_cast<char*>(0x0a000000); current += headerLen) {
|
||||
if (memcmp(current, headerP1, headerP1Len) == 0 &&
|
||||
|
@ -18,7 +18,7 @@ ox::String getClipboardText(Context &ctx) noexcept {
|
||||
|
||||
void setClipboardText(Context &ctx, ox::CRStringView text) noexcept {
|
||||
auto cstr = ox_malloca(text.bytes() + 1, char);
|
||||
ox_strncpy(cstr.get(), text.data(), text.bytes());
|
||||
ox::strncpy(cstr.get(), text.data(), text.bytes());
|
||||
glfwSetClipboardString(ctx.window, cstr.get());
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ ox::Error initGfx(Context &ctx) noexcept {
|
||||
|
||||
void setWindowTitle(Context &ctx, ox::CRStringView title) noexcept {
|
||||
auto cstr = ox_malloca(title.bytes() + 1, char);
|
||||
ox_strncpy(cstr.get(), title.data(), title.bytes());
|
||||
ox::strncpy(cstr.get(), title.data(), title.bytes());
|
||||
glfwSetWindowTitle(ctx.window, cstr.get());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user