From e2604d992e485726d374c7ad558d4c25c417b46f Mon Sep 17 00:00:00 2001 From: codemann8 Date: Tue, 6 Jul 2021 12:15:17 -0500 Subject: [PATCH] Fixed Frogsmith spawn to load correct sprite and accept him at home --- OWEdges.py | 26 +++++++++++++------------- Rom.py | 29 +++++++++++++++-------------- Rules.py | 2 -- asm/owrando.asm | 16 ++++++++++++++++ data/base2current.bps | Bin 138611 -> 138641 bytes 5 files changed, 44 insertions(+), 29 deletions(-) diff --git a/OWEdges.py b/OWEdges.py index 67c2dd4d..d1e6941f 100644 --- a/OWEdges.py +++ b/OWEdges.py @@ -958,19 +958,19 @@ OWTileGroups = { 'Palace of Darkness Area' ] ), - # ("Blacksmith", "Regular"): ( - # [ - # 0x22, 0x62 - # ], - # [ - # 'Blacksmith Area', - # 'Bat Cave Ledge' - # ], - # [ - # 'Hammer Pegs Area', - # 'Hammer Pegs Entry' - # ] - # ), + ("Blacksmith", "Regular"): ( + [ + 0x22, 0x62 + ], + [ + 'Blacksmith Area', + 'Bat Cave Ledge' + ], + [ + 'Hammer Peg Area', + 'Hammer Peg Entry' + ] + ), ("Dunes", "Regular"): ( [ 0x25, 0x65 diff --git a/Rom.py b/Rom.py index 36687a45..76f5d39f 100644 --- a/Rom.py +++ b/Rom.py @@ -28,7 +28,7 @@ from OverworldShuffle import default_flute_connections, flute_data JAP10HASH = '03a63945398191337e896e5771f77173' -RANDOMIZERBASEHASH = 'f10e887af782159e242c99a74df13874' +RANDOMIZERBASEHASH = 'a79956c1c0e5583ad694ac4296911e95' class JsonRom(object): @@ -593,19 +593,6 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): # patch overworld edges inverted_buffer = [0] * 0x82 if world.owShuffle[player] != 'vanilla' or world.owSwap[player] != 'vanilla': - rom.write_byte(0x18004C, 0x01) #patch for allowing Frogsmith to enter multi-entrance caves - # patches map data specific for OW Shuffle - inverted_buffer[0x03] = inverted_buffer[0x03] | 0x2 # convenient portal on WDM - inverted_buffer[0x1A] = inverted_buffer[0x1A] | 0x2 # rocks added to prevent OWG hardlock - inverted_buffer[0x1B] = inverted_buffer[0x1B] | 0x2 # rocks added to prevent OWG hardlock - inverted_buffer[0x22] = inverted_buffer[0x22] | 0x2 # rocks added to prevent OWG hardlock - inverted_buffer[0x3F] = inverted_buffer[0x3F] | 0x2 # added C to terrain - inverted_buffer[0x43] = inverted_buffer[0x43] | 0x2 # convenient portal on WDDM - inverted_buffer[0x5A] = inverted_buffer[0x5A] | 0x2 # rocks added to prevent OWG hardlock - inverted_buffer[0x5B] = inverted_buffer[0x5B] | 0x2 # rocks added to prevent OWG hardlock - inverted_buffer[0x62] = inverted_buffer[0x62] | 0x2 # rocks added to prevent OWG hardlock - inverted_buffer[0x7F] = inverted_buffer[0x7F] | 0x2 # added C to terrain - owMode = 0 if world.owShuffle[player] == 'parallel': owMode = 1 @@ -629,6 +616,20 @@ def patch_rom(world, rom, player, team, enemized, is_mystery=False): write_int16(rom, 0x150004, owFlags) + rom.write_byte(0x18004C, 0x01) # patch for allowing Frogsmith to enter multi-entrance caves + + # patches map data specific for OW Shuffle + inverted_buffer[0x03] = inverted_buffer[0x03] | 0x2 # convenient portal on WDM + inverted_buffer[0x1A] = inverted_buffer[0x1A] | 0x2 # rocks added to prevent OWG hardlock + inverted_buffer[0x1B] = inverted_buffer[0x1B] | 0x2 # rocks added to prevent OWG hardlock + inverted_buffer[0x22] = inverted_buffer[0x22] | 0x2 # rocks added to prevent OWG hardlock + inverted_buffer[0x3F] = inverted_buffer[0x3F] | 0x2 # added C to terrain + inverted_buffer[0x43] = inverted_buffer[0x43] | 0x2 # convenient portal on WDDM + inverted_buffer[0x5A] = inverted_buffer[0x5A] | 0x2 # rocks added to prevent OWG hardlock + inverted_buffer[0x5B] = inverted_buffer[0x5B] | 0x2 # rocks added to prevent OWG hardlock + inverted_buffer[0x62] = inverted_buffer[0x62] | 0x2 # rocks added to prevent OWG hardlock + inverted_buffer[0x7F] = inverted_buffer[0x7F] | 0x2 # added C to terrain + if world.owSwap[player] == 'mixed': for b in world.owswaps[player][0]: # load inverted maps diff --git a/Rules.py b/Rules.py index 83d9aac5..ad8b4dd6 100644 --- a/Rules.py +++ b/Rules.py @@ -74,8 +74,6 @@ def set_rules(world, player): # TODO: Remove these rules when these scenarios aren't a problem if world.owSwap[player] == 'mixed': - if 'Frog Area' in world.owswaps[player][2]: - set_rule(world.get_location('Frog', player), lambda state: False) if 'Stumpy Area' in world.owswaps[player][2]: set_rule(world.get_location('Stumpy', player), lambda state: False) diff --git a/asm/owrando.asm b/asm/owrando.asm index 3bfb5b67..84bf06ae 100644 --- a/asm/owrando.asm +++ b/asm/owrando.asm @@ -18,6 +18,15 @@ jml OWFluteCancel2 : nop org $0ab90d ;JSL $02E99D jsl OWFluteCancel +; allows Frog sprite to spawn in LW and also allows his friend to spawn in their house +org $068a76 ;LDA $7EF3CA : AND.w #$40 +lda $1b : eor #1 : nop #2 + +; allows Frog to be accepted at Blacksmith +org $06b3ee ;LDA $7EF3CC : CMP #$07 : BEQ $06B42E +jsl OWSmithAccept : nop #2 +db #$b0 ; BCS instead of BEQ + ;(replacing -> LDA $8A : AND.b #$40) org $00d8c4 ; < ? - Bank00.asm 4068 () jsl.l OWWorldCheck @@ -122,6 +131,13 @@ OWFluteCancel2: lda #$01 : sta $7f5006 + rtl } +OWSmithAccept: +{ + lda $7ef3cc : cmp #$07 : beq + + cmp #$08 : beq + + clc : rtl + + sec : rtl +} org $aa9000 OWEdgeTransition: diff --git a/data/base2current.bps b/data/base2current.bps index c7dd4c1c93a938e513d179043cf6e1ee114241d6..48b974508ab7fa2742c3a074234f672cd2274158 100644 GIT binary patch delta 140 zcmV;70CWHIx(JcG2(UZ>1S$>H^0Pnzlm!c9ft95jNdfBWJcyIl29FGIl$j!lh^p%9 zuuOxqX9uiJ7Mc++*0BSr2WzPVYr-I}6M`_7RBwrsDODl@MuW3XRR^jOmm^E2mN<3D ui5P1*AG&sOfs63W>Ap>4mql29Px19e0&m9ODap2e~-@pG#Sv_O` delta 132 zcmV-~0DJ$Dy9o2T2(UZ>1OycO>$5-slm!Aji<935j{;novw8=tO%|JN59qN2sRwJR z18c${uM>hWmM=cblRQ--10)pavtU&Rsv}#vT|J562wJZKfT|AzfU58YA|jBgfCM5L mkg9qpYo0kbpOcpVAp?9qiG#ZTx4QoU&m9QV@-vT#V=v{3pf;}n