Skip to content

Commit

Permalink
fixup dyna switches
Browse files Browse the repository at this point in the history
Silvris committed Jan 23, 2025

Verified

This commit was signed with the committer’s verified signature.
sdispater Sébastien Eustace
1 parent cf6c104 commit 7114611
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions worlds/kss/client.py
Original file line number Diff line number Diff line change
@@ -111,6 +111,11 @@ async def game_watcher(self, ctx: "SNIContext") -> None:
unlocked_planets = int.from_bytes(await snes_read(ctx, KSS_RECEIVED_PLANETS, 2), "little")
unlocked_planets |= (1 << planet)
snes_buffered_write(ctx, KSS_RECEIVED_PLANETS, unlocked_planets.to_bytes(2, "little"))
elif item.item & 0x800 != 0:
switch = item.item & 0xFF
unlocked_switches = int.from_bytes(await snes_read(ctx, KSS_DYNA_SWITCHES, 1), "little")
unlocked_switches |= (1 << switch)
snes_buffered_write(ctx, KSS_DYNA_SWITCHES, unlocked_switches.to_bytes(1, "little"))
else:
pass

Binary file modified worlds/kss/data/kss_basepatch.bsdiff4
Binary file not shown.
3 changes: 3 additions & 0 deletions worlds/kss/src/kss_basepatch.asm
Original file line number Diff line number Diff line change
@@ -113,6 +113,9 @@ org $02A34B
JML hook_copy_ability
NOP

org $07DF3E
NOP #3 ; Dyna Blade initialization, just need to preserve switch state

org $07DF95
JSL load_game
NOP #14 ; TGCO initialization

0 comments on commit 7114611

Please sign in to comment.