Patches: Virtual move/remove game files patches

This commit is contained in:
Eladash 2023-03-03 15:43:46 +02:00 committed by Megamouse
parent 1d7a00666e
commit 382a7c94a2
2 changed files with 61 additions and 4 deletions

View file

@ -52,8 +52,15 @@ enum class patch_type
bef32,
bef64,
utf8, // Text of string (not null-terminated automatically)
move_file, // Move file
hide_file, // Hide file
};
static constexpr bool patch_type_uses_hex_offset(patch_type type)
{
return type >= patch_type::alloc && type <= patch_type::utf8;
}
enum class patch_configurable_type
{
double_range,
@ -69,6 +76,7 @@ public:
{
patch_type type = patch_type::load;
u32 offset = 0;
std::string original_offset{}; // Used for specifying paths
std::string original_value{}; // Used for import consistency (avoid rounding etc.)
union
{