[nostalgia,olympic] Update for Ox changes
This commit is contained in:
parent
78955376d6
commit
0764720f9a
@ -32,7 +32,7 @@ void panic(const char *file, int line, const char *panicMsg, ox::Error const&err
|
|||||||
std::ignore = initConsole(*ctx);
|
std::ignore = initConsole(*ctx);
|
||||||
setBgStatus(*ctx, 0, true);
|
setBgStatus(*ctx, 0, true);
|
||||||
clearBg(*ctx, 0);
|
clearBg(*ctx, 0);
|
||||||
ox::BString<23> serr = "Error code: ";
|
ox::IString<23> serr = "Error code: ";
|
||||||
serr += static_cast<int64_t>(err);
|
serr += static_cast<int64_t>(err);
|
||||||
puts(*ctx, 32 + 1, 1, "SADNESS...");
|
puts(*ctx, 32 + 1, 1, "SADNESS...");
|
||||||
puts(*ctx, 32 + 1, 4, "UNEXPECTED STATE:");
|
puts(*ctx, 32 + 1, 4, "UNEXPECTED STATE:");
|
||||||
|
@ -13,7 +13,7 @@ core::PaletteChangeCommand::PaletteChangeCommand(
|
|||||||
m_img(img),
|
m_img(img),
|
||||||
m_idx(std::move(idx)),
|
m_idx(std::move(idx)),
|
||||||
m_oldPalette(m_img.defaultPalette),
|
m_oldPalette(m_img.defaultPalette),
|
||||||
m_newPalette(ox::FileAddress(ox::sfmt<ox::BString<43>>("uuid://{}", newPalette))) {
|
m_newPalette(ox::FileAddress(ox::sfmt<ox::IString<43>>("uuid://{}", newPalette))) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaletteChangeCommand::redo() noexcept {
|
void PaletteChangeCommand::redo() noexcept {
|
||||||
|
@ -64,6 +64,7 @@ static ox::Error toPngFile(
|
|||||||
for (auto &c : pixels) {
|
for (auto &c : pixels) {
|
||||||
c = color32(color(pal, page, c)) | static_cast<Color32>(0XFF << 24);
|
c = color32(color(pal, page, c)) | static_cast<Color32>(0XFF << 24);
|
||||||
}
|
}
|
||||||
|
std::hash<std::string>();
|
||||||
constexpr auto fmt = LCT_RGBA;
|
constexpr auto fmt = LCT_RGBA;
|
||||||
return OxError(static_cast<ox::ErrorCode>(
|
return OxError(static_cast<ox::ErrorCode>(
|
||||||
lodepng_encode_file(
|
lodepng_encode_file(
|
||||||
@ -440,7 +441,7 @@ void TileSheetEditorImGui::drawPaletteSelector() noexcept {
|
|||||||
ImGui::PushID(static_cast<int>(i));
|
ImGui::PushID(static_cast<int>(i));
|
||||||
// Column: color idx
|
// Column: color idx
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
auto const label = ox::BString<8>() + (i + 1);
|
auto const label = ox::IString<8>() + (i + 1);
|
||||||
auto const rowSelected = i == m_view.palIdx();
|
auto const rowSelected = i == m_view.palIdx();
|
||||||
if (ImGui::Selectable(label.c_str(), rowSelected, ImGuiSelectableFlags_SpanAllColumns)) {
|
if (ImGui::Selectable(label.c_str(), rowSelected, ImGuiSelectableFlags_SpanAllColumns)) {
|
||||||
m_view.setPalIdx(i);
|
m_view.setPalIdx(i);
|
||||||
|
@ -28,7 +28,7 @@ class TileSheetEditorImGui: public studio::Editor {
|
|||||||
private:
|
private:
|
||||||
class SubSheetEditor {
|
class SubSheetEditor {
|
||||||
private:
|
private:
|
||||||
ox::BString<100> m_name;
|
ox::IString<100> m_name;
|
||||||
int m_cols = 0;
|
int m_cols = 0;
|
||||||
int m_rows = 0;
|
int m_rows = 0;
|
||||||
bool m_show = false;
|
bool m_show = false;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
namespace nostalgia::scene {
|
namespace nostalgia::scene {
|
||||||
|
|
||||||
class SceneModule: public keel::Module {
|
static class: public keel::Module {
|
||||||
private:
|
private:
|
||||||
SceneDocToSceneStaticConverter m_sceneDocToSceneStaticConverter;
|
SceneDocToSceneStaticConverter m_sceneDocToSceneStaticConverter;
|
||||||
|
|
||||||
@ -42,9 +42,8 @@ class SceneModule: public keel::Module {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
} mod;
|
||||||
|
|
||||||
static const SceneModule mod;
|
|
||||||
const keel::Module *keelModule() noexcept {
|
const keel::Module *keelModule() noexcept {
|
||||||
return &mod;
|
return &mod;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class NewMenu: public studio::Popup {
|
|||||||
private:
|
private:
|
||||||
Stage m_stage = Stage::Closed;
|
Stage m_stage = Stage::Closed;
|
||||||
ox::String m_typeName;
|
ox::String m_typeName;
|
||||||
ox::BString<255> m_itemName;
|
ox::IString<255> m_itemName;
|
||||||
ox::Vector<ox::UniquePtr<studio::ItemMaker>> m_types;
|
ox::Vector<ox::UniquePtr<studio::ItemMaker>> m_types;
|
||||||
int m_selectedType = 0;
|
int m_selectedType = 0;
|
||||||
bool m_open = false;
|
bool m_open = false;
|
||||||
|
@ -28,7 +28,7 @@ class NewProject: public studio::Popup {
|
|||||||
Stage m_stage = Stage::Closed;
|
Stage m_stage = Stage::Closed;
|
||||||
ox::String const m_projectDataDir;
|
ox::String const m_projectDataDir;
|
||||||
ox::String m_projectPath;
|
ox::String m_projectPath;
|
||||||
ox::BString<255> m_projectName;
|
ox::IString<255> m_projectName;
|
||||||
ox::Vector<ox::UniquePtr<studio::ItemMaker>> m_types;
|
ox::Vector<ox::UniquePtr<studio::ItemMaker>> m_types;
|
||||||
bool m_open = false;
|
bool m_open = false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user