mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Initial commit
This commit is contained in:
21
arm9/source/patches/Patch.h
Normal file
21
arm9/source/patches/Patch.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "PatchContext.h"
|
||||
|
||||
/// @brief Abstract class representing a patch intended for the arm9 or arm7 binary.
|
||||
class Patch
|
||||
{
|
||||
public:
|
||||
/// @brief Next patch in the singly linked list.
|
||||
Patch* next = nullptr;
|
||||
|
||||
/// @brief Tries to find the patch target in the region corresponding
|
||||
/// to the given patchContext.
|
||||
/// @param patchContext The patch context to use.
|
||||
/// @return True if the patch target was found, or false otherwise.
|
||||
virtual bool FindPatchTarget(PatchContext& patchContext) = 0;
|
||||
|
||||
/// @brief Applies the patch to the target that was previously found
|
||||
/// with FindPatchTarget.
|
||||
/// @param patchContext The patch context to use.
|
||||
virtual void ApplyPatch(PatchContext& patchContext) = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user