summaryrefslogtreecommitdiff
path: root/engine/debug/field/teleport.inc
blob: 5edbf97e2572981eb30589aa4e3492c22c12d20d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FieldDebug_Teleport:
	call .DoTeleport
	ld a, FIELDDEBUG_RETURN_REOPEN
	ret

.DoTeleport:
	ld a, [wMapGroup]
	ld d, a
	ld a, [wMapId]
	ld e, a
	callab IsSpawnPoint
	jr nc, .not_spawn_point
	ld a, [wMapGroup]
	ld [wLastSpawnMapGroup], a
	ld a, [wMapId]
	ld [wLastSpawnMapNumber], a
	ld hl, .MapRegisteredText
	call MenuTextBoxBackup
	ret

.not_spawn_point
	ld hl, .CannotRegisterMapText
	call MenuTextBoxBackup
	ret

.MapRegisteredText:
	text "このばしょを とうろくしました"
	para "<DONE>"

.CannotRegisterMapText:
	text "ここは とうろくできません!"
	para "<DONE>"