summaryrefslogtreecommitdiff
path: root/data/scripts/cutscene/introTown/script_Npc4EIntroTown.inc
blob: 0b1e0424247a45cfd5664a81928139ac9d180c46 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
@ Intro Hyrule Town NPC4E
SCRIPT_START script_Npc4EIntroTown
	CheckLocalFlag MACHI_01_DEMO
	JumpIf script_0800FA4C
	SetPlayerIdle
	Call DisablePauseMenuAndPutAwayItems
	SetEntityPositionRelative 0x00c8, 0x0148
	Call sub_0807F844
	SetFadeTime 0x0002
	SetFade6
	WaitForFadeFinish
	StartPlayerScript script_PlayerIntro1
	SetSyncFlag 0x00000002
	SetScrollSpeed 1
	SetEntityPositionRelative 0x00c8, 0x0218
	Call WaitForCameraTouchRoomBorder
	Wait 0x0064
	@ Camera reaches center of town square
	SetScrollSpeed 2
	SetEntityPositionRelative 0x00c8, 0x0368
	Call WaitForCameraTouchRoomBorder
	WaitForSyncFlagAndClear 0x00000001
	WaitForSyncFlagAndClear 0x00000004
	@ First message from Zelda
	MessageFromTargetPos TEXT_FESTIVAL, 0x01, 0x0000
	WaitUntilTextboxCloses
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	@ Zelda ran off. Give control to the player
	SetScrollSpeed 4
	CameraTargetPlayer
	Call EnablePauseMenu
	EnablePlayerControl
	SetSyncFlag 0x00000010
	WaitForSyncFlagAndClear 0x00000004
	SetPlayerIdle
	Call DisablePauseMenuAndPutAwayItems
	StartPlayerScript script_PlayerIntro2
	WaitForSyncFlagAndClear 0x00000001
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	MessageFromTargetPos TEXT_FESTIVAL, 0x03, 0x000e
	WaitUntilTextboxCloses
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	Call EnablePauseMenu
	EnablePlayerControl
	WaitForSyncFlagAndClear 0x00000004
	SetPlayerIdle
	Call DisablePauseMenuAndPutAwayItems
	StartPlayerScript script_PlayerIntro3
	WaitForSyncFlagAndClear 0x00000001
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	MessageFromTargetPos TEXT_FESTIVAL, 0x04, 0x000e
	WaitUntilTextboxCloses
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	Call EnablePauseMenu
	EnablePlayerControl
	WaitForSyncFlagAndClear 0x00000004
	SetPlayerIdle
	Call DisablePauseMenuAndPutAwayItems
	StartPlayerScript script_PlayerIntro4
	WaitForSyncFlagAndClear 0x00000001
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	MessageFromTargetPos TEXT_FESTIVAL, 0x05, 0x000e
	WaitUntilTextboxCloses
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	Call EnablePauseMenu
	EnablePlayerControl
	@ Wait for Link at Pina
	WaitForSyncFlagAndClear 0x00000004
	SetPlayerIdle
	Call DisablePauseMenuAndPutAwayItems
	Call sub_08063C5C
	PlaySound SFX_CUCCO_MINIGAME_BELL
	Wait 0x001e
	_0807E8E4_0
	Call CreatePlayerExclamationMark
	Wait 0x003c
	MessageFromTargetPos TEXT_PROLOGUE, 0x21, 0x000e
	WaitUntilTextboxCloses
	StartPlayerScript script_PlayerIntro5
	SetEntityPositionRelative 0x00f0, 0x0258
	SetScrollSpeed 1
	CameraTargetEntity
	Wait 0x001e
	Call sub_08063C2C
	WaitForSyncFlagAndClear 0x00000001
	MessageFromTargetPos TEXT_PROLOGUE, 0x22, 0x000e
	WaitUntilTextboxCloses
	_0807E8E4_0
	Call sub_08063C14
	Call sub_08094CDC
	Wait 0x001e
	MessageFromTargetPos TEXT_PROLOGUE, 0x23, 0x000e
	WaitUntilTextboxCloses
	Call sub_08063C14
	Call sub_08094DD8
	Wait 0x001e
	MessageFromTargetPos TEXT_PROLOGUE, 0x24, 0x000e
	WaitUntilTextboxCloses
	Call sub_08063C14
	Call sub_08094D34
	Wait 0x001e
	MessageFromTargetPos TEXT_PROLOGUE, 0x25, 0x000e
	WaitUntilTextboxCloses
	Call sub_08063C5C
	MessageFromTargetPos TEXT_PROLOGUE, 0x26, 0x000e
	WaitUntilTextboxCloses
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	_0807E8E4_1
	Call sub_08063C2C
	MessageFromTargetPos TEXT_PROLOGUE, 0x27, 0x0000
	WaitUntilTextboxCloses
	Call sub_08063C74
	Wait 0x003c
	Call sub_08063C14
	_0807E8E4_0
	MessageFromTargetPos TEXT_PROLOGUE, 0x28, 0x000e
	WaitUntilTextboxCloses
	_0807E8E4_1
	MessageFromTargetPos TEXT_PROLOGUE, 0x29, 0x0000
	WaitUntilTextboxCloses
	_0807E8E4_0
	MessageFromTargetPos TEXT_PROLOGUE, 0x2a, 0x000e
	WaitUntilTextboxCloses
	Call sub_08063C14
	Call sub_08094D70
	PlaySound SFX_103
	SetSyncFlag 0x00000002
	WaitForSyncFlagAndClear 0x00000004
	Call sub_08063C14
	Call sub_08094D10
	Wait 0x001e
	Call sub_08094E0C
	Wait 0x001e
	_0807E8E4_1
	Call CreatePlayerExclamationMark
	Wait 0x003c
	MessageFromTargetPos TEXT_PROLOGUE, 0x2b, 0x0000
	WaitUntilTextboxCloses
	@ Give the shield to the player
	GivePlayerItem ITEM_SHIELD
	WaitPlayerGetItem
	Call NPC4E_SaveEquippedItems
	Call SetPlayerActionNormal
	CallWithArg EquipItem, ITEM_SHIELD
	SetIntVariable 0x000000ff
	Call sub_0807F5B0
	CallWithArg SetPlayerMacro, gPlayerMacroTryOutShield
	Wait 0x00b7
	SetIntVariable 0x00000000
	Call sub_0807F5B0
	MessageFromTargetPos TEXT_PROLOGUE, 0x2c, 0x0000
	WaitUntilTextboxCloses
	@ Give control back to the player
	CallWithArg SetPlayerMacro, 0
	Call NPC4E_RestoreEquippedItems
	SetScrollSpeed 4
	CameraTargetPlayer
	Wait 0x000a
	SetSyncFlag 0x00000002
	Call sub_08063C44
	SetLocalFlag MACHI_01_DEMO
	Call EnablePauseMenu
	EnablePlayerControl
script_0800FA4C:
	DoPostScriptAction 0x0006
SCRIPT_END
	.2byte 0x0000