mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Refactored platform code to use interfaces for patch code with a special feature and improved patch code file names
This commit is contained in:
17
arm9/source/patches/platform/IWriteSectorsPatchCode.h
Normal file
17
arm9/source/patches/platform/IWriteSectorsPatchCode.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
/// @brief Abstract base class for patch code implementing sector writes
|
||||
class IWriteSectorsPatchCode
|
||||
{
|
||||
protected:
|
||||
IWriteSectorsPatchCode() { }
|
||||
|
||||
public:
|
||||
/// @brief Pointer to a function for writing sectorCount sectors
|
||||
/// from the given src buffer to dstSector.
|
||||
typedef void (*WriteSectorsFunc)(u32 dstSector, const void* src, u32 sectorCount);
|
||||
|
||||
/// @brief Gets a pointer to the sector write function in the patch code.
|
||||
/// @return The pointer to the sector write function.
|
||||
virtual const WriteSectorsFunc GetWriteSectorFunction() const = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user