Compare commits

..

1 Commits

Author SHA1 Message Date
13e256b3a9 [nostalgia/studio] Update version to d2025.02.0
All checks were successful
Build / build (push) Successful in 1m28s
2025-02-25 20:15:07 -06:00
10 changed files with 22 additions and 55 deletions

View File

@ -1,30 +0,0 @@
#! /usr/bin/env python3
#
# Copyright 2016 - 2025 gary@drinkingtea.net
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import argparse
import sys
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument('--file', help='path to file')
parser.add_argument('--out-cpp', help='path to output cpp file')
parser.add_argument('--out-hpp', help='path to output hpp file')
parser.add_argument('--namespace', help='path to output hpp file')
args = parser.parse_args()
return 0
if __name__ == '__main__':
try:
err = main()
sys.exit(err)
except KeyboardInterrupt:
sys.exit(1)

View File

@ -20,7 +20,7 @@
namespace ox {
namespace detail {
inline void fsBuffFree(char *buff) noexcept {
static inline void fsBuffFree(char *buff) noexcept {
safeDelete(buff);
}
}
@ -49,11 +49,11 @@ class FileSystem {
Result<Buffer> read(StringViewCR path) noexcept;
Error read(StringViewCR path, void *buffer, std::size_t buffSize) noexcept {
inline Error read(StringViewCR path, void *buffer, std::size_t buffSize) noexcept {
return readFilePath(path, buffer, buffSize);
}
Error read(uint64_t inode, void *buffer, std::size_t buffSize) noexcept {
inline Error read(uint64_t inode, void *buffer, std::size_t buffSize) noexcept {
return readFileInode(inode, buffer, buffSize);
}
@ -69,7 +69,8 @@ class FileSystem {
* @param path
* @param readStart
* @param readSize
* @param buff
* @param buffer
* @param size
* @return error or number of bytes read
*/
Result<size_t> read(
@ -101,36 +102,36 @@ class FileSystem {
Error write(const FileAddress &addr, const void *buffer, uint64_t size, FileType fileType = FileType::NormalFile) noexcept;
Error write(StringViewCR path, const void *buffer, uint64_t size, FileType fileType) noexcept {
inline Error write(StringViewCR path, const void *buffer, uint64_t size, FileType fileType) noexcept {
return writeFilePath(path, buffer, size, fileType);
}
Error write(uint64_t inode, const void *buffer, uint64_t size, FileType fileType) noexcept {
inline Error write(uint64_t inode, const void *buffer, uint64_t size, FileType fileType) noexcept {
return writeFileInode(inode, buffer, size, fileType);
}
Result<FileStat> stat(uint64_t inode) const noexcept {
inline Result<FileStat> stat(uint64_t inode) const noexcept {
return statInode(inode);
}
Result<FileStat> stat(StringViewCR path) const noexcept {
inline Result<FileStat> stat(StringViewCR path) const noexcept {
return statPath(path);
}
Result<FileStat> stat(const FileAddress &addr) const noexcept;
[[nodiscard]]
bool exists(uint64_t inode) const noexcept {
inline bool exists(uint64_t inode) const noexcept {
return statInode(inode).ok();
}
[[nodiscard]]
bool exists(ox::StringView path) const noexcept {
inline bool exists(ox::StringView path) const noexcept {
return statPath(path).ok();
}
[[nodiscard]]
bool exists(FileAddress const&addr) const noexcept {
inline bool exists(FileAddress const&addr) const noexcept {
return stat(addr).ok();
}
@ -177,11 +178,11 @@ class MemFS: public FileSystem {
public:
Result<const char*> directAccess(const FileAddress &addr) const noexcept;
Result<const char*> directAccess(StringViewCR path) const noexcept {
inline Result<const char*> directAccess(StringViewCR path) const noexcept {
return directAccessPath(path);
}
Result<const char*> directAccess(uint64_t inode) const noexcept {
inline Result<const char*> directAccess(uint64_t inode) const noexcept {
return directAccessInode(inode);
}

View File

@ -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 {};

View File

@ -134,6 +134,7 @@ ox::Error run(
return ox::Error{1, "Please provide path to project directory or OxFS file."};
}
auto const path = args[1];
OX_REQUIRE_M(tctx, turbine::init(path, project));
OX_REQUIRE_M(fs, keel::loadRomFs(path));
OX_REQUIRE_M(tctx, turbine::init(std::move(fs), project));
return runTileSheetSetTest(*tctx);
}

View File

@ -1,7 +1,4 @@
add_executable(
NostalgiaStudio WIN32 MACOSX_BUNDLE
ns.rc
)
add_executable(NostalgiaStudio WIN32 MACOSX_BUNDLE)
target_link_libraries(
NostalgiaStudio
@ -14,7 +11,7 @@ target_link_libraries(
target_compile_definitions(
NostalgiaStudio PUBLIC
OLYMPIC_APP_VERSION="dev build"
OLYMPIC_APP_VERSION="d2025.02.0"
)
install(

View File

@ -18,7 +18,7 @@
<string>APPL</string>
<key>CFBundleVersion</key>
<string>dev build</string>
<string>d2025.02.0</string>
<key>LSMinimumSystemVersion</key>
<string>12.0.0</string>

View File

@ -1 +0,0 @@
IDI_ICON1 ICON DISCARDABLE "ns_logo.ico"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

View File

@ -68,7 +68,7 @@ constexpr auto makeLoader(Context &ctx) {
if (!beginsWith(assetId, "/")) {
auto const p = ctx.uuidToPath.at(assetId);
if (p.error) {
oxErrf("Could not find asset: {}\n", assetId);
oxErrf("Could not find asset: {}", assetId);
return ox::Error{1, "Asset ID not found"};
}
assetId = *p.value;

View File

@ -254,7 +254,6 @@ void StudioUI::drawTabs() noexcept {
if (!open) {
if (e->unsavedChanges()) {
m_closeFileConfirm.open();
++it;
} else {
e->close();
if (m_activeEditor == (*it).get()) {