actually make bosses send their locations

This commit is contained in:
Silvris
2024-03-21 16:56:08 -05:00
parent c6cdb9b7f5
commit a236c9467a
3 changed files with 29 additions and 3 deletions

View File

@@ -368,7 +368,7 @@ class KDL3ProcedurePatch(APProcedurePatch, APTokenMixin):
("apply_bsdiff4", ["kdl3_basepatch.bsdiff4"]),
("apply_tokens", ["token_patch.bin"]),
("apply_post_patch", []),
("write_snes_crc", [])
("calc_snes_crc", [])
]
name: bytes # used to pass to init
@@ -555,8 +555,8 @@ def patch_rom(world: "KDL3World", patch: KDL3ProcedurePatch):
patch.write_token(APTokenTypes.WRITE, 0x3C000, bytes(patch.name))
patch.write_token(APTokenTypes.WRITE, 0x3C020, world.options.game_language.value.to_bytes(1, "little"))
patch.write_token(APTokenTypes.COPY, 0x7FC0, (0x3C000, 21))
patch.write_token(APTokenTypes.COPY, 0x7FD9, (0x3C020, 1))
patch.write_token(APTokenTypes.COPY, 0x7FC0, (21, 0x3C000))
patch.write_token(APTokenTypes.COPY, 0x7FD9, (1, 0x3C020))
# handle palette
if world.options.kirby_flavor_preset.value != 0:

View File

@@ -58,6 +58,10 @@ org $01AFC8
org $01B013
SEC ; Remove Dedede Bad Ending
org $01B050
JSL HookBossPurify
NOP
org $02B7B0 ; Zero unlock
LDA $80A0
CMP #$0001
@@ -1230,6 +1234,28 @@ ApplyLocalCheck:
.Return:
RTL
HookBossPurify:
ORA $B0
STA $53D5
LDA $B0
LDX #$0000
LSR
.Loop:
BIT #$0001
BNE .Apply
LSR
LSR
INX
CPX #$0005
BCS .Return
BRA .Loop
.Apply:
TXA
ORA #$0200
JSL ApplyLocalCheck
.Return:
RTL
org $07C000
db "KDL3_BASEPATCH_ARCHI"