|
1
|
var cx = camerax();
|
|
2
|
var cy = cameray();
|
|
3
|
var dogyoffset = 0;
|
|
4
|
if (letterboxcon == 1)
|
|
5
|
{
|
|
6
|
letterboxtimer++;
|
|
7
|
if (letterboxtimer == 1)
|
|
8
|
snd_play_pitch(snd_wallclaw, 0.8);
|
|
9
|
if (letterboxtimer > 0 && letterboxtimer <= 15)
|
|
10
|
{
|
|
11
|
letterboxalpha = 1;
|
|
12
|
y2 = lerp(y2, 220, 0.2);
|
|
13
|
y6 = lerp(y6, 230, 0.2);
|
|
14
|
}
|
|
15
|
if (letterboxtimer == 30)
|
|
16
|
snd_play(snd_dogrev);
|
|
17
|
if (letterboxtimer == 69)
|
|
18
|
snd_play(snd_dograce_countdown);
|
|
19
|
if (letterboxtimer == 70)
|
|
20
|
{
|
|
21
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("y2", y2, y2 + 3, 4, 3, "in");
|
|
22
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("y6", y6, y6 - 3, 4, 3, "in");
|
|
23
|
}
|
|
24
|
if (letterboxtimer == 93)
|
|
25
|
{
|
|
26
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("y2", y2, y2 + 3, 4, 3, "in");
|
|
27
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("y6", y6, y6 - 3, 4, 3, "in");
|
|
28
|
}
|
|
29
|
if (letterboxtimer == 122)
|
|
30
|
{
|
|
31
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("y2", y2, 0, 7, 3, "in");
|
|
32
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("y6", y6, 480, 7, 3, "in");
|
|
33
|
}
|
|
34
|
if (!variable_instance_exists(dog, "anchory"))
|
|
35
|
{
|
|
36
|
dog.anchorx = dog.x;
|
|
37
|
dog.anchory = dog.y;
|
|
38
|
}
|
|
39
|
if (letterboxtimer >= 125)
|
|
40
|
{
|
|
41
|
letterboxalpha -= 0.2;
|
|
42
|
battlebgalpha = 0;
|
|
43
|
}
|
|
44
|
dog.x = dog.anchorx + (floor(sin((letterboxtimer * letterboxtimer) / 100)) * 2);
|
|
45
|
dog.y = dog.anchory + (floor(cos((letterboxtimer * letterboxtimer) / 200)) * 2);
|
|
46
|
if (letterboxtimer > 30 && (letterboxtimer % (14 - min(13, floor(0.2 * letterboxtimer)))) == 0)
|
|
47
|
{
|
|
48
|
with (instance_create(dog.x + random_range(-10, 10) + 4, dog.y + 6, obj_animation))
|
|
49
|
{
|
|
50
|
sprite_index = spr_rabbick_dustorb;
|
|
51
|
image_speed = 0.5;
|
|
52
|
image_blend = c_ltgray;
|
|
53
|
depth = other.dog.depth - 0.2;
|
|
54
|
hspeed = 1;
|
|
55
|
vspeed = random_range(-3, -4);
|
|
56
|
}
|
|
57
|
}
|
|
58
|
if (letterboxtimer == 150)
|
|
59
|
{
|
|
60
|
letterboxcon = 2;
|
|
61
|
letterboxtimer = 0;
|
|
62
|
}
|
|
63
|
}
|
|
64
|
draw_set_alpha(bgalpha);
|
|
65
|
ossafe_fill_rectangle(0, 0, 640, 480, false);
|
|
66
|
draw_sprite_ext(spr_nothing, battlebgindex, 0, 180, 2, 2.9, 0, c_white, battlebgalpha);
|
|
67
|
draw_sprite_ext(spr_nothing, battlebgindex, 272, 180, 2, 2.9, 0, c_white, battlebgalpha);
|
|
68
|
draw_sprite_ext(spr_nothing, battlebgindex, 544, 180, 2, 2.9, 0, c_white, battlebgalpha);
|
|
69
|
battlebgindex += 0.5;
|
|
70
|
draw_set_color(c_black);
|
|
71
|
draw_set_alpha(letterboxalpha);
|
|
72
|
ossafe_fill_rectangle(cx, cy, cx + 640, cy + y2, false);
|
|
73
|
ossafe_fill_rectangle(cx, cy + 480, cx + 640, cy + y6, false);
|
|
74
|
draw_set_alpha(linealpha);
|
|
75
|
d_line_width_color(linex1, 240, linex2, 240, linewidth, 16777215, 16777215);
|
|
76
|
draw_set_alpha(1);
|
|
77
|
if (con == 6)
|
|
78
|
{
|
|
79
|
var _angledifference = -angle_difference(obj_rotating_tower_controller_new.tower_angle, 315);
|
|
80
|
var xx = 0;
|
|
81
|
if (_angledifference >= 0 && _angledifference <= 90)
|
|
82
|
xx = lerp(0, 66, _angledifference / 90);
|
|
83
|
else if (_angledifference >= -90 && _angledifference < 0)
|
|
84
|
xx = lerp(0, -66, abs(_angledifference) / 90);
|
|
85
|
else
|
|
86
|
xx = -1000;
|
|
87
|
var _index = 5 + floor((xx - 10) / 22);
|
|
88
|
if (abs(_angledifference) > 90)
|
|
89
|
_index = 10;
|
|
90
|
var draw_x = 560 + xx;
|
|
91
|
with (obj_tower_dog_ladder_fake)
|
|
92
|
{
|
|
93
|
image_xscale = 1 - (abs(_index - 4) / 5);
|
|
94
|
x = draw_x;
|
|
95
|
depth = obj_rotating_tower_controller_new.depth - sin(degtorad(_angledifference));
|
|
96
|
if (falling)
|
|
97
|
{
|
|
98
|
falling += 0.2;
|
|
99
|
y = (y + falling) - 1;
|
|
100
|
}
|
|
101
|
}
|
|
102
|
with (obj_tower_dog_fx1)
|
|
103
|
image_index = 4 - ((floor(_angledifference * 0.2) + 4) % 5);
|
|
104
|
}
|