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 tingle map rewards if you are given a map as well. #60

Merged
merged 1 commit into from
Mar 14, 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
64 changes: 44 additions & 20 deletions code/mm.ld
Original file line number Diff line number Diff line change
Expand Up @@ -327,26 +327,6 @@ SECTIONS{
*(.patch_RemoveGoronMaskCheckDarmani)
}

.patch_CheckOshExtData 0x3BF224 : {
*(.patch_CheckOshExtData)
}

.patch_OverrideQuiverArcheryTown 0x3E50E4 : {
*(.patch_OverrideQuiverArchery)
}

.patch_OverrideQuiverArcherySwamp 0x3EA2B0 : {
*(.patch_OverrideQuiverArcheryTwo)
}

.patch_OverrideFairyGiveItem 0x3BECAC : {
*(.patch_OverrideFairyGiveItem)
}

.patch_OverrideGreatFairySpawn 0x3BEC84 : {
*(.patch_OverrideGreatFairySpawn)
}

.patch_SaveExtDataOnOwl 0x317004 : {
*(.patch_SaveExtDataOnOwl)
}
Expand Down Expand Up @@ -379,6 +359,30 @@ SECTIONS{
*(.patch_CheckMoTRequirement)
}

.patch_TingleCheckClocktownMapTwo 0x3F5F00 : {
*(.patch_TingleCheckClocktownMapTwo)
}

.patch_TingleCheckWoodfallMapTwo 0x3F5F10 : {
*(.patch_TingleCheckWoodfallMapTwo)
}

.patch_TingleCheckSnowheadMapTwo 0x3F5F20 : {
*(.patch_TingleCheckSnowheadMapTwo)
}

.patch_TingleCheckRomaniMapTwo 0x3F5F30 : {
*(.patch_TingleCheckRomaniMapTwo)
}

.patch_TingleCheckGreatBayMapTwo 0x3F5F40 : {
*(.patch_TingleCheckGreatBayMapTwo)
}

.patch_TingleCheckStoneTowerMapTwo 0x3F5F50 : {
*(.patch_TingleCheckStoneTowerMapTwo)
}

.patch_TradeItemDeleteMoonsTear 0x3B5214 : {
*(.patch_TradeItemDeleteMoonsTear)
}
Expand All @@ -387,10 +391,30 @@ SECTIONS{
*(.patch_OverrideWalletSpiderHouseTwo)
}

.patch_CheckOshExtData 0x3BF224 : {
*(.patch_CheckOshExtData)
}

.patch_OverrideWalletSpiderHouse 0x3BF2A8 : {
*(.patch_OverrideWalletSpiderHouse)
}

.patch_OverrideQuiverArcheryTown 0x3E50E4 : {
*(.patch_OverrideQuiverArchery)
}

.patch_OverrideQuiverArcherySwamp 0x3EA2B0 : {
*(.patch_OverrideQuiverArcheryTwo)
}

.patch_OverrideFairyGiveItem 0x3BECAC : {
*(.patch_OverrideFairyGiveItem)
}

.patch_OverrideGreatFairySpawn 0x3BEC84 : {
*(.patch_OverrideGreatFairySpawn)
}

.patch_HMSGiveItem 0x41D018 : {
*(.patch_HMSGiveItem)
}
Expand Down
18 changes: 17 additions & 1 deletion code/source/asm/tingle_hooks.s
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,20 @@ hook_CheckTingle:
pop {r0}
bx lr
doNotGiveItem:
b 0x2DAC3C
b 0x2DAC3C

.global hook_CheckTingleTwo
hook_CheckTingleTwo:
push {r0-r12,lr}
cpy r1,r6
bl ItemOverride_CheckTingleMaps
cmp r0,#0x1
pop {r0-r12,lr}
bne doNotGiveItemTwo
push {r0}
mov r0,#0x0
cmp r0,#0x0
pop {r0}
bx lr
doNotGiveItemTwo:
b 0x3F6038
38 changes: 37 additions & 1 deletion code/source/asm/tingle_patches.s
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,40 @@ patch_TingleCheckGreatBayMap:
.global patch_TingleCheckStoneTowerMap
patch_TingleCheckStoneTowerMap:
mov r0,#0x20
bl hook_CheckTingle
bl hook_CheckTingle

.section .patch_TingleCheckClocktownMapTwo
.global patch_TingleCheckClocktownMapTwo
patch_TingleCheckClocktownMapTwo:
mov r0,#0x1
bl hook_CheckTingleTwo

.section .patch_TingleCheckWoodfallMapTwo
.global patch_TingleCheckWoodfallMapTwo
patch_TingleCheckWoodfallMapTwo:
mov r0,#0x2
bl hook_CheckTingleTwo

.section .patch_TingleCheckSnowheadMapTwo
.global patch_TingleCheckSnowheadMapTwo
patch_TingleCheckSnowheadMapTwo:
mov r0,#0x4
bl hook_CheckTingleTwo

.section .patch_TingleCheckRomaniMapTwo
.global patch_TingleCheckRomaniMapTwo
patch_TingleCheckRomaniMapTwo:
mov r0,#0x8
bl hook_CheckTingleTwo

.section .patch_TingleCheckGreatBayMapTwo
.global patch_TingleCheckGreatBayMapTwo
patch_TingleCheckGreatBayMapTwo:
mov r0,#0x10
bl hook_CheckTingleTwo

.section .patch_TingleCheckStoneTowerMapTwo
.global patch_TingleCheckStoneTowerMapTwo
patch_TingleCheckStoneTowerMapTwo:
mov r0,#0x20
bl hook_CheckTingleTwo
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 = 0x6E;
rItemOverrides[1].value.looksLikeItemId = 0x6E;
rItemOverrides[1].value.getItemId = 0xB4;
rItemOverrides[1].value.looksLikeItemId = 0xB4;
rItemOverrides[2].key.scene = 0x12;
rItemOverrides[2].key.type = ItemOverride_Type::OVR_COLLECTABLE;
rItemOverrides[2].value.getItemId = 0x37;
Expand Down
2 changes: 1 addition & 1 deletion code/source/rnd/savefile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ namespace rnd {
gSettingsContext.skipBombersMinigame = 1;
gSettingsContext.freeScarecrow = 1;
saveData.activate_dungeon_skip_portal_0xF0_for_all = 0xF0;
SaveFile_FillOverWorldMapData();
// SaveFile_FillOverWorldMapData();
saveData.inventory.collect_register.oath_to_order = 1;

// Boss Remains
Expand Down
Loading