sEDBg2
0
-1
-500
0
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
FREQ = 8;
AMP = 2;
SPEED = 0.05;
THETA = 0;
y_bottom = y - view_yview[0];
if (y_bottom < 0) y_bottom = 0;
if (y_bottom > view_hview[0]) y_bottom = view_hview[0];
mysurf = surface_create(320 + (oControl.widescreen*oControl.widescreen_space), 240);
1
603
7
0
0
-1
2
self
0
0
1
if (instance_exists(oWater)) {
y = global.waterlevel + oWater.yoffset;
} else if (instance_exists(oLavaSurface)) {
y = global.waterlevel;
}
y_top = y - view_yview[0];
y_top = clamp(y_top, 0, view_hview[0]);
y_bottom = view_hview[0];
THETA += SPEED;
if ((view_yview[0] + view_hview[0]) >= y) {
if (!surface_exists(mysurf)) mysurf = surface_create(320 + (oControl.widescreen*oControl.widescreen_space), 240);
if (surface_exists(oControl.widescreen_surface)) {
surface_copy(mysurf, 0, 0, oControl.widescreen_surface);
} else if (surface_exists(application_surface)) {
surface_copy(mysurf, 0, 0, application_surface);
}
}
1
603
7
0
0
-1
2
self
0
0
1
if(surface_exists(mysurf)) {
global.wave_height = max(round(lerp(global.wave_height, floor((60-(fps-1))^1.5), 0.1)) - 1, 1); // Lower is smoother.
var height_top = min(y_bottom-y_top, global.wave_height);
if ((view_yview[0] + view_hview[0]) >= y) {
for (yy = 0; yy < 240; yy += global.wave_height) {
xx = AMP * sin(THETA + FREQ * yy / y_bottom);
if (yy >= y_top) {
draw_surface_part_ext(mysurf, 0, yy, view_wview[0] + oControl.widescreen_space, global.wave_height, view_xview[0] + xx - (oControl.widescreen_space/2), view_yview[0] + yy, 1, 1, -1, 0.2);
if((yy-y_top) < global.wave_height) draw_surface_part_ext(mysurf, 0, y_top, view_wview[0] + oControl.widescreen_space, yy-y_top, view_xview[0] + xx - (oControl.widescreen_space/2), view_yview[0] + y_top, 1, 1, -1, 0.2);
}
}
if(height_top < global.wave_height) draw_surface_part_ext(mysurf, 0, y_top, view_wview[0] + oControl.widescreen_space, height_top, view_xview[0] + xx - (oControl.widescreen_space/2), y, 1, 1, -1, 0.2);
}
}
/*if ((view_yview[0] + view_hview[0]) >= y) {
for (yy = 0; yy < 240; yy += 1) {
xx = AMP * sin(THETA + FREQ * yy / y_bottom);
if (yy >= y_top) {
if (surface_exists(mysurf)) draw_surface_part_ext(mysurf, 0, yy, view_wview[0], 1, view_xview[0] + xx, view_yview[0] + yy, 1, 1, -1, 0.2);
}
}
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1