|
1
|
var _rotator = self;
|
|
2
|
if (surface_exists(snapshot))
|
|
3
|
surface_free(snapshot);
|
|
4
|
var _xdif = 0;
|
|
5
|
var _ydif = 0;
|
|
6
|
if (difficulty >= 4 && timer < lerp_time)
|
|
7
|
{
|
|
8
|
_xdif = pivotx;
|
|
9
|
_ydif = pivoty;
|
|
10
|
var _ease = scr_ease_inoutscr_ease_inout
function scr_ease_inout(arg0, arg1)
{
if (arg1 < -3 || arg1 > 7)
return arg0;
if (arg1 == -3)
return ease_inout_bounce(arg0, 0, 1, 1);
else if (arg1 == -2)
return ease_inout_elastic(arg0, 0, 1, 1);
else if (arg1 == -1)
return ease_inout_back(arg0, 0, 1, 1);
else if (arg1 == 1)
return -0.5 * cos((pi * arg0) - 1);
else if (arg1 == 0)
return arg0;
arg0 *= 2;
if (arg0 < 1)
{
return 0.5 * scr_ease_in(arg0, arg1);
}
else
{
arg0--;
return 0.5 * (scr_ease_out(arg0, arg1) + 1);
}
} (timer / lerp_time, 2);
|
|
11
|
pivotx = lerp(x, targetx, _ease);
|
|
12
|
pivoty = lerp(y, targety, _ease);
|
|
13
|
_xdif = pivotx - _xdif;
|
|
14
|
_ydif = pivoty - _ydif;
|
|
15
|
timer++;
|
|
16
|
}
|
|
17
|
if (difficulty != 4)
|
|
18
|
rotation += (rotspd * rotSign);
|
|
19
|
for (i = 0; i < listsize; i++)
|
|
20
|
{
|
|
21
|
with (bullets[i])
|
|
22
|
{
|
|
23
|
x += _xdif;
|
|
24
|
y += _ydif;
|
|
25
|
if (other.difficulty != 4)
|
|
26
|
{
|
|
27
|
scr_orbitaroundpointscr_orbitaroundpoint
function scr_orbitaroundpoint(arg0, arg1, arg2)
{
var __theta = point_direction(arg0, arg1, x, y);
var __radius = point_distance(arg0, arg1, x, y);
__theta += arg2;
x = arg0 + lengthdir_x(__radius, __theta);
y = arg1 + lengthdir_y(__radius, __theta);
} (other.pivotx, other.pivoty, other.rotspd * other.rotSign);
|
|
28
|
image_angle += (other.rotspd * other.rotSign);
|
|
29
|
}
|
|
30
|
if (other.motion_blur && v_ex("afterimage"))
|
|
31
|
{
|
|
32
|
for (var _af = 0; _af < other.afterimage_count; _af++)
|
|
33
|
{
|
|
34
|
with (afterimage[_af])
|
|
35
|
{
|
|
36
|
x += _xdif;
|
|
37
|
y += _ydif;
|
|
38
|
if (_rotator.difficulty != 4)
|
|
39
|
{
|
|
40
|
scr_orbitaroundpointscr_orbitaroundpoint
function scr_orbitaroundpoint(arg0, arg1, arg2)
{
var __theta = point_direction(arg0, arg1, x, y);
var __radius = point_distance(arg0, arg1, x, y);
__theta += arg2;
x = arg0 + lengthdir_x(__radius, __theta);
y = arg1 + lengthdir_y(__radius, __theta);
} (_rotator.pivotx, _rotator.pivoty, _rotator.rotspd * _rotator.rotSign);
|
|
41
|
image_angle += (_rotator.rotspd * _rotator.rotSign);
|
|
42
|
}
|
|
43
|
}
|
|
44
|
}
|
|
45
|
}
|
|
46
|
}
|
|
47
|
}
|
|
48
|
with (border)
|
|
49
|
{
|
|
50
|
x += _xdif;
|
|
51
|
y += _ydif;
|
|
52
|
if (other.difficulty != 4)
|
|
53
|
{
|
|
54
|
scr_orbitaroundpointscr_orbitaroundpoint
function scr_orbitaroundpoint(arg0, arg1, arg2)
{
var __theta = point_direction(arg0, arg1, x, y);
var __radius = point_distance(arg0, arg1, x, y);
__theta += arg2;
x = arg0 + lengthdir_x(__radius, __theta);
y = arg1 + lengthdir_y(__radius, __theta);
} (other.pivotx, other.pivoty, other.rotspd * other.rotSign);
|
|
55
|
image_angle += (other.rotspd * other.rotSign);
|
|
56
|
}
|
|
57
|
}
|
|
58
|
with (hand_a)
|
|
59
|
{
|
|
60
|
x += _xdif;
|
|
61
|
y += _ydif;
|
|
62
|
if (other.difficulty != 4)
|
|
63
|
{
|
|
64
|
scr_orbitaroundpointscr_orbitaroundpoint
function scr_orbitaroundpoint(arg0, arg1, arg2)
{
var __theta = point_direction(arg0, arg1, x, y);
var __radius = point_distance(arg0, arg1, x, y);
__theta += arg2;
x = arg0 + lengthdir_x(__radius, __theta);
y = arg1 + lengthdir_y(__radius, __theta);
} (other.pivotx, other.pivoty, other.rotspd * other.rotSign);
|
|
65
|
image_angle += (other.rotspd * other.rotSign);
|
|
66
|
}
|
|
67
|
}
|
|
68
|
with (hand_b)
|
|
69
|
{
|
|
70
|
x += _xdif;
|
|
71
|
y += _ydif;
|
|
72
|
if (other.difficulty != 4)
|
|
73
|
{
|
|
74
|
scr_orbitaroundpointscr_orbitaroundpoint
function scr_orbitaroundpoint(arg0, arg1, arg2)
{
var __theta = point_direction(arg0, arg1, x, y);
var __radius = point_distance(arg0, arg1, x, y);
__theta += arg2;
x = arg0 + lengthdir_x(__radius, __theta);
y = arg1 + lengthdir_y(__radius, __theta);
} (other.pivotx, other.pivoty, other.rotspd * other.rotSign);
|
|
75
|
image_angle += (other.rotspd * other.rotSign);
|
|
76
|
}
|
|
77
|
}
|
|
78
|
if (instance_exists(extra_sprite_obj))
|
|
79
|
{
|
|
80
|
with (extra_sprite_obj)
|
|
81
|
{
|
|
82
|
x += _xdif;
|
|
83
|
y += _ydif;
|
|
84
|
if (other.difficulty != 4)
|
|
85
|
{
|
|
86
|
scr_orbitaroundpointscr_orbitaroundpoint
function scr_orbitaroundpoint(arg0, arg1, arg2)
{
var __theta = point_direction(arg0, arg1, x, y);
var __radius = point_distance(arg0, arg1, x, y);
__theta += arg2;
x = arg0 + lengthdir_x(__radius, __theta);
y = arg1 + lengthdir_y(__radius, __theta);
} (other.pivotx, other.pivoty, other.rotspd * other.rotSign);
|
|
87
|
image_angle += (other.rotspd * other.rotSign);
|
|
88
|
}
|
|
89
|
}
|
|
90
|
}
|
|
91
|
if (difficulty != 4)
|
|
92
|
{
|
|
93
|
if (con == 3 && rotspd > 0)
|
|
94
|
rotspd = scr_movetowardsscr_movetowards
function scr_movetowards(arg0, arg1, arg2)
{
if (arg0 == arg1)
return arg0;
else if (arg0 > arg1)
return max(arg0 - arg2, arg1);
else
return min(arg0 + arg2, arg1);
}
function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0)
{
scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1);
}
function scr_obj_movetowards_point(arg0, arg1, arg2)
{
var _distance = point_distance(x, y, arg0, arg1);
if (arg2 >= _distance)
{
x = arg0;
y = arg1;
}
else
{
var _direction = point_direction(x, y, arg0, arg1);
x += lengthdir_x(arg2, _direction);
y += lengthdir_y(arg2, _direction);
}
} (rotspd, 0, decel);
|
|
95
|
else if (con == 2 && rotspd < max_rotate_speed)
|
|
96
|
rotspd = scr_movetowardsscr_movetowards
function scr_movetowards(arg0, arg1, arg2)
{
if (arg0 == arg1)
return arg0;
else if (arg0 > arg1)
return max(arg0 - arg2, arg1);
else
return min(arg0 + arg2, arg1);
}
function scr_obj_movetowards_obj(arg0, arg1, arg2 = 0, arg3 = 0)
{
scr_obj_movetowards_point(arg0.x + arg2, arg0.y + arg3, arg1);
}
function scr_obj_movetowards_point(arg0, arg1, arg2)
{
var _distance = point_distance(x, y, arg0, arg1);
if (arg2 >= _distance)
{
x = arg0;
y = arg1;
}
else
{
var _direction = point_direction(x, y, arg0, arg1);
x += lengthdir_x(arg2, _direction);
y += lengthdir_y(arg2, _direction);
}
} (rotspd, max_rotate_speed, accel);
|
|
97
|
}
|