2018-06-25 02:10:37 +02:00
|
|
|
GetLandmarkCoords:
|
2013-11-28 03:54:21 -05:00
|
|
|
; Return coordinates (d, e) of landmark e.
|
2013-02-17 02:56:50 -05:00
|
|
|
push hl
|
|
|
|
ld l, e
|
2013-11-28 03:54:21 -05:00
|
|
|
ld h, 0
|
2013-02-17 02:56:50 -05:00
|
|
|
add hl, hl
|
2016-05-04 11:46:23 -04:00
|
|
|
add hl, hl
|
2013-02-17 02:56:50 -05:00
|
|
|
ld de, Landmarks
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2018-06-25 02:10:37 +02:00
|
|
|
GetLandmarkName::
|
2018-01-23 17:39:09 -05:00
|
|
|
; Copy the name of landmark e to wStringBuffer1.
|
2013-02-17 02:56:50 -05:00
|
|
|
push hl
|
|
|
|
push de
|
|
|
|
push bc
|
2013-11-28 03:54:21 -05:00
|
|
|
|
2013-02-17 02:56:50 -05:00
|
|
|
ld l, e
|
2013-11-28 03:54:21 -05:00
|
|
|
ld h, 0
|
2013-02-17 02:56:50 -05:00
|
|
|
add hl, hl
|
2016-05-04 11:46:23 -04:00
|
|
|
add hl, hl
|
2013-11-28 03:54:21 -05:00
|
|
|
ld de, Landmarks + 2
|
2013-02-17 02:56:50 -05:00
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2013-11-28 03:54:21 -05:00
|
|
|
|
2018-01-23 17:39:09 -05:00
|
|
|
ld de, wStringBuffer1
|
2013-02-17 02:56:50 -05:00
|
|
|
ld c, 18
|
2013-11-28 03:54:21 -05:00
|
|
|
.copy
|
2013-02-17 02:56:50 -05:00
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
dec c
|
2013-11-28 03:54:21 -05:00
|
|
|
jr nz, .copy
|
|
|
|
|
2013-02-17 02:56:50 -05:00
|
|
|
pop bc
|
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
|
2017-12-14 23:00:54 -05:00
|
|
|
INCLUDE "data/maps/landmarks.asm"
|