Compare commits
6 Commits
e38b85b4f4
...
release-d2
Author | SHA1 | Date | |
---|---|---|---|
870fb9c6e3 | |||
31b39982c5 | |||
5476417be2 | |||
e03be694c2 | |||
490c0368bc | |||
a24fc407c5 |
2
deps/ox/src/ox/std/stringliteral.hpp
vendored
2
deps/ox/src/ox/std/stringliteral.hpp
vendored
@@ -19,7 +19,7 @@ namespace ox {
|
|||||||
*/
|
*/
|
||||||
class StringLiteral: public detail::BaseStringView {
|
class StringLiteral: public detail::BaseStringView {
|
||||||
public:
|
public:
|
||||||
consteval StringLiteral() noexcept = default;
|
constexpr StringLiteral() noexcept = default;
|
||||||
|
|
||||||
constexpr StringLiteral(StringLiteral const &sv) noexcept = default;
|
constexpr StringLiteral(StringLiteral const &sv) noexcept = default;
|
||||||
|
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
# 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
|
||||||
|
@@ -21,9 +21,28 @@ 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 endsWith(path, FileExt_nts) || endsWith(path, FileExt_ng);
|
return ox::any_of(
|
||||||
|
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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@ target_link_libraries(
|
|||||||
|
|
||||||
target_compile_definitions(
|
target_compile_definitions(
|
||||||
NostalgiaStudio PUBLIC
|
NostalgiaStudio PUBLIC
|
||||||
OLYMPIC_APP_VERSION="dev build"
|
OLYMPIC_APP_VERSION="d2025.07.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
|
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>dev build</string>
|
<string>d2025.07.0</string>
|
||||||
|
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>12.0.0</string>
|
<string>12.0.0</string>
|
||||||
|
@@ -64,11 +64,13 @@ 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]]
|
||||||
@@ -162,6 +164,7 @@ 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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user