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:
@@ -1,16 +1,14 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include <libtwl/card/card.h>
|
||||
#include "../LoaderPlatform.h"
|
||||
#include "r4ReadRomAsm.h"
|
||||
#include "r4ReadSdAsm.h"
|
||||
#include "r4WriteSdAsm.h"
|
||||
#include "R4ReadRomPatchCode.h"
|
||||
#include "R4ReadSdPatchCode.h"
|
||||
#include "R4WriteSdPatchCode.h"
|
||||
|
||||
/// @brief Implementation of LoaderPlatform for the original R4 flashcard
|
||||
class R4LoaderPlatform : public LoaderPlatform
|
||||
{
|
||||
public:
|
||||
const SdReadPatchCode* CreateSdReadPatchCode(
|
||||
const IReadSectorsPatchCode* CreateSdReadPatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
@@ -19,7 +17,7 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
const SdWritePatchCode* CreateSdWritePatchCode(
|
||||
const IWriteSectorsPatchCode* CreateSdWritePatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
@@ -28,7 +26,7 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
const SdReadPatchCode* CreateRomReadPatchCode(
|
||||
const IReadSectorsPatchCode* CreateRomReadPatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
|
||||
Reference in New Issue
Block a user