Files
dockipelago/worlds/tloz_oos/patching/asm/warp_to_start.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

79 lines
1.9 KiB
YAML

02//checkTreeVisited: |
cp STARTING_TREE_MAP_INDEX
jp nz,$6560 ; _mapMenu_checkRoomVisited
or a
ret
02/5ec8/: call checkTreeVisited
02/65e1/: call checkTreeVisited
# always treat starting seed tree as visited for warping purposes.
02//checkCursorVisited: |
ld a,(wMapMenuCursorIndex)
jp checkTreeVisited
02/609b/: call checkCursorVisited
# warp to starting tile if holding start when opening the map screen.
02//checkWarpToStart: |
ld a,(wKeysPressed)
and BTN_B | BTN_A
cp BTN_B | BTN_A
jp nz,$5029 ; @openMenu, we're done
call checkLinkCollisionsEnabled ; we want to check if Link is not in the middle of an action
jp nc,$5029 ; @openMenu, we're done
ld a,option.warpingGroup
set 7,a
ld (wWarpDestGroup),a
ld a,option.warpingRoom ; Starting room ID
ld (wWarpDestRoom),a
ld a,option.warpingPos ; Position in starting room
ld (wWarpDestPos),a
ld a,$05 ; TRANSITION_DEST_FALL
ld (wWarpTransition),a
ld a,$03
ld (wWarpTransition2),a
ld a,$ff
ld (wDisabledObjects),a
ld a,option.warpingSeason
ld (wRoomStateModifier),a
; Setup respawn to prevent save-scumming
ld hl,wDeathRespawnBuffer
ld a,option.warpingGroup
ldi (hl),a ; Room group
ld a,option.warpingRoom
ldi (hl),a ; Room
ld a,option.warpingSeason
ldi (hl),a ; Season
ld a,$02
ldi (hl),a ; Direction
ld a,option.warpingPosY
ldi (hl),a ; Y
ld a,option.warpingPosX
ld (hl),a ; X
ld a,SND_TELEPORT
call playSound
ld a,$03
call setMusicVolume
call clearStaticObjects
ld a,$d0
ld (wLinkObjectIndex),a
ld a,$03
ld (wMenuLoadState),a
ld a,(wActiveMusic)
or a
jr nz,@noResetMusic
ld a,$ff
ld (wActiveMusic),a
@noResetMusic:
pop af ; pop return addr from stack
ret
# Replace the unique call to @openMenu by the above extension checking for warp to start
02/501f/: call checkWarpToStart