Compare commits

...

6 Commits

Author SHA1 Message Date
b9ffae0269 [nostalgia/gfx] Cleanup
All checks were successful
Build / build (push) Successful in 1m18s
2025-06-23 00:47:46 -05:00
003f3e01c6 [nostalgia] Update release notes 2025-06-22 01:01:09 -05:00
9028e74af0 [nostalgia/gfx/studio/tilesheet] Disable paste when nothing is selected 2025-06-22 01:00:56 -05:00
f5ccab5f2c [studio] Cleanup 2025-06-21 19:19:39 -05:00
37cfa927d1 [nostalgia/gfx] Address a couple of implicit conversions
All checks were successful
Build / build (push) Successful in 1m19s
2025-06-21 14:16:17 -05:00
0efed70b57 [studio] Fix Studio to clear editor pointers when opening a new project
All checks were successful
Build / build (push) Successful in 1m20s
2025-06-21 14:12:45 -05:00
5 changed files with 27 additions and 25 deletions

View File

@@ -5,6 +5,7 @@
* Fix file deletion to close file even if not active * Fix file deletion to close file even if not active
* Fix file copy to work when creating a copy with the name of a previously * Fix file copy to work when creating a copy with the name of a previously
deleted file deleted file
* Fix crash that could occur after switching projects
* Make file picker popup accept on double click of a file * Make file picker popup accept on double click of a file
* TileSheetEditor: Fix copy/cut/paste enablement when there is no selection * TileSheetEditor: Fix copy/cut/paste enablement when there is no selection
* TileSheetEditor: Fix manual redo of draw actions, fix drawing to pixel 0, 0 * TileSheetEditor: Fix manual redo of draw actions, fix drawing to pixel 0, 0
@@ -13,8 +14,6 @@
subsheets subsheets
* PaletteEditor: Add RGB key shortcuts for focusing color channels * PaletteEditor: Add RGB key shortcuts for focusing color channels
* PaletteEditor: Add color preview to color editor * PaletteEditor: Add color preview to color editor
* PaletteEditor: Make RGB key shortcuts work when color channel inputs are
focused
# d2025.05.1 # d2025.05.1

View File

@@ -275,7 +275,7 @@ bool bgStatus(Context&, unsigned const bg) noexcept {
void setBgStatus(Context&, unsigned const bg, bool const status) noexcept { void setBgStatus(Context&, unsigned const bg, bool const status) noexcept {
constexpr auto Bg0Status = 8; constexpr auto Bg0Status = 8;
const auto mask = static_cast<uint32_t>(status) << (Bg0Status + bg); auto const mask = static_cast<uint32_t>(status) << (Bg0Status + bg);
REG_DISPCTL = REG_DISPCTL | ((REG_DISPCTL & ~mask) | mask); REG_DISPCTL = REG_DISPCTL | ((REG_DISPCTL & ~mask) | mask);
} }

View File

@@ -13,7 +13,7 @@ AddSubSheetCommand::AddSubSheetCommand(
auto &parent = getSubSheet(m_img, m_parentIdx); auto &parent = getSubSheet(m_img, m_parentIdx);
if (!parent.subsheets.empty()) { if (!parent.subsheets.empty()) {
auto idx = m_parentIdx; auto idx = m_parentIdx;
idx.emplace_back(parent.subsheets.size()); idx.emplace_back(static_cast<uint32_t>(parent.subsheets.size()));
m_addedSheets.push_back(idx); m_addedSheets.push_back(idx);
} else { } else {
auto idx = m_parentIdx; auto idx = m_parentIdx;

View File

@@ -194,6 +194,7 @@ void TileSheetEditorImGui::keyStateChanged(turbine::Key const key, bool const do
void TileSheetEditorImGui::draw(studio::Context&) noexcept { void TileSheetEditorImGui::draw(studio::Context&) noexcept {
setCopyEnabled(m_model.hasSelection()); setCopyEnabled(m_model.hasSelection());
setCutEnabled(m_model.hasSelection()); setCutEnabled(m_model.hasSelection());
setPasteEnabled(m_model.hasSelection());
if (ig::mainWinHasFocus() && m_tool == TileSheetTool::Select) { if (ig::mainWinHasFocus() && m_tool == TileSheetTool::Select) {
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl) && !m_palPathFocused) { if (ImGui::IsKeyDown(ImGuiKey_ModCtrl) && !m_palPathFocused) {
if (ImGui::IsKeyPressed(ImGuiKey_A)) { if (ImGui::IsKeyPressed(ImGuiKey_A)) {
@@ -278,7 +279,7 @@ void TileSheetEditorImGui::draw(studio::Context&) noexcept {
auto insertOnIdx = m_model.activeSubSheetIdx(); auto insertOnIdx = m_model.activeSubSheetIdx();
auto const &parent = m_model.activeSubSheet(); auto const &parent = m_model.activeSubSheet();
m_model.addSubsheet(insertOnIdx); m_model.addSubsheet(insertOnIdx);
insertOnIdx.emplace_back(parent.subsheets.size() - 1); insertOnIdx.emplace_back(static_cast<uint32_t>(parent.subsheets.size() - 1));
setActiveSubsheet(insertOnIdx); setActiveSubsheet(insertOnIdx);
} }
ImGui::SameLine(); ImGui::SameLine();

View File

@@ -635,8 +635,7 @@ ox::Error StudioUI::openProjectPath(ox::StringParam path) noexcept {
keel::DuplicateSet ds; keel::DuplicateSet ds;
OX_RETURN_ERROR(keel::setRomFs(keelCtx(m_tctx), std::move(fs), ds)); OX_RETURN_ERROR(keel::setRomFs(keelCtx(m_tctx), std::move(fs), ds));
if (ds.size()) { if (ds.size()) {
ox::String msg; ox::String msg{"Multiple files have the same UUID:\n"};
msg += "Multiple files have the same UUID:\n";
for (auto const &k : ds.keys()) { for (auto const &k : ds.keys()) {
msg += ox::sfmt("\n\t{}:\n", k.toString()); msg += ox::sfmt("\n\t{}:\n", k.toString());
for (auto const &v : ds[k]) { for (auto const &v : ds[k]) {
@@ -649,6 +648,9 @@ ox::Error StudioUI::openProjectPath(ox::StringParam path) noexcept {
ox::make_unique_catch<Project>(keelCtx(m_tctx), std::move(path), m_projectDataDir) ox::make_unique_catch<Project>(keelCtx(m_tctx), std::move(path), m_projectDataDir)
.moveTo(m_project)); .moveTo(m_project));
m_sctx.project = m_project.get(); m_sctx.project = m_project.get();
m_activeEditor = nullptr;
m_activeEditorOnLastDraw = nullptr;
m_activeEditorUpdatePending = nullptr;
turbine::setWindowTitle( turbine::setWindowTitle(
m_tctx, ox::sfmt("{} - {}", keelCtx(m_tctx).appName, m_project->projectPath())); m_tctx, ox::sfmt("{} - {}", keelCtx(m_tctx).appName, m_project->projectPath()));
m_deleteConfirmation.deleteFile.connect(m_sctx.project, &Project::deleteItem); m_deleteConfirmation.deleteFile.connect(m_sctx.project, &Project::deleteItem);