Compare commits

..

1 Commits

Author SHA1 Message Date
780d8c8935 [nostalgia/studio] Set version to d2025.07.0
All checks were successful
Build / build (push) Successful in 1m14s
2025-07-31 00:02:55 -05:00
4 changed files with 2 additions and 30 deletions

View File

@@ -19,7 +19,7 @@ namespace ox {
*/ */
class StringLiteral: public detail::BaseStringView { class StringLiteral: public detail::BaseStringView {
public: public:
constexpr StringLiteral() noexcept = default; consteval StringLiteral() noexcept = default;
constexpr StringLiteral(StringLiteral const &sv) noexcept = default; constexpr StringLiteral(StringLiteral const &sv) noexcept = default;

View File

@@ -1,9 +1,3 @@
# d2025.07.0
* Add sub-command for exporting TileSheets as PNG files.
* Add 'Reload Project' menu item under File.
* Fix opening a project to mark an unopenable file as closed in the config file on startup.
# d2025.06.0 # d2025.06.0
* Add ability to remember recent projects in config * Add ability to remember recent projects in config

View File

@@ -21,28 +21,9 @@ constexpr ox::Array<ox::StringLiteral, 2> FileExts_TileSheet{
FileExt_ng, FileExt_ng,
}; };
constexpr ox::Array<ox::StringLiteral, 2> FileExts_Palette{
FileExt_npal,
};
[[nodiscard]] [[nodiscard]]
constexpr bool isTileSheet(ox::StringViewCR path) noexcept { constexpr bool isTileSheet(ox::StringViewCR path) noexcept {
return ox::any_of( return endsWith(path, FileExt_nts) || endsWith(path, FileExt_ng);
FileExts_TileSheet.begin(),
FileExts_TileSheet.end(),
[path](ox::StringLiteral const &ext) {
return endsWith(path, ext);
});
}
[[nodiscard]]
constexpr bool isPalette(ox::StringViewCR path) noexcept {
return ox::any_of(
FileExts_Palette.begin(),
FileExts_Palette.end(),
[path](ox::StringLiteral const &ext) {
return endsWith(path, ext);
});
} }
} }

View File

@@ -64,13 +64,11 @@ class AssetContainer {
protected: protected:
constexpr void incRefs() const noexcept { constexpr void incRefs() const noexcept {
oxAssert(m_references < ox::MaxValue<decltype(m_references)>, "reference count exceeds maximum");
++m_references; ++m_references;
} }
constexpr void decRefs() const noexcept { constexpr void decRefs() const noexcept {
--m_references; --m_references;
oxAssert(m_references >= 0, "negative references");
} }
[[nodiscard]] [[nodiscard]]
@@ -164,7 +162,6 @@ template<typename T>
constexpr AssetRef<T>::AssetRef(AssetContainer<T> const*c) noexcept: m_ctr(c) { constexpr AssetRef<T>::AssetRef(AssetContainer<T> const*c) noexcept: m_ctr(c) {
if (m_ctr) { if (m_ctr) {
m_ctr->updated.connect(this, &AssetRef::emitUpdated); m_ctr->updated.connect(this, &AssetRef::emitUpdated);
m_ctr->incRefs();
} }
} }