|
1
|
var movetime = 20;
|
|
2
|
var waittime = 20;
|
|
3
|
if (dosep == 1 || keyboard_check_pressed(ord("P")))
|
|
4
|
{
|
|
5
|
amt = 0;
|
|
6
|
dosep = 2;
|
|
7
|
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;
} ("amt", 0, 1, movetime, 2, "in");
|
|
8
|
scr_delay_var("dosep", 3, movetime + waittime);
|
|
9
|
}
|
|
10
|
if (dosep == 3)
|
|
11
|
{
|
|
12
|
dosep = 4;
|
|
13
|
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;
} ("amt", amt, 0, waittime, 2, "out");
|
|
14
|
scr_delay_var("dosep", 0, waittime + 1);
|
|
15
|
}
|
|
16
|
var sep = 20 * amt;
|
|
17
|
var dir = 0;
|
|
18
|
if (room == room_dw_churchb_moneyfountain)
|
|
19
|
dir = 1;
|
|
20
|
if (dir == 0)
|
|
21
|
siner++;
|
|
22
|
if (dir == 1)
|
|
23
|
siner--;
|
|
24
|
if (siner <= 0)
|
|
25
|
siner = 9999999;
|
|
26
|
var alf = 1 - (amt / 2);
|
|
27
|
if (dir == 1 && global.flag[898] == 0)
|
|
28
|
siner = 0;
|
|
29
|
anim_index = siner * 0.26666666666666666;
|
|
30
|
draw_sprite_ext(spr_dw_church_waterfall_bottom, anim_index, round(x - sep), y, 2, 2, 0, c_white, alf);
|
|
31
|
draw_sprite_ext(spr_dw_church_waterfall_bottom, anim_index, round(x + 40 + sep), y, 2, 2, 0, c_white, alf);
|
|
32
|
for (var v = 1; v < 7; v++)
|
|
33
|
{
|
|
34
|
draw_sprite_ext(spr_dw_church_waterfall_tile, anim_index, round((x + 0) - sep), y - (40 * v), 2, 2, 0, c_white, 1 - (amt / 2));
|
|
35
|
draw_sprite_ext(spr_dw_church_waterfall_tile, anim_index, round(x + 40 + sep), y - (40 * v), 2, 2, 0, c_white, 1 - (amt / 2));
|
|
36
|
}
|
|
37
|
if (!surface_exists(clip_surface))
|
|
38
|
clip_surface = surface_create(40, 160);
|
|
39
|
if (!surface_exists(clip_surface2))
|
|
40
|
clip_surface2 = surface_create(40, 160);
|
|
41
|
var clip_x = round(x - sep);
|
|
42
|
var clip_y = y - 160;
|
|
43
|
surface_set_target(clip_surface);
|
|
44
|
draw_clear_alpha(c_black, 0);
|
|
45
|
gpu_set_fog(1, #0071D5, 0, 0);
|
|
46
|
with (obj_mainchara)
|
|
47
|
draw_sprite_ext(sprite_index, image_index, x - clip_x, y - clip_y, image_xscale, image_yscale, image_angle, c_black, alf);
|
|
48
|
with (obj_caterpillarchara)
|
|
49
|
draw_sprite_ext(sprite_index, image_index, x - clip_x, y - clip_y, image_xscale, image_yscale, image_angle, c_black, alf);
|
|
50
|
gpu_set_fog(0, c_white, 0, 0);
|
|
51
|
surface_reset_target();
|
|
52
|
clip_x = round(x - sep);
|
|
53
|
clip_y = y - 160;
|
|
54
|
surface_set_target(clip_surface);
|
|
55
|
draw_clear_alpha(c_black, 0);
|
|
56
|
gpu_set_fog(1, #0071D5, 0, 0);
|
|
57
|
with (obj_mainchara)
|
|
58
|
draw_sprite_ext(sprite_index, image_index, x - clip_x, y - clip_y, image_xscale, image_yscale, image_angle, c_black, alf);
|
|
59
|
with (obj_caterpillarchara)
|
|
60
|
draw_sprite_ext(sprite_index, image_index, x - clip_x, y - clip_y, image_xscale, image_yscale, image_angle, c_black, alf);
|
|
61
|
gpu_set_fog(0, c_white, 0, 0);
|
|
62
|
surface_reset_target();
|
|
63
|
draw_surface(clip_surface, clip_x, clip_y);
|
|
64
|
clip_x = round(x + 40 + sep);
|
|
65
|
surface_set_target(clip_surface2);
|
|
66
|
draw_clear_alpha(c_black, 0);
|
|
67
|
gpu_set_fog(1, #0071D5, 0, 0);
|
|
68
|
with (obj_mainchara)
|
|
69
|
draw_sprite_ext(sprite_index, image_index, x - clip_x, y - clip_y, image_xscale, image_yscale, image_angle, c_black, alf);
|
|
70
|
with (obj_caterpillarchara)
|
|
71
|
draw_sprite_ext(sprite_index, image_index, x - clip_x, y - clip_y, image_xscale, image_yscale, image_angle, c_black, alf);
|
|
72
|
gpu_set_fog(0, c_white, 0, 0);
|
|
73
|
surface_reset_target();
|
|
74
|
draw_surface(clip_surface2, clip_x, clip_y);
|