sEDCam
0
0
-500
-1
<undefined>
<undefined>
1
603
7
0
0
-1
2
self
0
0
1
lockx = 0;
locky = 0;
snapx = 1;
snapy = 1;
targetx = oCharacter.x;
targety = oCharacter.y - 12;
ratiox = 1;
ratioy = 1;
focus = 0;
focustime = 0;
smoothin = 30;
smoothout = 30;
roomstart = 0;
limit = floor(oControl.widescreen_space/2)+160;
1
603
7
0
0
-1
2
self
0
0
1
locky = 0;
focus = 0;
ratioy = smoothout;
1
603
7
0
0
-1
2
self
0
0
1
lockx = 0;
focus = 0;
ratiox = smoothout;
1
603
7
0
0
-1
2
self
0
0
1
focus = 0;
lockx = 0;
locky = 0;
ratiox = smoothout;
ratioy = smoothout;
1
603
7
0
0
-1
2
self
0
0
1
/// Camera restrictions
if (oControl.widescreen) {
if ((oControl.widescreen_space + 320) <= room_width) { // widescreen rooms prevent black bars
x = clamp(x, limit, room_width-limit);
}
else { // single-wide rooms
x = floor(room_width/2);
}
}
1
603
7
0
0
-1
2
self
0
0
1
if (room != rm_transition && roomstart == 0) {
if (focus == 1) {
if (focustime < smoothin) {
ratiox = smoothin + 3 - focustime;
ratioy = smoothin + 3 - focustime;
}
}
if (focus == 0) {
if (ratiox > 4) ratiox -= 1;
if (ratioy > 4) ratioy -= 1;
if (abs(oCharacter.xVel) > 4) ratiox = 4;
if (abs(oCharacter.yVel) > 5) ratioy = 4;
}
if (lockx == 0) targetx = oCharacter.x;
if (locky == 0) targety = oCharacter.y - 16;
if (x >= targetx - 2 && x <= targetx + 2 && lockx == 0) snapx = 1;
if (x != targetx && snapx == 0) x += (targetx - x) / ratiox;
if (snapx == 1) x = targetx;
if (y >= targety - 2 && y <= targety + 2 && locky == 0) snapy = 1;
if (y != targety && snapy == 0) y += (targety - y) / ratioy;
if (snapy == 1) y = targety;
}
if (roomstart == 1) roomstart = 0;
1
603
7
0
0
-1
2
self
0
0
1
// Widescreen limit determination
switch (room) {
case rm_a3a20: // Zig-zag room
case rm_a7c01: // Egg room
case rm_a6b13: // Nest vertical shaft
case rm_a2a07: limit = 160; break; // Varia
case rm_a3a01: { // Torizo
if (global.event[152] > 0) {
limit = floor(oControl.widescreen_space/2)+160; break; // after torizo
} else {
targetwidth = 320; // before torizo
}
limit = 160;
break;
}
default: limit = floor(oControl.widescreen_space/2)+160; break;
}
// regular code stuffs
if (global.transitiontype == 1) {
x = global.camstartx;
y = global.camstarty;
lockx = 0;
locky = 0;
focus = 0;
ratiox = 4;
ratioy = 4;
}
if ((global.transitiontype == 0) && (instance_exists(oWarpPipeTrigger))) { // warp pipe fix
x = global.camstartx;
y = global.camstarty;
}
roomstart = 1;
1
603
7
0
0
-1
2
self
0
0
1
if (oControl.debug > 0) {
draw_set_alpha(1);
draw_set_font(fontMenuSmall);
draw_set_color(c_white);
draw_point(x, y);
draw_text_shadow(x + 4, y - 48, "Focus: " + string(focus));
draw_text_shadow(x + 4, y - 32, "Target X: " + string(targetx));
draw_text_shadow(x + 4, y - 24, "Target Y: " + string(targety));
draw_text_shadow(x + 4, y - 16, "Snap X: " + string(snapx));
draw_text_shadow(x + 4, y - 8, "Snap Y: " + string(snapy));
draw_text_shadow(x + 4, y, "Lock X: " + string(lockx));
draw_text_shadow(x + 4, y + 8, "Lock Y: " + string(locky));
draw_text_shadow(x + 4, y + 16, "X: " + string(x));
draw_text_shadow(x + 4, y + 24, "Y: " + string(y));
draw_text_shadow(x + 4, y + 32, "Ratio X: " + string(ratiox));
draw_text_shadow(x + 4, y + 48, "Ratio Y: " + string(ratioy));
}
0
0
0
0.5
0.100000001490116
0
0.100000001490116
0.100000001490116
0.200000002980232
-1
-1