mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
e3e0bcd653
Name a lot of text labels according to our conventions
51 lines
798 B
NASM
51 lines
798 B
NASM
ItemFinder:
|
|
farcall CheckForHiddenItems
|
|
jr c, .found_something
|
|
ld hl, .Script_FoundNothing
|
|
jr .resume
|
|
|
|
.found_something
|
|
ld hl, .Script_FoundSomething
|
|
|
|
.resume
|
|
call QueueScript
|
|
ld a, $1
|
|
ld [wItemEffectSucceeded], a
|
|
ret
|
|
|
|
.ItemfinderSound:
|
|
ld c, 4
|
|
.sfx_loop
|
|
push bc
|
|
ld de, SFX_SECOND_PART_OF_ITEMFINDER
|
|
call WaitPlaySFX
|
|
ld de, SFX_TRANSACTION
|
|
call WaitPlaySFX
|
|
pop bc
|
|
dec c
|
|
jr nz, .sfx_loop
|
|
ret
|
|
|
|
.Script_FoundSomething:
|
|
reloadmappart
|
|
special UpdateTimePals
|
|
callasm .ItemfinderSound
|
|
writetext .ItemfinderItemNearbyText
|
|
closetext
|
|
end
|
|
|
|
.Script_FoundNothing:
|
|
reloadmappart
|
|
special UpdateTimePals
|
|
writetext .ItemfinderNopeText
|
|
closetext
|
|
end
|
|
|
|
.ItemfinderItemNearbyText:
|
|
text_far _ItemfinderItemNearbyText
|
|
text_end
|
|
|
|
.ItemfinderNopeText:
|
|
text_far _ItemfinderNopeText
|
|
text_end
|