Files
dockipelago/worlds/tloz_ooa/patching/asm/collect.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

130 lines
3.0 KiB
YAML

# calls lookupCollectMode_body in another bank.
00//lookupCollectMode: |
push bc
push de
push hl
ld e,$06
ld hl,lookupCollectMode_body
call interBankCall
ld a,e
pop hl
cp $ff
jr nz,@next
dec hl
ldi a,(hl)
@next:
pop de
pop bc
ret
# return a spawning item's collection mode in a and e, based on current room.
# the table format is (group, room, mode), and modes 80+ are used to index a
# jump table for special cases. if no match is found, it returns the regular,
# non-overriden mode. does nothing if the item's collect mode is already set.
06//collectPropertiesTable: /include collectPropertiesTable
06//lookupCollectMode_body: |
ld e,$71
ld a,(de)
ld e,a
and a
ret nz
ld a,(wActiveGroup)
ld b,a
ld a,(wActiveRoom)
ld c,a
ld e,$01
ld hl,collectPropertiesTable
call searchDoubleKey
ld a,$00 ; Don't use "xor a" here since it would affect C flag!
ld e,$02
ret nc
ld a,(hl)
ld e,a
cp $80
ret c
ld hl,collectSpecialJumpTable
and $7f
add a,a
rst 10
ldi a,(hl)
ld h,(hl)
ld l,a
jp (hl)
# Add a special bypass to not show textboxes for Small Keys dropping from ceiling
09//bypassKeydropsTextbox: |
; Don't bypass anything if keysanity is on, since we want the textbox to indicate for which dungeon
; that key was for.
ld a,option.keysanity_small_keys
or a
jr nz,@regularText
ld e,$71 ; var31, containing spawn mode
ld a,(de)
cp $02
jr nz,@regularText ; jump if not a drop from ceiling
ld e,$72 ; var32, containing grab mode
ld a,(de)
or a
jr nz,@regularText ; jump if grab triggers an animation change
; It's a drop not triggering an animation change ==> it's a keydrop, so skip its textbox (0xFF)
ld a,$ff
ret
; return regular text ID otherwise
@regularText:
ld e,$75 ; var35, containing text id
ld a,(de)
ret
09/4c5d/: call bypassKeydropsTextbox
# collect modes starting at 80 index this jump table to determine the actual
# mode.
06//collectSpecialJumpTable: |
dw collectMakuTree
dw collectTargetCarts
dw collectBigBangGame
dw collectLavaJuiceRoom
# maku tree item drops at a specific script pos, otherwise use regular mode.
06//collectMakuTree: |
ld a,($d258) # script position
cp $84
ld e,COLLECT_FALL
ret z
ld e,COLLECT_PICKUP
ret
# target carts prizes are displayed with a poof.
06//collectTargetCarts: |
ld e,$4d
ld a,(de) # object x position
cp $78
ld e,COLLECT_POOF
ret z
ld e,COLLECT_PICKUP
ret
# big bang game prizes are displayed with a poof.
06//collectBigBangGame: |
ld e,$4b
ld a,(de) # object y position
cp $38
ld e,COLLECT_POOF
ret z
ld e,COLLECT_PICKUP
ret
# lava juice goron and chest both give items in this room.
06//collectLavaJuiceRoom: |
ld e,$4d
ld a,(de) # object x position
cp $68
ld e,COLLECT_PICKUP_NOFLAG
ret c
ld e,COLLECT_CHEST
ret