Squashed 'deps/nostalgia/' changes from ab11b885..3fe62464
3fe62464 [nostalgia/sample_project] Add NS_Logo32 db55fc72 [nostalgia/player] Cleanup 20944508 [studio] Cleanup 889bec04 [nostalgia/gfx/studio/tilesheet] Cleanup ac1e34d4 [nostalgia] Update release notes 55ed75f4 [nostalgia/gfx/studio/tilesheet] Fix selection clearing to work when clicking outside image 2751872c [nostalgia] Cleanup file-to-cpp output 2a3cd35c [nostalgia] Fix release notes version, add d2025.02.1 b66f459f [nostalgia] Cleanup icon rsrc generation 3910f4e7 [nostalgia] Fix debug and gba-run commands in Makefile c0e96216 [turbine] Make accessor functions take const ref to Context f9512d72 [turbine/glfw] Fix implicit conversion b7f2c169 [nostalgia/studio/gfx] Fix typo 1e5057d6 [nostalgia] Add app icon note to release notes c6255e32 [nostalgia/studio] Add icon 16 src 02230ef6 [turbine,studio,nostalgia/studio] Add support for window icon scaling, expand icons sizes for Nostalgia Studio 9b6b60e4 [turbine] Cleanup b9a26ab6 [turbine] Fix GLFWimage member init order a521887d [studio,turbine] Add support for window icons 5ca7e2f2 [ox/fs] Cleanup 125a235d [ox/fs] Cleanup 91a7129f [nostalgia/gfx/keel] Cleanup df48a232 [nostalgia/studio] Add icon to Windows executable git-subtree-dir: deps/nostalgia git-subtree-split: 3fe62464c3ee45055e8c732840f949cdf373ae2a
This commit is contained in:
@@ -183,8 +183,8 @@ ox::Error TileSheetV4ToTileSheetV5Converter::convert(
|
||||
keel::Context&,
|
||||
TileSheetV4 &src,
|
||||
TileSheetV5 &dst) const noexcept {
|
||||
dst.bpp = src.bpp;
|
||||
dst.idIt = src.idIt;
|
||||
dst.bpp = src.bpp;
|
||||
dst.idIt = src.idIt;
|
||||
OX_RETURN_ERROR(src.defaultPalette.getPath().moveTo(dst.defaultPalette));
|
||||
convertSubsheet(dst.bpp, src.subsheet, dst.subsheet);
|
||||
return {};
|
||||
|
@@ -96,7 +96,7 @@ TileSheetEditorImGui::TileSheetEditorImGui(studio::StudioContext &sctx, ox::Stri
|
||||
m_model{m_view.model()} {
|
||||
// connect signal/slots
|
||||
m_subsheetEditor.inputSubmitted.connect(this, &TileSheetEditorImGui::updateActiveSubsheet);
|
||||
m_exportMenu.inputSubmitted.connect(this, &TileSheetEditorImGui::exportSubhseetToPng);
|
||||
m_exportMenu.inputSubmitted.connect(this, &TileSheetEditorImGui::exportSubsheetToPng);
|
||||
// load config
|
||||
auto const&config = studio::readConfig<TileSheetEditorConfig>(
|
||||
keelCtx(m_sctx), itemPath());
|
||||
@@ -397,7 +397,7 @@ void TileSheetEditorImGui::showSubsheetEditor() noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
ox::Error TileSheetEditorImGui::exportSubhseetToPng(int const scale) const noexcept {
|
||||
ox::Error TileSheetEditorImGui::exportSubsheetToPng(int const scale) const noexcept {
|
||||
OX_REQUIRE(path, studio::saveFile({{"PNG", "png"}}));
|
||||
// subsheet to png
|
||||
auto const&s = m_model.activeSubSheet();
|
||||
|
@@ -10,7 +10,6 @@
|
||||
#include <studio/editor.hpp>
|
||||
#include <studio/filepickerpopup.hpp>
|
||||
|
||||
#include "tilesheetpixelgrid.hpp"
|
||||
#include "tilesheetpixels.hpp"
|
||||
#include "tilesheeteditorview.hpp"
|
||||
|
||||
@@ -91,7 +90,7 @@ class TileSheetEditorImGui: public studio::Editor {
|
||||
private:
|
||||
void showSubsheetEditor() noexcept;
|
||||
|
||||
ox::Error exportSubhseetToPng(int scale) const noexcept;
|
||||
ox::Error exportSubsheetToPng(int scale) const noexcept;
|
||||
|
||||
void drawTileSheet(ox::Vec2 const&fbSize) noexcept;
|
||||
|
||||
@@ -99,8 +98,6 @@ class TileSheetEditorImGui: public studio::Editor {
|
||||
|
||||
ox::Error updateActiveSubsheet(ox::StringView const&name, int cols, int rows) noexcept;
|
||||
|
||||
// slots
|
||||
private:
|
||||
void setActiveSubsheet(TileSheet::SubSheetIdx path) noexcept;
|
||||
|
||||
};
|
||||
|
@@ -120,7 +120,7 @@ bool TileSheetEditorModel::acceptsClipboardPayload() const noexcept {
|
||||
return cb.ok();
|
||||
}
|
||||
|
||||
ox::StringView TileSheetEditorModel::palPath() const noexcept {
|
||||
ox::String const &TileSheetEditorModel::palPath() const & noexcept {
|
||||
return m_palPath;
|
||||
}
|
||||
|
||||
@@ -263,7 +263,13 @@ ox::Error TileSheetEditorModel::rotateRight() noexcept {
|
||||
}
|
||||
|
||||
void TileSheetEditorModel::setSelection(studio::Selection const&sel) noexcept {
|
||||
m_selection.emplace(sel);
|
||||
auto const &ss = activeSubSheet();
|
||||
if (sel.a.x < ss.columns * TileWidth && sel.a.y < ss.rows * TileHeight) {
|
||||
m_selection.emplace(sel);
|
||||
} else {
|
||||
m_selTracker.finishSelection();
|
||||
m_selection.reset();
|
||||
}
|
||||
m_updated = true;
|
||||
}
|
||||
|
||||
|
@@ -62,7 +62,7 @@ class TileSheetEditorModel: public ox::SignalHandler {
|
||||
constexpr Palette const&pal() const noexcept;
|
||||
|
||||
[[nodiscard]]
|
||||
ox::StringView palPath() const noexcept;
|
||||
ox::String const &palPath() const & noexcept;
|
||||
|
||||
ox::Error setPalette(ox::StringViewCR path) noexcept;
|
||||
|
||||
|
Reference in New Issue
Block a user