feat: Create virtual class for mock testing
This commit is contained in:
@@ -23,17 +23,21 @@ namespace snes_asm {
|
|||||||
const std::string kMosaicChangeOffset = "$02AADB";
|
const std::string kMosaicChangeOffset = "$02AADB";
|
||||||
constexpr int kSNESToPCOffset = 0x138000;
|
constexpr int kSNESToPCOffset = 0x138000;
|
||||||
|
|
||||||
class Script {
|
class ScriptTemplate {
|
||||||
|
public:
|
||||||
|
virtual absl::Status ApplyPatchToROM(ROM& rom) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Script : public ScriptTemplate {
|
||||||
public:
|
public:
|
||||||
Script() { asar_init_with_dll_path("assets/libasar.dll"); }
|
Script() { asar_init_with_dll_path("assets/libasar.dll"); }
|
||||||
|
|
||||||
|
absl::Status ApplyPatchToROM(ROM& rom) override;
|
||||||
absl::Status GenerateMosaicChangeAssembly(
|
absl::Status GenerateMosaicChangeAssembly(
|
||||||
ROM& rom, char mosaic_tiles[core::kNumOverworldMaps], int routine_offset,
|
ROM& rom, char mosaic_tiles[core::kNumOverworldMaps], int routine_offset,
|
||||||
int hook_offset = 0);
|
int hook_offset = 0);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
absl::Status ApplyPatchToROM(ROM& rom);
|
|
||||||
|
|
||||||
int64_t patch_size_;
|
int64_t patch_size_;
|
||||||
std::string patch_filename_;
|
std::string patch_filename_;
|
||||||
std::string patch_contents_;
|
std::string patch_contents_;
|
||||||
|
|||||||
Reference in New Issue
Block a user