forked from mirror/Archipelago
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
85 lines
1.9 KiB
YAML
85 lines
1.9 KiB
YAML
# if the item buffer is nonzero, spawn the item at link and reset the buffer.
|
|
# var INTERAC_MULTI_BYTE is used to signal the destination player number, and
|
|
# var 71 is set to override normal collect/player properties lookup.
|
|
05//checkNetItemBuffer: |
|
|
push bc
|
|
push de
|
|
push hl
|
|
|
|
ld a,(wMenuDisabled)
|
|
and a
|
|
jr nz,@done
|
|
ld a,(wLinkGrabState)
|
|
and a
|
|
jr nz,@done
|
|
ld hl,wNetTreasureIn
|
|
ldi a,(hl)
|
|
or a
|
|
jr z,@done
|
|
cp $ff
|
|
jr nz,@notDeathlink
|
|
|
|
; If item in buffer is 0xFF, it's a deathlink signal so make Link die
|
|
ld a,$fe
|
|
ld (wLinkDeathTrigger),a
|
|
jr @done
|
|
|
|
@notDeathlink:
|
|
ld b,a
|
|
ld c,(hl)
|
|
call spawnTreasureOnLink
|
|
jr nz,@done
|
|
ld l,$71
|
|
ld (hl),$02
|
|
|
|
ld hl,wNetCountInL
|
|
inc (hl)
|
|
ld a,(hl)
|
|
or a
|
|
jr nz,@noOverflow
|
|
ld hl,wNetCountInH
|
|
inc (hl)
|
|
|
|
@noOverflow:
|
|
ld hl,wNetTreasureIn
|
|
xor a
|
|
ldi (hl),a
|
|
ld (hl),a
|
|
|
|
@done:
|
|
pop hl
|
|
pop de
|
|
pop bc
|
|
call linkInteractWithAButtonSensitiveObjects
|
|
ret
|
|
05/5526/: call checkNetItemBuffer
|
|
|
|
# run treasure state 1 code immediately following treasure state 0 code, so
|
|
# that link can pick up items on the same frame they're spawned. this avoids
|
|
# issues for treasures spawning on the frame before link gets warped, like
|
|
# after subrosian dancing and when failing poe skip. maku seed visuals don't
|
|
# quite work right this way, so don't do this for maku seed.
|
|
09//treasureCollideImmediately: |
|
|
call objectSetVisiblec2
|
|
ld e,$70
|
|
ld a,(de)
|
|
cp TREASURE_MAKU_SEED
|
|
ret z
|
|
jp $4000 ; interactionCode60
|
|
09/49a6/: jp treasureCollideImmediately
|
|
|
|
# if var 71 is already nonzero, use that as the collect mode instead of
|
|
# whatever this is.
|
|
16//keepNonzeroCollectMode: |
|
|
ld e,$71
|
|
ld a,(de)
|
|
and a
|
|
jr nz,@next
|
|
ld a,b
|
|
@next:
|
|
ld b,a
|
|
swap a
|
|
and $07
|
|
ld (de),a
|
|
ret
|
|
16/453e/: call keepNonzeroCollectMode |