1#ifndef YAZE_CORE_PATCH_PATCH_MANAGER_H
2#define YAZE_CORE_PATCH_PATCH_MANAGER_H
8#include "absl/status/status.h"
45 absl::Status
LoadPatches(
const std::string& patches_dir);
75 const std::vector<std::unique_ptr<AsmPatch>>&
patches()
const {
127 absl::Status
AddPatchFile(
const std::string& source_path,
128 const std::string& target_folder);
137 const std::string& filename);
155 void ScanDirectory(
const std::string& dir_path,
const std::string& folder_name);
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Represents a ZScream-compatible ASM patch file.
Manages a collection of ZScream-compatible ASM patches.
absl::Status ApplyEnabledPatches(Rom *rom)
Apply all enabled patches to a ROM.
absl::Status RemovePatchFile(const std::string &folder, const std::string &filename)
Remove a patch file.
std::vector< std::string > folders_
void ScanDirectory(const std::string &dir_path, const std::string &folder_name)
Scan a directory for .asm files.
absl::Status AddPatchFile(const std::string &source_path, const std::string &target_folder)
Add a patch file from an external source.
AsmPatch * GetPatch(const std::string &folder, const std::string &filename)
Get a specific patch by folder and filename.
absl::Status SaveAllPatches()
Save all patches to their files.
bool is_loaded() const
Check if patches have been loaded.
const std::vector< std::string > & folders() const
Get list of patch folder names.
int GetEnabledPatchCount() const
Get count of enabled patches.
std::vector< AsmPatch * > GetPatchesInFolder(const std::string &folder)
Get all patches in a specific folder.
absl::Status CreatePatchFolder(const std::string &folder_name)
Create a new patch folder.
absl::Status ReloadPatches()
Reload patches from the current directory.
std::string patches_directory_
const std::string & patches_directory() const
Get the patches directory path.
const std::vector< std::unique_ptr< AsmPatch > > & patches() const
Get all loaded patches.
std::vector< std::unique_ptr< AsmPatch > > patches_
absl::Status LoadPatches(const std::string &patches_dir)
Load all patches from a directory structure.
absl::Status RemovePatchFolder(const std::string &folder_name)
Remove a patch folder and all its contents.
absl::Status GenerateCombinedPatch(const std::string &output_path)
Generate a combined .asm file that includes all enabled patches.