Compare commits
4 Commits
125a235dd1
...
release-d2
Author | SHA1 | Date | |
---|---|---|---|
c6fdf19055 | |||
ed5f424eb0 | |||
a44c5acc4b | |||
13e256b3a9 |
27
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
27
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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 {};
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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.1"
|
||||
)
|
||||
|
||||
install(
|
||||
|
@ -18,7 +18,7 @@
|
||||
<string>APPL</string>
|
||||
|
||||
<key>CFBundleVersion</key>
|
||||
<string>dev build</string>
|
||||
<string>d2025.02.1</string>
|
||||
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>12.0.0</string>
|
||||
|
@ -1 +0,0 @@
|
||||
IDI_ICON1 ICON DISCARDABLE "ns_logo.ico"
|
Binary file not shown.
Before Width: | Height: | Size: 162 KiB |
Reference in New Issue
Block a user