mirror of
https://github.com/Zelda64Recomp/Zelda64Recomp.git
synced 2026-04-27 12:41:39 +00:00
Merge remote-tracking branch 'origin/dev' into mod-ui
This commit is contained in:
commit
95b462e9e5
5 changed files with 21 additions and 8 deletions
|
|
@ -39,7 +39,7 @@ choco install make
|
||||||
You will need to decompress the NTSC-U N64 Majora's Mask ROM (sha1: d6133ace5afaa0882cf214cf88daba39e266c078) before running the recompiler.
|
You will need to decompress the NTSC-U N64 Majora's Mask ROM (sha1: d6133ace5afaa0882cf214cf88daba39e266c078) before running the recompiler.
|
||||||
|
|
||||||
There are a few tools that can do it:
|
There are a few tools that can do it:
|
||||||
* This python script from the Majora's Mask decompilation project: https://github.com/zeldaret/mm/blob/main/tools/buildtools/decompress_baserom.py
|
* This python script from the Majora's Mask decompilation project: https://github.com/zeldaret/mm/blob/main/tools/decompress_baserom.py
|
||||||
* https://github.com/z64tools/z64decompress
|
* https://github.com/z64tools/z64decompress
|
||||||
|
|
||||||
Regardless of which method you use, copy the decompressed ROM to the root of the Zelda64Recomp repository with this filename:
|
Regardless of which method you use, copy the decompressed ROM to the root of the Zelda64Recomp repository with this filename:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,8 @@ namespace zelda64 {
|
||||||
// Apple specific methods that usually require Objective-C. Implemented in support_apple.mm.
|
// Apple specific methods that usually require Objective-C. Implemented in support_apple.mm.
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
void dispatch_on_ui_thread(std::function<void()> func);
|
void dispatch_on_ui_thread(std::function<void()> func);
|
||||||
const char* get_bundle_resource_directory();
|
std::filesystem::path get_bundle_resource_directory();
|
||||||
|
std::filesystem::path get_bundle_directory();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "recomp_input.h"
|
#include "recomp_input.h"
|
||||||
#include "zelda_sound.h"
|
#include "zelda_sound.h"
|
||||||
#include "zelda_render.h"
|
#include "zelda_render.h"
|
||||||
|
#include "zelda_support.h"
|
||||||
#include "ultramodern/config.hpp"
|
#include "ultramodern/config.hpp"
|
||||||
#include "librecomp/files.hpp"
|
#include "librecomp/files.hpp"
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
@ -136,6 +137,14 @@ std::filesystem::path zelda64::get_app_folder_path() {
|
||||||
return std::filesystem::current_path();
|
return std::filesystem::current_path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
// Check for portable file in the directory containing the app bundle.
|
||||||
|
const auto app_bundle_path = zelda64::get_bundle_directory().parent_path();
|
||||||
|
if (std::filesystem::exists(app_bundle_path / "portable.txt")) {
|
||||||
|
return app_bundle_path;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
std::filesystem::path recomp_dir{};
|
std::filesystem::path recomp_dir{};
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,7 @@ namespace zelda64 {
|
||||||
std::filesystem::path get_asset_path(const char* asset) {
|
std::filesystem::path get_asset_path(const char* asset) {
|
||||||
std::filesystem::path base_path = "";
|
std::filesystem::path base_path = "";
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
const char* resource_dir = get_bundle_resource_directory();
|
base_path = get_bundle_resource_directory();
|
||||||
base_path = resource_dir;
|
|
||||||
free((void*)resource_dir);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return base_path / "assets" / asset;
|
return base_path / "assets" / asset;
|
||||||
|
|
|
||||||
|
|
@ -12,9 +12,14 @@ namespace zelda64 {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* get_bundle_resource_directory() {
|
std::filesystem::path get_bundle_resource_directory() {
|
||||||
NSString *bundlePath = [[NSBundle mainBundle] resourcePath];
|
NSString *bundlePath = [[NSBundle mainBundle] resourcePath];
|
||||||
return strdup([bundlePath UTF8String]);
|
return std::filesystem::path([bundlePath UTF8String]);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::filesystem::path get_bundle_directory() {
|
||||||
|
NSString *bundlePath = [[NSBundle mainBundle] bundlePath];
|
||||||
|
return std::filesystem::path([bundlePath UTF8String]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue