Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Link being given magic on save creation. #24

Merged
merged 1 commit into from
Feb 5, 2024
Merged
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
4 changes: 2 additions & 2 deletions code/source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ namespace rnd {
const u32 pressedButtons = gctx->pad_state.input.buttons.flags;
const u32 newButtons = gctx->pad_state.input.new_buttons.flags;
#if defined ENABLE_DEBUG || defined DEBUG_PRINT
auto& saveData = game::GetCommonData().save.equipment;
auto& saveData = game::GetCommonData().save;
if (newButtons == (u32)game::pad::Button::ZR)
rnd::util::Print("%s: Sword flag is %u\n", __func__, saveData.sword_shield.sword);
rnd::util::Print("%s: Sword flag is %u\n", __func__, saveData.player.magic);
#endif
if (gSettingsContext.customMaskButton != 0 && pressedButtons == gSettingsContext.customMaskButton) {
game::ui::OpenScreen(game::ui::ScreenType::Masks);
Expand Down
4 changes: 2 additions & 2 deletions code/source/rnd/item_override.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ namespace rnd {
rItemOverrides[0].value.looksLikeItemId = 0x26;
rItemOverrides[1].key.scene = 0x6F;
rItemOverrides[1].key.type = ItemOverride_Type::OVR_COLLECTABLE;
rItemOverrides[1].value.getItemId = 0x48;
rItemOverrides[1].value.looksLikeItemId = 0x48;
rItemOverrides[1].value.getItemId = 0x49;
rItemOverrides[1].value.looksLikeItemId = 0x49;
rItemOverrides[2].key.scene = 0x12;
rItemOverrides[2].key.type = ItemOverride_Type::OVR_COLLECTABLE;
rItemOverrides[2].value.getItemId = 0x37;
Expand Down
3 changes: 3 additions & 0 deletions code/source/rnd/savefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,9 @@ namespace rnd {
playerData.magic_acquired = 1;
playerData.magic = 0x60;
equipmentData.data[3].item_btns[0] = game::ItemId::DekuNuts;
} else {
// Player initially is given magic 0x30 on save creation. This prevents that.
playerData.magic = 0x0;
}

if (gSettingsContext.startingDoubleDefense) {
Expand Down
Loading