|
1
|
if (!surface_exists(my_surface))
|
|
2
|
my_surface = surface_create(camerawidth(), cameraheight());
|
|
3
|
if (!surface_exists(ball_surface))
|
|
4
|
ball_surface = surface_create(camerawidth(), cameraheight());
|
|
5
|
if (!surface_exists(star_surface))
|
|
6
|
star_surface = surface_create(camerawidth(), cameraheight());
|
|
7
|
if (!surface_exists(terrible_surface))
|
|
8
|
terrible_surface = surface_create(camerawidth(), cameraheight());
|
|
9
|
draw_self();
|
|
10
|
if (stop)
|
|
11
|
exit;
|
|
12
|
surface_set_target(ball_surface);
|
|
13
|
draw_clear_alpha(c_black, 0);
|
|
14
|
draw_sprite_tiled(spr_knight_bullet_flow, 0, fake_x + (global.time * 2), fake_y);
|
|
15
|
gpu_set_blendmode(bm_add);
|
|
16
|
repeat (4)
|
|
17
|
draw_sprite_tiled(spr_knight_bullet_flow, 0, fake_x + (global.time * 2), fake_y);
|
|
18
|
gpu_set_blendmode(bm_normal);
|
|
19
|
ball_counter += ball_speed;
|
|
20
|
if (ball_counter < 0)
|
|
21
|
ball_counter += 1800;
|
|
22
|
if (ball_counter > 1800)
|
|
23
|
ball_counter -= 1800;
|
|
24
|
gpu_set_blendmode_ext(bm_zero, bm_src_color);
|
|
25
|
for (a = 0; a < 6; a++)
|
|
26
|
draw_circle_color(fake_x, fake_y + 57, 1800 - ((ball_counter + (300 * a)) % 1800), c_white, #595959, false);
|
|
27
|
draw_circle_color(fake_x, fake_y + 57, 640, c_white, c_black, false);
|
|
28
|
gpu_set_blendmode(bm_normal);
|
|
29
|
surface_reset_target();
|
|
30
|
surface_set_target(star_surface);
|
|
31
|
draw_clear_alpha(c_black, 0);
|
|
32
|
with (obj_knight_circle)
|
|
33
|
event_user(1);
|
|
34
|
with (obj_particle_generic)
|
|
35
|
draw_sprite_ext(sprite_index, image_index, screenx(), screeny(), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
|
|
36
|
with (obj_knight_roaring_star)
|
|
37
|
{
|
|
38
|
if (image_blend == c_white)
|
|
39
|
continue;
|
|
40
|
if (con == 0)
|
|
41
|
event_user(0);
|
|
42
|
else
|
|
43
|
event_user(1);
|
|
44
|
}
|
|
45
|
with (obj_knight_roaring_star)
|
|
46
|
{
|
|
47
|
if (image_blend == c_dkgray)
|
|
48
|
continue;
|
|
49
|
if (con == 0)
|
|
50
|
event_user(0);
|
|
51
|
else
|
|
52
|
event_user(1);
|
|
53
|
}
|
|
54
|
gpu_set_colorwriteenable(true, true, true, false);
|
|
55
|
draw_sprite_ext(spr_knight_line_grate, 0, 0, star_flicker, 2, 2, 0, c_black, 1);
|
|
56
|
star_flicker = 2 - star_flicker;
|
|
57
|
gpu_set_colorwriteenable(true, true, true, true);
|
|
58
|
with (obj_knight_roaring_star)
|
|
59
|
{
|
|
60
|
if ((image_blend == c_dkgray || image_xscale > 1) && con < 1)
|
|
61
|
continue;
|
|
62
|
if (con == 0)
|
|
63
|
event_user(0);
|
|
64
|
else
|
|
65
|
event_user(1);
|
|
66
|
}
|
|
67
|
with (obj_knight_pointing_starchild)
|
|
68
|
{
|
|
69
|
draw_set_blend_mode(bm_add);
|
|
70
|
var _glow = scr_pingpongscr_pingpong
function scr_pingpong(arg0, arg1)
{
if (arg1 == 0)
return arg0;
var __value = scr_loop(arg0, arg1 * 2);
if (__value > arg1)
__value = (arg1 * 2) - __value;
return __value;
}
function scr_pingpong_ext(arg0, arg1, arg2)
{
var __range = arg2 - arg1;
if (__range == 0)
return arg0;
var __value = scr_loop(arg0 - arg1, __range * 2);
if (__value > __range)
__value = (__range * 2) - __value;
return __value + arg1;
}
function scr_loop(arg0, arg1)
{
if (arg1 == 0)
return arg0;
var __value = arg0 % arg1;
if (arg0 < 0)
__value += arg1;
return __value;
}
function scr_loop_ext(arg0, arg1, arg2)
{
var __range = arg2 - arg1;
if (__range == 0)
return arg0;
var __amount = arg0 - arg1;
var __value = __amount % __range;
if (__value < 0)
scr_debug_print(string(__amount) + " % " + string(__range) + " = " + string(__value));
if (__amount < 0)
__value += __range;
return __value + arg1;
} (timer, 2) / 4;
|
|
71
|
scr_draw_outline_extscr_draw_outline_ext
function scr_draw_outline_ext(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9)
{
gpu_set_fog(true, arg7, 0, 0);
var __xdirA = arg9;
var __xdirB = 0;
var __ydirA = 0;
var __ydirB = arg9;
if ((arg6 % 90) != 0)
{
__xdirA = lengthdir_x(arg9, arg6);
__xdirB = lengthdir_x(arg9, arg6 + 90);
__ydirA = lengthdir_y(arg9, arg6 + 90);
__ydirB = lengthdir_y(arg9, arg6);
}
draw_sprite_ext(arg0, arg1, arg2 + __xdirA, arg3 + __ydirA, arg4, arg5, arg6, c_white, arg8);
draw_sprite_ext(arg0, arg1, arg2 - __xdirA, arg3 - __ydirA, arg4, arg5, arg6, c_white, arg8);
draw_sprite_ext(arg0, arg1, arg2 + __xdirB, arg3 + __ydirB, arg4, arg5, arg6, c_white, arg8);
draw_sprite_ext(arg0, arg1, arg2 - __xdirB, arg3 - __ydirB, arg4, arg5, arg6, c_white, arg8);
gpu_set_fog(false, c_white, 0, 0);
} (sprite_index, image_index, screenx(), screeny(), image_xscale, image_yscale, image_angle, c_white, _glow * image_alpha, image_xscale);
|
|
72
|
draw_sprite_ext(sprite_index, image_index, screenx(), screeny(), image_xscale, image_yscale, image_angle, c_white, image_alpha);
|
|
73
|
draw_set_blend_mode(bm_normal);
|
|
74
|
image_alpha = clamp01(remap(45, 60, 1, 0, timer));
|
|
75
|
if (image_alpha < 1)
|
|
76
|
active = false;
|
|
77
|
if (image_alpha == 0)
|
|
78
|
instance_destroy();
|
|
79
|
}
|
|
80
|
with (obj_afterimage)
|
|
81
|
draw_sprite_ext(sprite_index, image_index, screenx(), screeny(), image_xscale, image_yscale, image_angle, c_white, image_alpha);
|
|
82
|
surface_reset_target();
|
|
83
|
surface_set_target(my_surface);
|
|
84
|
draw_clear_alpha(c_black, 0);
|
|
85
|
ossafe_fill_rectangle_color(0, 0, camerawidth(), cameraheight(), c_black, c_black, c_black, c_black, false);
|
|
86
|
if (!hsv_switch)
|
|
87
|
hsv++;
|
|
88
|
else
|
|
89
|
hsv--;
|
|
90
|
if (hsv >= 288)
|
|
91
|
hsv_switch = true;
|
|
92
|
if (hsv <= 128)
|
|
93
|
hsv_switch = false;
|
|
94
|
gpu_set_blendmode(bm_add);
|
|
95
|
for (a = 0; a < surface_get_height(ball_surface); a++)
|
|
96
|
{
|
|
97
|
var color = make_color_hsv(hsv % 255, 255, 255);
|
|
98
|
draw_surface_part_ext(ball_surface, 0, a, surface_get_width(ball_surface), 1, (sin((a + global.time) * 0.1) * 4 * intensity) + (sin((a + global.time) * 0.35) * 0.5 * intensity), a, 1, 1, color, ball_darkness);
|
|
99
|
}
|
|
100
|
draw_surface(star_surface, 0, 0);
|
|
101
|
gpu_set_blendmode(bm_normal);
|
|
102
|
with (obj_afterimage_grow)
|
|
103
|
draw_sprite_ext(sprite_index, image_index, screenx(), screeny(), image_xscale, image_yscale, image_angle, c_white, image_alpha);
|
|
104
|
if (line_timer > -1)
|
|
105
|
{
|
|
106
|
gpu_set_colorwriteenable(true, true, true, false);
|
|
107
|
var dir = -63;
|
|
108
|
var color = make_color_rgb(r, g, b);
|
|
109
|
draw_sprite_ext(spr_rk_quickslash_marker_gradient, 0, (camerawidth() * 0.5) - lengthdir_x(280, -63), (cameraheight() * 0.5) - lengthdir_y(280, -63), line_timer * 1, 4 + (8 * (1 - (min(line_timer, 16) / 16))), dir, color, 1);
|
|
110
|
draw_sprite_ext(spr_rk_quickslash_marker, 0, (camerawidth() * 0.5) - lengthdir_x(280, -63), (cameraheight() * 0.5) - lengthdir_y(280, -63), line_timer * 1, 4 + (8 * (1 - (min(line_timer, 16) / 16))), dir, c_black, 1);
|
|
111
|
gpu_set_colorwriteenable(true, true, true, true);
|
|
112
|
}
|
|
113
|
knight_sprite_image += knight_sprite_speed;
|
|
114
|
if (intensity < 3.75)
|
|
115
|
intensify = intensity;
|
|
116
|
else
|
|
117
|
intensify = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (intensify, 0, 0.1);
|
|
118
|
var bl = sprite_get_bbox_left(knight_sprite);
|
|
119
|
var bt = sprite_get_bbox_top(knight_sprite);
|
|
120
|
if (!do_fake_screen)
|
|
121
|
{
|
|
122
|
if (intensify > 1.5)
|
|
123
|
{
|
|
124
|
for (a = 0; a < sprite_get_height(knight_sprite); a += 1)
|
|
125
|
{
|
|
126
|
if ((a % 2) == 0)
|
|
127
|
draw_sprite_part_ext(knight_sprite, knight_sprite_image, bl, a, 70, 1, (fake_x - 70) + (sin((a + (global.time * 4)) * 0.15) * (intensify - 1.5) * 8), (fake_y + (a * 2) + (sin(bobble_count * 0.1) * bobble_amp)) - 10 - (bt * 2), 2, 2, image_blend, fake_alpha * 0.75);
|
|
128
|
else
|
|
129
|
draw_sprite_part_ext(knight_sprite, knight_sprite_image, bl, a, 70, 1, fake_x - 70 - (sin((a + (global.time * 4)) * 0.15) * (intensify - 1.5) * 8), (fake_y + (a * 2) + (sin(bobble_count * 0.1) * bobble_amp)) - 10 - (bt * 2), 2, 2, image_blend, fake_alpha * 0.75);
|
|
130
|
}
|
|
131
|
}
|
|
132
|
for (a = 0; a < sprite_get_height(knight_sprite); a += 1)
|
|
133
|
draw_sprite_part_ext(knight_sprite, knight_sprite_image, bl, a, 70, 1, (fake_x - 70) + (sin((a + (global.time * 4)) * 0.2) * intensify * 0.3), (fake_y + (a * 2) + (sin(bobble_count * 0.1) * bobble_amp)) - 10 - (bt * 2), 2, 2, image_blend, fake_alpha);
|
|
134
|
}
|
|
135
|
surface_reset_target();
|
|
136
|
draw_surface_ext(my_surface, camerax(), cameray(), 1, 1, 0, c_white, darkness);
|
|
137
|
with (obj_heart)
|
|
138
|
draw_self();
|
|
139
|
if (do_fake_screen)
|
|
140
|
{
|
|
141
|
var midway = camerawidth() * 0.5;
|
|
142
|
var midwayy = cameraheight() * 0.5;
|
|
143
|
with (obj_knight_pointing_starchild)
|
|
144
|
instance_destroy();
|
|
145
|
bl = sprite_get_bbox_left(knight_sprite);
|
|
146
|
bt = sprite_get_bbox_top(knight_sprite);
|
|
147
|
if (intensify > 1.5)
|
|
148
|
{
|
|
149
|
for (a = 0; a < sprite_get_height(knight_sprite); a += 1)
|
|
150
|
{
|
|
151
|
if ((a % 2) == 0)
|
|
152
|
draw_sprite_part_ext(knight_sprite, knight_sprite_image, bl, a, 70, 1, ((camerax() + fake_x) - 70) + (sin((a + (global.time * 4)) * 0.15) * (intensify - 1.5) * 8), (cameray() + fake_y + (a * 2) + (sin(bobble_count * 0.1) * bobble_amp)) - 10 - (bt * 2), 2, 2, image_blend, fake_alpha * 0.75);
|
|
153
|
else
|
|
154
|
draw_sprite_part_ext(knight_sprite, knight_sprite_image, bl, a, 70, 1, (camerax() + fake_x) - 70 - (sin((a + (global.time * 4)) * 0.15) * (intensify - 1.5) * 8), (cameray() + fake_y + (a * 2) + (sin(bobble_count * 0.1) * bobble_amp)) - 10 - (bt * 2), 2, 2, image_blend, fake_alpha * 0.75);
|
|
155
|
}
|
|
156
|
}
|
|
157
|
for (a = 0; a < sprite_get_height(knight_sprite); a += 1)
|
|
158
|
draw_sprite_part_ext(knight_sprite, knight_sprite_image, bl, a, 70, 1, ((camerax() + fake_x) - 70) + (sin((a + (global.time * 4)) * 0.2) * intensify * 0.3), (cameray() + fake_y + (a * 2) + (sin(bobble_count * 0.1) * bobble_amp)) - 10 - (bt * 2), 2, 2, image_blend, fake_alpha);
|
|
159
|
surface_set_target(terrible_surface);
|
|
160
|
draw_clear_alpha(c_black, 0);
|
|
161
|
draw_surface_ext(my_surface, 0, 0, 1, 1, 0, c_white, darkness);
|
|
162
|
with (obj_heart)
|
|
163
|
draw_sprite_ext(sprite_index, image_index, screenx(), screeny(), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
|
|
164
|
gpu_set_blendenable(false);
|
|
165
|
draw_set_alpha(0);
|
|
166
|
ossafe_fill_rectangle_color(midway + 120, -1, camerawidth(), cameraheight(), c_black, c_black, c_black, c_black, false);
|
|
167
|
draw_triangle_color(midway - 120, -1, midway + 120, cameraheight(), midway + 120, -1, c_black, 0, 0, false);
|
|
168
|
draw_set_alpha(1);
|
|
169
|
gpu_set_blendenable(true);
|
|
170
|
fakey_screen = sprite_create_from_surface(terrible_surface, 0, 0, camerawidth(), cameraheight(), false, false, camerawidth() * 0.25, cameraheight() * 0.5);
|
|
171
|
draw_clear_alpha(c_black, 0);
|
|
172
|
draw_surface_ext(my_surface, 0, 0, 1, 1, 0, c_white, darkness);
|
|
173
|
with (obj_heart)
|
|
174
|
draw_sprite_ext(sprite_index, image_index, screenx(), screeny(), image_xscale, image_yscale, image_angle, image_blend, image_alpha);
|
|
175
|
gpu_set_blendenable(false);
|
|
176
|
draw_set_alpha(0);
|
|
177
|
ossafe_fill_rectangle_color(midway - 119, 0, -1, cameraheight(), c_black, c_black, c_black, c_black, false);
|
|
178
|
draw_triangle_color(midway - 120, 0, midway - 120, cameraheight(), midway + 120, cameraheight(), c_black, 0, 0, false);
|
|
179
|
draw_set_alpha(1);
|
|
180
|
gpu_set_blendenable(true);
|
|
181
|
surface_reset_target();
|
|
182
|
fakey_screen_2 = sprite_create_from_surface(terrible_surface, 0, 0, camerawidth(), cameraheight(), false, false, camerawidth() * 0.75, cameraheight() * 0.5);
|
|
183
|
stop = true;
|
|
184
|
with (obj_heart)
|
|
185
|
instance_destroy();
|
|
186
|
with (scr_markerscr_marker
function scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (camerax() + (camerawidth() * 0.25), cameray() + (cameraheight() * 0.5), fakey_screen))
|
|
187
|
{
|
|
188
|
direction = 180;
|
|
189
|
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;
} ("speed", 15, 0.5, 12, 1, "out");
|
|
190
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (scr_var, 12, "gravity", 1);
|
|
191
|
gravity_direction = 180;
|
|
192
|
}
|
|
193
|
with (scr_markerscr_marker
function scr_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
}
return thismarker;
} (camerax() + (camerawidth() * 0.75), cameray() + (cameraheight() * 0.5), fakey_screen_2))
|
|
194
|
{
|
|
195
|
direction = 0;
|
|
196
|
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;
} ("speed", 14, 0.5, 12, 1, "out");
|
|
197
|
scr_script_delayedscr_script_delayed
function scr_script_delayed()
{
var __scriptdelay = instance_create(0, 0, obj_script_delayed);
__scriptdelay.script = argument[0];
__scriptdelay.alarm[0] = argument[1];
__scriptdelay.target = id;
for (var __i = 0; __i < (argument_count - 2); __i++)
__scriptdelay.script_arg[__i] = argument[__i + 2];
__scriptdelay.arg_count = argument_count - 2;
return __scriptdelay;
} (scr_var, 12, "gravity", 1);
|
|
198
|
gravity_direction = 0;
|
|
199
|
}
|
|
200
|
}
|