131std::expected<std::size_t, std::string>
Definition assetimport.h:11
std::function< bool(const std::string &step, double fraction)> ImportProgress
Reports import progress with a description and a fraction from 0 to 1.
Definition importer.h:27
RomRelease
A Nintendo 64 release the game reads models, textures, and music from.
Definition importer.h:16
@ Asia
Definition importer.h:20
@ Jpn
Definition controllerpak.h:107
@ Usa
Definition controllerpak.h:105
@ Eur
Definition controllerpak.h:106
std::expected< RomRelease, std::string > ImportRom(const std::filesystem::path &image, const std::filesystem::path &dataDirectory, const ImportProgress &progress={})
Check a cartridge image and extract its main segment and its assets, inflated, to n64/usa,...
std::expected< RomRelease, std::string > IdentifyRomFile(const std::filesystem::path &image)
Identify a cartridge image file in any of the three byte orders by its SHA-1.
constexpr UsaMusicModule USA_MUSIC_MODULES[]
The music modules of the USA cartridge: the menus, then the modules of the tracks.
Definition importer.h:63
bool NormalizeRomByteOrder(std::span< std::uint8_t > image)
Convert a cartridge image in any of the three byte orders (z64, v64, n64) to big-endian.
std::expected< std::vector< CueTrack >, std::string > ParseCueSheet(const std::filesystem::path &cue)
Parse a CUE sheet.
std::optional< std::string > CheckDisc(const std::filesystem::path &disc)
Check that a disc image or directory provides Boss Rally files without copying them.
std::expected< RomRelease, std::string > IdentifyRom(std::span< const std::uint8_t > image)
Identify a big-endian cartridge image by its SHA-1.
std::expected< std::size_t, std::string > ImportDisc(const std::filesystem::path &disc, const std::filesystem::path &dataDirectory, const ImportProgress &progress, std::vector< std::filesystem::path > *sources=nullptr)
Copy the files of the Boss Rally disc the game opens to dataDirectory, and its CD audio tracks as mus...
One disc track with stored sector sizes and logical track boundaries.
Definition importer.h:93
int number
Definition importer.h:94
std::uint64_t firstSector
Definition importer.h:98
std::uint32_t sectorSize
Definition importer.h:96
std::filesystem::path file
Definition importer.h:97
std::uint64_t sectorCount
Definition importer.h:99
bool audio
Definition importer.h:95
std::vector< DiscTrackExtent > extents
Definition importer.h:101
std::optional< std::uint32_t > dataOffset
User-data offset in bytes within each stored sector; absent selects the Mode 1 layout.
Definition importer.h:103
std::shared_ptr< const void > storage
Shared lifetime of decoded temporary storage, or empty for original source files.
Definition importer.h:105
A contiguous part of a disc track, excluding its pregap.
Definition importer.h:86
std::uint64_t sectorCount
Definition importer.h:89
std::uint64_t byteOffset
Definition importer.h:88
std::filesystem::path file
Definition importer.h:87
A music module of the USA cartridge and its name in a music pack.
Definition importer.h:54
const char * name
Definition importer.h:56
std::uint32_t offset
Definition importer.h:55