<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>sEDCam</spriteName>
  <solid>0</solid>
  <visible>0</visible>
  <depth>-500</depth>
  <persistent>-1</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>&lt;undefined&gt;</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>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;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="3">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>locky = 0;
focus = 0;
ratioy = smoothout;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="2">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>lockx = 0;
focus = 0;
ratiox = smoothout;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>focus = 0;
lockx = 0;
locky = 0;
ratiox = smoothout;
ratioy = smoothout;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="2">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>/// Camera restrictions
if (oControl.widescreen) {
    if ((oControl.widescreen_space + 320) &lt;= room_width) { // widescreen rooms prevent black bars
        x = clamp(x, limit, room_width-limit);
    }
    else { // single-wide rooms
        x = floor(room_width/2);
    }
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (room != rm_transition &amp;&amp; roomstart == 0) {
    if (focus == 1) {
        if (focustime &lt; smoothin) {
            ratiox = smoothin + 3 - focustime;
            ratioy = smoothin + 3 - focustime;
        }
    }
    if (focus == 0) {
        if (ratiox &gt; 4) ratiox -= 1;
        if (ratioy &gt; 4) ratioy -= 1;
        if (abs(oCharacter.xVel) &gt; 4) ratiox = 4;
        if (abs(oCharacter.yVel) &gt; 5) ratioy = 4;
    }
    if (lockx == 0) targetx = oCharacter.x;
    if (locky == 0) targety = oCharacter.y - 16;
    if (x &gt;= targetx - 2 &amp;&amp; x &lt;= targetx + 2 &amp;&amp; lockx == 0) snapx = 1;
    if (x != targetx &amp;&amp; snapx == 0) x += (targetx - x) / ratiox;
    if (snapx == 1) x = targetx;
    if (y &gt;= targety - 2 &amp;&amp; y &lt;= targety + 2 &amp;&amp; locky == 0) snapy = 1;
    if (y != targety &amp;&amp; snapy == 0) y += (targety - y) / ratioy;
    if (snapy == 1) y = targety;
}
if (roomstart == 1) roomstart = 0;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="4">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>// 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] &gt; 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) &amp;&amp; (instance_exists(oWarpPipeTrigger))) { // warp pipe fix
    x = global.camstartx;
    y = global.camstarty;
}
roomstart = 1;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if (oControl.debug &gt; 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));
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>-1</PhysicsObjectKinematic>
  <PhysicsShapePoints/>
</object>
