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:
20
arm9/source/patches/OffsetToSectorRemapAsm.h
Normal file
20
arm9/source/patches/OffsetToSectorRemapAsm.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "sections.h"
|
||||
#include "SectorRemapPatchCode.h"
|
||||
|
||||
DEFINE_SECTION_SYMBOLS(offsettosectorremap);
|
||||
|
||||
extern "C" u32 offset_to_sector_remap(u32 romOffset);
|
||||
|
||||
class OffsetToSectorRemapPatchCode : public SectorRemapPatchCode
|
||||
{
|
||||
public:
|
||||
explicit OffsetToSectorRemapPatchCode(PatchHeap& patchHeap)
|
||||
: SectorRemapPatchCode(SECTION_START(offsettosectorremap), SECTION_SIZE(offsettosectorremap), patchHeap)
|
||||
{ }
|
||||
|
||||
const void* GetRemapFunction() const override
|
||||
{
|
||||
return GetAddressAtTarget((void*)offset_to_sector_remap);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user