2015-02-11 21:59:59 +00:00
|
|
|
|
|
|
|
SpawnPoints: ; 0x152ab
|
|
|
|
|
|
|
|
spawn: MACRO
|
2015-07-23 07:41:52 +00:00
|
|
|
; map, y, x
|
|
|
|
map \1
|
|
|
|
db \2, \3
|
2015-02-11 21:59:59 +00:00
|
|
|
ENDM
|
|
|
|
|
2015-07-23 07:41:52 +00:00
|
|
|
spawn KRISS_HOUSE_2F, 3, 3
|
|
|
|
spawn VIRIDIAN_POKECENTER_1F, 5, 3
|
2015-02-11 21:59:59 +00:00
|
|
|
|
2015-07-23 07:41:52 +00:00
|
|
|
spawn PALLET_TOWN, 5, 6
|
|
|
|
spawn VIRIDIAN_CITY, 23, 26
|
|
|
|
spawn PEWTER_CITY, 13, 26
|
|
|
|
spawn CERULEAN_CITY, 19, 22
|
|
|
|
spawn ROUTE_10_NORTH, 11, 2
|
|
|
|
spawn VERMILION_CITY, 9, 6
|
|
|
|
spawn LAVENDER_TOWN, 5, 6
|
|
|
|
spawn SAFFRON_CITY, 9, 30
|
|
|
|
spawn CELADON_CITY, 29, 10
|
|
|
|
spawn FUCHSIA_CITY, 19, 28
|
|
|
|
spawn CINNABAR_ISLAND, 11, 12
|
|
|
|
spawn ROUTE_23, 9, 6
|
2015-02-11 21:59:59 +00:00
|
|
|
|
2015-07-23 07:41:52 +00:00
|
|
|
spawn NEW_BARK_TOWN, 13, 6
|
|
|
|
spawn CHERRYGROVE_CITY, 29, 4
|
|
|
|
spawn VIOLET_CITY, 31, 26
|
|
|
|
spawn ROUTE_32, 11, 74
|
|
|
|
spawn AZALEA_TOWN, 15, 10
|
|
|
|
spawn CIANWOOD_CITY, 23, 44
|
|
|
|
spawn GOLDENROD_CITY, 15, 28
|
|
|
|
spawn OLIVINE_CITY, 13, 22
|
|
|
|
spawn ECRUTEAK_CITY, 23, 28
|
|
|
|
spawn MAHOGANY_TOWN, 15, 14
|
|
|
|
spawn LAKE_OF_RAGE, 21, 29
|
|
|
|
spawn BLACKTHORN_CITY, 21, 30
|
|
|
|
spawn SILVER_CAVE_OUTSIDE, 23, 20
|
|
|
|
spawn FAST_SHIP_CABINS_SW_SSW_NW, 6, 2
|
|
|
|
spawn N_A, -1, -1
|
2015-02-11 21:59:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LoadSpawnPoint: ; 1531f
|
2017-12-09 20:14:51 +00:00
|
|
|
; loads the spawn point in DefaultSpawnpoint
|
2015-02-11 21:59:59 +00:00
|
|
|
push hl
|
|
|
|
push de
|
2017-12-09 20:14:51 +00:00
|
|
|
ld a, [DefaultSpawnpoint]
|
2015-07-15 19:48:44 +00:00
|
|
|
cp SPAWN_N_A
|
|
|
|
jr z, .spawn_n_a
|
2015-02-11 21:59:59 +00:00
|
|
|
ld l, a
|
|
|
|
ld h, 0
|
2017-12-09 05:50:59 +00:00
|
|
|
add hl, hl
|
|
|
|
add hl, hl
|
2015-02-11 21:59:59 +00:00
|
|
|
ld de, SpawnPoints
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld [MapGroup], a
|
|
|
|
ld a, [hli]
|
|
|
|
ld [MapNumber], a
|
|
|
|
ld a, [hli]
|
|
|
|
ld [XCoord], a
|
|
|
|
ld a, [hli]
|
|
|
|
ld [YCoord], a
|
2015-07-15 19:48:44 +00:00
|
|
|
.spawn_n_a
|
2015-02-11 21:59:59 +00:00
|
|
|
pop de
|
|
|
|
pop hl
|
|
|
|
ret
|
|
|
|
; 15344
|
|
|
|
|
|
|
|
|
|
|
|
IsSpawnPoint: ; 15344
|
2015-07-15 19:48:44 +00:00
|
|
|
; Checks if the map loaded in de is a spawn point. Returns carry if it's a spawn point.
|
2015-02-11 21:59:59 +00:00
|
|
|
ld hl, SpawnPoints
|
|
|
|
ld c, 0
|
2015-07-15 19:48:44 +00:00
|
|
|
.loop
|
2015-02-11 21:59:59 +00:00
|
|
|
ld a, [hl]
|
2015-07-15 19:48:44 +00:00
|
|
|
cp SPAWN_N_A
|
|
|
|
jr z, .nope
|
2015-02-11 21:59:59 +00:00
|
|
|
cp d
|
2015-07-15 19:48:44 +00:00
|
|
|
jr nz, .next
|
2015-02-11 21:59:59 +00:00
|
|
|
inc hl
|
|
|
|
ld a, [hld]
|
|
|
|
cp e
|
2015-07-15 19:48:44 +00:00
|
|
|
jr z, .yes
|
2015-02-11 21:59:59 +00:00
|
|
|
|
2015-07-15 19:48:44 +00:00
|
|
|
.next
|
2015-02-11 21:59:59 +00:00
|
|
|
push bc
|
2015-07-23 16:59:19 +00:00
|
|
|
ld bc, 4 ; length of a spawn table entry
|
2015-02-11 21:59:59 +00:00
|
|
|
add hl, bc
|
|
|
|
pop bc
|
|
|
|
inc c
|
2015-07-15 19:48:44 +00:00
|
|
|
jr .loop
|
2015-02-11 21:59:59 +00:00
|
|
|
|
2015-07-15 19:48:44 +00:00
|
|
|
.nope
|
2015-02-11 21:59:59 +00:00
|
|
|
and a
|
|
|
|
ret
|
|
|
|
|
2015-07-15 19:48:44 +00:00
|
|
|
.yes
|
2015-02-11 21:59:59 +00:00
|
|
|
scf
|
|
|
|
ret
|
|
|
|
; 15363
|