remove asar while features experimental

This commit is contained in:
Justin Scofield
2022-12-30 20:22:08 -06:00
parent fbb320e772
commit 2dae505587
5 changed files with 13 additions and 25 deletions

View File

@@ -59,7 +59,6 @@ add_executable(
${YAZE_APP_ZELDA3_SRC}
${YAZE_GUI_SRC}
${IMGUI_SRC}
${ASAR_STATIC_SRC}
)
# including libraries ---------------------------------------------------------
@@ -68,12 +67,10 @@ target_include_directories(
yaze PUBLIC
lib/
app/
${ASAR_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/src/
${PNG_INCLUDE_DIRS}
${SDL2_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
lib/asar/src/
)
set(SDL_TARGETS SDL2::SDL2)
@@ -94,12 +91,7 @@ target_link_libraries(
${OPENGL_LIBRARIES}
${CMAKE_DL_LIBS}
ImGui
asar-static
)
if (WIN32)
# target_compile_definitions(yaze PRIVATE "windows")
add_definitions(-DASAR_STATIC)
endif()
if (UNIX)
target_compile_definitions(yaze PRIVATE "linux")

View File

@@ -1,6 +1,6 @@
#include "script.h"
#include <asar/interface-lib.h>
// #include <asar/interface-lib.h>
#include <array>
#include <cstdint>
@@ -27,11 +27,11 @@ absl::Status Script::ApplyPatchToROM(ROM &rom) {
int count = 0;
auto data = (char *)rom.data();
int size = rom.size();
if (!asar_patch(patch_filename_.c_str(), data, patch_size_, &size)) {
auto asar_error = asar_geterrors(&count);
auto full_error = asar_error->fullerrdata;
return absl::InternalError(absl::StrCat("ASAR Error: ", full_error));
}
// if (!asar_patch(patch_filename_.c_str(), data, patch_size_, &size)) {
// auto asar_error = asar_geterrors(&count);
// auto full_error = asar_error->fullerrdata;
// return absl::InternalError(absl::StrCat("ASAR Error: ", full_error));
// }
return absl::OkStatus();
}

View File

@@ -1,7 +1,7 @@
#ifndef YAZE_APP_ASM_SCRIPT_H
#define YAZE_APP_ASM_SCRIPT_H
#include <asar/interface-lib.h>
// #include <asar/interface-lib.h>
#include <array>
#include <cstdint>