Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/dusk/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct UserSettings {
// QoL
ConfigVar<bool> enableQuickTransform;
ConfigVar<bool> hideTvSettingsScreen;
ConfigVar<bool> biggerWallets;
ConfigVar<int> walletSizes;
ConfigVar<bool> noReturnRupees;
ConfigVar<bool> disableRupeeCutscenes;
ConfigVar<bool> noSwordRecoil;
Expand Down
10 changes: 10 additions & 0 deletions src/d/d_meter2_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,16 @@ void dMeter2Draw_c::setAlphaLightDropAnimeMax() {
}

void dMeter2Draw_c::drawRupee(s16 i_rupeeNum) {
/*
The game crashes if i_rupeeNum > 9 999 since the UI wasn't made to display five digits.
Possible workaround is to clamp the rupee count shown by the UI but keep the true rupee count intact.
Doing so would allow the rupee count to go to 65 535, the u16 limit.
Working example:

if (i_rupeeNum > 9999) {
i_rupeeNum = 9999;
}
*/
mpRupeeTexture[3][0]->hide();
mpRupeeTexture[3][1]->hide();

Expand Down
32 changes: 29 additions & 3 deletions src/d/d_save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,48 @@ u8 dSv_player_status_a_c::getMixItemIndex(int i_no) const {

u16 dSv_player_status_a_c::getRupeeMax() const {
if (mWalletSize < 3) { // if you make this a default, it wont match. Compiler, pls.
#if TARGET_PC
int walletSizeSetting = dusk::getSettings().game.walletSizes;
if (walletSizeSetting == 3) // Uncapped
return 9999;
#endif
switch (mWalletSize) {
case WALLET:
#if TARGET_PC
return dusk::getSettings().game.biggerWallets ? 500 : 300;
switch (walletSizeSetting) {
case 0: // Default
return 300;
case 1: // HD
return 500;
case 2: // Large
return 1000;
}
#else
return 300;
#endif
case BIG_WALLET:
#if TARGET_PC
return dusk::getSettings().game.biggerWallets ? 1000 : 600;
switch (walletSizeSetting) {
case 0: // Default
return 600;
case 1: // HD
return 1000;
case 2: // Large
return 5000;
}
#else
return 600;
#endif
case GIANT_WALLET:
#if TARGET_PC
return dusk::getSettings().game.biggerWallets ? 2000 : 1000;
switch (walletSizeSetting) {
case 0: // Default
return 1000;
case 1: // HD
return 2000;
case 2: // Large
return 9999;
}
#else
return 1000;
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/dusk/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ UserSettings g_userSettings = {
// Quality of Life
.enableQuickTransform {"game.enableQuickTransform", false},
.hideTvSettingsScreen {"game.hideTvSettingsScreen", true},
.biggerWallets {"game.biggerWallets", false},
.walletSizes{"game.walletSizes", 0},
.noReturnRupees {"game.noReturnRupees", false},
.disableRupeeCutscenes {"game.disableRupeeCutscenes", false},
.noSwordRecoil {"game.noSwordRecoil", false},
Expand Down Expand Up @@ -201,7 +201,7 @@ void registerSettings() {
Register(g_userSettings.game.language);
Register(g_userSettings.game.enableQuickTransform);
Register(g_userSettings.game.hideTvSettingsScreen);
Register(g_userSettings.game.biggerWallets);
Register(g_userSettings.game.walletSizes);
Register(g_userSettings.game.noReturnRupees);
Register(g_userSettings.game.disableRupeeCutscenes);
Register(g_userSettings.game.noSwordRecoil);
Expand Down
2 changes: 1 addition & 1 deletion src/dusk/ui/preset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void applyPresetDusk() {
s.game.fastClimbing.setValue(true);
s.game.noMissClimbing.setValue(true);
s.game.fastTears.setValue(true);
s.game.biggerWallets.setValue(true);
s.game.walletSizes.setValue(1); // HD
s.game.invertCameraXAxis.setValue(true);
s.game.invertFirstPersonYAxis.setValue(true);
s.game.no2ndFishForCat.setValue(true);
Expand Down
49 changes: 47 additions & 2 deletions src/dusk/ui/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ constexpr std::array kMenuScalingModeLabels = {
"Dusklight",
};

constexpr std::array kWalletSizes = {
"Default",
"HD",
"Large",
"Uncapped"
};

bool try_parse_backend(std::string_view backend, AuroraBackend& outBackend) {
if (backend == "auto") {
outBackend = BACKEND_AUTO;
Expand Down Expand Up @@ -1162,8 +1169,46 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
"Hearts will never drop from enemies, pots, and various other places.");

leftPane.add_section("Quality of Life");
addOption("Bigger Wallets", getSettings().game.biggerWallets,
"Wallet sizes are like in the HD version. (500, 1000, 2000)");
leftPane.register_control(
leftPane.add_select_button({
.key = "Wallet Sizes",
.getValue =
[] {
const int idx = getSettings().game.walletSizes.getValue();
return Rml::String{kWalletSizes[idx]};
},
.isModified =
[] {
const auto& walletSizes = getSettings().game.walletSizes;
return walletSizes.getValue() != walletSizes.getDefaultValue();
},
}),
rightPane, [](Pane& pane) {
for (int i = 0; i < static_cast<int>(kWalletSizes.size()); ++i) {
pane.add_button(
{
.text = kWalletSizes[i],
.isSelected =
[i] { return getSettings().game.walletSizes.getValue() == i;
},
})
.on_pressed([i] {
mDoAud_seStartMenu(kSoundItemChange);
getSettings().game.walletSizes.setValue(i);
config::Save();
});
}
pane.add_rml(R"(
<br/>Modifies the maximum number of rupees the wallets can hold.
<ul style="display: block; margin-left: 20px;">
<li style="display: block; margin-bottom: 4px;">• Default: 300, 600, 1 000</li>
<li style="display: block; margin-bottom: 4px;">• HD: 500, 1 000, 2 000</li>
<li style="display: block; margin-bottom: 4px;">• Large: 1 000, 5 000, 9 999</li>
<li style="display: block; margin-bottom: 4px;">• Uncapped: 9 999</li>
</ul>
)");
});

addOption("Disable Rupee Cutscenes", getSettings().game.disableRupeeCutscenes,
"Rupees will not play cutscenes after you have collected them the first time.");
addOption("Faster Climbing", getSettings().game.fastClimbing,
Expand Down
Loading