mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
20 lines
No EOL
615 B
C++
20 lines
No EOL
615 B
C++
#pragma once
|
|
#include "archive_base.hpp"
|
|
|
|
class SelfNCCHArchive : public ArchiveBase {
|
|
public:
|
|
SelfNCCHArchive(Memory& mem) : ArchiveBase(mem) {}
|
|
|
|
u64 getFreeBytes() override { return 0; }
|
|
std::string name() override { return "SelfNCCH"; }
|
|
|
|
ArchiveBase* openArchive(const FSPath& path) override;
|
|
FileDescriptor openFile(const FSPath& path, const FilePerms& perms) override;
|
|
std::optional<u32> readFile(FileSession* file, u64 offset, u32 size, u32 dataPointer) override;
|
|
|
|
// Returns whether the cart has a RomFS
|
|
bool hasRomFS() {
|
|
auto cxi = mem.getCXI();
|
|
return (cxi != nullptr && cxi->hasRomFS());
|
|
}
|
|
}; |