mirror of
https://github.com/N64Recomp/N64ModernRuntime.git
synced 2026-05-10 19:01:53 +00:00
Fix whitespace in game.hpp
This commit is contained in:
parent
d78624211b
commit
ab031864fb
1 changed files with 51 additions and 51 deletions
|
|
@ -13,7 +13,7 @@ namespace recomp {
|
||||||
uint64_t rom_hash;
|
uint64_t rom_hash;
|
||||||
std::string internal_name;
|
std::string internal_name;
|
||||||
std::u8string game_id;
|
std::u8string game_id;
|
||||||
std::string mod_game_id;
|
std::string mod_game_id;
|
||||||
std::span<const char> cache_data;
|
std::span<const char> cache_data;
|
||||||
bool is_enabled;
|
bool is_enabled;
|
||||||
|
|
||||||
|
|
@ -22,59 +22,59 @@ namespace recomp {
|
||||||
|
|
||||||
std::u8string stored_filename() const;
|
std::u8string stored_filename() const;
|
||||||
};
|
};
|
||||||
struct Version {
|
struct Version {
|
||||||
int major = -1;
|
int major = -1;
|
||||||
int minor = -1;
|
int minor = -1;
|
||||||
int patch = -1;
|
int patch = -1;
|
||||||
std::string suffix;
|
std::string suffix;
|
||||||
|
|
||||||
std::string to_string() const {
|
std::string to_string() const {
|
||||||
return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch) + suffix;
|
return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch) + suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool from_string(const std::string& str, Version& out);
|
static bool from_string(const std::string& str, Version& out);
|
||||||
|
|
||||||
auto operator<=>(const Version& rhs) const {
|
auto operator<=>(const Version& rhs) const {
|
||||||
if (major != rhs.major) {
|
if (major != rhs.major) {
|
||||||
return major <=> rhs.major;
|
return major <=> rhs.major;
|
||||||
}
|
}
|
||||||
if (minor != rhs.minor) {
|
if (minor != rhs.minor) {
|
||||||
return minor <=> rhs.minor;
|
return minor <=> rhs.minor;
|
||||||
}
|
}
|
||||||
return patch <=> rhs.patch;
|
return patch <=> rhs.patch;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
enum class RomValidationError {
|
enum class RomValidationError {
|
||||||
Good,
|
Good,
|
||||||
FailedToOpen,
|
FailedToOpen,
|
||||||
NotARom,
|
NotARom,
|
||||||
IncorrectRom,
|
IncorrectRom,
|
||||||
NotYet,
|
NotYet,
|
||||||
IncorrectVersion,
|
IncorrectVersion,
|
||||||
OtherError
|
OtherError
|
||||||
};
|
};
|
||||||
void register_config_path(std::filesystem::path path);
|
void register_config_path(std::filesystem::path path);
|
||||||
bool register_game(const recomp::GameEntry& entry);
|
bool register_game(const recomp::GameEntry& entry);
|
||||||
void check_all_stored_roms();
|
void check_all_stored_roms();
|
||||||
bool load_stored_rom(std::u8string& game_id);
|
bool load_stored_rom(std::u8string& game_id);
|
||||||
RomValidationError select_rom(const std::filesystem::path& rom_path, std::u8string& game_id);
|
RomValidationError select_rom(const std::filesystem::path& rom_path, std::u8string& game_id);
|
||||||
bool is_rom_valid(std::u8string& game_id);
|
bool is_rom_valid(std::u8string& game_id);
|
||||||
bool is_rom_loaded();
|
bool is_rom_loaded();
|
||||||
void set_rom_contents(std::vector<uint8_t>&& new_rom);
|
void set_rom_contents(std::vector<uint8_t>&& new_rom);
|
||||||
void do_rom_read(uint8_t* rdram, gpr ram_address, uint32_t physical_addr, size_t num_bytes);
|
void do_rom_read(uint8_t* rdram, gpr ram_address, uint32_t physical_addr, size_t num_bytes);
|
||||||
void do_rom_pio(uint8_t* rdram, gpr ram_address, uint32_t physical_addr);
|
void do_rom_pio(uint8_t* rdram, gpr ram_address, uint32_t physical_addr);
|
||||||
const Version& get_project_version();
|
const Version& get_project_version();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The following arguments contain mandatory callbacks that need to be registered (i.e., can't be `nullptr`):
|
* The following arguments contain mandatory callbacks that need to be registered (i.e., can't be `nullptr`):
|
||||||
* - `rsp_callbacks`
|
* - `rsp_callbacks`
|
||||||
* - `renderer_callbacks`
|
* - `renderer_callbacks`
|
||||||
*
|
*
|
||||||
* It must be called only once and it must be called before `ultramodern::preinit`.
|
* It must be called only once and it must be called before `ultramodern::preinit`.
|
||||||
*/
|
*/
|
||||||
void start(
|
void start(
|
||||||
uint32_t rdram_size,
|
uint32_t rdram_size,
|
||||||
const Version& project_version,
|
const Version& project_version,
|
||||||
ultramodern::renderer::WindowHandle window_handle,
|
ultramodern::renderer::WindowHandle window_handle,
|
||||||
const recomp::rsp::callbacks_t& rsp_callbacks,
|
const recomp::rsp::callbacks_t& rsp_callbacks,
|
||||||
const ultramodern::renderer::callbacks_t& renderer_callbacks,
|
const ultramodern::renderer::callbacks_t& renderer_callbacks,
|
||||||
|
|
@ -86,8 +86,8 @@ namespace recomp {
|
||||||
const ultramodern::threads::callbacks_t& threads_callbacks
|
const ultramodern::threads::callbacks_t& threads_callbacks
|
||||||
);
|
);
|
||||||
|
|
||||||
void start_game(const std::u8string& game_id);
|
void start_game(const std::u8string& game_id);
|
||||||
std::u8string current_game_id();
|
std::u8string current_game_id();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue