attempting to link asar
This commit is contained in:
@@ -3,8 +3,10 @@
|
||||
#include <interface-lib.h>
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/status/statusor.h"
|
||||
@@ -17,7 +19,9 @@ namespace app {
|
||||
namespace snes_asm {
|
||||
|
||||
absl::Status Script::ApplyPatchToROM(ROM& rom) {
|
||||
if (!asar_patch(patch_filename_, rom_.data(), patch_size_, rom_.size())) {
|
||||
char* data = (char*) rom.data();
|
||||
int size = 0;
|
||||
if (!asar_patch(patch_filename_.c_str(), data, patch_size_, &size)) {
|
||||
return absl::InternalError("Unable to apply patch");
|
||||
}
|
||||
return absl::OkStatus();
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
#include <interface-lib.h>
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/status/statusor.h"
|
||||
|
||||
@@ -92,6 +92,7 @@ class ROM {
|
||||
auto isLoaded() const { return is_loaded_; }
|
||||
auto begin() { return rom_data_.begin(); }
|
||||
auto end() { return rom_data_.end(); }
|
||||
auto data() { return rom_data_.data(); }
|
||||
|
||||
uchar& operator[](int i) {
|
||||
if (i > size_) {
|
||||
|
||||
Reference in New Issue
Block a user