Files
dockipelago/worlds/tloz_oos/patching/asm/quick_switch.yaml
Jonathan Tinney 7971961166
Some checks failed
Analyze modified files / flake8 (push) Failing after 2m28s
Build / build-win (push) Has been cancelled
Build / build-ubuntu2204 (push) Has been cancelled
ctest / Test C++ ubuntu-latest (push) Has been cancelled
ctest / Test C++ windows-latest (push) Has been cancelled
Analyze modified files / mypy (push) Has been cancelled
Build and Publish Docker Images / Push Docker image to Docker Hub (push) Successful in 5m4s
Native Code Static Analysis / scan-build (push) Failing after 5m2s
type check / pyright (push) Successful in 1m7s
unittests / Test Python 3.11.2 ubuntu-latest (push) Failing after 16m23s
unittests / Test Python 3.12 ubuntu-latest (push) Failing after 28m19s
unittests / Test Python 3.13 ubuntu-latest (push) Failing after 14m49s
unittests / Test hosting with 3.13 on ubuntu-latest (push) Successful in 5m0s
unittests / Test Python 3.13 macos-latest (push) Has been cancelled
unittests / Test Python 3.11 windows-latest (push) Has been cancelled
unittests / Test Python 3.13 windows-latest (push) Has been cancelled
add schedule I, sonic 1/frontiers/heroes, spirit island
2026-04-02 23:46:36 -07:00

52 lines
893 B
YAML

02/4fa8/: |
; This is where the game usually forbids opening a menu during intro, so we can use that space
ld hl,wKeysPressed
ldi a,(hl)
and BTN_START
jr z,@end
ld a,(hl) ; wKeysJustPressed
and BTN_B|BTN_A
jp nz,quick_switch
nop
nop
nop
@end:
02//quick_switch: |
ld a,(hl) ; wKeysJustPressed
and BTN_START
jr z,@clear_keys
ld a,(hl) ; wKeysJustPressed
ld hl,wInventorySubmenu0CursorPos
ld b,(hl)
push bc
push hl
bit 0,a
jr nz,@btn_a
push hl
push af
ld a,<wInventoryB
ld ($cbb6),a
ld (hl),$00
call $563d ; inventoryMenuState1@equipItem
pop af
pop hl
bit 1,a
jr nz,@end
@btn_a:
ld a,<wInventoryA
ld ($cbb6),a
ld (hl),$01
call $563d ; inventoryMenuState1@equipItem
@end:
pop hl
pop bc
ld (hl),b
ld a,$03
ld (wStatusBarNeedsRefresh),a
@clear_keys:
ld hl,wKeysPressed
ld a,(hl)
and $fc
ld (hl),a
ret