summaryrefslogtreecommitdiff
path: root/engine/debug/field/move_to_entrance.inc
blob: c99f36fd70c1ef33ad44206383b101e00a373fd8 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
FieldDebug_MoveToRoute1Entrance:
; Check if the player is currently on Route 1
	ld a, [wMapGroup]
	cp GROUP_ROUTE_1_P1
	jr nz, .cannot_use
	ld a, [wMapId]
	cp MAP_ROUTE_1_P1
	jr nz, .cannot_use

	ldh a, [hROMBank]
	ld hl, .DoMove
	call QueueScript
	ld a, FIELDDEBUG_RETURN_EXIT
	ret

.cannot_use
	ld hl, .CantUseText
	call FieldDebug_ShowTextboxAndExit
	ld a, FIELDDEBUG_RETURN_REOPEN
	ret

.CantUseText:
	text "ここでは できません"
	para "ロード1でじっこうできます"
	done

.DoMove:
	call RefreshScreen
	ld hl, .MoveText
	call FieldDebug_ShowTextboxAndExit
	ld d, $d
	ld e, $d
	ld b, 0
	ld c, 1
	callab Function833a
	ld a, 0
	ld hl, wMovementBuffer
	call LoadMovementDataPointer
	call Function1fea
	ret

.MoveText:
	text "とくていちてん まで"
	next "うごかします"
	done