mirror of
https://github.com/pret/pokered.git
synced 2024-10-24 07:25:21 +00:00
cd649184f5
rename functions, clean up address/wram comments, other misc only broken up so that all changes are viewable on github
50 lines
664 B
NASM
Executable file
50 lines
664 B
NASM
Executable file
HiddenItemNear: ; 7481f (1d:481f)
|
|
ld hl, HiddenItemCoords
|
|
ld b, $0
|
|
.asm_74824
|
|
ld de, $0003
|
|
ld a, [W_CURMAP]
|
|
call IsInRestOfArray
|
|
ret nc ; return if current map has no hidden items
|
|
push bc
|
|
push hl
|
|
ld hl, wd6f0
|
|
ld c, b
|
|
ld b, $2
|
|
predef FlagActionPredef
|
|
ld a, c
|
|
pop hl
|
|
pop bc
|
|
inc b
|
|
and a
|
|
inc hl
|
|
ld d, [hl]
|
|
inc hl
|
|
ld e, [hl]
|
|
inc hl
|
|
jr nz, .asm_74824
|
|
ld a, [W_YCOORD]
|
|
call Func_7486b
|
|
cp d
|
|
jr nc, .asm_74824
|
|
ld a, [W_YCOORD]
|
|
add $4
|
|
cp d
|
|
jr c, .asm_74824
|
|
ld a, [W_XCOORD]
|
|
call Func_7486b
|
|
cp e
|
|
jr nc, .asm_74824
|
|
ld a, [W_XCOORD]
|
|
add $5
|
|
cp e
|
|
jr c, .asm_74824
|
|
scf
|
|
ret
|
|
|
|
Func_7486b: ; 7486b (1d:486b)
|
|
sub $5
|
|
cp $f0
|
|
ret c
|
|
xor a
|
|
ret
|