- Added new entries to `.pre-commit-config.yaml`, `cmake-format.yaml`, and `.github/dependabot.yml` to improve code quality checks and dependency updates. - Enhanced GitHub Actions workflows by adding new steps for testing and build retention. - Introduced support for the nlohmann_json library in CMake, allowing for conditional inclusion based on the `YAZE_ENABLE_JSON` option. - Updated CMake configurations to streamline SDL2 and gRPC integration, ensuring proper linking and target management. Benefits: - Improves code quality and consistency through automated checks and formatting. - Enhances dependency management and build reliability across platforms. - Provides flexibility for users to enable optional features, improving overall functionality.
109 lines
2.8 KiB
C++
109 lines
2.8 KiB
C++
#include "core/asar_wrapper.h"
|
|
|
|
#include "absl/strings/str_format.h"
|
|
|
|
// Temporary stub implementation until ASAR library build is fixed
|
|
// TODO: Re-enable actual ASAR integration once build is fixed
|
|
|
|
namespace yaze {
|
|
namespace core {
|
|
|
|
AsarWrapper::AsarWrapper() : initialized_(false) {}
|
|
|
|
AsarWrapper::~AsarWrapper() {}
|
|
|
|
absl::Status AsarWrapper::Initialize() {
|
|
return absl::UnimplementedError("ASAR library not available - build needs fixing");
|
|
}
|
|
|
|
void AsarWrapper::Shutdown() {
|
|
initialized_ = false;
|
|
}
|
|
|
|
std::string AsarWrapper::GetVersion() const {
|
|
return "ASAR disabled";
|
|
}
|
|
|
|
int AsarWrapper::GetApiVersion() const {
|
|
return 0;
|
|
}
|
|
|
|
void AsarWrapper::Reset() {
|
|
symbol_table_.clear();
|
|
last_errors_.clear();
|
|
last_warnings_.clear();
|
|
}
|
|
|
|
absl::StatusOr<AsarPatchResult> AsarWrapper::ApplyPatch(
|
|
const std::string& patch_path,
|
|
std::vector<uint8_t>& rom_data,
|
|
const std::vector<std::string>& include_paths) {
|
|
return absl::UnimplementedError("ASAR library not available - build needs fixing");
|
|
}
|
|
|
|
absl::StatusOr<AsarPatchResult> AsarWrapper::ApplyPatchFromString(
|
|
const std::string& patch_content,
|
|
std::vector<uint8_t>& rom_data,
|
|
const std::string& base_path) {
|
|
return absl::UnimplementedError("ASAR library not available - build needs fixing");
|
|
}
|
|
|
|
absl::StatusOr<std::vector<AsarSymbol>> AsarWrapper::ExtractSymbols(
|
|
const std::string& asm_path,
|
|
const std::vector<std::string>& include_paths) {
|
|
return absl::UnimplementedError("ASAR library not available - build needs fixing");
|
|
}
|
|
|
|
std::map<std::string, AsarSymbol> AsarWrapper::GetSymbolTable() const {
|
|
return symbol_table_;
|
|
}
|
|
|
|
std::optional<AsarSymbol> AsarWrapper::FindSymbol(const std::string& name) const {
|
|
auto it = symbol_table_.find(name);
|
|
if (it != symbol_table_.end()) {
|
|
return it->second;
|
|
}
|
|
return std::nullopt;
|
|
}
|
|
|
|
std::vector<AsarSymbol> AsarWrapper::GetSymbolsAtAddress(uint32_t address) const {
|
|
std::vector<AsarSymbol> result;
|
|
for (const auto& [name, symbol] : symbol_table_) {
|
|
if (symbol.address == address) {
|
|
result.push_back(symbol);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
absl::Status AsarWrapper::CreatePatch(
|
|
const std::vector<uint8_t>& original_rom,
|
|
const std::vector<uint8_t>& modified_rom,
|
|
const std::string& patch_path) {
|
|
return absl::UnimplementedError("ASAR library not available - build needs fixing");
|
|
}
|
|
|
|
absl::Status AsarWrapper::ValidateAssembly(const std::string& asm_path) {
|
|
return absl::UnimplementedError("ASAR library not available - build needs fixing");
|
|
}
|
|
|
|
void AsarWrapper::ProcessErrors() {
|
|
// Stub
|
|
}
|
|
|
|
void AsarWrapper::ProcessWarnings() {
|
|
// Stub
|
|
}
|
|
|
|
void AsarWrapper::ExtractSymbolsFromLastOperation() {
|
|
// Stub
|
|
}
|
|
|
|
AsarSymbol AsarWrapper::ConvertAsarSymbol(const void* asar_symbol_data) const {
|
|
// Stub
|
|
return AsarSymbol{};
|
|
}
|
|
|
|
} // namespace core
|
|
} // namespace yaze
|