-
Notifications
You must be signed in to change notification settings - Fork 3
/
room7.asc
240 lines (164 loc) · 5.04 KB
/
room7.asc
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
// room script file
//can't skip to the next screen for a bit
int SCREEN_WAIT_TIME = 10;
int SCREEN_TIMER = 0;
bool CAN_SKIP_SCREEN = false;
int SCALE_INCREMENT = 1;
int CURRENT_SCALE = 5; //starts at 5, the minimum scale
bool DontScaleThisFrame = false;
bool FinishedScaling = false;
//AudioChannel* TitleScreen_1_Channel;
//AudioChannel* TitleScreen_2_Channel;
//final resting position and speeds of clouds.
int oCloud_Right_Top_InitX = 200;
int oCloud_Right_Top_InitY = 83;
int oCloud_Right_Top_Speed = -1;
int oCloud_Right_Middle_InitX = 190;
int oCloud_Right_Middle_InitY = 122;
int oCloud_Right_Middle_Speed = -2;
int oCloud_Right_Bottom_InitX = 154;
int oCloud_Right_Bottom_InitY = 183;
int oCloud_Right_Bottom_Speed = -1;
int oCloud_Left_Top_InitX = -63;
int oCloud_Left_Top_InitY = 46;
int oCloud_Left_Top_Speed = -2;
int oCloud_Left_Middle_InitX = -54;
int oCloud_Left_Middle_InitY = 110;
int oCloud_Left_Middle_Speed = -3;
int oCloud_Left_Bottom_InitX = -40;
int oCloud_Left_Bottom_InitY = 180;
int oCloud_Left_Bottom_Speed = -3;
//disabled because it just looked ugly
/*
//function to randomly move an object around, used for clouds on menu screen
function AnimateCloud(this Object*, int InitX, int InitY, int XRandMax, int YRandMax, int MoveSpeed)
{
//generate random number between cloud.X - 3 && cloud.X + 3
int XRand = Random(XRandMax);
//generate random number between cloud.Y - 3 && cloud.Y + 3
int YRand = Random(YRandMax);
int NewX = InitX + XRand * 2 - XRand;
int NewY = InitY + YRand * 2 - YRand;
//constantly generate a non-blocking cloud.Walk command to the 2 co-ords you just generated.
this.Move(NewX, NewY, MoveSpeed, eNoBlock, eAnywhere);
//this.X = NewX;
//this.Y = NewY;
}
*/
function room_FirstLoad()
{
//start the game with a burger in your inventory in debug mode
#ifdef DEBUG
cSkinner.AddInventory(iBurger);
#endif
SetRestartPoint();
//set default transition to box out. not setting it in general game options becuase
//it tries to do the effect over whatever you happened to have open behind the window
SetScreenTransition(eTransitionBoxout);
aTitlescreen_music.Play(eAudioPriorityNormal, eOnce);
oCloud_Right_Top.Move(oCloud_Right_Top_InitX, oCloud_Right_Top_InitY, oCloud_Right_Top_Speed, eNoBlock, eAnywhere);
oCloud_Right_Middle.Move(oCloud_Right_Middle_InitX, oCloud_Right_Middle_InitY, oCloud_Right_Middle_Speed, eNoBlock, eAnywhere);
oCloud_Right_Bottom.Move(oCloud_Right_Bottom_InitX, oCloud_Right_Bottom_InitY, oCloud_Right_Bottom_Speed, eNoBlock, eAnywhere);
oCloud_Left_Top.Move(oCloud_Left_Top_InitX, oCloud_Left_Top_InitY, oCloud_Left_Top_Speed, eNoBlock, eAnywhere);
oCloud_Left_Middle.Move(oCloud_Left_Middle_InitX, oCloud_Left_Middle_InitY, oCloud_Left_Middle_Speed, eNoBlock, eAnywhere);
oCloud_Left_Bottom.Move(oCloud_Left_Bottom_InitX, oCloud_Left_Bottom_InitY, oCloud_Left_Bottom_Speed, eNoBlock, eAnywhere);
}
function room_Load()
{
//need to set this before the room loads to make it seamless
cLogo.ManualScaling = true;
cLogo.Scaling = CURRENT_SCALE; //initial scale
//moved to disclaimer screen (room 8)
//hide the ui
//gAction.Visible = false;
//gMain.Visible = false;
//mouse.Visible = false;
//player.x = -100;
//player.y = -100;
}
//only increase the scale of the logo every other frame
function room_RepExec()
{
if (SCREEN_TIMER < SCREEN_WAIT_TIME)
{
SCREEN_TIMER += 1;
}
else
{
CAN_SKIP_SCREEN = true;
}
if (!DontScaleThisFrame)
{
CURRENT_SCALE += SCALE_INCREMENT;
DontScaleThisFrame = false;
}
else
{
DontScaleThisFrame = true;
}
if (CURRENT_SCALE <= 100)
{
cLogo.Scaling = CURRENT_SCALE;
}
else if (CURRENT_SCALE == 125)
{
oSubtitle.Visible = true;
}
else if (CURRENT_SCALE == 200)
{
oPressAnyKey.Visible = true;
if(RunningInBrowser)
{
oPressAnyKey.SetView(VCLICKTOSTART);
oPressAnyKey.X = 56;
}
else
{
oPressAnyKey.SetView(VPRESSANYKEY);
oPressAnyKey.X = 59;
}
oPressAnyKey.Animate(0, 0, eRepeat, eNoBlock);
}
}
function on_mouse_click(MouseButton button)
{
if (CAN_SKIP_SCREEN)
{
//move the camera to the dining room (control will be given to skinner when the camera is there)
cScroller.ChangeRoom(1, cSkinner.x, -100);
aTitlescreen_music.Stop();
//unhide the ui
gAction.Visible = true;
gMain.Visible = true;
}
}
//PRESS ANY KEY easter egg
function on_key_press(eKeyCode keycode)
{
if (CAN_SKIP_SCREEN)
{
if (keycode == eKeyTab)
{
if (oEgg_PressAnyKey.Visible)
{
oEgg_PressAnyKey.Visible = false;
///SetNextScreenTransition(eTransitionBoxout);
}
else
{
oEgg_PressAnyKey.Visible = true;
Wait(20); //flicker prevention
//SetNextScreenTransition(eTransitionInstant);
}
}
else
{
cSkinner.SetAsPlayer();
cScroller.ChangeRoom(3, 30, -100);
aTitlescreen_music.Stop();
//unhide the ui
gAction.Visible = true;
gMain.Visible = true;
}
}
}