Compare commits

...

6 Commits

Author SHA1 Message Date
SuperDude88 92d11863f6 Crash Reporting Option Portability
- Makes the crash reporting preference get saved with the other config files
2026-05-31 19:00:58 -04:00
Pieter-Jan Briers 81caa89e12 Update Aurora & use new texture replacements API (#1935)
Cherry picked from TPHD branch

Co-authored-by: Luke Street <luke@street.dev>
2026-05-30 19:57:17 -06:00
Luke Street bc3cdcc955 Revert "Adds a new cheat that let you transform from the start of the game. (…" (#1927)
This reverts commit 62c19c0f64.
2026-05-29 21:20:15 -06:00
tomlube bf0dc85468 Revert "Added Sword and Shield skip Achievement" (#1917) 2026-05-29 15:14:05 -04:00
tomlube 656346a900 Merge pull request #1909 from 5upern1ce/sword-and-shield-skip
Added Sword and Shield skip Achievement
2026-05-29 15:11:46 -04:00
Supern_Ice 5269eadfaf Added Sword and Shield skip Achievement 2026-05-29 15:26:26 +01:00
13 changed files with 69 additions and 28 deletions
+1 -1
+2
View File
@@ -1442,6 +1442,8 @@ set(DUSK_FILES
src/dusk/speedrun.cpp
src/dusk/string.cpp
src/dusk/stubs.cpp
include/dusk/texture_replacements.hpp
src/dusk/texture_replacements.cpp
src/dusk/update_check.cpp
src/dusk/update_check.hpp
#src/dusk/m_Do_ext_dusk.cpp
-1
View File
@@ -230,7 +230,6 @@ struct UserSettings {
ConfigVar<bool> fastSpinner;
ConfigVar<bool> freeMagicArmor;
ConfigVar<bool> invincibleEnemies;
ConfigVar<bool> transformWithoutShadowCrystal;
// Technical
ConfigVar<bool> restoreWiiGlitches;
+12
View File
@@ -0,0 +1,12 @@
#ifndef DUSK_TEXTURE_REPLACEMENTS_HPP
#define DUSK_TEXTURE_REPLACEMENTS_HPP
namespace dusk::texture_replacements {
void reload();
void set_enabled(bool enabled);
void shutdown();
}
#endif
+3 -3
View File
@@ -72,7 +72,7 @@ void daAlink_c::handleQuickTransform() {
}
// Check to see if Link has the ability to transform.
if (!dComIfGs_isEventBit(dSv_event_flag_c::M_077) && !dusk::getSettings().game.transformWithoutShadowCrystal) {
if (!dComIfGs_isEventBit(dSv_event_flag_c::M_077)) {
return;
}
@@ -102,7 +102,7 @@ void daAlink_c::handleQuickTransform() {
}
// Ensure that the Z Button is not dimmed
if (meterDrawPtr->getButtonZAlpha() != 1.f && !dusk::getSettings().game.transformWithoutShadowCrystal) {
if (meterDrawPtr->getButtonZAlpha() != 1.f) {
Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
return;
}
@@ -122,7 +122,7 @@ void daAlink_c::handleQuickTransform() {
bool canTransform = false;
if (mLinkAcch.ChkGroundHit() && !checkModeFlg(MODE_PLAYER_FLY) && !checkMagneBootsOn()) {
if (checkMidnaRide() || dusk::getSettings().game.transformWithoutShadowCrystal) {
if (checkMidnaRide()) {
if ((checkWolf() &&
(checkModeFlg(MODE_UNK_1000) || dComIfGp_checkPlayerStatus0(0, 0x10))) ||
(!checkWolf() &&
+6 -10
View File
@@ -3106,18 +3106,14 @@ void daMidna_c::setMidnaNoDrawFlg() {
BOOL daMidna_c::checkMetamorphoseEnableBase() {
BOOL tmp;
if (!daAlink_getAlinkActorClass()->checkMidnaRide() || (g_env_light.mEvilInitialized & 0x80) ||
/* dSv_event_flag_c::M_077 - Main Event - Get shadow crystal (can now transform) */
!dComIfGs_isEventBit(0xD04) ||
#if TARGET_PC
if (((!daAlink_getAlinkActorClass()->checkMidnaRide() || (g_env_light.mEvilInitialized & 0x80) ||
/* dSv_event_flag_c::M_077 - Main Event - Get shadow crystal (can now transform) */
!dComIfGs_isEventBit(0xD04)) &&
!dusk::getSettings().game.transformWithoutShadowCrystal) ||
(fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp) &&
!dusk::getSettings().game.canTransformAnywhere)
(fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp) &&
!dusk::getSettings().game.canTransformAnywhere)
#else
if (!daAlink_getAlinkActorClass()->checkMidnaRide() || (g_env_light.mEvilInitialized & 0x80) ||
/* dSv_event_flag_c::M_077 - Main Event - Get shadow crystal (can now transform) */
!dComIfGs_isEventBit(0xD04) ||
fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp)
fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp)
#endif
)
{
+1 -5
View File
@@ -2843,11 +2843,7 @@ BOOL dComIfGs_Wolf_Change_Check() {
BOOL is_wolf = false;
// Transforming Unlocked
if (dComIfGs_isEventBit(0x0D04)
#if TARGET_PC
|| dusk::getSettings().game.transformWithoutShadowCrystal
#endif
) {
if (dComIfGs_isEventBit(0x0D04)) {
is_wolf = dComIfGs_getTransformStatus();
} else if (dComIfGs_isTransformLV(0) && !dComIfGs_isDarkClearLV(0)) {
is_wolf = true;
+1 -1
View File
@@ -61,7 +61,7 @@ std::string release_name() {
}
std::filesystem::path sentry_database_path() {
return dusk::CachePath / "sentry";
return dusk::ConfigPath / "sentry";
}
std::filesystem::path log_attachment_path() {
-2
View File
@@ -123,7 +123,6 @@ UserSettings g_userSettings = {
.fastSpinner {"game.fastSpinner", false},
.freeMagicArmor {"game.freeMagicArmor", false},
.invincibleEnemies {"game.invincibleEnemies", false},
.transformWithoutShadowCrystal {"game.transformWithoutShadowCrystal", false},
// Technical
.restoreWiiGlitches {"game.restoreWiiGlitches", false},
@@ -209,7 +208,6 @@ void registerSettings() {
// Game
Register(g_userSettings.game.language);
Register(g_userSettings.game.enableQuickTransform);
Register(g_userSettings.game.transformWithoutShadowCrystal);
Register(g_userSettings.game.hideTvSettingsScreen);
Register(g_userSettings.game.biggerWallets);
Register(g_userSettings.game.noReturnRupees);
+38
View File
@@ -0,0 +1,38 @@
#include "dusk/texture_replacements.hpp"
#include <aurora/texture.hpp>
#include "dusk/logging.h"
#include "dusk/main.h"
#include "dusk/settings.h"
namespace dusk::texture_replacements {
namespace {
aurora::texture::ReplacementGroup s_directoryGroup;
}
void reload() {
aurora::texture::unregister_replacements(s_directoryGroup);
s_directoryGroup.registrations.clear();
if (!getSettings().game.enableTextureReplacements) {
return;
}
const auto root = ConfigPath / "texture_replacements";
s_directoryGroup = aurora::texture::load_replacement_directory(root);
DuskLog.info("Texture replacement directory loaded: {} registration(s)",
s_directoryGroup.registrations.size());
}
void set_enabled(bool enabled) {
getSettings().game.enableTextureReplacements.setValue(enabled);
reload();
}
void shutdown() {
aurora::texture::unregister_replacements(s_directoryGroup);
s_directoryGroup.registrations.clear();
}
}
+2 -2
View File
@@ -11,6 +11,7 @@
#include "dusk/config.hpp"
#include "dusk/settings.h"
#include "dusk/texture_replacements.hpp"
#include <algorithm>
#include <string>
@@ -98,8 +99,7 @@ void set_value(GraphicsOption option, int value) {
getSettings().game.bloomMultiplier.setValue(std::clamp(value, 0, 100) / 100.0f);
break;
case GraphicsOption::TextureReplacements:
getSettings().game.enableTextureReplacements.setValue(static_cast<bool>(value));
aurora_set_texture_replacements_enabled(static_cast<bool>(value));
texture_replacements::set_enabled(static_cast<bool>(value));
break;
}
}
-2
View File
@@ -1294,8 +1294,6 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
"Lets the magic armor work without consuming rupees.");
addCheat("Invincible Enemies", getSettings().game.invincibleEnemies,
"Prevents enemies from taking damage.");
addCheat("Transform without Shadow Crystal", getSettings().game.transformWithoutShadowCrystal,
"Allows Link to transform without the Shadow Crystal (Only using Quick Transform.)");
});
add_tab("Interface", [this](Rml::Element* content) {
+3 -1
View File
@@ -84,6 +84,7 @@
#include "dusk/config.hpp"
#include "dusk/speedrun.h"
#include "dusk/settings.h"
#include "dusk/texture_replacements.hpp"
#include "dusk/io.hpp"
#include "dusk/version.hpp"
#include "dusk/discord_presence.hpp"
@@ -585,7 +586,6 @@ int game_main(int argc, char* argv[]) {
config.allowJoystickBackgroundEvents = dusk::getSettings().game.allowBackgroundInput;
config.pauseOnFocusLost = dusk::getSettings().game.pauseOnFocusLost;
config.imGuiInitCallback = &aurora_imgui_init_callback;
config.allowTextureReplacements = dusk::getSettings().game.enableTextureReplacements;
config.allowTextureDumps = false;
auroraInfo = aurora_initialize(argc, argv, &config);
}
@@ -635,6 +635,7 @@ int game_main(int argc, char* argv[]) {
return 0;
}
dusk::texture_replacements::reload();
dusk::ui::initialize();
dusk::ui::push_document(std::make_unique<dusk::ui::Overlay>(), true, true);
dusk::ui::push_document(std::make_unique<dusk::ui::MenuBar>(), false);
@@ -783,6 +784,7 @@ int game_main(int argc, char* argv[]) {
dusk::discord::shutdown();
#endif
dusk::ui::shutdown();
dusk::texture_replacements::shutdown();
aurora_shutdown();
return 0;