coastline 0.0.4
Loading...
Searching...
No Matches
importer.h File Reference
#include <cstdint>
#include <expected>
#include <filesystem>
#include <functional>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <vector>
Include dependency graph for importer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  coastline::UsaMusicModule
 A music module of the USA cartridge and its name in a music pack. More...
struct  coastline::DiscTrackExtent
 A contiguous part of a disc track, excluding its pregap. More...
struct  coastline::CueTrack
 One disc track with stored sector sizes and logical track boundaries. More...

Namespaces

namespace  coastline

Typedefs

using coastline::ImportProgress = std::function<bool(const std::string &step, double fraction)>
 Reports import progress with a description and a fraction from 0 to 1.

Enumerations

enum class  coastline::RomRelease { coastline::Usa , coastline::Jpn , coastline::Eur , coastline::Asia }
 A Nintendo 64 release the game reads models, textures, and music from. More...

Functions

bool coastline::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< RomRelease, std::string > coastline::IdentifyRom (std::span< const std::uint8_t > image)
 Identify a big-endian cartridge image by its SHA-1.
std::expected< RomRelease, std::string > coastline::IdentifyRomFile (const std::filesystem::path &image)
 Identify a cartridge image file in any of the three byte orders by its SHA-1.
std::expected< RomRelease, std::string > coastline::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, n64/jpn, n64/eur, or n64/asia under dataDirectory.
std::expected< std::vector< CueTrack >, std::string > coastline::ParseCueSheet (const std::filesystem::path &cue)
 Parse a CUE sheet.
std::expected< std::size_t, std::string > coastline::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 music/trackNN.flac.
std::optional< std::string > coastline::CheckDisc (const std::filesystem::path &disc)
 Check that a disc image or directory provides Boss Rally files without copying them.

Variables

constexpr UsaMusicModule coastline::USA_MUSIC_MODULES []
 The music modules of the USA cartridge: the menus, then the modules of the tracks.