Frame 1
function Vector2(x, y) {
this.x = x;
this.y = y;
}
Vector2.prototype.ToString = function () {
return(((("(" + this.x) + ",") + this.y) + ")");
};
Vector2.prototype.clone = function () {
var _local1 = new Vector2(this.x, this.y);
return(_local1);
};
Vector2.prototype.plus = function (v2) {
var _local1 = new Vector2(this.x + v2.x, this.y + v2.y);
return(_local1);
};
Vector2.prototype.minus = function (v2) {
var _local1 = new Vector2(this.x - v2.x, this.y - v2.y);
return(_local1);
};
Vector2.prototype.normR = function () {
var _local1 = new Vector2(this.y * -1, this.x);
return(_local1);
};
Vector2.prototype.dir = function () {
var _local1 = this.clone();
_local1.normalize();
return(_local1);
};
Vector2.prototype.proj = function (v2) {
var _local3 = v2;
var _local2 = _local3.dot(_local3);
if (_local2 == 0) {
var _local1 = this.clone();
} else {
var _local1 = _local3.clone();
_local1.mult(this.dot(_local3) / _local2);
}
return(_local1);
};
Vector2.prototype.projLen = function (v2) {
var _local2 = v2;
var _local1 = _local2.dot(_local2);
if (_local1 == 0) {
return(0);
}
return(Math.abs(this.dot(_local2) / _local1));
};
Vector2.prototype.dot = function (v2) {
return((this.x * v2.x) + (this.y * v2.y));
};
Vector2.prototype.cross = function (v2) {
return((this.x * v2.y) - (this.y * v2.x));
};
Vector2.prototype.len = function () {
var _local1 = this;
return(Math.sqrt((_local1.x * _local1.x) + (_local1.y * _local1.y)));
};
Vector2.prototype.copy = function (v2) {
this.x = v2.x;
this.y = v2.y;
};
Vector2.prototype.mult = function (s) {
this.x = this.x * s;
this.y = this.y * s;
};
Vector2.prototype.normalize = function () {
var _local2 = this;
var _local1 = _local2.len();
if (_local1 != 0) {
_local2.x = _local2.x / _local1;
_local2.y = _local2.y / _local1;
}
};
Vector2.prototype.pluseq = function (v2) {
this.x = this.x + v2.x;
this.y = this.y + v2.y;
};
Vector2.prototype.minuseq = function (v2) {
this.x = this.x - v2.x;
this.y = this.y - v2.y;
};
function InputManager() {
var _local1 = this;
_local1.vrend = new VectorRenderer();
_local1.mPos = new Vector2(_local1.vrend.buffer._xmouse, _local1.vrend.buffer._ymouse);
_local1.mOldpos = new Vector2(_local1.vrend.buffer._xmouse, _local1.vrend.buffer._ymouse);
_local1.mDelta = new Vector2(0, 0);
_local1.mDownPos = new Vector2(0, 0);
_local1.mUpPos = new Vector2(0, 0);
_local1.onMouseDown = _local1.CaptureMouseDown;
_local1.onMouseUp = _local1.CaptureMouseUp;
Mouse.addListener(_local1);
_local1.mState = false;
_local1.mOldState = false;
_local1.mPressed = false;
_local1.mReleased = false;
_local1.kCode = new Array();
_local1.kState = new Array();
_local1.kOldState = new Array();
_local1.tKey = new Array();
_local1.tState = new Array();
}
InputManager.prototype.RegisterKey = function (knum) {
var _local2 = this;
var _local1 = _local2.kCode.length;
_local2.kCode.push(knum);
_local2.kState[_local1] = false;
_local2.kOldState[_local1] = false;
return(_local1);
};
InputManager.prototype.RegisterToggle = function (knum) {
var _local1 = this;
var _local2 = _local1.tKey.length;
_local1.tKey.push(_local1.RegisterKey(knum));
_local1.tState[_local2] = false;
return(_local2);
};
InputManager.prototype.Update = function () {
var _local1 = this;
_local1.mOldpos.x = _local1.mPos.x;
_local1.mOldpos.y = _local1.mPos.y;
_local1.mPos.x = _local1.vrend.buffer._xmouse;
_local1.mPos.y = _local1.vrend.buffer._ymouse;
_local1.mDelta.x = _local1.mPos.x - _local1.mOldpos.x;
_local1.mDelta.y = _local1.mPos.y - _local1.mOldpos.y;
if (_local1.mState && (!_local1.mOldState)) {
_local1.mPressed = true;
_local1.mOldState = true;
_local1.mDownPos.x = _local1.mPos.x;
_local1.mDownPos.y = _local1.mPos.y;
} else {
_local1.mPressed = false;
}
if ((!_local1.mState) && (_local1.mOldState)) {
_local1.mReleased = true;
_local1.mOldState = false;
_local1.mUpPos.x = _local1.mPos.x;
_local1.mUpPos.y = _local1.mPos.y;
} else {
_local1.mReleased = false;
}
if (_local1.mState) {
_local1.mUpPos.x = _local1.mPos.x;
_local1.mUpPos.y = _local1.mPos.y;
}
var _local2 = 0;
while (_local2 < _local1.kCode.length) {
_local1.kOldState[_local2] = Key.isDown(_local1.kCode[_local2]);
_local2++;
}
var _local3 = _local1.kOldState;
_local1.kOldState = _local1.kState;
_local1.kState = _local3;
_local2 = 0;
while (_local2 < _local1.tKey.length) {
if (_local1.Pressed(_local1.tKey[_local2])) {
_local1.tState[_local2] = !_local1.tState[_local2];
}
_local2++;
}
};
InputManager.prototype.CaptureMouseDown = function () {
this.mOldState = false;
this.mState = true;
};
InputManager.prototype.CaptureMouseUp = function () {
this.mOldState = true;
this.mState = false;
};
InputManager.prototype.getMousePos = function () {
return(this.mPos.clone());
};
InputManager.prototype.getMouseDelta = function () {
return(this.mDelta.clone());
};
InputManager.prototype.getMouseDragDelta = function () {
return(this.mUpPos.minus(this.mDownPos));
};
InputManager.prototype.getMouseDownPos = function () {
return(this.mDownPos.clone());
};
InputManager.prototype.getMouseUpPos = function () {
return(this.mUpPos.clone());
};
InputManager.prototype.MousePressed = function () {
return(this.mPressed);
};
InputManager.prototype.MouseReleased = function () {
return(this.mReleased);
};
InputManager.prototype.MouseDown = function () {
return(this.mState);
};
InputManager.prototype.Down = function (knum) {
return(this.kState[knum]);
};
InputManager.prototype.Pressed = function (knum) {
return(this.kState[knum] && (!this.kOldState[knum]));
};
InputManager.prototype.Released = function (knum) {
return((!this.kState[knum]) && (this.kOldState[knum]));
};
InputManager.prototype.Toggled = function (tnum) {
return(this.tState[tnum]);
};
function VectorRenderer() {
var _local1 = this;
_local1.buffer = gfx.CreateSpriteBuffer(gfx.GetNextDepth_Front());
_local1.buffer._x = 0;
_local1.buffer._y = 0;
_local1.thickness = 0;
_local1.rgb = 0;
_local1.alpha = 100;
}
VectorRenderer.prototype.Clear = function () {
var _local1 = this;
_local1.buffer.clear();
_local1.buffer.lineStyle(_local1.thickness, _local1.rgb, _local1.alpha);
};
VectorRenderer.prototype.SetStyle = function (thick, rgb, alpha) {
this.buffer.lineStyle(thick, rgb, alpha);
};
VectorRenderer.prototype.StartFill = function (x, y, rgb, alpha) {
this.buffer.moveTo(x, y);
this.buffer.beginFill(rgb, alpha);
};
VectorRenderer.prototype.StopFill = function () {
this.buffer.endFill();
};
VectorRenderer.prototype.DrawLine = function (va, vb) {
this.buffer.moveTo(va.x, va.y);
this.buffer.lineTo(vb.x, vb.y);
};
VectorRenderer.prototype.DrawLine_S = function (x0, y0, x1, y1) {
this.buffer.moveTo(x0, y0);
this.buffer.lineTo(x1, y1);
};
VectorRenderer.prototype.DrawLinestrip = function (vList) {
var _local2 = vList;
var _local3 = this;
_local3.buffer.moveTo(_local2[0].x, _local2[0].y);
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.buffer.lineTo(_local2[_local1].x, _local2[_local1].y);
_local1++;
}
};
VectorRenderer.prototype.DrawTri = function (va, vb, vc) {
var _local1 = va;
var _local2 = this;
_local2.buffer.moveTo(_local1.x, _local1.y);
_local2.buffer.lineTo(vb.x, vb.y);
_local2.buffer.lineTo(vc.x, vc.y);
_local2.buffer.lineTo(_local1.x, _local1.y);
};
VectorRenderer.prototype.DrawTri_S = function (vax, vay, vbx, vby, vcx, vcy) {
var _local1 = this;
_local1.buffer.moveTo(vax, vay);
_local1.buffer.lineTo(vbx, vby);
_local1.buffer.lineTo(vcx, vcy);
_local1.buffer.lineTo(vax, vay);
};
VectorRenderer.prototype.DrawQuad = function (a, b, c, d) {
var _local1 = this;
var _local2 = a;
_local1.buffer.moveTo(_local2.x, _local2.y);
_local1.buffer.lineTo(b.x, b.y);
_local1.buffer.lineTo(c.x, c.y);
_local1.buffer.lineTo(d.x, d.y);
_local1.buffer.lineTo(_local2.x, _local2.y);
};
VectorRenderer.prototype.DrawQuad_S = function (ax, ay, bx, by, cx, cy, dx, dy) {
var _local1 = this;
_local1.buffer.moveTo(ax, ay);
_local1.buffer.lineTo(bx, by);
_local1.buffer.lineTo(cx, cy);
_local1.buffer.lineTo(dx, dy);
_local1.buffer.lineTo(ax, ay);
};
VectorRenderer.prototype.DrawPlus = function (v) {
var _local1 = v;
var _local2 = this;
_local2.buffer.moveTo(_local1.x - 1, _local1.y);
_local2.buffer.lineTo(_local1.x + 1, _local1.y);
_local2.buffer.moveTo(_local1.x, _local1.y - 1);
_local2.buffer.lineTo(_local1.x, _local1.y + 1);
};
VectorRenderer.prototype.DrawPlus_S = function (vx, vy) {
var _local1 = vy;
var _local2 = vx;
var _local3 = this;
_local3.buffer.moveTo(_local2 - 1, _local1);
_local3.buffer.lineTo(_local2 + 1, _local1);
_local3.buffer.moveTo(_local2, _local1 - 1);
_local3.buffer.lineTo(_local2, _local1 + 1);
};
VectorRenderer.prototype.DrawPlusR = function (v, r) {
var _local1 = v;
var _local2 = r;
var _local3 = this;
_local3.buffer.moveTo(_local1.x - _local2, _local1.y);
_local3.buffer.lineTo(_local1.x + _local2, _local1.y);
_local3.buffer.moveTo(_local1.x, _local1.y - _local2);
_local3.buffer.lineTo(_local1.x, _local1.y + _local2);
};
VectorRenderer.prototype.DrawCross = function (v) {
var _local1 = v;
var _local2 = this;
_local2.buffer.moveTo(_local1.x - 1, _local1.y - 1);
_local2.buffer.lineTo(_local1.x + 1, _local1.y + 1);
_local2.buffer.moveTo(_local1.x + 1, _local1.y - 1);
_local2.buffer.lineTo(_local1.x - 1, _local1.y + 1);
};
VectorRenderer.prototype.DrawCross_S = function (vx, vy) {
var _local1 = vy;
var _local2 = vx;
var _local3 = this;
_local3.buffer.moveTo(_local2 - 1, _local1 - 1);
_local3.buffer.lineTo(_local2 + 1, _local1 + 1);
_local3.buffer.moveTo(_local2 + 1, _local1 - 1);
_local3.buffer.lineTo(_local2 - 1, _local1 + 1);
};
VectorRenderer.prototype.DrawCrossR = function (v, r) {
var _local1 = v;
var _local2 = r;
var _local3 = this;
_local3.buffer.moveTo(_local1.x - _local2, _local1.y - _local2);
_local3.buffer.lineTo(_local1.x + _local2, _local1.y + _local2);
_local3.buffer.moveTo(_local1.x + _local2, _local1.y - _local2);
_local3.buffer.lineTo(_local1.x - _local2, _local1.y + _local2);
};
VectorRenderer.prototype.DrawCircle = function (v, r) {
var _local1 = r;
var _local3 = v.x;
var _local2 = v.y;
this.buffer.moveTo(_local3 + _local1, _local2);
this.buffer.curveTo(_local1 + _local3, (0.4142 * _local1) + _local2, (0.7071 * _local1) + _local3, (0.7071 * _local1) + _local2);
this.buffer.curveTo((0.4142 * _local1) + _local3, _local1 + _local2, _local3, _local1 + _local2);
this.buffer.curveTo((-0.4142 * _local1) + _local3, _local1 + _local2, (-0.7071 * _local1) + _local3, (0.7071 * _local1) + _local2);
this.buffer.curveTo((-_local1) + _local3, (0.4142 * _local1) + _local2, (-_local1) + _local3, _local2);
this.buffer.curveTo((-_local1) + _local3, (-0.4142 * _local1) + _local2, (-0.7071 * _local1) + _local3, (-0.7071 * _local1) + _local2);
this.buffer.curveTo((-0.4142 * _local1) + _local3, (-_local1) + _local2, _local3, (-_local1) + _local2);
this.buffer.curveTo((0.4142 * _local1) + _local3, (-_local1) + _local2, (0.7071 * _local1) + _local3, (-0.7071 * _local1) + _local2);
this.buffer.curveTo(_local1 + _local3, (-0.4142 * _local1) + _local2, _local1 + _local3, _local2);
};
VectorRenderer.prototype.DrawCircle_S = function (x, y, r) {
var _local1 = r;
var _local2 = y;
var _local3 = x;
this.buffer.moveTo(_local3 + _local1, _local2);
this.buffer.curveTo(_local1 + _local3, (0.4142 * _local1) + _local2, (0.7071 * _local1) + _local3, (0.7071 * _local1) + _local2);
this.buffer.curveTo((0.4142 * _local1) + _local3, _local1 + _local2, _local3, _local1 + _local2);
this.buffer.curveTo((-0.4142 * _local1) + _local3, _local1 + _local2, (-0.7071 * _local1) + _local3, (0.7071 * _local1) + _local2);
this.buffer.curveTo((-_local1) + _local3, (0.4142 * _local1) + _local2, (-_local1) + _local3, _local2);
this.buffer.curveTo((-_local1) + _local3, (-0.4142 * _local1) + _local2, (-0.7071 * _local1) + _local3, (-0.7071 * _local1) + _local2);
this.buffer.curveTo((-0.4142 * _local1) + _local3, (-_local1) + _local2, _local3, (-_local1) + _local2);
this.buffer.curveTo((0.4142 * _local1) + _local3, (-_local1) + _local2, (0.7071 * _local1) + _local3, (-0.7071 * _local1) + _local2);
this.buffer.curveTo(_local1 + _local3, (-0.4142 * _local1) + _local2, _local1 + _local3, _local2);
};
VectorRenderer.prototype.DrawArc = function (p0, p1, c) {
this.buffer.moveTo(p0.x, p0.y);
this.buffer.curveTo(c.x, c.y, p1.x, p1.y);
};
VectorRenderer.prototype.DrawArc_S = function (x0, y0, x1, y1, xc, yc) {
this.buffer.moveTo(x0, y0);
this.buffer.curveTo(xc, yc, x1, y1);
};
VectorRenderer.prototype.DrawAABB = function (p, xw, yw) {
var _local1 = p;
var _local2 = xw;
var _local3 = yw;
var v0 = new Vector2(_local1.x + _local2, _local1.y + _local3);
var v1 = new Vector2(_local1.x - _local2, _local1.y + _local3);
var v2 = new Vector2(_local1.x - _local2, _local1.y - _local3);
var v3 = new Vector2(_local1.x + _local2, _local1.y - _local3);
this.DrawQuad(v0, v1, v2, v3);
};
VectorRenderer.prototype.DrawAABB_S = function (minx, maxx, miny, maxy) {
var v0 = new Vector2(maxx, maxy);
var _local3 = new Vector2(minx, maxy);
var _local2 = new Vector2(minx, miny);
var _local1 = new Vector2(maxx, miny);
this.DrawQuad(v0, _local3, _local2, _local1);
};
VectorRenderer.prototype.DrawConcaveCCWArc_S = function (cx, cy, px, py) {
var _local1 = cy;
var _local2 = cx;
var p0x = px;
var p0y = py;
var vx = (p0x - _local2);
var vy = (p0y - _local1);
var r = Math.sqrt((vx * vx) + (vy * vy));
var nx = vy;
var ny = (-vx);
var p1x = ((p0x + nx) - _local2);
var _local3 = (p0y + ny) - _local1;
var len = Math.sqrt((p1x * p1x) + (_local3 * _local3));
p1x = p1x / len;
_local3 = _local3 / len;
p1x = p1x * r;
_local3 = _local3 * r;
p1x = p1x + _local2;
_local3 = _local3 + _local1;
var c0x = (((p0x + p1x) * 0.5) - _local2);
var c0y = (((p0y + _local3) * 0.5) - _local1);
var clen = Math.sqrt((c0x * c0x) + (c0y * c0y));
var dlen = (r - clen);
c0x = c0x / clen;
c0y = c0y / clen;
c0x = c0x * (r + dlen);
c0y = c0y * (r + dlen);
c0x = c0x + _local2;
c0y = c0y + _local1;
this.buffer.moveTo(p0x, p0y);
this.buffer.curveTo(c0x, c0y, p1x, _local3);
var p0x = p1x;
var p0y = _local3;
var vx = (p0x - _local2);
var vy = (p0y - _local1);
var r = Math.sqrt((vx * vx) + (vy * vy));
var nx = vy;
var ny = (-vx);
var p1x = ((p0x + nx) - _local2);
_local3 = (p0y + ny) - _local1;
var len = Math.sqrt((p1x * p1x) + (_local3 * _local3));
p1x = p1x / len;
_local3 = _local3 / len;
p1x = p1x * r;
_local3 = _local3 * r;
p1x = p1x + _local2;
_local3 = _local3 + _local1;
var c0x = (((p0x + p1x) * 0.5) - _local2);
var c0y = (((p0y + _local3) * 0.5) - _local1);
var clen = Math.sqrt((c0x * c0x) + (c0y * c0y));
var dlen = (r - clen);
c0x = c0x / clen;
c0y = c0y / clen;
c0x = c0x * (r + dlen);
c0y = c0y * (r + dlen);
c0x = c0x + _local2;
c0y = c0y + _local1;
this.buffer.curveTo(c0x, c0y, p1x, _local3);
};
VectorRenderer.prototype.DrawLinestrip_nrope = function (vList) {
var _local2 = vList;
var _local3 = this;
_local3.buffer.moveTo(_local2[0].x, _local2[0].y);
var _local1 = 1;
while (_local1 < _local2.length) {
_local3.buffer.lineTo(_local2[_local1].x, _local2[_local1].y);
_local1++;
}
};
function TileMap(rows, cols, xw, yw) {
var _local1 = this;
_local1.xw = xw;
_local1.yw = yw;
_local1.tw = 2 * _local1.xw;
_local1.th = 2 * _local1.yw;
_local1.rows = rows;
_local1.cols = cols;
_local1.fullrows = _local1.rows + 2;
_local1.fullcols = _local1.cols + 2;
_local1.minX = _local1.tw;
_local1.minY = _local1.th;
_local1.maxX = _local1.tw + (rows * _local1.tw);
_local1.maxY = _local1.th + (cols * _local1.th);
_local1.grid = new Object();
_local1.BUILD_STEPS_REMAINING = 9;
_local1.rend = new VectorRenderer();
_local1.rend.Clear();
}
TileMap.prototype.Building = function () {
var _local1 = this;
var x = _local1.xw;
var y = _local1.yw;
var fullrows = _local1.fullrows;
var _local2 = _local1.fullcols;
var rows = _local1.rows;
var cols = _local1.cols;
if (_local1.BUILD_STEPS_REMAINING == 9) {
var i = 0;
while (i < fullrows) {
_local1.grid[i] = new Object();
var _local3 = 0;
while (_local3 < _local2) {
_local1.grid[i][_local3] = new TileMapCell(i, _local3, x, y, _local1.xw, _local1.yw);
y = y + _local1.th;
_local3++;
}
x = x + _local1.tw;
y = _local1.yw;
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 8) {
var i = 0;
while (i < (fullrows - 1)) {
var _local3 = 0;
while (_local3 < _local2) {
_local1.grid[i][_local3].LinkR(_local1.grid[i + 1][_local3]);
_local3++;
}
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 7) {
var i = 1;
while (i < fullrows) {
var _local3 = 0;
while (_local3 < _local2) {
_local1.grid[i][_local3].LinkL(_local1.grid[i - 1][_local3]);
_local3++;
}
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 6) {
var i = 0;
while (i < fullrows) {
var _local3 = 0;
while (_local3 < (_local2 - 1)) {
_local1.grid[i][_local3].LinkD(_local1.grid[i][_local3 + 1]);
_local3++;
}
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 5) {
var i = 0;
while (i < fullrows) {
var _local3 = 1;
while (_local3 < _local2) {
_local1.grid[i][_local3].LinkU(_local1.grid[i][_local3 - 1]);
_local3++;
}
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 4) {
var i = 0;
while (i < fullrows) {
_local1.grid[i][0].SetState(TID_FULL);
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 3) {
var i = 0;
while (i < fullrows) {
_local1.grid[i][_local2 - 1].SetState(TID_FULL);
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 2) {
var i = 0;
while (i < _local2) {
_local1.grid[0][i].SetState(TID_FULL);
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
if (_local1.BUILD_STEPS_REMAINING == 1) {
var i = 0;
while (i < _local2) {
_local1.grid[fullrows - 1][i].SetState(TID_FULL);
i++;
}
_local1.BUILD_STEPS_REMAINING--;
return(true);
}
return(false);
};
TileMap.prototype.ClearGrid = function () {
var _local2 = this;
var _local1;
for (var i in _local2.grid) {
_local1 = _local2.grid[i];
for (var _local3 in _local1) {
_local1[_local3].next = null;
_local1[_local3].prev = null;
}
}
};
TileMap.prototype.GetTile_S = function (x, y) {
var _local1 = this;
return(_local1.grid[Math.floor(x / _local1.tw)][Math.floor(y / _local1.th)]);
};
TileMap.prototype.GetTile_V = function (p) {
var _local1 = this;
return(_local1.grid[Math.floor(p.x / _local1.tw)][Math.floor(p.y / _local1.th)]);
};
TileMap.prototype.GetTile_I = function (i, j) {
return(this.grid[i][j]);
};
TileMap.prototype.GetIndex_S = function (v, x, y) {
v.x = Math.floor(x / this.tw);
v.y = Math.floor(y / this.th);
};
TileMap.prototype.GetIndex_V = function (v, p) {
v.x = Math.floor(p.x / this.tw);
v.y = Math.floor(p.y / this.th);
};
function TileMapCell(i, j, x, y, xw, yw) {
var _local1 = this;
_local1.ID = TID_EMPTY;
_local1.CTYPE = CTYPE_EMPTY;
_local1.i = i;
_local1.j = j;
_local1.nU = null;
_local1.nD = null;
_local1.nL = null;
_local1.nR = null;
_local1.eU = EID_OFF;
_local1.eD = EID_OFF;
_local1.eL = EID_OFF;
_local1.eR = EID_OFF;
_local1.gx = 0;
_local1.gy = GRAV;
_local1.d = DRAG;
_local1.next = null;
_local1.prev = null;
_local1.objcounter = 0;
_local1.pos = new Vector2(x, y);
_local1.xw = xw;
_local1.yw = yw;
_local1.minx = _local1.pos.x - _local1.xw;
_local1.maxx = _local1.pos.x + _local1.xw;
_local1.miny = _local1.pos.y - _local1.yw;
_local1.maxy = _local1.pos.y + _local1.yw;
_local1.signx = 0;
_local1.signy = 0;
_local1.sx = 0;
_local1.sy = 0;
var _local2 = false;
if (!_local2) {
_local1.mc = gfx.CreateSprite("tileMC", LAYER_TILES);
_local1.mc.gotoAndStop(1);
_local1.mc._xscale = _local1.xw * 2;
_local1.mc._yscale = _local1.yw * 2;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
var _local3 = new Color(_local1.mc);
_local3.setRGB(7960968);
} else {
_local1.mc = gfx.CreateSprite("tileMC2", LAYER_TILES2);
_local1.mc.gotoAndStop(1);
_local1.mc._xscale = _local1.xw * 2;
_local1.mc._yscale = _local1.yw * 2;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
}
}
TID_EMPTY = 0;
TID_FULL = 1;
TID_45DEGpn = 2;
TID_45DEGnn = 3;
TID_45DEGnp = 4;
TID_45DEGpp = 5;
TID_CONCAVEpn = 6;
TID_CONCAVEnn = 7;
TID_CONCAVEnp = 8;
TID_CONCAVEpp = 9;
TID_CONVEXpn = 10;
TID_CONVEXnn = 11;
TID_CONVEXnp = 12;
TID_CONVEXpp = 13;
TID_22DEGpnS = 14;
TID_22DEGnnS = 15;
TID_22DEGnpS = 16;
TID_22DEGppS = 17;
TID_22DEGpnB = 18;
TID_22DEGnnB = 19;
TID_22DEGnpB = 20;
TID_22DEGppB = 21;
TID_67DEGpnS = 22;
TID_67DEGnnS = 23;
TID_67DEGnpS = 24;
TID_67DEGppS = 25;
TID_67DEGpnB = 26;
TID_67DEGnnB = 27;
TID_67DEGnpB = 28;
TID_67DEGppB = 29;
TID_HALFd = 30;
TID_HALFr = 31;
TID_HALFu = 32;
TID_HALFl = 33;
CTYPE_EMPTY = 0;
CTYPE_FULL = 1;
CTYPE_45DEG = 2;
CTYPE_CONCAVE = 6;
CTYPE_CONVEX = 10;
CTYPE_22DEGs = 14;
CTYPE_22DEGb = 18;
CTYPE_67DEGs = 22;
CTYPE_67DEGb = 26;
CTYPE_HALF = 30;
EID_OFF = 0;
EID_INTERESTING = 1;
EID_SOLID = 2;
TileMapCell.prototype.LinkU = function (t) {
this.nU = t;
};
TileMapCell.prototype.LinkD = function (t) {
this.nD = t;
};
TileMapCell.prototype.LinkL = function (t) {
this.nL = t;
};
TileMapCell.prototype.LinkR = function (t) {
this.nR = t;
};
TileMapCell.prototype.ToString = function () {
var _local1 = ((("(" + this.i) + ",") + this.j) + ")";
return(_local1);
};
TileMapCell.prototype.Draw = function () {
this.mc.gotoAndStop(this.ID + 1);
};
TileMapCell.prototype.SetState = function (ID) {
var _local1 = this;
if (ID == TID_EMPTY) {
_local1.Clear();
} else {
_local1.ID = ID;
_local1.UpdateType();
_local1.UpdateEdges();
_local1.UpdateNeighbors();
}
};
TileMapCell.prototype.Clear = function () {
var _local1 = this;
_local1.ID = TID_EMPTY;
_local1.UpdateType();
_local1.UpdateEdges();
_local1.UpdateNeighbors();
_local1.Draw();
};
TileMapCell.prototype.UpdateNeighbors = function () {
var _local1 = this;
if (_local1.nU != null) {
_local1.nU.UpdateEdges();
}
if (_local1.nD != null) {
_local1.nD.UpdateEdges();
}
if (_local1.nL != null) {
_local1.nL.UpdateEdges();
}
if (_local1.nR != null) {
_local1.nR.UpdateEdges();
}
};
TileMapCell.prototype.UpdateType = function () {
var _local1 = this;
if (0 < _local1.ID) {
if (_local1.ID < CTYPE_45DEG) {
_local1.CTYPE = CTYPE_FULL;
_local1.signx = 0;
_local1.signy = 0;
_local1.sx = 0;
_local1.sy = 0;
} else if (_local1.ID < CTYPE_CONCAVE) {
_local1.CTYPE = CTYPE_45DEG;
if (_local1.ID == TID_45DEGpn) {
_local1.signx = 1;
_local1.signy = -1;
_local1.sx = _local1.signx / Math.SQRT2;
_local1.sy = _local1.signy / Math.SQRT2;
} else if (_local1.ID == TID_45DEGnn) {
_local1.signx = -1;
_local1.signy = -1;
_local1.sx = _local1.signx / Math.SQRT2;
_local1.sy = _local1.signy / Math.SQRT2;
} else if (_local1.ID == TID_45DEGnp) {
_local1.signx = -1;
_local1.signy = 1;
_local1.sx = _local1.signx / Math.SQRT2;
_local1.sy = _local1.signy / Math.SQRT2;
} else if (_local1.ID == TID_45DEGpp) {
_local1.signx = 1;
_local1.signy = 1;
_local1.sx = _local1.signx / Math.SQRT2;
_local1.sy = _local1.signy / Math.SQRT2;
} else {
return(false);
}
} else if (_local1.ID < CTYPE_CONVEX) {
_local1.CTYPE = CTYPE_CONCAVE;
if (_local1.ID == TID_CONCAVEpn) {
_local1.signx = 1;
_local1.signy = -1;
_local1.sx = 0;
_local1.sy = 0;
} else if (_local1.ID == TID_CONCAVEnn) {
_local1.signx = -1;
_local1.signy = -1;
_local1.sx = 0;
_local1.sy = 0;
} else if (_local1.ID == TID_CONCAVEnp) {
_local1.signx = -1;
_local1.signy = 1;
_local1.sx = 0;
_local1.sy = 0;
} else if (_local1.ID == TID_CONCAVEpp) {
_local1.signx = 1;
_local1.signy = 1;
_local1.sx = 0;
_local1.sy = 0;
} else {
return(false);
}
} else if (_local1.ID < CTYPE_22DEGs) {
_local1.CTYPE = CTYPE_CONVEX;
if (_local1.ID == TID_CONVEXpn) {
_local1.signx = 1;
_local1.signy = -1;
_local1.sx = 0;
_local1.sy = 0;
} else if (_local1.ID == TID_CONVEXnn) {
_local1.signx = -1;
_local1.signy = -1;
_local1.sx = 0;
_local1.sy = 0;
} else if (_local1.ID == TID_CONVEXnp) {
_local1.signx = -1;
_local1.signy = 1;
_local1.sx = 0;
_local1.sy = 0;
} else if (_local1.ID == TID_CONVEXpp) {
_local1.signx = 1;
_local1.signy = 1;
_local1.sx = 0;
_local1.sy = 0;
} else {
return(false);
}
} else if (_local1.ID < CTYPE_22DEGb) {
_local1.CTYPE = CTYPE_22DEGs;
if (_local1.ID == TID_22DEGpnS) {
_local1.signx = 1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else if (_local1.ID == TID_22DEGnnS) {
_local1.signx = -1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else if (_local1.ID == TID_22DEGnpS) {
_local1.signx = -1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else if (_local1.ID == TID_22DEGppS) {
_local1.signx = 1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else {
return(false);
}
} else if (_local1.ID < CTYPE_67DEGs) {
_local1.CTYPE = CTYPE_22DEGb;
if (_local1.ID == TID_22DEGpnB) {
_local1.signx = 1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else if (_local1.ID == TID_22DEGnnB) {
_local1.signx = -1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else if (_local1.ID == TID_22DEGnpB) {
_local1.signx = -1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else if (_local1.ID == TID_22DEGppB) {
_local1.signx = 1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 1) / _local2;
_local1.sy = (_local1.signy * 2) / _local2;
} else {
return(false);
}
} else if (_local1.ID < CTYPE_67DEGb) {
_local1.CTYPE = CTYPE_67DEGs;
if (_local1.ID == TID_67DEGpnS) {
_local1.signx = 1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else if (_local1.ID == TID_67DEGnnS) {
_local1.signx = -1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else if (_local1.ID == TID_67DEGnpS) {
_local1.signx = -1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else if (_local1.ID == TID_67DEGppS) {
_local1.signx = 1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else {
return(false);
}
} else if (_local1.ID < CTYPE_HALF) {
_local1.CTYPE = CTYPE_67DEGb;
if (_local1.ID == TID_67DEGpnB) {
_local1.signx = 1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else if (_local1.ID == TID_67DEGnnB) {
_local1.signx = -1;
_local1.signy = -1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else if (_local1.ID == TID_67DEGnpB) {
_local1.signx = -1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else if (_local1.ID == TID_67DEGppB) {
_local1.signx = 1;
_local1.signy = 1;
var _local2 = 2.23606797749979;
_local1.sx = (_local1.signx * 2) / _local2;
_local1.sy = (_local1.signy * 1) / _local2;
} else {
return(false);
}
} else {
_local1.CTYPE = CTYPE_HALF;
if (_local1.ID == TID_HALFd) {
_local1.signx = 0;
_local1.signy = -1;
_local1.sx = _local1.signx;
_local1.sy = _local1.signy;
} else if (_local1.ID == TID_HALFu) {
_local1.signx = 0;
_local1.signy = 1;
_local1.sx = _local1.signx;
_local1.sy = _local1.signy;
} else if (_local1.ID == TID_HALFl) {
_local1.signx = 1;
_local1.signy = 0;
_local1.sx = _local1.signx;
_local1.sy = _local1.signy;
} else if (_local1.ID == TID_HALFr) {
_local1.signx = -1;
_local1.signy = 0;
_local1.sx = _local1.signx;
_local1.sy = _local1.signy;
} else {
return(false);
}
}
} else {
_local1.CTYPE = CTYPE_EMPTY;
_local1.signx = 0;
_local1.signy = 0;
_local1.sx = 0;
_local1.sy = 0;
}
return(undefined);
};
TileMapCell.prototype.UpdateEdges = function () {
var _local1 = this;
var _local2 = _local1.nU;
if (_local1.ID == TID_EMPTY) {
if (_local2.ID == TID_EMPTY) {
_local1.eU = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eU = EID_SOLID;
} else if ((((_local2.signy * -1) <= 0) || (_local2.ID == TID_67DEGpnS)) || (_local2.ID == TID_67DEGnnS)) {
_local1.eU = EID_INTERESTING;
} else {
_local1.eU = EID_SOLID;
}
} else if (_local1.ID == TID_FULL) {
if (_local2.ID == TID_FULL) {
_local1.eU = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eU = EID_OFF;
} else if ((((_local2.signy * -1) <= 0) || (_local2.ID == TID_67DEGpnS)) || (_local2.ID == TID_67DEGnnS)) {
_local1.eU = EID_INTERESTING;
} else {
_local1.eU = EID_OFF;
}
} else if (0 <= (_local1.signy * -1)) {
if (_local2.ID == TID_EMPTY) {
_local1.eU = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eU = EID_SOLID;
} else if ((((_local2.signy * -1) <= 0) || (_local2.ID == TID_67DEGpnS)) || (_local2.ID == TID_67DEGnnS)) {
_local1.eU = EID_INTERESTING;
} else {
_local1.eU = EID_SOLID;
}
} else if ((_local1.ID == TID_67DEGppS) || (_local1.ID == TID_67DEGnpS)) {
if (_local2.ID == TID_EMPTY) {
_local1.eU = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eU = EID_SOLID;
} else if ((((_local2.signy * -1) <= 0) || (_local2.ID == TID_67DEGpnS)) || (_local2.ID == TID_67DEGnnS)) {
_local1.eU = EID_INTERESTING;
} else if ((0 < (_local2.signy * -1)) || (_local2.ID == TID_FULL)) {
_local1.eU = EID_SOLID;
} else {
_local1.eU = EID_OFF;
}
} else if (_local2.ID == TID_FULL) {
_local1.eU = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eU = EID_OFF;
} else if ((((_local2.signy * -1) <= 0) || (_local2.ID == TID_67DEGpnS)) || (_local2.ID == TID_67DEGnnS)) {
_local1.eU = EID_INTERESTING;
} else {
_local1.eU = EID_OFF;
}
_local2 = _local1.nD;
if (_local1.ID == TID_EMPTY) {
if (_local2.ID == TID_EMPTY) {
_local1.eD = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eD = EID_SOLID;
} else if ((((_local2.signy * 1) <= 0) || (_local2.ID == TID_67DEGppS)) || (_local2.ID == TID_67DEGnpS)) {
_local1.eD = EID_INTERESTING;
} else {
_local1.eD = EID_SOLID;
}
} else if (_local1.ID == TID_FULL) {
if (_local2.ID == TID_FULL) {
_local1.eD = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eD = EID_OFF;
} else if ((((_local2.signy * 1) <= 0) || (_local2.ID == TID_67DEGppS)) || (_local2.ID == TID_67DEGnpS)) {
_local1.eD = EID_INTERESTING;
} else {
_local1.eD = EID_OFF;
}
} else if (0 <= (_local1.signy * 1)) {
if (_local2.ID == TID_EMPTY) {
_local1.eD = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eD = EID_SOLID;
} else if ((((_local2.signy * 1) <= 0) || (_local2.ID == TID_67DEGppS)) || (_local2.ID == TID_67DEGnpS)) {
_local1.eD = EID_INTERESTING;
} else {
_local1.eD = EID_SOLID;
}
} else if ((_local1.ID == TID_67DEGpnS) || (_local1.ID == TID_67DEGnnS)) {
if (_local2.ID == TID_EMPTY) {
_local1.eD = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eD = EID_SOLID;
} else if ((((_local2.signy * 1) <= 0) || (_local2.ID == TID_67DEGppS)) || (_local2.ID == TID_67DEGnpS)) {
_local1.eD = EID_INTERESTING;
} else if ((0 < (_local2.signy * 1)) || (_local2.ID == TID_FULL)) {
_local1.eD = EID_SOLID;
} else {
_local1.eD = EID_OFF;
}
} else if (_local2.ID == TID_FULL) {
_local1.eD = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eD = EID_OFF;
} else if ((((_local2.signy * 1) <= 0) || (_local2.ID == TID_67DEGppS)) || (_local2.ID == TID_67DEGnpS)) {
_local1.eD = EID_INTERESTING;
} else {
_local1.eD = EID_OFF;
}
_local2 = _local1.nR;
if (_local1.ID == TID_EMPTY) {
if (_local2.ID == TID_EMPTY) {
_local1.eR = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eR = EID_SOLID;
} else if ((((_local2.signx * 1) <= 0) || (_local2.ID == TID_22DEGpnS)) || (_local2.ID == TID_22DEGppS)) {
_local1.eR = EID_INTERESTING;
} else {
_local1.eR = EID_SOLID;
}
} else if (_local1.ID == TID_FULL) {
if (_local2.ID == TID_FULL) {
_local1.eR = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eR = EID_OFF;
} else if ((((_local2.signx * 1) <= 0) || (_local2.ID == TID_22DEGpnS)) || (_local2.ID == TID_22DEGppS)) {
_local1.eR = EID_INTERESTING;
} else {
_local1.eR = EID_OFF;
}
} else if (0 <= (_local1.signx * 1)) {
if (_local2.ID == TID_EMPTY) {
_local1.eR = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eR = EID_SOLID;
} else if ((((_local2.signx * 1) <= 0) || (_local2.ID == TID_22DEGpnS)) || (_local2.ID == TID_22DEGppS)) {
_local1.eR = EID_INTERESTING;
} else {
_local1.eR = EID_SOLID;
}
} else if ((_local1.ID == TID_22DEGnnS) || (_local1.ID == TID_22DEGnpS)) {
if (_local2.ID == TID_EMPTY) {
_local1.eR = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eR = EID_SOLID;
} else if ((((_local2.signx * 1) <= 0) || (_local2.ID == TID_22DEGpnS)) || (_local2.ID == TID_22DEGppS)) {
_local1.eR = EID_INTERESTING;
} else if ((_local2.ID == TID_FULL) || (0 < (_local2.signx * 1))) {
_local1.eR = EID_SOLID;
} else {
_local1.eR = EID_OFF;
}
} else if (_local2.ID == TID_FULL) {
_local1.eR = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eR = EID_OFF;
} else if ((((_local2.signx * 1) <= 0) || (_local2.ID == TID_22DEGpnS)) || (_local2.ID == TID_22DEGppS)) {
_local1.eR = EID_INTERESTING;
} else {
_local1.eR = EID_OFF;
}
_local2 = _local1.nL;
if (_local1.ID == TID_EMPTY) {
if (_local2.ID == TID_EMPTY) {
_local1.eL = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eL = EID_SOLID;
} else if ((((_local2.signx * -1) <= 0) || (_local2.ID == TID_22DEGnnS)) || (_local2.ID == TID_22DEGnpS)) {
_local1.eL = EID_INTERESTING;
} else {
_local1.eL = EID_SOLID;
}
} else if (_local1.ID == TID_FULL) {
if (_local2.ID == TID_FULL) {
_local1.eL = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eL = EID_OFF;
} else if ((((_local2.signx * -1) <= 0) || (_local2.ID == TID_22DEGnnS)) || (_local2.ID == TID_22DEGnpS)) {
_local1.eL = EID_INTERESTING;
} else {
_local1.eL = EID_OFF;
}
} else if (0 <= (_local1.signx * -1)) {
if (_local2.ID == TID_EMPTY) {
_local1.eL = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eL = EID_SOLID;
} else if ((((_local2.signx * -1) <= 0) || (_local2.ID == TID_22DEGnnS)) || (_local2.ID == TID_22DEGnpS)) {
_local1.eL = EID_INTERESTING;
} else {
_local1.eL = EID_SOLID;
}
} else if ((_local1.ID == TID_22DEGpnS) || (_local1.ID == TID_22DEGppS)) {
if (_local2.ID == TID_EMPTY) {
_local1.eL = EID_OFF;
} else if (_local2.ID == TID_FULL) {
_local1.eL = EID_SOLID;
} else if ((((_local2.signx * -1) <= 0) || (_local2.ID == TID_22DEGnnS)) || (_local2.ID == TID_22DEGnpS)) {
_local1.eL = EID_INTERESTING;
} else if ((0 < (_local2.signx * -1)) || (_local2.ID == TID_FULL)) {
_local1.eL = EID_SOLID;
} else {
_local1.eL = EID_OFF;
}
} else if (_local2.ID == TID_FULL) {
_local1.eL = EID_OFF;
} else if (_local2.ID == TID_EMPTY) {
_local1.eL = EID_OFF;
} else if ((((_local2.signx * -1) <= 0) || (_local2.ID == TID_22DEGnnS)) || (_local2.ID == TID_22DEGnpS)) {
_local1.eL = EID_INTERESTING;
} else {
_local1.eL = EID_OFF;
}
_local1.Draw();
};
TileMapCell.prototype.InsertObj = function (obj) {
var _local1 = this;
var _local2 = obj;
_local2.next = _local1.next;
_local2.prev = _local1;
_local1.prev = null;
if (_local1.next != null) {
_local1.next.prev = _local2;
}
_local1.next = _local2;
_local1.objcounter++;
};
TileMapCell.prototype.RemoveObj = function (obj) {
var _local1 = obj;
_local1.prev.next = _local1.next;
if (_local1.next != null) {
_local1.next.prev = _local1.prev;
}
_local1.next = null;
_local1.prev = null;
this.objcounter--;
};
CHAR_PAD = 48;
TileMap.prototype.GetTileStates = function () {
var n = this.rows;
var m = this.cols;
var grid = this.grid;
var output = "";
var _local3;
var _local2 = 0;
while (_local2 < n) {
_local3 = grid[_local2 + 1];
var _local1 = 0;
while (_local1 < m) {
output = output + String.fromCharCode(_local3[_local1 + 1].ID + CHAR_PAD);
_local1++;
}
_local2++;
}
return(output);
};
TileMap.prototype.SetTileState = function (i, j, char) {
this.grid[i + 1][j + 1].SetState(char - CHAR_PAD);
};
TileMap.prototype.SetTileStates = function (instr) {
var n = this.rows;
var m = this.cols;
var grid = this.grid;
var charList = new Array();
var col;
var _local2 = 0;
while (_local2 < n) {
charList[_local2] = new Array();
var _local1 = 0;
while (_local1 < m) {
var _local3 = instr.charCodeAt(cnum);
charList[_local2][_local1] = _local3;
cnum++;
_local1++;
}
_local2++;
}
var col;
_local2 = 0;
while (_local2 < n) {
col = grid[_local2 + 1];
var _local1 = 0;
while (_local1 < m) {
col[_local1 + 1].SetState(charList[_local2][_local1] - CHAR_PAD);
_local1++;
}
_local2++;
}
};
COL_NONE = 0;
COL_AXIS = 1;
COL_OTHER = 2;
function QueryPointvsTileMap(x, y) {
var _local1 = tiles.GetTile_S(x, y);
return(TestPointTile(x, y, _local1));
}
function TestPoint_Full(x, y, t) {
return(true);
}
function TestPoint_Half(x, y, t) {
var _local1 = t;
var _local3 = _local1.signx;
var _local2 = _local1.signy;
var ox = (x - _local1.pos.x);
var oy = (y - _local1.pos.y);
if (((ox * _local3) + (oy * _local2)) <= 0) {
return(true);
}
return(false);
}
function TestPoint_Concave(x, y, t) {
var _local1 = t;
var ox = ((_local1.pos.x + (_local1.signx * _local1.xw)) - x);
var _local3 = (_local1.pos.y + (_local1.signy * _local1.yw)) - y;
var _local2 = _local1.xw * 2;
if ((_local2 * _local2) <= ((ox * ox) + (_local3 * _local3))) {
return(true);
}
return(false);
}
function TestPoint_Convex(x, y, t) {
var _local1 = t;
var ox = (x - (_local1.pos.x - (_local1.signx * _local1.xw)));
var _local3 = y - (_local1.pos.y - (_local1.signy * _local1.yw));
var _local2 = _local1.xw * 2;
if (((ox * ox) + (_local3 * _local3)) <= (_local2 * _local2)) {
return(true);
}
return(false);
}
function TestPoint_45Deg(x, y, t) {
var _local1 = t;
var _local3 = x - _local1.pos.x;
var _local2 = y - _local1.pos.y;
if (((_local3 * _local1.sx) + (_local2 * _local1.sy)) <= 0) {
return(true);
}
return(false);
}
function TestPoint_22DegS(x, y, t) {
var _local1 = t;
var _local3 = x - (_local1.pos.x + (_local1.signx * _local1.xw));
var _local2 = y - (_local1.pos.y - (_local1.signy * _local1.yw));
if (((_local3 * _local1.sx) + (_local2 * _local1.sy)) <= 0) {
return(true);
}
return(false);
}
function TestPoint_22DegB(x, y, t) {
var _local1 = t;
var _local3 = x - (_local1.pos.x - (_local1.signx * _local1.xw));
var _local2 = y - (_local1.pos.y + (_local1.signy * _local1.yw));
if (((_local3 * _local1.sx) + (_local2 * _local1.sy)) <= 0) {
return(true);
}
return(false);
}
function TestPoint_67DegS(x, y, t) {
var _local1 = t;
var _local3 = x - (_local1.pos.x - (_local1.signx * _local1.xw));
var _local2 = y - (_local1.pos.y + (_local1.signy * _local1.yw));
if (((_local3 * _local1.sx) + (_local2 * _local1.sy)) <= 0) {
return(true);
}
return(false);
}
function TestPoint_67DegB(x, y, t) {
var _local1 = t;
var _local3 = x - (_local1.pos.x + (_local1.signx * _local1.xw));
var _local2 = y - (_local1.pos.y - (_local1.signy * _local1.yw));
if (((_local3 * _local1.sx) + (_local2 * _local1.sy)) <= 0) {
return(true);
}
return(false);
}
function TestPointTile(x, y, t) {
var _local1 = t;
if (0 < _local1.ID) {
return(Test_PointTile[_local1.CTYPE](x, y, _local1));
}
return(false);
}
Test_PointTile = new Object();
Test_PointTile[CTYPE_FULL] = TestPoint_Full;
Test_PointTile[CTYPE_45DEG] = TestPoint_45Deg;
Test_PointTile[CTYPE_CONCAVE] = TestPoint_Concave;
Test_PointTile[CTYPE_CONVEX] = TestPoint_Convex;
Test_PointTile[CTYPE_22DEGs] = TestPoint_22DegS;
Test_PointTile[CTYPE_22DEGb] = TestPoint_22DegB;
Test_PointTile[CTYPE_67DEGs] = TestPoint_67DegS;
Test_PointTile[CTYPE_67DEGb] = TestPoint_67DegB;
Test_PointTile[CTYPE_HALF] = TestPoint_Half;
function CollideAABBvsTileMap(box) {
var _local2 = box;
var pos = _local2.pos;
var _local1 = tiles.GetTile_V(pos);
var tx = _local1.pos.x;
var ty = _local1.pos.y;
var txw = _local1.xw;
var tyw = _local1.yw;
var dx = (pos.x - tx);
var dy = (pos.y - ty);
if (0 < _local1.ID) {
var px = ((txw + _local2.xw) - Math.abs(dx));
var py = ((tyw + _local2.yw) - Math.abs(dy));
if (px < py) {
if (dx < 0) {
px = px * -1;
py = 0;
} else {
py = 0;
}
} else if (dy < 0) {
px = 0;
py = py * -1;
} else {
px = 0;
}
ResolveBoxTile(px, py, _local2, _local1);
}
var crossV = false;
var hitV = false;
var dy = (pos.y - ty);
var py = ((Math.abs(dy) + _local2.yw) - tyw);
if (0 < py) {
crossV = true;
var eV;
var nV;
var pV;
var signY;
if (dy < 0) {
eV = _local1.eU;
nV = _local1.nU;
pV = py;
signY = 1;
} else {
eV = _local1.eD;
nV = _local1.nD;
pV = -py;
signY = -1;
}
if (0 < eV) {
if (eV == EID_SOLID) {
hitV = COL_AXIS;
_local2.ReportCollisionVsWorld(0, pV, 0, signY, nV);
} else {
hitV = ResolveBoxTile(0, pV, _local2, nV);
}
}
}
var crossH = false;
var hitH = false;
var dx = (pos.x - tx);
var px = ((Math.abs(dx) + _local2.xw) - txw);
if (0 < px) {
crossH = true;
var eH;
var nH;
var pH;
var signX;
if (dx < 0) {
eH = _local1.eL;
nH = _local1.nL;
pH = px;
signX = 1;
} else {
eH = _local1.eR;
nH = _local1.nR;
pH = -px;
signX = -1;
}
if (0 < eH) {
if (eH == EID_SOLID) {
hitH = COL_AXIS;
_local2.ReportCollisionVsWorld(pH, 0, signX, 0, nH);
} else {
hitH = ResolveBoxTile(pH, 0, _local2, nH);
}
}
}
if (((crossH && (hitH != COL_AXIS)) && (crossV)) && (hitV != COL_AXIS)) {
var dx = (pos.x - tx);
var dy = (pos.y - ty);
var px = ((Math.abs(dx) + _local2.xw) - txw);
var py = ((Math.abs(dy) + _local2.yw) - tyw);
var rx = 0;
var ry = 0;
var hit = false;
var eH;
var eV;
var _local3;
if ((dx < 0) && (dy < 0)) {
eH = _local1.nU.eL;
eV = _local1.nL.eU;
_local3 = _local1.nU.nL;
} else if ((dx < 0) && (0 < dy)) {
eH = _local1.nD.eL;
eV = _local1.nL.eD;
_local3 = _local1.nD.nL;
} else if ((0 < dx) && (0 < dy)) {
eH = _local1.nD.eR;
eV = _local1.nR.eD;
_local3 = _local1.nD.nR;
} else if ((0 < dx) && (dy < 0)) {
eH = _local1.nU.eR;
eV = _local1.nR.eU;
_local3 = _local1.nU.nR;
}
var nx;
var ny;
if (px < py) {
ry = (ny = 0);
if (dx < 0) {
rx = px;
nx = 1;
} else {
rx = -px;
nx = -1;
}
} else {
rx = (nx = 0);
if (dy < 0) {
ry = py;
ny = 1;
} else {
ry = -py;
ny = -1;
}
}
if (0 < eH) {
if (0 < eV) {
if (eH == EID_SOLID) {
if (eV == EID_SOLID) {
_local2.ReportCollisionVsWorld(rx, ry, nx, ny, _local3);
} else {
var temp = ResolveBoxTile(rx, ry, _local2, _local3);
if (temp == COL_NONE) {
_local2.ReportCollisionVsWorld(pH, 0, signX, 0, _local3);
}
}
} else if (eV == EID_SOLID) {
var temp = ResolveBoxTile(rx, ry, _local2, _local3);
if (temp == COL_NONE) {
_local2.ReportCollisionVsWorld(0, pV, 0, signY, _local3);
}
} else {
ResolveBoxTile(rx, ry, _local2, _local3);
}
} else if (eH == EID_SOLID) {
_local2.ReportCollisionVsWorld(pH, 0, signX, 0, _local3);
} else {
ResolveBoxTile(rx, ry, _local2, _local3);
}
} else if (0 < eV) {
if (eV == EID_SOLID) {
_local2.ReportCollisionVsWorld(0, pV, 0, signY, _local3);
} else {
ResolveBoxTile(rx, ry, _local2, _local3);
}
}
}
}
function ProjAABB_Full(x, y, obj, t) {
var _local1 = y;
var _local2 = x;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
obj.ReportCollisionVsWorld(_local2, _local1, _local2 / _local3, _local1 / _local3, t);
return(COL_AXIS);
}
function ProjAABB_Half(x, y, obj, t) {
var _local1 = t;
var _local3 = _local1.signx;
var _local2 = _local1.signy;
var ox = ((obj.pos.x - (_local3 * obj.xw)) - _local1.pos.x);
var oy = ((obj.pos.y - (_local2 * obj.yw)) - _local1.pos.y);
var dp = ((ox * _local3) + (oy * _local2));
if (dp < 0) {
_local3 = _local3 * (-dp);
_local2 = _local2 * (-dp);
var lenN = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var lenP = Math.sqrt((x * x) + (y * y));
if (lenP < lenN) {
obj.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local3, _local2, _local1.signx, _local1.signy, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_Concave(x, y, obj, t) {
var _local1 = t;
var signx = _local1.signx;
var signy = _local1.signy;
var ox = ((_local1.pos.x + (signx * _local1.xw)) - (obj.pos.x - (signx * obj.xw)));
var _local3 = (_local1.pos.y + (signy * _local1.yw)) - (obj.pos.y - (signy * obj.yw));
var twid = (_local1.xw * 2);
var rad = Math.sqrt((twid * twid) + 0);
var len = Math.sqrt((ox * ox) + (_local3 * _local3));
var _local2 = len - rad;
if (0 < _local2) {
var lenP = Math.sqrt((x * x) + (y * y));
if (lenP < _local2) {
obj.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
ox = ox / len;
_local3 = _local3 / len;
obj.ReportCollisionVsWorld(ox * _local2, _local3 * _local2, ox, _local3, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_Convex(x, y, obj, t) {
var _local1 = t;
var signx = _local1.signx;
var signy = _local1.signy;
var _local3 = (obj.pos.x - (signx * obj.xw)) - (_local1.pos.x - (signx * _local1.xw));
var _local2 = (obj.pos.y - (signy * obj.yw)) - (_local1.pos.y - (signy * _local1.yw));
var len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var twid = (_local1.xw * 2);
var rad = Math.sqrt((twid * twid) + 0);
var pen = (rad - len);
if (((signx * _local3) < 0) || ((signy * _local2) < 0)) {
var lenP = Math.sqrt((x * x) + (y * y));
obj.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
if (0 < pen) {
_local3 = _local3 / len;
_local2 = _local2 / len;
obj.ReportCollisionVsWorld(_local3 * pen, _local2 * pen, _local3, _local2, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_45Deg(x, y, obj, t) {
var _local1 = t;
var signx = _local1.signx;
var signy = _local1.signy;
var ox = ((obj.pos.x - (signx * obj.xw)) - _local1.pos.x);
var oy = ((obj.pos.y - (signy * obj.yw)) - _local1.pos.y);
var _local3 = _local1.sx;
var _local2 = _local1.sy;
var dp = ((ox * _local3) + (oy * _local2));
if (dp < 0) {
_local3 = _local3 * (-dp);
_local2 = _local2 * (-dp);
var lenN = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var lenP = Math.sqrt((x * x) + (y * y));
if (lenP < lenN) {
obj.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local3, _local2, _local1.sx, _local1.sy);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_22DegS(x, y, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var signy = _local1.signy;
var py = (_local2.pos.y - (signy * _local2.yw));
var _local3 = _local1.pos.y - py;
if (0 < (_local3 * signy)) {
var ox = ((_local2.pos.x - (signx * _local2.xw)) - (_local1.pos.x + (signx * _local1.xw)));
var oy = ((_local2.pos.y - (signy * _local2.yw)) - (_local1.pos.y - (signy * _local1.yw)));
var sx = _local1.sx;
var sy = _local1.sy;
var dp = ((ox * sx) + (oy * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
var lenN = Math.sqrt((sx * sx) + (sy * sy));
var lenP = Math.sqrt((x * x) + (y * y));
var aY = Math.abs(_local3);
if (lenP < lenN) {
if (aY < lenP) {
_local2.ReportCollisionVsWorld(0, _local3, 0, _local3 / aY, _local1);
return(COL_OTHER);
}
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
if (aY < lenN) {
_local2.ReportCollisionVsWorld(0, _local3, 0, _local3 / aY, _local1);
return(COL_OTHER);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjAABB_22DegB(x, y, obj, t) {
var _local1 = t;
var signx = _local1.signx;
var signy = _local1.signy;
var ox = ((obj.pos.x - (signx * obj.xw)) - (_local1.pos.x - (signx * _local1.xw)));
var oy = ((obj.pos.y - (signy * obj.yw)) - (_local1.pos.y + (signy * _local1.yw)));
var _local3 = _local1.sx;
var _local2 = _local1.sy;
var dp = ((ox * _local3) + (oy * _local2));
if (dp < 0) {
_local3 = _local3 * (-dp);
_local2 = _local2 * (-dp);
var lenN = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var lenP = Math.sqrt((x * x) + (y * y));
if (lenP < lenN) {
obj.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local3, _local2, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjAABB_67DegS(x, y, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var signy = _local1.signy;
var px = (_local2.pos.x - (signx * _local2.xw));
var _local3 = _local1.pos.x - px;
if (0 < (_local3 * signx)) {
var ox = ((_local2.pos.x - (signx * _local2.xw)) - (_local1.pos.x - (signx * _local1.xw)));
var oy = ((_local2.pos.y - (signy * _local2.yw)) - (_local1.pos.y + (signy * _local1.yw)));
var sx = _local1.sx;
var sy = _local1.sy;
var dp = ((ox * sx) + (oy * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
var lenN = Math.sqrt((sx * sx) + (sy * sy));
var lenP = Math.sqrt((x * x) + (y * y));
var aX = Math.abs(_local3);
if (lenP < lenN) {
if (aX < lenP) {
_local2.ReportCollisionVsWorld(_local3, 0, _local3 / aX, 0, _local1);
return(COL_OTHER);
}
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
if (aX < lenN) {
_local2.ReportCollisionVsWorld(_local3, 0, _local3 / aX, 0, _local1);
return(COL_OTHER);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjAABB_67DegB(x, y, obj, t) {
var _local1 = t;
var signx = _local1.signx;
var signy = _local1.signy;
var ox = ((obj.pos.x - (signx * obj.xw)) - (_local1.pos.x + (signx * _local1.xw)));
var oy = ((obj.pos.y - (signy * obj.yw)) - (_local1.pos.y - (signy * _local1.yw)));
var _local3 = _local1.sx;
var _local2 = _local1.sy;
var dp = ((ox * _local3) + (oy * _local2));
if (dp < 0) {
_local3 = _local3 * (-dp);
_local2 = _local2 * (-dp);
var lenN = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
var lenP = Math.sqrt((x * x) + (y * y));
if (lenP < lenN) {
obj.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
obj.ReportCollisionVsWorld(_local3, _local2, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
function ResolveBoxTile(x, y, box, t) {
var _local1 = t;
if (0 < _local1.ID) {
return(Proj_AABBTile[_local1.CTYPE](x, y, box, _local1));
}
return(false);
}
Proj_AABBTile = new Object();
Proj_AABBTile[CTYPE_FULL] = ProjAABB_Full;
Proj_AABBTile[CTYPE_45DEG] = ProjAABB_45Deg;
Proj_AABBTile[CTYPE_CONCAVE] = ProjAABB_Concave;
Proj_AABBTile[CTYPE_CONVEX] = ProjAABB_Convex;
Proj_AABBTile[CTYPE_22DEGs] = ProjAABB_22DegS;
Proj_AABBTile[CTYPE_22DEGb] = ProjAABB_22DegB;
Proj_AABBTile[CTYPE_67DEGs] = ProjAABB_67DegS;
Proj_AABBTile[CTYPE_67DEGb] = ProjAABB_67DegB;
Proj_AABBTile[CTYPE_HALF] = ProjAABB_Half;
function CollideCirclevsTileMap(obj) {
var pos = obj.pos;
var rad = obj.r;
var _local1 = tiles.GetTile_V(pos);
var tx = _local1.pos.x;
var ty = _local1.pos.y;
var txw = _local1.xw;
var tyw = _local1.yw;
var dx = (pos.x - tx);
var dy = (pos.y - ty);
if (0 < _local1.ID) {
var px = ((txw + rad) - Math.abs(dx));
var py = ((tyw + rad) - Math.abs(dy));
ResolveCircleTile(px, py, 0, 0, obj, _local1);
}
var crossV = false;
var hitV = false;
var dy = (pos.y - ty);
var py = ((Math.abs(dy) + rad) - tyw);
if (0 < py) {
crossV = true;
var eV;
var nV;
var oV;
if (dy < 0) {
eV = _local1.eU;
nV = _local1.nU;
oV = 1;
} else {
eV = _local1.eD;
nV = _local1.nD;
oV = -1;
}
if (0 < eV) {
if (eV == EID_SOLID) {
hitV = COL_AXIS;
obj.ReportCollisionVsWorld(0, py * oV, 0, oV, nV);
} else {
hitV = ResolveCircleTile(0, py, 0, oV, obj, nV);
}
}
}
var crossH = false;
var hitH = false;
var dx = (pos.x - tx);
var px = ((Math.abs(dx) + rad) - txw);
if (0 < px) {
crossH = true;
var _local3;
var nH;
var oH;
if (dx < 0) {
_local3 = _local1.eL;
nH = _local1.nL;
oH = 1;
} else {
_local3 = _local1.eR;
nH = _local1.nR;
oH = -1;
}
if (0 < _local3) {
if (_local3 == EID_SOLID) {
hitH = COL_AXIS;
obj.ReportCollisionVsWorld(px * oH, 0, oH, 0, nH);
} else {
hitH = ResolveCircleTile(px, 0, oH, 0, obj, nH);
}
}
}
if (((crossH && (hitH != COL_AXIS)) && (crossV)) && (hitV != COL_AXIS)) {
var _local2;
var hit = false;
if ((dx < 0) && (dy < 0)) {
var _local3 = _local1.nU.eL;
eV = _local1.nL.eU;
_local2 = _local1.nU.nL;
} else if ((dx < 0) && (0 < dy)) {
var _local3 = _local1.nD.eL;
eV = _local1.nL.eD;
_local2 = _local1.nD.nL;
} else if ((0 < dx) && (0 < dy)) {
var _local3 = _local1.nD.eR;
eV = _local1.nR.eD;
_local2 = _local1.nD.nR;
} else if ((0 < dx) && (dy < 0)) {
var _local3 = _local1.nU.eR;
eV = _local1.nR.eU;
_local2 = _local1.nU.nR;
}
if (0 < (_local3 + eV)) {
if ((_local3 == EID_SOLID) || (eV == EID_SOLID)) {
var vx = (_local2.pos.x + (oH * _local2.xw));
var vy = (_local2.pos.y + (oV * _local2.yw));
var dx = (obj.pos.x - vx);
var dy = (obj.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (obj.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
obj.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local2);
}
} else {
dx = pos.x - _local2.pos.x;
dy = pos.y - _local2.pos.y;
px = (Math.abs(dx) + rad) - _local2.xw;
py = (Math.abs(dy) + rad) - _local2.yw;
ResolveCircleTile(px, py, oH, oV, obj, _local2);
}
}
}
}
function ProjCircle_Full(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
if (oH == 0) {
if (oV == 0) {
if (x < y) {
var dx = (_local2.pos.x - _local1.pos.x);
if (dx < 0) {
_local2.ReportCollisionVsWorld(-x, 0, -1, 0, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(x, 0, 1, 0, _local1);
return(COL_AXIS);
}
var _local3 = _local2.pos.y - _local1.pos.y;
if (_local3 < 0) {
_local2.ReportCollisionVsWorld(0, -y, 0, -1, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(0, y, 0, 1, _local1);
return(COL_AXIS);
}
static_rend.DrawCrossR(_local1.pos, _local1.xw);
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
if (oV == 0) {
static_rend.DrawCrossR(_local1.pos, _local1.xw);
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
static_rend.DrawCrossR(_local1.pos, _local1.xw);
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (oV * _local1.yw));
var dx = (_local2.pos.x - vx);
var _local3 = _local2.pos.y - vy;
var len = Math.sqrt((dx * dx) + (_local3 * _local3));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
_local3 = oV / Math.SQRT2;
} else {
dx = dx / len;
_local3 = _local3 / len;
}
_local2.ReportCollisionVsWorld(dx * pen, _local3 * pen, dx, _local3, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
function ProjCircle_Half(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var _local3 = oV;
var signx = _local1.signx;
var signy = _local1.signy;
var celldp = ((oH * signx) + (_local3 * signy));
if (0 < celldp) {
return(COL_NONE);
}
if (oH == 0) {
if (_local3 == 0) {
var r = _local2.r;
var ox = ((_local2.pos.x - (signx * r)) - _local1.pos.x);
var oy = ((_local2.pos.y - (signy * r)) - _local1.pos.y);
var sx = signx;
var sy = signy;
var dp = ((ox * sx) + (oy * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
var lenN = Math.sqrt((sx * sx) + (sy * sy));
var lenP = Math.sqrt((x * x) + (y * y));
if (lenP < lenN) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.signx, _local1.signy);
return(COL_OTHER);
}
} else if (celldp == 0) {
var r = _local2.r;
var dx = (_local2.pos.x - _local1.pos.x);
if ((dx * signx) < 0) {
_local2.ReportCollisionVsWorld(0, y * _local3, 0, _local3, _local1);
return(COL_AXIS);
}
var dy = (_local2.pos.y - (_local1.pos.y + (_local3 * _local1.yw)));
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = signx / Math.SQRT2;
dy = _local3 / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
} else {
_local2.ReportCollisionVsWorld(0, y * _local3, 0, _local3, _local1);
return(COL_AXIS);
}
} else if (_local3 == 0) {
if (celldp == 0) {
var r = _local2.r;
var dy = (_local2.pos.y - _local1.pos.y);
if ((dy * signy) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var dx = (_local2.pos.x - (_local1.pos.x + (oH * _local1.xw)));
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = signx / Math.SQRT2;
dy = _local3 / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
} else {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
} else {
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (_local3 * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = _local3 / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_45Deg(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var signy = _local1.signy;
if (oH == 0) {
if (oV == 0) {
var sx = _local1.sx;
var sy = _local1.sy;
var ox = ((_local2.pos.x - (sx * _local2.r)) - _local1.pos.x);
var _local3 = (_local2.pos.y - (sy * _local2.r)) - _local1.pos.y;
var dp = ((ox * sx) + (_local3 * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
if (x < y) {
lenP = x;
y = 0;
if ((_local2.pos.x - _local1.pos.x) < 0) {
x = x * -1;
}
} else {
lenP = y;
x = 0;
if ((_local2.pos.y - _local1.pos.y) < 0) {
y = y * -1;
}
}
var lenN = Math.sqrt((sx * sx) + (sy * sy));
if (lenP < lenN) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
} else {
if ((signy * oV) < 0) {
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
var sx = _local1.sx;
var sy = _local1.sy;
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var _local3 = _local2.pos.y - (_local1.pos.y + (oV * _local1.yw));
var perp = ((ox * (-sy)) + (_local3 * sx));
if (0 < ((perp * signx) * signy)) {
var len = Math.sqrt((ox * ox) + (_local3 * _local3));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
_local3 = _local3 / len;
_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (_local3 * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
return(COL_OTHER);
}
}
}
} else if (oV == 0) {
if ((signx * oH) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var sx = _local1.sx;
var sy = _local1.sy;
var ox = (_local2.pos.x - (_local1.pos.x + (oH * _local1.xw)));
var _local3 = _local2.pos.y - (_local1.pos.y - (signy * _local1.yw));
var perp = ((ox * (-sy)) + (_local3 * sx));
if (((perp * signx) * signy) < 0) {
var len = Math.sqrt((ox * ox) + (_local3 * _local3));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
_local3 = _local3 / len;
_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (_local3 * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
return(COL_OTHER);
}
}
} else {
if (0 < ((signx * oH) + (signy * oV))) {
return(COL_NONE);
}
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (oV * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_Concave(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var _local3 = oV;
var signx = _local1.signx;
var signy = _local1.signy;
if (oH == 0) {
if (_local3 == 0) {
var ox = ((_local1.pos.x + (signx * _local1.xw)) - _local2.pos.x);
var oy = ((_local1.pos.y + (signy * _local1.yw)) - _local2.pos.y);
var twid = (_local1.xw * 2);
var trad = Math.sqrt((twid * twid) + 0);
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = ((len + _local2.r) - trad);
if (0 < pen) {
if (x < y) {
lenP = x;
y = 0;
if ((_local2.pos.x - _local1.pos.x) < 0) {
x = x * -1;
}
} else {
lenP = y;
x = 0;
if ((_local2.pos.y - _local1.pos.y) < 0) {
y = y * -1;
}
}
if (lenP < pen) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
if ((signy * _local3) < 0) {
_local2.ReportCollisionVsWorld(0, y * _local3, 0, _local3, _local1);
return(COL_AXIS);
}
var vx = (_local1.pos.x - (signx * _local1.xw));
var vy = (_local1.pos.y + (_local3 * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = 0;
dy = _local3;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
} else if (_local3 == 0) {
if ((signx * oH) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y - (signy * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH;
dy = 0;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
} else {
if (0 < ((signx * oH) + (signy * _local3))) {
return(COL_NONE);
}
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (_local3 * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = _local3 / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_Convex(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var signy = _local1.signy;
if (oH == 0) {
if (oV == 0) {
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
var twid = (_local1.xw * 2);
var trad = Math.sqrt((twid * twid) + 0);
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = ((trad + _local2.r) - len);
if (0 < pen) {
if (x < y) {
lenP = x;
y = 0;
if ((_local2.pos.x - _local1.pos.x) < 0) {
x = x * -1;
}
} else {
lenP = y;
x = 0;
if ((_local2.pos.y - _local1.pos.y) < 0) {
y = y * -1;
}
}
if (lenP < pen) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
} else {
if ((signy * oV) < 0) {
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
var twid = (_local1.xw * 2);
var trad = Math.sqrt((twid * twid) + 0);
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = ((trad + _local2.r) - len);
if (0 < pen) {
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
}
} else if (oV == 0) {
if ((signx * oH) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
var twid = (_local1.xw * 2);
var trad = Math.sqrt((twid * twid) + 0);
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = ((trad + _local2.r) - len);
if (0 < pen) {
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
} else if (0 < ((signx * oH) + (signy * oV))) {
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var oy = (_local2.pos.y - (_local1.pos.y - (signy * _local1.yw)));
var twid = (_local1.xw * 2);
var trad = Math.sqrt((twid * twid) + 0);
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = ((trad + _local2.r) - len);
if (0 < pen) {
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
} else {
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (oV * _local1.yw));
var dx = (_local2.pos.x - vx);
var _local3 = _local2.pos.y - vy;
var len = Math.sqrt((dx * dx) + (_local3 * _local3));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
_local3 = oV / Math.SQRT2;
} else {
dx = dx / len;
_local3 = _local3 / len;
}
_local2.ReportCollisionVsWorld(dx * pen, _local3 * pen, dx, _local3, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_22DegS(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var signy = _local1.signy;
if (0 < (signy * oV)) {
return(COL_NONE);
}
if (oH == 0) {
if (oV == 0) {
var sx = _local1.sx;
var sy = _local1.sy;
var r = _local2.r;
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var _local3 = _local2.pos.y - _local1.pos.y;
var perp = ((ox * (-sy)) + (_local3 * sx));
if (0 < ((perp * signx) * signy)) {
var len = Math.sqrt((ox * ox) + (_local3 * _local3));
var pen = (r - len);
if (0 < pen) {
ox = ox / len;
_local3 = _local3 / len;
_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
return(COL_OTHER);
}
} else {
ox = ox - (r * sx);
_local3 = _local3 - (r * sy);
var dp = ((ox * sx) + (_local3 * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
var lenN = Math.sqrt((sx * sx) + (sy * sy));
if (x < y) {
lenP = x;
y = 0;
if ((_local2.pos.x - _local1.pos.x) < 0) {
x = x * -1;
}
} else {
lenP = y;
x = 0;
if ((_local2.pos.y - _local1.pos.y) < 0) {
y = y * -1;
}
}
if (lenP < lenN) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
}
} else {
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
} else if (oV == 0) {
if ((signx * oH) < 0) {
var vx = (_local1.pos.x - (signx * _local1.xw));
var vy = _local1.pos.y;
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
if ((dy * signy) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
} else {
var sx = _local1.sx;
var sy = _local1.sy;
var ox = (_local2.pos.x - (_local1.pos.x + (oH * _local1.xw)));
var _local3 = _local2.pos.y - (_local1.pos.y - (signy * _local1.yw));
var perp = ((ox * (-sy)) + (_local3 * sx));
if (((perp * signx) * signy) < 0) {
var len = Math.sqrt((ox * ox) + (_local3 * _local3));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
_local3 = _local3 / len;
_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (_local3 * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
return(COL_OTHER);
}
}
}
} else {
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (oV * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_22DegB(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var _local3 = _local1.signy;
if (oH == 0) {
if (oV == 0) {
var sx = _local1.sx;
var sy = _local1.sy;
var r = _local2.r;
var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x - (signx * _local1.xw)));
var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y + (_local3 * _local1.yw)));
var dp = ((ox * sx) + (oy * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
var lenN = Math.sqrt((sx * sx) + (sy * sy));
if (x < y) {
lenP = x;
y = 0;
if ((_local2.pos.x - _local1.pos.x) < 0) {
x = x * -1;
}
} else {
lenP = y;
x = 0;
if ((_local2.pos.y - _local1.pos.y) < 0) {
y = y * -1;
}
}
if (lenP < lenN) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
} else {
if ((_local3 * oV) < 0) {
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
var sx = _local1.sx;
var sy = _local1.sy;
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var oy = (_local2.pos.y - (_local1.pos.y + (_local3 * _local1.yw)));
var perp = ((ox * (-sy)) + (oy * sx));
if (0 < ((perp * signx) * _local3)) {
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (oy * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
return(COL_OTHER);
}
}
}
} else if (oV == 0) {
if ((signx * oH) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var ox = (_local2.pos.x - (_local1.pos.x + (signx * _local1.xw)));
var oy = (_local2.pos.y - _local1.pos.y);
if ((oy * _local3) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var sx = _local1.sx;
var sy = _local1.sy;
var perp = ((ox * (-sy)) + (oy * sx));
if (((perp * signx) * _local3) < 0) {
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (oy * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
}
} else {
if (0 < ((signx * oH) + (_local3 * oV))) {
var slen = 2.23606797749979;
var sx = ((signx * 1) / slen);
var sy = ((_local3 * 2) / slen);
var r = _local2.r;
var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x - (signx * _local1.xw)));
var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y + (_local3 * _local1.yw)));
var dp = ((ox * sx) + (oy * sy));
if (dp < 0) {
_local2.ReportCollisionVsWorld((-sx) * dp, (-sy) * dp, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (oV * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_67DegS(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var signy = _local1.signy;
if (0 < (signx * oH)) {
return(COL_NONE);
}
if (oH == 0) {
if (oV == 0) {
var sx = _local1.sx;
var sy = _local1.sy;
var r = _local2.r;
var ox = (_local2.pos.x - _local1.pos.x);
var _local3 = _local2.pos.y - (_local1.pos.y - (signy * _local1.yw));
var perp = ((ox * (-sy)) + (_local3 * sx));
if (((perp * signx) * signy) < 0) {
var len = Math.sqrt((ox * ox) + (_local3 * _local3));
var pen = (r - len);
if (0 < pen) {
ox = ox / len;
_local3 = _local3 / len;
_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
return(COL_OTHER);
}
} else {
ox = ox - (r * sx);
_local3 = _local3 - (r * sy);
var dp = ((ox * sx) + (_local3 * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
var lenN = Math.sqrt((sx * sx) + (sy * sy));
if (x < y) {
lenP = x;
y = 0;
if ((_local2.pos.x - _local1.pos.x) < 0) {
x = x * -1;
}
} else {
lenP = y;
x = 0;
if ((_local2.pos.y - _local1.pos.y) < 0) {
y = y * -1;
}
}
if (lenP < lenN) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
}
} else if ((signy * oV) < 0) {
var vx = _local1.pos.x;
var vy = (_local1.pos.y - (signy * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
if ((dx * signx) < 0) {
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
} else {
var sx = _local1.sx;
var sy = _local1.sy;
var ox = (_local2.pos.x - (_local1.pos.x - (signx * _local1.xw)));
var _local3 = _local2.pos.y - (_local1.pos.y + (oV * _local1.yw));
var perp = ((ox * (-sy)) + (_local3 * sx));
if (0 < ((perp * signx) * signy)) {
var len = Math.sqrt((ox * ox) + (_local3 * _local3));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
_local3 = _local3 / len;
_local2.ReportCollisionVsWorld(ox * pen, _local3 * pen, ox, _local3, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (_local3 * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
}
}
} else {
if (oV == 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (oV * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ProjCircle_67DegB(x, y, oH, oV, obj, t) {
var _local1 = t;
var _local2 = obj;
var signx = _local1.signx;
var _local3 = _local1.signy;
if (oH == 0) {
if (oV == 0) {
var sx = _local1.sx;
var sy = _local1.sy;
var r = _local2.r;
var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x + (signx * _local1.xw)));
var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y - (_local3 * _local1.yw)));
var dp = ((ox * sx) + (oy * sy));
if (dp < 0) {
sx = sx * (-dp);
sy = sy * (-dp);
var lenN = Math.sqrt((sx * sx) + (sy * sy));
if (x < y) {
lenP = x;
y = 0;
if ((_local2.pos.x - _local1.pos.x) < 0) {
x = x * -1;
}
} else {
lenP = y;
x = 0;
if ((_local2.pos.y - _local1.pos.y) < 0) {
y = y * -1;
}
}
if (lenP < lenN) {
_local2.ReportCollisionVsWorld(x, y, x / lenP, y / lenP, _local1);
return(COL_AXIS);
}
_local2.ReportCollisionVsWorld(sx, sy, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
} else {
if ((_local3 * oV) < 0) {
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
var ox = (_local2.pos.x - _local1.pos.x);
var oy = (_local2.pos.y - (_local1.pos.y + (_local3 * _local1.yw)));
if ((ox * signx) < 0) {
_local2.ReportCollisionVsWorld(0, y * oV, 0, oV, _local1);
return(COL_AXIS);
}
var sx = _local1.sx;
var sy = _local1.sy;
var perp = ((ox * (-sy)) + (oy * sx));
if (0 < ((perp * signx) * _local3)) {
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (oy * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, sx, sy, _local1);
return(COL_OTHER);
}
}
}
} else if (oV == 0) {
if ((signx * oH) < 0) {
_local2.ReportCollisionVsWorld(x * oH, 0, oH, 0, _local1);
return(COL_AXIS);
}
var slen = 2.23606797749979;
var sx = ((signx * 2) / slen);
var sy = ((_local3 * 1) / slen);
var ox = (_local2.pos.x - (_local1.pos.x + (signx * _local1.xw)));
var oy = (_local2.pos.y - (_local1.pos.y - (_local3 * _local1.yw)));
var perp = ((ox * (-sy)) + (oy * sx));
if (((perp * signx) * _local3) < 0) {
var len = Math.sqrt((ox * ox) + (oy * oy));
var pen = (_local2.r - len);
if (0 < pen) {
ox = ox / len;
oy = oy / len;
_local2.ReportCollisionVsWorld(ox * pen, oy * pen, ox, oy, _local1);
return(COL_OTHER);
}
} else {
var dp = ((ox * sx) + (oy * sy));
var pen = (_local2.r - Math.abs(dp));
if (0 < pen) {
_local2.ReportCollisionVsWorld(sx * pen, sy * pen, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
}
} else {
if (0 < ((signx * oH) + (_local3 * oV))) {
var sx = _local1.sx;
var sy = _local1.sy;
var r = _local2.r;
var ox = ((_local2.pos.x - (sx * r)) - (_local1.pos.x + (signx * _local1.xw)));
var oy = ((_local2.pos.y - (sy * r)) - (_local1.pos.y - (_local3 * _local1.yw)));
var dp = ((ox * sx) + (oy * sy));
if (dp < 0) {
_local2.ReportCollisionVsWorld((-sx) * dp, (-sy) * dp, _local1.sx, _local1.sy, _local1);
return(COL_OTHER);
}
return(COL_NONE);
}
var vx = (_local1.pos.x + (oH * _local1.xw));
var vy = (_local1.pos.y + (oV * _local1.yw));
var dx = (_local2.pos.x - vx);
var dy = (_local2.pos.y - vy);
var len = Math.sqrt((dx * dx) + (dy * dy));
var pen = (_local2.r - len);
if (0 < pen) {
if (len == 0) {
dx = oH / Math.SQRT2;
dy = oV / Math.SQRT2;
} else {
dx = dx / len;
dy = dy / len;
}
_local2.ReportCollisionVsWorld(dx * pen, dy * pen, dx, dy, _local1);
return(COL_OTHER);
}
}
return(COL_NONE);
}
function ResolveCircleTile(x, y, oH, oV, obj, t) {
var _local1 = t;
if (0 < _local1.ID) {
return(Proj_CircleTile[_local1.CTYPE](x, y, oH, oV, obj, _local1));
}
return(false);
}
Proj_CircleTile = new Object();
Proj_CircleTile[CTYPE_FULL] = ProjCircle_Full;
Proj_CircleTile[CTYPE_45DEG] = ProjCircle_45Deg;
Proj_CircleTile[CTYPE_CONCAVE] = ProjCircle_Concave;
Proj_CircleTile[CTYPE_CONVEX] = ProjCircle_Convex;
Proj_CircleTile[CTYPE_22DEGs] = ProjCircle_22DegS;
Proj_CircleTile[CTYPE_22DEGb] = ProjCircle_22DegB;
Proj_CircleTile[CTYPE_67DEGs] = ProjCircle_67DegS;
Proj_CircleTile[CTYPE_67DEGb] = ProjCircle_67DegB;
Proj_CircleTile[CTYPE_HALF] = ProjCircle_Half;
function QueryRayObj(out, p0, p1, obj) {
var _local1 = out;
var _local2 = p0;
var c = tiles.GetTile_V(_local2);
var i0 = c.i;
var j0 = c.j;
var dx = (p1.x - _local2.x);
var _local3 = p1.y - _local2.y;
var len = Math.sqrt((dx * dx) + (_local3 * _local3));
if (len != 0) {
dx = dx / len;
_local3 = _local3 / len;
var X = i0;
var Y = j0;
if (dx < 0) {
var stepX = -1;
var tMaxX = (((c.pos.x - c.xw) - _local2.x) / dx);
var tDeltaX = ((2 * c.xw) / (-dx));
} else if (0 < dx) {
var stepX = 1;
var tMaxX = (((c.pos.x + c.xw) - _local2.x) / dx);
var tDeltaX = ((2 * c.xw) / dx);
} else {
var stepX = 0;
var tMaxX = 100000000;
var tDeltaX = 0;
}
if (_local3 < 0) {
var stepY = -1;
var tMaxY = (((c.pos.y - c.yw) - _local2.y) / _local3);
var tDeltaY = ((2 * c.yw) / (-_local3));
} else if (0 < _local3) {
var stepY = 1;
var tMaxY = (((c.pos.y + c.yw) - _local2.y) / _local3);
var tDeltaY = ((2 * c.yw) / _local3);
} else {
var stepY = 0;
var tMaxY = 100000000;
var tDeltaY = 0;
}
var px = _local2.x;
var py = _local2.y;
if (TestRayTile(_local1, px, py, dx, _local3, c)) {
var tx = _local1.x;
var ty = _local1.y;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
_local1.x = tx;
_local1.y = ty;
return(false);
var e;
var n;
while (c != null) {
if (tMaxX < tMaxY) {
if (stepX < 0) {
e = c.eL;
n = c.nL;
} else {
e = c.eR;
n = c.nR;
}
if (0 < e) {
px = _local2.x + (tMaxX * dx);
py = _local2.y + (tMaxX * _local3);
if (e == EID_SOLID) {
var tx = px;
var ty = py;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
if (TestRayTile(_local1, px, py, dx, _local3, n)) {
var tx = _local1.x;
var ty = _local1.y;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
}
tMaxX = tMaxX + tDeltaX;
X = X + stepX;
} else {
if (stepY < 0) {
e = c.eU;
n = c.nU;
} else {
e = c.eD;
n = c.nD;
}
if (0 < e) {
px = _local2.x + (tMaxY * dx);
py = _local2.y + (tMaxY * _local3);
if (e == EID_SOLID) {
var tx = px;
var ty = py;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
if (TestRayTile(_local1, px, py, dx, _local3, n)) {
var tx = _local1.x;
var ty = _local1.y;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
}
tMaxY = tMaxY + tDeltaY;
Y = Y + stepY;
}
c = n;
}
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
return(true);
}
return(false);
return(false);
}
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
var e;
var n;
while (c != null) {
if (tMaxX < tMaxY) {
if (stepX < 0) {
e = c.eL;
n = c.nL;
} else {
e = c.eR;
n = c.nR;
}
if (0 < e) {
px = _local2.x + (tMaxX * dx);
py = _local2.y + (tMaxX * _local3);
if (e == EID_SOLID) {
var tx = px;
var ty = py;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
if (TestRayTile(_local1, px, py, dx, _local3, n)) {
var tx = _local1.x;
var ty = _local1.y;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
}
tMaxX = tMaxX + tDeltaX;
X = X + stepX;
} else {
if (stepY < 0) {
e = c.eU;
n = c.nU;
} else {
e = c.eD;
n = c.nD;
}
if (0 < e) {
px = _local2.x + (tMaxY * dx);
py = _local2.y + (tMaxY * _local3);
if (e == EID_SOLID) {
var tx = px;
var ty = py;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
if (TestRayTile(_local1, px, py, dx, _local3, n)) {
var tx = _local1.x;
var ty = _local1.y;
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
var dpO = (((_local2.x - _local1.x) * dx) + ((_local2.y - _local1.y) * _local3));
var dpT = (((_local2.x - tx) * dx) + ((_local2.y - ty) * _local3));
if (dpO < dpT) {
_local1.x = tx;
_local1.y = ty;
return(false);
}
return(true);
}
_local1.x = tx;
_local1.y = ty;
return(false);
}
}
tMaxY = tMaxY + tDeltaY;
Y = Y + stepY;
}
c = n;
}
if (TestRay_Circle(_local1, _local2.x, _local2.y, dx, _local3, obj)) {
return(true);
}
return(false);
}
return(false);
return(true);
}
function CollideRayvsMap(out, p0, p1) {
var _local1 = out;
var _local2 = tiles.GetTile_V(p0);
var i0 = _local2.i;
var j0 = _local2.j;
var dx = (p1.x - p0.x);
var dy = (p1.y - p0.y);
var len = Math.sqrt((dx * dx) + (dy * dy));
if (len != 0) {
dx = dx / len;
dy = dy / len;
if (dx < 0) {
var stepX = -1;
var tMaxX = (((_local2.pos.x - _local2.xw) - p0.x) / dx);
var tDeltaX = ((2 * _local2.xw) / (-dx));
} else if (0 < dx) {
var stepX = 1;
var tMaxX = (((_local2.pos.x + _local2.xw) - p0.x) / dx);
var tDeltaX = ((2 * _local2.xw) / dx);
} else {
var stepX = 0;
var tMaxX = 100000000;
var tDeltaX = 0;
}
if (dy < 0) {
var stepY = -1;
var tMaxY = (((_local2.pos.y - _local2.yw) - p0.y) / dy);
var tDeltaY = ((2 * _local2.yw) / (-dy));
} else if (0 < dy) {
var stepY = 1;
var tMaxY = (((_local2.pos.y + _local2.yw) - p0.y) / dy);
var tDeltaY = ((2 * _local2.yw) / dy);
} else {
var stepY = 0;
var tMaxY = 100000000;
var tDeltaY = 0;
}
var X = i0;
var Y = j0;
var ox;
var oy;
var px;
var py;
ox = (px = p0.x);
oy = (py = p0.y);
if (TestRayTile(_local1, px, py, dx, dy, _local2)) {
return(true);
}
static_rend.SetStyle(0, 8947848, 100);
var enter = new Vector2(0, 0);
var exit = new Vector2(ox, oy);
var e;
var n;
var _local3;
var d;
var dl;
var dr;
var vx;
var vy;
var hit_edge = false;
var hit_tile = false;
var done_waiting = false;
var hit_objC = false;
var hit_objD = false;
var tileX;
var tileY;
var objX;
var objY;
var edgeX;
var edgeY;
while (_local2 != null) {
enter.x = exit.x;
enter.y = exit.y;
if (tMaxX < tMaxY) {
exit.x = ox + (tMaxX * dx);
exit.y = oy + (tMaxX * dy);
static_rend.DrawPlus(exit);
if (stepX < 0) {
e = _local2.eL;
n = _local2.nL;
} else {
e = _local2.eR;
n = _local2.nR;
}
if ((!hit_tile) && (0 < e)) {
if (e == EID_SOLID) {
_local1.x = exit.x;
_local1.y = exit.y;
hit_edge = true;
edgeX = _local1.x;
edgeY = _local1.y;
} else if (TestRayTile(_local1, exit.x, exit.y, dx, dy, n)) {
hit_tile = true;
tileX = _local1.x;
tileY = _local1.y;
}
}
tMaxX = tMaxX + tDeltaX;
X = X + stepX;
} else {
exit.x = ox + (tMaxY * dx);
exit.y = oy + (tMaxY * dy);
static_rend.DrawPlus(exit);
if (stepY < 0) {
e = _local2.eU;
n = _local2.nU;
} else {
e = _local2.eD;
n = _local2.nD;
}
if ((!hit_tile) && (0 < e)) {
if (e == EID_SOLID) {
_local1.x = exit.x;
_local1.y = exit.y;
hit_edge = true;
edgeX = _local1.x;
edgeY = _local1.y;
} else if (TestRayTile(_local1, exit.x, exit.y, dx, dy, n)) {
hit_tile = true;
tileX = _local1.x;
tileY = _local1.y;
}
}
tMaxY = tMaxY + tDeltaY;
Y = Y + stepY;
}
if (stepX < 0) {
if (stepY < 0) {
dr = _local2.nR.nU;
dl = _local2.nL.nD;
} else {
dr = _local2.nL.nU;
dl = _local2.nR.nD;
}
} else if (stepY < 0) {
dr = _local2.nR.nD;
dl = _local2.nL.nU;
} else {
dr = _local2.nL.nD;
dl = _local2.nR.nU;
}
vx = enter.x - _local2.pos.x;
vy = enter.y - _local2.pos.y;
if (((vx * (-dy)) + (vy * dx)) < 0) {
d = dl;
} else {
d = dr;
}
_local3 = _local2.next;
var temp_obj = null;
while (_local3 != null) {
if (TestRayObj(_local1, ox, oy, dx, dy, _local3)) {
temp_obj = _local3;
hit_objC = true;
objX = _local1.x;
objY = _local1.y;
break;
}
_local3 = _local3.next;
}
_local3 = d.next;
while (_local3 != null) {
if (TestRayObj(_local1, ox, oy, dx, dy, _local3)) {
temp_obj = _local3;
hit_objD = true;
objX = _local1.x;
objY = _local1.y;
break;
}
_local3 = _local3.next;
}
if (hit_objC || (hit_objD)) {
_local1.x = objX;
_local1.y = objY;
temp_obj.pos.x = temp_obj.pos.x + (dx * 3);
temp_obj.pos.y = temp_obj.pos.y + (dy * 3);
return(true);
}
if (done_waiting) {
_local1.x = tileX;
_local1.y = tileY;
return(true);
}
if (hit_edge) {
_local1.x = edgeX;
_local1.y = edgeY;
return(true);
}
if (hit_tile) {
done_waiting = true;
}
_local2 = n;
}
} else {
return(false);
}
return(false);
}
function CollideRayvsTiles(out, p0, p1) {
var _local1 = tiles.GetTile_V(p0);
var i0 = _local1.i;
var j0 = _local1.j;
var dx = (p1.x - p0.x);
var dy = (p1.y - p0.y);
var len = Math.sqrt((dx * dx) + (dy * dy));
if (len != 0) {
dx = dx / len;
dy = dy / len;
var X = i0;
var Y = j0;
if (dx < 0) {
var stepX = -1;
var tMaxX = (((_local1.pos.x - _local1.xw) - p0.x) / dx);
var tDeltaX = ((2 * _local1.xw) / (-dx));
} else if (0 < dx) {
var stepX = 1;
var tMaxX = (((_local1.pos.x + _local1.xw) - p0.x) / dx);
var tDeltaX = ((2 * _local1.xw) / dx);
} else {
var stepX = 0;
var tMaxX = 100000000;
var tDeltaX = 0;
}
if (dy < 0) {
var stepY = -1;
var tMaxY = (((_local1.pos.y - _local1.yw) - p0.y) / dy);
var tDeltaY = ((2 * _local1.yw) / (-dy));
} else if (0 < dy) {
var stepY = 1;
var tMaxY = (((_local1.pos.y + _local1.yw) - p0.y) / dy);
var tDeltaY = ((2 * _local1.yw) / dy);
} else {
var stepY = 0;
var tMaxY = 100000000;
var tDeltaY = 0;
}
var px = p0.x;
var py = p0.y;
if (TestRayTile(out, px, py, dx, dy, _local1)) {
return(true);
}
var _local2;
var _local3;
while (_local1 != null) {
if (tMaxX < tMaxY) {
if (stepX < 0) {
_local2 = _local1.eL;
_local3 = _local1.nL;
} else {
_local2 = _local1.eR;
_local3 = _local1.nR;
}
if (0 < _local2) {
px = p0.x + (tMaxX * dx);
py = p0.y + (tMaxX * dy);
if (_local2 == EID_SOLID) {
out.x = px;
out.y = py;
return(true);
}
if (TestRayTile(out, px, py, dx, dy, _local3)) {
return(true);
}
}
tMaxX = tMaxX + tDeltaX;
X = X + stepX;
} else {
if (stepY < 0) {
_local2 = _local1.eU;
_local3 = _local1.nU;
} else {
_local2 = _local1.eD;
_local3 = _local1.nD;
}
if (0 < _local2) {
px = p0.x + (tMaxY * dx);
py = p0.y + (tMaxY * dy);
if (_local2 == EID_SOLID) {
out.x = px;
out.y = py;
return(true);
}
if (TestRayTile(out, px, py, dx, dy, _local3)) {
return(true);
}
}
tMaxY = tMaxY + tDeltaY;
Y = Y + stepY;
}
_local1 = _local3;
}
} else {
return(false);
}
return(false);
}
function TestRay_Circle(out, px, py, dx, dy, obj) {
var abx = (px - obj.pos.x);
var aby = (py - obj.pos.y);
var a = ((dx * dx) + (dy * dy));
var b = (2 * ((dx * abx) + (dy * aby)));
var rad = obj.r;
var c = (((abx * abx) + (aby * aby)) - (rad * rad));
var q = ((b * b) - ((4 * a) * c));
if (0 <= q) {
var sq = Math.sqrt(q);
var d = (1 / (2 * a));
var _local1 = ((-b) + sq) * d;
var _local3 = ((-b) - sq) * d;
var _local2;
if (_local3 < 0) {
if (_local1 < 0) {
return(false);
}
_local2 = _local1;
} else if (_local1 < 0) {
_local2 = _local3;
} else if (_local3 < _local1) {
_local2 = _local3;
} else {
_local2 = _local1;
}
out.x = px + (_local2 * dx);
out.y = py + (_local2 * dy);
return(true);
}
return(false);
}
function TestRay_AABB(out, px, py, dx, dy, obj) {
var _local3 = py;
var bx = obj.pos.x;
var _local2 = obj.pos.y;
var xw = obj.xw;
var yw = obj.yw;
var xval;
var yval;
if (px < bx) {
xval = bx - xw;
} else {
xval = bx + xw;
}
if (_local3 < _local2) {
yval = _local2 - yw;
} else {
yval = _local2 + yw;
}
var _local1;
var x0;
var y0;
var x1;
var y1;
if (dx == 0) {
if (dy == 0) {
return(false);
}
x0 = bx - xw;
x1 = bx + xw;
y0 = (y1 = yval);
_local1 = (yval - _local3) / dy;
} else if (dy == 0) {
y0 = _local2 - yw;
y1 = _local2 + yw;
x0 = (x1 = xval);
_local1 = (xval - px) / dx;
} else {
var tX = ((xval - px) / dx);
var tY = ((yval - _local3) / dy);
if (tX < tY) {
x0 = bx - xw;
x1 = bx + xw;
y0 = (y1 = yval);
_local1 = tY;
} else {
y0 = _local2 - yw;
y1 = _local2 + yw;
x0 = (x1 = xval);
_local1 = tX;
}
}
if (0 < _local1) {
var qx = (px + (100 * dx));
var qy = (_local3 + (100 * dy));
var areaPQ0 = (((qx - px) * (y0 - _local3)) - ((x0 - px) * (qy - _local3)));
var areaPQ1 = (((qx - px) * (y1 - _local3)) - ((x1 - px) * (qy - _local3)));
if ((areaPQ0 * areaPQ1) < 0) {
out.x = px + (_local1 * dx);
out.y = _local3 + (_local1 * dy);
return(true);
}
return(false);
}
return(false);
}
function TestRay_Full(out, px, py, dx, dy, t) {
return(false);
}
function TestRay_45Deg(out, px, py, dx, dy, t) {
var _local1 = t;
var sx = _local1.signx;
var sy = _local1.signy;
if (0 <= ((sx * dx) + (sy * dy))) {
return(false);
}
var ux = (sx * _local1.xw);
var _local3 = (-sy) * _local1.yw;
var wx = (_local1.pos.x - px);
var wy = (_local1.pos.y - py);
var _local2 = ((dy * wx) - (dx * wy)) / ((dx * _local3) - (dy * ux));
if (Math.abs(_local2) <= 1) {
out.x = _local1.pos.x + (_local2 * ux);
out.y = _local1.pos.y + (_local2 * _local3);
return(true);
}
return(false);
}
function TestRay_Concave(out, px, py, dx, dy, t) {
var _local1 = dy;
var _local2 = dx;
var _local3 = t;
var sx = _local3.signx;
var sy = _local3.signy;
if (0 <= ((sx * _local2) + (sy * _local1))) {
return(false);
}
var ux = (sx * _local3.xw);
var uy = ((-sy) * _local3.yw);
var wx = (_local3.pos.x - px);
var wy = (_local3.pos.y - py);
var s = (((_local1 * wx) - (_local2 * wy)) / ((_local2 * uy) - (_local1 * ux)));
if (Math.abs(s) <= 1) {
var abx = ((-ux) - wx);
var aby = (uy - wy);
var a = ((_local2 * _local2) + (_local1 * _local1));
var b = (2 * ((_local2 * abx) + (_local1 * aby)));
var rad = (_local3.xw * 2);
var c = (((abx * abx) + (aby * aby)) - (rad * rad));
var q = ((b * b) - ((4 * a) * c));
if (0 <= q) {
var sq = Math.sqrt(q);
var d = (1 / (2 * a));
var u0 = (((-b) + sq) * d);
var u1 = (((-b) - sq) * d);
if (u1 < u0) {
out.x = px + (u0 * _local2);
out.y = py + (u0 * _local1);
} else {
out.x = px + (u1 * _local2);
out.y = py + (u1 * _local1);
}
return(true);
}
return(false);
}
return(false);
}
function TestRay_Convex(out, px, py, dx, dy, t) {
var _local1 = t;
var sx = _local1.signx;
var sy = _local1.signy;
var abx = (px - (_local1.pos.x - (sx * _local1.xw)));
var aby = (py - (_local1.pos.y - (sy * _local1.yw)));
var a = ((dx * dx) + (dy * dy));
var _local2 = 2 * ((dx * abx) + (dy * aby));
var rad = (_local1.xw * 2);
var c = (((abx * abx) + (aby * aby)) - (rad * rad));
var q = ((_local2 * _local2) - ((4 * a) * c));
if (0 <= q) {
var sq = Math.sqrt(q);
var d = (1 / (2 * a));
var u0 = (((-_local2) + sq) * d);
var _local3 = ((-_local2) - sq) * d;
if (_local3 < u0) {
out.x = px + (_local3 * dx);
out.y = py + (_local3 * dy);
} else {
out.x = px + (u0 * dx);
out.y = py + (u0 * dy);
}
return(true);
}
return(false);
}
function TestRay_Half(out, px, py, dx, dy, t) {
var _local1 = t;
var sx = _local1.signx;
var _local3 = _local1.signy;
var wx = (_local1.pos.x - px);
var wy = (_local1.pos.y - py);
if (0 <= ((wx * sx) + (wy * _local3))) {
out.x = px;
out.y = py;
return(true);
}
if (0 <= ((sx * dx) + (_local3 * dy))) {
return(false);
}
var ux = (_local3 * _local1.xw);
var uy = (sx * _local1.yw);
var _local2 = ((dy * wx) - (dx * wy)) / ((dx * uy) - (dy * ux));
if (Math.abs(_local2) <= 1) {
out.x = _local1.pos.x + (_local2 * ux);
out.y = _local1.pos.y + (_local2 * uy);
return(true);
}
return(false);
}
function TestRay_22DegS(out, px, py, dx, dy, t) {
var _local1 = t;
var sx = _local1.sx;
var sy = _local1.sy;
var _local3 = _local1.signx;
var signy = _local1.signy;
var wx = ((_local1.pos.x - (_local3 * _local1.xw)) - px);
var wy = (_local1.pos.y - py);
if ((0 <= (wx * _local3)) && (0 <= (wy * signy))) {
out.x = px;
out.y = py;
return(true);
}
if (0 <= ((sx * dx) + (sy * dy))) {
return(false);
}
wx = wx + (_local3 * _local1.xw);
var vy = ((signy * 0.5) * _local1.yw);
wy = wy - vy;
var ux = ((-signy) * _local1.xw);
var uy = ((0.5 * _local3) * _local1.yw);
var _local2 = ((dy * wx) - (dx * wy)) / ((dx * uy) - (dy * ux));
if (Math.abs(_local2) <= 1) {
out.x = _local1.pos.x + (_local2 * ux);
out.y = (_local1.pos.y - vy) + (_local2 * uy);
return(true);
}
return(false);
}
function TestRay_22DegB(out, px, py, dx, dy, t) {
var _local1 = t;
var sx = _local1.sx;
var sy = _local1.sy;
var signx = _local1.signx;
var signy = _local1.signy;
var wx = (_local1.pos.x - px);
var _local3 = _local1.pos.y - py;
if (((wx * signx) <= 0) && (0 <= (_local3 * signy))) {
out.x = px;
out.y = py;
return(true);
}
if (0 <= ((sx * dx) + (sy * dy))) {
return(false);
}
var vy = ((signy * 0.5) * _local1.yw);
_local3 = _local3 + vy;
var ux = ((-signy) * _local1.xw);
var uy = ((0.5 * signx) * _local1.yw);
var _local2 = ((dy * wx) - (dx * _local3)) / ((dx * uy) - (dy * ux));
if (Math.abs(_local2) <= 1) {
out.x = _local1.pos.x + (_local2 * ux);
out.y = (_local1.pos.y + vy) + (_local2 * uy);
return(true);
}
return(false);
}
function TestRay_67DegS(out, px, py, dx, dy, t) {
var _local1 = t;
var sx = _local1.sx;
var sy = _local1.sy;
var signx = _local1.signx;
var _local3 = _local1.signy;
var wx = (_local1.pos.x - px);
var wy = ((_local1.pos.y - (_local3 * _local1.yw)) - py);
if ((0 <= (wx * signx)) && (0 <= (wy * _local3))) {
out.x = px;
out.y = py;
return(true);
}
if (0 <= ((sx * dx) + (sy * dy))) {
return(false);
}
wy = wy + (_local3 * _local1.yw);
var vx = ((signx * 0.5) * _local1.xw);
wx = wx - vx;
var ux = ((-0.5 * _local3) * _local1.xw);
var uy = (signx * _local1.yw);
var _local2 = ((dy * wx) - (dx * wy)) / ((dx * uy) - (dy * ux));
if (Math.abs(_local2) <= 1) {
out.x = (_local1.pos.x - vx) + (_local2 * ux);
out.y = _local1.pos.y + (_local2 * uy);
return(true);
}
return(false);
}
function TestRay_67DegB(out, px, py, dx, dy, t) {
var _local1 = t;
var sx = _local1.sx;
var sy = _local1.sy;
var signx = _local1.signx;
var signy = _local1.signy;
var _local3 = _local1.pos.x - px;
var wy = (_local1.pos.y - py);
if (((wy * signy) <= 0) && (0 <= (_local3 * signx))) {
out.x = px;
out.y = py;
return(true);
}
if (0 <= ((sx * dx) + (sy * dy))) {
return(false);
}
var vx = ((signx * 0.5) * _local1.xw);
_local3 = _local3 + vx;
var ux = ((-0.5 * signy) * _local1.xw);
var uy = (signx * _local1.yw);
var _local2 = ((dy * _local3) - (dx * wy)) / ((dx * uy) - (dy * ux));
if (Math.abs(_local2) <= 1) {
out.x = (_local1.pos.x + vx) + (_local2 * ux);
out.y = _local1.pos.y + (_local2 * uy);
return(true);
}
return(false);
}
function TestRayTile(out, px, py, dx, dy, t) {
var _local1 = t;
if (0 < _local1.ID) {
return(TestRay_Tile[_local1.CTYPE](out, px, py, dx, dy, _local1));
}
return(false);
}
TestRay_Tile = new Object();
TestRay_Tile[CTYPE_FULL] = TestRay_Full;
TestRay_Tile[CTYPE_45DEG] = TestRay_45Deg;
TestRay_Tile[CTYPE_CONCAVE] = TestRay_Concave;
TestRay_Tile[CTYPE_CONVEX] = TestRay_Convex;
TestRay_Tile[CTYPE_22DEGs] = TestRay_22DegS;
TestRay_Tile[CTYPE_22DEGb] = TestRay_22DegB;
TestRay_Tile[CTYPE_67DEGs] = TestRay_67DegS;
TestRay_Tile[CTYPE_67DEGb] = TestRay_67DegB;
TestRay_Tile[CTYPE_HALF] = TestRay_Half;
function TestRayObj(out, px, py, dx, dy, obj) {
var _local1 = obj;
if (_local1.OTYPE == OTYPE_AABB) {
return(TestRay_AABB(out, px, py, dx, dy, _local1));
}
return(TestRay_Circle(out, px, py, dx, dy, _local1));
}
function ObjectManager() {
this.InitDataStructs();
}
ObjectManager.prototype.InitDataStructs = function () {
var _local1 = this;
_local1.objList = new Object();
_local1.objArray = new Array();
_local1.numObjs = 0;
_local1.nextID = 0;
_local1.gridList = new Object();
_local1.gridNum = 0;
_local1.updateList = new Object();
_local1.updateNum = 0;
_local1.drawList = new Object();
_local1.drawNum = 0;
_local1.thinkList = new Object();
_local1.thinkNum = 0;
_local1.curThinker = null;
_local1.thinkRate = 8;
_local1.thinkTimer = 0;
};
ObjectManager.prototype.Register = function (obj) {
var _local1 = obj;
var _local2 = this;
_local1.UID = _local2.nextID++;
_local2.objList[_local1.UID] = _local1;
_local2.objArray.push(_local1);
_local2.numObjs++;
};
ObjectManager.prototype.AddToGrid = function (obj) {
var _local1 = obj;
_local1.cell = tiles.GetTile_V(_local1.pos);
_local1.cell.InsertObj(_local1);
this.gridList[_local1.UID] = _local1;
this.gridNum++;
};
ObjectManager.prototype.RemoveFromGrid = function (obj) {
var _local1 = obj;
var _local2 = this;
if (_local2.gridList[_local1.UID] != null) {
_local1.cell.RemoveObj(_local1);
delete _local2.gridList[_local1.UID];
_local2.gridNum--;
}
};
ObjectManager.prototype.Moved = function (obj) {
var _local1 = obj;
var _local2 = _local1.cell;
n = tiles.GetTile_V(_local1.pos);
if (_local2 != n) {
_local2.RemoveObj(_local1);
_local1.cell = n;
n.InsertObj(_local1);
return(true);
}
return(false);
};
ObjectManager.prototype.GetObj = function (ID) {
var _local1 = ID;
var _local2 = this.objList[_local1];
if (_local2 == null) {
} else {
return(this.objList[_local1]);
}
return(undefined);
};
ObjectManager.prototype.GetObjType = function (obj) {
return(obj.OBJ_TYPE);
};
ObjectManager.prototype.IdleObjectsAfterDeath = function () {
var _local1 = this;
for (var _local2 in _local1.objList) {
_local1.objList[_local2].IdleAfterDeath();
}
};
ObjectManager.prototype.DumpThinkList = function () {
var _local3 = "THINK LIST:\n";
var head = this.curThinker;
var startID = head.UID;
_local3 = _local3 + ("head: " + startID);
_local3 = _local3 + (((((newline + head.prevThinker.UID) + "<-") + startID) + "->") + head.nextThinker.UID);
if (this.thinkNum == 0) {
_local3 = _local3 + "no thinkers!";
return(_local3);
}
var _local2 = " ";
var _local1 = head.nextThinker;
while (_local1.UID != startID) {
_local3 = _local3 + ((((((newline + _local2) + _local1.prevThinker.UID) + "<-") + _local1.UID) + "->") + _local1.nextThinker.UID);
_local1 = _local1.nextThinker;
_local2 = _local2 + " ";
}
return(_local3);
};
ObjectManager.prototype.Tick = function () {
var _local1 = this;
if (0 < _local1.updateNum) {
for (var _local2 in _local1.updateList) {
_local1.updateList[_local2].Update();
}
}
if (0 < _local1.thinkNum) {
if (_local1.thinkRate < _local1.thinkTimer) {
_local1.thinkTimer = 0;
_local1.curThinker.Think();
_local1.curThinker = _local1.curThinker.nextThinker;
} else {
_local1.thinkTimer++;
}
}
};
ObjectManager.prototype.StartUpdate = function (obj) {
var _local1 = obj;
var _local2 = this;
if (_local2.updateList[_local1.UID] == null) {
_local2.updateList[_local1.UID] = _local1;
_local2.updateNum++;
}
};
ObjectManager.prototype.EndUpdate = function (obj) {
var _local1 = this;
if (_local1.updateList[obj.UID] == null) {
} else {
delete _local1.updateList[obj.UID];
_local1.updateNum--;
}
};
ObjectManager.prototype.StartDraw = function (obj) {
var _local1 = obj;
var _local2 = this;
if (_local2.drawList[_local1.UID] == null) {
_local2.drawList[_local1.UID] = _local1;
_local2.drawNum++;
}
};
ObjectManager.prototype.EndDraw = function (obj) {
var _local1 = this;
if (_local1.drawList[obj.UID] == null) {
} else {
delete _local1.drawList[obj.UID];
_local1.drawNum--;
}
};
ObjectManager.prototype.StartThink = function (obj) {
var _local1 = obj;
var _local2 = this;
if (_local2.thinkList[_local1.UID] == null) {
_local2.thinkList[_local1.UID] = _local1;
_local2.thinkNum++;
if (_local2.thinkNum == 1) {
_local2.curThinker = _local1;
_local1.nextThinker = _local1;
_local1.prevThinker = _local1;
} else {
_local1.nextThinker = _local2.curThinker;
_local1.prevThinker = _local2.curThinker.prevThinker;
_local1.prevThinker.nextThinker = _local1;
_local1.nextThinker.prevThinker = _local1;
_local2.curThinker = _local1;
}
}
};
ObjectManager.prototype.EndThink = function (obj) {
var _local1 = obj;
var _local2 = this;
if (_local2.thinkList[_local1.UID] == null) {
} else {
delete _local2.thinkList[_local1.UID];
_local2.thinkNum--;
if (_local2.thinkNum <= 0) {
_local1.nextThinker = null;
_local1.prevThinker = null;
_local2.curThinker = null;
_local2.thinkNum = 0;
} else {
_local1.nextThinker.prevThinker = _local1.prevThinker;
_local1.prevThinker.nextThinker = _local1.nextThinker;
if (_local1 == _local2.curThinker) {
_local2.curThinker = _local1.nextThinker;
}
_local1.nextThinker = null;
_local1.prevThinker = null;
}
}
};
ObjectManager.prototype.Clear = function () {
var _local1 = this;
for (var _local2 in _local1.thinkList) {
_local1.EndThink(_local1.thinkList[_local2]);
}
for (var _local2 in _local1.gridList) {
_local1.RemoveFromGrid(_local1.gridList[_local2]);
}
for (var _local2 in _local1.updateList) {
_local1.EndUpdate(_local1.updateList[_local2]);
}
for (var _local2 in _local1.drawList) {
_local1.EndDraw(_local1.drawList[_local2]);
}
for (var _local2 in _local1.objArray) {
delete _local1.objArray[_local2];
}
for (var _local2 in _local1.objList) {
_local1.objList[_local2].next = null;
_local1.objList[_local2].prev = null;
_local1.objList[_local2].nextThinker = null;
_local1.objList[_local2].prevThinker = null;
_local1.objList[_local2].UnInit();
_local1.objList[_local2].Destruct();
delete _local1.objList[_local2];
}
tiles.ClearGrid();
delete _local1.objList;
delete _local1.objArray;
delete _local1.updateList;
delete _local1.drawList;
delete _local1.gridList;
delete _local1.thinkList;
delete _local1.curThinker;
_local1.InitDataStructs();
};
ObjectManager.prototype.Draw = function () {
var _local1 = this;
for (var _local2 in _local1.drawList) {
_local1.drawList[_local2].Draw();
}
};
OBJTYPE_GOLD = 0;
OBJTYPE_BOUNCEBLOCK = 1;
OBJTYPE_LAUNCHPAD = 2;
OBJTYPE_TURRET = 3;
OBJTYPE_FLOORGUARD = 4;
OBJTYPE_PLAYER = 5;
OBJTYPE_DRONE = 6;
OBJTYPE_ONEWAYPLATFORM = 7;
OBJTYPE_THWOMP = 8;
OBJTYPE_TESTDOOR = 9;
OBJTYPE_HOMINGLAUNCHER = 10;
OBJTYPE_EXIT = 11;
OBJTYPE_MINE = 12;
ObjectManager.prototype.GetObjectStates = function () {
var _local3 = this;
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.objArray.length) {
_local2 = _local2 + _local3.objArray[_local1].OBJ_TYPE;
_local2 = _local2 + OBJTYPE_SEPERATION_CHAR;
_local2 = _local2 + _local3.objArray[_local1].DumpInitData();
_local2 = _local2 + OBJECT_SEPERATION_CHAR;
_local1++;
}
if (0 < _local2.length) {
var lastD = _local2.lastIndexOf(OBJECT_SEPERATION_CHAR);
_local2 = _local2.substring(0, lastD);
}
return(_local2);
};
ObjectManager.prototype.SpawnGameObject = function (OBJ_TYPE, params) {
var _local2 = OBJ_TYPE;
var _local1 = this.BuildObject(_local2);
_local1.OBJ_TYPE = _local2;
_local1.Init(params);
return(_local1.UID);
};
ObjectManager.prototype.BuildObject = function (OBJ_TYPE) {
var _local1 = OBJ_TYPE;
if (_local1 == OBJTYPE_PLAYER) {
var _local2 = new PlayerObject();
return(_local2);
}
if (_local1 == OBJTYPE_GOLD) {
var _local2 = new GoldObject();
return(_local2);
}
if (_local1 == OBJTYPE_BOUNCEBLOCK) {
var _local2 = new BounceBlockObject();
return(_local2);
}
if (_local1 == OBJTYPE_LAUNCHPAD) {
var _local2 = new LaunchPadObject();
return(_local2);
}
if (_local1 == OBJTYPE_TURRET) {
var _local2 = new TurretObject();
return(_local2);
}
if (_local1 == OBJTYPE_FLOORGUARD) {
var _local2 = new FloorGuardObject();
return(_local2);
}
if (_local1 == OBJTYPE_DRONE) {
var _local2 = new DroneObject();
return(_local2);
}
if (_local1 == OBJTYPE_ONEWAYPLATFORM) {
var _local2 = new OneWayPlatformObject();
return(_local2);
}
if (_local1 == OBJTYPE_THWOMP) {
var _local2 = new ThwompObject();
return(_local2);
}
if (_local1 == OBJTYPE_TESTDOOR) {
var _local2 = new TestDoorObject();
return(_local2);
}
if (_local1 == OBJTYPE_HOMINGLAUNCHER) {
var _local2 = new HomingLauncherObject();
return(_local2);
}
if (_local1 == OBJTYPE_EXIT) {
var _local2 = new ExitObject();
return(_local2);
}
if (_local1 == OBJTYPE_MINE) {
var _local2 = new MineObject();
return(_local2);
}
return(undefined);
};
function ExitObject() {
var _local1 = this;
_local1.name = "exit";
_local1.pos = new Vector2(24, 55);
_local1.trigger = new Object();
_local1.trigger.pos = new Vector2(87, 39);
_local1.trigger.r = tiles.xw * 0.5;
_local1.isOpen = false;
_local1.r = tiles.xw;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugExitMC", LAYER_WALLS);
_local1.mc._visible = false;
_local1.trigger.mc = gfx.CreateSprite("debugExitTriggerMC", LAYER_WALLS);
_local1.trigger.mc._visible = false;
}
TREASURE_RADIUS = 4;
ExitObject.prototype.Destruct = function () {
var _local1 = this;
gfx.DestroyMC(_local1.mc);
delete _local1.mc;
gfx.DestroyMC(_local1.trigger.mc);
delete _local1.trigger.mc;
delete _local1.trigger;
};
ExitObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 4) {
} else {
_local1.pos.x = _local2[0];
_local1.pos.y = _local2[1];
_local1.trigger.pos.x = _local2[2];
_local1.trigger.pos.y = _local2[3];
_local1.trigger.exit = _local1;
_local1.isOpen = false;
_local1.mc._xscale = (_local1.mc._yscale = _local1.r * 2);
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
_local1.mc.gotoAndStop("exit_closed");
_local1.mc._visible = true;
_local1.trigger.mc._xscale = (_local1.trigger.mc._yscale = _local1.trigger.r * 2);
_local1.trigger.mc._x = _local1.trigger.pos.x;
_local1.trigger.mc._y = _local1.trigger.pos.y;
_local1.trigger.mc.gotoAndStop("exit_closed");
_local1.trigger.mc._visible = true;
_local1.trigger.TestVsPlayer = _local1.TestVsPlayer_Trigger;
_local1.TestVsPlayer = _local1.TestVsPlayer_Exit;
objects.AddToGrid(_local1.trigger);
objects.Moved(_local1.trigger);
}
};
ExitObject.prototype.UnInit = function () {
objects.RemoveFromGrid(this);
objects.RemoveFromGrid(this.trigger);
};
ExitObject.prototype.DumpInitData = function () {
var _local1 = this;
var _local2 = (((((("" + _local1.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local1.pos.y) + OBJPARAM_SEPERATION_CHAR) + _local1.trigger.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local1.trigger.pos.y;
return(_local2);
};
ExitObject.prototype.IdleAfterDeath = function () {
objects.RemoveFromGrid(this);
objects.RemoveFromGrid(this.trigger);
};
ExitObject.prototype.TestVsPlayer_Exit = function (guy) {
var _local1 = this;
if (_local1.isOpen) {
var p = guy.pos;
var _local3 = _local1.pos.x - guy.pos.x;
var _local2 = _local1.pos.y - guy.pos.y;
if (Math.sqrt((_local3 * _local3) + (_local2 * _local2)) < (_local1.r + guy.r)) {
_local1.PlayerHitExit();
}
}
};
ExitObject.prototype.TestVsPlayer_Trigger = function (guy) {
var _local1 = this;
if (!_local1.exit.isOpen) {
var p = guy.pos;
var _local3 = _local1.pos.x - guy.pos.x;
var _local2 = _local1.pos.y - guy.pos.y;
if (Math.sqrt((_local3 * _local3) + (_local2 * _local2)) < (_local1.r + guy.r)) {
_local1.exit.PlayerHitTrigger();
}
}
};
ExitObject.prototype.PlayerHitExit = function () {
player.Celebrate();
App_LevelPassedEvent();
};
ExitObject.prototype.PlayerHitTrigger = function () {
var _local1 = this;
_local1.mc.gotoAndPlay("exit_opening");
_local1.isOpen = true;
_local1.trigger.mc.gotoAndStop("exit_open");
objects.RemoveFromGrid(_local1.trigger);
objects.AddToGrid(_local1);
objects.Moved(_local1);
};
function GoldObject() {
var _local1 = this;
_local1.name = "gold";
_local1.pos = new Vector2(14, 65);
_local1.isCollected = false;
_local1.r = tiles.xw * 0.5;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugGoldMC", LAYER_OBJECTS);
_local1.mc._visible = false;
}
GoldObject.prototype.Destruct = function () {
gfx.DestroyMC(this.mc);
delete this.mc;
};
GoldObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 2) {
} else {
_local1.pos.x = _local2[0];
_local1.pos.y = _local2[1];
_local1.isCollected = false;
_local1.mc._xscale = (_local1.mc._yscale = _local1.r);
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
_local1.mc._visible = true;
_local1.mc.gotoAndStop("NOT_COLLECTED");
objects.AddToGrid(_local1);
objects.Moved(_local1);
}
};
GoldObject.prototype.UnInit = function () {
objects.RemoveFromGrid(this);
};
GoldObject.prototype.DumpInitData = function () {
var _local1 = (("" + this.pos.x) + OBJPARAM_SEPERATION_CHAR) + this.pos.y;
return(_local1);
};
GoldObject.prototype.IdleAfterDeath = function () {
if (!this.isCollected) {
objects.RemoveFromGrid(this);
}
};
GoldObject.prototype.TestVsPlayer = function (guy) {
var _local3 = this;
var p = guy.pos;
var _local2 = _local3.pos.x - guy.pos.x;
var _local1 = _local3.pos.y - guy.pos.y;
if (Math.sqrt((_local2 * _local2) + (_local1 * _local1)) < (_local3.r + guy.r)) {
_local3.Dissapear();
}
};
GoldObject.prototype.Dissapear = function () {
var _local1 = this;
_local1.isCollected = true;
objects.RemoveFromGrid(_local1);
_local1.mc.gotoAndPlay("COLLECTED");
game.GiveBonusTime();
};
function BounceBlockObject() {
var _local1 = this;
_local1.name = "bounce block";
_local1.xw = tiles.xw * 0.8;
_local1.yw = tiles.yw * 0.8;
_local1.pos = new Vector2(10, 20);
_local1.oldpos = new Vector2(30, 40);
_local1.anchor = new Vector2(50, 60);
_local1.stiff = 0.05;
_local1.mass = 0.2;
_local1.ASLEEP = true;
_local1.sleepThreshold = 40;
_local1.sleepTimer = 0;
_local1.touchingObj = null;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugBounceBlockMC", LAYER_OBJECTS);
_local1.mc._visible = false;
}
BounceBlockObject.prototype.Destruct = function () {
gfx.DestroyMC(this.mc);
delete this.mc;
};
BounceBlockObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 2) {
} else {
_local1.pos.x = (_local1.oldpos.x = (_local1.anchor.x = _local2[0]));
_local1.pos.y = (_local1.oldpos.y = (_local1.anchor.y = _local2[1]));
_local1.mc._xscale = 2 * _local1.xw;
_local1.mc._yscale = 2 * _local1.yw;
_local1.Draw();
_local1.mc._visible = true;
objects.AddToGrid(_local1);
objects.Moved(_local1);
}
};
BounceBlockObject.prototype.UnInit = function () {
var _local1 = this;
objects.RemoveFromGrid(_local1);
objects.EndDraw(_local1);
objects.EndUpdate(_local1);
objects.EndThink(_local1);
};
BounceBlockObject.prototype.DumpInitData = function () {
var _local1 = (("" + this.anchor.x) + OBJPARAM_SEPERATION_CHAR) + this.anchor.y;
return(_local1);
};
BounceBlockObject.prototype.IdleAfterDeath = function () {
objects.RemoveFromGrid(this);
};
BounceBlockObject.prototype.Draw = function () {
var _local1 = this;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
};
BounceBlockObject.prototype.TestVsPlayer = function (guy) {
var _local1 = this;
var p = guy.pos;
var dy = (p.y - _local1.pos.y);
var _local2 = (_local1.yw + guy.yw) - Math.abs(dy);
if (0 < _local2) {
var dx = (p.x - _local1.pos.x);
var _local3 = (_local1.xw + guy.xw) - Math.abs(dx);
if (0 < _local3) {
if (_local2 < _local3) {
if (dy < 0) {
var ny = -1;
_local2 = _local2 * -1;
} else {
var ny = 1;
}
_local1.pos.y = _local1.pos.y - ((1 - _local1.mass) * _local2);
guy.ReportCollisionVsObject(0, _local1.mass * _local2, 0, ny, _local1);
} else {
if (dx < 0) {
_local3 = _local3 * -1;
var nx = -1;
} else {
var nx = 1;
}
_local1.pos.x = _local1.pos.x - ((1 - _local1.mass) * _local3);
guy.ReportCollisionVsObject(_local1.mass * _local3, 0, nx, 0, _local1);
}
_local1.sleepTimer = 0;
if (_local1.ASLEEP) {
_local1.Wake();
}
_local1.touchingObj = guy;
return;
}
} else {
_local1.touchingOBj = null;
}
};
BounceBlockObject.prototype.Wake = function () {
var _local1 = this;
objects.StartUpdate(_local1);
objects.StartThink(_local1);
objects.StartDraw(_local1);
_local1.ASLEEP = false;
};
BounceBlockObject.prototype.Sleep = function () {
var _local1 = this;
objects.EndUpdate(_local1);
objects.EndThink(_local1);
objects.EndDraw(_local1);
_local1.ASLEEP = true;
_local1.oldpos.x = _local1.pos.x;
_local1.oldpos.y = _local1.pos.y;
};
BounceBlockObject.prototype.Think = function () {
var _local1 = this;
if (_local1.sleepThreshold < _local1.sleepTimer) {
_local1.Sleep();
}
};
BounceBlockObject.prototype.Update = function () {
var _local2 = this;
var _local1 = _local2.pos;
var _local3 = _local2.oldpos;
var ox;
var oy;
var px;
var py;
ox = _local3.x;
oy = _local3.y;
px = (_local3.x = _local1.x);
py = (_local3.y = _local1.y);
_local1.x = _local1.x + (0.99 * (px - ox));
_local1.y = _local1.y + (0.99 * (py - oy));
var dx = (_local2.anchor.x - _local1.x);
var dy = (_local2.anchor.y - _local1.y);
if (0 < ((dx * dx) + (dy * dy))) {
_local1.x = _local1.x + (dx * _local2.stiff);
_local1.y = _local1.y + (dy * _local2.stiff);
if (_local2.touchingObj != null) {
}
}
_local2.sleepTimer++;
};
function LaunchPadObject() {
var _local1 = this;
_local1.name = "launch pad";
_local1.pos = new Vector2(54, 23);
_local1.nx = 0;
_local1.ny = 1;
_local1.r = tiles.xw * 0.5;
_local1.strength = tiles.xw * 0.428571428571429;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugLaunchPadMC", LAYER_WALLS);
_local1.mc._visible = false;
}
LaunchPadObject.prototype.Destruct = function () {
gfx.DestroyMC(this.mc);
delete this.mc;
};
LaunchPadObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 4) {
} else {
_local1.pos.x = _local2[0];
_local1.pos.y = _local2[1];
_local1.nx = _local2[2];
_local1.ny = _local2[3];
_local1.mc._xscale = (_local1.mc._yscale = 2.5 * _local1.r);
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
_local1.mc._visible = true;
_local1.mc.gotoAndStop("launch_idle");
if (_local1.nx < 0) {
if (_local1.ny < 0) {
_local1.mc._rotation = -45;
} else if (0 < _local1.ny) {
_local1.mc._rotation = -135;
} else {
_local1.mc._rotation = -90;
}
} else if (0 < _local1.nx) {
if (_local1.ny < 0) {
_local1.mc._rotation = 45;
} else if (0 < _local1.ny) {
_local1.mc._rotation = 135;
} else {
_local1.mc._rotation = 90;
}
} else if (_local1.ny < 0) {
_local1.mc._rotation = 0;
} else if (0 < _local1.ny) {
_local1.mc._rotation = 180;
}
objects.AddToGrid(_local1);
objects.Moved(_local1);
}
};
LaunchPadObject.prototype.UnInit = function () {
objects.RemoveFromGrid(this);
};
LaunchPadObject.prototype.DumpInitData = function () {
var _local1 = this;
var _local2 = (((((("" + _local1.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local1.pos.y) + OBJPARAM_SEPERATION_CHAR) + _local1.nx) + OBJPARAM_SEPERATION_CHAR) + _local1.ny;
return(_local2);
};
LaunchPadObject.prototype.IdleAfterDeath = function () {
objects.RemoveFromGrid(this);
};
LaunchPadObject.prototype.TestVsPlayer = function (guy) {
var _local1 = this;
var _local3 = guy;
var p = _local3.pos;
var dx = (_local1.pos.x - _local3.pos.x);
var dy = (_local1.pos.y - _local3.pos.y);
var _local2 = _local3.r;
if (Math.sqrt((dx * dx) + (dy * dy)) < (_local1.r + _local2)) {
var tx = (_local1.pos.x - (p.x - (_local1.nx * _local2)));
var ty = (_local1.pos.y - (p.y - (_local1.ny * _local2)));
var dp = ((tx * _local1.nx) + (ty * _local1.ny));
if (0 <= dp) {
var mult = 1;
if (_local1.ny < 0) {
mult = mult + Math.abs(_local1.ny);
}
_local1.mc.gotoAndPlay("launch_triggered");
_local3.Launch(_local1.nx * _local1.strength, (_local1.ny * _local1.strength) * mult);
}
}
};
function TestDoorObject() {
var _local1 = this;
_local1.name = "door";
_local1.vert = 0;
_local1.doorI = 2;
_local1.doorJ = 3;
_local1.doorpos = new Vector2(29, 19);
_local1.doorsize = 10;
_local1.doorcell_N = 0;
_local1.doorcell_P = 0;
_local1.pos = new Vector2(32, 84);
_local1.r = tiles.xw * 0.833333333333333;
_local1.deltaI = 0;
_local1.deltaJ = 0;
_local1.isOpen = false;
_local1.doortimer = 0;
_local1.maxtimer = 5;
_local1.isLocked = false;
_local1.isTrap = false;
_local1.openStateFront = EID_OFF;
_local1.openStateBack = EID_OFF;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugTestDoorMC", LAYER_WALLS);
_local1.mc._visible = false;
_local1.mc.gotoAndStop("closed_Trek");
_local1.trigMC = gfx.CreateSprite("debugDoorTriggerMC", LAYER_WALLS);
_local1.trigMC.gotoAndStop("exit_closed");
_local1.trigMC._visible = false;
}
TestDoorObject.prototype.Destruct = function () {
var _local1 = this;
gfx.DestroyMC(_local1.mc);
delete _local1.mc;
gfx.DestroyMC(_local1.trigMC);
delete _local1.trigMC;
};
TestDoorObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 9) {
} else {
_local1.deltaI = _local2[7];
_local1.deltaJ = _local2[8];
_local1.doorI = _local2[4] + _local1.deltaI;
_local1.doorJ = _local2[5] + _local1.deltaJ;
_local1.vert = _local2[2];
_local1.isTrap = Boolean(_local2[3]);
_local1.isLocked = Boolean(_local2[6]);
_local1.doorcell_N = tiles.GetTile_I(_local1.doorI, _local1.doorJ);
_local1.doorpos.x = _local1.doorcell_N.pos.x;
_local1.doorpos.y = _local1.doorcell_N.pos.y;
if (_local1.vert == 1) {
_local1.doorpos.y = _local1.doorpos.y + _local1.doorcell_N.yw;
_local1.doorsize = _local1.doorcell_N.xw;
_local1.doorcell_P = _local1.doorcell_N.nD;
_local1.openStateFront = _local1.doorcell_N.eD;
_local1.openStateBack = _local1.doorcell_P.eU;
} else {
_local1.doorpos.x = _local1.doorpos.x + _local1.doorcell_N.xw;
_local1.doorsize = _local1.doorcell_N.yw;
_local1.doorcell_P = _local1.doorcell_N.nR;
_local1.openStateFront = _local1.doorcell_N.eR;
_local1.openStateBack = _local1.doorcell_P.eL;
}
if (_local1.isLocked) {
_local1.openFrameLabel = "opening_Lock";
_local1.closedFrameLabel = "closed_Lock";
_local1.mc.gotoAndStop("closed_Lock");
_local1.pos.x = _local2[0];
_local1.pos.y = _local2[1];
_local1.r = tiles.xw * 0.416666666666667;
_local1.isTrap = false;
_local1.isOpen = false;
_local1.isLocked = true;
_local1.trigMC._x = _local1.pos.x;
_local1.trigMC._y = _local1.pos.y;
_local1.trigMC._xscale = (_local1.trigMC._yscale = _local1.r * 1.5);
_local1.trigMC.gotoAndStop("exit_closed");
_local1.trigMC._visible = true;
} else if (_local1.isTrap) {
_local1.openFrameLabel = "open_Trap";
_local1.closedFrameLabel = "closing_Trap";
_local1.mc.gotoAndStop("open_Trap");
_local1.pos.x = _local2[0];
_local1.pos.y = _local2[1];
_local1.r = tiles.xw * 0.416666666666667;
_local1.isOpen = true;
_local1.isLocked = false;
_local1.isTrap = true;
_local1.trigMC._x = _local1.pos.x;
_local1.trigMC._y = _local1.pos.y;
_local1.trigMC._xscale = (_local1.trigMC._yscale = _local1.r * 1);
_local1.trigMC.gotoAndStop("exit_closed");
_local1.trigMC._visible = true;
} else {
_local1.openFrameLabel = "opening_Trek";
_local1.closedFrameLabel = "closing_Trek";
_local1.pos.x = _local1.doorpos.x;
_local1.pos.y = _local1.doorpos.y;
_local1.r = tiles.xw * 0.833333333333333;
_local1.isOpen = false;
_local1.isLocked = false;
_local1.isTrap = false;
_local1.mc.gotoAndStop("closed_Trek");
}
objects.AddToGrid(_local1);
objects.Moved(_local1);
_local1.mc._xscale = (_local1.mc._yscale = 2 * _local1.doorcell_N.yw);
_local1.mc._x = _local1.doorcell_N.pos.x;
_local1.mc._y = _local1.doorcell_N.pos.y;
if (_local1.vert == 1) {
if (_local1.deltaJ == 0) {
_local1.mc._rotation = 90;
_local1.mc._y = _local1.mc._y - 1;
} else {
_local1.mc._y = _local1.mc._y + (_local1.doorcell_N.yw * 2);
_local1.mc._rotation = 270;
}
} else if (_local1.deltaI == 0) {
_local1.mc._rotation = 0;
_local1.mc._x = _local1.mc._x - 1;
} else {
_local1.mc._x = _local1.mc._x + (_local1.doorcell_N.xw * 2);
_local1.mc._rotation = 180;
}
_local1.mc._visible = true;
_local1.UpdateEdges();
}
};
TestDoorObject.prototype.UnInit = function () {
var _local1 = this;
if (_local1.vert == 0) {
_local1.doorcell_N.eR = _local1.openStateFront;
_local1.doorcell_P.eL = _local1.openStateBack;
} else {
_local1.doorcell_N.eD = _local1.openStateFront;
_local1.doorcell_P.eU = _local1.openStateBack;
}
objects.RemoveFromGrid(_local1);
objects.EndUpdate(_local1);
};
TestDoorObject.prototype.DumpInitData = function () {
var _local1 = this;
var _local2 = (((((((((((((((("" + _local1.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local1.pos.y) + OBJPARAM_SEPERATION_CHAR) + _local1.vert) + OBJPARAM_SEPERATION_CHAR) + Number(_local1.isTrap)) + OBJPARAM_SEPERATION_CHAR) + (_local1.doorI - _local1.deltaI)) + OBJPARAM_SEPERATION_CHAR) + (_local1.doorJ - _local1.deltaJ)) + OBJPARAM_SEPERATION_CHAR) + Number(_local1.isLocked)) + OBJPARAM_SEPERATION_CHAR) + _local1.deltaI) + OBJPARAM_SEPERATION_CHAR) + _local1.deltaJ;
return(_local2);
};
TestDoorObject.prototype.UpdateEdges = function () {
var _local1 = this;
if (_local1.vert == 0) {
if (_local1.isOpen) {
_local1.doorcell_N.eR = _local1.openStateFront;
_local1.doorcell_P.eL = _local1.openStateBack;
} else {
_local1.doorcell_N.eR = EID_SOLID;
_local1.doorcell_P.eL = EID_SOLID;
}
} else if (_local1.isOpen) {
_local1.doorcell_N.eD = _local1.openStateFront;
_local1.doorcell_P.eU = _local1.openStateBack;
} else {
_local1.doorcell_N.eD = EID_SOLID;
_local1.doorcell_P.eU = EID_SOLID;
}
};
TestDoorObject.prototype.Draw = function () {
var _local1 = this;
if (_local1.isOpen) {
_local1.mc.gotoAndPlay(_local1.openFrameLabel);
_local1.trigMC.gotoAndStop("exit_open");
} else {
_local1.mc.gotoAndPlay(_local1.closedFrameLabel);
_local1.trigMC.gotoAndStop("exit_closed");
}
};
TestDoorObject.prototype.IdleAfterDeath = function () {
objects.RemoveFromGrid(this);
};
TestDoorObject.prototype.TestVsPlayer = function (guy) {
var _local1 = this;
var p = guy.pos;
var _local3 = _local1.pos.x - guy.pos.x;
var _local2 = _local1.pos.y - guy.pos.y;
if (Math.sqrt((_local3 * _local3) + (_local2 * _local2)) < (_local1.r + guy.r)) {
_local1.doortimer = 0;
if (_local1.isTrap) {
_local1.Close();
objects.RemoveFromGrid(_local1);
_local1.TestVsPlayer = null;
} else if (!_local1.isOpen) {
_local1.Open();
}
}
};
TestDoorObject.prototype.Open = function () {
var _local1 = this;
_local1.isOpen = true;
_local1.UpdateEdges();
_local1.Draw();
if ((!_local1.isTrap) && (!_local1.isLocked)) {
objects.StartUpdate(_local1);
}
};
TestDoorObject.prototype.Close = function () {
var _local1 = this;
objects.EndUpdate(_local1);
_local1.isOpen = false;
_local1.UpdateEdges();
_local1.Draw();
};
TestDoorObject.prototype.Update = function () {
var _local1 = this;
_local1.doortimer++;
if (_local1.maxtimer < _local1.doortimer) {
_local1.Close();
}
};
function OneWayPlatformObject() {
var _local1 = this;
_local1.name = "oneway block";
_local1.xw = tiles.xw;
_local1.yw = tiles.xw;
_local1.pos = new Vector2(10, 20);
_local1.dir = new Vector2(0, 1);
_local1.dirEnum = AI_DIR_U;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugOneWayPlatformMC", LAYER_WALLS);
_local1.mc._visible = false;
}
OneWayPlatformObject.prototype.Destruct = function () {
gfx.DestroyMC(this.mc);
delete this.mc;
};
OneWayPlatformObject.prototype.Init = function (params) {
var _local1 = this;
var _local3 = params;
if (_local3.length != 3) {
} else {
_local1.pos.x = _local3[0];
_local1.pos.y = _local3[1];
var _local2 = _local3[2];
_local1.dirEnum = _local2;
if (_local2 == AI_DIR_U) {
_local1.dir.x = 0;
_local1.dir.y = -1;
} else if (_local2 == AI_DIR_D) {
_local1.dir.x = 0;
_local1.dir.y = 1;
_local1.mc._rotation = 180;
} else if (_local2 == AI_DIR_L) {
_local1.dir.x = -1;
_local1.dir.y = 0;
_local1.mc._rotation = -90;
} else if (_local2 == AI_DIR_R) {
_local1.dir.x = 1;
_local1.dir.y = 0;
_local1.mc._rotation = 90;
}
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
_local1.mc._xscale = 2 * _local1.xw;
_local1.mc._yscale = 2 * _local1.yw;
_local1.mc._visible = true;
objects.AddToGrid(_local1);
objects.Moved(_local1);
}
};
OneWayPlatformObject.prototype.UnInit = function () {
objects.RemoveFromGrid(this);
};
OneWayPlatformObject.prototype.DumpInitData = function () {
var _local2 = this;
var _local1 = (((("" + _local2.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local2.pos.y) + OBJPARAM_SEPERATION_CHAR) + _local2.dirEnum;
return(_local1);
};
OneWayPlatformObject.prototype.IdleAfterDeath = function () {
objects.RemoveFromGrid(this);
};
OneWayPlatformObject.prototype.TestVsPlayer = function (guy) {
var _local1 = this;
var _local2 = guy;
var _local3 = _local2.pos;
var dy = (_local3.y - _local1.pos.y);
var py = ((_local1.yw + _local2.yw) - Math.abs(dy));
if (0 < py) {
var dx = (_local3.x - _local1.pos.x);
var px = ((_local1.xw + _local2.xw) - Math.abs(dx));
if (0 < px) {
if (_local1.dir.x == 0) {
var v = (_local2.pos.y - _local2.oldpos.y);
if ((v * _local1.dir.y) <= 0) {
var testV = ((_local2.oldpos.y - (_local1.dir.y * _local2.yw)) - (_local1.pos.y + (_local1.dir.y * _local1.yw)));
if (0 <= (testV * _local1.dir.y)) {
var vy = ((_local1.pos.y + (_local1.dir.y * _local1.yw)) - (_local2.pos.y - (_local1.dir.y * _local2.yw)));
_local2.ReportCollisionVsObject(0, vy, 0, _local1.dir.y, _local1);
}
}
} else {
var v = (_local2.pos.x - _local2.oldpos.x);
if ((v * _local1.dir.x) <= 0) {
var testV = ((_local2.oldpos.x - (_local1.dir.x * _local2.xw)) - (_local1.pos.x + (_local1.dir.x * _local1.xw)));
if (0 <= (testV * _local1.dir.x)) {
var vx = ((_local1.pos.x + (_local1.dir.x * _local1.xw)) - (_local2.pos.x - (_local1.dir.x * _local2.xw)));
_local2.ReportCollisionVsObject(vx, 0, _local1.dir.x, 0, _local1);
}
}
}
}
}
};
function ThwompObject() {
var _local1 = this;
_local1.name = "thwump";
_local1.pos = new Vector2(141, 14);
_local1.anchor = new Vector2(91, 82);
_local1.fallgoal = new Vector2(98, 74);
_local1.goal = _local1.fallgoal;
_local1.i = 6;
_local1.j = 7;
_local1.mini = 2;
_local1.minj = 5;
_local1.maxi = 8;
_local1.maxj = 3;
_local1.xw = tiles.xw * 0.75;
_local1.yw = tiles.xw * 0.75;
_local1.movedir = 1;
_local1.fallspeed = tiles.xw * 0.357142857142857;
_local1.raisespeed = tiles.xw * 0.142857142857143;
_local1.speed = _local1.fallspeed;
_local1.playerWasStanding = false;
_local1.isMoving = false;
_local1.dirEnum = AI_DIR_U;
_local1.dir = new Vector2(1, 0);
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugThwompMC", LAYER_OBJECTS);
_local1.mc._visible = false;
}
ThwompObject.prototype.Destruct = function () {
gfx.DestroyMC(this.mc);
delete this.mc;
};
ThwompObject.prototype.Init = function (params) {
var _local1 = this;
if (params.length != 3) {
} else {
_local1.pos.x = params[0];
_local1.pos.y = params[1];
_local1.anchor.x = _local1.pos.x;
_local1.anchor.y = _local1.pos.y;
objects.AddToGrid(_local1);
objects.StartUpdate(_local1);
objects.Moved(_local1);
_local1.i = _local1.cell.i;
_local1.j = _local1.cell.j;
var dir = params[2];
var wid = 0;
_local1.dirEnum = dir;
if (dir == AI_DIR_U) {
_local1.dir.x = 0;
_local1.dir.y = -1;
var _local3 = _local1.pos.x;
var ty = _local1.pos.y;
var _local2 = _local1.cell.nU;
while (_local2.ID == TID_EMPTY) {
ty = ty - (2 * _local1.cell.yw);
_local2 = _local2.nU;
}
ty = ty - _local1.yw;
ty = ty - (_local1.pos.y - _local1.cell.pos.y);
_local1.mc._rotation = 180;
} else if (dir == AI_DIR_D) {
_local1.dir.x = 0;
_local1.dir.y = 1;
var _local3 = _local1.pos.x;
var ty = _local1.pos.y;
var _local2 = _local1.cell.nD;
while (_local2.ID == TID_EMPTY) {
ty = ty + (2 * _local1.cell.yw);
_local2 = _local2.nD;
}
ty = ty + _local1.yw;
ty = ty - (_local1.pos.y - _local1.cell.pos.y);
_local1.mc._rotation = 0;
} else if (dir == AI_DIR_L) {
_local1.dir.x = -1;
_local1.dir.y = 0;
var _local3 = _local1.pos.x;
var ty = _local1.pos.y;
var _local2 = _local1.cell.nL;
while (_local2.ID == TID_EMPTY) {
_local3 = _local3 - (2 * _local1.cell.xw);
_local2 = _local2.nL;
}
_local3 = _local3 - _local1.xw;
_local3 = _local3 - (_local1.pos.x - _local1.cell.pos.x);
_local1.mc._rotation = 90;
} else if (dir == AI_DIR_R) {
_local1.dir.x = 1;
_local1.dir.y = 0;
var _local3 = _local1.pos.x;
var ty = _local1.pos.y;
var _local2 = _local1.cell.nR;
while (_local2.ID == TID_EMPTY) {
_local3 = _local3 + (2 * _local1.cell.xw);
_local2 = _local2.nR;
}
_local3 = _local3 + _local1.xw;
_local3 = _local3 - (_local1.pos.x - _local1.cell.pos.x);
_local1.mc._rotation = -90;
}
_local1.fallgoal.x = _local3;
_local1.fallgoal.y = ty;
_local1.goal = _local1.fallgoal;
_local1.i = _local1.cell.i;
_local1.j = _local1.cell.j;
_local1.mini = _local1.cell.i;
_local1.minj = _local1.cell.j;
var temptile = tiles.GetTile_S(_local3, ty);
_local1.maxi = temptile.i;
_local1.maxj = temptile.j;
if (_local1.dir.x < 0) {
var temp = _local1.mini;
_local1.mini = _local1.maxi;
_local1.maxi = temp;
}
if (_local1.dir.y < 0) {
var temp = _local1.minj;
_local1.minj = _local1.maxj;
_local1.maxj = temp;
}
_local1.Update = _local1.Update_Waiting;
_local1.mc._xscale = 2 * _local1.xw;
_local1.mc._yscale = 2 * _local1.yw;
_local1.Draw();
_local1.mc._visible = true;
}
};
ThwompObject.prototype.UnInit = function () {
var _local1 = this;
objects.RemoveFromGrid(_local1);
objects.EndUpdate(_local1);
objects.EndDraw(_local1);
};
ThwompObject.prototype.DumpInitData = function () {
var _local2 = this;
var _local1 = (((("" + _local2.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local2.pos.y) + OBJPARAM_SEPERATION_CHAR) + _local2.dirEnum;
return(_local1);
};
ThwompObject.prototype.IdleAfterDeath = function () {
var _local1 = this;
if (_local1.isMoving) {
_local1.Update_Waiting = _local1.Update_Idle;
} else {
_local1.Update = _local1.Update_Idle;
}
};
ThwompObject.prototype.Update_Idle = function () {
};
ThwompObject.prototype.Draw = function () {
var _local1 = this;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
};
ThwompObject.prototype.TestVsPlayer = function (guy) {
var _local1 = this;
var _local2 = guy;
var p = _local2.pos;
var dy = (p.y - _local1.pos.y);
var ady = Math.abs(dy);
var _local3 = (_local1.yw + _local2.yw) - ady;
if (0 < _local3) {
var dx = (p.x - _local1.pos.x);
var adx = Math.abs(dx);
var px = ((_local1.xw + _local2.xw) - adx);
if (0 < px) {
if (_local3 < px) {
if (dy < 0) {
if (_local1.dir.y < 0) {
particles.SpawnZapThwompV(_local1.pos, _local1.xw, -_local1.yw, _local2.pos);
game.KillPlayer(KILLTYPE_ELECTRIC, 0, -8, _local2.pos.x, _local2.pos.y - (0.5 * _local2.r), _local1);
} else {
_local2.ReportCollisionVsObject(0, -_local3, 0, -1, _local1);
}
} else if (0 < _local1.dir.y) {
particles.SpawnZapThwompV(_local1.pos, _local1.xw, _local1.yw, _local2.pos);
game.KillPlayer(KILLTYPE_ELECTRIC, 0, 6, _local2.pos.x, _local2.pos.y + (0.5 * _local2.r), _local1);
} else {
_local2.ReportCollisionVsObject(0, _local3, 0, 1, _local1);
}
} else if (dx < 0) {
if (_local1.dir.x < 0) {
particles.SpawnZapThwompH(_local1.pos, -_local1.xw, _local1.yw, _local2.pos);
game.KillPlayer(KILLTYPE_ELECTRIC, -8, -4, _local2.pos.x - (0.5 * _local2.r), _local2.pos.y, _local1);
} else {
_local2.ReportCollisionVsObject(-px, 0, -1, 0, _local1);
}
} else if (0 < _local1.dir.x) {
particles.SpawnZapThwompH(_local1.pos, _local1.xw, _local1.yw, _local2.pos);
game.KillPlayer(KILLTYPE_ELECTRIC, 8, -4, _local2.pos.x + (0.5 * _local2.r), _local2.pos.y, _local1);
} else {
_local2.ReportCollisionVsObject(px, 0, 1, 0, _local1);
}
}
}
};
ThwompObject.prototype.StartFall = function () {
var _local1 = this;
_local1.isMoving = true;
_local1.speed = _local1.fallspeed;
_local1.movedir = 1;
_local1.goal = _local1.fallgoal;
_local1.Update = _local1.Update_Moving;
objects.StartDraw(_local1);
};
ThwompObject.prototype.StartRaise = function () {
var _local1 = this;
_local1.isMoving = true;
_local1.speed = _local1.raisespeed;
_local1.movedir = -1;
_local1.goal = _local1.anchor;
_local1.Update = _local1.Update_Moving;
};
ThwompObject.prototype.StartWait = function () {
var _local1 = this;
_local1.isMoving = false;
_local1.Update = _local1.Update_Waiting;
objects.EndDraw(_local1);
};
ThwompObject.prototype.Update_Waiting = function () {
var _local1 = this;
if (_local1.dir.x == 0) {
if (Math.abs(_local1.pos.x - player.pos.x) < (2 * (_local1.xw + player.xw))) {
var _local2 = player.cell.j;
if ((_local1.maxj < _local2) || (_local2 < _local1.minj)) {
} else {
_local1.StartFall();
}
}
} else if (Math.abs(_local1.pos.y - player.pos.y) < (2 * (_local1.yw + player.yw))) {
var _local2 = player.cell.i;
if ((_local1.maxi < _local2) || (_local2 < _local1.mini)) {
} else {
_local1.StartFall();
}
}
};
ThwompObject.prototype.Update_Moving = function () {
var _local1 = this;
var _local3 = _local1.goal.x - _local1.pos.x;
var _local2 = _local1.goal.y - _local1.pos.y;
var len2 = ((_local3 * _local3) + (_local2 * _local2));
if (len2 < (_local1.speed * _local1.speed)) {
_local1.pos.x = _local1.goal.x;
_local1.pos.y = _local1.goal.y;
if (_local1.movedir == 1) {
_local1.StartRaise();
} else {
_local1.StartWait();
}
} else {
_local1.pos.x = _local1.pos.x + ((_local1.movedir * _local1.dir.x) * _local1.speed);
_local1.pos.y = _local1.pos.y + ((_local1.movedir * _local1.dir.y) * _local1.speed);
}
objects.Moved(_local1);
};
function HomingLauncherObject() {
var _local1 = this;
_local1.name = "homing rocket";
_local1.basepos = new Vector2(3, 8);
_local1.view = new Vector2(4, 56);
_local1.pos = new Vector2(0, 9);
_local1.mdir = new Vector2(7, 6);
_local1.speed = 0;
_local1.maxspeed = tiles.xw * 0.285714285714286;
_local1.startaccel = 0.1;
_local1.curaccel = _local1.startaccel;
_local1.accelrate = 1.1;
_local1.turnrate = 0.1;
_local1.isHoming = false;
_local1.prefireDelay = 10;
_local1.fireDelayTimer = 0;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugHomingLauncherMC", LAYER_WALLS);
_local1.rocketmc = gfx.CreateSprite("debugHomingRocketMC", LAYER_OBJECTS);
_local1.mc._visible = false;
_local1.rocketmc._visible = true;
_local1.mc.gotoAndStop("rocket_waiting");
_local1.snd = new Sound(_local1.mc);
}
HomingLauncherObject.prototype.Destruct = function () {
var _local1 = this;
gfx.DestroyMC(_local1.mc);
delete _local1.mc;
gfx.DestroyMC(_local1.rocketmc);
delete _local1.rocketmc;
delete _local1.snd;
};
HomingLauncherObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 2) {
} else {
_local1.basepos.x = _local2[0];
_local1.basepos.y = _local2[1];
_local1.StartIdle();
_local1.mc._xscale = (_local1.mc._yscale = tiles.xw);
_local1.mc._x = _local1.basepos.x;
_local1.mc._y = _local1.basepos.y;
_local1.mc._visible = true;
_local1.mc.gotoAndStop("rocket_waiting");
_local1.rocketmc._xscale = (_local1.rocketmc._yscale = 100);
_local1.rocketmc._x = _local1.basepos.x;
_local1.rocketmc._y = _local1.basepos.y;
_local1.rocketmc._visible = false;
}
};
HomingLauncherObject.prototype.UnInit = function () {
var _local1 = this;
objects.RemoveFromGrid(_local1);
objects.EndUpdate(_local1);
objects.EndThink(_local1);
};
HomingLauncherObject.prototype.DumpInitData = function () {
var _local1 = (("" + this.basepos.x) + OBJPARAM_SEPERATION_CHAR) + this.basepos.y;
return(_local1);
};
HomingLauncherObject.prototype.IdleAfterDeath = function () {
var _local1 = this;
if (_local1.isHoming) {
_local1.StartIdle = _local1.StartIdle_Death;
} else {
objects.EndThink(_local1);
}
};
HomingLauncherObject.prototype.StartIdle_Death = function () {
this.isHoming = false;
};
HomingLauncherObject.prototype.Draw = function () {
var _local1 = this;
_local1.rocketmc._x = _local1.pos.x;
_local1.rocketmc._y = _local1.pos.y;
var _local2 = NormToRot(_local1.mdir.x, _local1.mdir.y);
_local1.rocketmc._rotation = _local2;
particles.SpawnRocketSmoke(_local1.pos, _local2);
};
HomingLauncherObject.prototype.StartFiring = function () {
var _local1 = this;
objects.EndThink(_local1);
objects.StartUpdate(_local1);
_local1.isHoming = true;
_local1.fireDelayTimer = 0;
_local1.Update = _local1.Update_PreFire;
};
HomingLauncherObject.prototype.StartIdle = function () {
this.isHoming = false;
objects.StartThink(this);
};
HomingLauncherObject.prototype.FireMissile = function () {
var _local1 = this;
_local1.curaccel = _local1.startaccel;
_local1.speed = 0;
_local1.pos.x = _local1.basepos.x;
_local1.pos.y = _local1.basepos.y;
objects.AddToGrid(_local1);
objects.StartDraw(_local1);
_local1.Update = _local1.Update_Homing;
var _local3 = player.pos.x - _local1.basepos.x;
var _local2 = player.pos.y - _local1.basepos.y;
var len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (len == 0) {
} else {
_local3 = _local3 / len;
_local2 = _local2 / len;
_local1.mdir.x = _local3;
_local1.mdir.y = _local2;
}
_local1.rocketmc._visible = true;
_local1.mc.gotoAndPlay("rocket_fire");
};
HomingLauncherObject.prototype.ExplodeMissile = function () {
var _local1 = this;
_local1.snd.stop();
_local1.rocketmc._visible = false;
_local1.mc.gotoAndPlay("rocket_explode");
particles.SpawnExplosion(_local1.pos);
objects.EndUpdate(_local1);
objects.EndDraw(_local1);
objects.RemoveFromGrid(_local1);
_local1.StartIdle();
};
HomingLauncherObject.prototype.Think = function () {
var _local1 = this;
if (QueryRayObj(_local1.view, _local1.basepos, player.pos, player)) {
_local1.StartFiring();
}
};
HomingLauncherObject.prototype.TestVsPlayer = function (guy) {
var _local1 = this;
var _local3 = guy.pos.x - _local1.pos.x;
var _local2 = guy.pos.y - _local1.pos.y;
var len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (len < player.r) {
game.KillPlayer(KILLTYPE_EXPLOSIVE, _local3, _local2, _local1.pos.x, _local1.pos.y, _local1);
_local1.ExplodeMissile();
}
};
HomingLauncherObject.prototype.Update_PreFire = function () {
var _local1 = this;
_local1.fireDelayTimer++;
if (_local1.prefireDelay <= _local1.fireDelayTimer) {
_local1.FireMissile();
}
};
HomingLauncherObject.prototype.Update_Homing = function () {
var _local1 = this;
var _local3 = _local1.pos;
if (_local1.speed < _local1.maxspeed) {
_local1.curaccel = _local1.curaccel * _local1.accelrate;
_local1.speed = _local1.speed + _local1.curaccel;
} else {
_local1.speed = _local1.maxspeed;
}
_local3.x = _local3.x + (_local1.speed * _local1.mdir.x);
_local3.y = _local3.y + (_local1.speed * _local1.mdir.y);
if (QueryPointvsTileMap(_local3.x, _local3.y)) {
_local1.ExplodeMissile();
} else {
var _local2 = _local1.cell;
if (objects.Moved(_local1)) {
var newc = _local1.cell;
var e;
if (newc == _local2.nR) {
e = _local2.eR;
} else if (newc == _local2.nL) {
e = _local2.eL;
} else if (newc == _local2.nU) {
e = _local2.eU;
} else if (newc == _local2.nD) {
e = _local2.eD;
} else {
e = EID_OFF;
}
if (e == EID_SOLID) {
_local1.ExplodeMissile();
return;
}
} else {
var guy = player;
dx = ((2 * guy.pos.x) - guy.oldpos.x) - (_local3.x + (_local1.speed * _local1.mdir.x));
dy = ((2 * guy.pos.y) - guy.oldpos.y) - (_local3.y + (_local1.speed * _local1.mdir.y));
var len = Math.sqrt((dx * dx) + (dy * dy));
dx = dx / len;
dy = dy / len;
var dp = ((_local1.mdir.x * dx) + (_local1.mdir.y * dy));
var pp = (((-_local1.mdir.y) * dx) + (_local1.mdir.x * dy));
var trate = _local1.turnrate;
if (dp < 0) {
}
var tempX = (pp * (-_local1.mdir.y));
var tempY = (pp * _local1.mdir.x);
_local1.mdir.x = _local1.mdir.x + (tempX * trate);
_local1.mdir.y = _local1.mdir.y + (tempY * trate);
var len = Math.sqrt((_local1.mdir.x * _local1.mdir.x) + (_local1.mdir.y * _local1.mdir.y));
if (len == 0) {
} else {
_local1.mdir.x = _local1.mdir.x / len;
_local1.mdir.y = _local1.mdir.y / len;
}
}
}
};
function TurretObject() {
var _local1 = this;
_local1.name = "gauss turret";
_local1.pos = new Vector2(21, 12);
objects.Register(_local1);
_local1.view = new Vector2(0, 0);
_local1.targ = new Vector2(0, 0);
_local1.aim = new Vector2(_local1.pos.x, _local1.pos.y);
_local1.closeAimSpeed = 0.05;
_local1.midAimSpeed = 0.035;
_local1.farAimSpeed = 0.03;
_local1.aimSpeed = _local1.farAimSpeed;
_local1.outerThreshold = tiles.xw * 8;
_local1.innerThreshold = tiles.xw * 2;
_local1.midThreshold = (0.25 * _local1.outerThreshold) + (0.75 * _local1.innerThreshold);
_local1.outerThreshold = _local1.outerThreshold * _local1.outerThreshold;
_local1.midThreshold = _local1.midThreshold * _local1.midThreshold;
_local1.innerThreshold = _local1.innerThreshold * _local1.innerThreshold;
_local1.shotRate = 60;
_local1.shotTimer = 0;
_local1.fireDelayTimer = 0;
_local1.prefireDelay = 10;
_local1.postfireDelay = 10;
_local1.isFiring = false;
_local1.mc = gfx.CreateSprite("debugTurretMC", LAYER_WALLS);
_local1.mc._visible = false;
_local1.crosshairMC = gfx.CreateSprite("debugTurretCrosshairMC", LAYER_OBJECTS);
_local1.crosshairMC._visible = false;
}
TurretObject.prototype.Destruct = function () {
var _local1 = this;
gfx.DestroyMC(_local1.mc);
delete _local1.mc;
gfx.DestroyMC(_local1.crosshairMC);
delete _local1.crosshairMC;
};
TurretObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 2) {
} else {
_local1.pos.x = (_local1.aim.x = _local2[0]);
_local1.pos.y = (_local1.aim.y = _local2[1]);
objects.StartThink(_local1);
_local1.Think = _local1.Think_Waiting;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
_local1.mc._xscale = (_local1.mc._yscale = tiles.xw);
_local1.mc._visible = true;
_local1.mc.gotoAndStop("turret_idle");
_local1.crosshairMC._xscale = (_local1.crosshairMC._yscale = tiles.xw * 1.5);
_local1.crosshairMC._visible = false;
}
};
TurretObject.prototype.UnInit = function () {
var _local1 = this;
objects.EndThink(_local1);
objects.EndUpdate(_local1);
objects.EndDraw(_local1);
};
TurretObject.prototype.DumpInitData = function () {
var _local1 = (("" + this.pos.x) + OBJPARAM_SEPERATION_CHAR) + this.pos.y;
return(_local1);
};
TurretObject.prototype.Draw = function () {
var _local1 = this;
_local1.crosshairMC._x = _local1.aim.x;
_local1.crosshairMC._y = _local1.aim.y;
};
TurretObject.prototype.IdleAfterDeath = function () {
var _local1 = this;
_local1.StopTargetting();
objects.EndThink(_local1);
objects.EndDraw(_local1);
};
TurretObject.prototype.StartFiring = function () {
var _local1 = this;
_local1.crosshairMC.gotoAndStop("prefire");
_local1.mc.gotoAndPlay("turret_prefire");
objects.EndThink(_local1);
objects.EndDraw(_local1);
_local1.isFiring = true;
_local1.fireDelayTimer = 0;
_local1.Update = _local1.Update_PreFire;
};
TurretObject.prototype.StopFiring = function () {
var _local1 = this;
objects.StartThink(_local1);
_local1.Think = _local1.Think_Targetting;
_local1.crosshairMC.gotoAndStop("postfire");
_local1.mc.gotoAndPlay("turret_idle");
_local1.isFiring = false;
_local1.fireDelayTimer = 0;
_local1.Update = _local1.Update_PostFire;
};
TurretObject.prototype.StartTargetting = function () {
var _local1 = this;
_local1.crosshairMC._visible = true;
_local1.crosshairMC.gotoAndStop("aim_far");
_local1.aimSpeed = _local1.farAimSpeed;
_local1.aim.x = _local1.pos.x;
_local1.aim.y = _local1.pos.y;
_local1.KeepTargetting();
};
TurretObject.prototype.StopTargetting = function () {
var _local1 = this;
_local1.crosshairMC._visible = false;
objects.EndUpdate(_local1);
_local1.Think = _local1.Think_Waiting;
objects.EndDraw(_local1);
};
TurretObject.prototype.KeepTargetting = function () {
var _local1 = this;
_local1.shotTimer = _local1.shotRate;
_local1.Update = _local1.Update_Targetting;
_local1.Think = _local1.Think_Targetting;
objects.StartUpdate(_local1);
objects.StartDraw(_local1);
};
TurretObject.prototype.Fire = function () {
var _local1 = this;
_local1.mc.gotoAndPlay("turret_firing");
if (QueryRayObj(_local1.targ, _local1.pos, _local1.aim, player)) {
var _local3 = _local1.aim.x - _local1.pos.x;
var _local2 = _local1.aim.y - _local1.pos.y;
var len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (len == 0) {
_local3 = 1;
_local2 = 1;
} else {
_local3 = _local3 / len;
_local2 = _local2 / len;
}
game.KillPlayer(KILLTYPE_HARDBULLET, _local3 * 8, _local2 * 8, _local1.targ.x, _local1.targ.y, _local1);
_local1.targ.x = _local1.targ.x + (_local3 * player.r);
_local1.targ.y = _local1.targ.y + (_local2 * player.r);
var rot = NormToRot(_local3, _local2);
} else {
var _local3 = _local1.aim.x - _local1.pos.x;
var _local2 = _local1.aim.y - _local1.pos.y;
var len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (len == 0) {
_local3 = 1;
_local2 = 1;
} else {
_local3 = _local3 / len;
_local2 = _local2 / len;
}
var rot = NormToRot(-_local3, -_local2);
}
particles.SpawnTurretBullet(_local1.pos, _local1.targ, rot);
_local1.StopFiring();
};
TurretObject.prototype.Think_Waiting = function () {
var _local1 = this;
if (QueryRayObj(_local1.view, _local1.pos, player.pos, player)) {
_local1.StartTargetting();
}
};
TurretObject.prototype.Think_Targetting = function () {
var _local1 = this;
if (!QueryRayObj(_local1.view, _local1.pos, player.pos, player)) {
_local1.StopTargetting();
}
};
TurretObject.prototype.Update_Targetting = function () {
var _local1 = this;
var px = ((2 * player.pos.x) - player.oldpos.x);
var py = ((2 * player.pos.y) - player.oldpos.y);
var _local2 = _local1.aim;
var dx = (_local2.x - px);
var dy = (_local2.y - py);
_local2.x = _local2.x - (_local1.aimSpeed * dx);
_local2.y = _local2.y - (_local1.aimSpeed * dy);
var _local3 = (dx * dx) + (dy * dy);
if (_local1.outerThreshold < _local3) {
_local1.crosshairMC.gotoAndStop("aim_far");
_local1.aimSpeed = _local1.farAimSpeed;
} else {
if (_local3 < _local1.innerThreshold) {
_local1.shotTimer = _local1.shotTimer - (2 + (game.GetTime() % 4));
} else if (_local3 < _local1.midThreshold) {
_local1.crosshairMC.gotoAndStop("aim_near");
_local1.aimSpeed = _local1.closeAimSpeed;
_local1.shotTimer = _local1.shotTimer - (1 + (game.GetTime() % 2));
} else {
_local1.crosshairMC.gotoAndStop("aim_mid");
_local1.aimSpeed = _local1.midAimSpeed;
_local1.shotTimer = _local1.shotTimer - 0.5;
}
if (_local1.shotTimer < 0) {
_local1.shotTimer = _local1.shotRate;
_local1.StartFiring();
}
}
};
TurretObject.prototype.Update_PreFire = function () {
var _local1 = this;
_local1.fireDelayTimer++;
if (_local1.prefireDelay <= _local1.fireDelayTimer) {
if (!QueryRayObj(_local1.view, _local1.pos, player.pos, player)) {
_local1.StopFiring();
} else {
_local1.Fire();
}
}
};
TurretObject.prototype.Update_PostFire = function () {
var _local1 = this;
_local1.fireDelayTimer++;
_local1.shotMC._alpha = 100 - (100 * (_local1.fireDelayTimer / _local1.postfireDelay));
if (_local1.postfireDelay <= _local1.fireDelayTimer) {
_local1.shotMC._visible = false;
if (!QueryRayObj(_local1.view, _local1.pos, player.pos, player)) {
_local1.StopTargetting();
} else {
_local1.KeepTargetting();
}
}
};
function MineObject() {
var _local1 = this;
_local1.name = "mine";
_local1.pos = new Vector2(43, 16);
_local1.r = tiles.xw * 0.333333333333333;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugMineMC", LAYER_OBJECTS);
_local1.mc._visible = false;
}
MineObject.prototype.Destruct = function () {
gfx.DestroyMC(this.mc);
delete this.mc;
};
MineObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 2) {
} else {
_local1.pos.x = _local2[0];
_local1.pos.y = _local2[1];
objects.AddToGrid(_local1);
objects.Moved(_local1);
_local1.mc._xscale = (_local1.mc._yscale = 2 * _local1.r);
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
_local1.mc.gotoAndStop("mine_unexploded");
_local1.mc._visible = true;
}
};
MineObject.prototype.UnInit = function () {
objects.RemoveFromGrid(this);
};
MineObject.prototype.DumpInitData = function () {
var _local1 = (("" + this.pos.x) + OBJPARAM_SEPERATION_CHAR) + this.pos.y;
return(_local1);
};
MineObject.prototype.IdleAfterDeath = function () {
objects.RemoveFromGrid(this);
};
MineObject.prototype.TestVsPlayer = function (guy) {
var _local3 = guy.pos;
var _local2 = this.pos.x - _local3.x;
var _local1 = this.pos.y - _local3.y;
if (Math.sqrt((_local2 * _local2) + (_local1 * _local1)) < (this.r + guy.r)) {
this.Explode(-_local2, -_local1);
}
};
MineObject.prototype.Explode = function (dx, dy) {
var _local1 = this;
game.KillPlayer(KILLTYPE_EXPLOSIVE, dx, dy, _local1.pos.x, _local1.pos.y, _local1);
particles.SpawnExplosion(_local1.pos);
_local1.mc.gotoAndStop("mine_exploded");
};
function FloorGuardObject() {
var _local1 = this;
_local1.name = "floor guard";
_local1.pos = new Vector2(41, 14);
_local1.r = tiles.xw * 0.5;
_local1.dir = 1;
_local1.speed = tiles.xw * 0.428571428571429;
_local1.view = new Vector2(0, 0);
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugFloorGuardMC", LAYER_OBJECTS);
_local1.mc._visible = false;
_local1.mc.gotoAndStop("floorguard_idle");
}
FloorGuardObject.prototype.Destruct = function () {
gfx.DestroyMC(this.mc);
delete this.mc;
};
FloorGuardObject.prototype.Init = function (params) {
var _local1 = this;
var _local3 = params;
if (_local3.length != 3) {
} else {
_local1.pos.x = _local3[0];
_local1.pos.y = _local3[1];
if (dir < 0) {
_local1.dir = -1;
} else {
_local1.dir = 1;
}
objects.AddToGrid(_local1);
objects.Moved(_local1);
objects.StartUpdate(_local1);
_local1.Update = _local1.Update_Idle;
_local1.pos.y = (_local1.cell.pos.y + _local1.cell.yw) - _local1.r;
var _local2 = _local1.cell;
while (true) {
_local2 = _local2.nR;
if ((TID_EMPTY < _local2.ID) || (_local2.eD != EID_SOLID)) {
_local1.maxX = (_local2.pos.x - _local2.xw) - _local1.r;
break;
}
}
while (true) {
_local2 = _local2.nL;
if ((TID_EMPTY < _local2.ID) || (_local2.eD != EID_SOLID)) {
_local1.minX = (_local2.pos.x + _local2.xw) + _local1.r;
break;
}
}
_local2 = _local1.cell;
_local1.mini = _local2.i;
_local1.maxi = _local2.i;
while (true) {
_local2 = _local2.nR;
if (TID_EMPTY < _local2.ID) {
break;
}
_local1.maxi++;
}
_local2 = _local1.cell;
while (true) {
_local2 = _local2.nL;
if (TID_EMPTY < _local2.ID) {
break;
}
_local1.mini--;
}
_local1.mc._xscale = (_local1.mc._yscale = 2 * _local1.r);
_local1.Draw();
_local1.mc._visible = true;
}
};
FloorGuardObject.prototype.UnInit = function () {
var _local1 = this;
objects.RemoveFromGrid(_local1);
objects.EndUpdate(_local1);
objects.EndDraw(_local1);
};
FloorGuardObject.prototype.DumpInitData = function () {
var _local2 = this;
var _local1 = (((("" + _local2.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local2.pos.y) + OBJPARAM_SEPERATION_CHAR) + _local2.dir;
return(_local1);
};
FloorGuardObject.prototype.IdleAfterDeath = function () {
this.StopChasing();
objects.EndUpdate(this);
};
FloorGuardObject.prototype.Draw = function () {
var _local1 = this;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
};
FloorGuardObject.prototype.TestVsPlayer = function (guy) {
var _local3 = this;
var p = guy.pos;
var _local2 = _local3.pos.x - p.x;
var _local1 = _local3.pos.y - p.y;
var len = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
if (len < (_local3.r + guy.r)) {
_local2 = _local2 / len;
_local1 = _local1 / len;
particles.SpawnZap(_local3.pos.x - (_local2 * _local3.r), _local3.pos.y - (_local1 * _local3.r), NormToRot(-_local2, -_local1));
game.KillPlayer(KILLTYPE_ELECTRIC, (-_local2) * 10, (-_local1) * 10, p.x + (guy.r * _local2), p.y + (guy.r * _local1), _local3);
}
};
FloorGuardObject.prototype.StartChasing = function () {
var _local1 = this;
_local1.Update = _local1.Update_Chase;
objects.StartDraw(_local1);
_local1.mc.gotoAndStop("floorguard_active");
if (player.cell.i < _local1.cell.i) {
_local1.dir = -1;
} else if (_local1.cell.i < player.cell.i) {
_local1.dir = 1;
} else {
_local1.StopChasing();
}
};
FloorGuardObject.prototype.StopChasing = function () {
var _local1 = this;
_local1.mc.gotoAndStop("floorguard_idle");
_local1.Update = _local1.Update_Idle;
objects.EndDraw(_local1);
};
FloorGuardObject.prototype.Update_Idle = function () {
var _local2 = this;
if (Math.abs(_local2.cell.j - player.cell.j) == 0) {
var _local1 = player.cell.i;
if ((_local2.maxi < _local1) || (_local1 < _local2.mini)) {
} else {
_local2.StartChasing();
}
}
};
FloorGuardObject.prototype.Update_Chase = function () {
var _local1 = this;
if (_local1.dir < 0) {
if (Math.abs(_local1.pos.x - _local1.minX) < _local1.speed) {
_local1.pos.x = _local1.minX;
_local1.StopChasing();
} else {
_local1.pos.x = _local1.pos.x + (_local1.dir * _local1.speed);
}
} else if (Math.abs(_local1.maxX - _local1.pos.x) < _local1.speed) {
_local1.pos.x = _local1.maxX;
_local1.StopChasing();
} else {
_local1.pos.x = _local1.pos.x + (_local1.dir * _local1.speed);
}
objects.Moved(_local1);
};
function DroneObject() {
var _local1 = this;
_local1.name = "drone";
_local1.pos = new Vector2(41, 14);
_local1.r = tiles.xw * 0.75;
_local1.dirList = new Object();
_local1.dirList[AI_DIR_R] = new Vector2(1, 0);
_local1.dirList[AI_DIR_D] = new Vector2(0, 1);
_local1.dirList[AI_DIR_L] = new Vector2(-1, 0);
_local1.dirList[AI_DIR_U] = new Vector2(0, -1);
_local1.curDir = AI_DIR_R;
_local1.curDirV = _local1.dirList[_local1.curDir];
_local1.goal = new Vector2(54, 85);
_local1.speed = tiles.xw * 0.0714285714285714;
_local1.curRot = 0;
_local1.isChaser = false;
_local1.ischasing = false;
_local1.waschasing = false;
_local1.ai_counter = 0;
_local1.ai_counter2 = 0;
_local1.view = new Vector2(9, 4);
_local1.fireDelayTimer = 0;
_local1.targ = new Vector2(4, 5);
_local1.targ2 = new Vector2(5, 7);
_local1.targ3 = new Vector2(3, 6);
_local1.prefireDelay = 0;
_local1.postfireDelay = 0;
_local1.isFiring = false;
_local1.laserPrefireDelay = 30;
_local1.laserPostfireDelay = 40;
_local1.laserRate = 80;
_local1.laserTimer = 0;
_local1.laserLen = 7;
_local1.chaingunPrefireDelay = 35;
_local1.chaingunPostfireDelay = 60;
_local1.chaingunMaxNum = 8;
_local1.chaingunCurNum = 0;
_local1.chaingunRate = 6;
_local1.chaingunTimer = 0;
_local1.chaingunSpread = 0.3;
objects.Register(_local1);
_local1.mc = gfx.CreateSprite("debugDroneMC", LAYER_OBJECTS);
_local1.mc._visible = false;
_local1.eyeMC = _local1.mc.attachMovie("debugDroneEyeMC", "drone" + _local1.UID, _local1.UID);
_local1.snd = new Sound(_local1.mc);
}
DroneObject.prototype.Destruct = function () {
var _local1 = this;
gfx.DestroyMC(_local1.mc);
gfx.DestroyMC(_local1.beamMC);
gfx.DestroyMC(_local1.blastMC);
gfx.DestroyMC(_local1.gunMC);
gfx.DestroyMC(_local1.eyeMC);
delete _local1.mc;
delete _local1.beamMC;
delete _local1.blastMC;
delete _local1.eyeMC;
delete _local1.snd;
};
DroneObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 6) {
} else {
_local1.pos.x = _local2[0];
_local1.pos.y = _local2[1];
_local1.curDir = _local2[5];
_local1.SetDir(_local1.curDir);
objects.AddToGrid(_local1);
objects.StartUpdate(_local1);
objects.Moved(_local1);
_local1.pos.x = (_local1.goal.x = _local1.cell.pos.x);
_local1.pos.y = (_local1.goal.y = _local1.cell.pos.y);
_local1.SetupDroneType(_local2[2], Boolean(_local2[3]), _local2[4]);
_local1.mc._xscale = (_local1.mc._yscale = 2 * _local1.r);
}
};
DroneObject.prototype.UnInit = function () {
var _local1 = this;
objects.RemoveFromGrid(_local1);
objects.EndUpdate(_local1);
objects.EndThink(_local1);
objects.EndDraw(_local1);
};
DroneObject.prototype.DumpInitData = function () {
var _local1 = this;
var _local2 = (((((((((("" + _local1.pos.x) + OBJPARAM_SEPERATION_CHAR) + _local1.pos.y) + OBJPARAM_SEPERATION_CHAR) + _local1.DRONEMOVE) + OBJPARAM_SEPERATION_CHAR) + Number(_local1.isChaser)) + OBJPARAM_SEPERATION_CHAR) + _local1.DRONEWEAP) + OBJPARAM_SEPERATION_CHAR) + _local1.curDir;
return(_local2);
};
DroneObject.prototype.IdleAfterDeath = function () {
var _local1 = this;
if (_local1.isChaser) {
_local1.Chase = _local1.Chase_NoSearch;
_local1.ischasing = false;
}
_local1.Think = null;
if (_local1.isFiring) {
_local1.StopFiring();
}
};
DroneObject.prototype.SetupDroneType = function (movetype, isChaser, weaptype) {
var _local1 = this;
var _local2 = movetype;
var _local3 = weaptype;
_local1.mc.clear();
_local1.DRONEMOVE = _local2;
_local1.DRONEWEAP = _local3;
_local1.isChaser = isChaser;
if (_local2 == DRONEMOVE_SURFACEFOLLOW_CW) {
_local1.GetNewGoal = _local1.GetNewGoal_Simple;
_local1.moveList = MoveList_SurfaceCW;
} else if (_local2 == DRONEMOVE_SURFACEFOLLOW_CCW) {
_local1.GetNewGoal = _local1.GetNewGoal_Simple;
_local1.moveList = MoveList_SurfaceCCW;
} else if (_local2 == DRONEMOVE_WANDER_CW) {
_local1.GetNewGoal = _local1.GetNewGoal_Simple;
_local1.moveList = MoveList_ChuChuCW;
} else if (_local2 == DRONEMOVE_WANDER_CCW) {
_local1.GetNewGoal = _local1.GetNewGoal_Simple;
_local1.moveList = MoveList_ChuChuCCW;
} else if (_local2 == DRONEMOVE_WANDER_ALTERNATING) {
_local1.GetNewGoal = _local1.GetNewGoal_ChuChuAlternating;
} else if (_local2 == DRONEMOVE_WANDER_RANDOM) {
_local1.GetNewGoal = _local1.GetNewGoal_ChuChuRandom;
}
if (_local3 == DRONEWEAP_ZAP) {
if (isChaser) {
_local1.Chase = _local1.Chase_AxisSearch;
_local1.isChaser = true;
_local1.ischasing = false;
_local1.mc.gotoAndStop("zapdrone_chaseidle");
} else {
_local1.Chase = _local1.Chase_NoSearch;
_local1.isChaser = false;
_local1.ischasing = false;
_local1.mc.gotoAndStop("zapdrone_move");
}
_local1.name = "zap drone";
_local1.weaptype = DRONEWEAP_ZAP;
_local1.speed = _local1.speed * 2;
_local1.TestVsPlayer = _local1.TestVsPlayer_Zap;
} else if (_local3 == DRONEWEAP_LASER) {
_local1.Chase = _local1.Chase_NoSearch;
_local1.isChaser = false;
_local1.ischasing = false;
_local1.name = "laser drone";
_local1.weaptype = DRONEWEAP_LASER;
_local1.speed = _local1.speed * 0.5;
_local1.Think = _local1.Think_TargetPlayer;
_local1.Fire = _local1.Fire_Laser;
_local1.StartFiring = _local1.StartFiring_Laser;
_local1.StopFiring = _local1.StopFiring_Laser;
_local1.Update_PreFire = _local1.Update_PreFire_Laser;
_local1.Update_PostFire = _local1.Update_PostFire_Laser;
_local1.prefireDelay = _local1.laserPrefireDelay;
_local1.postfireDelay = _local1.laserPostfireDelay;
objects.StartThink(_local1);
_local1.mc.gotoAndStop("laserdrone_move");
_local1.beamdx = 0;
_local1.beamdy = 0;
_local1.beamMC = gfx.CreateEmptySprite(LAYER_OBJECTS);
_local1.beamMC._visible = false;
_local1.blastMC = gfx.CreateSprite("debugLaserBlastMC", LAYER_OBJECTS);
_local1.blastMC._visible = false;
} else if (_local3 == DRONEWEAP_CHAINGUN) {
_local1.Chase = _local1.Chase_NoSearch;
_local1.isChaser = false;
_local1.ischasing = false;
_local1.name = "chaingun drone";
_local1.weaptype = DRONEWEAP_CHAINGUN;
_local1.speed = _local1.speed * 0.75;
_local1.Think = _local1.Think_TargetPlayer;
_local1.Fire = _local1.Fire_Chaingun;
_local1.StartFiring = _local1.StartFiring_Chaingun;
_local1.StopFiring = _local1.StopFiring_Chaingun;
_local1.Update_PreFire = _local1.Update_PreFire_Chaingun;
_local1.Update_PostFire = _local1.Update_PostFire_Chaingun;
_local1.prefireDelay = _local1.chaingunPrefireDelay;
_local1.postfireDelay = _local1.chaingunPostfireDelay;
objects.StartThink(_local1);
_local1.chainturretRot = 0;
_local1.mc.gotoAndStop("chaingundrone_move");
_local1.eyeMC = _local1.mc.attachMovie("debugChainTurretMC", "chainturret" + _local1.UID, _local1.UID);
}
_local1.Draw();
_local1.mc._visible = true;
_local1.Update = _local1.Update_Move;
objects.StartDraw(_local1);
};
DroneObject.prototype.Draw = function () {
var _local1 = this;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
var _local2 = _local1.curRot - _local1.eyeMC._rotation;
_local1.eyeMC._rotation = _local1.eyeMC._rotation + (0.3 * _local2);
};
DroneObject.prototype.Update_Move = function () {
var _local1 = this;
_local1.ai_counter++;
var dx = (_local1.goal.x - _local1.pos.x);
var _local3 = _local1.goal.y - _local1.pos.y;
var len2 = ((dx * dx) + (_local3 * _local3));
if (len2 < (_local1.speed * _local1.speed)) {
_local1.pos.x = _local1.goal.x;
_local1.pos.y = _local1.goal.y;
if (_local1.Chase()) {
_local1.ischasing = true;
_local1.mc.gotoAndPlay("zapdrone_chaseactive");
} else {
_local1.SetDir(_local1.GetNewGoal());
_local1.ischasing = false;
}
} else {
var _local2 = _local1.speed;
if (_local1.ischasing) {
_local2 = _local2 * 2;
}
_local1.pos.x = _local1.pos.x + (_local1.curDirV.x * _local2);
_local1.pos.y = _local1.pos.y + (_local1.curDirV.y * _local2);
}
objects.Moved(_local1);
};
function RotateAIDir(curDir, rot) {
var _local1 = rot;
if ((_local1 < 0) || (AI_ROT_270 < _local1)) {
return(curDir);
}
return((curDir + _local1) % 4);
}
DRONEMOVE_SURFACEFOLLOW_CW = 0;
DRONEMOVE_SURFACEFOLLOW_CCW = 1;
DRONEMOVE_WANDER_CW = 2;
DRONEMOVE_WANDER_CCW = 3;
DRONEMOVE_WANDER_ALTERNATING = 4;
DRONEMOVE_WANDER_RANDOM = 5;
AI_DIR_R = 0;
AI_DIR_D = 1;
AI_DIR_L = 2;
AI_DIR_U = 3;
AI_ROT_0 = 0;
AI_ROT_90 = 1;
AI_ROT_180 = 2;
AI_ROT_270 = 3;
MoveList_ChuChuCW = new Array();
MoveList_ChuChuCW.push(AI_ROT_0);
MoveList_ChuChuCW.push(AI_ROT_90);
MoveList_ChuChuCW.push(AI_ROT_270);
MoveList_ChuChuCW.push(AI_ROT_180);
MoveList_ChuChuCCW = new Array();
MoveList_ChuChuCCW.push(AI_ROT_0);
MoveList_ChuChuCCW.push(AI_ROT_270);
MoveList_ChuChuCCW.push(AI_ROT_90);
MoveList_ChuChuCCW.push(AI_ROT_180);
MoveList_SurfaceCW = new Array();
MoveList_SurfaceCW.push(AI_ROT_90);
MoveList_SurfaceCW.push(AI_ROT_0);
MoveList_SurfaceCW.push(AI_ROT_270);
MoveList_SurfaceCW.push(AI_ROT_180);
MoveList_SurfaceCCW = new Array();
MoveList_SurfaceCCW.push(AI_ROT_270);
MoveList_SurfaceCCW.push(AI_ROT_0);
MoveList_SurfaceCCW.push(AI_ROT_90);
MoveList_SurfaceCCW.push(AI_ROT_180);
DroneObject.prototype.SetDir = function (dir) {
var _local1 = this;
var _local2 = dir;
if (_local1.dir != _local1.curDir) {
_local1.curDir = _local2;
_local1.curDirV = _local1.dirList[_local1.curDir];
if (_local2 < 2) {
if (_local2 == 0) {
_local1.curRot = 0;
} else {
_local1.curRot = 90;
}
} else if (_local2 == 2) {
_local1.curRot = 180;
} else {
_local1.curRot = -90;
}
}
};
DroneObject.prototype.TestEdge = function (dir) {
var _local1 = this;
var _local2;
var _local3;
if (dir == AI_DIR_U) {
_local2 = _local1.cell.eU;
_local3 = _local1.cell.nU;
} else if (dir == AI_DIR_L) {
_local2 = _local1.cell.eL;
_local3 = _local1.cell.nL;
} else if (dir == AI_DIR_D) {
_local2 = _local1.cell.eD;
_local3 = _local1.cell.nD;
} else if (dir == AI_DIR_R) {
_local2 = _local1.cell.eR;
_local3 = _local1.cell.nR;
if (_local2 == EID_OFF) {
_local1.goal.x = _local3.pos.x;
_local1.goal.y = _local3.pos.y;
return(true);
return(false);
}
}
if (_local2 == EID_OFF) {
_local1.goal.x = _local3.pos.x;
_local1.goal.y = _local3.pos.y;
return(true);
return(false);
}
return(false);
};
DroneObject.prototype.Chase_NoSearch = function () {
return(false);
};
DroneObject.prototype.Chase_SurfaceGrab = function () {
var _local1 = this;
_local1.Chase = _local1.Chase_AxisSearch;
_local1.SetDir(_local1.surfaceFutureDir);
return(false);
};
DroneObject.prototype.Chase_AxisSearch = function () {
var _local1 = this;
var di = (player.cell.i - _local1.cell.i);
var _local3 = player.cell.j - _local1.cell.j;
var _local2;
var t;
if (Math.abs(di) < 1) {
t = Math.abs(_local3);
if (player.pos.y < _local1.pos.y) {
if (_local1.curDir == AI_DIR_D) {
return(false);
}
_local2 = AI_DIR_U;
} else {
if (_local1.curDir == AI_DIR_U) {
return(false);
}
_local2 = AI_DIR_D;
}
} else if (Math.abs(_local3) < 1) {
t = Math.abs(di);
if (player.pos.x < _local1.pos.x) {
if (_local1.curDir == AI_DIR_R) {
return(false);
}
_local2 = AI_DIR_L;
} else {
if (_local1.curDir == AI_DIR_L) {
return(false);
}
_local2 = AI_DIR_R;
}
if (_local1.FindTarget(_local2, t)) {
_local1.SetDir(_local2);
if (_local1.DRONEMOVE < DRONEMOVE_WANDER_CW) {
_local1.Chase = _local1.Chase_SurfaceGrab;
if (_local1.DRONEMOVE == DRONEMOVE_SURFACEFOLLOW_CW) {
rot = AI_ROT_270;
} else if (_local1.DRONEMOVE == DRONEMOVE_SURFACEFOLLOW_CCW) {
rot = AI_ROT_90;
_local1.surfaceFutureDir = RotateAIDir(_local2, rot);
return(true);
return(false);
return(false);
}
_local1.surfaceFutureDir = RotateAIDir(_local2, rot);
}
return(true);
}
return(false);
}
if (_local1.FindTarget(_local2, t)) {
_local1.SetDir(_local2);
if (_local1.DRONEMOVE < DRONEMOVE_WANDER_CW) {
_local1.Chase = _local1.Chase_SurfaceGrab;
if (_local1.DRONEMOVE == DRONEMOVE_SURFACEFOLLOW_CW) {
rot = AI_ROT_270;
} else if (_local1.DRONEMOVE == DRONEMOVE_SURFACEFOLLOW_CCW) {
rot = AI_ROT_90;
_local1.surfaceFutureDir = RotateAIDir(_local2, rot);
return(true);
return(false);
return(false);
}
_local1.surfaceFutureDir = RotateAIDir(_local2, rot);
}
return(true);
}
return(false);
return(false);
return(false);
};
DroneObject.prototype.FindTarget = function (dir, t) {
var _local3 = t;
var _local2 = 0;
var _local1 = this.cell;
if (dir < 2) {
if (dir == AI_DIR_R) {
while (_local2 < _local3) {
_local2++;
if (_local1.eR == EID_OFF) {
_local1 = _local1.nR;
continue;
while (_local1.eR == EID_OFF) {
_local2++;
_local1 = _local1.nR;
}
this.goal.x = this.cell.pos.x + (_local2 * (2 * this.cell.xw));
return(true);
if (dir == AI_DIR_D) {
while (_local2 < _local3) {
_local2++;
if (_local1.eD == EID_OFF) {
_local1 = _local1.nD;
continue;
while (_local1.eD == EID_OFF) {
_local2++;
_local1 = _local1.nD;
}
this.goal.y = this.cell.pos.y + (_local2 * (2 * this.cell.yw));
return(true);
return(false);
if (dir == AI_DIR_L) {
while (_local2 < _local3) {
_local2++;
if (_local1.eL == EID_OFF) {
_local1 = _local1.nL;
continue;
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
}
}
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
}
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
}
}
while (_local1.eD == EID_OFF) {
_local2++;
_local1 = _local1.nD;
}
this.goal.y = this.cell.pos.y + (_local2 * (2 * this.cell.yw));
return(true);
}
return(false);
if (dir == AI_DIR_L) {
while (_local2 < _local3) {
_local2++;
if (_local1.eL == EID_OFF) {
_local1 = _local1.nL;
continue;
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
}
}
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
}
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
}
}
while (_local1.eR == EID_OFF) {
_local2++;
_local1 = _local1.nR;
}
this.goal.x = this.cell.pos.x + (_local2 * (2 * this.cell.xw));
return(true);
}
if (dir == AI_DIR_D) {
while (_local2 < _local3) {
_local2++;
if (_local1.eD == EID_OFF) {
_local1 = _local1.nD;
continue;
while (_local1.eD == EID_OFF) {
_local2++;
_local1 = _local1.nD;
}
this.goal.y = this.cell.pos.y + (_local2 * (2 * this.cell.yw));
return(true);
return(false);
if (dir == AI_DIR_L) {
while (_local2 < _local3) {
_local2++;
if (_local1.eL == EID_OFF) {
_local1 = _local1.nL;
continue;
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
}
}
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
}
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
}
}
while (_local1.eD == EID_OFF) {
_local2++;
_local1 = _local1.nD;
}
this.goal.y = this.cell.pos.y + (_local2 * (2 * this.cell.yw));
return(true);
}
return(false);
}
if (dir == AI_DIR_L) {
while (_local2 < _local3) {
_local2++;
if (_local1.eL == EID_OFF) {
_local1 = _local1.nL;
continue;
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
}
}
while (_local1.eL == EID_OFF) {
_local2++;
_local1 = _local1.nL;
}
this.goal.x = this.cell.pos.x - (_local2 * (2 * this.cell.xw));
return(true);
}
if (dir == AI_DIR_U) {
while (_local2 < _local3) {
_local2++;
if (_local1.eU == EID_OFF) {
_local1 = _local1.nU;
continue;
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
return(false);
}
}
while (_local1.eU == EID_OFF) {
_local2++;
_local1 = _local1.nU;
}
this.goal.y = this.cell.pos.y - (_local2 * (2 * this.cell.yw));
return(true);
return(false);
return(false);
return(false);
}
return(false);
return(false);
};
DroneObject.prototype.GetNewGoal_Simple = function () {
var _local2 = this.moveList;
var _local3 = this.curDir;
var _local1 = RotateAIDir(_local3, _local2[0]);
if (this.TestEdge(_local1)) {
return(_local1);
}
_local1 = RotateAIDir(_local3, _local2[1]);
if (this.TestEdge(_local1)) {
return(_local1);
}
_local1 = RotateAIDir(_local3, _local2[2]);
if (this.TestEdge(_local1)) {
return(_local1);
}
_local1 = RotateAIDir(_local3, _local2[3]);
if (this.TestEdge(_local1)) {
return(_local1);
}
return(undefined);
};
DroneObject.prototype.GetNewGoal_ChuChuAlternating = function () {
var _local1 = this;
if (_local1.ai_counter2 == 0) {
_local1.moveList = MoveList_ChuChuCW;
var _local2 = _local1.GetNewGoal_Simple();
if (_local2 == _local1.curDir) {
} else {
_local1.ai_counter2 = 1;
}
return(_local2);
}
_local1.moveList = MoveList_ChuChuCCW;
var _local2 = _local1.GetNewGoal_Simple();
if (_local2 == _local1.curDir) {
} else {
_local1.ai_counter2 = 0;
}
return(_local2);
};
DroneObject.prototype.GetNewGoal_ChuChuRandom = function () {
var _local1 = this;
if ((_local1.ai_counter % 2) == 0) {
_local1.moveList = MoveList_ChuChuCW;
var _local2 = _local1.GetNewGoal_Simple();
if (_local2 == _local1.curDir) {
} else {
_local1.ai_counter = 1;
}
return(_local2);
}
_local1.moveList = MoveList_ChuChuCCW;
var _local2 = _local1.GetNewGoal_Simple();
if (_local2 == _local1.curDir) {
} else {
_local1.ai_counter = 0;
}
return(_local2);
};
DRONEWEAP_ZAP = 0;
DRONEWEAP_LASER = 1;
DRONEWEAP_CHAINGUN = 2;
DroneObject.prototype.TestVsPlayer = function (guy) {
};
DroneObject.prototype.TestVsPlayer_Zap = function (guy) {
var _local3 = this;
var p = guy.pos;
var _local2 = _local3.pos.x - p.x;
var _local1 = _local3.pos.y - p.y;
var len = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
if (len < (_local3.r + guy.r)) {
_local2 = _local2 / len;
_local1 = _local1 / len;
particles.SpawnZap(_local3.pos.x - (_local2 * _local3.r), _local3.pos.y - (_local1 * _local3.r), NormToRot(-_local2, -_local1));
game.KillPlayer(KILLTYPE_ELECTRIC, (-_local2) * 10, (-_local1) * 10, p.x + (guy.r * _local2), p.y + (guy.r * _local1), _local3);
}
};
DroneObject.prototype.Think = function () {
};
DroneObject.prototype.Think_TargetPlayer = function () {
var _local1 = this;
if (QueryRayObj(_local1.view, _local1.pos, player.pos, player)) {
_local1.StartFiring();
}
};
DroneObject.prototype.StartMoving = function () {
var _local1 = this;
objects.StartThink(_local1);
_local1.Update = _local1.Update_Move;
objects.StartDraw(_local1);
};
DroneObject.prototype.StartFiring_Laser = function () {
var _local1 = this;
_local1.mc.gotoAndPlay("laserdrone_prefire");
objects.EndThink(_local1);
objects.EndDraw(_local1);
_local1.fireDelayTimer = 0;
_local1.Update = _local1.Update_PreFire_Laser;
if (CollideRayvsTiles(_local1.targ, _local1.pos, _local1.view)) {
}
_local1.targ2.x = _local1.targ.x - _local1.pos.x;
_local1.targ2.y = _local1.targ.y - _local1.pos.y;
_local1.laserLen = Math.sqrt((_local1.targ2.x * _local1.targ2.x) + (_local1.targ2.y * _local1.targ2.y));
if (_local1.laserLen == 0) {
_local1.StopFiring();
} else {
_local1.beamMC._visible = true;
_local1.beamMC.clear();
_local1.beamMC.lineStyle(0, 13334137, 100);
_local1.beamMC.moveTo(_local1.pos.x, _local1.pos.y);
_local1.beamMC.lineTo(_local1.targ.x, _local1.targ.y);
_local1.beamdx = _local1.targ2.x / _local1.laserLen;
_local1.beamdy = _local1.targ2.y / _local1.laserLen;
}
};
DroneObject.prototype.StopFiring_Laser = function () {
var _local1 = this;
_local1.snd.stop();
_local1.mc.gotoAndPlay("laserdrone_postfire");
_local1.beamMC._visible = false;
_local1.blastMC._visible = false;
_local1.blastMC.gotoAndStop(1);
_local1.isFiring = false;
_local1.fireDelayTimer = 0;
_local1.Update = _local1.Update_PostFire_Laser;
};
DroneObject.prototype.Update_PreFire_Laser = function () {
var _local1 = this;
particles.SpawnLaserCharge(_local1.pos);
_local1.fireDelayTimer++;
if (_local1.prefireDelay <= _local1.fireDelayTimer) {
_local1.isFiring = true;
_local1.Fire_Laser();
}
};
DroneObject.prototype.Update_PostFire_Laser = function () {
var _local1 = this;
_local1.fireDelayTimer++;
if (_local1.postfireDelay <= _local1.fireDelayTimer) {
_local1.StartMoving();
}
};
DroneObject.prototype.Fire_Laser = function () {
var _local1 = this;
_local1.mc.gotoAndStop("laserdrone_firing");
_local1.beamMC.clear();
_local1.beamMC.lineStyle(3, 8921634, 100);
_local1.beamMC.moveTo(_local1.pos.x, _local1.pos.y);
_local1.beamMC.lineTo(_local1.targ.x, _local1.targ.y);
_local1.blastMC._x = _local1.targ.x;
_local1.blastMC._y = _local1.targ.y;
_local1.blastMC._visible = true;
_local1.blastMC._xscale = (_local1.blastMC._yscale = 0);
_local1.blastMC.gotoAndPlay(1);
_local1.laserLen = _local1.laserLen * _local1.laserLen;
_local1.laserTimer = 0;
_local1.Update = _local1.Update_FiringLaser;
};
DroneObject.prototype.Update_FiringLaser = function () {
var _local1 = this;
particles.SpawnLaserCharge(_local1.pos);
var ratio = (_local1.laserTimer / _local1.laserRate);
_local1.blastMC._xscale = (_local1.blastMC._yscale = 30 + (200 * ratio));
var dx = (player.pos.x - _local1.pos.x);
var dy = (player.pos.y - _local1.pos.y);
var _local2 = (dx * _local1.targ2.x) + (dy * _local1.targ2.y);
_local2 = _local2 / _local1.laserLen;
var px;
var _local3;
if (_local2 < 0) {
px = _local1.pos.x;
_local3 = _local1.pos.y;
} else if (_local2 < 1) {
px = _local1.pos.x + (_local2 * _local1.targ2.x);
_local3 = _local1.pos.y + (_local2 * _local1.targ2.y);
} else {
px = _local1.targ.x;
_local3 = _local1.targ.y;
}
var tx = (px - player.pos.x);
var ty = (_local3 - player.pos.y);
if (Math.sqrt((tx * tx) + (ty * ty)) < player.r) {
_local1.StopFiring_Laser();
var templen = Math.sqrt((_local1.targ2.x * _local1.targ2.x) + (_local1.targ2.y * _local1.targ2.y));
game.KillPlayer(KILLTYPE_LASER, 6 * (_local1.targ2.x / templen), 6 * (_local1.targ2.y / templen), px, _local3, _local1);
} else {
_local1.laserTimer++;
if (_local1.laserRate <= _local1.laserTimer) {
_local1.StopFiring();
}
}
};
DroneObject.prototype.StartFiring_Chaingun = function () {
var _local1 = this;
_local1.mc.gotoAndPlay("chaingundrone_prefire");
objects.EndThink(_local1);
objects.EndDraw(_local1);
_local1.fireDelayTimer = 0;
_local1.Update = _local1.Update_PreFire;
};
DroneObject.prototype.StopFiring_Chaingun = function () {
var _local1 = this;
_local1.snd.stop();
_local1.mc.gotoAndPlay("chaingundrone_postfire");
_local1.isFiring = false;
_local1.fireDelayTimer = 0;
_local1.Update = _local1.Update_PostFire_Chaingun;
};
DroneObject.prototype.Update_PreFire_Chaingun = function () {
var _local1 = this;
var dx = (player.pos.x - _local1.pos.x);
var _local3 = player.pos.y - _local1.pos.y;
var _local2 = NormToRot(dx, _local3);
if (180 < _local2) {
_local2 = _local2 - 360;
}
var dr = (_local2 - _local1.eyeMC._rotation);
_local1.eyeMC._rotation = _local1.eyeMC._rotation + (0.1 * dr);
_local1.fireDelayTimer++;
if (_local1.prefireDelay <= _local1.fireDelayTimer) {
_local1.isFiring = true;
_local1.Fire_Chaingun();
_local1.mc.gotoAndPlay("chaingundrone_fire");
}
};
DroneObject.prototype.Update_PostFire_Chaingun = function () {
var _local1 = this;
_local1.fireDelayTimer++;
if (_local1.postfireDelay <= _local1.fireDelayTimer) {
_local1.StartMoving();
}
};
DroneObject.prototype.Fire_Chaingun = function () {
var _local1 = this;
_local1.chaingunTimer = 0;
_local1.chaingunMaxNum = 4 + (game.GetTime() % 5);
_local1.chaingunSpread = 0.1 + (0.1 * (1 + (game.GetTime() % 3)));
_local1.chaingunCurNum = 0;
_local1.Update = _local1.Update_FiringChaingun;
var _local3 = player.pos.x - _local1.pos.x;
var _local2 = player.pos.y - _local1.pos.y;
var len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (len == 0) {
_local1.StopFiring();
} else {
_local3 = _local3 / len;
_local2 = _local2 / len;
_local1.targ.x = _local3;
_local1.targ.y = _local2;
var vx = (player.pos.x - player.oldpos.x);
var vy = (player.pos.y - player.oldpos.y);
var dp = ((vx * (-_local2)) + (vy * _local3));
if (dp < 0) {
_local1.targ2.x = _local2;
_local1.targ2.y = -_local3;
} else {
_local1.targ2.x = -_local2;
_local1.targ2.y = _local3;
}
}
};
DroneObject.prototype.Update_FiringChaingun = function () {
var _local1 = this;
_local1.chaingunTimer++;
if (_local1.chaingunRate <= _local1.chaingunTimer) {
_local1.chaingunTimer = 0;
if (_local1.chaingunMaxNum < _local1.chaingunCurNum) {
_local1.StopFiring_Chaingun();
} else {
var i = ((_local1.chaingunCurNum / _local1.chaingunMaxNum) - 0.5);
i = i * _local1.chaingunSpread;
var sx = (_local1.targ.x + (i * _local1.targ2.x));
var sy = (_local1.targ.y + (i * _local1.targ2.y));
_local1.targ3.x = _local1.pos.x + sx;
_local1.targ3.y = _local1.pos.y + sy;
if (QueryRayObj(_local1.view, _local1.pos, _local1.targ3, player)) {
_local1.StopFiring_Chaingun();
game.KillPlayer(KILLTYPE_SOFTBULLET, sx * 5, sy * 5, _local1.view.x, _local1.view.y, _local1);
}
var _local3 = _local1.view.x - _local1.pos.x;
var _local2 = _local1.view.y - _local1.pos.y;
var len = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 / len;
_local2 = _local2 / len;
var rot = NormToRot(_local3, _local2);
particles.SpawnChainBullet(_local1.pos, _local1.view, len, rot);
_local1.eyeMC._rotation = rot;
_local1.chaingunCurNum++;
}
}
};
function PlayerObject() {
var _local1 = this;
_local1.inputList = new Object();
_local1.inputList[PINPUT_L] = false;
_local1.inputList[PINPUT_R] = false;
_local1.inputList[PINPUT_J] = false;
_local1.inputList[PINPUT_JTRIG] = false;
_local1.pos = new Vector2(45, 70);
_local1.oldpos = _local1.pos.clone();
_local1.r = tiles.xw * 0.833333333333333;
_local1.xw = _local1.r;
_local1.yw = _local1.r;
_local1.prevframe = 1;
_local1.SetupParams();
objects.Register(_local1);
_local1.Tick = _local1.TickNormal;
_local1.Stand();
_local1.Draw = _local1.Draw_Normal;
player = _local1;
_local1.mc = gfx.CreateSprite("testNinjaMCm", LAYER_PLAYER);
_local1.snd = gfx.CreateSprite("playerSoundMC", LAYER_PLAYER);
_local1.sndloop = gfx.CreateSprite("playerSoundLoopMC", LAYER_PLAYER);
_local1.sndControl = new Sound(_local1.sndloop);
}
PlayerObject.prototype.Destruct = function () {
var _local1 = this;
_local1.raggy.Destruct();
delete _local1.raggy;
gfx.DestroyMC(_local1.mc);
delete _local1.mc;
gfx.DestroyMC(_local1.snd);
delete _local1.snd;
gfx.DestroyMC(_local1.sndloop);
delete _local1.mc;
};
PlayerObject.prototype.SetupParams = function () {
var _local1 = this;
_local1.isDead = false;
_local1.timeOfDeath = 0;
_local1.maxspeedAir = _local1.r * 0.5;
_local1.maxspeedGround = _local1.r * 0.5;
_local1.groundAccel = 0.15;
_local1.airAccel = 0.1;
_local1.normGrav = 0.15;
_local1.jumpGrav = 0.025;
_local1.normDrag = 0.99;
_local1.winDrag = 0.8;
_local1.wallFriction = 0.13;
_local1.skidFriction = 0.92;
_local1.standFriction = 0.8;
_local1.g = _local1.normGrav;
_local1.d = _local1.normDrag;
_local1.facingDir = 1;
_local1.jumpAmt = 1;
_local1.jump_y_bias = 2;
_local1.max_jump_time = 30;
_local1.terminal_vel = _local1.r * 0.9;
_local1.jumptimer = 0;
_local1.WAS_IN_AIR = true;
_local1.oldv = new Vector2(0, 0);
_local1.IN_AIR = true;
_local1.NEAR_WALL = false;
_local1.wallN = new Vector2(0, 0);
_local1.floorN = new Vector2(0, 0);
_local1.floorN0 = new Vector2(0, 0);
_local1.floorN1 = new Vector2(0, 0);
_local1.fCount = 0;
};
PlayerObject.prototype.Init = function (params) {
var _local1 = this;
var _local2 = params;
if (_local2.length != 2) {
} else {
_local1.pos.x = (_local1.oldpos.x = _local2[0]);
_local1.pos.y = (_local1.oldpos.y = _local2[1]);
_local1.xw = _local1.r;
_local1.yw = _local1.r;
_local1.SetupParams();
objects.AddToGrid(_local1);
objects.Moved(_local1);
objects.StartDraw(_local1);
_local1.Tick = _local1.TickNormal;
_local1.Stand();
_local1.raggy = new Ragdoll(_local1.pos, _local1.r, _local1.r * 2);
_local1.mc._xscale = (_local1.mc._yscale = _local1.r * 2);
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
}
};
PlayerObject.prototype.UnInit = function () {
objects.RemoveFromGrid(this);
objects.EndDraw(this);
};
PlayerObject.prototype.DumpInitData = function () {
var _local1 = (("" + this.pos.x) + OBJPARAM_SEPERATION_CHAR) + this.pos.y;
return(_local1);
};
PlayerObject.prototype.FaceDirection = function (dir) {
var _local1 = this;
var _local2 = dir;
if (_local1.facingDir == _local2) {
} else {
_local1.facingDir = _local2;
if (0 < _local2) {
_local1.mc._xscale = Math.abs(_local1.mc._xscale);
} else {
_local1.mc._xscale = -1 * Math.abs(_local1.mc._xscale);
}
}
};
PlayerObject.prototype.TickNormal = function () {
var _local1 = this;
p = _local1.pos;
o = _local1.oldpos;
var ox = o.x;
var oy = o.y;
var px = ((o.x = p.x));
var _local3 = (o.y = p.y);
var _local2 = _local1.d;
p.x = p.x + (_local2 * (px - ox));
p.y = p.y + ((_local2 * (_local3 - oy)) + _local1.g);
objects.Moved(_local1);
_local1.PrepareToCollide();
_local1.CollideVsObjects();
CollideCirclevsTileMap(_local1);
_local1.HandleCollisions();
objects.Moved(_local1);
_local1.Think();
};
PlayerObject.prototype.TickRagdoll = function () {
this.raggy.Tick();
};
PlayerObject.prototype.PrepareToCollide = function () {
var _local1 = this;
_local1.oldv.x = _local1.pos.x - _local1.oldpos.x;
_local1.oldv.y = _local1.pos.y - _local1.oldpos.y;
_local1.WAS_IN_AIR = _local1.IN_AIR;
_local1.NEAR_WALL = false;
_local1.IN_AIR = true;
_local1.fCount = 0;
};
PlayerObject.prototype.CollideVsObjects = function () {
var _local2 = this;
var _local1;
var _local3 = _local2.cell;
_local1 = _local3.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nD.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nD.nR.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nD.nL.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nL.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nL.nU.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nR.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nR.nU.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
_local1 = _local3.nU.next;
while (_local1 != null) {
_local1.TestVsPlayer(_local2);
_local1 = _local1.next;
}
};
PlayerObject.prototype.HandleCollisions = function () {
var _local1 = this;
if (0 < _local1.fCount) {
_local1.IN_AIR = false;
if (1 < _local1.fCount) {
var fdp = ((_local1.floorN0.x * _local1.floorN1.x) + (_local1.floorN0.y * _local1.floorN1.y));
if (0.9 < fdp) {
if ((_local1.floorN0.x == _local1.floorN.x) && (_local1.floorN0.y == _local1.floorN.y)) {
} else if ((_local1.floorN1.x == _local1.floorN.x) && (_local1.floorN1.y == _local1.floorN.y)) {
} else {
_local1.floorN.x = _local1.floorN1.x;
_local1.floorN.y = _local1.floorN1.y;
}
} else {
var _local2 = _local1.floorN;
_local2.x = 0.5 * (_local1.floorN0.x + _local1.floorN1.x);
_local2.y = 0.5 * (_local1.floorN0.y + _local1.floorN1.y);
var len = Math.sqrt((_local2.x * _local2.x) + (_local2.y * _local2.y));
if (len == 0) {
_local1.floorN.x = _local1.floorN0.x;
_local1.floorN.y = _local1.floorN0.y;
} else {
_local1.floorN.x = _local2.x / len;
_local1.floorN.y = _local2.y / len;
}
}
} else {
_local1.floorN.x = _local1.floorN0.x;
_local1.floorN.y = _local1.floorN0.y;
}
if (_local1.WAS_IN_AIR) {
var hit_dp = ((_local1.oldv.x * _local1.floorN.x) + (_local1.oldv.y * _local1.floorN.y));
hit_dp = hit_dp - (2 * Math.abs(_local1.floorN.y));
if ((0 < _local1.oldv.y) && (hit_dp < (-_local1.terminal_vel))) {
game.KillPlayer(KILLTYPE_FALL, 0, 0, _local1.pos.x, _local1.pos.y, _local1);
}
}
}
if (_local1.IN_AIR && (!_local1.NEAR_WALL)) {
var _local3 = _local1.pos;
var r = (_local1.r + 0.1);
if (QueryPointvsTileMap(_local3.x + r, _local3.y)) {
_local1.NEAR_WALL = true;
_local1.wallN.x = -1;
_local1.wallN.y = 0;
} else if (QueryPointvsTileMap(_local3.x - r, _local3.y)) {
_local1.NEAR_WALL = true;
_local1.wallN.x = 1;
_local1.wallN.y = 0;
}
}
};
PlayerObject.prototype.ReportCollisionVsWorld = function (px, py, nx, ny, t) {
var _local1 = this;
var _local2 = ny;
var _local3 = py;
_local1.pos.x = _local1.pos.x + px;
_local1.pos.y = _local1.pos.y + _local3;
if ((0.8 * (_local1.r * _local1.r)) < ((px * px) + (_local3 * _local3))) {
game.KillPlayer(KILLTYPE_EXPLOSIVE, 0, 0, _local1.pos.x, _local1.pos.y, _local1);
} else if (_local2 == 0) {
_local1.NEAR_WALL = true;
_local1.wallN.x = nx;
_local1.wallN.y = _local2;
} else if (_local2 < 0) {
if (_local1.fCount == 0) {
_local1.floorN0.x = nx;
_local1.floorN0.y = _local2;
_local1.fCount++;
} else if ((_local1.fCount = 1)) {
_local1.floorN1.x = nx;
_local1.floorN1.y = _local2;
_local1.fCount++;
}
}
};
PlayerObject.prototype.ReportCollisionVsObject = function (px, py, nx, ny, obj) {
var _local1 = this;
var _local2 = ny;
var _local3 = nx;
_local1.pos.x = _local1.pos.x + px;
_local1.pos.y = _local1.pos.y + py;
if (_local2 == 0) {
_local1.NEAR_WALL = true;
_local1.wallN.x = _local3;
_local1.wallN.y = _local2;
} else if (_local2 < 0) {
if (_local1.fCount == 0) {
_local1.floorN0.x = _local3;
_local1.floorN0.y = _local2;
_local1.fCount++;
} else if ((_local1.fCount = 1)) {
_local1.floorN1.x = _local3;
_local1.floorN1.y = _local2;
_local1.fCount++;
}
}
};
PlayerObject.prototype.IdleAfterDeath = function () {
this.CollideVsObjects = null;
};
function RagParticle(x, y, w, d, snd) {
var _local1 = this;
_local1.pos = new Vector2(x, y);
_local1.oldpos = new Vector2(x, y);
_local1.xw = w;
_local1.yw = w;
_local1.drag = d;
_local1.hit = false;
_local1.v = 0;
_local1.snd = snd;
}
function RagStick(p0, p1, w0, minratio, maxlen, linkage, scale, flip) {
var _local1 = this;
var _local2 = scale;
_local1.p0 = p0;
_local1.p1 = p1;
_local1.w0 = w0;
_local1.w1 = 1 - _local1.w0;
_local1.minlen = (maxlen * (_local2 / 100)) * minratio;
_local1.maxlen = maxlen * (_local2 / 100);
_local1.curlen = _local1.maxlen;
var dx = (p0.x - p1.x);
var _local3 = p0.y - p1.y;
_local1.len = Math.sqrt((dx * dx) + (_local3 * _local3));
_local1.mc = gfx.CreateSprite(linkage, LAYER_PLAYER);
_local1.mc._xscale = _local2;
_local1.mc._yscale = _local2;
_local1.flip = flip;
_local1.mc._visible = false;
}
function Ragdoll(pos, rad, scale) {
var _local1 = this;
var _local2 = pos;
var _local3 = rad;
_local1.snd = gfx.CreateSprite("ragdollSoundMC", LAYER_PLAYER);
_local1.pList = new Object();
_local1.pList.b0 = new RagParticle(_local2.x, _local2.y, 2.5, 0.99, _local1.snd);
_local1.pList.b1 = new RagParticle(_local2.x, _local2.y - _local3, 2.5, 0.995, _local1.snd);
_local1.pList.h0 = new RagParticle(_local2.x + _local3, _local2.y - _local3, 2, 0.995, _local1.snd);
_local1.pList.h1 = new RagParticle(_local2.x - _local3, _local2.y - _local3, 2, 0.99, _local1.snd);
_local1.pList.f0 = new RagParticle(_local2.x + _local3, _local2.y + _local3, 3, 0.99, _local1.snd);
_local1.pList.f1 = new RagParticle(_local2.x - _local3, _local2.y + _local3, 3, 0.995, _local1.snd);
_local1.sList = new Object();
_local1.sList.armL = new RagStick(_local1.pList.b1.pos, _local1.pList.h1.pos, 0.26, 0.6, 40, "arm_m", scale, -1);
_local1.sList.legL = new RagStick(_local1.pList.b0.pos, _local1.pList.f1.pos, 0.37, 0.6, 60, "leg_m", scale, 1);
_local1.sList.body = new RagStick(_local1.pList.b0.pos, _local1.pList.b1.pos, 0.4, 0.8, 30, "body_m", scale, 1);
_local1.sList.legR = new RagStick(_local1.pList.b0.pos, _local1.pList.f0.pos, 0.32, 0.6, 60, "leg_m", scale, 1);
_local1.sList.armR = new RagStick(_local1.pList.b1.pos, _local1.pList.h0.pos, 0.2, 0.6, 40, "arm_m", scale, -1);
_local1.exploded = false;
}
RagParticle.prototype.ReportCollisionVsWorld = function (x, y, nx, ny, t) {
var _local1 = this;
var _local2 = _local1.pos;
var o = _local1.oldpos;
var vx = (_local2.x - o.x);
var vy = (_local2.y - o.y);
var dp = ((vx * nx) + (vy * ny));
var bx = (dp * nx);
var _local3 = dp * ny;
var px = (vx - bx);
var py = (vy - _local3);
if (dp < 0) {
if (dp < -3) {
particles.SpawnRagBloodSpurt(_local2.x, _local2.y, -bx, -_local3);
var n = (game.GetTime() % 3);
if (n == 0) {
_local1.snd.gotoAndPlay("hard1");
} else if (n == 1) {
_local1.snd.gotoAndPlay("hard2");
} else if (n == 2) {
_local1.snd.gotoAndPlay("hard3");
}
} else {
if (dp < -2) {
if ((game.GetTime() % 2) == 0) {
_local1.snd.gotoAndPlay("med1");
} else {
_local1.snd.gotoAndPlay("med2");
}
} else if (dp < -1) {
if ((game.GetTime() % 2) == 0) {
_local1.snd.gotoAndPlay("soft1");
} else {
_local1.snd.gotoAndPlay("soft2");
}
}
var temp = ((px * px) + (py * py));
if (0.3 < temp) {
particles.SpawnRagDust(_local1.pos, _local1.xw, px, py, temp);
}
}
bx = bx * 1.4;
_local3 = _local3 * 1.4;
} else {
_local3 = 0;
bx = _local3;
}
_local2.x = _local2.x + x;
_local2.y = _local2.y + y;
o.x = o.x + ((x + bx) + (px * 0.15));
o.y = o.y + ((y + _local3) + (py * 0.15));
_local1.hit = true;
};
Ragdoll.prototype.Destruct = function () {
var _local2 = this;
var _local1;
for (var _local3 in _local2.sList) {
_local1 = _local2.sList[_local3];
DestroyMC(_local1.mc);
delete _local1.mc;
}
};
Ragdoll.prototype.Hide = function () {
var _local1 = this.sList;
for (var _local2 in _local1) {
_local1.mc._visible = false;
}
};
Ragdoll.prototype.Tick = function () {
var _local3 = this.pList;
for (var i in _local3) {
var _local1 = _local3[i].pos;
var o = _local3[i].oldpos;
var ox = o.x;
var oy = o.y;
var px = ((o.x = _local1.x));
var py = ((o.y = _local1.y));
var vx = (px - ox);
var vy = (py - oy);
var d = _local3[i].drag;
_local1.x = _local1.x + (d * vx);
_local1.y = _local1.y + ((d * vy) + 0.15);
_local3[i].v = (vx * vx) + (vy * vy);
}
var sl = this.sList;
for (var i in sl) {
var _local2 = sl[i];
var p0 = _local2.p0;
var p1 = _local2.p1;
var mn = _local2.minlen;
var maax = _local2.maxlen;
var dx = (p0.x - p1.x);
var dy = (p0.y - p1.y);
var clen = Math.sqrt((dx * dx) + (dy * dy));
var d0 = 0;
var d1 = 0;
if (clen == 0) {
continue;
}
if (clen < mn) {
d0 = (d1 = (clen - mn) / clen);
} else if (maax < clen) {
d0 = (d1 = (clen - maax) / clen);
} else {
_local2.curlen = clen;
continue;
}
_local2.curlen = clen - d0;
d0 = d0 * _local2.w0;
d1 = d1 * _local2.w1;
p0.x = p0.x - (dx * d0);
p0.y = p0.y - (dy * d0);
p1.x = p1.x + (dx * d1);
p1.y = p1.y + (dy * d1);
}
for (var i in _local3) {
var _local1 = _local3[i];
if (_local1.v < 2) {
CollideAABBvsTileMap(_local1);
} else if (_local1.v < 3) {
var tx = _local1.pos.x;
var ty = _local1.pos.y;
_local1.hit = false;
CollideAABBvsTileMap(_local1);
if (_local1.hit) {
var cx = (0.5 * (tx + _local1.oldpos.x));
var cy = (0.5 * (ty + _local1.oldpos.y));
var vx = (tx - cx);
var vy = (ty - cy);
_local1.oldpos.x = _local1.oldpos.x - vx;
_local1.oldpos.y = _local1.oldpos.y - vy;
_local1.pos.x = cx;
_local1.pos.y = cy;
_local1.hit = false;
CollideAABBvsTileMap(_local1);
if (!_local1.hit) {
_local1.pos.x = tx;
_local1.pos.y = ty;
_local1.oldpos.x = _local1.oldpos.x + vx;
_local1.oldpos.y = _local1.oldpos.y + vy;
}
}
} else {
var tx = _local1.pos.x;
var ty = _local1.pos.y;
var a = 0.333333333333333;
var b = 0.666666666666667;
_local1.hit = false;
CollideAABBvsTileMap(_local1);
if (_local1.hit) {
var cx = ((b * tx) + (a * _local1.oldpos.x));
var cy = ((b * ty) + (a * _local1.oldpos.y));
tx = _local1.pos.x;
ty = _local1.pos.y;
var vx = (tx - cx);
var vy = (ty - cy);
_local1.oldpos.x = _local1.oldpos.x - vx;
_local1.oldpos.y = _local1.oldpos.y - vy;
_local1.pos.x = cx;
_local1.pos.y = cy;
_local1.hit = false;
CollideAABBvsTileMap(_local1);
if (_local1.hit) {
cx = (a * tx) + (b * _local1.oldpos.x);
cy = (a * ty) + (b * _local1.oldpos.y);
tx = _local1.pos.x;
ty = _local1.pos.y;
vx = tx - cx;
vy = ty - cy;
_local1.oldpos.x = _local1.oldpos.x - vx;
_local1.oldpos.y = _local1.oldpos.y - vy;
_local1.pos.x = cx;
_local1.pos.y = cy;
_local1.hit = false;
CollideAABBvsTileMap(_local1);
if (!_local1.hit) {
_local1.pos.x = tx;
_local1.pos.y = ty;
_local1.oldpos.x = _local1.oldpos.x + vx;
_local1.oldpos.y = _local1.oldpos.y + vy;
}
} else {
_local1.pos.x = tx;
_local1.pos.y = ty;
_local1.oldpos.x = _local1.oldpos.x + vx;
_local1.oldpos.y = _local1.oldpos.y + vy;
}
}
}
}
};
Ragdoll.prototype.Explode = function () {
var pl = this.pList;
var sl = this.sList;
var _local2 = pl.b1;
var t0 = new RagParticle(_local2.pos.x, _local2.pos.y, _local2.xw, _local2.drag);
var t1 = new RagParticle(_local2.pos.x, _local2.pos.y, _local2.xw, _local2.drag);
sl.armL.p0 = t0.pos;
sl.armR.p0 = t1.pos;
var _local3 = pl.b0;
var t2 = new RagParticle(_local3.pos.x, _local3.pos.y, _local3.xw, _local3.drag);
var t3 = new RagParticle(_local3.pos.x, _local3.pos.y, _local3.xw, _local3.drag);
sl.legL.p0 = t2.pos;
sl.legR.p0 = t3.pos;
pl.t0 = t0;
pl.t1 = t1;
pl.t2 = t2;
pl.t3 = t3;
var force = 8;
var _local1 = force * 0.5;
var quarter_force = (force * 0.25);
var rnd = Math.random;
var r0 = ((rnd() * force) - _local1);
var r1 = ((rnd() * force) - _local1);
var r2 = ((rnd() * force) - _local1);
var r3 = ((rnd() * force) - _local1);
var r4 = ((rnd() * _local1) + _local1);
var r5 = ((rnd() * _local1) + _local1);
var r6 = ((rnd() * _local1) + _local1);
var r7 = ((rnd() * _local1) + _local1);
t0.oldpos.x = t0.oldpos.x - r0;
t1.oldpos.x = t1.oldpos.x - r1;
t2.oldpos.x = t2.oldpos.x - r2;
t3.oldpos.x = t3.oldpos.x - r3;
t0.oldpos.y = t0.oldpos.y + r4;
t1.oldpos.y = t1.oldpos.y + r5;
t2.oldpos.y = t2.oldpos.y + r6;
t3.oldpos.y = t3.oldpos.y + r7;
this.exploded = true;
particles.SpawnBloodSpurt(t0.pos.x, t0.pos.y, r0, r4, 3);
particles.SpawnBloodSpurt(t1.pos.x, t1.pos.y, r1, r5, 3);
particles.SpawnBloodSpurt(t2.pos.x, t2.pos.y, r2, r6, 3);
particles.SpawnBloodSpurt(t3.pos.x, t3.pos.y, r3, r7, 3);
};
Ragdoll.prototype.UnExplode = function () {
var _local3 = this;
var _local1 = _local3.pList;
var _local2 = _local3.sList;
_local2.armL.p0 = _local1.b1.pos;
_local2.armR.p0 = _local1.b1.pos;
_local2.legL.p0 = _local1.b0.pos;
_local2.legR.p0 = _local1.b0.pos;
delete _local1.t0;
delete _local1.t1;
delete _local1.t2;
delete _local1.t3;
_local3.exploded = false;
};
Ragdoll.prototype.Activate = function () {
var _local1 = this.sList;
for (var _local2 in _local1) {
temp = _local1[_local2].mc;
temp._visible = true;
}
};
Ragdoll.prototype.Deactivate = function () {
var _local1 = this.sList;
for (var _local2 in _local1) {
temp = _local1[_local2].mc;
temp._visible = false;
}
};
Ragdoll.prototype.MimicMC = function (vx, vy, mc, facing, prevframe) {
var _local2 = this;
var _local3 = mc;
for (var i in _local2.pList) {
}
var sL = _local2.sList;
if (facing < 0) {
var dir = 1;
} else {
var dir = -1;
}
var temp;
for (var i in sL) {
temp = sL[i].mc;
temp._yscale = (sL[i].flip * dir) * Math.abs(temp._yscale);
}
var _local1 = new Object();
var pL = _local2.pList;
var b0 = pL.b0;
var b1 = pL.b1;
var h0 = pL.h0;
var h1 = pL.h1;
var f0 = pL.f0;
var f1 = pL.f1;
_local1.x = _local3.shoulder._x;
_local1.y = _local3.shoulder._y;
_local3.localToGlobal(_local1);
b1.pos.x = _local1.x;
b1.pos.y = _local1.y;
_local1.x = _local3.pelvis._x;
_local1.y = _local3.pelvis._y;
_local3.localToGlobal(_local1);
b0.pos.x = _local1.x;
b0.pos.y = _local1.y;
_local1.x = _local3.handR._x;
_local1.y = _local3.handR._y;
_local3.localToGlobal(_local1);
h0.pos.x = _local1.x;
h0.pos.y = _local1.y;
_local1.x = _local3.handL._x;
_local1.y = _local3.handL._y;
_local3.localToGlobal(_local1);
h1.pos.x = _local1.x;
h1.pos.y = _local1.y;
_local1.x = _local3.footR._x;
_local1.y = _local3.footR._y;
_local3.localToGlobal(_local1);
f0.pos.x = _local1.x;
f0.pos.y = _local1.y;
_local1.x = _local3.footL._x;
_local1.y = _local3.footL._y;
_local3.localToGlobal(_local1);
f1.pos.x = _local1.x;
f1.pos.y = _local1.y;
_local3.gotoAndStop(prevframe);
_local1.x = _local3.shoulder._x;
_local1.y = _local3.shoulder._y;
_local3.localToGlobal(_local1);
b1.oldpos.x = _local1.x - vx;
b1.oldpos.y = _local1.y - vy;
_local1.x = _local3.pelvis._x;
_local1.y = _local3.pelvis._y;
_local3.localToGlobal(_local1);
b0.oldpos.x = _local1.x - vx;
b0.oldpos.y = _local1.y - vy;
_local1.x = _local3.handR._x;
_local1.y = _local3.handR._y;
_local3.localToGlobal(_local1);
h0.oldpos.x = _local1.x - vx;
h0.oldpos.y = _local1.y - vy;
_local1.x = _local3.handL._x;
_local1.y = _local3.handL._y;
_local3.localToGlobal(_local1);
h1.oldpos.x = _local1.x - vx;
h1.oldpos.y = _local1.y - vy;
_local1.x = _local3.footR._x;
_local1.y = _local3.footR._y;
_local3.localToGlobal(_local1);
f0.oldpos.x = _local1.x - vx;
f0.oldpos.y = _local1.y - vy;
_local1.x = _local3.footL._x;
_local1.y = _local3.footL._y;
_local3.localToGlobal(_local1);
f1.oldpos.x = _local1.x - vx;
f1.oldpos.y = _local1.y - vy;
for (var i in _local2.pList) {
}
};
Ragdoll.prototype.Shove = function (x, y) {
var _local1 = this;
var _local3 = y;
for (var _local2 in _local1.pList) {
_local1.pList[_local2].oldpos.x = _local1.pList[_local2].oldpos.x - (x * (Math.random() + 0.4));
_local1.pList[_local2].oldpos.y = _local1.pList[_local2].oldpos.y - (_local3 * (Math.random() + 0.4));
}
};
Ragdoll.prototype.Shove_VertBias = function (fx, fy, px, py, midy, rad) {
var pL = this.pList;
var b0 = pL.b0;
var b1 = pL.b1;
var h0 = pL.h0;
var h1 = pL.h1;
var f0 = pL.f0;
var f1 = pL.f1;
var _local2 = (py - midy) / rad;
var near_bias = 0.8;
var mid_bias = 0.4;
var far_bias = 0.2;
var wb0 = 1;
var _local3 = 1;
var wf = 1;
if (_local2 < 0) {
if (_local2 < -1) {
wb0 = mid_bias;
_local3 = near_bias;
wf = far_bias;
} else {
_local2 = _local2 * -1;
var i = (1 - _local2);
wb0 = (i * near_bias) + (_local2 * mid_bias);
_local3 = (i * mid_bias) + (_local2 * near_bias);
wf = (i * mid_bias) + (_local2 * far_bias);
}
} else if (0 < _local2) {
if (1 < _local2) {
wb0 = mid_bias;
wf = near_bias;
_local3 = far_bias;
} else {
var i = (1 - _local2);
wb0 = (i * near_bias) + (_local2 * mid_bias);
wf = (i * mid_bias) + (_local2 * near_bias);
_local3 = (i * mid_bias) + (_local2 * far_bias);
}
} else {
_local3 = 0.4;
wb0 = 0.4;
wf = 0.4;
}
var _local1 = Math.random;
b0.oldpos.x = b0.oldpos.x - ((_local1() + wb0) * fx);
b0.oldpos.y = b0.oldpos.y - ((_local1() + wb0) * fy);
b1.oldpos.x = b1.oldpos.x - ((_local1() + _local3) * fx);
b1.oldpos.y = b1.oldpos.y - ((_local1() + _local3) * fy);
var wf0 = (wf * (0.8 + (0.2 * _local1())));
var wf1 = (wf * (0.9 + (0.1 * _local1())));
f0.oldpos.x = f0.oldpos.x - ((_local1() + wf0) * fx);
f0.oldpos.y = f0.oldpos.y - ((_local1() + wf0) * fy);
f1.oldpos.x = f1.oldpos.x - ((_local1() + wf1) * fx);
f1.oldpos.y = f1.oldpos.y - ((_local1() + wf1) * fy);
var wh0 = (_local3 * (0.9 + (0.1 * _local1())));
var wh1 = (_local3 * (0.8 + (0.2 * _local1())));
h0.oldpos.x = h0.oldpos.x - ((_local1() + wh0) * fx);
h0.oldpos.y = h0.oldpos.y - ((_local1() + wh0) * fy);
h1.oldpos.x = h1.oldpos.x - ((_local1() + wh1) * fx);
h1.oldpos.y = h1.oldpos.y - ((_local1() + wh1) * fy);
};
Ragdoll.prototype.DrawDebug = function () {
static_rend.SetStyle(0, 16777215, 20);
var _local3 = this.sList;
var _local2;
for (var i in _local3) {
_local2 = _local3[i];
static_rend.DrawLine(_local2.p0, _local2.p1);
}
var pl = this.pList;
var _local1;
for (var i in pl) {
_local1 = pl[i];
static_rend.DrawAABB(_local1.pos, _local1.xw, _local1.yw);
}
};
Ragdoll.prototype.Draw = function () {
var sL = this.sList;
var denom = (Math.PI/180);
for (var i in sL) {
var s = sL[i];
var mc = s.mc;
var p0 = s.p0;
var p1 = s.p1;
var _local2 = p1.x - p0.x;
var _local1 = p1.y - p0.y;
mc._x = p0.x;
mc._y = p0.y;
var len = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
mc.gotoAndStop(1 + Math.floor(100 * (len / s.maxlen)));
_local2 = _local2 / len;
_local1 = _local1 / len;
var _local3 = 0;
if (_local2 == 0) {
if (_local1 < 0) {
_local3 = -90;
} else if (0 < _local1) {
_local3 = 90;
}
} else if (_local1 == 0) {
if (_local2 < 0) {
_local3 = 180;
} else {
_local3 = 0;
}
} else {
_local3 = Math.atan(_local1 / _local2) / denom;
if (_local2 < 0) {
_local3 = _local3 + 180;
}
}
mc._rotation = _local3;
}
};
PSTATE_STANDING = 0;
PSTATE_RUNNING = 1;
PSTATE_SKIDDING = 2;
PSTATE_JUMPING = 3;
PSTATE_FALLING = 4;
PSTATE_WALLSLIDING = 5;
PSTATE_RAGDOLL = 6;
PSTATE_CELEBRATING = 7;
PlayerObject.prototype.Think = function () {
var _local1 = this;
game.GetInputState(_local1.inputList);
var inList = _local1.inputList;
var R = inList[PINPUT_R];
var L = inList[PINPUT_L];
var J = inList[PINPUT_J];
var J_TRIG = inList[PINPUT_JTRIG];
var _local2 = _local1.pos.x - _local1.oldpos.x;
var vy = (_local1.pos.y - _local1.oldpos.y);
var curState = _local1.curState;
var traction = 1;
var _local3 = 0;
if (L) {
_local3 = _local3 - 1;
}
if (R) {
_local3 = _local3 + 1;
}
if (_local1.IN_AIR) {
var rot = _local1.mc._rotation;
_local1.mc._rotation = _local1.mc._rotation - (0.1 * rot);
var temp = (_local2 + (_local3 * _local1.airAccel));
if (Math.abs(temp) < _local1.maxspeedAir) {
_local2 = temp;
}
_local1.oldpos.x = _local1.pos.x - _local2;
if (curState < 3) {
_local1.Fall();
return;
}
if (curState == PSTATE_JUMPING) {
_local1.jumptimer++;
if ((!J) || (_local1.jumptimer > _local1.max_jump_time)) {
_local1.Fall();
return;
}
} else {
if (curState == PSTATE_FALLING) {
}
if (_local1.NEAR_WALL) {
if (J_TRIG) {
var horiz_amt = 0;
var vert_amt = 0;
if ((curState == PSTATE_WALLSLIDING) && ((_local3 * _local1.wallN.x) < 0)) {
horiz_amt = 1;
vert_amt = 0.5;
} else {
horiz_amt = 1.5;
vert_amt = 0.7;
}
particles.SpawnJumpDust(_local1.pos.x - (_local1.wallN.x * _local1.r), _local1.pos.y - (_local1.wallN.y * _local1.r), _local1.wallN.x * 90);
_local1.Jump(_local1.wallN.x * horiz_amt, _local1.wallN.y - vert_amt);
return;
}
if (curState == PSTATE_WALLSLIDING) {
if (0 < (_local3 * _local1.wallN.x)) {
_local1.Fall();
return;
}
var ay = Math.abs(vy);
var fy = ((-(_local1.wallFriction * traction)) * ay);
_local1.oldpos.y = _local1.pos.y - (vy + fy);
particles.SpawnWallDust(_local1.pos, _local1.r, _local1.wallN, ay);
var vol = Math.min(100, Math.floor(ay * 70));
_local1.sndControl.setVolume(vol);
} else if ((0 < vy) && ((_local3 * _local1.wallN.x) < 0)) {
_local1.Wallslide();
} else {
// unexpected jump
if (curState == PSTATE_WALLSLIDING) {
_local1.Fall();
} else {
return;
var temp = (_local2 + ((traction * _local3) * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = temp;
}
_local1.oldpos.x = _local1.pos.x - _local2;
if (2 < curState) {
particles.SpawnLandDust(_local1.pos.x - (_local1.r * _local1.floorN.x), _local1.pos.y - (_local1.r * _local1.floorN.y), NormToRot(_local1.floorN.x, _local1.floorN.y) + 90, Math.abs(_local2) + vy);
_local1.snd.gotoAndPlay("land");
if (0 < (_local2 * _local3)) {
_local1.Run(_local3);
return;
}
_local1.Skid();
} else if (J_TRIG) {
particles.SpawnJumpDust(_local1.pos.x - (_local1.floorN.x * _local1.r), _local1.pos.y - (_local1.floorN.y * _local1.r), _local1.mc._rotation);
if ((_local3 * _local1.floorN.x) < 0) {
_local1.Jump(0, -0.7);
} else {
_local1.Jump(_local1.floorN.x, _local1.floorN.y);
}
} else if (curState == PSTATE_RUNNING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = ((_local2 * (-ny)) + (vy * nx));
var adp = Math.abs(dp);
var tx = (_local2 * adp);
if ((_local3 * tx) <= 0) {
_local1.Skid();
return;
}
if ((_local3 * nx) < 0) {
var fy = (-Math.abs(nx));
if (nx < 0) {
var fx = (-ny);
} else {
var fx = ny;
}
var amt = Math.abs(ny);
fx = fx * (0.5 * amt);
fy = fy * (0.5 * amt);
var tempX = (_local2 + (fx * _local1.groundAccel));
var tempY = (vy + (fy * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = tempX;
vy = tempY;
}
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
_local1.AdvanceRunAnim(_local2, vy, nx, ny);
} else if (curState == PSTATE_SKIDDING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
var tx = (_local2 * dp);
if (0 < (tx * _local3)) {
_local1.Run(_local3);
return;
}
particles.SpawnFloorDust(_local1.pos, _local1.r, _local1.floorN, _local1.mc._rotation, _local1.facingDir, dp);
if (dp < 0.1) {
_local1.Stand();
} else {
var f = (_local1.skidFriction * traction);
_local2 = _local2 * f;
_local1.oldpos.x = _local1.pos.x - _local2;
var vol = Math.min(100, Math.floor(dp * 100));
_local1.sndControl.setVolume(vol);
return;
if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
} else if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
}
} else if (curState == PSTATE_WALLSLIDING) {
_local1.Fall();
} else {
return;
var temp = (_local2 + ((traction * _local3) * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = temp;
}
_local1.oldpos.x = _local1.pos.x - _local2;
if (2 < curState) {
particles.SpawnLandDust(_local1.pos.x - (_local1.r * _local1.floorN.x), _local1.pos.y - (_local1.r * _local1.floorN.y), NormToRot(_local1.floorN.x, _local1.floorN.y) + 90, Math.abs(_local2) + vy);
_local1.snd.gotoAndPlay("land");
if (0 < (_local2 * _local3)) {
_local1.Run(_local3);
return;
}
_local1.Skid();
} else if (J_TRIG) {
particles.SpawnJumpDust(_local1.pos.x - (_local1.floorN.x * _local1.r), _local1.pos.y - (_local1.floorN.y * _local1.r), _local1.mc._rotation);
if ((_local3 * _local1.floorN.x) < 0) {
_local1.Jump(0, -0.7);
} else {
_local1.Jump(_local1.floorN.x, _local1.floorN.y);
}
} else if (curState == PSTATE_RUNNING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = ((_local2 * (-ny)) + (vy * nx));
var adp = Math.abs(dp);
var tx = (_local2 * adp);
if ((_local3 * tx) <= 0) {
_local1.Skid();
return;
}
if ((_local3 * nx) < 0) {
var fy = (-Math.abs(nx));
if (nx < 0) {
var fx = (-ny);
} else {
var fx = ny;
}
var amt = Math.abs(ny);
fx = fx * (0.5 * amt);
fy = fy * (0.5 * amt);
var tempX = (_local2 + (fx * _local1.groundAccel));
var tempY = (vy + (fy * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = tempX;
vy = tempY;
}
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
_local1.AdvanceRunAnim(_local2, vy, nx, ny);
} else if (curState == PSTATE_SKIDDING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
var tx = (_local2 * dp);
if (0 < (tx * _local3)) {
_local1.Run(_local3);
return;
}
particles.SpawnFloorDust(_local1.pos, _local1.r, _local1.floorN, _local1.mc._rotation, _local1.facingDir, dp);
if (dp < 0.1) {
_local1.Stand();
} else {
var f = (_local1.skidFriction * traction);
_local2 = _local2 * f;
_local1.oldpos.x = _local1.pos.x - _local2;
var vol = Math.min(100, Math.floor(dp * 100));
_local1.sndControl.setVolume(vol);
return;
if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
} else if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
return;
var temp = (_local2 + ((traction * _local3) * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = temp;
}
_local1.oldpos.x = _local1.pos.x - _local2;
if (2 < curState) {
particles.SpawnLandDust(_local1.pos.x - (_local1.r * _local1.floorN.x), _local1.pos.y - (_local1.r * _local1.floorN.y), NormToRot(_local1.floorN.x, _local1.floorN.y) + 90, Math.abs(_local2) + vy);
_local1.snd.gotoAndPlay("land");
if (0 < (_local2 * _local3)) {
_local1.Run(_local3);
return;
}
_local1.Skid();
} else if (J_TRIG) {
particles.SpawnJumpDust(_local1.pos.x - (_local1.floorN.x * _local1.r), _local1.pos.y - (_local1.floorN.y * _local1.r), _local1.mc._rotation);
if ((_local3 * _local1.floorN.x) < 0) {
_local1.Jump(0, -0.7);
} else {
_local1.Jump(_local1.floorN.x, _local1.floorN.y);
}
} else if (curState == PSTATE_RUNNING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = ((_local2 * (-ny)) + (vy * nx));
var adp = Math.abs(dp);
var tx = (_local2 * adp);
if ((_local3 * tx) <= 0) {
_local1.Skid();
return;
}
if ((_local3 * nx) < 0) {
var fy = (-Math.abs(nx));
if (nx < 0) {
var fx = (-ny);
} else {
var fx = ny;
}
var amt = Math.abs(ny);
fx = fx * (0.5 * amt);
fy = fy * (0.5 * amt);
var tempX = (_local2 + (fx * _local1.groundAccel));
var tempY = (vy + (fy * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = tempX;
vy = tempY;
}
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
_local1.AdvanceRunAnim(_local2, vy, nx, ny);
} else if (curState == PSTATE_SKIDDING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
var tx = (_local2 * dp);
if (0 < (tx * _local3)) {
_local1.Run(_local3);
return;
}
particles.SpawnFloorDust(_local1.pos, _local1.r, _local1.floorN, _local1.mc._rotation, _local1.facingDir, dp);
if (dp < 0.1) {
_local1.Stand();
} else {
var f = (_local1.skidFriction * traction);
_local2 = _local2 * f;
_local1.oldpos.x = _local1.pos.x - _local2;
var vol = Math.min(100, Math.floor(dp * 100));
_local1.sndControl.setVolume(vol);
return;
if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
} else if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
} else {
var temp = (_local2 + ((traction * _local3) * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = temp;
}
_local1.oldpos.x = _local1.pos.x - _local2;
if (2 < curState) {
particles.SpawnLandDust(_local1.pos.x - (_local1.r * _local1.floorN.x), _local1.pos.y - (_local1.r * _local1.floorN.y), NormToRot(_local1.floorN.x, _local1.floorN.y) + 90, Math.abs(_local2) + vy);
_local1.snd.gotoAndPlay("land");
if (0 < (_local2 * _local3)) {
_local1.Run(_local3);
return;
}
_local1.Skid();
} else if (J_TRIG) {
particles.SpawnJumpDust(_local1.pos.x - (_local1.floorN.x * _local1.r), _local1.pos.y - (_local1.floorN.y * _local1.r), _local1.mc._rotation);
if ((_local3 * _local1.floorN.x) < 0) {
_local1.Jump(0, -0.7);
} else {
_local1.Jump(_local1.floorN.x, _local1.floorN.y);
}
} else if (curState == PSTATE_RUNNING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = ((_local2 * (-ny)) + (vy * nx));
var adp = Math.abs(dp);
var tx = (_local2 * adp);
if ((_local3 * tx) <= 0) {
_local1.Skid();
return;
}
if ((_local3 * nx) < 0) {
var fy = (-Math.abs(nx));
if (nx < 0) {
var fx = (-ny);
} else {
var fx = ny;
}
var amt = Math.abs(ny);
fx = fx * (0.5 * amt);
fy = fy * (0.5 * amt);
var tempX = (_local2 + (fx * _local1.groundAccel));
var tempY = (vy + (fy * _local1.groundAccel));
if (Math.abs(temp) < _local1.maxspeedGround) {
_local2 = tempX;
vy = tempY;
}
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
_local1.AdvanceRunAnim(_local2, vy, nx, ny);
} else if (curState == PSTATE_SKIDDING) {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
var tx = (_local2 * dp);
if (0 < (tx * _local3)) {
_local1.Run(_local3);
return;
}
particles.SpawnFloorDust(_local1.pos, _local1.r, _local1.floorN, _local1.mc._rotation, _local1.facingDir, dp);
if (dp < 0.1) {
_local1.Stand();
} else {
var f = (_local1.skidFriction * traction);
_local2 = _local2 * f;
_local1.oldpos.x = _local1.pos.x - _local2;
var vol = Math.min(100, Math.floor(dp * 100));
_local1.sndControl.setVolume(vol);
return;
if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
} else if (_local3 != 0) {
_local1.Run(_local3);
} else {
var nx = _local1.floorN.x;
var ny = _local1.floorN.y;
var dp = Math.abs((_local2 * (-ny)) + (vy * nx));
if (0.1 <= dp) {
_local1.Skid();
} else {
var f = (_local1.standFriction * traction);
_local2 = _local2 * f;
vy = vy * f;
_local1.oldpos.x = _local1.pos.x - _local2;
_local1.oldpos.y = _local1.pos.y - vy;
}
}
}
};
PlayerObject.prototype.ThinkRagdoll = function () {
};
PlayerObject.prototype.ThinkCelebrate = function () {
var _local1 = this;
if (_local1.IN_AIR) {
if (_local1.celeb_wasinair) {
} else {
_local1.d = _local1.normDrag;
_local1.Render = _local1.RenderInAir;
_local1.celeb_wasinair = true;
}
} else {
if (_local1.celeb_wasinair) {
_local1.d = _local1.winDrag;
_local1.Render = _local1.RenderStatic_Ground;
var _local2 = game.GetTime() % 4;
if (_local2 == 0) {
_local1.mc.gotoAndPlay("CELEBRATE_NEW1");
} else if (_local2 == 1) {
_local1.mc.gotoAndPlay("CELEBRATE_NEW2");
} else if (_local2 == 2) {
_local1.mc.gotoAndPlay("CELEBRATE_NEW3");
} else if (_local2 == 3) {
_local1.mc.gotoAndPlay("CELEBRATE_NEW4");
}
}
_local1.celeb_wasinair = false;
}
};
PlayerObject.prototype.Jump = function (x, y) {
var _local1 = this;
_local1.ExitState();
_local1.ExitState = _local1.ExitJump;
_local1.curState = PSTATE_JUMPING;
_local1.g = _local1.jumpGrav;
var _local3 = _local1.pos.x - _local1.oldpos.x;
var _local2 = _local1.pos.y - _local1.oldpos.y;
if ((_local3 * x) < 0) {
_local1.oldpos.x = _local1.pos.x;
}
if ((_local2 * y) < 0) {
_local1.oldpos.y = _local1.pos.y;
}
_local1.pos.x = _local1.pos.x + (x * _local1.jumpAmt);
_local1.pos.y = _local1.pos.y + (y * (_local1.jumpAmt + _local1.jump_y_bias));
_local1.jumptimer = 0;
_local1.mc._rotation = 0;
_local1.Render = _local1.RenderInAir;
_local1.snd.gotoAndPlay("jump");
};
PlayerObject.prototype.ExitJump = function () {
this.g = this.normGrav;
};
PlayerObject.prototype.Fall = function () {
var _local1 = this;
_local1.ExitState();
_local1.ExitState = _local1.ExitFall;
_local1.curState = PSTATE_FALLING;
_local1.Render = _local1.RenderInAir;
};
PlayerObject.prototype.ExitFall = function () {
};
PlayerObject.prototype.Wallslide = function () {
var _local1 = this;
_local1.ExitState();
_local1.ExitState = _local1.ExitWallslide;
_local1.curState = PSTATE_WALLSLIDING;
_local1.FaceDirection(-_local1.wallN.x);
_local1.mc._rotation = 0;
_local1.Render = _local1.RenderWallSlide;
_local1.mc.gotoAndStop("WALLSLIDE");
_local1.sndControl.setVolume(0);
_local1.sndloop.gotoAndPlay("wallslide_start");
};
PlayerObject.prototype.ExitWallslide = function () {
this.sndloop.gotoAndPlay("wallslide_stop");
this.sndControl.setVolume(100);
};
PlayerObject.prototype.Skid = function () {
var _local1 = this;
_local1.ExitState();
_local1.ExitState = _local1.ExitSkid;
_local1.curState = PSTATE_SKIDDING;
_local1.Render = _local1.RenderStatic_Ground;
_local1.mc.gotoAndStop("SKID");
_local1.sndControl.setVolume(100);
_local1.sndloop.gotoAndPlay("skid_start");
};
PlayerObject.prototype.ExitSkid = function () {
this.sndloop.gotoAndPlay("skid_stop");
this.sndControl.setVolume(100);
};
PlayerObject.prototype.Run = function (dirX) {
var _local1 = this;
_local1.ExitState();
_local1.ExitState = _local1.ExitRun;
_local1.curState = PSTATE_RUNNING;
_local1.Render = _local1.RenderRun;
_local1.mc.gotoAndStop("RUN");
_local1.runanimleftovers = 0;
};
PlayerObject.prototype.ExitRun = function () {
};
PlayerObject.prototype.Stand = function () {
var _local1 = this;
_local1.ExitState();
_local1.ExitState = _local1.ExitStand;
_local1.curState = PSTATE_STANDING;
_local1.Render = _local1.RenderStatic_Ground;
_local1.mc.gotoAndPlay("STAND");
};
PlayerObject.prototype.ExitStand = function () {
};
PlayerObject.prototype.Launch = function (x, y) {
var _local1 = this;
_local1.oldpos.x = _local1.pos.x;
_local1.oldpos.y = _local1.pos.y;
_local1.pos.x = _local1.pos.x + x;
_local1.pos.y = _local1.pos.y + y;
_local1.Fall();
};
PlayerObject.prototype.Die = function (x, y, px, py, KTYPE) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
if (KTYPE == KILLTYPE_EXPLOSIVE) {
if ((game.GetTime() % 2) == 0) {
_local1.snd.gotoAndPlay("explode1");
} else {
_local1.snd.gotoAndPlay("explode2");
}
} else if (KTYPE == KILLTYPE_FALL) {
_local1.snd.gotoAndPlay("fall");
} else if (KTYPE == KILLTYPE_LASER) {
_local1.snd.gotoAndPlay("laser");
} else if (KTYPE == KILLTYPE_ELECTRIC) {
if ((game.GetTime() % 2) == 0) {
_local1.snd.gotoAndPlay("zap1");
} else {
_local1.snd.gotoAndPlay("zap1");
}
} else if ((game.GetTime() % 2) == 0) {
_local1.snd.gotoAndPlay("shot1");
} else {
_local1.snd.gotoAndPlay("shot2");
}
particles.SpawnBloodSpurt(px, py, _local3, _local2, 6 + Math.floor(Math.random() * 8));
_local1.ExitState();
_local1.ExitState = _local1.ExitDie;
_local1.curState = PSTATE_RAGDOLL;
_local1.Tick = _local1.TickRagdoll;
_local1.Think = null;
_local1.Draw = _local1.Draw_Ragdoll;
_local1.mc._visible = false;
_local1.isDead = true;
_local1.timeOfDeath = game.GetTime();
var vx = (_local1.pos.x - _local1.oldpos.x);
var vy = (_local1.pos.y - _local1.oldpos.y);
_local1.raggy.Activate();
_local1.raggy.MimicMC(vx, vy, _local1.mc, _local1.facingDir, _local1.prevframe);
if (KTYPE == KILLTYPE_FALL) {
} else {
if (!_local1.IN_AIR) {
var dp = ((_local1.floorN.x * _local3) + (_local1.floorN.y * _local2));
if (dp < 0) {
var fx = (dp * _local1.floorN.x);
var fy = (dp * _local1.floorN.y);
var tx = (_local3 - fx);
var ty = (_local2 - fy);
static_rend.SetStyle(0, 2237064, 100);
static_rend.DrawLine_S(_local1.pos.x, _local1.pos.y, _local1.pos.x + fx, _local1.pos.y + fy);
static_rend.SetStyle(0, 8921634, 100);
static_rend.DrawLine_S(_local1.pos.x, _local1.pos.y, _local1.pos.x + tx, _local1.pos.y + ty);
_local3 = _local3 - (fx * 0.85);
_local2 = _local2 - (fy * 0.85);
_local3 = _local3 + (tx * 0.4);
_local2 = _local2 + (ty * 0.4);
}
}
if (_local1.NEAR_WALL) {
var dp = ((_local1.wallN.x * _local3) + (_local1.wallN.y * _local2));
if (dp < 0) {
var fx = (dp * _local1.wallN.x);
var fy = (dp * _local1.wallN.y);
var tx = (_local3 - fx);
var ty = (_local2 - fy);
static_rend.SetStyle(0, 2237064, 100);
static_rend.DrawLine_S(_local1.pos.x, _local1.pos.y, _local1.pos.x + fx, _local1.pos.y + fy);
static_rend.SetStyle(0, 8921634, 100);
static_rend.DrawLine_S(_local1.pos.x, _local1.pos.y, _local1.pos.x + tx, _local1.pos.y + ty);
_local3 = _local3 - (fx * 0.85);
_local2 = _local2 - (fy * 0.85);
_local3 = _local3 + (tx * 0.4);
_local2 = _local2 + (ty * 0.4);
}
}
_local1.raggy.Shove_VertBias(_local3, _local2, px, py, _local1.pos.y, _local1.r);
}
_local1.TickRagdoll();
};
PlayerObject.prototype.ExitDie = function () {
var _local1 = this;
if (_local1.raggy.exploded) {
_local1.raggy.Unexplode();
}
_local1.raggy.Deactivate();
_local1.isDead = false;
_local1.timeOfDeath = 0;
_local1.Tick = _local1.TickNormal;
_local1.Think = PlayerObject.prototype.Think;
_local1.mc._visible = true;
_local1.Draw = _local1.Draw_Normal;
};
PlayerObject.prototype.Celebrate = function () {
var _local1 = this;
_local1.ExitState();
_local1.ExitState = _local1.ExitCelebrate;
_local1.curState = PSTATE_CELEBRATING;
_local1.Think = _local1.ThinkCelebrate;
_local1.celeb_wasinair = _local1.IN_AIR;
};
PlayerObject.prototype.ExitCelebrate = function () {
var _local1 = this;
_local1.d = _local1.normDrag;
_local1.Think = PlayerObject.prototype.Think;
};
PlayerObject.prototype.Draw_Normal = function () {
var _local1 = this;
_local1.prevframe = _local1.mc._currentframe;
_local1.Render();
};
PlayerObject.prototype.Draw_Ragdoll = function () {
this.raggy.Draw();
};
PlayerObject.prototype.FaceMovement = function () {
var _local2 = this;
var _local1 = _local2.pos.x - _local2.oldpos.x;
if (_local1 == 0) {
} else if (0 < _local1) {
_local2.FaceDirection(1);
} else if (_local1 < 0) {
_local2.FaceDirection(-1);
}
};
PlayerObject.prototype.RenderWallSlide = function () {
var _local1 = this;
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
};
PlayerObject.prototype.RenderInAir = function () {
var _local1 = this;
_local1.FaceMovement();
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
var _local2 = _local1.pos.y - _local1.oldpos.y;
var miny = -1;
var maxy = 2.5;
var _local3 = 0;
if (_local2 < 0) {
if (_local2 < miny) {
_local3 = -1;
} else {
_local3 = -(_local2 / miny);
}
} else if (maxy < _local2) {
_local3 = 1;
} else {
_local3 = Math.sqrt(_local2 / maxy);
}
var offset = Math.floor(_local3 * 9);
_local1.mc.gotoAndStop(94 + offset);
};
PlayerObject.prototype.RenderRun = function () {
var _local1 = this;
_local1.FaceMovement();
_local1.mc.gotoAndStop(_local1.runanimcurframe);
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
var _local3 = _local1.floorN.x;
var dy = _local1.floorN.y;
var _local2 = 0;
if (_local3 == 0) {
_local2 = -90;
} else if (dy == 0) {
if (_local3 < 0) {
_local2 = 180;
} else {
_local2 = 0;
}
} else {
_local2 = Math.atan(dy / _local3) / (Math.PI/180);
if (_local3 < 0) {
_local2 = _local2 + 180;
}
}
_local2 = _local2 + 90;
_local1.mc._rotation = _local2;
};
PlayerObject.prototype.AdvanceRunAnim = function (vx, vy, nx, ny) {
var _local2 = this;
var len = Math.abs((vx * (-ny)) + (vy * nx));
var _local3 = 13;
var framevel = 0.9;
var runanimlen = 72;
var curframe = (_local2.mc._currentframe - _local3);
var _local1 = len / framevel;
_local1 = _local1 + _local2.runanimleftovers;
var framestepfloor = Math.floor(_local1);
_local2.runanimleftovers = _local1 - framestepfloor;
var nextframe = ((curframe + framestepfloor) % runanimlen);
_local2.runanimcurframe = _local3 + nextframe;
};
PlayerObject.prototype.RenderDebug = function () {
var _local1 = this;
static_rend.SetStyle(0, 0, 25);
static_rend.DrawAABB(_local1.pos, _local1.xw, _local1.yw);
static_rend.DrawCircle(_local1.pos, _local1.r);
};
PlayerObject.prototype.RenderStatic = function () {
var _local1 = this;
_local1.FaceMovement();
_local1.mc._x = _local1.pos.x;
_local1.mc._y = _local1.pos.y;
};
PlayerObject.prototype.RenderStatic_Ground = function () {
var _local2 = this;
_local2.FaceMovement();
_local2.mc._x = _local2.pos.x;
_local2.mc._y = _local2.pos.y;
var _local3 = _local2.floorN.x;
var dy = _local2.floorN.y;
var _local1 = 0;
if (_local3 == 0) {
_local1 = -90;
} else if (dy == 0) {
if (_local3 < 0) {
_local1 = 180;
} else {
_local1 = 0;
}
} else {
_local1 = Math.atan(dy / _local3) / (Math.PI/180);
if (_local3 < 0) {
_local1 = _local1 + 180;
}
}
_local1 = _local1 + 90;
_local2.mc._rotation = _local1;
};
function NinjaGame() {
var _local1 = this;
_local1.LoadDemo = _local1.LoadDemo_Complex;
_local1.StartRecordingDemo = _local1.StartRecordingDemo_Complex;
_local1.StopRecordingDemo = _local1.StopRecordingDemo_Complex;
_local1.StartDemoPlayback = _local1.StartDemoPlayback_Complex;
_local1.StopDemoPlayback = _local1.StopDemoPlayback_Complex;
_local1.DumpDemoData = _local1.DumpDemoData_Complex;
_local1.RecordFrame = _local1.RecordFrame_Complex;
_local1.GetInputState_DemoPlayback = _local1.GetInputState_DemoPlayback_Complex;
_local1.KEYDEF_L = userdata.GetLeftKey();
_local1.KEYDEF_R = userdata.GetRightKey();
_local1.KEYDEF_J = userdata.GetJumpKey();
_local1.playerMaxTime = 3600;
_local1.playerCurTime = 3600;
_local1.playerStartingTime = 3600;
_local1.playerBonusTime = 80;
_local1.RECORDING_DEMO = false;
_local1.mapStr = "";
_local1.objStr = "";
_local1.tickCounter = 0;
_local1.demoTickCount = 0;
_local1.GetInputState = _local1.GetInputState_Normal;
}
NinjaGame.prototype.SetKeyDefs = function (jdef, ldef, rdef) {
var _local1 = this;
_local1.KEYDEF_L = ldef;
_local1.KEYDEF_R = rdef;
_local1.KEYDEF_J = jdef;
};
NinjaGame.prototype.InitNewGame = function () {
var _local1 = this;
_local1.playerCurTime = (_local1.playerStartingTime = _local1.playerMaxTime);
_local1.tickCounter = 0;
};
NinjaGame.prototype.InitNewLevel = function () {
var _local1 = this;
_local1.playerStartingTime = _local1.playerCurTime;
_local1.tickCounter = 0;
};
NinjaGame.prototype.InitRetryLevel = function () {
var _local1 = this;
_local1.playerCurTime = _local1.playerStartingTime;
_local1.tickCounter = 0;
};
NinjaGame.prototype.Tick = function () {
debug_rend.Clear();
static_rend.Clear();
objects.Tick();
player.Tick();
this.tickCounter++;
};
NinjaGame.prototype.Draw = function () {
objects.Draw();
};
NinjaGame.prototype.DrawPlayerTime = function () {
gui.DrawPlayerTime(this.playerCurTime, this.playerMaxTime);
};
NinjaGame.prototype.FillPlayerTime = function () {
gui.FillPlayerTime(this.playerCurTime, this.playerMaxTime);
};
NinjaGame.prototype.GetPlayerTime = function () {
return(this.playerCurTime);
};
NinjaGame.prototype.GetTime = function () {
return(this.tickCounter);
};
NinjaGame.prototype.GiveBonusTime = function () {
this.playerCurTime = this.playerCurTime + this.playerBonusTime;
};
KILLTYPE_ELECTRIC = 0;
KILLTYPE_EXPLOSIVE = 1;
KILLTYPE_WEAKBULLET = 2;
KILLTYPE_HARDBULLET = 3;
KILLTYPE_FALL = 4;
KILLTYPE_LASER = 5;
NinjaGame.prototype.KillPlayer = function (killtype, fx, fy, px, py, obj) {
if (!player.isDead) {
player.Die(fx, fy, px, py, killtype);
if (killtype == KILLTYPE_EXPLOSIVE) {
player.raggy.Explode();
}
App_PlayerDeathEvent();
var _local1 = "You were killed by ";
var _local2 = objects.GetObjType(obj);
if (_local2 == OBJTYPE_PLAYER) {
_local1 = _local1 + "yourself!! looooooser!!";
} else {
_local1 = _local1 + ("a " + obj.name);
}
console.AddLine(_local1);
}
};
LEVEL_SEPERATION_CHAR = "|";
OBJECT_SEPERATION_CHAR = "!";
OBJTYPE_SEPERATION_CHAR = "^";
OBJPARAM_SEPERATION_CHAR = ",";
DEMOFRAME_SEPERATION_CHAR = "|";
DEMOTICKS_SEPERATION_CHAR = ":";
NinjaGame.prototype.DumpLevelData = function () {
var _local1 = this.DumpMapData();
var _local3 = this.DumpObjData();
var _local2 = (_local1 + LEVEL_SEPERATION_CHAR) + _local3;
return(_local2);
};
NinjaGame.prototype.DumpMapData = function () {
var _local1 = tiles.GetTileStates();
return(_local1);
};
NinjaGame.prototype.DumpObjData = function () {
var _local1 = objects.GetObjectStates();
return(_local1);
};
PINPUT_L = 0;
PINPUT_R = 1;
PINPUT_J = 2;
PINPUT_JTRIG = 3;
BITSHIFT_L = 0;
BITSHIFT_R = 1;
BITSHIFT_J = 2;
BITSHIFT_JTRIG = 3;
BITMASK_L = 1 << BITSHIFT_L;
BITMASK_R = 1 << BITSHIFT_R;
BITMASK_J = 1 << BITSHIFT_J;
BITMASK_JTRIG = 1 << BITSHIFT_JTRIG;
BITMASK_FRAME = ((BITMASK_L + BITMASK_R) + BITMASK_J) + BITMASK_JTRIG;
shiftList = new Array();
shiftList[0] = 0;
shiftList[1] = 4;
shiftList[2] = 8;
shiftList[3] = 12;
shiftList[4] = 16;
shiftList[5] = 20;
shiftList[6] = 24;
NUM_BITPACKS = shiftList.length;
NinjaGame.prototype.GetInputState_Normal = function (inList) {
var _local1 = inList;
var _local2 = this;
_local1[PINPUT_L] = Key.isDown(_local2.KEYDEF_L);
_local1[PINPUT_R] = Key.isDown(_local2.KEYDEF_R);
var _local3 = _local1[PINPUT_J];
_local1[PINPUT_J] = Key.isDown(_local2.KEYDEF_J) || (Key.isDown(90));
_local1[PINPUT_JTRIG] = _local1[PINPUT_J] && (!_local3);
if (_local2.RECORDING_DEMO) {
_local2.RecordFrame(_local1);
}
};
NinjaGame.prototype.GetDemoTickCount = function () {
return(this.demoTickCount);
};
NinjaGame.prototype.StartRecordingDemo_Complex = function () {
var _local1 = this;
console.AddLine("-demo recording started..");
_local1.GetInputState = _local1.GetInputState_Normal;
_local1.RECORDING_DEMO = true;
_local1.demoTickCount = 0;
_local1.demoList = new Array();
_local1.demoList.push(0);
_local1.demoCurShift = 0;
};
NinjaGame.prototype.StopRecordingDemo_Complex = function () {
var _local1 = this;
_local1.RECORDING_DEMO = false;
_local1.demoTickCount = _local1.demoTickCount - 1;
if (_local1.demoTickCount < 0) {
_local1.demoTickCount = 0;
}
console.AddLine("-demo recording stopped.");
};
NinjaGame.prototype.LoadDemo_Complex = function (demoStr) {
var _local3 = this;
var temp = demoStr.split(DEMOTICKS_SEPERATION_CHAR);
_local3.demoTickCount = Number(temp[0]);
var _local2 = temp[1].split(DEMOFRAME_SEPERATION_CHAR);
_local3.demoList = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.demoList[_local1] = Number(_local2[_local1]);
_local1++;
}
console.AddLine("-demo loaded.");
};
NinjaGame.prototype.StartDemoPlayback_Complex = function () {
var _local1 = this;
console.AddLine("-demo playback started..");
_local1.GetInputState = _local1.GetInputState_DemoPlayback;
_local1.demoCurPlayEntry = 0;
_local1.demoCurShift = 0;
};
NinjaGame.prototype.StopDemoPlayback_Complex = function () {
console.AddLine("-demo playback stopped.");
this.GetInputState = this.GetInputState_Normal;
};
NinjaGame.prototype.DumpDemoData_Complex = function () {
var _local3 = this;
var _local2 = "";
_local2 = _local2 + (_local3.demoTickCount + DEMOTICKS_SEPERATION_CHAR);
var _local1 = 0;
while (_local1 < _local3.demoList.length) {
_local2 = _local2 + _local3.demoList[_local1];
_local2 = _local2 + DEMOFRAME_SEPERATION_CHAR;
_local1++;
}
if (0 < _local2.length) {
var lastD = _local2.lastIndexOf(DEMOFRAME_SEPERATION_CHAR);
_local2 = _local2.substring(0, lastD);
}
return(_local2);
};
NinjaGame.prototype.RecordFrame_Complex = function (inList) {
var _local1 = this;
var _local2 = inList;
if (3600 <= _local1.demoList.length) {
_local1.StopRecordingDemo();
} else {
var bit_l = Number(_local2[PINPUT_L]);
var _local3 = Number(_local2[PINPUT_R]);
var bit_j = Number(_local2[PINPUT_J]);
var bit_jtrig = Number(_local2[PINPUT_JTRIG]);
var framebits = ((((0 + (bit_L << BITSHIFT_L)) + (_local3 << BITSHIFT_R)) + (bit_J << BITSHIFT_J)) + (bit_jtrig << BITSHIFT_JTRIG));
var curShift = shiftList[_local1.demoCurShift];
_local1.demoList[_local1.demoList.length - 1] = _local1.demoList[_local1.demoList.length - 1] + (framebits << curShift);
_local1.demoCurShift++;
if (NUM_BITPACKS <= _local1.demoCurShift) {
_local1.demoList.push(0);
_local1.demoCurShift = 0;
}
_local1.demoTickCount++;
}
};
NinjaGame.prototype.GetInputState_DemoPlayback_Complex = function (inList) {
var _local2 = this;
var _local3 = inList;
if (_local2.demoTickCount <= game.GetTime()) {
_local2.StopDemoPlayback();
} else {
var _local1 = _local2.demoList[_local2.demoCurPlayEntry];
_local1 = _local1 >> shiftList[_local2.demoCurShift];
_local1 = _local1 & BITMASK_FRAME;
var bit_l = (_local1 & BITMASK_L);
var bit_r = (_local1 & BITMASK_R);
var bit_j = (_local1 & BITMASK_J);
var bit_jtrig = (_local1 & BITMASK_JTRIG);
_local3[PINPUT_L] = Boolean(bit_l);
_local3[PINPUT_R] = Boolean(bit_r);
_local3[PINPUT_J] = Boolean(bit_j);
_local3[PINPUT_JTRIG] = Boolean(bit_jtrig);
_local2.demoCurShift++;
if (NUM_BITPACKS <= _local2.demoCurShift) {
_local2.demoCurPlayEntry++;
_local2.demoCurShift = 0;
}
}
};
NinjaGame.prototype.InitLoadLevel = function (str) {
var _local2 = this;
_local2.levStr = str;
var _local1 = _local2.levStr.split(LEVEL_SEPERATION_CHAR);
_local2.InitLoadMap(_local1[0]);
_local2.InitLoadObjects(_local1[1]);
};
NinjaGame.prototype.InitLoadMap = function (str) {
var _local1 = this;
_local1.mapStr = str;
_local1.CUR_CHAR = 0;
_local1.NUM_ROWS = tiles.cols;
_local1.NUM_COLS = tiles.rows;
_local1.CUR_COL = 0;
_local1.CUR_ROW = 0;
_local1.MAP_LOADED = false;
};
NinjaGame.prototype.LoadingMap = function () {
var _local1 = this;
if (_local1.NUM_ROWS <= _local1.CUR_ROW) {
_local1.CUR_COL++;
_local1.CUR_ROW = 0;
}
if (_local1.NUM_COLS <= _local1.CUR_COL) {
return(false);
}
tiles.SetTileState(_local1.CUR_COL, _local1.CUR_ROW, _local1.mapStr.charCodeAt(_local1.CUR_CHAR));
_local1.CUR_CHAR++;
_local1.CUR_ROW++;
return(true);
};
NinjaGame.prototype.InitLoadObjects = function (str) {
var _local2 = this;
objects.Clear();
_local2.objStr = str;
if (0 < _local2.objStr.length) {
_local2.oStrArray = _local2.objStr.split(OBJECT_SEPERATION_CHAR);
var _local1 = 0;
while (_local1 < _local2.oStrArray.length) {
_local1++;
}
_local2.CURRENT_OBJ_LOADING = 0;
_local2.objParamList = new Array();
_local2.objUIDList = new Array();
} else {
_local2.CUR_OBJ_LOADING = 0;
_local2.oStrArray = new Array();
_local2.objParamList = new Array();
_local2.objUIDList = new Array();
}
};
NinjaGame.prototype.InitReloadObjects = function () {
this.InitLoadObjects(this.objStr);
};
NinjaGame.prototype.LoadingObjects = function () {
var _local2 = this;
if (_local2.CURRENT_OBJ_LOADING < _local2.oStrArray.length) {
var temp = _local2.oStrArray[_local2.CURRENT_OBJ_LOADING].split(OBJTYPE_SEPERATION_CHAR);
var _local1 = temp[1].split(OBJPARAM_SEPERATION_CHAR);
for (var _local3 in _local1) {
_local1[_local3] = Number(_local1[_local3]);
}
_local2.objUIDList.push(objects.SpawnGameObject(Number(temp[0]), _local1));
_local2.objParamList.push(_local1);
_local2.CURRENT_OBJ_LOADING++;
return(true);
}
return(false);
};
function NinjaEditor() {
var _local1 = this;
_local1.levStr = "";
_local1.mapStr = "";
_local1.objStr = "";
_local1.rend = new VectorRenderer();
_local1.objList = new Array();
_local1.objnum = 0;
_local1.pointer = gfx.CreateSprite("editorCursor", LAYER_EDITOR);
_local1.pointer._visible = false;
_local1.objMenuMC = gfx.CreateSprite("editorObjMenuMC", LAYER_EDITOR);
_local1.objMenuMC._x = 0;
_local1.objMenuMC._y = 0;
_local1.objMenuMC._visible = false;
_local1.tileMenuMC = gfx.CreateSprite("editorTileMenuMC", LAYER_EDITOR);
_local1.tileMenuMC._x = 100;
_local1.tileMenuMC._y = 0;
_local1.tileMenuMC._visible = false;
_local1.setObjTypeKeys = new Object();
_local1.setObjTypeKeys[EOBJTYPE_GOLD] = 48;
_local1.setObjTypeKeys[EOBJTYPE_BOUNCEBLOCK] = 189;
_local1.setObjTypeKeys[EOBJTYPE_LAUNCHPAD] = 187;
_local1.setObjTypeKeys[EOBJTYPE_TURRET] = 49;
_local1.setObjTypeKeys[EOBJTYPE_FLOORGUARD] = 52;
_local1.setObjTypeKeys[EOBJTYPE_PLAYER] = 57;
_local1.setObjTypeKeys[EOBJTYPE_MINE] = 51;
_local1.setObjTypeKeys[EOBJTYPE_ONEWAYPLATFORM] = 219;
_local1.setObjTypeKeys[EOBJTYPE_THWOMP] = 53;
_local1.setObjTypeKeys[EOBJTYPE_EXIT] = 221;
_local1.setObjTypeKeys[EOBJTYPE_HOMINGLAUNCHER] = 50;
_local1.setObjTypeKeys[EOBJTYPE_TREKDOOR] = 73;
_local1.setObjTypeKeys[EOBJTYPE_LOCKDOOR] = 79;
_local1.setObjTypeKeys[EOBJTYPE_TRAPDOOR] = 80;
_local1.setObjTypeKeys[EOBJTYPE_ZAPDRONE] = 54;
_local1.setObjTypeKeys[EOBJTYPE_LASERDRONE] = 55;
_local1.setObjTypeKeys[EOBJTYPE_CHAINGUNDRONE] = 56;
_local1.currentEOBJTYPE = EOBJTYPE_GOLD;
_local1.currentOBJTYPE = OBJTYPE_GOLD;
_local1.objTypes = new Object();
_local1.objTypes[EOBJTYPE_GOLD] = OBJTYPE_GOLD;
_local1.objTypes[EOBJTYPE_BOUNCEBLOCK] = OBJTYPE_BOUNCEBLOCK;
_local1.objTypes[EOBJTYPE_LAUNCHPAD] = OBJTYPE_LAUNCHPAD;
_local1.objTypes[EOBJTYPE_TURRET] = OBJTYPE_TURRET;
_local1.objTypes[EOBJTYPE_FLOORGUARD] = OBJTYPE_FLOORGUARD;
_local1.objTypes[EOBJTYPE_PLAYER] = OBJTYPE_PLAYER;
_local1.objTypes[EOBJTYPE_MINE] = OBJTYPE_MINE;
_local1.objTypes[EOBJTYPE_ONEWAYPLATFORM] = OBJTYPE_ONEWAYPLATFORM;
_local1.objTypes[EOBJTYPE_THWOMP] = OBJTYPE_THWOMP;
_local1.objTypes[EOBJTYPE_EXIT] = OBJTYPE_EXIT;
_local1.objTypes[EOBJTYPE_HOMINGLAUNCHER] = OBJTYPE_HOMINGLAUNCHER;
_local1.objTypes[EOBJTYPE_TREKDOOR] = OBJTYPE_TESTDOOR;
_local1.objTypes[EOBJTYPE_LOCKDOOR] = OBJTYPE_TESTDOOR;
_local1.objTypes[EOBJTYPE_TRAPDOOR] = OBJTYPE_TESTDOOR;
_local1.objTypes[EOBJTYPE_ZAPDRONE] = OBJTYPE_DRONE;
_local1.objTypes[EOBJTYPE_LASERDRONE] = OBJTYPE_DRONE;
_local1.objTypes[EOBJTYPE_CHAINGUNDRONE] = OBJTYPE_DRONE;
_local1.tileTypeList = new Object();
_local1.tileTypeList[1] = new Array(TID_45DEGnn, TID_45DEGnp, TID_45DEGpp, TID_45DEGpn);
_local1.tileTypeList[2] = new Array(TID_67DEGnnS, TID_67DEGnpS, TID_67DEGppS, TID_67DEGpnS);
_local1.tileTypeList[3] = new Array(TID_22DEGnnS, TID_22DEGnpS, TID_22DEGppS, TID_22DEGpnS);
_local1.tileTypeList[4] = new Array(TID_CONCAVEnn, TID_CONCAVEnp, TID_CONCAVEpp, TID_CONCAVEpn);
_local1.tileTypeList[5] = new Array(TID_HALFl, TID_HALFd, TID_HALFr, TID_HALFu);
_local1.tileTypeList[6] = new Array(TID_67DEGnnB, TID_67DEGnpB, TID_67DEGppB, TID_67DEGpnB);
_local1.tileTypeList[7] = new Array(TID_22DEGnnB, TID_22DEGnpB, TID_22DEGppB, TID_22DEGpnB);
_local1.tileTypeList[8] = new Array(TID_CONVEXnn, TID_CONVEXnp, TID_CONVEXpp, TID_CONVEXpn);
_local1.tileCurType = 1;
_local1.MUST_BUILD_EDIT_OBJS = false;
}
EOBJTYPE_GOLD = 0;
EOBJTYPE_BOUNCEBLOCK = 1;
EOBJTYPE_LAUNCHPAD = 2;
EOBJTYPE_TURRET = 3;
EOBJTYPE_FLOORGUARD = 4;
EOBJTYPE_PLAYER = 5;
EOBJTYPE_MINE = 6;
EOBJTYPE_ONEWAYPLATFORM = 7;
EOBJTYPE_THWOMP = 8;
EOBJTYPE_EXIT = 9;
EOBJTYPE_HOMINGLAUNCHER = 10;
EOBJTYPE_TREKDOOR = 11;
EOBJTYPE_LOCKDOOR = 12;
EOBJTYPE_TRAPDOOR = 13;
EOBJTYPE_ZAPDRONE = 14;
EOBJTYPE_LASERDRONE = 15;
EOBJTYPE_CHAINGUNDRONE = 16;
NinjaEditor.prototype.Start = function () {
var _local1 = this;
_local1.MUST_BUILD_EDIT_OBJS = true;
for (var _local2 in _local1.objList) {
_local1.objList[_local2][EDITRECORD_MC]._visible = true;
_local1.objList[_local2][EDITRECORD_MC2]._visible = true;
}
_local1.StartEditMenu();
};
NinjaEditor.prototype.Exit = function () {
var _local1 = this;
_local1.rend.Clear();
_local1.pointer._visible = false;
_local1.objMenuMC._visible = false;
_local1.tileMenuMC_visible = false;
_local1.SetTxtBox(_local1.DumpData());
_local1.MUST_BUILD_EDIT_OBJS = false;
_local1.SpawnGameObjects();
for (var _local3 in _local1.objList) {
_local1.objList[_local3][EDITRECORD_MC]._visible = false;
_local1.objList[_local3][EDITRECORD_MC2]._visible = false;
}
var _local2;
for (var _local3 in _local1.objList) {
_local2 = _local1.objList.pop();
gfx.DestroyMC(_local2[EDITRECORD_MC]);
DestroyMC(_local2[EDITRECORD_MC2]);
}
};
NinjaEditor.prototype.SetTxtBox = function (str) {
gui.SetTxt(TXTBOX_TOP, str);
};
NinjaEditor.prototype.GetTxtBox = function () {
var _local1 = gui.GetTxt(TXTBOX_TOP);
return(_local1);
};
NinjaEditor.prototype.DumpData = function () {
this.SpawnGameObjects();
var _local1 = game.DumpLevelData();
objects.Clear();
return(_local1);
};
NinjaEditor.prototype.LoadData = function (levStr) {
this.MUST_BUILD_EDIT_OBJS = true;
App_LoadLevel_Raw(levStr, App_StartEditor);
};
NinjaEditor.prototype.LoadObjData = function (objStr) {
var _local2 = this;
var _local3;
for (var i in _local2.objList) {
_local3 = _local2.objList.pop();
gfx.DestroyMC(_local3[EDITRECORD_MC]);
DestroyMC(_local3[EDITRECORD_MC2]);
}
objects.Clear();
_local2.objStr = objStr;
var oStrArray;
if (0 < _local2.objStr.length) {
oStrArray = _local2.objStr.split(OBJECT_SEPERATION_CHAR);
_local2.CURRENT_OBJ_LOADING = 0;
} else {
_local2.CURRENT_OBJ_LOADING = 0;
return;
}
while (_local2.CURRENT_OBJ_LOADING < oStrArray.length) {
_local3 = oStrArray[_local2.CURRENT_OBJ_LOADING].split(OBJTYPE_SEPERATION_CHAR);
var _local1 = _local3[1].split(OBJPARAM_SEPERATION_CHAR);
for (var i in _local1) {
_local1[i] = Number(_local1[i]);
}
_local2.BuildEditObj(Number(_local3[0]), _local1);
_local2.CURRENT_OBJ_LOADING++;
}
};
NinjaEditor.prototype.StartEditMenu = function () {
var _local1 = this;
_local1.StopEdit();
_local1.Tick = _local1.TickEditMenu;
gui.Display(GUI_TEMP_EDITOR);
};
NinjaEditor.prototype.TickEditMenu = function () {
var _local1 = this;
if (_local1.MUST_BUILD_EDIT_OBJS) {
_local1.MUST_BUILD_EDIT_OBJS = false;
_local1.LoadObjData(game.DumpObjData());
}
if (Key.isDown(192) || (Key.isDown(220))) {
APP_KEY_TRIG = false;
_local1.Exit();
var _local2 = gui.GetTxt(TXTBOX_TOP);
App_LoadLevel_Raw(_local2, App_StartDebugMenu);
} else if (Key.isDown(33)) {
_local1.LoadData(_local1.GetTxtBox());
} else if (Key.isDown(34)) {
_local1.SetTxtBox(_local1.DumpData());
} else if (Key.isDown(45)) {
_local1.StopEdit();
_local1.StartEditObjects();
} else if (Key.isDown(46)) {
_local1.StopEdit();
_local1.StartEditTiles();
}
};
NinjaEditor.prototype.StartEditTiles = function () {
var _local1 = this;
gui.Display(GUI_TILE_EDITOR);
gui.HideTxt();
_local1.tileCurType = 1;
_local1.pointer.txt = "";
_local1.pointer._visible = false;
_local1.objMenuMC._visible = false;
_local1.tileMenuMC._visible = true;
_local1.tileMenuMC.gotoAndStop(1);
_local1.pointer.objhelp._visible = false;
_local1.RefreshTileMenu();
_local1.Tick = _local1.TickEditTiles;
_local1.StopEdit = _local1.StopEditTiles;
};
NinjaEditor.prototype.StopEditTiles = function () {
var _local1 = this;
_local1.pointer._visible = false;
_local1.objMenuMC._visible = false;
_local1.tileMenuMC._visible = false;
};
NinjaEditor.prototype.RefreshTileMenu = function () {
var _local1 = input.getMousePos();
if (_local1.y < 300) {
this.tileMenuMC._y = 450;
} else {
this.tileMenuMC._y = 150;
}
};
NinjaEditor.prototype.TickEditTiles = function () {
var _local1 = this;
if (Key.isDown(36)) {
_local1.StartEditMenu();
} else {
if (Key.isDown(45)) {
_local1.StopEdit();
_local1.StartEditObjects();
}
var m = input.getMousePos();
var _local2 = tiles.GetTile_V(m);
_local1.rend.Clear();
_local1.rend.SetStyle(0, 0, 30);
_local1.rend.DrawAABB(_local2.pos, _local2.xw, _local2.yw);
var cursor = new Vector2(m.x, m.y);
_local1.pointer._x = cursor.x;
_local1.pointer._y = cursor.y;
_local1.RefreshTileMenu();
if (Key.isDown(49)) {
_local1.tileCurType = 1;
} else if (Key.isDown(50)) {
_local1.tileCurType = 2;
} else if (Key.isDown(51)) {
_local1.tileCurType = 3;
} else if (Key.isDown(52)) {
_local1.tileCurType = 4;
} else if (Key.isDown(53)) {
_local1.tileCurType = 5;
} else if (Key.isDown(54)) {
_local1.tileCurType = 6;
} else if (Key.isDown(55)) {
_local1.tileCurType = 7;
} else if (Key.isDown(56)) {
_local1.tileCurType = 8;
}
if (Key.isDown(16)) {
if (_local1.tileCurType <= 4) {
var _local3 = _local1.tileCurType + 4;
} else {
var _local3 = _local1.tileCurType - 4;
}
} else {
var _local3 = _local1.tileCurType;
}
_local1.tileMenuMC.gotoAndStop(_local3);
if (Key.isDown(68)) {
_local2.Clear();
} else if (Key.isDown(69)) {
_local2.SetState(TID_FULL);
} else if (Key.isDown(81)) {
_local2.SetState(_local1.tileTypeList[_local3][0]);
} else if (Key.isDown(65)) {
_local2.SetState(_local1.tileTypeList[_local3][1]);
} else if (Key.isDown(83)) {
_local2.SetState(_local1.tileTypeList[_local3][2]);
} else if (Key.isDown(87)) {
_local2.SetState(_local1.tileTypeList[_local3][3]);
}
}
};
NinjaEditor.prototype.StartEditObjects = function () {
var _local1 = this;
gui.Display(GUI_OBJ_EDITOR);
gui.HideTxt();
_local1.objSnapTo = tiles.xw;
_local1.pointer.txt = "(1/2 snap)";
_local1.pointer._visible = true;
_local1.objMenuMC._visible = true;
_local1.tileMenuMC._visible = false;
_local1.pointer.objhelp.gotoAndStop(1);
_local1.pointer.objhelp._visible = true;
_local1.pointer.tilehelp._visible = false;
_local1.Tick = _local1.TickEditObjects;
_local1.StopEdit = _local1.StopEditObjects;
_local1.RefreshObjMenu();
};
NinjaEditor.prototype.StopEditObjects = function () {
var _local1 = this;
_local1.pointer._visible = false;
_local1.objMenuMC._visible = false;
_local1.tileMenuMC._visible = false;
};
NinjaEditor.prototype.RefreshObjMenu = function () {
var _local1 = this;
var _local2 = input.getMousePos();
if (_local2.x < 400) {
_local1.objMenuMC._x = 400;
} else {
_local1.objMenuMC._x = 0;
}
if (_local2.y < 300) {
_local1.objMenuMC._y = 450;
} else {
_local1.objMenuMC._y = 150;
}
};
NinjaEditor.prototype.TickEditObjects = function () {
var _local1 = this;
if (Key.isDown(36)) {
_local1.StartEditMenu();
} else {
if (Key.isDown(46)) {
_local1.StopEdit();
_local1.StartEditTiles();
}
m = input.getMousePos();
if (Key.isDown(90)) {
_local1.objSnapTo = 1;
_local1.pointer.txt = "(no snap)";
} else if (Key.isDown(88)) {
_local1.objSnapTo = tiles.xw;
_local1.pointer.txt = "(1/2 snap)";
} else if (Key.isDown(67)) {
_local1.objSnapTo = tiles.xw * 0.5;
_local1.pointer.txt = "(1/4 snap)";
}
var _local2 = new Vector2(Math.round(m.x / _local1.objSnapTo) * _local1.objSnapTo, Math.round(m.y / _local1.objSnapTo) * _local1.objSnapTo);
_local1.pointer._x = _local2.x;
_local1.pointer._y = _local2.y;
var temp = tiles.GetTile_V(_local2);
_local1.rend.Clear();
_local1.rend.SetStyle(0, 0, 30);
_local1.rend.DrawAABB(temp.pos, temp.xw, temp.yw);
_local1.RefreshObjMenu();
for (var i in _local1.setObjTypeKeys) {
if (Key.isDown(_local1.setObjTypeKeys[i])) {
_local1.currentEOBJTYPE = Number(i);
_local1.currentOBJTYPE = _local1.objTypes[i];
_local1.editObjStep = 0;
_local1.pointer.objhelp.gotoAndStop(_local1.currentEOBJTYPE + 1);
break;
}
}
if (input.MousePressed()) {
if (Key.isDown(8)) {
_local1.KillNearestObj(m);
} else if (Key.isDown(220)) {
_local1.KillMostRecentObj();
} else {
delete params;
var _local3 = 2;
var params = new Array();
params[0] = _local2.x;
params[1] = _local2.y;
if (_local1.currentEOBJTYPE == EOBJTYPE_FLOORGUARD) {
if (Key.isDown(65)) {
params[2] = -1;
} else if (Key.isDown(68)) {
params[2] = 1;
} else {
return;
}
_local3 = 3;
} else if (_local1.currentEOBJTYPE == EOBJTYPE_ONEWAYPLATFORM) {
if (Key.isDown(83)) {
params[2] = AI_DIR_D;
} else if (Key.isDown(87)) {
params[2] = AI_DIR_U;
} else if (Key.isDown(65)) {
params[2] = AI_DIR_L;
} else if (Key.isDown(68)) {
params[2] = AI_DIR_R;
} else {
return;
}
_local3 = 3;
} else if (_local1.currentEOBJTYPE == EOBJTYPE_THWOMP) {
if (Key.isDown(83)) {
params[2] = AI_DIR_D;
} else if (Key.isDown(87)) {
params[2] = AI_DIR_U;
} else if (Key.isDown(65)) {
params[2] = AI_DIR_L;
} else if (Key.isDown(68)) {
params[2] = AI_DIR_R;
} else {
return;
}
_local3 = 3;
} else if (_local1.currentEOBJTYPE == EOBJTYPE_LAUNCHPAD) {
var dx = 0;
var dy = 0;
if (Key.isDown(87)) {
dy = -1;
} else if (Key.isDown(83)) {
dy = 1;
}
if (Key.isDown(65)) {
dx = -1;
} else if (Key.isDown(68)) {
dx = 1;
}
var len = Math.sqrt((dx * dx) + (dy * dy));
if (len == 0) {
return;
}
dx = dx / len;
dy = dy / len;
params[2] = dx;
params[3] = dy;
_local3 = 4;
} else if (_local1.currentEOBJTYPE == EOBJTYPE_EXIT) {
if (_local1.editObjStep == 0) {
_local1.editObjStepVar0 = new Vector2(_local2.x, _local2.y);
_local1.editObjStep = 1;
_local1.pointer.objhelp.gotoAndStop(18);
return;
}
if (_local1.editObjStep == 1) {
params[0] = _local1.editObjStepVar0.x;
params[1] = _local1.editObjStepVar0.y;
params[2] = _local2.x;
params[3] = _local2.y;
_local1.pointer.objhelp.gotoAndStop(10);
_local3 = 4;
}
} else if (_local1.currentEOBJTYPE == EOBJTYPE_TREKDOOR) {
var c = tiles.GetTile_V(_local2);
params[4] = c.i;
params[5] = c.j;
params[3] = 0;
params[0] = _local2.x;
params[1] = _local2.y;
params[6] = 0;
if (Key.isDown(83)) {
params[2] = 1;
params[7] = 0;
params[8] = 0;
} else if (Key.isDown(68)) {
params[2] = 0;
params[7] = 0;
params[8] = 0;
} else if (Key.isDown(65)) {
params[7] = -1;
params[8] = 0;
params[2] = 0;
} else if (Key.isDown(87)) {
params[7] = 0;
params[8] = -1;
params[2] = 1;
} else {
return;
}
_local3 = 9;
} else if (_local1.currentEOBJTYPE == EOBJTYPE_LOCKDOOR) {
var c = tiles.GetTile_V(_local2);
params[4] = c.i;
params[5] = c.j;
params[3] = 0;
params[6] = 1;
if (_local1.editObjStep == 0) {
_local1.editObjStepVar0 = new Vector2(params[4], params[5]);
_local1.editObjStepVarX = new Vector2(0, 0);
_local1.editObjStep = 1;
if (Key.isDown(83)) {
_local1.editObjStepVar1 = 1;
} else if (Key.isDown(68)) {
_local1.editObjStepVar1 = 0;
} else if (Key.isDown(65)) {
_local1.editObjStepVarX.x = -1;
_local1.editObjStepVar1 = 0;
} else if (Key.isDown(87)) {
_local1.editObjStepVarX.y = -1;
_local1.editObjStepVar1 = 1;
} else {
_local1.editObjStep = 0;
return;
}
_local1.pointer.objhelp.gotoAndStop(19);
return;
}
if (_local1.editObjStep == 1) {
params[4] = _local1.editObjStepVar0.x;
params[5] = _local1.editObjStepVar0.y;
params[7] = _local1.editObjStepVarX.x;
params[8] = _local1.editObjStepVarX.y;
params[2] = _local1.editObjStepVar1;
params[0] = _local2.x;
params[1] = _local2.y;
_local1.pointer.objhelp.gotoAndStop(13);
_local3 = 9;
}
} else if (_local1.currentEOBJTYPE == EOBJTYPE_TRAPDOOR) {
var c = tiles.GetTile_V(_local2);
params[4] = c.i;
params[5] = c.j;
params[3] = 1;
params[6] = 0;
if (_local1.editObjStep == 0) {
_local1.editObjStepVar0 = new Vector2(params[4], params[5]);
_local1.editObjStepVarX = new Vector2(0, 0);
_local1.editObjStep = 1;
if (Key.isDown(83)) {
_local1.editObjStepVar1 = 1;
} else if (Key.isDown(68)) {
_local1.editObjStepVar1 = 0;
} else if (Key.isDown(65)) {
_local1.editObjStepVarX.x = -1;
_local1.editObjStepVar1 = 0;
} else if (Key.isDown(87)) {
_local1.editObjStepVarX.y = -1;
_local1.editObjStepVar1 = 1;
} else {
_local1.editObjStep = 0;
return;
}
_local1.pointer.objhelp.gotoAndStop(20);
return;
}
if (_local1.editObjStep == 1) {
params[4] = _local1.editObjStepVar0.x;
params[5] = _local1.editObjStepVar0.y;
params[2] = _local1.editObjStepVar1;
params[7] = _local1.editObjStepVarX.x;
params[8] = _local1.editObjStepVarX.y;
params[0] = _local2.x;
params[1] = _local2.y;
_local1.pointer.objhelp.gotoAndStop(14);
_local3 = 9;
}
} else if (_local1.currentEOBJTYPE == EOBJTYPE_ZAPDRONE) {
if (_local1.editObjStep == 0) {
if (Key.isDown(81)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CCW;
} else if (Key.isDown(69)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CW;
} else if (Key.isDown(87)) {
var movetype = DRONEMOVE_WANDER_ALTERNATING;
} else if (Key.isDown(83)) {
var movetype = DRONEMOVE_WANDER_RANDOM;
} else if (Key.isDown(65)) {
var movetype = DRONEMOVE_WANDER_CCW;
} else if (Key.isDown(68)) {
var movetype = DRONEMOVE_WANDER_CW;
} else {
return;
}
_local1.editObjStepVar0 = movetype;
_local1.editObjStep = 1;
_local1.pointer.objhelp.gotoAndStop(21);
return;
}
if (_local1.editObjStep == 1) {
if (Key.isDown(68)) {
var dir = AI_DIR_R;
} else if (Key.isDown(65)) {
var dir = AI_DIR_L;
} else if (Key.isDown(87)) {
var dir = AI_DIR_U;
} else if (Key.isDown(83)) {
var dir = AI_DIR_D;
} else {
_local1.editObjStep = 0;
_local1.pointer.objhelp.gotoAndStop(15);
return;
}
_local1.editObjStepVar1 = dir;
_local1.editObjStep = 2;
_local1.pointer.objhelp.gotoAndStop(22);
} else {
if (_local1.editObjStep == 2) {
if (Key.isDown(32)) {
var ischase = 1;
} else {
var ischase = 0;
}
params[2] = _local1.editObjStepVar0;
params[3] = ischase;
params[4] = DRONEWEAP_ZAP;
params[5] = _local1.editObjStepVar1;
_local1.pointer.objhelp.gotoAndStop(15);
_local3 = 6;
}
// unexpected jump
if (_local1.currentEOBJTYPE == EOBJTYPE_LASERDRONE) {
if (_local1.editObjStep == 0) {
if (Key.isDown(81)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CCW;
} else if (Key.isDown(69)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CW;
} else if (Key.isDown(87)) {
var movetype = DRONEMOVE_WANDER_ALTERNATING;
} else if (Key.isDown(83)) {
var movetype = DRONEMOVE_WANDER_RANDOM;
} else if (Key.isDown(65)) {
var movetype = DRONEMOVE_WANDER_CCW;
} else if (Key.isDown(68)) {
var movetype = DRONEMOVE_WANDER_CW;
} else {
return;
}
_local1.editObjStepVar0 = movetype;
_local1.editObjStep = 1;
_local1.pointer.objhelp.gotoAndStop(23);
return;
}
if (_local1.editObjStep == 1) {
if (Key.isDown(68)) {
var dir = AI_DIR_R;
} else if (Key.isDown(65)) {
var dir = AI_DIR_L;
} else if (Key.isDown(87)) {
var dir = AI_DIR_U;
} else if (Key.isDown(83)) {
var dir = AI_DIR_D;
} else {
_local1.editObjStep = 0;
_local1.pointer.objhelp.gotoAndStop(16);
return;
}
_local1.editObjStepVar1 = dir;
_local1.editObjStep = 2;
params[2] = _local1.editObjStepVar0;
params[3] = ischase;
params[4] = DRONEWEAP_LASER;
params[5] = _local1.editObjStepVar1;
_local1.pointer.objhelp.gotoAndStop(16);
_local3 = 6;
}
} else if (_local1.currentEOBJTYPE == EOBJTYPE_CHAINGUNDRONE) {
if (_local1.editObjStep == 0) {
if (Key.isDown(81)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CCW;
} else if (Key.isDown(69)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CW;
} else if (Key.isDown(87)) {
var movetype = DRONEMOVE_WANDER_ALTERNATING;
} else if (Key.isDown(83)) {
var movetype = DRONEMOVE_WANDER_RANDOM;
} else if (Key.isDown(65)) {
var movetype = DRONEMOVE_WANDER_CCW;
} else if (Key.isDown(68)) {
var movetype = DRONEMOVE_WANDER_CW;
} else {
return;
}
_local1.editObjStepVar0 = movetype;
_local1.editObjStep = 1;
_local1.pointer.objhelp.gotoAndStop(25);
return;
}
if (_local1.editObjStep == 1) {
if (Key.isDown(68)) {
var dir = AI_DIR_R;
} else if (Key.isDown(65)) {
var dir = AI_DIR_L;
} else if (Key.isDown(87)) {
var dir = AI_DIR_U;
} else if (Key.isDown(83)) {
var dir = AI_DIR_D;
} else {
_local1.editObjStep = 0;
_local1.pointer.objhelp.gotoAndStop(17);
return;
}
_local1.editObjStepVar1 = dir;
_local1.editObjStep = 2;
if (Key.isDown(32)) {
var ischase = 1;
} else {
var ischase = 0;
}
params[2] = _local1.editObjStepVar0;
params[3] = ischase;
params[4] = DRONEWEAP_CHAINGUN;
params[5] = _local1.editObjStepVar1;
_local1.pointer.objhelp.gotoAndStop(17);
_local3 = 6;
}
} else {
_local3 = 2;
}
_local1.CreateObject(_local1.currentOBJTYPE, params, _local3, _local1.currentEOBJTYPE);
}
} else if (_local1.currentEOBJTYPE == EOBJTYPE_LASERDRONE) {
if (_local1.editObjStep == 0) {
if (Key.isDown(81)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CCW;
} else if (Key.isDown(69)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CW;
} else if (Key.isDown(87)) {
var movetype = DRONEMOVE_WANDER_ALTERNATING;
} else if (Key.isDown(83)) {
var movetype = DRONEMOVE_WANDER_RANDOM;
} else if (Key.isDown(65)) {
var movetype = DRONEMOVE_WANDER_CCW;
} else if (Key.isDown(68)) {
var movetype = DRONEMOVE_WANDER_CW;
} else {
return;
}
_local1.editObjStepVar0 = movetype;
_local1.editObjStep = 1;
_local1.pointer.objhelp.gotoAndStop(23);
return;
}
if (_local1.editObjStep == 1) {
if (Key.isDown(68)) {
var dir = AI_DIR_R;
} else if (Key.isDown(65)) {
var dir = AI_DIR_L;
} else if (Key.isDown(87)) {
var dir = AI_DIR_U;
} else if (Key.isDown(83)) {
var dir = AI_DIR_D;
} else {
_local1.editObjStep = 0;
_local1.pointer.objhelp.gotoAndStop(16);
return;
}
_local1.editObjStepVar1 = dir;
_local1.editObjStep = 2;
params[2] = _local1.editObjStepVar0;
params[3] = ischase;
params[4] = DRONEWEAP_LASER;
params[5] = _local1.editObjStepVar1;
_local1.pointer.objhelp.gotoAndStop(16);
_local3 = 6;
}
} else if (_local1.currentEOBJTYPE == EOBJTYPE_CHAINGUNDRONE) {
if (_local1.editObjStep == 0) {
if (Key.isDown(81)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CCW;
} else if (Key.isDown(69)) {
var movetype = DRONEMOVE_SURFACEFOLLOW_CW;
} else if (Key.isDown(87)) {
var movetype = DRONEMOVE_WANDER_ALTERNATING;
} else if (Key.isDown(83)) {
var movetype = DRONEMOVE_WANDER_RANDOM;
} else if (Key.isDown(65)) {
var movetype = DRONEMOVE_WANDER_CCW;
} else if (Key.isDown(68)) {
var movetype = DRONEMOVE_WANDER_CW;
} else {
return;
}
_local1.editObjStepVar0 = movetype;
_local1.editObjStep = 1;
_local1.pointer.objhelp.gotoAndStop(25);
return;
}
if (_local1.editObjStep == 1) {
if (Key.isDown(68)) {
var dir = AI_DIR_R;
} else if (Key.isDown(65)) {
var dir = AI_DIR_L;
} else if (Key.isDown(87)) {
var dir = AI_DIR_U;
} else if (Key.isDown(83)) {
var dir = AI_DIR_D;
} else {
_local1.editObjStep = 0;
_local1.pointer.objhelp.gotoAndStop(17);
return;
}
_local1.editObjStepVar1 = dir;
_local1.editObjStep = 2;
if (Key.isDown(32)) {
var ischase = 1;
} else {
var ischase = 0;
}
params[2] = _local1.editObjStepVar0;
params[3] = ischase;
params[4] = DRONEWEAP_CHAINGUN;
params[5] = _local1.editObjStepVar1;
_local1.pointer.objhelp.gotoAndStop(17);
_local3 = 6;
}
} else {
_local3 = 2;
}
_local1.CreateObject(_local1.currentOBJTYPE, params, _local3, _local1.currentEOBJTYPE);
}
}
}
};
NinjaEditor.prototype.KillMostRecentObj = function () {
var _local1 = this.objList.pop();
gfx.DestroyMC(_local1[EDITRECORD_MC]);
gfx.DestroyMC(_local1[EDITRECORD_MC2]);
};
NinjaEditor.prototype.KillNearestObj = function (p) {
var c = tiles.GetTile_S(p.x, p.y);
var ci = c.i;
var cj = c.j;
var temp = null;
var dist = 10000000;
var nearesti = -1;
var oList = this.objList;
for (var i in oList) {
var obj = oList[i];
var _local3 = obj[EDITRECORD_POS].x - p.x;
var _local2 = obj[EDITRECORD_POS].y - p.y;
var _local1 = (_local3 * _local3) + (_local2 * _local2);
if (300 < _local1) {
continue;
}
if (_local1 < dist) {
nearesti = i;
temp = obj;
dist = _local1;
}
}
if (temp != null) {
var obj = this.objList.splice(nearesti, 1);
gfx.DestroyMC(temp[EDITRECORD_MC]);
gfx.DestroyMC(temp[EDITRECORD_MC2]);
delete temp;
}
};
NinjaEditor.prototype.SpawnGameObjects = function () {
var _local2 = this;
var _local3 = -1;
for (var _local1 in _local2.objList) {
if (_local2.objList[_local1][EDITRECORD_TYPE] == OBJTYPE_PLAYER) {
_local3 = _local1;
break;
}
}
if (_local3 < 0) {
} else {
var p = _local2.objList[_local3];
_local2.objList.splice(_local3, 1);
_local2.objList.splice(0, 0, p);
}
objects.Clear();
var _local1 = 0;
while (_local1 < _local2.objList.length) {
objects.SpawnGameObject(_local2.objList[_local1][EDITRECORD_TYPE], _local2.objList[_local1][EDITRECORD_PARAMS]);
_local1++;
}
};
NinjaEditor.prototype.BuildEditObj = function (OBJTYPE, params) {
var _local2 = OBJTYPE;
var _local3 = params;
var _local1 = -1;
if (_local2 == OBJTYPE_GOLD) {
_local1 = EOBJTYPE_GOLD;
} else if (_local2 == OBJTYPE_BOUNCEBLOCK) {
_local1 = EOBJTYPE_BOUNCEBLOCK;
} else if (_local2 == OBJTYPE_LAUNCHPAD) {
_local1 = EOBJTYPE_LAUNCHPAD;
} else if (_local2 == OBJTYPE_TURRET) {
_local1 = EOBJTYPE_TURRET;
} else if (_local2 == OBJTYPE_FLOORGUARD) {
_local1 = EOBJTYPE_FLOORGUARD;
} else if (_local2 == OBJTYPE_PLAYER) {
_local1 = EOBJTYPE_PLAYER;
} else if (_local2 == OBJTYPE_MINE) {
_local1 = EOBJTYPE_MINE;
} else if (_local2 == OBJTYPE_ONEWAYPLATFORM) {
_local1 = EOBJTYPE_ONEWAYPLATFORM;
} else if (_local2 == OBJTYPE_THWOMP) {
_local1 = EOBJTYPE_THWOMP;
} else if (_local2 == OBJTYPE_EXIT) {
_local1 = EOBJTYPE_EXIT;
} else if (_local2 == OBJTYPE_HOMINGLAUNCHER) {
_local1 = EOBJTYPE_HOMINGLAUNCHER;
} else if (_local2 == OBJTYPE_ONEWAYPLATFORM) {
_local1 = EOBJTYPE_ONEWAYPLATFORM;
} else if (_local2 == OBJTYPE_TESTDOOR) {
if ((_local3[3] == 1) && (_local3[6] == 0)) {
_local1 = EOBJTYPE_TRAPDOOR;
} else if ((_local3[3] == 0) && (_local3[6] == 1)) {
_local1 = EOBJTYPE_LOCKDOOR;
} else if ((_local3[3] == 0) && (_local3[6] == 0)) {
_local1 = EOBJTYPE_TREKDOOR;
} else {
return;
}
} else if (_local2 == OBJTYPE_DRONE) {
if (_local3[4] == DRONEWEAP_ZAP) {
_local1 = EOBJTYPE_ZAPDRONE;
} else if (_local3[4] == DRONEWEAP_LASER) {
_local1 = EOBJTYPE_LASERDRONE;
} else if (_local3[4] == DRONEWEAP_CHAINGUN) {
_local1 = EOBJTYPE_CHAINGUNDRONE;
} else {
return;
}
} else {
return;
}
this.CreateObject(_local2, _local3, _local3.length, _local1);
};
EDITRECORD_TYPE = 0;
EDITRECORD_PARAMS = 1;
EDITRECORD_POS = 2;
EDITRECORD_CELLI = 3;
EDITRECORD_CELLJ = 4;
EDITRECORD_MC = 5;
EDITRECORD_MC2 = 6;
NinjaEditor.prototype.CreateObject = function (OBJTYPE, params, plen, EOBJTYPE) {
var _local3 = params;
this.editObjStep = 0;
this.objnum++;
var px = _local3[0];
var py = _local3[1];
var c = tiles.GetTile_S(px, py);
var ci = c.i;
var cj = c.j;
var _local2 = new Array();
_local2[EDITRECORD_TYPE] = OBJTYPE;
_local2[EDITRECORD_PARAMS] = new Array();
var _local1 = 0;
while (_local1 < plen) {
_local2[EDITRECORD_PARAMS][_local1] = _local3[_local1];
_local1++;
}
_local2[EDITRECORD_POS] = new Vector2(px, py);
_local2[EDITRECORD_CELLI] = ci;
_local2[EDITRECORD_CELLJ] = cj;
var mc = gfx.CreateSprite("editorObjMC", LAYER_EDITOR);
_local2[EDITRECORD_MC] = mc;
var mc2 = CreateMC("EMPTY_MC", ("obj" + OBJTYPE) + this.objnum);
_local2[EDITRECORD_MC2] = mc2;
this.objList.push(_local2);
this.DrawObject(_local2, EOBJTYPE);
};
NinjaEditor.prototype.DrawObject = function (defList, EOBJ_TYPE) {
var pos = defList[EDITRECORD_POS];
var _local2 = defList[EDITRECORD_PARAMS];
var ci = defList[EDITRECORD_CELLI];
var cj = defList[EDITRECORD_CELLJ];
var OBJ_TYPE = defList[EDITRECORD_TYPE];
var _local3 = defList[EDITRECORD_MC];
var _local1 = defList[EDITRECORD_MC2];
_local3.gotoAndStop(EOBJ_TYPE + 1);
_local3._x = pos.x;
_local3._y = pos.y;
_local3._xscale = tiles.xw * 2;
_local3._yscale = tiles.yw * 2;
_local1.clear();
if (EOBJ_TYPE == EOBJTYPE_PLAYER) {
} else if (EOBJ_TYPE == EOBJTYPE_GOLD) {
} else if (EOBJ_TYPE == EOBJTYPE_BOUNCEBLOCK) {
} else if (EOBJ_TYPE == EOBJTYPE_LAUNCHPAD) {
_local1.lineStyle(2, 2237064, 100);
_local1.moveTo(_local2[2] * 18, _local2[3] * 18);
_local1.lineTo(0, 0);
_local1._x = _local2[0];
_local1._y = _local2[1];
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_TURRET) {
} else if (EOBJ_TYPE == EOBJTYPE_FLOORGUARD) {
_local1.lineStyle(2, 2237064, 100);
_local1.moveTo(_local2[2] * 18, 0);
_local1.lineTo(0, 0);
_local1._x = _local2[0];
_local1._y = _local2[1];
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_ZAPDRONE) {
_local1._x = _local2[0];
_local1._y = _local2[1];
_local1.lineStyle(2, 2237064, 100);
_local1.moveTo(0, 0);
if (_local2[5] == AI_DIR_U) {
_local1.lineTo(0, -18);
} else if (_local2[5] == AI_DIR_L) {
_local1.lineTo(-18, 0);
} else if (_local2[5] == AI_DIR_R) {
_local1.lineTo(18, 0);
} else {
_local1.lineTo(0, 18);
}
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_LASERDRONE) {
_local1._x = _local2[0];
_local1._y = _local2[1];
_local1.lineStyle(2, 2237064, 100);
_local1.moveTo(0, 0);
if (_local2[5] == AI_DIR_U) {
_local1.lineTo(0, -18);
} else if (_local2[5] == AI_DIR_L) {
_local1.lineTo(-18, 0);
} else if (_local2[5] == AI_DIR_R) {
_local1.lineTo(18, 0);
} else {
_local1.lineTo(0, 18);
}
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_CHAINGUNDRONE) {
_local1._x = _local2[0];
_local1._y = _local2[1];
_local1.lineStyle(2, 2237064, 100);
_local1.moveTo(0, 0);
if (_local2[5] == AI_DIR_U) {
_local1.lineTo(0, -18);
} else if (_local2[5] == AI_DIR_L) {
_local1.lineTo(-18, 0);
} else if (_local2[5] == AI_DIR_R) {
_local1.lineTo(18, 0);
} else {
_local1.lineTo(0, 18);
}
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_ONEWAYPLATFORM) {
if (_local2[2] == AI_DIR_D) {
_local3._rotation = 180;
} else if (_local2[2] == AI_DIR_L) {
_local3._rotation = -90;
} else if (_local2[2] == AI_DIR_R) {
_local3._rotation = 90;
}
} else if (EOBJ_TYPE == EOBJTYPE_THWOMP) {
if (_local2[2] == AI_DIR_U) {
_local3._rotation = 180;
} else if (_local2[2] == AI_DIR_L) {
_local3._rotation = 90;
} else if (_local2[2] == AI_DIR_R) {
_local3._rotation = -90;
}
} else if (EOBJ_TYPE == EOBJTYPE_TREKDOOR) {
var c = tiles.GetTile_I(_local2[4], _local2[5]);
_local3._x = c.pos.x;
_local3._y = c.pos.y;
if (_local2[2] == 1) {
if (_local2[8] == 0) {
_local3._rotation = 90;
} else {
_local3._rotation = -90;
}
} else if (_local2[7] == 0) {
_local3._rotation = 0;
} else {
_local3._rotation = 180;
}
} else if (EOBJ_TYPE == EOBJTYPE_TRAPDOOR) {
var c = tiles.GetTile_I(_local2[4], _local2[5]);
_local3._x = c.pos.x;
_local3._y = c.pos.y;
if (_local2[2] == 1) {
if (_local2[8] == 0) {
_local3._rotation = 90;
} else {
_local3._rotation = -90;
}
} else if (_local2[7] == 0) {
_local3._rotation = 0;
} else {
_local3._rotation = 180;
}
_local1.lineStyle(4, 8921634, 100);
_local1.moveTo(4, 4);
_local1.lineTo(-4, -4);
_local1.moveTo(4, -4);
_local1.lineTo(-4, 4);
_local1._x = _local2[0];
_local1._y = _local2[1];
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_LOCKDOOR) {
var c = tiles.GetTile_I(_local2[4], _local2[5]);
_local3._x = c.pos.x;
_local3._y = c.pos.y;
if (_local2[2] == 1) {
if (_local2[8] == 0) {
_local3._rotation = 90;
} else {
_local3._rotation = -90;
}
} else if (_local2[7] == 0) {
_local3._rotation = 0;
} else {
_local3._rotation = 180;
}
_local1.lineStyle(4, 2237064, 100);
_local1.moveTo(4, 4);
_local1.lineTo(-4, -4);
_local1.moveTo(4, -4);
_local1.lineTo(-4, 4);
_local1._x = _local2[0];
_local1._y = _local2[1];
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_HOMINGLAUNCHER) {
} else if (EOBJ_TYPE == EOBJTYPE_EXIT) {
_local1.lineStyle(4, 2263074, 100);
_local1.moveTo(4, 4);
_local1.lineTo(-4, -4);
_local1.moveTo(4, -4);
_local1.lineTo(-4, 4);
_local1._x = _local2[2];
_local1._y = _local2[3];
_local1._visible = true;
} else if (EOBJ_TYPE == EOBJTYPE_MINE) {
}
};
function NinjaData() {
var _local1 = this;
_local1.curLevel = 0;
_local1.curEpisode = 0;
_local1.curMenuDemo = MENUDEMO_0;
_local1.curHelpDemo = HELPDEMO_JUMP1;
_local1.helpLevelStr = "";
_local1.episodeList = new Array();
_local1.levelList = new Array();
_local1.menudemoList = new Object();
_local1.helpdemoList = new Object();
_local1.menudemoTotalNum = 0;
_local1.BuildGameData();
}
NinjaData.prototype.GetBlankMap = function () {
return("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
};
NinjaData.prototype.IncrementCurrentLevel = function () {
var _local1 = this;
_local1.curLevel++;
if (_local1.levelList.length <= _local1.curLevel) {
_local1.curLevel = 0;
return(false);
}
return(true);
};
NinjaData.prototype.GetCurrentLevelID = function () {
return(this.curLevel);
};
NinjaData.prototype.GetLevelData = function (id) {
var _local1 = id;
if ((_local1 < 0) || (this.levelList.length <= _local1)) {
return(null);
}
return(this.levelList[_local1].levStr);
};
NinjaData.prototype.GetCurrentLevelName = function () {
var _local1 = this;
var _local2 = (((("Episode " + _local1.curEpisode) + " Level ") + _local1.curLevel) + ": ") + _local1.levelList[_local1.curLevel].levname;
return(_local2);
};
NinjaData.prototype.LoadEpisode = function (code) {
var _local2 = this;
var _local3 = code;
var _local1 = 0;
while (_local1 < _local2.episodeList.length) {
if (_local2.episodeList[_local1].code == _local3) {
userdata.NotifyEpisodeReached(_local1);
_local2.curLevel = 0;
_local2.curEpisode = _local1;
_local2.levelList = _local2.episodeList[_local1].levelList;
return(true);
}
_local1++;
}
_local2.ResetEpisode();
return(false);
};
NinjaData.prototype.LoadEpisodeNum = function (num) {
var _local1 = this;
var _local2 = num;
if (_local1.episodeList[_local2] != null) {
_local1.curLevel = 0;
_local1.curEpisode = _local2;
_local1.levelList = _local1.episodeList[_local2].levelList;
return(true);
}
_local1.ResetEpisode();
return(false);
};
NinjaData.prototype.ResetEpisode = function () {
var _local1 = this;
_local1.curEpisode = 0;
_local1.curLevel = 0;
_local1.levelList = _local1.episodeList[_local1.curEpisode].levelList;
};
NinjaData.prototype.GetNextEpisodeNum = function () {
var _local1 = this;
if (_local1.curEpisode == EPISODE_FINAL0) {
return(-1);
}
if (_local1.curEpisode == EPISODE_FINAL1) {
return(-1);
}
if (_local1.curEpisode == EPISODE_FINAL2) {
return(-1);
}
_local1.curEpisode = _local1.curEpisode + 1;
return(_local1.curEpisode);
};
NinjaData.prototype.GetHelpLevelData = function () {
return(this.helpLevelStr);
};
NinjaData.prototype.GetCurrentHelpDemo = function () {
return(this.curHelpDemo);
};
NinjaData.prototype.SetCurrentHelpDemo = function (demoID) {
var _local1 = demoID;
var _local2 = this;
if (_local2.helpdemoList[_local1] != null) {
_local2.curHelpDemo = _local1;
_local2.curHelpDemoReel = 0;
}
};
NinjaData.prototype.GetHelpDemoObjects = function () {
return(this.helpdemoList[this.curHelpDemo].objStr);
};
NinjaData.prototype.GetCurrentHelpDemoData = function () {
var _local1 = this;
return(_local1.helpdemoList[_local1.curHelpDemo].demoList[_local1.curHelpDemoReel]);
};
NinjaData.prototype.IncrementHelpDemoReel = function () {
var _local1 = this;
_local1.curHelpDemoReel = (1 + _local1.curHelpDemoReel) % _local1.helpdemoList[_local1.curHelpDemo].demoList.length;
};
NinjaData.prototype.GetCurrentMenuDemoID = function () {
return(this.curMenuDemo);
};
NinjaData.prototype.IncrementCurrentMenuDemo = function () {
var _local1 = this;
_local1.curMenuDemo = (_local1.curMenuDemo + 1) % _local1.menudemoTotalNum;
};
NinjaData.prototype.GetMenuDemoLevel = function (demoID) {
var _local2 = this;
var _local1 = _local2.menudemoList[demoID];
if (_local1 != null) {
return(_local2.episodeList[_local1.epID].levelList[_local1.levNum].levStr);
}
return(null);
};
NinjaData.prototype.GetMenuDemoData = function (demoID) {
var _local1 = this.menudemoList[demoID];
if (_local1 != null) {
return(_local1.demoStr);
}
return(null);
};
function EpisodeData(epname, code, levelList) {
var _local1 = this;
_local1.epname = epname;
_local1.code = code;
_local1.levelList = levelList;
}
function LevelData(levname, levStr) {
this.levname = levname;
this.levStr = levStr;
}
function MenuDemoData(epID, levNum, demoStr) {
var _local1 = this;
_local1.epID = epID;
_local1.levNum = levNum;
_local1.demoStr = demoStr;
}
function HelpDemoData(objStr, demoList) {
this.objStr = objStr;
this.demoList = demoList;
}
EPISODE_FINAL0 = 9;
EPISODE_FINAL1 = 19;
EPISODE_FINAL2 = 29;
NinjaData.prototype.BuildGameData = function () {
var _local1 = this;
_local1.BuildGameData_Set0();
_local1.BuildGameData_Set1();
_local1.BuildGameData_Set2();
_local1.levelList = _local1.episodeList[0].levelList;
_local1.BuildGameData_MenuDemos();
_local1.BuildGameData_HelpDemos();
};
NinjaData.prototype.BuildGameData_Set0 = function () {
var _local1 = this;
var lev_lockness = new LevelData("lockness", "0000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001=0000000000000000000001000000000000000000000010000000000000000000000=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000:000000000000000000000000000000000000000000000070000000000000000000070:00000000000000000000:00000000000<000000000000000000000010000000000000000000000100000000000000000000001<000000000000070000000110000000000000:000000011000000000000000000000110000000000000000000001100000000000000000|5^36,396!9^84,324,1,0,10,14,1,0,0!9^132,324,1,0,14,12,1,0,0!9^60,324,1,0,18,10,1,0,0!9^108,324,1,0,21,7,1,0,0!0^252,348!0^348,300!0^444,252!0^516,180!0^612,96!0^636,96!0^660,96!0^36,324!0^156,324!2^228,576,0,-1!6^36,36,5,0,0,0!11^732,108,588,96");
var lev_cloudcity = new LevelData("cloud city", "000000000000:9006110000000000000000008071=000000000000;<0000:1110000000000000110000011=000000000000;1100000:=00000000000;111100000000000000000;1196100000000000000000119001000000000000000001=0001000000;<00000000010007100000;1100000000;100;1=00000111<0000000:907110000001111000000000011=0000001961000000000011000000010010000000000:=00000;0:00100000000000000000:80001000000000000000000:807=000000000000000000011100000000000000000000:11000000000000000000000:=0000000000000000000000000;<00000000000000000000;110000000000000000000;111000000000000000000011110000000000000000000111100000000000000000;111110000000000000000;11111100000;11111111111119611000;1111111111111110011000:11111111111111=00:=000000000000000000000000|5^108,564!1^612,132!1^516,132!1^420,132!1^180,492!1^540,300!1^60,84!11^708,492,36,396!0^444,372!0^132,180!0^108,204!0^288,84!0^360,156!0^108,372!0^228,396!0^660,372!0^636,396!0^684,108!0^540,468!0^492,396!9^204,204,0,0,1,14,1,0,0!11^372,444,60,60!9^60,60,0,1,15,15,0,-1,0!0^228,576!0^240,576!0^252,576!0^264,576!0^276,576!0^288,576!0^300,576!0^312,576!0^324,576!0^336,576!0^348,576!0^360,576!0^372,576!0^384,576!0^396,576!0^408,576!0^420,576!0^432,576!0^444,576!0^456,576");
var lev_themotherlode = new LevelData("the motherlode", "9000000000000000000000080000000000000000000000111111<0000000000000000111111100003111LH000000119696100001110FJLH000011087010000111000FJ10001=01101000011100000500?900:=01000021500000000C000000100000000000000?1000000=00000000000000C1000;<0000003140000000110001100000011100000001100011000000111000000011000:=0000001110000000210000000000021100000000200000<0000002100000000000000=0000000100000000000000000000001000000;<00000<000040001000000:=00000=0000100050000000000000000005000000000000000000000000000000000;<00000<0000000000000001100000=0000000000040001100000000000000000100011000000000000400001000:=00004000000310000500000000010000021100000000000400100000000000000;<0001001000000000000001100010014000000000000711807|5^60,516!11^588,492,168,156!7^180,156,0!7^300,228,3!7^324,228,3!7^348,228,3!7^252,252,3!7^228,252,3!7^228,396,3!7^252,396,3!7^540,372,3!7^564,372,3!7^708,372,3!7^732,372,3!1^588,228!1^408,264!1^384,492!1^480,444!1^300,444!1^84,252!0^36,48!0^60,48!0^48,48!0^48,36!0^36,60!0^36,72!0^36,84!0^36,96!0^36,108!0^48,60!0^48,72!0^48,84!0^48,96!0^48,108!0^60,108!0^60,96!0^60,84!0^60,72!0^60,60!0^60,120!0^60,132!0^60,144!0^60,156!0^48,156!0^36,156!0^36,144!0^36,132!0^36,120!0^48,120!0^48,132!0^48,144!0^156,84!0^144,84!0^132,96!0^144,108!0^156,120!0^144,132!0^132,144!0^144,156!0^168,84!0^180,84!0^300,84!0^324,84!0^396,132!0^420,132!0^468,108!0^492,108!0^564,108!0^588,108!0^660,84!0^684,84!0^708,84!0^732,84!0^756,84!0^744,72!0^720,72!0^696,72!0^672,72!0^468,228!0^492,228!0^516,228!0^588,396!0^612,396!0^636,396!0^660,396!2^636,288,0,-1!2^36,576,0,-1!2^204,300,0.707106781186547,-0.707106781186547!0^276,516!0^300,516!0^324,516!0^132,564!0^156,564!0^180,552!0^204,540!0^228,528!0^252,516!0^396,564!0^444,564!0^492,564!0^540,564!0^588,564!0^636,564!0^684,564!0^732,564!0^756,564!0^756,540!0^744,552!0^744,528!0^732,540!0^720,552!0^708,564!0^756,516!0^756,444!0^732,444!0^756,420");
var lev_allaboutthwumps = new LevelData("all about thwumps", "00001011000000000000000000010110000000000000000000001500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003111000000000000111111111110000000000000000000000000000000011111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111000000000000000000000000000000001111111111000000000000000002111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000010110000000000000000000101100000000|5^324,564!8^324,60,1!8^228,108,1!8^420,108,1!11^756,324,36,156!0^36,564!0^60,564!0^84,564!0^108,564!0^132,564!0^156,564!0^180,564!0^204,564!0^444,564!0^468,564!0^492,564!0^516,564!0^540,564!0^564,564!0^588,564!0^612,564!0^636,564!0^660,564!0^684,564!0^708,564!0^732,564!0^756,564!12^384,552!12^384,516!12^384,480!12^384,444!12^384,408!12^384,372!12^384,336!12^384,300!12^384,264!12^384,228!12^384,192!12^384,156!12^384,120!12^264,120!12^264,156!12^264,192!12^264,228!12^264,264!12^264,300!12^264,336!12^264,372!12^264,408!12^264,444!12^264,480!12^264,516!12^264,552!12^480,360!12^168,360!12^192,192!12^192,228!12^192,264!12^192,300!12^192,336!12^456,336!12^456,300!12^456,264!12^480,396!12^480,432!12^480,468!12^168,396!12^168,432");
var lev_theboxthebox = new LevelData("the box, the box!", "90000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011110000001000010000000000100000010000100000000001000000100001000000000010000001000010000000111100000010000100000000000000000111111000000000000000000000000000000000000000000000000000000000000000000011100000000011111100000100000000000100001000001000000000001000010000010000000000010000100000100000000000100001000001000000000001000010000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001001110000000000000000000000100011100000000000000001000100000000000000001110001000000000000000000000011100000000000000000080000000000000000000007|5^348,564!7^708,324,3!7^708,252,3!7^60,204,3!7^60,324,3!7^60,396,3!7^540,348,1!7^300,228,1!1^492,540!1^420,540!1^612,132!11^204,132,732,60!0^636,516!0^660,516!0^660,492!0^636,492!0^684,132!0^708,132!0^708,108!0^684,108!0^396,180!0^396,204!0^396,228!0^396,252!0^252,348!0^252,372!0^252,396!0^228,348!0^204,348!0^372,444!0^408,444!0^444,444!0^480,444!0^516,444!0^552,444!0^588,444!0^60,156!0^156,60!0^252,60!9^252,420,0,0,28,23,1,0,0!2^732,576,0,-1!2^120,576,0,-1!2^384,408,-0.707106781186547,-0.707106781186547!2^228,312,0.707106781186547,-0.707106781186547!7^660,204,3");
var lev_cavern = new LevelData("cavern", "1000000011111111111111110000000F111111111111111@00000000021111111111111000000000000FJ1111111110000000000000011111111100000000000000F11111111000000000000000F11111150000000000000000F1111M0000000000000000001111000000000000000000021110000GOK1111L00000000111000G11111111L000000011100G1111111111LH00000B1100111111111111100000011001111111111111H00000B10011111111111111L0000>1001111111111111110000010011111111111111100000100FJ11MFJ111111110000010000110001111111100000>0000F1LH31111111I000000000001111111111I000000000000111111111M000000000000011111111I000000000000001111111I0000000000000001111111H00GK1L00000000011111111LK1111H0000000G11111111111111100000001111111111111111000000G1111111111111111H0000011111111111111111500|5^671.959736390519,566!11^756,564,756,36!0^492,228!0^732,108!0^708,108!0^684,132!0^660,132!0^756,84!0^204,468!0^312,348!0^612,324!0^648,360!0^636,324!0^588,348!2^132,408,0,-1!6^84,252,0,0,0,1!6^252,60,1,1,0,0!12^264,492!12^348,516!12^492,564!12^492,108!12^528,132!12^84,276!12^96,288!12^216,264!12^204,264!12^192,264!12^180,264!12^168,264!1^588,492!1^564,492!12^384,420!12^372,396");
var lev_likehappylittlepuppies = new LevelData("like happy little puppies", "00000000000000100000000000000000000001000000000000000000000010000000000000000000000111<000000000000000000010010000000111111111<0010010000000000000000100100100000000000000001001001000000000000000010010010000000000;11111100111=00000000001000001001000000000000010000010010000000000000:1111110010000000000000000000100:111111000000000000010000000000011111111111=0000000000000000000000000000000000000000000000000000000000000;11111111111<0000000000100000000000100000000001000000000001000;10000010000000000010001000000100000000000100010000001000000000001000100000010000;11<0001000100000010000100100010001000000100001001000100010000001000010010001000:10000010000100100010000000000100001001000000000000001000010010000000000|5^36,348!11^756,228,300,132!7^108,132,1!7^108,228,1!7^108,324,1!7^132,276,3!7^132,204,3!4^660,114,1!4^108,570,1!1^252,516!1^108,516!0^372,276!0^372,252!0^372,228!0^372,204!0^372,180!0^372,156!0^180,276!0^204,276!0^228,276!0^228,252!0^204,252!0^180,252!0^180,228!0^204,228!0^228,228!0^228,204!0^204,204!0^180,204!0^180,180!0^204,180!0^228,180!0^228,156!0^204,156!0^180,156!0^372,132!0^372,108!0^372,84!0^372,60!0^372,36!0^36,396!0^60,396!0^84,396!0^84,420!0^84,444!0^60,444!0^36,444!0^36,420!0^60,420!0^276,396!0^300,396!0^324,396!0^324,420!0^300,420!0^276,420!0^276,444!0^300,444!0^324,444!0^756,564!0^756,540!0^756,516!0^756,492!0^756,468!0^756,444!0^756,420!0^708,396!0^684,396!0^660,396!0^636,396!0^612,396!0^588,396!0^564,396!0^540,396!0^516,396!0^492,396!0^492,372!0^492,348!0^684,228!0^660,228!0^636,228!1^444,492!1^396,444");
var lev_steps = new LevelData("steps", "0001110000000000000000000011140000000000000000000:1114000000000000000000011114000000000000000000011114000000000000000000:1111400000000000000000011111400000000000000000011111400000000000000000:1111140000000000000000011111140000000000000000011111140000000000000000:1111114000000000000000011111114000000000000000011111114000000000000000:11111118;000000000000001111111110000000000000001111111100000<000000000:11111110000010000000000111111100000=0000000000011111100000000000000000:1111100000000000000000011111000000000000000000011110000000000000000000:1110000000000000000000011100000000000000000000011000000000000000000000:10000000000000000000000180000100010001000100000000000000000000000000000000000000000000000000000|5^732,564!11^36,84,60,252!9^468,60,0,0,28,23,1,0,0!0^108,108!0^180,156!0^252,204!0^324,252!0^396,300!0^468,348!0^540,396!0^612,444!0^684,492!2^216,576,0,-1!2^24,408,0.707106781186547,-0.707106781186547!6^36,564,1,0,0,0!6^756,36,5,1,0,2!2^204,324,-0.707106781186547,-0.707106781186547!0^708,180!0^708,156!0^708,276!0^708,252!0^708,348!0^708,372!0^672,564!0^660,564!0^648,564!0^636,564!0^612,564!0^624,564!0^600,564!0^588,564!0^576,564!0^564,564!0^552,564!0^540,564!0^528,564!0^516,564!0^492,564!0^504,564!0^480,564!0^468,564!0^456,564!0^444,564!0^432,564!0^420,564!0^396,564!0^408,564!0^384,564!0^372,564!0^360,564!0^348,564!0^336,564!0^636,468!0^564,420!0^492,372!0^420,324!0^348,276!0^276,228!0^204,180!0^132,132");
var lev_littledipper = new LevelData("little dipper", "000000000000000000000000000000000000000000000000000;<000000;<000000000000;1111111111<00000000000:1111111111=00000000000000000006110000000;000000000000011000000010000000000007110000000:00000000000;111<000000000000000000:111=0;1<000000000;<00000:=00:1=000000000110000000000000000000001100000000000000;0000001100000000000000:0000001100000000000000000000011000000000;11<0000000011800000000:11=000000001111<0000000000000000001111100000000000;000000:111100000000000:0000000006100000000000000000000001000000;11<0000000000001000000:11=00000000000010000000000000000000000100000000000;0000000007100000000000:000000;1111000000000000000000:111=000000;111<000000000000000000:111=000000000000000000000000000;<00000000000000000;|5^600,252!1^336,504!1^480,504!1^624,504!2^36,576,0,-1!2^180,336,0,-1!0^264,420!0^408,420!0^552,420!0^696,420!0^732,564!0^720,564!0^708,564!0^696,564!0^684,564!0^672,564!0^660,564!0^588,564!0^576,564!0^564,564!0^552,564!0^540,564!0^528,564!0^516,564!0^444,564!0^432,564!0^420,564!0^408,564!0^396,564!0^372,564!0^384,564!0^300,564!0^288,564!0^276,564!0^264,564!0^252,564!0^240,564!0^228,564!11^540,252,192,540!1^576,204!1^336,336!7^744,432,3!7^744,384,3!7^744,336,3!7^744,288,3!7^744,240,3!7^744,192,3!6^36,60,4,0,0,1!6^660,468,5,0,0,3!6^588,324,4,0,0,2!6^372,132,5,0,0,0");
var lev_slides = new LevelData("slides", "0000000000000000000000000111LH00000000000000000000FJ11111LH000000000000100000FJ111H0000000000014000000FJ111111I0H000011400000000FJ1G100100000211LH0000000FJ10010000O02111LH0000000FJ111000100FJ1211400000000FJ000100002L111@0000000000001800002111D00000000000011D0000FJ111LH0000000000FJ14000021IJ1@00000000O00FJ40000FJ11D0000000010000240000021111400000100000240000021101400001000000B4000002100110001000000>14000002100504010000000B1400000210001010000000>11@00000B1001010000000021D00000>100101000000000B1@00000100101000000000>1D000005005010000000000B1000000000010000000000N1000000000010000000000C10000000000100000000071100000000001000000000B?100000000001000000000>11000000000010000000000B90000000000100000000000000000000|5^36,564!12^768,372!12^768,408!12^768,444!12^768,480!12^768,516!12^768,552!8^36,84,1!9^324,276,0,0,23,2,1,0,0!9^204,276,0,0,21,2,1,0,0!9^300,156,0,0,20,2,1,0,0!0^396,468!0^420,468!0^420,492!0^444,492!0^444,516!0^468,516!0^180,468!0^180,492!0^156,492!0^156,468!0^108,228!0^120,252!0^132,276!0^264,204!0^288,228!0^384,372!0^408,396!0^432,420!0^516,288!0^540,312!11^660,276,756,60!3^756,108");
var lev_squarestairs = new LevelData("square stairs", "00000010001000100010000000000000000000000000000000100010001000100010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010001000100010000000000000000000000000000000100010001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100010001000100000000000000000000000000000001000100010001000100|5^447.675733432821,566!11^36,60,420,60!0^756,468!0^708,420!0^756,372!0^708,324!0^756,276!0^708,228!0^756,180!0^708,132!0^756,84!0^372,84!0^420,132!0^372,180!0^420,228!0^372,276!0^420,324!0^372,372!0^420,420!0^372,468!0^84,468!0^36,420!0^84,372!0^36,324!0^84,276!0^36,228!0^84,180!0^36,132!0^84,84!6^756,36,4,1,0,2!6^36,36,5,1,0,0!1^660,540!1^468,540!1^156,540");
var lev_shafts = new LevelData("shaft..s", "00000000000000000000000011111111111100111111100000000000001111000000000001111000000000111100000010010000000001001000111100111111111110010000000000000000000000110011111111111111100000000000000000000001111111001111111111111000000000000000000000011111111100111111111110000000000000000000000111111111110011111111100000000000000000000001000000000111000001111011111111111000000010010000000000000000111100111111111111111000000000000000000000000011111111101111100001100000000001110001111110001111111000000000000000000000011111111111111100111000000000000000000000011111111111111111110000000000000000000000100111111111000000111100000000000011111111001110000011110000000000000000111100111111111111111000000000000000000000000|5^756,564!11^84,300,372,372!9^660,396,0,0,22,1,1,0,0!9^324,276,0,0,30,23,1,-1,0!9^276,324,0,0,20,23,1,-1,0!9^228,372,0,0,11,23,1,-1,0!9^60,372,0,0,7,23,1,-1,0!0^156,180!0^132,180!0^132,156!0^156,156!0^132,468!0^156,468!0^132,492!0^156,492!0^420,156!0^444,156!0^444,180!0^420,180!0^516,324!0^516,348!0^516,372!0^708,60!0^708,84!0^708,108!0^660,276!0^660,300!0^660,324!0^660,348!0^660,372!0^372,276!0^372,300!0^372,324!0^372,348!0^372,396!0^372,420!0^372,444!0^372,468!0^132,60!0^132,84!0^132,108!0^108,108!0^108,84!0^36,540!0^36,516!0^36,492!0^36,468!0^36,444!0^36,420!0^36,396!0^36,372!0^36,348!0^36,324!0^36,300!0^36,276!0^36,252!0^36,228!0^36,204!0^36,180!0^36,156!0^36,132!0^36,108!0^36,84!0^36,60!7^756,516,3!7^756,444,3!7^756,372,3!7^756,300,3!7^756,228,3!7^756,108,3!7^636,492,3!7^636,420,3!7^636,252,3!7^636,180,3!7^636,108,3!7^540,516,3!7^516,60,3!7^420,468,3!7^420,420,3!7^420,372,3!7^420,324,3!7^420,276,3!7^372,204,3!7^372,156,3!7^276,84,1!7^276,156,1!7^276,228,1!7^276,300,1!7^300,372,1!7^300,444,1!7^300,504,1!7^180,372,3!7^180,300,3!7^180,228,3");
var lev_whossickofthwumps = new LevelData("who's sick of thwumps?", "0000000000000000000000000011111111111111111110000111111111111111111100001111111111111111111000011111111111111111110000OOOOOOOOOOOOOOOOOOO000000000000000000000000000QQQQQQQQQQQQQQQQQQQ0000111111111111111111100001111111111111111111000011111111111111111110000OOOOOOOOOOOOOOOOOOO000000000000000000000000000QQQQQQQQQQQQQQQQQQQ0000111111111111111111100001111111111111111111000011111111111111111110000OOOOOOOOOOOOOOOOOOO000000000000000000000000000QQQQQQQQQQQQQQQQQQQ0000111111111111111111100001111111111111111111000011111111111111111110000OOOOOOOOOOOOOOOOOOO000000000000000000000000000QQQQQQQQQQQQQQQQ00000001111111111111111111000011111111111111111110000111111111111111111100001111111111111111111000011111111111111111110|5^708,564!8^612,108,1!8^468,108,1!8^324,108,1!8^180,108,1!9^540,564,0,0,24,23,1,0,0!9^396,564,0,0,18,23,1,0,0!9^252,564,0,0,12,23,1,0,0!9^108,564,0,0,6,23,1,0,0!11^732,564,36,372!3^396,36!0^36,108!0^36,120!0^36,132!0^36,144!0^36,156!0^36,168!0^36,180!0^36,192!0^36,204!0^36,216!0^36,228!0^36,240!0^36,252!0^36,276!0^36,264!0^36,288!0^36,300!0^36,312!0^36,324!0^36,336!0^36,348!0^36,396!0^36,408!0^36,420!0^36,432!0^36,444!0^36,456!0^36,468!0^36,480!0^36,492!0^36,504!0^36,516!0^36,528!0^36,540!0^228,564!0^276,564!0^372,564!0^420,564!0^516,564!0^564,564!0^756,84!0^732,84!0^708,84!0^684,84!0^660,84!0^744,72!0^720,72!0^696,72!0^672,72");
var lev_chasm = new LevelData("chasm", "FJ11000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJLH000000000000000000000FJ000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000GK0000000000000000000GKMI00000000000000000GKMI00000000000000000GKMI00000000000000000GKMI00000000000000000GKMI00000000000000000GKMI00000000000000000GKMI00000000000000000GKMI00000000000000000GKMI00000000000000000GK110000000000000000000|5^396,516!9^750,42,0,0,11,23,1,0,0!9^42,42,0,0,21,23,1,-1,0!11^48,564,744,564!6^36,516,1,1,0,3!6^756,516,0,1,0,3!1^396,492!1^396,372!1^396,252!1^396,132!6^300,36,0,0,1,2");
var lev_maze = new LevelData("(don't) go for the gold", "00400000000000000000000001H00000000000000000000011111111111111111110000000000001010000000100211110001010101111101000>10101110101010000010000101010001010101110100001010111010101010101000010100010101010101010000101011101010111010100001011100010100000101000010000011100011111010000101111100011100000100001010000011100011101000010101110100011101010000101010111011100010100001000100010000011101000011111010111110100010000100000100000101010100001011111011101110101000010100010001000001010000101010111010111010100001010100010101010101000010101011101010101010000101010101010101110100001010101000101000001@00010111011111011111111400100000000000000000000001111111111111111111000000000000000000000F10000000000000000000000200|5^756,564!9^468,396,1,0,4,3,1,0,-1!9^612,252,0,0,27,14,1,0,0!9^564,396,1,0,12,13,1,0,-1!9^636,156,0,0,19,20,1,-1,0!9^228,396,0,0,27,8,1,0,0!9^372,252,1,0,12,5,1,0,-1!9^204,444,1,1,4,9,0,0,0!9^564,252,1,1,4,5,0,0,0!0^564,228!0^396,204!0^588,444!0^564,444!0^540,444!0^204,444!0^276,444!0^276,420!0^276,396!0^276,372!0^372,444!0^180,204!0^180,228!0^228,204!0^228,180!0^252,156!4^108,306,1!11^36,60,132,204!0^132,180!0^564,252!0^156,108!0^180,108!0^204,108!0^228,108!0^252,108");
var lev_burgertime = new LevelData("burgertime", "9000000000000000000000600000000000000000000000000;00;<00;1<00;<00<00000010011001110011001000000:00:=00:1=00:=00=000000000000000000000000000000000000000000000000000000000000000000000000000;00;<00;1<00;<00<00000010011001110011001000000:00:=00:1=00:=00=000000000000000000000000000000000000000000000000000000000000000000000000000;00;<00;0<00;<00<00000010011000000011001000000:00:=00:0=00:=00=000000000000000000000000000000000000000000000000000000000000000000000000000;00;<00;1<00;<00<00000010011001110011001000000:00:=00:1=00:=00=000000000000000000000000000000000000000000000000000000000000000000000000000;00;<00;1<00;<00<00000010011001110011001000000:00:=00:1=00:=00=0000000000000000000000000080000000000000000000007|5^396,528!1^468,468!1^612,468!1^324,468!1^180,468!1^180,372!1^324,372!1^468,372!1^612,372!1^612,252!1^468,252!1^324,252!1^180,252!1^180,156!1^324,156!1^468,156!1^612,156!9^108,468,1,0,16,13,1,0,0!9^684,372,1,0,16,11,1,0,-1!9^684,156,1,0,16,13,1,0,-1!9^108,252,1,0,16,11,1,0,0!9^252,156,0,0,15,12,1,-1,0!9^396,468,0,0,15,12,1,0,0!9^684,468,0,0,17,12,1,0,0!9^108,156,0,0,17,12,1,-1,0!11^396,84,396,300!0^516,468!0^528,468!0^540,468!0^552,468!0^564,468!0^276,468!0^264,468!0^252,468!0^228,468!0^240,468!0^396,372!0^384,372!0^408,372!0^420,378!0^372,378!0^408,156!0^396,156!0^384,156!0^372,162!0^420,162!0^96,84!0^108,84!0^120,84!0^240,84!0^252,84!0^264,84!0^528,84!0^540,84!0^552,84!0^672,84!0^684,84!0^696,84!0^690,72!0^678,72!0^546,72!0^534,72!0^258,72!0^246,72!0^114,72!0^102,72!6^252,36,3,1,0,2!6^540,564,3,1,0,0!6^36,300,2,1,0,3!6^756,300,2,1,0,1");
var lev_platformpuzzle = new LevelData("platformpuzzle", "000000000P1000000000000000000000P1000000000000000000000P1000000000000000000000P10000000000000000000001100000000000000000000000000000000000000000000000000000000000000000000000000011000000000000000000000P1111000000000000000000P11O1000000000000000000P1000000000000000000000P10000000000000111111111111110000000001OOOOOOOOOOOOO00000000010000000000000000000000100000000000000000000001000000000000000000011010000000000000000000P1000000000000000000000P1000000000000000000000P1000000000000000000000P1000000000000000000000P1000000000000000000000P100000000000000000000011010000000000000000000000000000000000000000000000000000000000000011000000000000000000000P1000000000000000000000P1000000000000000000000P1000000000000000000|5^586.632097968693,566!7^660,492,3!7^636,492,3!7^612,492,3!7^588,492,3!7^564,492,3!7^540,492,3!7^516,492,3!7^492,492,3!7^468,492,3!7^444,492,3!7^420,492,3!7^396,492,3!7^372,492,3!7^684,492,2!7^684,516,2!7^684,540,2!7^684,564,2!7^684,468,2!7^684,444,2!7^684,420,2!7^516,468,2!7^516,444,2!7^516,420,2!7^660,420,3!7^636,420,3!7^612,420,3!7^588,420,3!7^564,420,3!7^540,420,3!7^516,420,3!7^492,420,3!7^468,420,3!7^444,420,3!7^420,420,3!7^396,420,3!7^372,420,3!7^684,420,3!7^708,420,3!7^732,420,3!7^756,396,1!7^756,348,3!7^732,348,3!7^708,348,3!7^684,348,3!7^660,348,3!7^636,348,3!7^612,348,3!7^588,348,3!7^564,348,3!7^540,348,3!7^516,348,3!7^492,348,3!7^468,348,0!7^468,372,0!7^468,396,0!7^468,348,3!7^444,348,3!7^420,348,3!7^396,348,3!7^372,348,3!7^636,324,0!7^636,300,0!7^636,276,0!7^492,324,2!7^492,300,2!7^492,276,2!7^372,276,3!7^396,276,3!7^420,276,3!7^444,276,3!7^468,276,3!7^492,276,3!7^516,276,3!7^540,276,3!7^564,276,3!7^588,276,3!7^612,276,3!7^636,276,3!7^660,276,3!7^684,276,3!7^708,276,3!7^732,276,3!7^732,276,3!7^756,276,3!7^348,276,0!7^348,300,0!7^348,324,0!7^348,348,0!7^348,372,0!7^348,396,0!7^348,420,0!7^348,444,0!7^348,468,0!7^348,492,0!7^348,516,0!7^348,540,0!7^348,564,0!10^36,36!11^300,564,732,564!9^612,324,0,0,10,23,1,0,0!9^444,324,0,0,18,9,1,-1,0!9^468,468,0,0,25,9,1,0,0!12^516,264!0^756,300!0^732,300!0^708,300!0^684,300!0^612,300!0^588,300!0^564,300!0^540,300!0^516,300!0^444,300!0^420,300!0^396,300!0^396,372!0^420,372!0^444,372!0^516,372!0^540,372!0^564,372!0^588,372!0^612,372!0^636,372!0^660,372!0^684,372!0^708,372!0^732,372!0^636,444!0^612,444!0^588,444!0^564,444!0^540,444!0^468,444!0^444,444!0^420,444!0^396,444!0^756,540!0^756,516!0^756,492!0^756,468!0^756,444!0^756,84!0^756,60!0^732,84!0^36,204!0^36,228!0^60,228!0^300,396!0^300,420!0^276,420!8^204,492,1!2^708,576,0,-1!2^396,576,0,-1!2^312,240,-0.707106781186547,-0.707106781186547!2^432,168,-0.707106781186547,-0.707106781186547!1^516,540");
var lev_riseoverrun = new LevelData("rise over run", "90000000000000000061906000000000000000000710000011@000000000100015000000>D0000000002400000000000B@000000000240000000000>D0000000000240000000000B@000000000024000000000>1100001400002100000000000000061000000000000000000000010000000000010000000007100000000000100000100015000000000002400001LH000000000000000240000FJLH000000000000002400000FJLH000000100000021100000FJLH0000E0000000000000000FJ1000P0000000000000000001000P0000000000000000000000P000000100000000000000?A000000100000310014000N000000?E00003500002400N000000CA00035000000100C00000?E000150000000000E00000CA000000000000000P0000?E0000000000000000P0000CA000000000000000?A0000100000000GK100000N000001000000GKMI000000N0000000000GKMI00000000N00080000001I0000000000C807|5^36,540!11^708,564,756,180!9^300,300,0,0,15,23,1,-1,0!2^252,336,0,-1!2^444,432,0,-1!2^564,252,-0.707106781186547,-0.707106781186547!3^396,444!3^684,108!3^108,84!0^132,120!0^156,132!0^180,144!0^204,156!0^324,72!0^348,96!0^372,120!0^396,144!0^528,132!0^552,120!0^576,108!0^600,96!0^624,84!0^648,72!0^672,60!0^588,204!0^516,372!0^324,204!0^300,204!0^300,60!0^276,60!0^696,60!0^732,204!0^720,228!0^708,252!0^696,276!0^684,300!0^672,324!0^588,564!0^564,564!0^540,564!0^516,564!0^492,564!0^564,420!0^204,300!0^84,348!0^120,372!0^144,396!0^168,420!0^192,444!0^216,468!0^84,444!0^84,60!0^372,516!0^396,516!0^420,516!0^504,504!0^576,492!0^672,480");
var lev_deosil = new LevelData("deosil", "0000000000000000000000000000000000000000000000000000000000000000000000031111111111111111140000100000000000000000100001000000000000000001001010000000000000000010?0010000000000000000010N0010000000000000000010>001003111111111114001000010010000000000010010000100100000000000100110001001000000000001001000110010000314000010010000100100001010000B00B0?0010010000100000000000N00100100001010000C00C0>01100100002150000100100001001000000000001001000010010000000000010011000100100000000000100100001002111111111115001000010000000000000000010?0010000000000000000010N1010000000000000000010>001000000000000000001000010000000000000000010000211111111111111111500000000000000000000000000000000000000000000000000000000000000000000000|5^420,300!11^396,252,396,60!9^396,228,1,0,16,18,1,0,0!9^396,132,1,0,16,21,1,0,0!6^516,420,3,1,0,3!6^276,180,3,1,0,1!6^276,60,0,1,0,0!6^132,564,0,1,0,0!6^660,492,3,1,0,3!6^228,300,0,1,0,3!7^396,492,3!0^396,348!0^396,372!0^396,396!0^396,420!0^468,60!0^492,60!0^516,60!0^540,60!0^564,60!0^588,60!0^612,60!0^636,60!0^660,60!0^324,60!0^300,60!0^276,60!0^252,60!0^228,60!0^204,60!0^180,60!0^156,60!0^132,60!0^132,492!0^156,492!0^180,492!0^204,492!0^228,492!0^252,492!0^276,492!0^300,492!0^324,492!0^348,492!0^444,492!0^468,492!0^492,492!0^516,492!0^540,492!0^564,492!0^588,492!0^612,492!0^636,492!0^660,492!0^516,132!0^492,132!0^468,132!0^444,132!0^420,132!0^372,132!0^348,132!0^324,132!0^300,132!0^276,132!0^348,420!0^324,420!0^300,420!0^276,420!0^444,420!0^468,420!0^492,420!0^516,420!0^756,564!0^588,552!0^396,552!0^204,552!0^36,564!0^36,540!0^60,564!0^36,516!0^84,564!0^732,564!0^708,564!0^756,540!0^756,516!0^444,36!0^348,36");
var lev_blastdoors = new LevelData("blast doors", "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001@0000000000000000000001P0000000000000000000101P0000000000000000000101P0000000000000000000101P0000000000000000000101P0000000000000000000101P0000000000000000000101P000000001@000000000101P000000001P000000000101P000000001P000000000101P000000001P000000000101P000000001P000000000101P000000001P000000000101P000000001P000000000101P000000001P000000000101P000000001P000000111101P000000001P000000111101P000000001P000000100001P000000001P000000100001P000000001P000000100001P000000001P000000B@00?1A000000001D000000>1111E00000000001@0000000000000000000000D00000000000000000000000000000000000000000000000000000000000000000000000|5^732,564!9^564,444,0,0,22,8,1,0,0!9^372,444,0,0,15,8,1,-1,0!9^504,204,0,0,20,8,0,0,0!9^240,204,0,0,9,8,0,0,0!9^468,444,0,1,18,8,0,-1,0!0^360,444!0^384,444!0^456,444!0^468,444!0^480,444!0^552,444!0^576,444!0^468,204!0^396,204!0^492,156!0^468,156!0^444,156!0^420,156!0^396,156!0^372,156!0^348,156!0^324,156!0^300,156!0^276,156!0^252,156!0^228,156!0^204,156!1^60,276!1^132,324!1^180,372!1^228,420!11^612,204,516,84!10^36,36!12^408,444!12^420,444!12^516,444!12^528,444!6^36,564,3,0,1,0");
var lev_roomfullofgold = new LevelData("room full of gold", "00000001111111110000000000000010000000100000000000000000000001000000000000001000000010000000000000010000000000000000000000100111001000000000000001001110010000000000000010011100100000000000000100111001000000000000000001110010000000000000010011100100000001111114100111001311111100000021001110015000000000000020011100500000000000000000111000000000000000000001110000000000000211140011100311150000000211140111031115000040000211141113111500000140000211111111150000032140000211111115000003102140000211111500000315002140000211150000031500002140000000000003150000002140000000000315000000002140000000031500000000002140000003150000000000002140000315000000000000002110011500000000000000000000000000000000000000000000000000000|5^36,564!8^132,396,1!8^84,204,1!11^732,564,708,60!4^396,258,1!12^432,480!12^456,456!12^480,432!12^504,408!12^528,384!12^552,360!12^432,120!12^456,144!12^480,168!12^504,192!12^528,216!12^552,240!4^324,570,1!0^276,108!0^276,84!0^276,60!0^276,36!0^276,132!0^276,156!0^276,180!0^252,180!0^252,156!0^252,132!0^252,108!0^252,84!0^252,60!0^252,36!0^228,36!0^228,60!0^228,84!0^228,108!0^228,132!0^228,156!0^228,180!0^204,180!0^204,156!0^204,132!0^204,108!0^204,84!0^204,60!0^204,36!0^180,36!0^156,36!0^132,36!0^108,36!0^84,36!0^60,36!0^36,36!0^36,60!0^60,60!0^84,60!0^108,60!0^132,60!0^156,60!0^180,60!0^180,84!0^180,108!0^180,132!0^180,156!0^180,180!0^156,180!0^156,156!0^156,132!0^156,108!0^156,84!0^132,84!0^132,108!0^132,132!0^132,156!0^132,180!0^108,180!0^108,156!0^108,132!0^108,108!0^108,84!0^84,84!0^84,108!0^84,132!0^84,156!0^84,180!0^60,180!0^60,156!0^60,132!0^60,108!0^60,84!0^36,84!0^36,108!0^36,132!0^36,156!0^36,180");
var lev_factory = new LevelData("factory", "001111502100000000002110011110005000000000001100211100000000000000011000211400040000000000110000FJ14031000000000011000000FJ11500000000001100000000000000000000021000000000000000000000010000000000000000000000100000000140000000003101000000000240000310010010000000000100111100100100000000035000021001001000031001500000000010011140150000000000000100111101000000000000001001115014000000000000010010000210014000000000103100000000024000031001011000000000010011110010020000000003500002100140000000000150000000002110000000000000000000000000000000000000000000000000003140140000000000003010011101140000000031010100110002100003100100201001100001001111001000014011400010000210010000210111111100000000100000000000000000000031403|5^48,36!6^420,516,3,1,0,2!8^132,300,1!8^444,420,1!8^348,420,1!8^492,36,1!8^300,36,1!11^708,564,60,228!1^60,324!1^588,468!1^588,348!2^396,480,0,-1!2^468,396,-0.707106781186547,-0.707106781186547!2^324,396,0.707106781186547,-0.707106781186547!2^276,396,-0.707106781186547,-0.707106781186547!2^516,396,0.707106781186547,-0.707106781186547!2^660,396,-0.707106781186547,-0.707106781186547!12^180,228!12^204,228!12^228,228!12^372,228!12^396,228!12^420,228!4^372,546,1!9^492,324,0,0,22,23,1,0,0!9^300,324,0,0,22,23,1,-1,0!9^420,540,0,0,26,22,1,-1,0!9^396,180,0,0,26,22,1,0,0!9^300,252,0,0,26,8,1,-1,0!9^492,252,0,0,26,8,1,0,0!12^564,228!12^588,228!0^660,180!0^672,240!0^684,252!0^696,252!0^708,252!0^708,240!0^696,240!0^684,240!0^660,240!0^660,228!0^672,228!0^684,228!0^696,228!0^708,228!0^708,216!0^696,216!0^684,216!0^672,216!0^660,216!0^660,204!0^672,204!0^684,204!0^696,204!0^708,204!0^708,192!0^696,192!0^684,192!0^672,192!0^660,192!0^672,180!0^684,180!0^696,180");
var lev_thelongway = new LevelData("the long way", "00000000000000000000000000000000000000000000000011111111111111111110000100000000000000000100001000000000000000001000010011111111111110010000100100000000000100100001001000000000001001000010010011111110010010000100100100000100100100001001001010101001001000010010010101010010010000100100101010100100100001001001010101001001000010010010101010010010000100100001010100100000001001001010101001001000010010010101010010010000100100101010100100100001001001010101001001000010010010111010010010000100100100000100100100001001001111111001001000010010000000000010010000100100000000000100100001001111110111111001000010000000000000000010000100000000000000000100001111111111111111111000000000000000000000000000000000000000000000000|5^756,564!12^420,468!12^420,492!12^612,276!12^588,276!12^372,252!6^636,60,0,1,0,0!6^540,132,1,1,0,2!6^348,204,1,1,0,2!6^372,252,0,0,0,0!0^420,204!0^444,204!0^468,204!0^492,204!0^516,204!0^540,204!0^564,204!0^348,252!0^324,252!0^300,252!0^276,252!0^444,492!0^468,492!0^492,492!0^516,492!0^540,492!0^564,492!0^588,492!0^612,492!0^636,492!0^660,492!0^684,492!0^660,468!0^636,468!0^612,468!0^588,468!0^564,468!0^540,468!0^516,468!0^492,468!0^468,468!0^444,468!12^420,540!12^420,564!11^468,564,492,300!0^540,348!0^516,348!0^492,348!0^468,348!0^444,348!0^420,348!0^396,348!0^372,348!0^348,348!0^324,348!0^300,348!0^276,348!0^252,348!0^180,420!0^204,420!0^228,420!0^252,420!0^276,420!0^300,420!0^324,420!0^348,420!0^348,396!0^324,396!0^300,396!0^276,396!0^252,396!0^228,396!0^204,396!0^84,60!0^108,60!0^132,60!0^156,60!0^180,60!0^204,60!0^228,60!0^252,60!0^276,60!0^300,60!0^324,60!0^348,60!0^372,60!0^396,60!0^372,36!0^348,36!0^324,36!0^300,36!0^276,36!0^252,36!0^228,36!0^204,36!0^180,36!0^156,36!0^132,36!0^108,36!0^84,36!0^36,564!0^60,564!0^84,564!0^108,564!0^132,564!0^156,564!0^180,564!0^204,564!0^60,540!0^84,540!0^108,540!0^132,540!0^156,540!0^180,540!0^204,540");
var lev_walljumpfrenzy = new LevelData("wall jump frenzy", "000N0000000000000000000000N00000000000000000000000000000000000000000000000000000000000000000000000000000031111111000000111111111111111110000000000000000000000000000000000000000000000000000111111111111111110000000000000000000000000000000000000000000000000000111111111111111110000000000021111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000031111111111100000011111111111111111000000000000000000000000000000000000000000000000000011111111111111111000000000000000000000000000000000000000000000000000011111111111111111000000000000000211111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|5^756,564!11^36,96,564,84!12^672,516!12^672,480!12^672,444!12^672,408!12^672,372!12^648,324!12^648,288!12^648,252!12^648,216!12^648,180!12^648,144!12^120,516!12^120,480!12^120,444!12^120,408!12^120,372!12^144,324!12^144,288!12^144,252!12^144,216!12^144,180!12^144,144!12^456,516!12^456,480!12^456,444!12^456,408!12^456,372!12^456,336!12^456,300!12^456,264!12^336,264!12^480,228!12^480,192!12^480,156!12^312,228!12^312,192!12^312,156!12^336,300!12^336,336!12^336,372!12^336,408!12^336,444!12^336,480!12^336,516!12^768,480!12^768,408!12^768,324!12^768,252!12^768,180!12^768,108!12^24,480!12^24,408!12^24,324!12^24,252!12^24,180!6^564,108,1,0,2,2!6^228,108,0,0,2,0!8^396,36,1!0^612,444!0^588,396!0^612,348!0^588,300!0^612,252!0^180,444!0^204,396!0^180,348!0^204,300!0^180,252!0^396,564!0^384,564!0^408,564!12^444,60!12^348,60!4^276,570,1!0^276,444!0^252,396!0^276,348!0^252,300!0^276,252!0^204,204!0^180,156!0^252,204!0^276,156!0^588,204!0^612,156!0^516,156!0^540,204!0^516,252!0^540,300!0^516,348!0^540,396!0^516,444!0^564,564!0^576,564!0^552,564!0^540,564!0^588,564!0^252,564!0^240,564!0^228,564!0^216,564!0^204,564!0^588,492!0^540,492!0^252,492!0^204,492!0^396,396!0^396,300!0^396,204");
var lev_curvaceous = new LevelData("curvaceous", "9000611900000000000001000000:=00000000000000100000000000000000000001000;<00000;1111<000000:0006=0000011111100;<00000000000001111110011000700000000011111100:=00;1000000000:11111000000:1807<000000000610000000611110000000000100000000906=00<000000710000000700000010000;11100;<00;1000000=0000:11100:=00:1000000000000611000000060000000000007110000000700;111<00;1111100;<00;1001111=00:1111=00:=00:10019000000000000000000600100000000000000000007001000;111111<000;<00;100100011119061000:=00:1001000:11=0001000000006001000000000010000000070710000000000=0000000;1019000;<000000000;<00:10100071100<0000001100060:00;19000=00;<001100070000:1000000011001100;1000000000000011001100:1000000000;<00118711000680;<0;<0711871111118007|5^138,564!11^48,564,744,564!9^138,78,0,0,4,23,1,0,0!9^630,150,0,0,3,23,1,0,0!12^66,84!12^180,102!12^180,30!6^660,204,1,0,0,3!6^684,180,0,0,0,2!6^684,420,1,0,0,2!12^360,456!12^456,456!12^552,456!12^576,456!12^204,456!12^276,456!12^240,456!0^660,558!0^648,570!0^636,558!0^564,558!0^552,570!0^540,558!0^468,558!0^456,570!0^444,558!0^372,558!0^360,570!0^348,558!0^276,558!0^264,570!0^252,570!0^240,570!0^228,558!0^246,558!0^258,558!0^276,546!0^228,546!0^360,546!0^456,546!0^552,546!0^648,546!2^294,534,-0.707106781186547,-0.707106781186547!2^522,534,0.707106781186547,-0.707106781186547!0^240,348!0^252,348!0^264,348!0^276,336!0^228,336!0^228,324!0^276,324!0^348,312!0^354,324!0^366,324!0^372,312!0^324,156!0^306,156!0^276,156!0^294,156!3^450,114!3^312,276!9^456,288,0,0,3,23,1,-1,0");
var lev_trenchrun = new LevelData("trench run", "00100000000000000000000001000003114000000000000010000011110000011100000111140100101111101000000000101001010000010000000101010010101111100000000010100111010000000000011501000000100000000000100010000001111114000001000111400000001110000010000001000000011500000100000010000000100000001000000100000001000003110000001000000010000010000000021400011100000111111100001000100000000000001000010001100000000000010000100001110000000111100001001000100000001100000010010101100000011000000000100001000000010000000001111110000000100000000010010000003115031111400100210000011000100001001000100000110001010010010101000001100010000100000021003111011500101111110010010000100000021111100100211115000000000002115000000000000000000000000|5^48,48!11^84,60,108,468!8^708,84,1!12^180,288!12^108,288!12^144,252!12^768,228!12^708,348!12^768,348!12^168,492!12^216,444!9^132,468,1,1,19,19,0,0,-1!9^132,444,1,1,27,19,0,0,-1!9^132,420,0,1,28,13,0,0,0!9^132,396,0,1,26,10,0,0,0!9^132,372,1,1,7,5,0,0,-1!9^144,276,0,0,6,15,1,-1,0!9^180,432,0,0,28,6,1,-1,0!9^708,156,0,0,7,15,1,0,0!6^132,132,0,0,0,3!6^636,300,1,0,0,0!6^684,276,0,0,0,0!6^516,468,1,1,0,3!6^636,492,0,1,0,2!12^204,84!12^204,48!12^444,156!12^684,60!12^324,228!12^492,288!12^540,372!12^300,420!12^300,348!12^60,396!12^60,348!0^108,324!0^120,324!0^132,324!0^144,324!0^156,324!0^372,108!0^372,132!0^372,120!0^708,492!0^708,516!0^684,516!0^684,492!0^696,504!0^684,504!0^696,492!0^708,504!0^696,516!0^348,468!0^336,468!0^324,468!0^312,468!0^300,468!0^288,468!0^276,468!0^264,468!0^252,468!0^264,456!0^288,456!0^312,456!0^336,456!0^324,444!0^300,444!0^276,444!0^564,156!0^540,156!0^660,84!0^636,84!0^612,84!0^444,204!0^420,204!0^432,204!0^432,192!0^444,192!0^420,192!0^420,180!0^432,180!0^444,180!0^468,396!0^480,396!0^492,396!0^504,396!0^516,396!0^528,396!0^540,396!0^552,396!0^576,396!0^564,396!0^588,396!0^600,396!0^624,396!0^612,396!0^636,396!0^204,480!0^204,492!0^204,504!0^204,516!0^204,528!0^216,540!0^228,552!0^84,204!0^96,204!0^108,204!0^120,204!0^132,204!0^144,204!0^156,204!0^168,204!0^180,204!0^192,204!0^204,204!0^216,204!0^228,204!0^240,204!0^252,204");
var lev_bambooforest = new LevelData("bamboo forest", "00OOO000100000000010OOO00OO000010000000000000000000000100OOOOO001QQ0O0000000010000OOOO01000O0000000010000000001000000OOOOO01QQQQQQQ001000O0000000010000000001000OQQQQQQQ0100OOOOOOO1000O00000000100000000010000000OOOOO10QQQQQQQ01000Q0000000010000OOOOO1000Q0000000010000000001000O0000000010000000001000O00OOOO001000000000100000000000010000000001000Q000QQQQ01000OOOOO01000Q0000000010OOOOO0001000Q0QQQQQ001000000000100000000000010000QQQQ01000O00000000100000000010000000000001QQQQQQ0001000Q00OOOOOO10000000001000O0000000010000000001000O0000000010000000001000O0QQQQQQ010000OOOOO10000OOOOO000100OOOO0001000Q0000000010000000001000000OOOOO01OO00000001000O0000000010000OOOO01000000000000000000000010000000000001QQQQQQ00010000|5^756,564!0^756,444!0^732,444!0^708,444!0^684,444!0^624,84!0^624,108!0^624,132!0^480,204!0^504,204!0^528,204!0^372,108!0^372,132!0^372,156!0^192,204!0^168,204!0^144,204!0^120,204!0^528,180!0^132,252!0^108,252!0^132,276!0^36,444!0^372,540!0^396,540!0^420,540!0^348,540!0^324,540!0^300,540!0^444,540!0^444,564!0^36,492!8^732,36,1!8^60,252,1!3^468,36!3^540,252!3^324,252!3^732,492!12^420,216!12^396,216!12^660,576!12^120,456!12^96,456!12^468,456!12^444,456!12^660,456!0^180,180!0^180,156!0^180,132!0^180,108!0^180,84!0^180,60!11^48,60,624,60");
var lev_filthytramps = new LevelData("filthy tramps", "0000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000001000000000000000000000015000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000140000000P0000000000000100000000P0000000000000200000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000|5^732,564!2^516,576,0,-1!2^276,576,0,-1!2^396,576,0,-1!2^468,336,0,-1!2^324,336,0,-1!2^204,240,0,-1!2^588,240,0,-1!2^696,156,-0.707106781186547,-0.707106781186547!2^96,156,0.707106781186547,-0.707106781186547!2^216,252,0.707106781186547,-0.707106781186547!2^576,252,-0.707106781186547,-0.707106781186547!2^24,468,0.707106781186547,-0.707106781186547!2^768,468,-0.707106781186547,-0.707106781186547!1^84,348!1^708,348!1^132,204!1^660,204!7^132,540,1!7^108,540,1!7^84,540,1!7^72,564,0!9^396,84,0,0,6,23,1,-1,0!11^588,444,108,564!3^756,36!10^36,36");
var lev_pacninja = new LevelData("pac-ninja", "00000000000000000000000000000000000000000000000000000000000000000000001110100000000000000000010001000000000000000000101010000000000000000000010100000000000000000010101000000000000000000101010000000000000000000000100000000000000000011101000000000000000000100010000000000000000001010100000000000000000010101000000000000000000101010000000000000000000010100000000000000000011101000000000000000000001010000000000000000000010100000000000000000000101000000000000000000011010000000000000000000000100000000000000000011101000000000000000000100010000000000000000001000100000000000000000010001000000000000000000100010000000000000000001111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000|5^660,36!2^24,180,1,0!2^24,204,1,0!2^24,228,1,0!2^24,252,1,0!2^24,276,1,0!2^24,300,1,0!2^24,324,1,0!2^24,348,1,0!2^24,372,1,0!2^24,396,1,0!2^24,420,1,0!2^24,444,1,0!2^24,468,1,0!2^24,492,1,0!2^24,516,1,0!2^24,540,1,0!2^24,564,1,0!2^768,180,-1,0!2^768,204,-1,0!2^768,228,-1,0!2^768,252,-1,0!2^768,276,-1,0!2^768,300,-1,0!2^768,324,-1,0!2^768,348,-1,0!2^768,372,-1,0!2^768,396,-1,0!2^768,420,-1,0!2^768,444,-1,0!2^768,468,-1,0!2^768,492,-1,0!2^768,516,-1,0!2^768,540,-1,0!2^768,564,-1,0!8^276,132,2!8^324,132,0!6^396,180,1,0,0,0!6^372,84,1,0,0,2!6^132,36,0,0,0,0!6^204,132,1,0,0,2!6^252,84,0,0,0,3!11^636,132,132,132!9^324,84,0,0,23,5,1,-1,0!9^216,36,0,0,23,5,1,0,0!0^444,84!0^468,84!0^492,84!0^372,36!0^348,36!0^324,36!0^300,36!0^276,36!0^228,84!0^204,84!0^180,84!0^156,84!0^348,132!0^372,132!0^396,132!0^420,132!0^444,132!0^468,132!0^492,132!0^516,132!0^540,132!0^252,132!0^228,132!0^204,132!0^180,132!0^156,132!0^108,132!0^132,108!0^132,84");
var lev_castlebasement = new LevelData("castle/basement", "00000000000100001000011000000001001000010000110000000011110111100000000000100000100000001000000001111001000000010000000010000010000000100000111100100111111111110000101001001000000000000000010010010000000000000010100100100111111100000101001001001111111000001010000010000000000000010111100100000000000000001000001011111111110001010010010000000010000010100100100000000100000101001001001100001000111010010010001000110000010100100100010000000000101001001000100000000001010010011111111111000000100000100000000000000101111001000000000000011110000010000000000000000100110100001101100000001001001000010001000000011110010000100010000000100100100001000100000000001111000011111000000000000010000000000000000000000000000000000|5^36,36!9^636,204,1,0,1,9,1,0,-1!9^60,276,0,0,25,19,1,-1,0!9^348,96,1,0,14,4,0,0,-1!9^540,96,1,0,22,4,0,0,-1!9^228,96,1,0,9,4,0,0,-1!9^540,240,1,0,22,9,0,0,0!9^348,240,1,0,14,9,0,0,0!9^300,240,1,0,12,9,0,0,0!9^156,240,1,0,6,9,0,0,0!9^756,348,1,1,31,12,0,0,0!11^60,396,612,132!6^156,132,0,1,0,3!6^564,252,1,1,0,0!6^252,348,0,0,1,0!2^372,504,0,-1!12^444,48!12^444,480!12^420,360!12^84,576!12^108,288!6^636,444,0,0,1,0!9^684,492,1,0,6,16,1,0,0!9^492,372,1,0,5,16,1,0,0!9^204,324,1,0,4,16,1,0,0!4^156,474,1!4^492,378,1!4^348,138,1!9^252,204,1,0,24,9,1,0,0!0^660,492!0^636,492!0^684,468!0^684,444!0^396,204!0^420,204!0^444,204!0^468,204!0^492,204!0^612,204!0^612,180!0^636,180!0^684,204!0^684,180!0^708,204!0^564,132!0^204,132!0^492,132!0^468,132!0^264,132!0^288,132!0^444,132!0^468,84!0^228,204!0^204,204!0^60,252!0^36,276!0^324,468!0^324,492!0^324,516!0^204,492!0^204,516!0^204,540!0^372,444!0^372,420!0^372,396!0^372,372!0^372,348!0^708,396!0^684,396!0^612,540!0^636,540!0^132,372!0^156,372!0^108,372!3^756,36!1^756,468");
var lev_artifact2 = new LevelData("artifact 2", "0000000000000000000000000000000000000000000000000D00000000000001D00000001D00004000000011000?000BE000010000000BE000C00000000?10000GO000000100000000C50003150000001000000035000?1E0000000B000000350000N1P0000000>00000?E00000>1D0000000000000CP0000002140000000000031P0004000FQ000000?000011D000100000000000C0000B11@002LOOH000000310CD0>11D000FQQQQD000011011001110000000010000110BE0?11E000GOOOOE0000110000C11A003MQQI00000021000011E000100000000000B000021P0005000GO000000>00000BP000000315000000000000>D00000?1E00000000000000240000N1P0000000?000000024000>1D0000000C00000000B4000214000000100000000>10000FQ0000001000CD000010000000CD000B0001E00005000000011000>000E00000000000001E00000000000000000000000000000000000000000000000000|5^396,36!0^384,324!0^384,336!0^384,348!0^384,360!0^384,372!0^384,384!0^384,396!0^396,396!0^408,396!0^408,384!0^408,372!0^408,360!0^408,348!0^408,336!0^408,324!0^396,336!0^396,348!0^396,360!0^396,372!0^396,384!3^228,384!3^564,384!6^396,444,0,0,1,2!11^696,84,396,516!6^36,540,4,1,0,3!6^756,540,4,1,0,3!6^468,252,0,0,1,0!0^564,312!0^564,300!0^564,288!0^228,288!0^228,300!0^228,312!0^300,252!0^312,252!0^324,252!0^492,252!0^468,252!0^480,252!0^708,420!0^696,420!0^684,420!0^84,420!0^96,420!0^108,420!0^252,564!0^276,564!0^264,564!0^264,552!0^252,552!0^276,552!0^516,564!0^528,564!0^540,564!0^540,552!0^528,552!0^516,552");
var lev_cloudcity2 = new LevelData("cloud city 2", "0001110101111101011190600011101011111010111000000:11111111111111110000000000000000000006100700000000000000000001L0100000000000000000001M0100000000000000000001006000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000;<00000000000001007000;=:<0000000000001L01000:<;=0000000000001M0100001900000000000001006000010000000000000010000000100000000000000100000001800000000000001000000;=:<0000000000001000000:<;=00000000000010070000:=0000000000000=0010000000000000000000000100000000<0000000000000600000;0010000000000000000;MQ100:111<000000000000E00N00000:1111<00000000P0000000000000000000700D0000NH00000;1111=001001LOOK11LOO001=00000000000000000000000000000000000000000000000000000|5^48,60!9^684,192,0,0,13,22,1,0,0!9^636,144,0,0,5,22,1,0,0!0^468,564!0^480,564!0^456,564!0^444,564!0^432,564!0^420,564!0^408,564!0^396,564!0^384,564!0^288,564!0^276,564!0^264,564!0^252,564!0^240,564!0^228,564!0^216,564!0^204,564!0^192,564!0^576,564!0^588,564!0^600,564!0^612,564!0^624,564!0^636,564!0^648,564!4^204,570,1!4^396,570,1!4^588,570,1!4^492,474,1!6^732,300,1,0,0,3!6^660,492,0,0,0,3!6^660,396,1,0,0,3!12^300,108!12^276,144!12^300,180!12^336,84!12^336,204!0^108,132!0^108,156!0^108,180!0^108,204!0^108,228!0^108,252!0^108,276!0^108,300!0^108,324!0^108,348!0^108,372!0^108,396!0^108,420!0^108,444!11^408,108,72,552!6^708,468,2,0,1,3!0^444,468!0^420,468!0^396,468!0^372,468!0^348,468!0^324,468!0^300,468!0^276,468!0^252,468!0^228,468!0^204,468!0^180,468!0^156,468!0^132,468!0^468,468!0^636,108!0^648,96!0^660,96!0^672,96!0^684,108!0^696,120!0^696,144!0^696,168!0^624,120!0^696,132!0^696,156!0^588,204!0^576,204!0^648,108!0^660,108!0^672,108");
var lev_spacebattle = new LevelData("space battle", "000000000000000000000000000000000000000000A0000000000000000000000000000000000000000000>000000GOH0000000000000000000?111@000000>@0?A000A000N111P0000000B1E00000000>11100000000>0A000000000FQ000000@0000A00000000000000000P0000000000000000000000000>0000000000000000000000000000000@000000000000000A00000KD00000000000@00000000>1I00000000000P0000000001000000000000000000000K100000000000000000000>1I0000000000004000000001000000000001010000000KI00000000003101400000KI0000000000350002400001000000000001000@01000K10000000000010N0P0100FJ10000000000010>0A01000010N0000000002400035000010N0000000000211150000010N0000000000000000000N10N000A0000000000000000100N000>@0?A0000000000N100N0000B1E00000000000N100N0000>0A000000000000100N00|5^36,564!11^564,252,756,420!9^204,348,0,0,20,10,1,0,0!9^564,84,0,0,14,23,1,-1,0!9^756,564,0,0,19,10,1,-1,0!0^348,84!0^444,132!0^360,96!0^96,180!0^120,192!0^156,192!0^156,240!0^144,252!0^72,384!0^432,372!0^240,540!0^252,480!0^264,468!0^264,480!0^696,264!0^768,204!0^744,300!0^720,24!0^708,36!0^672,36!0^660,36!0^156,36!0^84,48!0^24,72!0^36,84!0^120,456!0^108,468!0^588,420!0^600,408!0^612,432!0^288,168!6^60,156,4,0,2,0!0^756,504!0^744,504!0^732,504!0^720,504!0^708,504!0^696,504!0^684,504!0^660,480!0^648,480!0^636,480!0^624,480!0^612,480!0^600,480!0^588,480!0^660,564!0^648,564!0^636,564!0^624,564!0^612,564!0^600,564!0^588,564!0^564,564!0^576,564!0^552,564!0^540,564!0^516,564!0^504,564!0^504,564!0^492,564!0^480,564!0^468,564!0^468,564!0^456,564!0^444,564!0^432,564!0^420,564!0^696,564!0^708,564!0^432,24!0^24,288!0^120,576!0^696,372!0^708,360!0^708,372!0^720,384");
var lev_pagodaish = new LevelData("pagoda-ish", "0000000000000000000000000;800P0000000000000000071QQQP0000000000000000001000P0000000000000000061OO0P000000000000000000:900P000;800P0000000000000000071QQ0P0000000000000000001000P0000000000000000061OOOP000000000000000000:900P000000000000000000000000;800P0000000000000000071QQQP0000000000000000001000P0000000000000000061OO0P0000000000;800P000:900P00000000071QQ0P0000000000000000001000P0000000000000000061OOOP000000000000000000:900P000000000000000000000000000000000000000000000000000000000000000000000000000000000000;800P0000000000000000071QQ0P0000000000000000001000P000000;800P00000061OOOP0000071QQQP0000000:900P0000001000P0000000000000000061OO0P000000000000000000:900P000000000000000000000000000000000000000000000000|5^420,564!3^756,36!1^300,228!1^516,420!1^84,468!6^156,396,1,0,0,0!11^204,324,108,60!2^36,576,0,-1!2^756,576,0,-1!9^60,156,0,0,24,9,1,-1,0!3^36,36!9^612,204,0,0,7,14,1,-1,0!9^324,396,0,0,16,12,1,-1,0!9^420,276,0,0,5,6,1,0,0!9^108,132,0,0,28,20,1,0,0!9^660,468,0,0,14,20,1,0,0!0^612,180!0^612,228!0^660,444!0^660,492!0^420,252!0^420,300!0^108,108!0^108,156!0^324,444!0^324,492!0^660,396!0^612,132!0^420,204!0^204,252!0^756,540!0^756,516!0^756,492!0^756,468!0^756,444!0^756,420!0^756,396!0^756,372!0^36,540!0^36,516!0^36,492!0^36,468!0^36,444!0^36,420!0^36,396!0^36,372!0^300,204!0^516,396!0^516,444!0^300,252!0^84,444!0^84,492!0^492,564!0^516,540!0^204,564!0^180,540!0^540,516!0^156,516");
var lev_thegauntlet = new LevelData("the gauntlet", "00000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000004000000011000000000000010000000110000000000000100000001100000000000001000000011000000000000010000000110000000000000100000001500000000000001000000010000000000000010000000100000000000000100000001000000000000001000000010000000000000010000000100000000000000100000001000000000000001000000010000000000000010000000100000000000000100000001000000000000001000000010000000000000010000000100000000000000100000001000000000000001000000010000000000000010000000100000000000000100000001000000000000001000000010000000000400010000000500000000001000100000000000000000010001000000000000000000100010000000000000000001000100000000000000|5^47.6846448661045,500.259948983262!0^756,564!0^756,540!0^732,564!0^492,468!0^444,468!0^396,468!0^732,180!0^708,156!0^708,204!0^732,204!0^684,204!0^756,204!0^156,132!0^204,132!0^252,132!12^36,156!12^36,180!8^756,252,1!8^252,252,1!8^204,252,1!8^156,252,1!3^564,252!3^444,252!3^324,252!2^36,408,0,-1!11^756,108,396,348!4^276,210,1!1^564,156!10^36,132!4^252,570,1");
var lev_vertworld = new LevelData("vert world", "00000000000000000000000021150000000000000000100001000000002111150000000000031114000000000000000000000000000000000000000000000000000000000000000211140003111150000000000005000000000000000000000000000000000000000000000000000000031140000000000000000000000000000311500000000000000000000000003140000000000000000000000000000000000000000000000000000000000000000000000211115000000000002111400000000000140110000000000000000002111500000000000211150000000000000000000000000000000000000000000000000003115000002111400000000000000000000000000000000000000211400000000000000000000000000000000000002114000000000311400000000000000000000000000000000003111140000000003114000000000000000000010010000000000000000000000100000000000000000|5^756,564!6^84,540,1,0,0,3!11^744,132,36,564!9^444,108,1,0,31,3,1,0,-1!9^84,84,1,0,31,3,1,0,0!0^426,222!0^546,342!0^474,438!0^474,546!0^630,546!0^630,462!0^678,402!0^678,270!0^642,150!0^540,126!0^294,126!0^318,270!0^306,210!0^318,330!0^402,366!0^402,498!0^246,546!0^246,462!0^186,474!0^174,342!0^90,450!0^90,318!0^102,282!0^102,174!0^186,150!0^66,54!0^66,138!0^36,132!0^36,108!0^36,84!0^36,60!0^594,270!0^582,354!12^252,312!12^312,414!12^492,282!12^366,156!12^234,108!12^600,96!12^720,468!12^120,480!1^366,132!1^324,516!2^312,576,0,-1!2^720,576,0,-1!6^204,252,2,0,2,0");
var lev_steplightly = new LevelData("step lightly", "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000001000000000000000000000010000000000000000000000B0000000000000000000000>00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|5^756,564!1^84,516!1^708,516!1^564,516!1^228,516!1^396,516!1^636,420!1^492,420!1^300,420!1^156,420!1^228,348!1^564,348!1^396,372!1^84,324!1^708,324!1^636,228!1^156,228!1^396,252!1^396,156!1^156,132!1^636,132!12^396,276!12^636,252!12^636,156!12^396,180!12^156,156!12^156,252!12^84,348!12^156,444!12^228,372!12^300,444!12^228,540!12^396,540!12^564,540!12^708,540!12^636,444!12^708,348!12^564,372!12^492,444!12^396,396!2^768,540,-1,0!2^768,492,-1,0!2^768,444,-1,0!2^768,396,-1,0!2^768,348,-1,0!2^768,300,-1,0!2^768,252,-1,0!2^768,204,-1,0!2^768,156,-1,0!2^24,540,1,0!2^24,492,1,0!2^24,444,1,0!2^24,396,1,0!2^24,348,1,0!2^24,300,1,0!2^24,252,1,0!2^24,204,1,0!2^24,156,1,0!11^384,36,420,36!0^396,228!0^396,132!0^156,108!0^156,204!0^84,300!0^156,396!0^228,324!0^300,396!0^228,492!0^396,492!0^564,492!0^708,492!0^636,396!0^708,300!0^636,204!0^636,108!0^564,324!0^492,396!0^396,348!0^624,564!0^636,564!0^648,564!0^516,564!0^504,564!0^492,564!0^360,564!0^348,564!0^336,564!0^204,564!0^192,564!0^180,564!0^60,564!0^72,564!0^84,564!0^480,564!0^324,564!0^312,564!0^168,564");
var lev_hunted = new LevelData("hunted", "90000061190061101900006000;<00:=0;<0:=01000000000:=00000618007100000000000000000:1111=0000008000000000000000000;<001<0000000;<00000000:=000000;<000:=0000000000000000:=000000000000000001=000000000000000000000900000000000000000;<000000000000000;<0000:=000000000000000:=0000000000000;<000000000000000000000:=0000000000000000000000000000000000000000000000000000000;<000000000000000000000:=000000000000000000000000000000000000000000000000000000000000000000000000000000000000;<000000000000000000000:=000000000000000000000000000000;<000000000000000000000:=000000000000000000000000000000;<000000000000000000000:=00000000;<000000000000000000000:=000000000000000000000000000<0080<000000000000000;010010180000000000000710187|5^744,540!11^48,396,756,492!9^192,36,0,0,31,2,1,-1,0!9^762,60,0,0,30,20,1,-1,0!6^108,204,4,1,0,3!6^756,132,5,1,0,1!6^588,276,4,1,0,3!6^204,348,5,1,0,1!0^192,108!0^168,228!0^72,84!0^336,108!0^288,300!0^408,372!0^408,360!0^408,348!0^288,288!0^288,276!0^168,216!0^168,204!0^192,96!0^192,84!0^72,72!0^72,60!0^336,96!0^336,84!0^528,228!0^528,216!0^528,204!0^648,108!0^648,96!0^648,84!0^672,348!0^672,336!0^672,324!0^576,444!0^576,432!0^576,420!0^264,444!0^264,432!0^264,420!0^144,468!0^144,456!0^144,444");
var lev_mainframe = new LevelData("mainframe", "10000000000000000000001500000000311140000000020000000001502100000000000003110000000001140000000015000000000002100000000100031000000001000000000000150000114000000031000001000000210000000110000010000000100014000000000100000101000110000000000000001010000000310000000000010000000001500111140003100000140010000002100015000002100100314000000000314001001001110000000001110010010021500000000021500100100000031000140000031001400111150002100000150021000000000001000000000000000000000010100000000000000100000101000110011000001000000010001500210000010000003100000000000000140000115000000000010002100000000100000000140000000000031000000002110000000001150000000000000140310000000004000000002111500000000310000000000000000000001|5^396,36!1^396,300!6^372,396,4,1,0,2!6^420,396,4,1,0,0!11^396,564,396,204!9^528,396,1,0,14,6,1,0,-1!9^264,396,1,0,18,6,1,0,-1!9^348,168,0,0,14,23,1,-1,0!9^444,168,0,0,18,23,1,0,0!9^648,432,0,0,21,16,1,-1,0!9^144,432,0,0,11,16,1,0,0!9^708,300,0,0,10,16,1,-1,0!9^84,300,0,0,22,16,1,0,0!10^396,348!3^396,516!0^540,204!0^552,204!0^564,204!0^576,204!0^588,204!0^600,204!0^612,204!0^636,108!0^660,108!0^156,108!0^132,108!0^180,204!0^192,204!0^204,204!0^216,204!0^228,204!0^240,204!0^252,204!0^444,324!0^348,324!0^300,348!0^276,348!0^252,348!0^492,348!0^516,348!0^540,348!0^612,348!0^180,348!0^108,396!0^672,396!0^708,228!0^84,228!0^228,36!0^564,36!0^228,492!0^252,492!0^540,492!0^564,492!0^468,492!0^324,492!0^240,492!0^228,480!0^240,480!0^252,480!0^552,492!0^540,480!0^552,480!0^564,480");
var lev_rocketarena = new LevelData("rocket arena", "0000000000FJ11115000FJ1000000000000FJ11000000200000000000000FJ40000000000000000000000240000000000000000000000240000000000000000000000240000000000000000000000B4000000000000000000000>11000000000000000000000B1000000000000000000000>100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000001400000000000001000310011000000000000?1000150021000000000000C100010000100000000000?1500010000100000000000C50000100001000000000035000001000010000000003500000010000100000000350000000100001000000GK5000000001000010000GK1500000000014000100GK1150000000000111111001115000000000001500210015000000000000000000000000000000000000000000000000000000000|5^696,240!1^180,540!1^156,540!1^132,540!1^108,540!11^564,180,84,492!10^36,36!9^564,420,0,0,19,23,1,0,0!9^420,516,0,0,17,23,1,0,0!9^276,516,0,0,11,23,1,0,0!9^180,468,0,0,9,23,1,0,0!9^36,252,0,0,8,23,1,-1,0!0^648,276!0^636,300!0^624,324!0^612,348!0^600,372!0^588,396!0^576,408!0^552,432!0^540,444!0^528,456!0^516,468!0^396,516!0^384,516!0^372,516!0^360,516!0^348,516!0^336,516!0^324,516!0^312,516!0^300,516!0^312,504!0^324,504!0^336,504!0^348,504!0^360,504!0^372,504!0^384,504!0^372,492!0^360,492!0^348,492!0^336,492!0^324,492!0^336,480!0^348,480!0^360,480!0^348,468!0^168,456!0^156,444!0^144,432!0^132,420!0^120,408!0^108,396!2^348,528,0,-1!2^540,468,-0.707106781186547,-0.707106781186547!2^156,468,0.707106781186547,-0.707106781186547!6^444,564,5,1,0,0!6^372,564,4,1,0,0!6^252,564,3,1,0,0!1^396,180!1^372,180!1^348,180!1^324,180!1^732,540!1^708,540!1^684,540!1^660,468!1^636,468!1^612,468!1^708,396");
var lev_attractor = new LevelData("attractor", "55555550000000002222222515155000000000002212125555500000000000002222251550000000000000002212555000000000000000002225500000000000000000002250000000000000000000002000000000000000000000004000055555500000000000014000505050000000000000110005555000000000000000100050500000000000000001000550000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000004001000440000000000000010010004040000000000000101100044440000000000001015000404040000000000011500004444440000000000000000000000000000000000040000000000000000000003440000000000000000000334440000000000000000033341440000000000000003313444440000000000000333334141440000000000033131344444440000000003333333|5^300,564!2^744,432,-0.707106781186547,-0.707106781186547!2^720,456,-0.707106781186547,-0.707106781186547!2^696,480,-0.707106781186547,-0.707106781186547!2^672,504,-0.707106781186547,-0.707106781186547!2^648,528,-0.707106781186547,-0.707106781186547!2^624,552,-0.707106781186547,-0.707106781186547!2^168,552,0.707106781186547,-0.707106781186547!2^144,528,0.707106781186547,-0.707106781186547!2^120,504,0.707106781186547,-0.707106781186547!2^96,480,0.707106781186547,-0.707106781186547!2^72,456,0.707106781186547,-0.707106781186547!2^48,432,0.707106781186547,-0.707106781186547!2^204,576,0,-1!2^588,576,0,-1!2^396,576,0,-1!1^492,516!1^300,516!1^492,348!1^300,348!1^36,396!1^756,396!1^708,324!1^84,324!1^132,252!1^660,252!1^612,180!1^180,180!1^552,432!1^240,432!1^444,276!1^348,276!9^480,36,0,0,19,23,1,-1,0!9^312,36,0,0,19,23,1,0,0!11^504,564,396,204!12^324,204!12^300,228!12^276,252!12^252,276!12^348,180!12^444,180!12^468,204!12^492,228!12^516,252!12^540,276!3^588,36!3^204,36!7^372,108,3!7^396,108,3!7^420,108,3!6^300,36,2,1,0,0!6^492,36,3,0,0,2!0^348,228!0^348,240!0^348,252!0^444,228!0^444,240!0^444,252!0^492,300!0^492,312!0^492,324!0^552,384!0^552,396!0^552,408!0^492,468!0^492,480!0^492,492!0^300,300!0^300,312!0^300,324!0^240,384!0^240,396!0^240,408!0^36,348!0^36,360!0^36,372!0^84,276!0^84,288!0^84,300!0^132,216!0^132,228!0^132,204!0^180,132!0^180,144!0^180,156!0^612,132!0^612,144!0^612,156!0^660,204!0^660,216!0^660,228!0^708,276!0^708,288!0^708,300!0^756,348!0^756,360!0^756,372");
var lev_planplanplan = new LevelData("plan plan plan", "0000000010000000000000000000000104000000031140000000001010311140111100000000000101000101001000000000O01010H010100100000000010101010101001000000000101010I01010010000000001010100010100100000000000101040101001000000000O0501010101001000000000100010101110010000000002111501021500100000000000000010000000000000000003140111111110000000000011101000000100000000000101010;00<01000000000000010101001010000000000000101000000100000000000001011000011000000000000010100000010000000000000101010010100000000000111010:00=0100000000000000010000001000000000000011110000110000OOO00000000000000210000P0N0000000000000001000000N00000000000000010000P0N00000000000000010000QQQ000000000000000100000000000000000000001000000000000000000000000|5^624,60!9^516,564,1,0,27,4,1,0,-1!9^228,564,1,0,13,12,1,0,-1!9^408,468,1,0,13,12,1,0,0!11^660,144,120,516!6^204,492,0,1,0,0!4^156,258,1!4^228,354,1!4^276,402,1!4^348,570,1!6^372,396,2,0,2,0!0^252,444!0^240,444!0^228,444!0^216,444!0^204,444!0^192,444!0^180,444!0^168,444!0^156,444!0^144,444!0^132,444!0^120,444!0^108,444!9^252,444,0,1,4,18,0,-1,0!2^588,312,0,-1!1^492,240!1^684,456!6^564,396,3,0,2,2!7^276,564,0!7^324,540,1!0^204,204!0^192,204!0^180,204!0^168,204!0^156,204!0^144,204!0^396,300!0^408,300!0^420,300!0^432,300!0^444,300!0^456,300!0^468,300!0^480,300!0^492,300!0^504,300!0^516,300!0^516,288!0^504,288!0^492,288!0^480,288!0^456,288!0^468,288!0^444,288!0^432,288!0^420,288!0^420,276!0^432,276!0^444,276!0^456,276!0^468,276!0^480,276!0^492,276!0^504,276!0^516,276!0^684,432!0^684,420!0^684,408!0^492,216!0^492,204!0^492,192!0^264,300!0^240,300!0^216,300!0^192,300!0^168,300!0^144,300!0^120,300!0^252,300!0^228,300!0^204,300!0^180,300!0^168,300!0^156,300!0^132,300!0^276,300");
var lev_artifact = new LevelData("artifact", "10111150210111500150000101500000201500001000005010000000010000050000300100000000500000000031005000000000000000003500000000000000000000350300000000000000000035001000000000000000003500010000000000000000350000100000000000000035001002000000000000003500000000000000114000350000000000000001110035000000000000000002100100000000000001400001000000000000000011110000000000000000000111100000000000000000001500001000000000000000000000310010000000000000000011100240000000000000000115000240001000000000000000000240000000000000000000000240000000000000000000000240001000000000000000000240000000000000000000000240000000000000000000000240200040000000000000000240000100000000000000000210001400000000000140000200011140003140031114000|5^48,540!6^636,564,3,1,0,3!6^276,564,2,1,0,3!6^492,564,3,1,0,3!7^420,372,3!7^396,372,3!7^444,420,3!7^372,420,3!7^396,468,3!7^420,468,3!7^444,516,3!7^372,516,3!7^540,540,3!7^276,540,3!9^684,564,0,0,2,2,1,0,0!11^732,84,36,276!9^132,564,0,0,2,2,1,-1,0!9^36,60,0,0,2,11,1,0,0!6^396,204,1,0,1,0!0^444,84!0^432,84!0^420,84!0^408,84!0^396,84!0^384,84!0^372,84!0^372,72!0^384,72!0^396,72!0^408,72!0^420,72!0^432,72!0^444,72!0^492,180!0^504,180!0^516,180!0^516,168!0^504,168!0^492,168!0^492,156!0^504,156!0^516,156!0^420,252!0^408,252!0^396,252!0^396,264!0^408,264!0^420,264!0^420,240!0^408,240!0^396,240!0^324,180!0^312,180!0^300,180!0^300,168!0^312,168!0^324,168!0^324,156!0^312,156!0^300,156!12^348,300!12^348,276!12^468,276!12^468,300!2^408,360,0,-1!2^756,276,-0.707106781186547,-0.707106781186547!2^48,240,0.707106781186547,-0.707106781186547!2^324,324,-0.707106781186547,-0.707106781186547!2^492,324,0.707106781186547,-0.707106781186547!2^756,396,-0.707106781186547,-0.707106781186547!1^564,108!1^252,108!0^36,420!0^36,396!0^60,420!0^84,420!0^36,408!0^48,420!0^48,408!0^84,60!0^108,60!0^132,60!0^96,276!0^180,540!0^204,540!0^228,540!0^588,516!0^516,444!0^420,444!0^396,444!0^444,396!0^372,396!0^372,492!0^444,492!0^540,516!0^276,516");
var lev_gaussarena = new LevelData("gauss arena", "1010000000000000000010050100000000000000000210005000003100140000000000000000311001140000000000000031MI00FJ140000000000003MI000000FJ4000000000035000000000024000000003500000000000024000000350000000000000024000035000000000000000024001E000000000000000000B401A000000000000000000>14E00000000000000000000B1A00000000000000000000>10000000000000000000000100000000000000000000001@00000000000000000000?1D00000000000000000000C11@000000000000000000?151D000000000000000000C5002400000000000000003500002400000000000000350000002400000000000035000000002400000000003500000000002LH000000GK500000000000021LH00GK1500000000000000211001150000000000400000210015000000000401000000000000000003101010000000000000000010010100000000000000000100|5^36,60!2^552,456,-0.707106781186547,-0.707106781186547!2^216,456,0.707106781186547,-0.707106781186547!2^552,120,-0.707106781186547,0.707106781186547!2^216,120,0.707106781186547,0.707106781186547!2^384,552,0,-1!2^384,24,0,1!1^348,300!1^420,300!1^384,204!2^564,108,0.707106781186547,-0.707106781186547!11^744,564,36,564!9^384,468,0,0,30,2,1,-1,0!9^756,60,0,0,2,23,1,0,0!9^384,120,0,0,29,23,1,-1,0!2^36,504,0,-1!2^756,504,0,-1!2^468,384,0,-1!2^300,384,0,-1!3^384,264!3^180,180!3^588,180!0^36,120!0^36,144!0^36,168!0^36,192!0^36,216!0^36,240!0^36,264!0^36,288!0^36,312!0^36,336!0^36,360!0^36,384!0^36,408!0^36,432!0^36,456!0^756,120!0^756,144!0^756,168!0^756,192!0^756,216!0^756,240!0^756,264!0^756,288!0^756,312!0^756,336!0^756,360!0^756,384!0^756,408!0^756,432!0^756,456!0^204,96!0^180,120!0^156,144!0^132,168!0^108,192!0^84,216!0^228,72!0^600,132!0^624,156!0^648,180!0^672,204!0^696,228!0^660,300!0^684,300!0^84,300!0^108,300!0^96,300!0^672,300!0^684,288!0^684,276!0^672,276!0^660,276!0^660,288!0^108,288!0^108,276!0^96,276!0^84,276!0^84,288");
var lev_industrialzone = new LevelData("industrial zone", "000000000000000000000000000000000000111100000000000001111111001000000000000010000000010000000001111100000000100000000010000000000001001000000100000000000000010000001000000000000000100000010000000000000001000000100000000000000010000001001000;0<000111100000010010001010001000000000000100010100010000000000001000:0=00010000000001111000000000100000000010000000000001100000000100000000000001000000001111111000000010000000000000010000000100000000000000100001001000000000000001000010110000000000010010000100000000000000100100001000000000000001001000010000000000000010000001100000000000000111111110000000000000000000000000000000003140000000000000000000010100000000000000000000005000000000000000000000000000000000000000000|5^708,36!9^612,156,0,0,14,12,1,0,0!9^108,180,0,0,14,12,1,-1,0!9^228,468,0,0,11,12,1,-1,0!9^468,564,0,0,11,12,1,0,0!11^720,84,312,300!6^660,324,1,1,0,3!6^348,396,0,1,0,0!6^60,252,1,1,0,1!6^348,156,0,1,0,3!3^468,372!3^108,228!0^588,348!0^564,348!0^540,348!0^516,348!0^492,348!0^84,396!0^84,372!0^108,372!0^108,396!0^132,396!0^132,372!0^156,372!0^156,396!0^300,252!0^324,252!0^312,240!0^336,240!0^288,240!1^708,516!1^636,456!1^396,324!1^204,360!1^156,276");
var lev_launchpadarena = new LevelData("launchpad arena", "500000000000001100000020000000000000011000000000000000000000J1400000000000111000000021400003000031MI00000000B1100110001150000000000>1100110001E0000000000001500020001A0000000000000000000000000000000000000000000000000000000000000000000000003100000000000000000000315000000014000000000031E00000000QJ400000000311A0000000000240000000111000000000000B@000000111000000000000NP000000111000000000000CA000000211@0000000000350000000021D00000000OK5000000000021400000001500000000000021000000000000000000000000000000000000000000000000000000000000001@0000000000000000000001D0000000000001400030001140000000000?110011000021LH00000000C1100110000011100000003150000200000000000000K150000000000000000000011000000040000000000000110000003|5^432,552!2^396,516,0,-1!2^240,576,0,-1!2^552,576,0,-1!2^108,396,0.707106781186547,-0.707106781186547!2^684,396,-0.707106781186547,-0.707106781186547!2^744,360,0,-1!2^48,360,0,-1!2^180,432,0,-1!2^612,432,0,-1!2^516,228,0.707106781186547,-0.707106781186547!2^276,228,-0.707106781186547,-0.707106781186547!2^132,132,-0.707106781186547,-0.707106781186547!2^660,132,0.707106781186547,-0.707106781186547!2^216,108,1,0!2^576,108,-1,0!2^348,156,-0.707106781186547,-0.707106781186547!2^444,156,0.707106781186547,-0.707106781186547!10^396,300!3^396,60!6^612,84,0,0,2,0!6^180,84,1,0,2,2!6^36,468,2,1,0,0!6^756,468,3,1,0,2!11^396,564,396,132!7^420,108,1!7^396,108,1!7^372,108,1!9^720,564,0,0,17,5,1,0,0!9^72,564,0,0,15,5,1,-1,0!0^504,420!0^492,420!0^480,420!0^480,408!0^480,396!0^492,396!0^504,396!0^504,408!0^288,420!0^300,420!0^312,420!0^312,408!0^312,396!0^300,396!0^288,396!0^288,408!0^636,516!0^636,504!0^636,492!0^648,492!0^660,492!0^660,504!0^660,516!0^648,516!0^132,516!0^132,504!0^132,492!0^156,492!0^144,492!0^156,504!0^156,516!0^144,516!0^84,156!0^60,156!0^36,156!0^36,180!0^84,180!0^84,204!0^60,204!0^36,204!0^60,180!0^708,156!0^732,156!0^756,156!0^756,180!0^732,180!0^708,180!0^708,204!0^732,204!0^756,204!0^492,408!0^300,408!0^144,504!0^648,504");
var lev_dodgem = new LevelData("dodgem", "000000000000000000000000000000000000000000000001111111100111111100000010000001001000001000000100000010010000010000001000003500240000100003010000050000240001000010100000000000200011110101000000000000000000001010000000000000000000020100000000000000000000001000000000000034000000010000000000000250000000F000000000000000000000000000000000000000000000G000000000000000000000010000000000000003400000100000000000000025000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000003400010000000140000000025000100000001100314000000001000000011111010000000011115000110020100000000000000001500005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|5^732,552!1^372,192!2^372,576,0,-1!2^492,576,0,-1!2^168,312,0.707106781186547,-0.707106781186547!7^372,300,1!7^396,300,1!7^420,324,2!7^420,348,2!7^396,372,3!7^372,372,3!7^348,348,0!7^348,324,0!7^492,396,0!7^492,372,0!7^516,348,1!7^540,348,1!7^564,372,2!7^564,396,2!7^540,420,3!7^516,420,3!7^660,468,1!7^684,468,1!7^684,540,3!7^660,540,3!7^636,516,0!7^636,492,0!7^708,492,2!7^708,516,2!7^468,228,1!7^492,228,1!7^516,252,2!7^516,276,2!7^492,300,3!7^468,300,3!7^444,276,0!7^444,252,0!3^756,36!10^108,84!6^180,132,4,0,0,0!6^324,492,5,0,0,2!0^636,36!0^612,36!0^588,36!0^564,36!0^540,36!0^516,36!0^492,36!0^468,36!0^444,36!0^420,36!2^684,576,-0.707106781186547,-0.707106781186547!2^480,72,0,1!11^624,372,36,564!4^84,570,1!7^60,276,0!7^60,252,0!9^180,180,0,0,8,22,1,0,0!9^432,420,0,0,8,22,1,-1,0!12^24,408!12^72,348!12^72,228!12^24,168!12^72,108!12^24,60!6^36,228,1,1,0,3!0^108,324!0^108,348!0^108,372!0^108,396!0^108,420!0^132,420!0^156,420!0^180,420!0^204,420!0^192,408!0^168,408!0^144,408!0^120,408!0^120,384!0^120,360!0^120,336!0^132,396!6^132,348,2,0,0,0");
var lev_complex = new LevelData("complex", "00000000000000000000000000000000000000000000000000000000000000000000000011111111111111100000000100000010000001000000001000000E01LOOO1110030001110100P0000000011010000000100P000000001101000000010?A000000101000000000010N0000000E01000000000010N0000000P01000000000010C0000000D010000000000101110010010100000000001010000100001000000000010100001000010000000000101501110011100300000001000000000000001000000010000000000000010000000101401110011100200000001010000100001000000000010100001000010000000000101111010NM010000000000100000000N0010000000000100000000NL0100000000001000000000001000001110011111110000011010020100000000111100110100001000000000001111002003010000000000000000000011100000000000000000000000000000000000000000|5^144,48!9^144,144,0,1,7,22,0,-1,0!9^144,144,0,1,27,22,0,0,0!11^684,108,144,144!9^564,468,1,0,5,13,1,0,-1!9^264,468,0,0,22,19,1,-1,0!9^288,468,0,0,24,19,1,0,0!9^516,276,0,0,13,19,1,0,0!9^348,276,0,0,9,19,1,-1,0!9^132,420,1,1,9,23,0,0,-1!9^144,420,0,1,18,22,0,0,0!9^132,420,0,1,21,21,0,0,0!9^144,420,1,1,21,21,0,0,0!9^132,420,0,1,17,21,0,-1,0!9^132,420,0,0,7,7,1,0,0!9^144,420,0,0,7,7,1,-1,0!6^300,564,3,0,0,0!6^588,564,2,0,0,2!6^492,348,0,0,1,0!6^372,396,0,0,1,2!12^168,324!12^168,348!12^168,372!12^168,396!12^240,432!12^264,432!12^288,432!12^312,432!12^564,420!12^540,420!12^588,420!0^132,144!0^156,144!0^156,168!0^144,168!0^132,168!0^132,192!0^144,192!0^156,192!0^156,216!0^144,216!0^132,216!0^132,240!0^144,240!0^156,240!0^180,240!0^204,240!0^192,240!0^228,240!0^240,240!0^252,240!0^300,240!0^288,240!0^276,240!0^468,228!0^480,228!0^492,228!0^504,228!0^516,228!0^528,228!0^540,228!0^516,300!0^492,276!0^372,276!0^348,300!0^444,372!0^444,360!0^444,348!0^444,336!0^444,324!0^420,324!0^420,336!0^420,348!0^420,360!0^420,372!0^432,336!0^432,360!0^432,384!0^432,312");
var lev_industrialzone2 = new LevelData("industrial zone 2", "000000000000000000000000000000000000000000000000111110011001110000000000000000000000000000000000000000000000040000000001111111111110100000000010000000000001000000000100000000000010000000001000000000000100000000010000000000001000000000100000000000010000000001150000000000100000000000000000000001110000000111100?1P00000010000000100000N0P00000050000000100000>0P0000000000000010000000A00004000000000100000000000010000000001000000000000100000000010000000000001000000000100000000000010000000001000000000000100000000010000000000001000000000100000000000010000000001000011000000100000000011150111111111000000000000000000000000000300000000000000000000001000001110000111000000010000000000000000000000200000000000000000000000|5^756,552!11^696,540,372,300!1^84,516!1^420,528!1^708,480!1^516,360!1^240,372!1^288,288!1^492,252!7^636,228,2!7^348,444,3!7^372,444,3!7^396,444,3!7^156,420,0!7^324,132,3!6^540,420,0,1,0,0!6^180,300,1,1,0,3!6^132,84,4,0,1,0!6^276,492,5,1,2,2!9^444,108,0,0,16,12,1,0,0!9^588,420,0,0,16,12,1,-1,0!3^612,156!3^180,396!0^180,420!0^204,420!0^228,420!0^252,420!0^276,420!0^300,420!0^324,420!0^420,420!0^444,420!0^468,420!0^492,420!0^516,420!0^540,420!0^564,420!0^612,420!2^36,576,0,-1!2^108,576,0,-1!2^324,432,0,-1!2^552,432,0,-1");
var lev_keepontryin = new LevelData("keep on tryin", "00100000000000000000000001000000000000000001110020000000000000000010000000;0000000000000000000000:000000000000350000000000000000000035000000000000;0000000000000000000000:00000000000000000000000000;0000000000000000000000:0000000000000000000000000000000000000000;0000000000000000000000:0000000000000000000000000000000000000000000000000000000000000000000000000;000000000000000;000000:000000000000000:00000000000000000000000000000000000000000000000000000000000000000000000;0000000000000000000000:00000000000000000;0000000000000000000000:000000000000000000000000000000000000000000000000;0000000000000000000000:000000000000000040030000000000000000000103500000000000000001111010000000000000000000010100000000000000000000|5^60,468!12^24,192!12^24,276!12^24,360!12^24,444!12^24,528!12^36,402!12^36,486!12^42,318!12^42,234!12^756,192!12^768,288!12^756,384!12^768,480!12^744,540!12^756,432!12^756,336!12^756,240!6^84,540,2,0,1,0!11^684,564,732,60!2^96,504,0,-1!9^60,60,0,0,30,2,1,-1,0!3^348,36!7^108,516,1!7^132,516,1!7^156,516,1!7^180,516,1!7^204,516,1!7^228,516,1!7^252,516,1!7^276,516,1!7^300,516,1!7^324,516,1!7^348,516,1!7^372,516,1!7^396,516,1!7^420,516,1!7^444,516,1!7^468,516,1!7^492,516,1!7^516,516,1!7^540,516,1!7^564,516,1!7^588,516,1!7^612,516,1!7^636,516,1!7^660,516,1!7^684,516,1!2^552,228,1,0!2^672,180,1,0!2^168,228,-1,0!2^216,324,-1,0!2^288,204,-1,0!2^432,324,1,0!2^432,168,0,1!2^576,120,0,1!2^648,192,0,1!2^120,168,0,1!2^312,216,0,1!2^408,336,0,1!2^240,336,0,1!0^228,306!0^252,306!0^240,294!0^396,306!0^420,306!0^408,294!0^510,210!0^546,210!0^528,198!0^648,150!0^636,162!0^660,162!0^594,90!0^558,90!0^576,78!0^432,120!0^420,132!0^444,132!0^312,168!0^300,186!0^324,186!0^192,210!0^192,192!0^120,126!0^132,138!0^108,138");
var levList0 = new Array();
levList0.push(lev_themotherlode);
levList0.push(lev_cloudcity);
levList0.push(lev_allaboutthwumps);
levList0.push(lev_theboxthebox);
levList0.push(lev_lockness);
_local1.episodeList[0] = new EpisodeData("episode 0", "ziggy", levList0);
var _local3 = new Array();
_local3.push(lev_cavern);
_local3.push(lev_likehappylittlepuppies);
_local3.push(lev_littledipper);
_local3.push(lev_slides);
_local3.push(lev_steps);
_local1.episodeList[1] = new EpisodeData("episode 1", "deli", _local3);
var levList2 = new Array();
levList2.push(lev_squarestairs);
levList2.push(lev_shafts);
levList2.push(lev_whossickofthwumps);
levList2.push(lev_chasm);
levList2.push(lev_maze);
_local1.episodeList[2] = new EpisodeData("episode 2", "billow", levList2);
var levList3 = new Array();
levList3.push(lev_burgertime);
levList3.push(lev_platformpuzzle);
levList3.push(lev_riseoverrun);
levList3.push(lev_deosil);
levList3.push(lev_blastdoors);
_local1.episodeList[3] = new EpisodeData("episode 3", "spright", levList3);
var levList4 = new Array();
levList4.push(lev_roomfullofgold);
levList4.push(lev_factory);
levList4.push(lev_walljumpfrenzy);
levList4.push(lev_thelongway);
levList4.push(lev_curvaceous);
_local1.episodeList[4] = new EpisodeData("episode 4", "stainless", levList4);
var levList5 = new Array();
levList5.push(lev_trenchrun);
levList5.push(lev_bambooforest);
levList5.push(lev_filthytramps);
levList5.push(lev_pacninja);
levList5.push(lev_castlebasement);
_local1.episodeList[5] = new EpisodeData("episode 5", "resonant", levList5);
var levList6 = new Array();
levList6.push(lev_artifact2);
levList6.push(lev_industrialzone);
levList6.push(lev_spacebattle);
levList6.push(lev_pagodaish);
levList6.push(lev_thegauntlet);
_local1.episodeList[6] = new EpisodeData("episode 6", "allegory", levList6);
var levList7 = new Array();
levList7.push(lev_vertworld);
levList7.push(lev_steplightly);
levList7.push(lev_hunted);
levList7.push(lev_mainframe);
levList7.push(lev_rocketarena);
_local1.episodeList[7] = new EpisodeData("episode 7", "donut", levList7);
var _local2 = new Array();
_local2.push(lev_attractor);
_local2.push(lev_planplanplan);
_local2.push(lev_artifact);
_local2.push(lev_cloudcity2);
_local2.push(lev_gaussarena);
_local1.episodeList[8] = new EpisodeData("episode 8", "chuckles", _local2);
var levList9 = new Array();
levList9.push(lev_launchpadarena);
levList9.push(lev_complex);
levList9.push(lev_dodgem);
levList9.push(lev_industrialzone2);
levList9.push(lev_keepontryin);
_local1.episodeList[9] = new EpisodeData("episode 9", "gaze", levList9);
};
NinjaData.prototype.BuildGameData_Set1 = function () {
var _local1 = this;
var lev_longjump = new LevelData("longjump", "E000000100000FJ1000000BA000000E00000001000000>000000000000000E0000D00000000000C00000000001000000C000010000000000000000010000100000000000000000100001000000000000000001000010000000000000000010000E0000000000000000010000000000D000010000001000000000010000100000010000000000000000000000100000000000000000?0000100000000000000000C0000100000000000000003100001000000000000000011000010000000000000000210000100000000000000000B0000100000000000000000>0000100000000000000000000001000000000010000100000010000000000E0000100000010000D00000000000000000100001000000000000000001000010000000000000000010000100000000000000000B000010000000000000000000000B0000000000100000000000000000D0000E00@000000D00000001000000?D000000100000GK1000000C|5^696,480!11^396,108,396,168!0^540,372!0^516,372!0^276,372!0^252,372!0^252,492!0^276,492!0^516,492!0^540,492!2^396,528,0,-1!2^720,384,0,-1!2^72,384,0,-1!0^756,180!0^744,180!0^732,180!0^756,168!0^756,156!0^60,180!0^48,180!0^36,180!0^36,168!0^36,156!0^264,360!0^528,360!0^528,480!0^264,480");
var lev_holdit = new LevelData("hold it", "1111111111111111111111111111111111111111111111111111500001000001111111111110000010000011111111111100000E0000011111111111100000P0000011111111111100000P000002111111111110000?A000000111111111110000N0000003111111111110000N0000001111111111110000N0000001111111111110000N0000001111111111110000>@00000B1111111111100000P00000N1111111111100000P00000C1111111111100000P0000011111111111100000P000001111111111110000?A000001111111111110000N00000?1111111111110000N00000N1111111111110000N00000>1111111111110000N0000001111111111110000>@0000011111111111100000D0000011111111111100000100003111111111111000000000011111111111110000000000211111111111140000000000111111111111111111111111111111111111111111111111111111111111111111111111111|5^108,396!12^204,432!12^348,420!12^492,408!12^636,396!12^204,408!12^348,396!12^492,384!12^636,372!12^540,264!12^468,264!12^384,276!12^264,264!12^384,204!12^384,168!12^264,168!12^312,216!12^216,216!12^504,168!12^384,192!12^384,180!12^384,288!12^288,276!12^240,276!0^264,228!0^276,240!0^252,240!0^252,228!0^264,216!0^276,228!0^288,240!0^240,240!0^516,264!0^504,264!0^492,264!0^492,252!0^504,252!0^516,252!0^396,264!0^396,252!0^396,240!0^396,228!0^396,216!0^384,216!0^372,216!0^372,228!0^372,240!0^372,252!0^372,264!0^384,264!0^384,252!0^384,240!0^384,228!0^264,420!0^288,420!0^396,420!0^420,420!0^444,420!0^540,420!0^564,420!0^588,420!0^576,408!0^552,408!0^564,396!2^684,432,0,-1!11^108,276,156,276");
var lev_dontlookdown = new LevelData("don't look down", "50015000000150000000002000100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000010000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000001000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000100000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000001000000040000014000000014000003|5^84,540!2^396,552,0,-1!2^588,552,0,-1!2^204,552,0,-1!1^540,372!1^444,372!1^348,372!1^252,372!1^156,372!1^60,372!1^636,372!1^636,252!1^540,252!1^444,252!1^348,252!1^252,252!1^156,252!1^108,336!1^684,216!1^636,132!1^540,132!1^444,132!1^348,132!1^252,132!1^156,132!1^108,120!0^636,36!0^636,48!0^540,48!0^540,36!0^444,36!0^444,48!0^348,48!0^348,36!0^252,36!0^252,48!0^156,48!0^156,36!0^156,156!0^156,168!0^252,156!0^252,168!0^348,156!0^348,168!0^444,156!0^444,168!0^540,156!0^540,168!0^636,156!0^636,168!0^636,276!0^540,276!0^444,276!0^348,276!0^252,276!0^156,276!11^48,84,48,276");
var lev_balcon = new LevelData("balcon", "50010001000100010001002000500050005000500050000000000000000000000000000000000000000000000000000000000000040000000000000000000000100003000000000000000002000010000000003000040000000100000000010000100000002000000000100001000000000000000001000050000000000030000050000000000000031100000000000000040000150000000000000000100001000000000000000001000010000000000000000010000100000000000000000100001000000000000000001000010000000000000000050000110000004000000000000002100000010000400000000000000000100001000000000000000001000010000000300000000020000500000001000000000000000003000010000000000000000010000200000000000000000500000000000000000000000000000000000000000000000000000000004000400040004000400040010001000100010001003|5^180,564!9^396,492,0,0,20,23,1,0,0!9^396,372,0,0,19,23,1,0,0!9^396,192,0,0,19,23,1,-1,0!11^384,564,396,72!0^756,468!0^744,468!0^732,468!0^756,372!0^744,372!0^732,372!0^732,276!0^744,276!0^756,276!0^756,180!0^744,180!0^732,180!0^732,84!0^744,84!0^756,84!0^36,84!0^48,84!0^60,84!0^60,180!0^48,180!0^36,180!0^36,276!0^48,276!0^60,276!0^60,372!0^48,372!0^36,372!0^36,468!0^48,468!0^60,468!6^156,372,3,0,0,0!6^588,180,2,0,0,2!6^204,132,2,0,0,0!6^636,324,3,0,0,2");
var lev_ditched = new LevelData("ditched", "90006119000000000000006000001100000000000000000000011800000000000000000000111111111111111<0000000:1111111111111110000000000000000000061100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000007110000000;1111111111111110000000111111111111111=00000001190000000000000000000011000000000000000080007118000000000000007|5^720,108!11^72,132,396,252!2^540,480,0,-1!2^252,480,0,-1!2^396,480,0,-1!1^468,372!1^324,372!1^204,324!1^588,324!1^492,252!1^300,252!1^396,180!0^612,468!0^600,468!0^588,468!0^576,468!0^564,468!0^564,456!0^576,456!0^588,456!0^600,456!0^612,456!0^180,468!0^192,468!0^204,468!0^216,468!0^228,468!0^228,456!0^216,456!0^204,456!0^192,456!0^180,456!0^420,468!0^432,468!0^444,468!0^456,468!0^468,468!0^480,468!0^492,468!0^504,468!0^516,468!0^276,468!0^288,468!0^300,468!0^312,468!0^324,468!0^336,468!0^348,468!0^360,468!0^372,468!12^468,420!12^324,420!12^204,372!12^588,372!12^588,204!12^204,204!12^444,156!12^348,156!12^432,372!12^360,372");
var lev_frogger = new LevelData("frogger", "0001000010000100001001000010000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000100000000000000000100N0100000000000000000000>1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000?1100000000000000000000N01000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000N0100000000000000000000>1100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000?1100000000000000000000N010000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000010000100001000010000|5^684,540!6^564,444,2,0,0,2!6^60,132,2,0,0,0!6^372,204,3,0,0,0!6^228,324,2,0,0,2!6^540,324,3,0,0,0!6^684,132,3,0,0,2!7^96,156,3!7^120,156,3!7^240,156,3!7^264,156,3!7^384,156,3!7^408,156,3!7^528,156,3!7^552,156,3!7^672,156,3!7^696,156,3!7^156,228,3!7^180,228,3!7^204,228,3!7^300,228,3!7^324,228,3!7^348,228,3!7^444,228,3!7^468,228,3!7^492,228,3!7^588,228,3!7^612,228,3!7^636,228,3!7^240,276,3!7^264,276,3!7^528,276,3!7^552,276,3!7^372,336,3!7^396,336,3!7^420,336,3!7^636,348,3!7^660,348,3!7^684,348,3!7^108,348,3!7^132,348,3!7^156,348,3!7^228,396,3!7^252,396,3!7^276,396,3!7^540,396,3!7^564,396,3!7^516,396,3!7^372,456,3!7^396,456,3!7^420,456,3!7^276,516,3!7^300,516,3!7^324,516,3!7^468,516,3!7^492,516,3!7^516,516,3!7^588,540,3!7^612,540,3!7^396,540,3!12^36,456!12^36,336!12^36,216!12^756,216!12^756,336!12^756,456!11^60,564,612,84!0^732,84!0^744,84!0^756,84!0^756,72!0^744,72!0^732,72!0^732,60!0^744,60!0^756,60!0^60,84!0^48,84!0^36,84!0^36,72!0^48,72!0^60,72!0^60,60!0^48,60!0^36,60!0^180,48!0^180,36!0^324,36!0^324,48!0^468,48!0^468,36!0^612,36!0^612,48!7^180,168,3!7^324,168,3!7^468,168,3!7^612,168,3!7^684,276,3!7^708,276,3!7^108,276,3!7^84,276,3!9^180,84,0,0,6,23,1,0,0!9^120,564,0,0,25,3,1,0,0!0^324,84!0^336,84!0^348,84!0^444,84!0^456,84!0^468,84!0^444,72!0^444,60!0^444,48!0^456,48!0^348,72!0^348,60!0^348,48!0^336,48!0^600,48!0^732,48!0^744,48!0^756,48!0^60,48!0^48,48!0^36,48");
var lev_cityscape2 = new LevelData("cityscape 2", "00000000000000000000000503111115031111150311110350003503500035035003135000350350003503500315500035035000350350031531111503111115031111153500000000000000000315350111111111111150311535000000000P000000031535000000OOO0P000000311153000000P0000000000000001000000P0000000000N11P05003000QQQP0000000N10P00001000000P0000000N10P000010OOOOOP0000000N10P000050P000000000000N10P000000P000000000000N10P;O0000P000000000000N10P:Q0000P000000000000N10P000000QQQQQQQQQP000N10P000000000000000P000N10P000000000000000P000N10P00000000OOOOOOOP000N10P00300000P0000000000N10P00100000P0000000000O10P00500000P0000000000010P00000000QQPNQQQQP00Q10P0000000000PN0000P00N10P0000000OOOPNOOOOP00N10P0000000P00000000000N10P000;100P00000000000N10P00019|5^348,492!9^276,408,1,0,11,16,0,0,0!9^276,432,1,0,11,18,0,0,-1!11^612,84,60,60!9^756,516,1,0,11,8,1,0,-1!9^468,108,0,0,8,15,1,0,0!9^468,228,0,0,8,14,1,0,0!9^396,84,0,0,10,7,1,0,0!1^372,252!1^372,300!1^324,204!1^324,300!1^276,252!1^228,252!1^228,300!1^372,348!0^660,168!0^684,168!0^708,168!0^588,120!0^612,120!0^636,120!0^732,120!0^756,120!0^612,168!0^636,144!0^636,192!0^636,240!0^588,216!0^588,264!0^612,288!0^636,288!0^756,144!0^732,96!0^732,192!0^732,216!0^756,192!0^756,240!0^756,264!0^636,312!0^684,312!0^732,312!0^756,336!0^576,336!0^552,336!0^552,288!0^528,312!9^420,180,0,0,18,16,1,0,0!0^552,360!0^732,360!0^672,360!0^492,336!6^180,36,2,0,0,1!4^468,570,1");
var lev_strata = new LevelData("strata", "000P000000000P0000P0000000P000000000000000000000000000000000000000P000000000000000000P000P000000000000000000P000P00000000P000000000P000P00000000P000000000P000P00000000P000000000P000P0000000000000000000000P000000000000000000000000000000000000P000000P000000000000000P000000P000000000000000P000000P00000000000000000000000000000000000000000000000P000000000000000000P000P000000000000000000P000P0000000000P0000000P000P0000000000P00000000000P0000000000P000000000000000000000000000P0000P00000000000000000P0000P00000000000000000000000000000000000000000000000P00000000P0000000000000P00000000P0000000000000P000000000000000000000000000000000000000000P0000000000000000000000P00000000P0000000000000P00000000P0000000000000P00000|5^48,72!11^744,84,744,552!0^624,492!0^612,492!0^600,492!0^456,492!0^444,492!0^432,492!0^420,492!0^408,492!0^396,492!0^384,492!0^216,492!0^204,492!0^192,492!0^180,492!0^168,492!0^156,492!0^144,492!0^132,492!0^120,492!0^108,492!0^96,492!3^756,276");
var lev_mod = new LevelData("mod", "000000000000001000000000000000000000018000000000000000000000:11111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111<0;11111<0;11111<0;10061019000610190006101900010100000101000001010000101000001010000010100001010000010100000101000710180007101800071018111=0:11111=0:11111=0:100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;111<00000000000000000019061000000000000000000100010000000000000000001000100000000000000000010001000000000000000000100010000000000000000001000100000000000000000010001000000000000000|5^60,348!11^36,564,756,84!9^324,132,0,0,3,23,1,0,0!10^36,36!4^732,570,1!6^324,324,0,0,0,0!0^612,96!0^636,96!0^660,96!0^684,96!0^708,96!0^732,96!0^276,528!0^300,528!0^324,528!0^348,528!0^372,528!0^300,144!0^276,144!0^348,144!0^372,144!0^72,420!0^72,444!0^72,468!0^72,492!0^72,516!1^492,156!1^492,324!1^492,468");
var lev_superliminal = new LevelData("superliminal", "90000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000340000000000340700000;1111114311111111100000:152111111111152110000000000002500000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000;1114311110000000000000:111111111000000000000000002500060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000007|5^732,540!0^228,180!0^216,180!0^216,192!0^228,192!0^228,276!0^216,276!0^216,288!0^228,288!0^228,372!0^216,372!0^216,384!0^228,384!0^228,468!0^216,468!0^216,480!0^228,480!0^36,180!0^48,180!0^48,192!0^36,192!0^36,276!0^48,276!0^48,288!0^36,288!0^36,372!0^48,372!0^48,384!0^36,384!0^36,468!0^48,468!0^48,480!0^36,480!0^120,564!0^120,552!0^132,552!0^132,564!0^144,564!0^144,552!0^120,540!0^132,540!0^144,540!11^348,564,528,324!2^660,576,0,-1!2^396,576,0,-1!10^132,480!6^300,372,2,0,0,0!6^492,372,2,0,0,1!6^492,540,2,0,0,2!6^300,540,2,0,0,3");
var lev_simpleton = new LevelData("simpleton", "5000000150000000001500200000001000000000000000003100010000000000000000350003140003140350000001000N111000111150000000100002150002150000000001000000000000000000000010000000000000000000000100000000000000000000301000000000000000000001010000000000000000000010100000000000000000000201000000000000000000000010000000000000000000000100003140003140000000001000011100011100000000010000215000215000000000100000B0000000000000000100000N000000000000000010000000000000000000030100000000000000000000101000000000000000000001010000000000000000000020100000000000000000000001400000000000000000000021400000000314000000000021000000001110000000000010000000021500000000000100000000000000000000001000000000000000000040014014031100310031003|5^36,396!12^516,552!12^540,552!12^252,552!12^276,552!4^132,570,1!4^396,570,1!4^660,570,1!1^528,444!1^264,444!1^324,396!1^204,396!1^468,396!1^588,396!2^72,576,0,-1!2^48,192,0,-1!11^708,84,396,300!2^156,324,0.707106781186547,-0.707106781186547!2^372,324,-0.707106781186547,-0.707106781186547!2^420,324,0.707106781186547,-0.707106781186547!2^636,324,-0.707106781186547,-0.707106781186547!2^372,180,-0.707106781186547,-0.707106781186547!2^156,180,0.707106781186547,-0.707106781186547!2^36,456,0,-1!0^756,516!0^756,528!0^756,540!0^744,540!0^744,528!0^744,516!0^756,420!0^744,420!0^744,432!0^744,444!0^756,444!0^756,432!0^756,324!0^744,324!0^744,336!0^744,348!0^756,348!0^756,336!0^540,528!0^528,528!0^516,528!0^516,516!0^528,516!0^540,516!0^540,504!0^528,504!0^516,504!0^276,528!0^264,528!0^252,528!0^252,516!0^264,516!0^276,516!0^276,504!0^264,504!0^252,504!0^540,492!0^528,492!0^516,492!0^276,492!0^264,492!0^252,492!6^684,84,2,0,0,3!6^588,84,3,0,0,2!6^468,132,3,0,0,0!6^588,564,3,0,0,3!2^756,252,-0.707106781186547,-0.707106781186547");
var lev_lesislotsa = new LevelData("les islots A", "0011111119000000000000600:1111110000000000000700006111100000;<000;11100000:1110000011000111100000061100000:=000:1110000000:180000000000006000000006111<0000000007000000000:11100;<0000;1000000000061100110000:100000000000:=0011000006000000000000000:=00000700000000000000000000;1100000000000000000000:11000000000000000000000060000000000000000000000000000000000000000;<00000000000000000000011000000000000000000000:=000000000000000000000000000800000000000000000000001<0000000000000000;11101=0000000000000000:11109000000000000000000619000000000000000;<0000100000000000000001100001000000000000;<0011000010000000000001100110000100000000;<00110011800010000000011001187111<0010000;<001187111111110010000118711111111111187187|5^36,48!11^660,564,756,60!9^42,258,0,0,21,23,1,-1,0!9^150,258,0,0,22,23,1,0,0!6^228,444,1,1,0,0!6^636,420,0,1,0,2!6^36,516,1,1,0,3!0^684,564!0^696,564!0^708,564!0^720,564!0^732,564!0^744,564!0^756,552!0^744,552!0^744,540!0^732,540!0^732,552!0^720,552!0^720,540!0^708,540!0^708,552!0^696,552!0^696,540!0^684,540!0^684,552!0^732,492!0^744,492!0^744,480!0^744,468!0^732,468!0^732,480!0^696,348!0^696,336!0^696,324!0^684,324!0^684,336!0^684,348!0^720,252!0^720,240!0^720,228!0^708,228!0^708,240!0^708,252!0^744,156!0^744,144!0^744,132!0^732,132!0^732,144!0^732,156!1^324,300!1^492,300!1^408,228!1^492,156!1^324,156!1^408,84!6^420,564,2,0,0,2");
var lev_pyramined = new LevelData("pyramined", "00000000000000000000002010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000GK0000000000000000000GK1100000000000000000GK1111000000000000000GK1150020000000000000GK1500000000000000000GK1500000000000000000GK1500000000000000000GK1500000000000000000GK1500000000000000000GK150000000000000000000FJ10000000000000000000000000000000000000000000GK100000000000000000000FJ14000000000000000000000FJ14000000000000000000000FJ14000000000000000000000FJ14000000000000000000000FJ14000000000000000000000FJ14000000000000000000000FJ11400300000000000000000FJ11110000000000000000000FJ110000000000000000000001100000000000000000000010000000000000000000000200100000000000000000000000000000000000000000003|5^324,60!11^396,564,684,564!9^84,564,0,0,29,23,1,0,0!1^396,300!1^396,420!1^324,516!1^468,516!1^516,396!1^276,396!1^708,420!1^708,300!1^708,180!1^612,108!1^612,228!1^84,420!1^84,300!1^84,180!1^180,228!1^180,108!6^732,84,0,0,1,2!6^60,84,1,0,1,0!12^660,420!12^660,300!12^660,180!12^564,228!12^564,108!12^228,108!12^228,228!12^132,180!12^132,300!12^132,420!0^708,396!0^708,384!0^708,276!0^708,264!0^708,156!0^708,144!0^612,204!0^612,192!0^612,84!0^612,72!0^84,396!0^84,384!0^84,276!0^84,264!0^84,156!0^84,144!0^180,204!0^180,192!0^180,84!0^180,72");
var lev_youlldieifyoutry = new LevelData("you'll die if you try", "00000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000?0000000000000000000000C00000000000000000000031000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000210000000000000000000000B0000000000000000000000>0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003|5^60,552!1^84,372!1^708,372!1^612,372!1^516,372!1^180,372!1^276,372!1^396,372!1^324,300!1^468,300!1^156,276!1^636,276!1^252,204!1^540,204!1^708,228!1^84,228!1^132,132!1^660,132!1^396,132!12^84,420!12^132,396!12^180,420!12^228,396!12^276,420!12^324,396!12^372,420!12^708,420!12^660,396!12^612,420!12^564,396!12^516,420!12^468,396!12^420,420!12^228,324!12^564,324!12^432,252!12^360,252!12^612,204!12^180,204!12^84,60!12^708,60!0^84,348!0^84,336!0^84,324!0^180,348!0^180,336!0^180,324!0^276,348!0^276,336!0^276,324!0^324,276!0^324,264!0^324,252!0^156,252!0^156,240!0^156,228!0^84,204!0^84,192!0^84,180!0^132,108!0^132,96!0^132,84!0^252,180!0^252,168!0^252,156!0^396,108!0^396,96!0^396,84!0^540,180!0^540,168!0^540,156!0^660,108!0^660,96!0^660,84!0^708,204!0^708,192!0^708,180!0^708,348!0^708,336!0^708,324!0^636,252!0^636,240!0^636,228!0^612,348!0^612,336!0^612,324!0^516,348!0^516,336!0^516,324!0^468,276!0^468,264!0^468,252!0^396,348!0^396,336!0^396,324!0^396,312!0^396,300!0^396,288!0^396,276!0^396,264!0^396,252!0^372,132!0^360,132!0^348,132!0^420,132!0^432,132!0^444,132!0^396,156!0^396,168!0^396,180!0^252,228!0^252,240!0^252,252!0^540,228!0^540,240!0^540,252!0^564,204!0^576,204!0^588,204!0^516,204!0^504,204!0^492,204!0^276,204!0^288,204!0^300,204!0^228,204!0^216,204!0^204,204!0^156,132!0^168,132!0^180,132!0^108,132!0^96,132!0^84,132!0^132,156!0^132,168!0^132,180!0^636,132!0^624,132!0^612,132!0^684,132!0^696,132!0^708,132!0^660,156!0^660,168!0^660,180!0^708,252!0^708,264!0^708,276!0^84,252!0^84,264!0^84,276!0^660,276!0^612,276!0^492,300!0^444,300!0^348,300!0^300,300!0^180,276!0^132,276!3^396,36!11^396,516,744,552");
var lev_lowrise = new LevelData("lowrise", "0000000000000000000000600000000000000000000000000;11111<0000000000000000190006100000000000070001000001000000;1111110001000001000000190000600018000010000001000000000:1<0001000000:000000000061007100000000000000000010;1=000000;000000000001010000000010000000000010100000007100000000000:0100000;11=00000000000001000001900000000000000010000010000000000000000=00000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000=00000000000000000000000000000000000000000000000000000000000000000000<000000000000000000000018000000070000000000000:11111111100000000000000000000006000000000000000000000000000000000000000000000000000000000000000000007|5^72,516!10^744,48!3^360,384!3^624,384!9^228,480,0,0,13,7,1,0,0!1^396,516!1^492,516!1^492,420!1^300,516!9^444,516,0,0,13,7,1,-1,0!9^492,468,0,0,12,7,1,-1,0!9^348,516,0,0,11,7,1,-1,0!11^132,228,180,228!0^708,564!0^720,564!0^732,564!0^744,564!0^696,564!0^684,552!0^756,552!0^756,540!0^756,528!0^756,516!0^756,504!0^756,492!0^756,480!0^756,468!0^756,456!0^756,444!0^756,432!0^756,420!0^756,408!0^756,396!0^756,384!0^684,540!0^684,528!0^684,516!0^684,504!0^684,492!0^684,480!0^684,468!0^684,456!0^684,444!0^684,432!0^684,420!0^684,408!0^684,396!0^684,384!0^684,372!0^684,360!0^756,360!0^756,372!0^696,552!0^708,552!0^720,552!0^732,552!0^744,552!0^744,540!0^732,540!0^744,528!0^696,540!0^708,540!0^696,528!0^720,540!0^696,516!0^696,504!0^696,492!0^696,480!0^696,468!0^696,456!0^696,444!0^696,432!0^696,420!0^696,408!0^696,396!0^696,384!0^696,372!0^696,360!0^744,360!0^744,372!0^744,384!0^744,396!0^744,408!0^744,420!0^744,432!0^744,444!0^744,456!0^744,468!0^744,480!0^744,492!0^744,504!0^744,516!2^576,576,0,-1!2^468,336,0,-1!2^72,576,0,-1!7^564,348,3!7^588,348,3!7^228,420,1");
var lev_acrophobe = new LevelData("acrophobe", "50011011500000000000000000150210000000000000000000000000000000000000000000000000000000000000000000001400000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000015000000000000000000000000000000000000000000000000000000000000001400000000000000000040311000000000000000000|5^36,156!11^48,84,732,84!1^660,156!1^132,156!2^768,252,-1,0!2^768,288,-1,0!2^768,324,-1,0!2^768,360,-1,0!2^768,396,-1,0!2^768,432,-1,0!2^768,468,-1,0!2^768,504,-1,0!2^768,540,-1,0!2^24,252,1,0!2^24,288,1,0!2^24,324,1,0!2^24,360,1,0!2^24,396,1,0!2^24,432,1,0!2^24,468,1,0!2^24,504,1,0!2^24,540,1,0!6^612,276,0,0,0,2!6^612,204,1,0,0,2!6^180,204,0,0,0,0!6^180,276,1,0,0,0!0^324,180!0^348,180!0^372,180!0^396,180!0^420,180!0^444,180!0^468,180!0^468,156!0^468,132!0^444,132!0^420,132!0^396,132!0^372,132!0^348,132!0^324,132!0^324,156!0^348,156!0^372,156!0^396,156!0^420,156!0^444,156");
var lev_cloudcity3 = new LevelData("cloud city 3", "001191619119000000000060011718171100000000;<0000:1111111=00000000110000000000610000000006100000000000=0000000000100000000000000000000001000000000000000000<00010000000000000000001000180000000000000000010006100000000000000;10100001000000000000001901000710000;11<0000071001000:=0000111=000;11=001000000007119000019000010000000;111800001000001000000011961<00018000710000000:=00:=000:11111=00;1<00000000000000000000191000000000000000000001710000000000000000000711100000000000;1111111196100000;<000019000006100100000:1800010000000100=00000061<0010000000100000000001100180011<0100000000071100:111111010000000;1111000000000010000000:11110000000000=000000000611000000000000000000000:=00000000000000000000000000000000000007|5^48,48!11^336,84,612,348!2^534,126,-0.707106781186547,-0.707106781186547!9^372,324,0,0,26,18,1,0,0!3^468,228!0^408,132!0^408,120!0^408,108!0^396,114!0^396,126!0^444,396!0^444,372!0^444,348!0^444,324!0^444,300!0^492,324!0^492,348!0^492,372!0^492,396!0^492,420!0^468,408!0^468,384!0^468,360!0^468,336!0^468,312!0^492,444!0^468,432!0^444,420!9^240,396,0,0,10,16,0,-1,0!6^324,396,5,1,0,0!4^372,570,1!0^564,516!0^552,516!0^540,516!0^528,516!0^516,504!0^528,504!0^540,504!0^552,504!0^564,492!0^552,492!0^540,492!0^528,492!6^540,324,2,1,0,0");
var lev_crosshairs = new LevelData("crosshairs", "50000000020001500000002000000000000010000000000031100000000500000000040115000000000000001100101500000000000000011401010000000000300000211000500000340001400000210000000031100011400000000000003111000111400000000000311110001111400000000031111100011111400000003111111000111111400000311111110001111111400001111111500021111111000000000000000000000000000000000000000000000000000000000000000000000000011111114000311111110000211111110001111111500000211111100011111150000000211111000111115000000000211110001111500000000000211100011150000000000000211000115000000000400000250001500000310101000000000020000031101014000000000000000115050114000000000000001100002110000000040000000000000000000000100000000040000000030001400000003|5^684,540!1^396,300!6^36,276,2,0,2,0!6^756,324,2,0,2,2!2^120,480,0,-1!2^672,480,0,-1!2^636,348,0.707106781186547,-0.707106781186547!2^756,252,-0.707106781186547,-0.707106781186547!2^720,336,0,-1!2^72,336,0,-1!2^156,348,-0.707106781186547,-0.707106781186547!2^36,252,0.707106781186547,-0.707106781186547!2^240,168,-0.707106781186547,-0.707106781186547!2^552,168,0.707106781186547,-0.707106781186547!2^300,108,-0.707106781186547,-0.707106781186547!2^492,108,0.707106781186547,-0.707106781186547!3^396,156!9^636,564,0,0,6,2,1,0,0!9^612,564,0,0,5,2,1,-1,0!9^138,60,0,0,6,23,1,-1,0!9^150,60,0,0,7,23,1,0,0!11^648,60,168,564!2^396,576,0,-1!0^396,516!0^396,492!0^396,468!0^396,444!0^396,420!0^396,396!0^396,372!0^396,228!0^396,204!0^396,180!0^396,132!0^396,108!0^396,84!0^420,228!0^420,204!0^420,180!0^420,156!0^420,132!0^420,108!0^420,84!0^372,84!0^372,108!0^372,132!0^372,156!0^372,180!0^372,204!0^372,228!0^468,300!0^492,300!0^516,300!0^540,300!0^564,300!0^588,300!0^612,300!0^180,300!0^204,300!0^228,300!0^252,300!0^276,300!0^300,300!0^324,300");
var lev_cliffhanger = new LevelData("cliffhanger", "000000021150000000000020000000015000000000000000000000000000000000000000O00000000000QQQQQ0000000000000000000000000000000000QQ0000000000000000O000000000000000000000000000000000000000000000000000000000QQQQ0000000O00000OO0000000000000000000000000000000000000000000000000000000000000O0000000000000000000000000000000000QQQ0000000000000000000000000000000O0000QQ000000000000000000000000000000000000000000000000000OO000000000O0000000000000000000000000000OO00000000000000000000000000000000000000O0000000000000000000000000000000000O000000000000000000000000000000000O0000QQ00000000000000000000000000000000000000000000000000000000000000H0000000000GOOOOOOOO1L010000OH0000111111111I00100001111M011111111140G14000000000111111111|5^156,540!11^744,84,390,198!9^696,84,0,0,29,3,1,0,0!2^60,216,0,-1!12^588,408!12^672,408!12^630,408!12^348,438!12^348,402!12^336,420!12^372,492!12^420,456!12^480,468!12^432,504!12^504,540!12^576,528!12^636,492!12^636,456!12^564,444!12^528,480!12^588,492!12^648,540!12^660,480!12^612,552!12^456,540!12^504,504!12^372,540!12^324,528!12^444,408!12^456,408!0^114,90!0^186,90!0^258,90!0^330,90!0^402,90!0^474,90!0^546,90!0^618,90!0^570,378!0^450,378!0^342,378!0^222,378!0^102,378!0^150,210!0^258,234!0^498,234!0^606,210!6^132,36,2,0,0,0!6^684,156,3,0,0,2");
var lev_leapoffaith2 = new LevelData("leap of faith 2", "900000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;0000000000000000000000:000;0000000000000000000000:000000000000000;0000000000000000000000:00000000000000000000000000000000000000000000000000;00000000000000;0000000:00000000000000:00000000000000000000000000;00000;0000000000000000:00000:0000000000000000000000000000<0000000000000;0000000010000000000000:00000000100000000000000000000001000000;<000000000080071800007118000000007|5^732,84!12^648,156!12^612,168!12^576,180!12^540,192!12^504,204!12^468,216!12^432,228!12^396,240!12^360,252!12^684,144!12^324,264!12^288,276!12^288,300!11^204,564,744,276!3^744,168!6^396,564,5,1,0,0!6^588,420,5,1,0,1!6^468,396,5,1,0,2!0^672,444!0^600,372!0^552,276!0^456,348!0^384,420!0^528,468!0^600,516!0^408,516!0^36,60!0^36,72!0^36,84!0^36,96!0^36,108!0^36,120!0^36,132!0^36,144!0^36,156!0^36,168!0^36,180!0^36,192!0^36,204!0^36,216!0^36,228!0^36,240!0^36,252!0^36,264!0^36,276!0^36,288!0^36,300");
var lev_revolute = new LevelData("revolute", "500000000000000000000020000000000000000000000000111111111111111111=00001500000000000000000000010000000000000000000000100111111111111=00;00001001500000000000001000010010000000000000010000100100111111=00;00100001001001500000001001004010010010000000010010010100100100<00;001001001010010010010010010010010100100100100100100100101001001001001001001001010010010010010010010010100100100100100100100101001001001001001001001010010010010010010010010100100100:00100100100501001001000001001001000010010010000310010010000100100=00;11100100100001001000000000001001000010010000000000310010000100=00;11111111100100001000000000000000001000010000000000000000310000=00;111111111111111000000000000000000000000040000000000000000000003|5^420,552!11^396,60,396,276!9^396,132,0,0,12,2,1,-1,0!9^396,492,0,0,20,2,1,0,0!9^228,60,0,0,20,2,1,-1,0!9^564,60,0,0,12,2,1,0,0!9^396,420,0,0,14,2,1,-1,0!9^396,204,0,0,18,2,1,0,0!9^192,300,0,0,15,2,1,-1,0!9^672,300,0,0,17,2,1,0,0!6^396,348,3,1,0,0!6^468,324,2,1,0,0!6^420,252,2,1,0,2!6^348,276,3,1,0,2!0^408,492!0^420,492!0^432,492!0^444,492!0^384,492!0^372,492!0^360,492!0^348,492!0^384,420!0^372,420!0^360,420!0^408,420!0^420,420!0^432,420!0^672,312!0^672,324!0^672,288!0^672,276!0^192,312!0^192,324!0^192,288!0^192,276!0^384,204!0^408,204!0^408,132!0^384,132");
var lev_bunker = new LevelData("bunker", "000021111111111111000020000011111111111110000000000111111111111100000001001111111111111000000010011111111111110000?0010011111111111150000N0010011111111111500000>001001111111111503100000010011111111150311400000100111111115031111100001001111111503111500000010011111150311110000000100111115031111100000001001111100111111001000010011111001111110010000100111110000021100100001001111100114011001000010011111001110110010000000111150311101100100000001115031115011001000000311503111100110010000111150311111111100100000215031111111111001000000003111111111110010000000311111111111100100000001111111111111001000000011111111111110010000000111111111111100100000001111111111111000000000011111111111110000000003111111111111100003|5^684,480!11^504,396,60,84!9^204,120,1,0,16,13,1,0,-1!9^744,72,1,0,16,13,1,0,0!9^348,48,1,0,16,14,1,0,0!9^300,516,0,0,18,16,1,-1,0!9^120,516,0,0,18,16,1,0,0!9^516,552,0,0,19,16,1,0,0!6^84,564,5,1,0,0!6^132,468,5,1,0,1!6^444,132,5,1,0,2!6^108,36,5,1,0,0!6^300,108,0,0,2,2!0^312,312!0^300,324!0^288,336!0^276,348!0^264,360!0^252,372!0^240,384!0^228,396!0^216,408!0^204,420!0^192,432!0^324,300!0^468,276!0^480,264!0^492,252!0^504,240!0^516,228!0^528,216!0^540,204!0^552,192!0^564,180!0^576,168!0^588,156");
var lev_foolsgold = new LevelData("fool's gold", "50000000000000000000002000000000000000000000000000000000000000000000000010000000000000000000000100000000000000000000001400000000000000000000011000000000310000003000110000000001500000110001140000000000000000000011110000000000000000000111500000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000300011000000000000000001000110000000000000000020001100000000000000000000011000000000000000000000110000000000000000000001114000000000000000000011110000000000000000000115000000000000000000001100000000014000001100011000000000210000002000150000000000000000000001000000000000000000000010000000000000000000000000000000000000000000000000000000000000000040000000000000000000003|5^120,60!11^672,84,396,84!3^252,204!3^540,204!10^396,180!12^204,528!12^588,528!12^768,192!12^768,324!12^768,468!12^24,240!12^24,396!2^396,552,0,-1!2^420,564,0.707106781186547,-0.707106781186547!2^372,564,-0.707106781186547,-0.707106781186547!0^756,552!0^744,564!0^732,564!0^720,564!0^708,564!0^696,564!0^684,564!0^672,564!0^660,564!0^648,564!0^636,564!0^624,564!0^612,552!0^612,540!0^756,540!0^744,540!0^732,540!0^720,540!0^708,540!0^696,540!0^684,540!0^672,540!0^660,540!0^648,540!0^636,540!0^624,540!0^624,552!0^636,552!0^648,552!0^660,552!0^672,552!0^684,552!0^696,552!0^708,552!0^720,552!0^732,552!0^744,552!0^36,540!0^36,552!0^48,564!0^60,564!0^72,564!0^84,564!0^96,564!0^108,564!0^120,564!0^132,564!0^144,564!0^156,564!0^168,564!0^180,552!0^180,540!0^168,540!0^156,540!0^144,540!0^132,540!0^120,540!0^108,540!0^96,540!0^84,540!0^72,540!0^60,540!0^48,540!0^48,552!0^60,552!0^72,552!0^84,552!0^96,552!0^108,552!0^120,552!0^132,552!0^144,552!0^156,552!0^168,552!0^564,564!0^564,552!0^564,540!0^552,540!0^540,540!0^528,540!0^516,540!0^504,540!0^492,540!0^480,540!0^468,540!0^456,552!0^444,564!0^456,564!0^468,564!0^480,564!0^492,564!0^504,564!0^516,564!0^528,564!0^540,564!0^552,564!0^552,552!0^540,552!0^528,552!0^516,552!0^504,552!0^492,552!0^480,552!0^468,552!0^228,564!0^240,564!0^252,564!0^264,564!0^276,564!0^288,564!0^300,564!0^312,564!0^324,564!0^336,564!0^348,564!0^336,552!0^324,540!0^312,540!0^300,540!0^288,540!0^276,540!0^264,540!0^252,540!0^240,540!0^228,540!0^228,552!0^240,552!0^252,552!0^264,552!0^276,552!0^288,552!0^300,552!0^312,552!0^324,552!2^180,372,-0.707106781186547,-0.707106781186547!2^204,360,0,-1!2^588,360,0,-1!2^612,372,0.707106781186547,-0.707106781186547!1^516,444!1^276,444!1^348,396!1^444,396!1^516,348!1^276,348!1^396,300!1^624,276!1^168,276!1^696,240!1^96,240!1^696,396!1^96,396");
var lev_thetwotowers = new LevelData("the two towers", "900000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<000<000<000<000<000000=000=000=000=000=0000000000000000000000000000000<000<000<000<000<000000=000=000=000=000=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000<000<000<000<000<000000=000=000=000=000=000000000000000000000000000<000<000<000<000<000000=000=000=000=000=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000007|5^204,540!3^396,420!3^396,228!3^396,36!11^168,60,624,60!12^768,528!12^768,432!12^768,336!12^768,240!12^768,144!12^24,528!12^24,432!12^24,336!12^24,240!12^24,144!0^756,180!0^756,192!0^756,204!0^756,276!0^756,288!0^756,300!0^756,372!0^756,384!0^756,396!0^756,468!0^756,480!0^756,492!0^36,180!0^36,192!0^36,204!0^36,276!0^36,288!0^36,300!0^36,372!0^36,384!0^36,396!0^36,468!0^36,480!0^36,492!0^552,492!0^552,396!0^552,300!0^552,204!0^552,108!0^240,108!0^240,204!0^240,300!0^240,396!0^240,492!0^168,444!0^168,348!0^168,252!0^168,156!0^624,156!0^624,252!0^624,348!0^624,444");
var lev_industrialzone3 = new LevelData("industrial zone 3", "50001000000000000000211000050000000000000000210000000000000003100000200000311111111115000000000001500000000000000000000010000000000310000000003100000000001500000000011000000000010000000000150011000000100003100000000210000001000011000000000100000010000100000000001000000100001000000000010000001000010000000000100000010000100000000031000000100001000000001110000031000000000000010000000150000030000000100000001000000100000001000000000000000000000010000000000000000014003100000000010000000110011000000003100000001000000000000015000000010000000000000100000000140000000000001000000002100000000000010000000001000000000000100000000014000031140031000000000111111500111110000000000000000000000000000340000000000000000000031|5^708,288!11^288,564,216,108!9^432,360,0,0,15,23,1,0,0!9^684,192,0,0,15,23,1,-1,0!9^672,384,0,0,14,23,1,-1,0!9^132,300,0,0,13,23,1,-1,0!3^312,288!10^420,228!1^192,504!1^132,540!1^408,504!1^492,540!1^660,516!6^60,108,3,0,1,0!0^348,228!0^336,228!0^324,228!0^312,228!0^300,228!0^288,228!0^276,228!0^492,180!0^480,180!0^468,180!0^456,180!0^444,180!0^432,180!0^420,180!0^60,180!0^60,204!0^60,228!0^60,252!0^60,276!0^60,300!0^60,324!0^60,348!0^60,372!12^36,156!12^84,228!12^36,300!12^84,372!1^636,288!1^564,348!1^180,348!1^324,372!4^108,570,1!4^708,570,1");
var lev_artifact3 = new LevelData("artifact 3", "50000000000000000000002000000000000000000000000000140000000000000000000000240000000000000040000000BD000000000000010000000>1H0C1D0000000310000000011110100000GK150000000?1I0B0100000B1100000000CE0000E0000002E00000003500000000000000000000150000000000000000000000000000000000000000@000000000000000000000?D000000000000000000000C140000000000000000000311100000000000000000001115000000000000000000021E000000000000000000000BA000000000000000000000>000000000000000000000000000140000000000000000000000240000000000000000000000BD0000D0000003D00000000>1H0C0100000C1100000000011110100000FJ140000000?1I0B1E0000000210000000CE00000000000001000000350000000000000050000015000000000000000000000000000000000000000040000000000000000000003|5^660,504!1^396,84!1^396,108!1^396,132!1^396,156!1^396,180!1^396,204!1^396,228!1^396,252!1^396,276!1^396,300!1^396,324!1^396,348!1^396,372!1^396,396!1^396,420!1^396,444!1^396,468!1^396,492!1^396,516!9^192,300,0,0,24,12,1,-1,0!9^612,168,0,0,8,12,1,0,0!11^120,516,600,300!0^192,180!0^180,180!0^168,180!0^168,168!0^180,168!0^192,168!0^192,156!0^180,156!0^168,156!0^168,144!0^180,144!0^192,144!0^192,132!0^180,132!0^168,132!0^108,132!0^108,120!0^108,144!0^120,144!0^120,132!0^120,120!0^252,120!0^252,132!0^252,144!0^240,144!0^240,132!0^240,120!0^228,120!0^228,132!0^228,144!0^132,144!0^132,132!0^132,120!0^156,132!0^156,144!0^204,144!0^204,132!0^216,132!0^216,144!0^144,144!0^144,132!0^156,156!0^204,156!0^216,120!0^144,120!0^216,156!0^144,156!10^180,120!3^492,132!3^300,132!2^564,492,-0.707106781186547,-0.707106781186547!2^228,492,0.707106781186547,-0.707106781186547!2^732,576,0,-1!2^60,576,0,-1!7^732,444,3!7^756,444,3!7^36,444,3!7^60,444,3!7^324,444,3!7^348,444,3!7^300,444,3!7^444,444,3!7^468,444,3!7^492,444,3!7^708,444,3!7^84,444,3!1^492,252!1^300,252!1^492,348!1^300,348!3^732,132!3^60,132!0^708,420!0^720,420!0^732,420!0^744,420!0^756,420!0^492,420!0^480,420!0^468,420!0^456,420!0^444,420!0^348,420!0^336,420!0^324,420!0^312,420!0^300,420!0^84,420!0^72,420!0^60,420!0^48,420!0^36,420");
var lev_hunted2 = new LevelData("hunted 2", "9000000:=000:=000:=0611000000000000000000000:1000000000000000000000060000;<00000;<00;<00;<000000:=00000:=001100:=0000000000000000011000000000000;<0000000:=00000;000000:=00000000000000:000000000;<000000000000000000000:=0000000;<000000;<0000000000000:=000000:=000000000000000000000000000000;<00000000;00000000;<00:=00000000:00000000:=000000000;<000000000000000000000110000000000;<000000000:=0000000000:=00;<00000000;000000000000:=00000000:000;<000000000000000000000:=0000000000000;<000000000000;<0000000:=000000000000:=000000000000000000;<00000000000000;000000:=0000000;<00000:000000000000000110000000000;<00000;<001100;<000000:=00000:=00:=00:=0000000000000000000000007000000000000000000000;18000000;<000;<000;<0711|5^396,444!11^396,564,396,48!6^60,348,5,1,0,3!6^636,372,5,1,0,3!6^636,84,5,1,0,2!6^156,372,5,1,0,0!0^456,300!0^336,300!0^360,204!0^432,204!0^672,108!0^600,156!0^552,228!0^672,276!0^504,84!0^288,84!0^120,108!0^192,156!0^240,228!0^120,276!0^264,444!0^120,468!0^528,444!0^672,468!0^600,540!0^456,540!0^336,540!0^192,540");
var lev_crypt = new LevelData("crypt", "5000000021111111E00000>000000000111111500000000311400001111150000000?011110000111MI000C1111101111400021500003500002011111000000000?1000000011501400000000C500L0000210002400000035003140000000001111111500311100@0000000000000000111E00D0000000GK11D0000111A0?1140311111I01000311E00C11111E0000001403111A001150000000000111115000011000000310001150000031110000001140G11000GK11111001D0021111110001111111001140001111100K1111115001110001111100000000F000111000111111400000000002110001500211111140000001100000000111111100400015000000000000021001000100000000000000010010031000000000000000100100111400000000000001001001111000114000140310010000211111111111111M0010000000000021111MI00001000000000000000000000311111111111111111111111|5^60,540!0^300,300!0^312,300!0^324,300!0^336,300!0^348,300!0^360,300!0^372,300!0^384,300!0^660,204!0^660,216!0^660,228!0^660,240!0^660,252!0^516,300!0^516,312!0^516,324!0^588,156!0^600,156!0^612,156!0^660,396!0^660,384!0^660,372!0^660,360!0^660,348!0^492,36!0^504,36!0^516,36!0^528,36!0^540,36!0^540,108!0^552,108!0^564,108!0^576,108!0^588,108!11^612,492,420,420!12^132,324!12^60,408!12^216,228!12^216,360!12^132,252!12^84,132!3^348,84!3^624,192!8^732,540,2!12^564,576!12^648,576!6^468,540,1,0,0,3!6^540,180,0,0,0,2!6^132,36,0,0,0,0");
var lev_picturesque = new LevelData("picturesque", "0000000000000000F101I0B0000000000000000010100>00000000000000000B010000000000000000000000E00?0000000000000000000000N0000000000000000000000C000000000000000000000010000000000000000000003100000000000000000000?1100000000000000000000N1100000000000000000000>11000000000000000000000FJ00000000000000000000000000000000000000000000000000000000000000000000?0000000000000000000000C0000000000000000000003100000000000000000000?1100000000000000000000C110000000000000000000011100000000000000000000211000000000000000000000B1000000000000000000000N1000000000000000000000>1000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000?0000000000000000000000C00000000000000000000GK1|5^48,516!11^48,468,660,552!9^336,552,0,0,3,19,1,0,0!9^492,480,0,0,3,19,1,-1,0!10^756,300!10^36,300!0^90,48!0^48,102!0^96,156!0^276,174!0^216,216!0^114,228!0^294,96!0^612,78!0^606,144!0^588,216!0^642,258!0^714,120!0^450,108!0^372,150!0^504,186!0^666,174!0^522,66!0^360,66!0^210,132!0^168,84!0^450,162!0^366,222!0^300,204!0^522,114!0^564,90!0^42,150!0^60,186!0^600,204!0^528,240!0^330,186");
var lev_minedovermadder = new LevelData("mined over madder", "9000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000007<0000000000000000000006=00000000000000000000000000000000000000070000000000;0<000000;111000000000000000000011110000000000:0=000000:1110000000000000000000000600007<0000000000000000000006=0000000000000000000000000000000000;1<0000000000000;0<0000111000000000000000000001110000000000000:0=000011100000000000000000000:1=00000007<0000000000000000000006=00000000000000000000000000000000000000070000000000;0<000000;111000000000000000000011110000000000:0=000000:1110000000000000000000000600007<0000000000000000000006=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000007|5^396,396!11^396,564,396,156!0^648,108!0^648,96!0^648,84!0^648,72!0^648,60!0^648,48!0^648,36!0^480,108!0^480,96!0^480,84!0^480,72!0^480,60!0^480,48!0^480,36!0^312,108!0^312,96!0^312,84!0^312,72!0^312,60!0^312,48!0^312,36!0^144,108!0^144,96!0^144,84!0^144,72!0^144,60!0^144,48!0^144,36!12^228,276!12^204,300!12^228,324!12^252,300!12^396,276!12^396,324!12^420,300!12^372,300!12^564,276!12^540,300!12^564,324!12^588,300!12^756,216!12^36,216!1^684,252!1^108,252!12^36,252!12^36,288!12^756,252!12^756,288!1^300,396!1^492,396!1^612,420!1^684,348!1^108,348!1^180,420!6^60,540,5,1,0,3!6^636,516,5,1,0,3!6^756,84,5,1,0,2!6^180,204,5,1,0,0");
var lev_shaftastic = new LevelData("shaftastic", "I000000000000000000000F00000000000000000000000000000000000000000000000000C111111111111111L0000001I0000000000000000000001H000000000000000000000B111111111111111M00000000000000000000000000000000000000000000000000000000000000000000000000C111D00C111111111L0000011101001I0000000000000000001001H000000000000000J11E00B111111111M000000000000000000000000000000000000000000000000000000000000000000000000000000C111111111111L0000000001I0000000000000000000001H000000000000000000000B111111111111M0000000000000000000000000000000000000000000000000000000000000000000000000C11111111111111111L00001I0000000000000000000001H000000000000000000000B11111111111111111M000000000000000000000000000000000000000000000000H000000000000000000000G|5^312,240!11^312,180,648,120!9^144,168,1,0,13,5,1,0,-1!9^312,312,1,0,13,5,1,0,0!9^480,240,1,0,13,6,1,0,0!0^564,492!0^564,444!0^564,396!0^564,348!0^564,300!0^564,252!0^396,492!0^396,444!0^396,396!0^396,348!0^396,300!0^228,492!0^228,444!0^228,396!0^228,348!0^228,300!0^228,252!0^228,204!0^228,156!0^396,252!6^180,36,2,1,0,0!6^36,348,3,1,0,1!6^252,564,2,1,0,3!6^588,324,3,1,0,3");
var lev_stimpack = new LevelData("stimpack", "90000000000000000000006000000000000000000000000000000C00J1M00D00000000000000E0000000B00000000000000000000000000000000000000000000000000003000000000000000000000G1000000C11111111111111110000001I0000000000000F1000000100000000000000020000001000K11D00000000000000010001AF1000000000000000100010010000000000000001H0?1001000000000000000B111M00100000000000000000000001000000000000000C111L0010000000000000001I0>10010000000000000001000100100000000000000010001@G10000000000000001000J11E000000000000000100000000000000030000001H0000000000000G1000000B1111111111111111000000000000000000000F100000000000000000000002000000000000000000000000000000D0000000C00000000000000B00K1L00E00000000000000000000000000000080000000000000000000007|5^684,540!11^396,324,96,540!9^684,276,1,0,16,8,1,0,-1!9^84,84,1,0,16,9,1,0,-1!9^492,60,1,0,16,10,1,0,-1!9^156,300,1,0,16,11,1,0,-1!0^756,60!0^756,72!0^756,84!0^756,96!0^36,60!0^36,72!0^36,84!0^36,96!0^228,156!0^252,156!0^276,156!0^300,156!0^324,156!0^348,156!0^444,156!0^468,156!0^492,156!0^516,156!0^540,156!0^564,156!6^84,228,1,0,1,0!6^108,420,0,1,0,2!6^132,36,3,1,0,0!6^300,132,5,1,0,3!1^348,108!1^444,108");
var lev_hallowed = new LevelData("hallowed", "11100011115000000000002150000021100011111000001000000011000115010000000000000010031100140000000000000100110001111110000000001002100000011100000000010001000000021000000000100011000000010000000001003114000000000000000010011111000000000000000100211500000000000000001000110000000000000000010001000000000000000001100010000000000000000311400100000000000000011111001000000000000000021150010000000000000000011000100000000000000000010001000000000000000000100011000000000000000001000114000000000000000010001111000000000000000100011500000000000000001000110000000000000000010001000000000000000000100310000000000000000001001100000000000000000010021000000000100000001100011000000011400000311000114000003111100011114031111000111|5^84,324!9^132,300,1,0,1,14,1,0,-1!9^252,300,1,0,1,15,1,0,-1!9^396,300,1,0,1,16,1,0,-1!9^540,300,1,0,1,17,1,0,-1!11^84,564,660,300!6^708,324,2,0,1,3!0^180,324!0^192,324!0^204,324!0^588,324!0^600,324!0^612,324");
var lev_judgementcall = new LevelData("judgement call", "0000:000=00000000000006000000000000000000000000000000000000000000000000000000000000000000;0000000000000000000000:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;0000000000000000000000:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;000000000000000000000010000000000000000000000:0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;0000000000000000000000:000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;0000000000000000000000:0000000000000000000000000000000000000000000000000;<000;0<00000000000007|5^396,540!6^684,36,3,0,1,2!6^156,156,3,0,1,2!6^396,108,3,0,1,0!6^708,204,3,0,1,2!11^396,492,672,492!0^264,492!0^264,480!0^264,468!0^264,456!0^264,444!0^264,432!0^264,420!0^120,492!0^120,480!0^120,468!0^120,456!0^120,444!0^120,432!0^120,420!0^228,516!0^216,516!0^204,516!0^192,516!0^180,516!0^168,516!0^156,516!0^240,504!0^252,492!0^144,504!0^132,492!0^252,420!0^252,432!0^252,444!0^252,456!0^252,468!0^252,480!0^240,492!0^228,504!0^216,504!0^204,504!0^192,504!0^180,504!0^168,504!0^156,504!0^144,492!0^132,480!0^132,468!0^132,456!0^132,444!0^132,432!0^132,420!0^228,492!0^240,480!0^156,492!0^144,480");
var lev_ndianajones = new LevelData("ndiana jones", "50000000211500000000001000000000000000000000020000000000000000000000040000140000031400000000111111110000111111111115000021500001500000002100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400003140000140000000311111111100001111111111150000150000021500000000001401000000000000000000011110000000000000000300000000311400000000001|5^96,540!1^204,324!1^252,324!1^300,324!1^348,324!1^396,324!1^444,324!1^492,324!1^540,324!1^588,324!2^756,552,0,-1!2^36,552,0,-1!12^144,372!12^144,408!12^144,444!12^144,480!12^144,516!12^648,372!12^648,408!12^648,444!12^648,480!12^648,516!12^636,540!12^156,540!12^624,564!12^168,564!11^696,132,396,252!9^108,132,1,0,28,3,1,0,-1!9^696,552,1,0,28,3,1,0,0!6^36,60,2,0,0,0!6^684,516,2,0,0,3!6^756,420,2,0,0,1!12^636,348!12^156,348!12^600,576!12^192,576!0^204,300!0^252,300!0^300,300!0^348,300!0^396,300!0^444,300!0^492,300!0^540,300!0^588,300!0^156,300!0^132,300!0^660,300!0^636,300!0^72,84!0^72,96!0^72,108!0^72,120!0^72,72!0^720,528!0^720,516!0^720,504!0^720,492!0^720,480!0^720,468!0^720,456!0^720,444!0^720,432!0^720,420!0^720,408!6^156,60,3,0,1,1");
var lev_armoury = new LevelData("armoury", "11000000000000000000011024000000000000000003500024001400000000000010000021111000000000000100000000000000000000000000000000000000311000000000000000000035000000000000000000003500000001000000000000010000000010000000000000100000003500000000000000000000350000000000000000000001000000000000000000000010031000000003114000000000100000000150000000000001000000001000000000000010000000014000000000000100000000021150000000001000000000000000000010020000000000000000000100000000000000000000002400000000000000100000002400000000000001000000001000000000000024000000010000000000000024000000000000000000000021100000000000000000000000000000000031111000000000000100003500150000000000001000350000000000000000024011000000000000000000011|5^300,564!9^732,36,0,0,19,23,1,0,0!9^60,36,0,0,18,23,1,0,0!9^708,156,0,0,17,23,1,0,0!9^84,156,0,0,16,23,1,0,0!11^372,564,396,180!2^180,324,-0.707106781186547,-0.707106781186547!2^612,324,0.707106781186547,-0.707106781186547!2^756,528,0,-1!2^492,456,0,-1!2^300,456,0,-1!2^36,528,0,-1!2^396,528,0,-1!2^576,288,0.707106781186547,-0.707106781186547!2^216,288,-0.707106781186547,-0.707106781186547!2^348,228,-0.707106781186547,-0.707106781186547!2^444,228,0.707106781186547,-0.707106781186547!2^444,300,0.707106781186547,0.707106781186547!2^348,300,-0.707106781186547,0.707106781186547!0^420,300!0^420,276!0^420,252!0^372,300!0^372,276!0^372,252!0^396,228!0^396,252!0^396,276!0^396,300!0^384,288!0^408,288!0^408,264!0^384,264!0^384,240!0^408,240!3^576,360!3^216,360!3^396,108!6^300,36,2,0,0,0!6^492,36,3,0,0,2!0^324,204!0^312,192!0^300,180!0^468,204!0^480,192!0^492,180!0^636,300!0^648,288!0^660,276!0^156,300!0^144,288!0^132,276!0^300,420!0^300,408!0^300,396!0^492,420!0^492,408!0^492,396!0^420,180!0^372,180!0^756,180!0^744,180!0^732,180!0^36,180!0^48,180!0^60,180");
var lev_timing = new LevelData("timing", "50215000000000215021110000000000000000100000000001000000000001000000000010000000000010000000000100000000000100000000001000000000001000000040310000000000010000000111100000000000100000001111000000000001000000050210000000000010000000000100000000000100000000001000000000001000000000010000000000010000000000100000000000100000000001000000000001000000000010000000000010000000000100000000000100000000001000000000001000000000010000000000010000000000100000000000100000000001000000000001000000000010000000000010000000000100000000000100000000001000000000001000000000000000000000010000000000100000000000100000000001000000000001000000000010000000000010000000000100000000000000000000001000000000000000000040314000000000000000003|5^132,372!0^660,324!0^588,300!0^516,324!0^444,300!0^372,324!0^300,300!0^228,324!0^156,300!0^84,324!8^204,564,3!8^180,564,3!8^156,420,1!8^132,420,1!8^108,564,3!8^84,420,1!8^564,420,1!8^540,420,1!8^516,564,3!8^492,564,3!8^468,420,1!8^444,420,1!12^552,564!12^456,564!12^228,564!12^144,564!11^84,372,30,564!6^156,84,3,0,1,0!6^84,84,3,0,1,0!6^708,84,3,0,2,0!6^636,84,3,0,2,0!9^48,564,1,0,25,4,1,0,-1!9^60,564,1,0,2,4,1,0,-1!0^336,540!0^336,516!0^336,468!0^336,444!0^372,492!0^372,480!0^372,468!0^372,504!0^372,516!0^300,492!0^300,480!0^300,468!0^300,504!0^300,516!0^312,528!0^324,540!0^348,540!0^360,528!0^360,456!0^348,444!0^324,444!0^312,456!0^324,492!0^324,480!0^324,504!0^348,504!0^348,492!0^348,480");
var lev_cache = new LevelData("cache", "5211521150111150000000240210015031500000000000140100103110000311114001101001011100035000211011010?E011500350000015011010NP011000100000010011010NP015000100000000011010>D010000240000000011010010100000240000000110100B0100000010000000110100N0100000010000000110100N0240000350000000150100N0024003500000000500100C00021150000000000001001000000000000000003010?E000000000000000001010NP000000000000000001010NP000000000000000001010>D00000000000000000101@0100000000000000000101D010000000040000000010B1010000000010001400010>E0100000030100011000100001000000101400150301@0001000000101110103101D000100000010111010110114031000003101110101101111110000315011101011021111500031503115010210000000001150311503140240000000011431114311140|5^84,84!9^744,552,0,0,4,23,1,0,0!9^48,240,0,0,26,21,1,-1,0!9^48,48,0,0,4,8,1,0,0!9^744,432,0,0,25,15,1,-1,0!9^60,144,0,0,25,19,1,-1,0!11^264,372,744,312!1^228,516!1^468,516!1^348,516!3^432,192!3^108,444!12^276,180!12^324,180!12^372,168!12^228,168!12^108,168!12^84,168!6^156,132,2,0,0,0!1^288,468!1^408,468!1^408,396!1^408,300!1^480,324!0^132,84!0^276,84!0^204,84!0^444,36!0^660,36!0^516,36!0^588,36!0^252,204!0^228,204!0^180,204!0^168,204!0^156,204!0^240,204!0^660,372!0^648,372!0^636,372!0^684,468!0^672,468!0^660,468!0^684,516!0^672,516!0^660,516!0^180,324!0^168,324!0^156,324!0^756,228!0^756,216!0^756,204!0^744,228!0^732,228!0^744,216");
var lev_longestyard = new LevelData("longest yard", "001015000000215000000000020100000000100000000000001000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000D000001000000000000000010000010000000000000000E00000100000000000000000000001000000000000000000000?E000000000000000000000CP0000000000000000000001A000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000310000000000000000000001100000000000000000000015000000000000000000000100000000000000000000000000000000?0000000000000000000000C000000000000000000000310000000000000000000GK11|5^72,300!2^372,324,0.707106781186547,-0.707106781186547!2^588,324,-0.707106781186547,-0.707106781186547!2^144,336,0,-1!12^384,396!12^432,408!12^480,408!12^528,408!12^564,396!11^60,564,36,108!9^636,300,0,0,2,4,1,0,0!12^600,576!12^420,576!12^264,576!12^132,576!12^168,540!12^360,516!12^324,468!12^84,432!12^216,504!12^492,480!12^540,528!12^444,528!12^600,432!12^588,492!12^648,516!12^684,420!12^276,408!12^180,432!10^36,36!3^48,384!0^252,180!0^240,180!0^228,180!0^216,180!0^204,180");
var lev_hanger = new LevelData("hanger", "I00000J1110111M0000000F00000000000E000000000000000000000000000000000000000000000000000000000000000D00000D000000000000000010000010000000000000000B00000E0000000000000000000000000000000000000000000000000000000000000000000000D00000000000000000000001000000000000D000000000E0000000000C010000C0000000000000001010000100000000000000G1010000E00000D0000000111010000000000100000000F1010000D00000E00000000010100001000000000000000B010000B00000000000000000E000000000D000000000000000000000010000000000000000000000E000000000000000000000000000000000000000000000000000000000000C00000D000000000000000010000010000000000000000E00000E0000000000000000000000000000000000000000000000000000000000000000000D00000000000H00000K1110111L0000000G|5^36,276!11^396,108,756,276!9^360,228,0,0,13,4,1,-1,0!9^360,216,0,0,19,4,1,0,0!9^432,228,0,0,14,4,1,-1,0!9^432,216,0,0,18,4,1,0,0!9^396,372,0,0,15,4,1,-1,0!9^396,360,0,0,17,4,1,0,0!10^396,276!0^636,156!0^648,156!0^660,156!0^660,144!0^648,144!0^660,132!0^156,156!0^144,156!0^132,156!0^132,144!0^144,144!0^132,132!12^768,432!12^768,480!12^768,528!12^24,432!12^24,480!12^24,528!12^36,576!12^756,576!12^708,576!12^660,576!12^612,576!12^564,576!12^516,576!12^468,576!12^420,576!12^372,576!12^324,576!12^276,576!12^228,576!12^180,576!12^132,576!12^84,576");
var lev_changethechannelmarge = new LevelData("change the channel marge", "9000000000000000000000600000000000000000000000001<0001<0001<0001<000000:=000:=000:=000:=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111000000000019000000000610000000000100000000000100000000001000000000001000000000010000000000010000000000100000000000100000000001000000000001000;0000001000000000001000100000010000000000010001000000100000000000100010000001000000000001000=00000F1000000000000000000000G100000000000000000000001800000000071000000000011111111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011110000111100000000000100100001001000080000001071000010710007|5^396,492!6^396,108,1,0,1,2!11^732,180,252,204!1^324,348!1^420,348!1^492,300!1^492,204!0^324,276!0^324,252!0^324,228!0^492,252!0^420,300!0^420,276!0^420,252!0^324,204!0^276,372!0^276,348!0^276,324!0^276,300!0^276,276!0^492,372!0^420,372!0^420,156!0^708,372!0^732,372!0^756,372!0^84,420!0^84,300!0^84,180!0^84,60!9^276,108,1,0,20,17,1,0,0!9^552,108,1,0,21,17,1,0,0!4^204,570,1!2^696,384,-0.707106781186547,-0.707106781186547!6^84,180,0,0,0,0!6^84,420,1,0,0,2!2^660,576,0,-1!0^300,108!0^324,108!0^348,108!0^252,108!0^228,108!0^372,108!0^396,108!0^420,108!0^444,108!0^468,108!0^708,180!0^756,180!3^732,60!2^576,288,0.707106781186547,-0.707106781186547");
var lev_lucyinthesky = new LevelData("lucy in the sky", "15000211500000250000021500000250000000000000020001400000000000000000000015000000000000000002000000000000000000000000000003400034003400000200000025000250025000000000000000000000000000020000000000000000000000000000000000000000000002000000034000000034000000000000250000003114000200000000000340021150000000000000002500025000000000000000000000000000300000000000000000000001000000034000000000000020014003114003400340000000150021150025002500000000000025000000000000030000000000000000000000000000000000000000000003000000000003400034000000003400000025003114000300025000000000021150000000000340000000025000030000002500000000000000000000000000000000000003000000000000000340000004000000000000002500000314000340034003400000031|5^48,516!11^456,60,96,84!6^156,36,5,1,0,0!6^420,372,5,1,0,2!6^588,252,5,1,0,3!6^372,108,5,1,0,1!2^396,552,0,-1!2^36,372,0.707106781186547,-0.707106781186547!2^756,348,-0.707106781186547,-0.707106781186547!2^756,252,-0.707106781186547,-0.707106781186547!2^756,156,-0.707106781186547,-0.707106781186547!0^720,552!0^672,552!0^624,552!0^576,552!0^528,552!0^480,552!0^432,552!0^360,552!0^312,552!0^264,552!0^216,552!0^168,552!0^120,552!0^72,552!0^576,276!0^600,372!0^720,372!0^456,396!0^456,300!0^648,156!0^600,84!0^456,156!0^288,180!0^168,156!0^168,276!0^168,372!0^312,372!0^336,276");
var lev_pitofdespair = new LevelData("pit of despair", "50001111111111111111111000011111111111111111110000000000000000000021100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000031100001111111111111111111000011111111111111111110000111111111111111111100000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000111111111111111111140001111111111111111111|5^192,504!8^300,468,2!8^84,420,0!8^300,372,2!8^84,300,0!8^300,252,2!8^84,180,0!8^300,132,2!12^312,444!12^312,396!12^72,396!12^72,348!12^72,324!12^312,324!12^312,348!12^312,276!12^72,276!12^72,228!12^72,204!12^312,156!12^312,204!12^312,228!12^72,444!12^384,132!12^384,168!12^384,204!12^384,240!12^384,276!12^384,312!12^384,348!12^384,384!12^384,420!12^384,456!12^384,492!12^720,168!12^720,228!12^720,288!12^720,348!12^720,408!12^720,468!12^720,528!1^468,204!1^612,180!1^588,312!1^504,372!1^636,432!1^540,492!11^432,564,684,564!10^552,156!0^60,108!0^48,108!0^36,108!0^36,96!0^48,96!0^60,96!0^60,84!0^48,84!0^36,84!0^36,72!0^48,72!0^60,72!0^60,60!0^48,60!0^36,60!0^60,48!0^48,48!0^60,36!0^36,48!0^48,36!0^732,108!0^744,108!0^756,108!0^756,96!0^744,96!0^732,96!0^732,84!0^744,84!0^756,84!0^756,72!0^744,72!0^732,72!0^732,60!0^744,60!0^756,60!0^756,48!0^744,48!0^732,48!0^732,36!0^744,36!1^420,420!1^420,300!1^684,252!1^684,372");
var lev_bgarth = new LevelData("bgarth", "00000000000000000000010000000000000000000000B0000000000000000000000000000000000000D000000000000000000000010000000000000000000000100000000000000000000C01000000000000000000001010000000000000000000010100000000000000000000101000000000000000000001010000000000000000000?101H00000000000K111111150111111L0000000000000000I0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000H000000000000J111111140111111M0000000000000>101I00000000000000000001010000000000000000000010100000000000000000000101000000000000000000001010000000000000000000010E000000000000000000001000000000000000000000010000000000000000000000B0000000000000000000000000000000000000000000000000000000C000000000000000000000010|5^744,564!1^396,444!1^396,156!7^564,516,3!7^588,516,3!7^660,468,3!7^684,468,3!7^732,420,3!7^756,420,3!7^588,240,3!7^564,240,3!7^540,240,3!7^276,132,3!7^228,180,3!7^180,228,3!7^132,276,3!7^84,324,3!7^36,372,3!7^84,420,3!7^156,468,3!7^228,516,3!7^300,552,3!7^684,180,3!7^708,180,3!7^732,180,3!7^588,108,3!7^564,108,3!7^540,108,3!0^612,324!0^600,324!0^588,324!0^576,324!0^564,324!0^552,324!0^540,324!0^528,324!0^516,324!0^504,324!0^492,324!0^480,324!9^396,48,0,0,2,23,1,0,0!11^48,564,396,204!3^348,276!3^444,276!3^36,36!3^756,36!0^564,216!0^564,84!0^708,156!0^744,396!0^672,444!0^576,492!0^276,108!0^228,156!0^180,204!0^132,252!0^84,300!0^36,348!0^84,396!0^156,444!0^228,492!0^300,528");
var lev_lamatrice = new LevelData("la matrice", "5000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000100000000000000000000002400000000000000000000001000000000000000000000050000000000000000000000000000000000000000000030000000000000000000000100000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000100000000000000000000002400000000000000000000001000000000000000000000050000000000000000000000000000000000000000000030000000000000000000000100000000000000000000002000000000000000000000000000000000000000000000000000000000000000000?1000000000000000000000CA040000000000000000000100|5^396,540!1^108,492!1^684,492!1^540,492!1^252,492!1^396,492!1^180,396!1^324,396!1^468,396!1^612,396!1^684,300!1^540,300!1^396,300!1^252,300!1^108,300!1^180,204!1^324,204!1^468,204!1^612,204!1^396,108!11^744,564,396,72!9^108,264,0,0,29,23,1,-1,0!9^684,264,0,0,29,23,1,0,0!6^756,300,0,1,0,3!6^36,300,0,1,0,1!6^84,36,1,1,0,0!6^708,36,1,1,0,0!0^540,276!0^612,180!0^468,180!0^324,180!0^180,180!0^252,276!0^396,276!0^180,372!0^324,372!0^468,372!0^612,372!0^684,468!0^540,468!0^396,468!0^252,468!0^108,468!1^252,132!1^540,132!12^540,156!12^252,156!1^60,420!1^732,420!1^732,228!1^60,228!12^60,252!12^60,444!12^732,252!12^732,444");
var lev_superliminal2 = new LevelData("superliminal 2", "900000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;111111111111111<004000190000000000000000010001000:1111=000:1=0001000100000000000000000710001000;11111111111111=000100010000000000000000001000100000000000000000010;0100000000000000000010101000000000000000000101010000000000000000001010100000000000000000010:010000000000000000001000100000000000000000018071000000000000000000:11118000000000000000000000611111111111111<0000000019000001=000061000000001000000000000010000000018001<00001<00100000000:1111111111=0050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000007|5^564,132!11^372,108,588,276!10^384,540!0^468,228!0^444,228!0^420,228!0^396,228!0^372,228!0^348,228!0^324,228!0^300,228!0^300,252!0^300,276!0^300,300!0^324,300!0^348,300!0^372,300!0^396,300!0^420,300!0^444,300!0^468,300!0^468,276!0^468,252!0^444,252!0^420,252!0^396,252!0^372,252!0^348,252!0^324,252!0^324,276!0^348,276!0^372,276!0^396,276!0^420,276!0^444,276!2^444,576,0,-1!2^324,576,0,-1!1^384,456!1^384,336!1^468,396!1^300,396!0^420,324!0^444,324!0^468,324!0^348,324!0^324,324!0^300,324!0^300,348!0^324,348!0^348,348!0^420,348!0^444,348!0^468,348!0^468,372!0^444,372!0^420,372!0^396,372!0^372,372!0^348,372!0^324,372!0^300,372!0^444,396!0^420,396!0^396,396!0^372,396!0^348,396!0^324,396!12^576,456!12^552,384!12^576,312!12^588,228!12^540,228!12^240,408!12^168,252!6^372,156,1,1,0,0!6^396,108,1,1,0,2!6^180,396,1,0,0,1!6^180,276,0,0,0,3!0^588,180!0^576,180!0^564,180!0^552,180!0^540,180!0^204,516!0^192,516!0^180,516!0^168,516!0^156,516!0^612,516!0^600,516!0^588,516!0^576,516!0^564,516");
var lev_lesislotsb = new LevelData("les islots B", "0011111119000000000000600:1111110000000000000700006111100000;<000;11100000:1110000011000111100000061100000:=000:1110000000:180000000000006000000006111<0000000007000000000:11100;<0000;1000000000061100110000:100000000000:=0011000006000000000000000:=00000700000000000000000000;1100000000000000000000:11000000000000000000000060000000000000000000000000000000000000000;<00000000000000000000011000000000000000000000:=000000000000000000000000000800000000000000000000001<0000000000000000;11101=0000000000000000:11109000000000000000000619000000000000000;<0000100000000000000001100001000000000000;<0011000010000000000001100110000100000000;<00110011800010000000011001187111<0010000;<001187111111110010000118711111111111187187|5^36,48!11^660,564,756,60!9^420,60,0,0,21,23,1,-1,0!0^36,252!0^48,252!0^60,252!0^72,252!0^84,252!0^96,252!0^108,252!0^120,252!0^132,252!0^144,252!0^156,252!0^156,264!0^144,264!0^132,264!0^120,264!0^108,264!0^96,264!0^84,264!0^72,264!0^60,264!0^48,264!0^36,264!0^36,276!0^48,276!0^60,276!0^72,276!0^84,276!0^96,276!0^108,276!0^120,276!0^132,276!0^144,276!0^156,276!6^468,564,2,0,1,2!6^420,492,1,0,1,0!1^420,132!1^372,204!1^468,204!1^420,276!1^324,324!1^516,324!9^744,480,0,0,22,23,1,0,0!12^576,444!12^588,324!12^636,228!12^684,132!0^696,336!0^684,336!0^672,336!0^660,336!0^648,336!0^720,240!0^708,240!0^696,240!0^744,144!0^48,564!0^48,540!0^48,552!0^48,528!0^48,516!0^48,492!0^48,504!0^36,504!0^36,528!0^36,552!0^60,552!0^60,528!0^60,504!0^168,564!0^168,552!0^168,540!0^180,552!0^156,552!0^264,564!0^264,552!0^264,540!0^276,552!0^252,552!12^108,360!12^240,384!12^108,480!12^216,528!12^312,504");
var lev_highestheight = new LevelData("highest height", "11MI00000F1I00000F1I00FMI00000000100000001H0000000000000E0000000111M0000000000000000000E0000000CD00000000000000000000011000000000000000000000BE0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CD00000000000000000000011000000CD0000000D000001100000011000000010000011000000110000000E000001100000011000000000000011000000BE0000000000000BE0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000CD00000000000000000000011000000000000000000000BE000000000000000000000000000000000000D00000000000000D0000000111L0LH00000000100000001I00011LH00000G1H00000G1H00G|5^396,516!2^564,576,0,-1!2^228,576,0,-1!2^684,456,0,-1!2^108,456,0,-1!2^444,240,0,-1!2^348,240,0,-1!11^396,84,744,528!9^396,228,0,0,3,23,1,-1,0!9^48,528,0,0,29,23,1,0,0!10^396,300!3^396,132!0^420,420!0^408,420!0^396,420!0^384,420!0^372,420!0^384,408!0^396,408!0^408,408!0^396,396!0^636,84!0^636,72!0^636,60!0^156,84!0^156,72!0^156,60!0^708,444!0^720,444!0^732,444!0^744,444!0^84,444!0^72,444!0^60,444!0^48,444!0^84,252!0^72,252!0^60,252!0^48,252!0^708,252!0^720,252!0^732,252!0^744,252!0^420,228!0^372,228!0^384,228!0^408,228!0^420,216!0^372,216!0^648,84!0^624,84!0^168,84!0^144,84!0^144,72!0^168,72!0^168,60!0^144,60!0^624,72!0^648,72!0^648,60!0^624,60");
var lev_theshaft = new LevelData("the shaft", "00000000000000000000000000000000000000000000000000000000000000000000000011111114004000000000000100000000010000000000001000000000100000000000011111150005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001400000000000000000000011400311111111111000000021111500000000010000000000000031111140100000011111111150002111000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111140004000000000000100000000010000000000001000000000100000000000011111115005000000000000000000000000000000000000000000000000000000000000000000000000000000|5^648,48!4^756,570,1!4^36,570,1!9^144,144,1,0,16,7,1,0,-1!9^648,144,1,0,16,10,1,0,0!9^420,396,1,0,15,14,1,0,-1!9^348,216,1,0,15,18,1,0,0!9^252,420,1,0,15,17,1,0,0!10^648,372!10^144,372!2^540,576,0,-1!2^252,576,0,-1!9^540,420,1,0,15,16,1,0,-1!9^384,570,1,0,15,15,1,0,-1!9^384,534,1,0,15,16,1,0,0!2^60,576,0,-1!2^732,576,0,-1!2^420,444,0.707106781186547,-0.707106781186547!2^348,252,-0.707106781186547,-0.707106781186547!12^120,204!12^168,258!12^168,132!12^672,282!12^624,204!12^672,132!6^660,252,0,0,0,3!6^132,252,1,0,0,3!6^324,324,0,0,2,3!11^384,492,396,216!0^612,84!0^612,72!0^624,72!0^624,84!0^672,84!0^684,84!0^684,72!0^672,72!0^684,324!0^672,324!0^660,324!0^648,324!0^636,324!0^624,324!0^612,324!0^108,324!0^120,324!0^132,324!0^144,324!0^156,324!0^168,324!0^180,324!0^180,84!0^168,84!0^168,72!0^180,72!0^120,84!0^108,84!0^108,72!0^120,72!0^348,84!0^336,84!0^324,84!0^324,72!0^336,72!0^348,72!0^420,84!0^432,84!0^444,84!0^444,72!0^432,72!0^420,72");
var lev_quaddamage = new LevelData("quad damage", "000000000000000000000000000000000000000000000000;1001<000000;1001<0000010000100000010000100000000000000000000000000000000000000000000000000010000100000010000100000:1001=000000:1001=00000000000000000000000000000000000000000000000000000000000000000000000000000000;1001<000000000000<0000100001000000000000100001000010000000000;01000000000000000000001010000000000000000000010100000000000000000000101000010000100000000071010000100001000000000111=0000:1001=00000000000000000000000000000000000000000000000000000000000000000000000000000000;1001<000000;1001<0000010000100000010000100000000000000000000000000000000000000000000000000010000100000010000100000:1001=000000:1001=0000000000000000000000000000000000000000000000000|5^396,504!9^144,144,0,0,15,3,1,-1,0!9^648,144,0,0,16,3,1,-1,0!9^144,432,0,0,17,3,1,-1,0!9^648,432,0,0,18,3,1,-1,0!11^456,84,396,288!10^648,288!10^144,288!0^708,420!0^708,432!0^708,444!0^588,444!0^588,432!0^588,420!0^636,372!0^648,372!0^660,372!0^660,492!0^648,492!0^636,492!0^708,156!0^708,144!0^708,132!0^660,84!0^648,84!0^636,84!0^588,132!0^588,144!0^588,156!0^636,204!0^648,204!0^660,204!0^204,156!0^204,144!0^204,132!0^156,84!0^144,84!0^132,84!0^84,132!0^84,144!0^84,156!0^132,204!0^144,204!0^156,204!0^84,420!0^84,432!0^84,444!0^132,492!0^144,492!0^156,492!0^204,444!0^204,432!0^204,420!0^156,372!0^144,372!0^132,372!0^300,276!0^300,288!0^300,300!0^372,348!0^384,348!0^396,348!0^408,348!0^420,348!0^492,300!0^492,288!0^492,276!0^420,228!0^408,228!0^396,228!0^384,228!0^372,228!2^540,576,0,-1!2^252,576,0,-1!2^36,576,0,-1!2^756,576,0,-1!1^468,468!1^324,468!1^396,396");
var levList0 = new Array();
levList0.push(lev_longjump);
levList0.push(lev_holdit);
levList0.push(lev_dontlookdown);
levList0.push(lev_ditched);
levList0.push(lev_balcon);
_local1.episodeList[10] = new EpisodeData("episode 10", "jimbo", levList0);
var _local3 = new Array();
_local3.push(lev_frogger);
_local3.push(lev_cityscape2);
_local3.push(lev_strata);
_local3.push(lev_mod);
_local3.push(lev_superliminal);
_local1.episodeList[11] = new EpisodeData("episode 11", "raoul", _local3);
var levList2 = new Array();
levList2.push(lev_simpleton);
levList2.push(lev_lesislotsa);
levList2.push(lev_pyramined);
levList2.push(lev_youlldieifyoutry);
levList2.push(lev_lowrise);
_local1.episodeList[12] = new EpisodeData("episode 12", "stuck", levList2);
var levList3 = new Array();
levList3.push(lev_acrophobe);
levList3.push(lev_cloudcity3);
levList3.push(lev_cliffhanger);
levList3.push(lev_crosshairs);
levList3.push(lev_leapoffaith2);
_local1.episodeList[13] = new EpisodeData("episode 13", "wookie", levList3);
var levList4 = new Array();
levList4.push(lev_revolute);
levList4.push(lev_bunker);
levList4.push(lev_foolsgold);
levList4.push(lev_thetwotowers);
levList4.push(lev_industrialzone3);
_local1.episodeList[14] = new EpisodeData("episode 14", "shodan", levList4);
var levList5 = new Array();
levList5.push(lev_artifact3);
levList5.push(lev_hunted2);
levList5.push(lev_crypt);
levList5.push(lev_picturesque);
levList5.push(lev_minedovermadder);
_local1.episodeList[15] = new EpisodeData("episode 15", "legume", levList5);
var levList6 = new Array();
levList6.push(lev_shaftastic);
levList6.push(lev_hallowed);
levList6.push(lev_stimpack);
levList6.push(lev_judgementcall);
levList6.push(lev_ndianajones);
_local1.episodeList[16] = new EpisodeData("episode 16", "doom", levList6);
var levList7 = new Array();
levList7.push(lev_armoury);
levList7.push(lev_timing);
levList7.push(lev_cache);
levList7.push(lev_longestyard);
levList7.push(lev_hanger);
_local1.episodeList[17] = new EpisodeData("episode 17", "bender", levList7);
var _local2 = new Array();
_local2.push(lev_changethechannelmarge);
_local2.push(lev_lucyinthesky);
_local2.push(lev_pitofdespair);
_local2.push(lev_bgarth);
_local2.push(lev_lamatrice);
_local1.episodeList[18] = new EpisodeData("episode 18", "graph", _local2);
var levList9 = new Array();
levList9.push(lev_superliminal2);
levList9.push(lev_lesislotsb);
levList9.push(lev_highestheight);
levList9.push(lev_theshaft);
levList9.push(lev_quaddamage);
_local1.episodeList[19] = new EpisodeData("episode 19", "chirp", levList9);
};
NinjaData.prototype.BuildGameData_Set2 = function () {
var _local1 = this;
var lev_getdown = new LevelData("get down", "00000000001110000000000000000000011=0000000000000000000000000000000000000;<0000000000000000000001100000000000000000000011000000000001<000000001=00000000000110000000000000000000001=00000000000000;1<000000000;0000000000111000000000100000000001110000000001000000000011=00000000010000000000000000000000100001<0000000000000000:000011000000000001<000000001100000000000110000000011000000000001=000000001=0000000000000000;00000000000000000000001000000000011<000000000100000000001110000000001000000000011100000000010000000000:1=000000000:000000000000000001<000000001<00000000000110000000011000000000001=0000000011000000000000000000000:=0000000000000000000000000000000000000000000000000011<000000000000000000001110000000000|5^156,108!11^396,564,396,420!0^612,108!0^636,108!0^660,108!0^672,108!0^648,108!0^624,108!0^348,108!0^372,108!0^396,108!0^420,108!0^444,108!0^492,252!0^516,252!0^540,252!0^300,252!0^276,252!0^252,252!0^60,252!0^48,252!0^36,252!0^36,240!0^48,240!0^60,240!0^732,252!0^744,252!0^756,252!0^756,240!0^744,240!0^732,240!0^636,420!0^612,420!0^588,420!0^156,420!0^180,420!0^204,420");
var lev_nexus = new LevelData("nexus", "5035035000>1A000240240203503500000100000240240350350000001000000240245035000000010000000240203500000000100000000240350000000001000000000245000000000010000000000200000000000100000000000000000000001000000000000000000000C10000000000000000000D01114000000000000000001011MJ40000000000000003502E0024000000000000035000000021M00000H000001000000140000000?11111110000001111111111I000001000000150000000>00000024000000031L0000000000002403D00350000000000000001011LK50000000000000000E011150000000000000000000B10000000000000000000000100000000000000000000001000000000004000000000010000000000324000000000100000000035024000000001000000003504024000000010000000350324024000000100000035035024024000001000003503504024024000?1@0003503503|5^396,300!7^492,252,0!7^300,252,2!7^372,420,1!7^420,420,1!9^420,408,1,0,17,17,0,0,-1!9^372,408,1,0,15,17,0,0,-1!9^312,252,0,0,12,10,0,0,0!9^480,252,0,0,20,10,0,-1,0!4^156,282,1!4^660,282,1!6^516,132,5,1,0,0!4^276,570,1!6^204,444,5,1,0,0!4^516,570,1!6^612,396,5,1,0,0!3^252,324!10^540,324!11^72,276,288,204!11^720,276,504,204!11^336,564,36,396!11^456,564,756,396!0^420,156!0^420,144!0^420,132!0^372,456!0^372,468!0^372,480!0^372,492!0^372,504!0^372,516!0^372,528!0^372,540!0^372,552!0^420,456!0^420,468!0^420,480!0^420,492!0^420,504!0^420,516!0^420,528!0^420,540!0^420,552!0^612,552!0^624,540!0^636,528!0^648,516!0^660,504!0^672,492!0^684,480!0^696,468!0^708,456!0^720,444!0^732,432!0^744,420");
var lev_deku = new LevelData("deku", "00010000;000;0000000000000=0;001000100000000000;000100=000=;00000000G0=000=0000;00100000000>0F;000@000=00=00;000000001G@FQ400?000;0100000000=0A00>H;F@00=0=;00000?000F;00010FA0@G0=00000FH0001030=0;00BFI000000;>000=;>H@01002@0000000100;0010>A0=00?A000000?=00100=00F4000N00000GKJ000=;0000;>000>MLK@000G0000100;010000000000GMQ0000=0010=00G40000GH00G;000000=0000002LHCJ1LK110000G50000;00000000>I0=0;IF5000?A=000000000000010?H00G500@00>EFJ40GH3I=00A;I>000200;0002IFJ>00000=0;000?A01000000>;0;00000100;N00=;000000=0=0;000=00=>000=G0000000001000H0;03@000>0000000;0=00GA01FIA000;0000G00=000;000=;00000=00000000000=000010000000000?0000000;000=0000000000F0000000=0000000000000000000000000000000000000000000000000000000000000|5^156,564!11^564,204,444,564!9^324,36,1,0,18,21,1,0,0!9^300,156,1,0,19,21,1,0,0!9^132,252,0,0,23,2,1,-1,0!9^36,84,0,0,25,10,1,-1,0!6^300,84,0,0,0,0!6^588,156,0,0,0,2!4^696,570,1!12^396,372!12^576,408!12^672,168!12^720,192!12^648,72!12^168,456!12^144,384!12^120,144!12^144,288!12^288,240!12^384,48!0^48,84!0^60,84!0^48,204!0^60,204!0^72,204!0^84,204!0^48,300!0^60,300!0^72,300!0^84,300!0^168,348!0^180,348!0^336,228!0^348,228!0^372,228!0^360,228!0^384,228!0^660,276!0^672,276!0^684,276!0^636,420!0^624,420!0^564,276!0^552,276!0^516,156!0^504,156!0^216,132!0^228,132!0^240,132!0^276,276!0^252,276!0^264,276!0^636,60!0^624,60!0^108,36!0^96,36!0^468,60!0^456,60");
var lev_descent = new LevelData("descent", "5000150000150000015000200001000001000000100000000010000010000001000000000100000100000010000000001000001000000100000000010000010000001000000000P000005000000100000000050000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000010000004000000000000000100000010000000000000001000000100000000000000010000001000000000000000100000010000000040000001400000140000003|5^48,108!12^180,144!12^180,168!12^180,192!12^180,216!12^612,216!12^612,240!12^612,264!12^180,288!12^180,312!12^180,336!12^180,360!12^564,564!12^516,540!12^372,540!12^300,564!12^168,552!12^204,504!12^276,516!12^228,468!12^348,456!12^480,492!12^468,516!12^396,552!12^408,504!12^324,492!0^36,492!0^36,504!0^36,516!0^36,528!0^36,540!0^48,552!0^48,540!0^48,528!0^48,516!0^48,504!0^48,492!0^48,480!0^60,468!0^60,480!0^60,492!0^60,504!0^60,516!0^60,528!0^60,540!0^60,552!0^60,564!0^72,564!0^72,552!0^72,540!0^72,528!0^72,516!0^72,504!0^72,492!0^72,480!0^72,468!0^84,468!0^84,480!0^84,492!0^84,504!0^84,516!0^84,528!0^84,540!0^84,552!0^84,564!11^708,564,636,564!12^624,384!12^600,408!12^540,576!12^564,420!12^588,444!12^540,396!12^228,564!12^168,576!12^396,576");
var lev_surf = new LevelData("surf", "90000011=00000611=00006000000190000007190000000000001<000000:1000000;0000071900000001<00000600000:100000007190000000000001<000000:=000000;0000071900000000000000600000:=00000000000000000000000000000000000000;00000000000000000000006000000000000000000000000000000<00000000<00000;0000007187<07<07100000600000;1111111111=00000000000:90:90:90:9000000;000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000:00000000000000000000000000000000000000000000070000000000;<0000000000:00000000006180000000000000000000001=00000000070000000000;10000000000:00000000006180000000000000000000001=00000000070000000000;10000000000:000000000061800000000008000000000711<000000007|5^744,540!2^432,576,0,-1!2^378,294,0.707106781186547,-0.707106781186547!2^162,366,0.707106781186547,-0.707106781186547!2^558,270,-0.707106781186547,-0.707106781186547!1^240,420!1^276,324!1^204,276!1^252,216!1^492,348!1^420,228!1^516,180!11^60,156,48,372!0^120,564!0^48,564!0^192,564!0^264,564!0^336,564!0^528,564!0^600,564!0^672,564!0^672,276!0^744,276!0^600,276!0^636,252!0^708,252!0^360,132!0^324,180!0^324,252!0^324,324!0^324,396!0^384,348!0^384,204!0^120,372!0^168,156!0^204,132!0^132,132!0^84,348!6^756,252,2,1,0,2!6^396,108,3,1,0,1!6^180,228,2,0,0,0");
var lev_bulbous = new LevelData("bulbous", "90611119061111119000006000:11=00011961100;1<000000000000:=00:=00:1=000000000000000000000000000000000000000;<000000000000000000007110000;<000000000000;1111000011000000000000:111100071=0000000000000611100;19000000000000007111001100000000000000;111100:=00000000000000:11110000000000000000000061100000000000000000000011000;<0000000000000007110001100000000000000;1110001187000000000000:111000:111000000000000006100000060000000000000071000;<000000000000000;1180711000000000000000:1111111000000000000000061906110000000000000000010071=0000000000000000710;19000000000000000;1110110000000000000000:1110:=000000;<000000000611000000000110000000000:=0000;<000110000;<000000000011000118007110000;<0000:=087111111118007118000007|5^744,48!11^552,468,180,564!9^48,84,0,0,25,17,1,0,0!9^720,204,0,0,25,17,1,-1,0!1^588,228!1^492,132!1^372,180!1^204,132!1^492,252!1^300,60!0^576,372!0^564,372!0^552,372!0^456,372!0^360,348!0^348,348!0^336,348!0^240,324!0^36,216!0^36,228!0^36,240!0^60,336!0^756,336!0^756,324!0^756,312!0^756,300!0^756,288!0^396,552!0^492,456!0^492,444!0^492,432!6^564,564,0,0,0,0!6^372,420,0,0,0,2!6^84,156,1,0,0,3!6^516,540,1,0,0,0!0^504,228!0^492,228!0^480,228!0^576,204!0^588,204!0^600,204!0^504,108!0^492,108!0^480,108!0^384,156!0^372,156!0^360,156!0^216,108!0^204,108!0^192,108!0^288,36!0^300,36!0^312,36!0^252,444!0^180,492!0^72,444!0^708,492");
var lev_alienskatepark = new LevelData("alien skatepark", "9000000000000000611900600000000000000000:=000000;<0000;18000000000;0000:=00071111<00000001000000000:9000000<000010000000000000000018007100000000000000000610019000000000000000000:00100000;00<000;87<00000010000068790006119000000=0000001100000:=00000000000000:=0000000000000000000000000000000000000000000000000000000;80000;<0000;<000000000611<0011000011000000000011100110000:=000000000711=0011000000000000000:90000:=000000000000000000000000000;<0000000000000000000001100000;<000000000000079680007118000000<00000:00=000:96=00000010000000000000000000;00100000000000000000071001800000000000000000190061000000000;8000000=000010000;<00061111=000000010000:=0000:19000000000:0000000000000000000;<000080000000000000007118007|5^396,468!2^396,384,0,-1!2^282,270,0.707106781186547,-0.707106781186547!2^510,270,-0.707106781186547,-0.707106781186547!2^636,384,0,-1!2^156,384,0,-1!2^450,510,0.707106781186547,-0.707106781186547!2^342,510,-0.707106781186547,-0.707106781186547!11^396,564,396,84!6^36,300,5,1,0,3!6^588,276,5,1,0,1!6^396,228,3,1,0,2!6^108,444,5,1,0,0!0^396,360!0^396,348!0^396,336!0^300,252!0^312,240!0^324,228!0^492,252!0^480,240!0^468,228!0^636,360!0^636,348!0^636,336!0^468,492!0^480,480!0^492,468!0^324,492!0^312,480!0^300,468!0^156,360!0^156,348!0^156,336!0^384,84!0^384,72!0^396,72!0^408,72!0^408,84");
var lev_greedo = new LevelData("greedo", "50000000000000150000002000000000001001000000000000000000010050000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000040000000003140000000003|5^60,336!7^36,300,3!1^660,228!1^492,228!1^324,228!1^156,228!1^84,180!1^408,180!1^240,180!1^576,180!1^324,132!1^492,132!12^684,540!12^144,552!12^72,492!12^228,420!12^360,360!12^732,360!12^600,408!12^360,480!12^468,540!12^576,492!12^468,468!12^468,372!12^600,336!12^672,408!12^264,516!12^168,444!12^192,360!12^336,552!1^408,516!1^528,516!1^636,516!1^204,516!1^108,516!12^708,468!1^324,444!12^408,576!12^684,576!12^576,576!12^84,576!11^204,564,720,564!11^708,276,48,48!0^144,204!0^156,204!0^168,204!0^168,192!0^168,180!0^156,180!0^144,180!0^144,192!0^72,156!0^84,156!0^96,156!0^96,144!0^96,132!0^84,132!0^72,132!0^72,144!0^252,156!0^240,156!0^228,156!0^228,144!0^228,132!0^240,132!0^252,132!0^252,144!0^336,180!0^324,180!0^312,180!0^312,204!0^324,204!0^336,204!0^336,192!0^312,192!0^312,108!0^324,108!0^336,108!0^336,96!0^336,84!0^324,84!0^312,84!0^312,96!0^396,156!0^408,156!0^420,156!0^420,144!0^420,132!0^408,132!0^396,132!0^396,144!0^504,180!0^492,180!0^480,180!0^504,108!0^492,108!0^480,108!0^480,96!0^480,84!0^492,84!0^504,84!0^504,96!0^504,204!0^504,192!0^480,192!0^492,204!0^564,156!0^576,156!0^588,156!0^588,144!0^588,132!0^576,132!0^564,132!0^564,144!0^672,204!0^672,192!0^672,180!0^660,180!0^648,180!0^648,192!0^648,204!0^660,204!10^744,48!6^588,276,2,1,0,2!6^228,60,2,1,0,0!12^684,276!12^684,252!12^708,252!0^480,204!3^744,156!8^372,180,1!8^444,180,1!8^276,180,1!8^204,180,1!8^540,180,1!8^612,180,1!12^144,576!12^336,576!12^492,564");
var lev_evac = new LevelData("evac", "I000000000000000000000G00000000000000000000000000000000000000000000030000000000000000000000000000C1400000000000000F00000111000000000000000000001110000000000000000000011500000000000000F000001E0000000000000000000001A00000000000000GK00000100000000000000003000001000000000000000000000010000000000000000F00000100000000000000000000001000000000000000020000010000000000000000G00000100000000000000000000001000000000000000000000010000000000000000F000001000000000000000000000010000000000000000G000001@0000000000000000000001D00000000000000000000011400000000000000F000001110000000000000000000011100000000000000200000B1500000000000000000000000000000000000002000000000000000000000000000000000000000000000GH0000000000000000000000|5^396,72!12^48,516!12^132,492!12^240,504!12^432,516!12^420,480!12^300,480!12^156,444!12^96,456!12^504,480!12^600,468!12^660,420!12^708,444!12^708,492!12^648,504!12^540,528!12^372,516!12^240,444!12^180,504!12^336,504!12^468,492!12^564,492!12^636,456!12^744,444!12^768,468!12^24,444!12^204,468!12^72,468!12^360,468!1^636,324!1^156,324!1^228,300!1^564,300!1^300,276!1^492,276!1^396,276!1^348,324!1^444,324!12^756,360!12^708,348!12^732,372!12^696,396!12^96,396!12^48,408!12^36,360!12^48,324!11^396,132,396,192!6^36,300,3,1,0,0!6^612,252,2,1,0,2!6^276,180,2,1,0,0!6^108,36,2,1,0,0!0^636,348!0^564,324!0^492,300!0^444,348!0^348,348!0^396,300!0^300,300!0^228,324!0^156,348");
var lev_ilovegold = new LevelData("i love gold", "0000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000020000000000000000000000000000000000000000000000000000000000000000D0000000000000000000000P0000000000000000000000E00000000000000000000000000300000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000|5^396,480!7^84,516,3!7^108,516,3!7^180,528,3!7^204,528,3!7^708,516,3!7^684,516,3!7^612,540,3!7^588,540,3!7^516,516,3!7^492,516,3!7^276,516,3!7^300,516,3!12^36,576!12^756,576!12^708,576!12^660,576!12^612,576!12^84,576!12^132,576!12^180,576!12^228,576!12^276,576!12^324,576!12^564,576!12^516,576!12^468,576!12^420,576!12^372,576!12^60,552!12^108,552!12^156,552!12^204,552!12^252,552!12^300,552!12^348,552!12^396,552!12^444,552!12^492,552!12^540,552!12^588,552!12^636,552!12^684,552!12^732,552!12^768,552!12^24,552!7^588,444,3!7^612,444,3!7^204,444,3!7^180,444,3!7^372,444,3!7^396,444,3!7^420,444,3!7^732,372,3!7^756,372,3!7^36,372,3!7^60,372,3!7^36,300,3!7^60,300,3!7^732,300,3!7^756,300,3!7^684,228,3!7^660,228,3!7^636,228,3!7^612,228,3!7^588,228,3!7^108,228,3!7^132,228,3!7^156,228,3!7^180,228,3!7^204,228,3!11^396,516,396,132!0^588,420!0^612,420!0^180,420!0^204,420!0^84,492!0^108,492!0^684,492!0^708,492!0^588,516!0^612,516!0^180,504!0^204,504!0^276,492!0^300,492!0^492,492!0^516,492!6^108,60,1,0,1,2!6^684,60,1,0,1,2!0^684,36!0^672,36!0^660,36!0^648,36!0^636,36!0^624,36!0^612,36!0^600,36!0^588,36!0^576,36!0^564,36!0^552,36!0^540,36!0^528,36!0^516,36!0^504,36!0^492,36!0^480,36!0^468,36!0^456,36!0^336,36!0^324,36!0^312,36!0^300,36!0^288,36!0^276,36!0^264,36!0^252,36!0^240,36!0^228,36!0^216,36!0^204,36!0^192,36!0^180,36!0^168,36!0^156,36!0^144,36!0^132,36!0^120,36!0^108,36!0^348,36!0^360,36!0^372,36!0^384,36!0^396,36!0^408,36!0^420,36!0^432,36!0^444,36");
var lev_tunnels = new LevelData("tunnels", "5000100000000000000000000D01000000000000000000401014000000111MQJ40400115011000000J110001010000002100000000101010100000001000000H01010101000000000000001010101010000000000000010M010J0100000003140000100010001000000011100001000100010000000215000010K010L01000000000000001010101010000000000000010101010100000000000000101010101000000031111401010101010000000111111010101010M0000000211115010101010000000000000000101010100000000000000001010M010K0000000000000010100010100000003140000101000101000000011100001010K010100000002150000101010J01000000000000001010100010000000000000010101000100110001000000I01010L010011000100000000101010100024031000000K1100010100002115000000111LOK115000000000000000000000000000000000000000000000000|5^660,108!11^72,60,396,300!9^672,492,0,0,3,4,1,0,0!9^96,420,0,0,3,4,1,-1,0!9^504,420,1,0,1,3,1,0,-1!0^552,132!0^528,132!0^540,120!0^552,120!0^528,120!0^540,132!0^252,132!0^240,132!0^264,132!0^264,120!0^252,120!0^240,120!0^384,132!0^396,132!0^408,132!0^408,120!0^384,120!0^396,120!0^696,300!0^708,300!0^708,288!0^696,288!0^96,300!0^84,300!0^84,288!0^96,288!0^756,564!0^732,564!0^708,564!0^684,564!0^660,564!0^636,564!0^612,564!0^588,564!0^564,564!0^540,564!0^516,564!0^492,564!0^468,564!0^444,564!0^396,564!0^372,564!0^348,564!0^324,564!0^300,564!0^276,564!0^252,564!0^228,564!0^204,564!0^180,564!0^156,564!0^132,564!0^108,564!0^84,564!0^60,564!0^36,564!0^420,564!8^468,396,2!8^132,444,0!8^108,492,0!6^492,540,5,1,0,0!6^348,228,0,0,1,3");
var lev_spelunking = new LevelData("spelunking", "0000000000015000B1150020000000000K1L0000110000000000000002E0000F14000000>40000000000000F1400000G1MI00000000000021000001E00000000000000010000JE00000?400000000K100000000000110000000K15000000000031A00000001100000000000E240000KD31A0000000000000E000C111E00000000000000000021500000000000000000000?1000340000000000000000J1400B110000000000000000JE000>1000000000000000000000G100000000000000000000J1M00000000CL00000000000100000000011D000000000G100000000K111M00000000B1000000031A01H000000000100000001100>E0000000K1E0000000JI0000000000015000000000000000000000M000300000000000000000000311000000000000000000K11110000000000000000000021100000000000000000000?110000@3L0000000400000C110000111M00000C1L0000J11000K11100000G111L000011|5^156,72!6^420,228,0,0,2,3!4^228,570,1!2^156,504,0,-1!2^588,456,0,-1!11^720,108,384,564!0^60,492!0^60,504!0^60,516!0^60,528!0^60,540!0^48,540!0^36,540!0^36,528!0^36,516!0^48,516!0^48,528!0^48,504!0^72,504!0^84,516!0^72,516!0^72,528!0^72,540!0^84,540!0^84,528!0^96,528!0^96,540!0^108,528!0^108,540!0^276,252!0^516,228!0^516,216!0^540,240!0^540,228!0^540,216!0^540,204!0^528,216!0^528,228!0^528,204!0^756,204!0^756,216!0^756,228!0^756,240!0^756,252!0^756,264!0^756,276!0^756,288!0^756,300!0^756,312!0^756,516!0^756,492!0^756,468!0^756,444!0^660,492!0^660,468!0^384,504!0^456,492!0^516,492!0^312,360!0^228,444!0^36,396!0^36,384!0^36,372!0^36,360!0^36,348!0^48,336!0^48,408!0^216,228!0^468,180");
var lev_sumo = new LevelData("sumo", "0N1A00000000000000000000NE000000000000000000000>A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000404000000000000000000001010000000000000000000010140000000000000000000|5^396,516!2^372,576,0,-1!2^396,576,0,-1!2^420,576,0,-1!1^468,396!1^324,396!1^636,348!1^156,348!1^396,228!1^252,276!1^540,276!1^708,228!1^84,228!1^252,156!1^540,156!1^396,84!1^660,108!1^132,108!12^444,564!12^492,564!12^348,564!12^300,564!12^252,564!12^540,564!12^588,564!12^636,564!12^684,564!12^732,564!12^204,564!12^156,564!12^108,564!12^60,564!12^36,540!12^756,540!12^468,516!12^324,516!12^516,492!12^564,468!12^276,492!12^228,468!12^612,444!12^660,420!12^708,420!12^744,444!12^768,480!12^768,516!12^180,444!12^132,420!12^84,420!12^48,444!12^24,480!12^24,516!1^684,492!1^612,540!1^108,492!1^228,540!11^48,48,756,60!9^684,456,0,0,30,2,1,-1,0!9^108,456,0,0,30,2,1,0,0!0^636,324!0^708,204!0^468,372!0^324,372!0^156,324!0^84,204!0^396,60!0^396,48!0^396,36!6^756,180,2,1,0,1!6^36,324,2,1,0,3");
var lev_faces = new LevelData("faces", "9000000000000000000000600000000000000000;<000000000000000000000:=0;<000000;11<00000000000110000001961000000000001100000018710000000000011000000:11=0000000000011000000000000000000;<0:=000000000000000000:=00000000000000000000000000000;111<00;1111111111110001900000190006190000000010000001000001000000700100;100100;00100000;100100:=00100=00100000:1001000000100000100;<006001000000100000100:=00700100;<00100<00100000;100100:100100:00100000:1001000000100000100000060018000071800071800000700:111111110001111111110000000000000000000000600000000000000000;<000000000000000;1<000:=0;<000000000000611000000110000000000000110000001100000000000071100000011000000000000:1=000;<0:=000000000000000000:=000080000000000000000000007|5^660,468!2^660,312,0,-1!2^72,432,0,-1!2^216,432,0,-1!6^396,516,1,0,1,0!9^408,276,0,0,11,23,1,-1,0!9^408,108,0,0,11,23,1,0,0!11^144,132,504,552!6^324,372,3,0,2,0!6^468,204,1,0,0,0!6^348,204,0,0,0,2!6^324,156,3,0,0,1!10^144,468!0^216,396!0^216,384!0^216,372!0^216,360!0^216,348!0^72,396!0^72,384!0^72,372!0^72,360!0^72,348!0^396,540!0^408,540!0^420,540!0^420,552!0^408,552!0^396,552!0^396,564!0^408,564!0^420,564!12^408,204!12^408,180");
var lev_pity = new LevelData("pity", "0FJ1111000000000000010>000FJ11400000000000010000000FJ1400010000000E000000000FJ40000000000000000000000240000000000000000000000240000D00000000000000000240001000000000000000000240?10000000000000000000211100000000000000000000B1140000000000000000000>11100000000000000000000B1100000000000000000000>11000000000000000000000B5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000C400000000000000000000?1100000000000000000000C110000000000000000000?1110000?00000000000000C1150000C0000000000000315000003100000000000031500000311000000000003150000?1111000000000031E00000C1E0>000000000311A0000011A000000000GK111000000B100000000GK1111100000000000000GK1111111000000C10000GK11111111140000311@0?|5^660,444!6^84,348,1,0,1,0!11^672,564,180,396!0^36,204!0^36,216!0^36,228!0^36,240!0^36,252!0^36,264!0^36,276!0^48,276!0^60,276!0^72,276!0^84,276!0^96,276!0^108,276!0^96,264!0^108,264!0^96,252!0^84,240!0^72,228!0^60,216!0^48,204!0^48,216!0^48,228!0^48,240!0^48,252!0^48,264!0^60,264!0^72,264!0^84,264!0^84,252!0^72,240!0^60,228!0^60,240!0^60,252!0^72,252!0^36,540!0^36,552!0^48,552!0^48,540!0^60,540!0^60,552!0^60,564!0^48,564!9^756,36,1,0,29,20,1,0,0!9^36,36,1,0,29,20,1,0,-1!2^396,576,0,-1!1^444,516!1^348,516!1^396,360!1^396,264!1^396,168!1^492,132!1^300,132!1^540,252!1^252,252!1^612,180!1^180,180!0^492,108!0^492,96!0^492,84!0^492,72!0^492,60!0^492,48!0^492,36!0^300,108!0^300,96!0^300,84!0^300,72!0^300,60!0^300,48!0^300,36!0^396,144!0^396,132!0^396,120!0^396,108!0^396,96!0^396,84!0^396,72!0^396,60!0^396,48!0^396,36!10^396,216!3^180,36!3^612,36");
var lev_unsuperimpossible = new LevelData("unsuperimpossible", "000150000000000000000020000000000000000000000000000000000000000000000000140000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000300011000000000000000GK1000110000000000000001110001100000000000000015240011000000000000000B001001100000000000000000050011000000000000000C00000110000000000000001430001100000000000000011100011000000000000000FJ10001100000000000000000200011000000000000000000000110000000000000000000001100000000000000000000011000000000000000000000110000000000000000000001100000000000000000000015000000000000000000000000000000000000000000000000000000000000000000014000000000000000003|5^396,84!12^24,156!12^24,204!12^24,252!12^24,300!12^24,348!12^24,396!12^768,156!12^768,204!12^768,252!12^768,300!12^768,348!12^768,396!12^768,540!12^24,540!11^396,564,756,84!9^36,84,1,0,16,21,1,0,0!10^396,156!6^156,36,5,1,0,0!6^540,36,5,1,0,2!6^612,84,5,1,0,0!6^108,84,5,1,0,2!0^468,420!0^456,420!0^444,420!0^432,420!0^432,408!0^444,408!0^456,408!0^468,408!0^468,432!0^456,432!0^444,432!0^432,432!0^360,432!0^348,432!0^336,432!0^324,432!0^324,420!0^336,420!0^348,420!0^360,420!0^360,408!0^348,408!0^336,408!0^324,408");
var lev_npunzel = new LevelData("n-punzel", "1A000000000000000000000I00000000000000000140000000000000000000000111100000000000000000011000000000000000000000010000000000000000000001100000000000000000000001110000000000000000000150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000H00000000000000000000001@00000000000000000000011E0C000000000000000000A000100000000000000000000001000000000000000000@00?1000000000000000000|5^204,528!7^660,156,3!7^684,156,2!7^684,180,2!7^684,204,2!7^684,228,2!7^684,252,2!7^684,276,2!7^684,300,2!7^684,324,2!7^684,348,2!7^684,372,2!7^684,396,2!7^684,420,2!7^684,444,2!7^684,468,2!7^684,492,2!0^708,180!0^732,192!0^708,204!0^732,216!0^708,228!0^732,240!0^708,252!0^732,264!0^708,276!0^732,288!0^708,300!0^732,312!0^708,324!0^732,336!0^708,348!0^732,360!0^708,372!0^732,384!0^708,396!0^732,408!0^708,420!0^732,432!0^708,444!0^732,456!0^708,468!0^732,480!0^708,492!0^732,504!9^132,396,0,0,7,23,1,0,0!11^132,564,732,108!2^540,576,0,-1!2^348,576,0,-1!1^444,444!1^444,324!1^444,204!1^444,84!1^516,264!1^516,384!1^516,144!1^372,144!1^372,264!1^372,384!6^60,228,5,1,0,0!6^84,300,5,1,0,0!3^636,60!6^36,156,5,1,0,0");
var lev_lab = new LevelData("lab", "00011502110001150211010000210001500021000150100000000000000000000001000000000000000000000020000000000000000000000000000000000014000000000000000000000110000000000000000000000000000011000000000000000000000210000000000000000000000000000000000000000000000000000100000000000001000000031000000000000014000000150000000000000210000001000000000000000100000010000000000000001000000100000000000000010000001400000000000003100000021000000000000015000000010000000000000100000000000000000000000000000000000000000000000000000000000000000000031000000000000000000000110000000000000110000000000000000000001500000000000000000000000000000003000000000000000000000010000000000000000000000100003100014000310001401000011403110001140311010|5^48,564!1^180,180!1^612,180!1^612,420!1^180,420!1^300,300!1^492,300!1^396,252!1^540,204!1^252,204!1^300,384!1^492,384!11^744,564,396,84!9^744,420,0,0,27,23,1,-1,0!9^48,420,0,0,27,23,1,0,0!9^48,180,0,0,28,23,1,0,0!9^744,180,0,0,29,23,1,0,0!0^756,324!0^756,312!0^756,300!0^756,288!0^756,276!0^36,276!0^36,288!0^36,300!0^36,312!0^36,324!0^36,84!0^36,72!0^36,60!0^36,48!0^36,36!0^756,36!0^756,48!0^756,60!0^756,72!0^756,84!2^372,480,0,-1!2^420,480,0,-1!2^732,108,-0.707106781186547,-0.707106781186547!2^60,108,0.707106781186547,-0.707106781186547!2^60,348,0.707106781186547,-0.707106781186547!2^732,348,-0.707106781186547,-0.707106781186547!10^396,144");
var lev_sarlac = new LevelData("sarlac", "14000011111110000000000211100111111100000031100150001111111000001150001000021111110000311H000000000011111000015F0000000000011111000350000000000000211110311H00000000000000002101E0000000000000000000101MI0000000000000000001014000000000000000000011A00000000000000000000110000000000000000000001A000000000000000000000I0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000H00000000000000P00000001@0000000000000P000000011I000000000000D000000011@0000000000001000000011D0000000000001000000311140000000000310000035021D000000000015000035000114?00000000200000100001111I0000000000000100000021@0000000000000100000002P0?00000000000100000000D0C00000000000100100000Q014000000000000014000007111|5^564,108!9^732,564,0,0,2,23,1,0,0!9^252,348,0,0,30,20,1,-1,0!9^612,348,1,0,31,10,1,0,-1!11^60,156,396,396!1^396,468!1^516,516!1^276,516!0^504,384!0^552,420!0^600,432!0^612,480!0^660,504!0^672,552!0^612,564!0^360,528!0^408,504!0^480,456!0^552,504!0^492,540!0^312,468!0^348,396!0^300,384!0^276,408!0^216,456!0^156,468!0^132,528!0^180,528!0^216,552!0^252,492!0^444,420!0^444,360!0^384,348!0^732,300!0^744,300!0^756,300!0^756,288!0^744,288!0^732,288!0^732,276!0^744,276!0^756,276!0^720,444!0^708,444!0^708,432!0^720,432!0^78,444!0^90,444!0^90,432!0^78,432!0^138,420!0^126,420!0^126,408!0^138,408!0^198,354!0^210,354!0^210,342!0^198,342!0^222,354!0^234,354!0^234,342!0^222,342!12^240,408!12^522,378!12^588,420!12^648,468!12^684,540!12^456,504!12^312,528!12^348,432!12^156,504!12^468,372!12^276,372!12^204,432!8^372,468,2!8^420,468,0!8^276,540,2!6^108,348,0,1,0,2!1^396,204!9^744,492,0,0,4,1,1,0,0!9^756,264,1,0,1,4,1,0,0!6^36,108,5,1,0,1!6^84,36,5,1,0,0!2^588,276,-0.707106781186547,-0.707106781186547!6^564,540,2,1,0,0!8^276,564,0");
var lev_chooseyourown = new LevelData("choose your own", "500001111111500001500020000021111110000010000000000000002100000000000000000000001000000000000000030000010000010000040000100000100003100000100001140311111011L0K11100001110111111011M0J11000001500021000021000001000010000010000010000010000100000100000100000100001000001000001000000000010000010000010000010000100000214000100000100001110140011101L0K11100001150114011101M0J1110000100002111000100002000001000001110001000001000010000002100010000010000100000005000100000100001000000000001000000000010000040000010000010000140000100003100003100001114031111111L0K11500001111111111111M0J11000001500021500021000020000010000010000010000000000100000000000100000000005000000000001000000000000000010000000000040000000000140000000000|5^492,540!11^384,324,360,288!8^444,36,1!8^324,36,1!4^384,138,1!12^168,372!12^168,324!12^216,372!12^216,324!12^360,372!12^360,396!12^408,396!12^408,372!12^576,396!12^576,324!12^432,360!12^456,360!12^348,348!12^276,312!12^312,312!12^240,312!12^492,348!12^564,420!8^540,36,1!8^228,36,1!3^36,96!6^252,420,2,1,0,3!6^36,420,3,1,0,0!6^156,564,3,1,0,3!2^744,576,0,-1!2^696,432,0,-1!2^756,288,0,-1!12^324,564!12^252,564!12^288,552!0^276,396!0^288,396!0^300,396!0^300,384!0^288,384!0^276,384!0^276,372!0^288,372!0^300,372!0^300,360!0^288,360!0^276,360!0^444,396!0^456,396!0^480,396!0^492,396!0^504,396!0^516,396!0^528,396!0^540,276!0^552,276!0^564,276!0^564,264!0^552,264!0^540,264!0^432,276!0^420,264!0^420,252!0^444,276!0^444,264!0^444,252!0^432,252!0^432,264!0^492,324!0^480,324!0^468,312!0^468,300!0^480,312!0^480,300!0^492,312!0^492,300!0^444,408!0^456,408!0^468,396!0^468,408!0^480,408!0^492,408!0^504,408!0^516,408!0^528,408!9^288,480,0,0,8,20,1,-1,0!9^384,60,0,0,8,9,1,0,0!9^384,108,0,0,8,9,1,-1,0!9^156,348,0,0,15,17,1,-1,0!9^228,348,0,0,16,17,1,0,0!8^636,372,0!8^636,228,0!8^636,540,0!2^96,576,0,-1!12^156,276!12^156,180!12^132,180!12^132,276!7^372,228,2");
var lev_pathmatics = new LevelData("pathmatics", "11111111111111111111111000000000000000000000000000000031111111111140000000000111111111111100000000002111111111115000000000000000000000000000000031111111111111400000000111111111111111000000002111111111111150000000000000000000000000000031111111111111114000000111111111111111110000002111111111111111500000000000000000000000000031111111111111111140000111111111111111111100002111111111111111115000000000000000000000000000311111111111111111400001150111111111111111000021001502111111111150000000310000000000000000003111140311111400114000011111111111111101110000211111111502111011500000000000000001150210000031111111140311000140000111111111111114031100002111111111111111115000000000000000000000000011111111111111111111111|5^684,48!9^540,228,1,0,26,4,1,0,-1!9^636,324,0,0,24,18,1,-1,0!9^660,444,1,0,22,4,1,0,-1!9^156,372,1,0,22,11,1,0,-1!9^444,300,1,0,22,4,1,0,0!9^348,324,1,0,26,11,1,0,0!9^252,348,1,0,22,15,1,0,0!9^60,396,0,0,25,18,1,0,0!11^504,156,636,516!6^612,564,2,1,0,2!6^252,492,3,1,0,3!6^444,108,3,1,0,1!0^300,540!0^396,540!0^492,540!0^204,540!0^108,540!0^108,204!0^120,204!0^96,204!0^96,192!0^108,192!0^120,192!0^192,156!0^204,156!0^216,156!0^216,144!0^204,144!0^192,144!0^288,108!0^300,108!0^312,108!0^312,96!0^300,96!0^288,96!0^504,540!0^480,540!0^408,540!0^384,540!0^312,540!0^288,540!0^216,540!0^192,540!0^120,540!0^96,540!0^636,348!0^648,348!0^660,336!0^624,348!0^612,336!0^612,324!0^660,324!0^564,240!0^564,228!0^564,216!0^552,204!0^540,204!0^528,204!0^516,216!0^516,228!0^516,240!0^648,420!0^660,420!0^672,420!0^684,432!0^684,444!0^684,456!0^672,468!0^660,468!0^648,468!0^660,312!0^612,312!6^540,300,5,1,0,1!6^636,228,4,1,0,3");
var lev_viaduct = new LevelData("viaduct", "11115000000000000>11111A0B100001@00000000B111100>100002D00000000>1111000B@0000B@00000000B111000>D0000>D00000000>1110000B@0000B@00000000B110000>D0000>D00000000>1100000B@0000B@00000000B100000>D0000>D00000000>1000000B@0000B@00000000B000000>D0000>D00000000>0000000B@0000B@000000000000000>D0000>D0000000000000000B@0000B@000000000000000>D0000>D000000?0000000001000001000000C000000000100000100000?1000000000100000100000C100000000010000?E0000?1100000000?E0000CA0000C1000000000CA000?E0000?1100000000?E0000CA0000C5000000000CA000?E0000?1000000000?E0000CA0000C1000000000CA000?E0000?1100000000?10000CA0000C5000000000C1000?10000?1000000000311400C10000C100000111011110?1100031500000111000000N1100011000000111400000C1140000000000|5^60,48!11^504,564,684,468!9^324,492,0,0,21,23,1,0,0!9^432,288,1,0,1,9,1,0,-1!9^432,60,0,0,29,4,1,-1,0!1^432,144!1^360,168!1^504,168!1^276,420!9^180,360,1,0,31,16,1,0,-1!12^144,120!12^240,168!12^360,228!12^576,192!12^648,156!12^672,276!12^576,324!12^480,372!12^336,360!12^264,324!12^192,288!12^120,252!12^48,456!12^120,492!12^192,528!12^264,564!12^324,576!12^384,564!12^456,528!12^528,492!12^600,456!12^672,420!0^480,408!0^504,396!0^528,384!0^552,372!0^576,360!0^600,348!0^624,336!0^648,324!0^456,420!0^432,420!0^408,420!0^384,420!0^360,408!0^336,396!0^312,384!0^288,372!0^264,360!0^240,348!0^216,336!0^192,324!0^168,312!0^144,300!0^120,288!0^96,276!0^72,264!0^48,252!12^588,228!12^504,264!12^360,264!12^264,216!12^168,168!12^96,384!12^240,468!12^408,480!12^480,444!12^552,408!12^624,372!12^168,420!1^204,480!3^684,36!3^48,144!12^756,564!12^732,564!12^708,564!12^684,564!12^756,540!12^756,516!12^732,516!12^732,540!12^708,540!12^684,540!12^708,516!12^684,516!12^660,540!12^660,564!12^636,564!6^252,372,2,1,0,0!6^516,420,2,1,0,0!6^300,516,2,1,0,3");
var lev_hideandseek = new LevelData("hide and seek", "50000000000000000002111000000000000000000002110000000000000000000002100000000000000000000002000000000000000000000000000000000000000114000000000000000000001110000000000000000000011100000000000000000000111000000000000000000001150000000000000000000000000000000000000000000000000000000000000000000000000000000001140000000000000000000011100000000000000000000111000000000000000000001110000000000000000000011500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001140000000000000000000011100000000000000000000111000000000000000000001110000000000000000000011500000000000000000000000000000000000000000000000003000000000000000000000310000000000000000000031140000000000000000003111|5^396,492!1^684,276!1^684,156!1^108,276!1^108,156!1^396,420!1^324,516!1^468,516!11^396,204,396,324!0^540,396!0^552,396!0^564,396!0^576,396!0^588,396!0^600,396!0^612,396!0^624,396!0^636,396!0^252,396!0^240,396!0^228,396!0^216,396!0^204,396!0^192,396!0^180,396!0^168,396!0^156,396!12^468,420!12^324,420!12^276,228!12^516,228!12^588,228!12^204,228!12^648,252!12^144,252!12^348,156!12^372,156!12^396,156!12^420,156!12^444,156!1^348,120!1^444,120!1^396,120!6^348,180,2,0,1,0!6^108,372,2,1,0,0!6^300,156,3,1,0,1!6^708,108,3,1,0,1");
var lev_leapoffaith = new LevelData("leap of faith", "5000619000000000000000200000E0000000000000000000000P0000000000000000000000P0000000000000000000000A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000010000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000010000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000007|5^36,60!12^132,168!12^132,204!12^132,240!12^132,276!12^132,312!12^132,348!12^132,384!12^132,420!12^132,456!12^132,492!12^132,528!10^492,540!3^276,540!2^324,576,0,-1!2^348,576,0,-1!2^372,576,0,-1!2^396,576,0,-1!2^420,576,0,-1!2^444,576,0,-1!1^84,528!1^84,456!1^84,384!1^84,312!1^84,240!11^636,564,84,204");
var lev_pitcherplant = new LevelData("pitcher plant", "00000021500021500000000000000000000000000000000000000000000000000000000000000000000000000000000001400100000000004000000011001400003003010000003MI002111111401010000035000000000FJ11111000035000000000000FJ1110003E000000000000000FJ10011A000000000000000002401E0000000000000000000B11A0000000000000000000N1000000000000000000000>1000000000000000000000020000000000000000000000000000000000000000000003000000000000000000000?11@0000000000000000000N11D0000000000000000000C111@0000000000000000035002D000000000000000GK5000024000000000000GK1500000024000000000GK111000000002LH0031111115010000000001100150000200100004040015001000000005000010100000000000000000000101000000000000000000001010000000000000000000010100031400031400000000|5^252,540!2^156,396,-0.707106781186547,-0.707106781186547!2^636,396,0.707106781186547,-0.707106781186547!2^756,180,-0.707106781186547,-0.707106781186547!2^36,180,0.707106781186547,-0.707106781186547!2^84,576,0,-1!2^708,576,0,-1!2^396,576,0,-1!2^468,540,0,-1!2^324,540,0,-1!2^276,516,0.707106781186547,-0.707106781186547!2^516,516,-0.707106781186547,-0.707106781186547!2^612,252,-0.707106781186547,-0.707106781186547!2^180,252,0.707106781186547,-0.707106781186547!1^396,252!1^348,324!1^444,324!1^420,492!1^372,492!1^276,420!1^516,420!1^540,348!1^252,348!1^396,108!1^300,204!1^492,204!12^372,420!12^540,264!12^576,156!12^324,72!12^288,264!12^216,372!12^348,216!12^444,156!12^264,132!12^492,444!10^396,36!2^588,108,0.707106781186547,-0.707106781186547!9^396,456,0,0,6,20,1,-1,0!9^396,180,0,0,28,2,1,-1,0!9^528,564,0,0,28,2,1,0,0!9^396,324,0,0,29,2,1,0,0!11^168,492,744,60!0^132,132!0^144,132!0^156,132!0^168,132!0^180,120!0^192,108!0^204,96!0^216,84!0^228,72!0^240,60!0^252,48!0^252,36!0^240,36!0^228,36!0^240,48!0^228,48!0^228,60!0^216,72!0^204,84!0^192,96!0^180,108!0^168,120!0^156,120!0^144,120!0^132,120!0^660,444!0^648,444!0^636,444!0^624,444!0^612,444!4^756,570,1!12^588,516!12^636,516");
var lev_deepfreeze = new LevelData("deepfreeze", "11MI000000000000000FJ1115000000000000000000021E000000000000000000000BA000000000000000000000>00000000000000000000000000000K@00000000000000?0000001D00000000000000C000000B1@000000000000?1000000>1D000000000000C10000000B1@0000000000?110000000>1D0000000000C11000?@000214000000003MQJ000CD000021400000035000003114000021LH00GK5000000B111H0000FJ111150000000N1111000000000000000000C111I0000GK1111400000002115000031MI00FJ40000000BE000031500000024000000>A000315000000002LOK0000000?1E0000000000B110000000C1A0000000000>11000000?1E000000000000B1000000C1A000000000000>10000001E00000000000000B000000JA00000000000000>00000000000000000000000@000000000000000000000?D000000000000000000000C1400000000000000000003111LH000000000000000GK11|5^396,60!3^444,384!3^348,384!1^396,480!11^396,564,396,456!1^708,276!1^660,348!1^612,420!1^660,492!1^132,492!1^84,420!1^180,420!1^132,348!1^84,276!1^708,420!9^276,348,1,0,16,14,1,0,-1!9^516,348,1,0,16,15,1,0,-1!9^156,216,1,0,16,16,1,0,-1!9^636,216,1,0,16,17,1,0,-1!0^504,276!0^492,288!0^480,300!0^468,312!0^480,312!0^492,300!0^504,288!0^504,300!0^492,312!0^324,312!0^312,300!0^300,288!0^288,276!0^288,288!0^300,300!0^312,312!0^300,312!0^288,300!2^468,468,0.707106781186547,-0.707106781186547!2^324,468,-0.707106781186547,-0.707106781186547!2^444,276,-0.707106781186547,-0.707106781186547!2^348,276,0.707106781186547,-0.707106781186547!0^372,252!0^384,240!0^420,252!0^408,240!0^396,228");
var lev_slipperyslope = new LevelData("slippery slope", "50000000000000000021111000000000000000000000000000000000000000003114000000000000000000011110000000000000000031111500000000000000002111110000000000000000000111100000000000000000002111000000000000000000000114000000000000000000002110000000000000000000001100000000000000000000311000000000000000000001110000000000000000003111500000000000000000011110000000000000000031111100000000000000000111115000000000000000311150000000000000000001115000000000000000003111100000000000000000011111000000300000000031111110000001000000000111111500000020000000311111500000000000000001115000000000000000003111100000000000000000011111000000000000000031111110000000000000000111111100031140000010311111115000111100003101111111100001111400111|5^108,420!9^372,420,0,0,10,23,1,-1,0!9^468,324,0,0,11,23,1,-1,0!9^564,228,0,0,12,23,1,-1,0!9^660,132,0,0,13,23,1,-1,0!9^180,420,0,0,13,23,1,0,0!11^744,324,756,36!10^468,444!2^672,576,0,-1!10^624,288!0^756,492!0^756,480!0^756,468!0^756,456!0^744,444!0^732,444!0^732,516!0^732,528!0^720,540!0^708,540!0^732,504!0^732,492!0^744,492!0^720,444!0^708,432!0^696,420!0^696,528!0^696,516!0^696,504!0^696,492!0^696,480!0^696,468!0^696,456!0^696,444!0^696,432!0^714,522!0^714,510!0^714,498!0^714,486!0^714,474!0^714,462!0^726,462!0^738,462!0^738,474!0^726,474!0^708,444!0^696,540!0^708,84!0^612,180!0^516,276!0^420,372!0^324,468!0^228,468!0^276,492!3^48,48!3^216,432!2^564,564,0.707106781186547,-0.707106781186547!1^468,180!1^564,84!1^372,276!1^276,372!2^420,384,0,-1!2^324,480,0,-1!2^516,288,0,-1!2^618,186,-0.707106781186547,-0.707106781186547!2^714,90,-0.707106781186547,-0.707106781186547");
var lev_barehunting = new LevelData("bare hunting", "50000000000100000000000000000000001000000000000000000000000000000000000001000000000000000000000010000000000001000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000001000000000001000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000100000000000010000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000001000000000000000000000000000000000000000000000000000100004001000000000000001000011010000000000000000000100100000000000000000001001000000000000000000011114000000000000000000|5^264,540!6^84,180,5,0,1,1!6^396,372,5,0,1,3!6^588,228,5,1,0,2!6^36,324,5,1,0,0!0^636,444!0^648,444!0^660,444!0^276,492!0^264,492!0^252,492!0^156,420!0^144,420!0^132,420!0^396,372!0^408,372!0^420,372!0^564,300!0^576,300!0^588,300!0^468,132!0^456,132!0^444,132!0^324,228!0^312,228!0^300,228!0^60,276!0^48,276!0^36,276!0^108,108!0^120,108!0^132,108!12^732,576!12^60,576!12^132,576!12^660,576!12^588,576!12^516,576!12^204,576!12^444,576!12^372,576!11^720,84,36,564!9^756,564,0,0,28,3,1,-1,0!0^168,564!0^96,564!0^408,564!0^480,564!0^552,564!0^624,564!0^696,564!0^468,120!0^456,120!0^444,120!0^132,96!0^120,96!0^108,96!0^300,216!0^312,216!0^324,216!0^60,264!0^48,264!0^36,264");
var lev_rocketrun = new LevelData("rocket run", "500000000000000000000020000000000311400000000000031111111111111111400400111111111111111111001001500000000000002110010310000000000000001100101100311111111140011401011001111111111100111050110011500000211002110001100210000000150001500011000100110001000010000210031001500014000100000100110000010110031000001001100000101100110000010011000001O1500110000000011000002110001500000000110000000100010030001001100000000000100100310011000000000001002001100210014000100014004011000100110001400110010110031000000011001100101100114000003114021001011001111111111110010050110021111111111500100002100000000000000001000001400000000000000310000011111111111111111100000211111111111111115004000000215000002115000014000000000000000000003|5^444,516!10^312,312!10^480,312!10^516,144!10^276,144!10^672,60!10^72,60!10^276,456!2^456,480,0,-1!11^348,372,504,252!9^288,252,0,0,13,15,1,-1,0!0^588,492!0^600,492!0^612,492!0^624,492!0^636,492!0^732,372!0^732,360!0^732,348!0^732,336!0^732,324!0^732,312!0^732,300!0^732,288!0^732,276!0^60,252!0^60,240!0^60,228!0^60,216!0^60,204!0^60,192!0^60,180!0^60,168!0^60,156!0^60,144!0^60,132!0^300,492!0^288,492!0^276,492!0^264,492!0^252,492");
var lev_auxterminal = new LevelData("aux terminal", "1015000002110011111150250100000001500111111000005000000010000002150000000001000000000000000000000010000000000000000000000140000001100000000B4000211100001500000000>1000000000001000000000014000000000000000000000111400000000000000000000000001100000000000000000000015000000000004000000000000000400003010004000000000001000010100010031400000314003501000111111000001111110010001002150000021500240100050000000000010000111000000000000000500002110000000001400000000000000000000011000000000000000111500000000000000000001500000000000000000000?1000000000001000000000C500031110000140000000000000150000001100000000000001000000000000000000000010000000000000000004000000010000003140004010000000140011111100010140000031100111111403|5^396,564!11^396,516,756,60!9^48,336,0,0,13,21,1,-1,0!9^744,336,0,0,13,21,1,0,0!9^36,60,0,0,14,21,1,0,0!2^456,360,0,-1!2^336,360,0,-1!2^672,576,0,-1!2^120,576,0,-1!0^36,540!0^48,540!0^48,528!0^60,528!0^60,540!0^60,552!0^48,552!0^744,540!0^732,540!0^732,528!0^720,528!0^720,540!0^720,552!0^732,552!0^420,108!0^420,120!0^420,132!0^372,108!0^372,120!0^372,132!0^372,144!0^360,156!0^420,144!0^432,156!0^564,132!0^564,120!0^576,108!0^588,108!0^228,132!0^228,120!0^216,108!0^204,108!0^60,108!0^48,108!0^36,120!0^36,132!0^732,108!0^744,108!0^756,120!0^756,132!3^348,228!3^444,228!3^396,60!3^444,432!3^348,432!6^204,252,1,0,0,3!6^588,252,0,0,0,3!12^756,252!12^36,252!12^96,180!12^696,180!12^612,264!12^180,264");
var lev_haste = new LevelData("haste", "50000000000002150002100000000000000001000001000000000000000010000010000000000000400100400100000000000001001001001000000000000010010010010000000000000100100100100000000000001001001001000000000000010010010010000000000000100100100100000000000001001001001000000000000010010010010000000000000100100100100000000000001001001001000000000000010010010010000000000000100100100100000000000001001001001000000000000010010010010000000000000100100100100000000000001001001001000000000000010010010010000000000000100100100100000000000001001001001000000000000010010010010000000000000100100100100000000000001001001001000000000000010010010010000000000000100500100500004000000001000001000000010000000010000010000000140000003100000100000|5^48,552!3^756,564!3^756,492!3^756,420!3^756,348!2^684,288,0,-1!2^540,288,0,-1!2^396,288,0,-1!2^252,288,0,-1!2^108,288,0,-1!0^132,564!0^228,540!0^324,564!0^420,540!0^516,564!0^612,540!0^612,492!0^516,468!0^420,492!0^324,468!0^228,492!0^132,468!0^132,420!0^228,396!0^324,420!0^420,396!0^516,420!0^612,396!0^612,348!0^516,324!0^420,348!0^324,324!0^228,348!0^132,324!11^732,60,180,60!12^144,252!12^372,180!12^576,132!12^708,192!12^480,72!12^288,120!12^468,240!12^636,264!12^204,216!12^444,156!12^576,204!12^312,240!12^204,288!12^156,288!12^300,288!12^348,288!12^444,288!12^492,288!12^588,288!12^636,288!12^732,288!12^756,276!12^768,192");
var lev_claustro = new LevelData("claustro", "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111115021111111111111111115000001111111111111111100000011111111111111115000000111111111111111100000001111111111111111000000011111111111111110000000111111111111111100000001111111111111111000000011111111111111110000000111111111111111100000001111111111111111400000011111111111111111000000111111111111111114000001111111111111111111403111111111111111111111011111111111111111111110111111111111111111111101111111111111111111111011111111111111111111110111111111111111111111101111111111111111111111011111111111111111111110111111111111|5^396,324!1^396,288!1^300,228!1^492,228!9^540,324,0,0,29,11,1,0,0!9^252,324,0,0,28,11,1,0,0!9^396,180,0,0,27,11,1,0,0!9^444,324,0,0,26,11,1,0,0!9^348,324,0,0,25,11,1,0,0!9^228,276,0,0,24,11,1,0,0!9^396,252,0,0,24,11,1,-1,0!6^540,228,3,1,0,2!6^492,300,2,1,0,3!6^252,252,5,1,0,0!6^252,300,2,0,0,3!11^744,276,552,276");
var lev_stickthelanding = new LevelData("stick the landing", "00000000015000000211111000000000100000000B1111000000000140000000>11110003110002114000000B1110001150000021140000>111000E0000000000000000B11000P0000000000000000>11000P00000000000000000B1000D00000000000000000>1000B000000000000000000B000N000000000000000000>000N0000000000000000000000C0000000000000000000000E000000000000000000G000P0000D000003D0000OKI000P0000110000110000000000P0000E000002E0000QJH000D000000000000000000F000B0000000000000000000000N0000000000000000000000N000000000000000000?000C000000000000000000C000E00000000000000000?1000P00000000000000000C1000P0000000000000000?11000D0000000000000000C110001140000031150000?1110002110003115000000C111000000000150000000?1111000000000100000000C111100000000014000000311111|5^396,444!2^372,372,-0.707106781186547,-0.707106781186547!2^420,372,0.707106781186547,-0.707106781186547!2^660,300,-0.707106781186547,-0.707106781186547!2^132,300,0.707106781186547,-0.707106781186547!2^324,576,0,-1!2^468,576,0,-1!9^396,348,1,0,16,21,1,0,-1!9^288,84,1,0,16,21,1,0,0!9^504,84,1,0,16,22,1,0,0!11^396,564,396,204!0^732,276!0^720,276!0^744,276!0^756,288!0^708,288!0^756,300!0^744,288!0^732,288!0^720,288!0^744,300!0^756,312!0^756,324!0^744,312!0^708,300!0^720,300!0^732,300!0^744,324!0^732,312!0^48,276!0^60,276!0^72,276!0^36,288!0^36,300!0^36,312!0^36,324!0^48,288!0^60,288!0^72,288!0^84,288!0^48,300!0^60,300!0^72,300!0^84,300!0^48,312!0^48,324!0^60,312!10^396,276!10^396,36!3^288,132!3^504,132");
var lev_constructive = new LevelData("constructive", "5001500000000002150210200024000000000000000240000024000000000310000214000024000000035000000224000024000003500000000O1000001000035000000003Q10000010003500314000353500003500350035024001O5000035003500350001001Q000035000100010003500240000100001000100010000200001000024002400000000000024000024002100031104000024000024000003500024000024000024000350003424000024000010001000011O1000001000010001000011Q10000010003500024000253500003500350000024000350000350035000000024005000035003500000000011000003500010000000000110000010000100000000035000000100002400000003500300002400002400000010001000002400002400000100010000001000001000002400200000310000010000001000400001500003500000010002400000000350000003100042403140031000000311400|5^36,60!9^288,48,1,0,30,6,1,0,-1!9^576,48,1,0,30,6,1,0,0!9^576,168,1,0,2,17,1,0,-1!9^288,168,1,0,2,17,1,0,0!9^696,468,0,0,13,23,1,-1,0!9^528,492,0,0,13,23,1,0,0!9^396,540,0,0,21,23,1,-1,0!9^420,540,0,0,22,23,1,0,0!11^720,564,228,444!6^36,228,5,1,0,0!6^756,228,5,1,0,2!6^756,540,5,1,0,2!6^420,372,0,1,0,2!6^396,420,0,1,0,0!0^396,324!0^408,324!0^420,324!0^420,312!0^408,312!0^396,312!0^660,300!0^672,300!0^684,300!0^684,288!0^672,288!0^660,288!12^180,300!12^120,360!12^204,372!12^576,480!12^480,480!12^744,456!12^624,456!12^348,468!12^408,432!12^312,360!12^192,456!12^252,468");
var lev_industrialzone4 = new LevelData("industrial zone 4", "00000000000000000000000000000031140111500000000000031150215000000000000111150000000000100000001100000000000031000030011000000000031150031100210000000000150000111000140000000001000001500002110000000010000010000002140000000100000140000002100000001140001100000000000000002100021000000000000000000000010000003100000000000000100000315000000000140002000031100000000001100000000150000000000021000000001000000000000014000000014000000000000210000000210000000000000100000000100000000000001000000001400000000000000000000011000000000000000000000000000000000001000000000000000000000010000000000114000000003100000000000211140311115000000000000002111500000000000000000000000000000000000000000000000000000000000000000000000000000|5^60,300!3^168,156!3^444,144!2^600,456,0,-1!2^636,444,-0.707106781186547,-0.707106781186547!2^660,348,-0.707106781186547,-0.707106781186547!2^420,420,0.707106781186547,-0.707106781186547!2^300,396,0.707106781186547,-0.707106781186547!12^336,468!12^552,516!12^60,444!1^312,276!1^204,312!1^504,408!1^396,372!1^420,252!1^552,312!9^372,216,0,0,14,23,1,0,0!9^228,348,0,0,13,23,1,0,0!9^504,444,0,0,12,23,1,0,0!9^516,252,0,0,11,23,1,0,0!11^228,564,444,84!0^684,36!0^684,48!0^744,48!0^756,48!0^756,36!0^744,36!0^744,96!0^756,96!0^756,84!0^744,84!0^744,72!0^756,72!0^756,60!0^744,60!0^732,48!0^720,48!0^708,48!0^696,48!0^696,36!0^708,36!0^720,36!0^732,36!0^744,108!0^756,108!0^732,72!0^720,60!0^732,60!0^636,252!0^636,264!0^636,276!0^636,240!0^624,228!0^540,168!0^528,156!0^516,156!0^504,156!0^492,156!0^396,180!0^384,180!0^372,192!0^120,180!0^108,192!0^108,204!0^96,324!0^84,336!0^84,348!0^84,360!0^84,372!6^612,492,1,0,2,0!6^132,60,1,0,2,2!2^84,276,0.707106781186547,-0.707106781186547!9^228,192,0,0,15,23,1,0,0!0^180,492!0^192,492!0^204,492!0^216,492!0^228,492!0^240,492!0^252,492!0^264,492!0^276,492!0^516,108!0^528,108!0^540,108!0^552,108!0^564,108!0^36,564!0^48,564!0^60,564!0^72,564!0^84,564!0^96,564!0^108,564!0^324,516!0^336,516!0^348,516");
var lev_isthmus = new LevelData("isthmus", "50211150000000000000002000150000000000000000004000000031111111111140011111111150000000000000011500215000000000000000000000100311111111140300000001001500000002111001400010000000000000020011140140003111140000000211111111111502111100000000000000000002115000000000000000000000000300140000000000000000001001111111111111111140010011500000000000021100200110000000011400011000001100140000002400150000015001111400002400000300B0001111111400100001100N0001150001140000031100N0001000000214000011100C00010000000111111111001000100000000215000020010005000000000000C00000B0000000000000000100000N4000001000000000100000N1000031003140003140000C14003114011111111110001111111111150002115000000000000000000000000000000000000000314000003|5^60,48!10^132,36!9^684,300,0,0,28,23,1,-1,0!9^540,348,0,0,28,23,1,0,0!9^492,300,1,0,23,20,1,0,0!3^516,204!12^336,132!12^336,180!12^336,228!12^336,276!12^336,324!12^336,372!12^336,420!12^252,372!12^264,132!12^264,180!12^264,228!12^264,276!12^264,324!6^324,444,3,0,0,3!6^108,276,0,1,0,1!6^468,444,1,1,0,0!6^756,348,3,1,0,3!0^300,156!0^300,168!0^300,204!0^300,216!0^300,252!0^300,264!0^300,300!0^300,312!0^300,240!0^300,192!0^300,144!0^300,288!0^300,336!0^300,348!0^300,360!0^420,444!0^408,444!0^396,444!0^384,300!0^396,300!0^408,300!0^408,288!0^396,288!0^384,288!0^396,432!0^408,432!0^420,432!0^228,564!0^252,564!0^276,564!0^396,564!0^420,564!0^468,516!0^516,492!0^636,228!12^504,84!12^648,84!11^204,180,168,96!0^48,252!0^48,300!0^48,348!0^48,396!0^48,444!0^48,492");
var lev_outpost = new LevelData("outpost", "A00B11I0211111111MJ111100005000011150BM000B150000000000BIF0000000010000000000000000000000100000000000000000000001000000000000000000000310000000000000000000011100000000000000000003111000000000031140311111110000314031111111111111100001111111521152111111000011111150015002115210000152115000000001500100005001500000000000000000000000003000300000000000000000314031400031400400314031111111403111001101110115000111111110050021100000001111111100000011111111115000021000000211500000000000010000000010000000000000100000000500001000000001000000000000014000000010000000000000111000000100000000000000000000001000000000000000000111010000111000000000001500100001500000000000010001000010000000000000000014000000000000000000000111|5^180,420!9^84,552,0,0,18,3,1,-1,0!9^708,552,0,0,18,3,1,0,0!11^732,492,36,66!0^156,468!0^156,480!0^144,492!0^132,492!0^60,468!0^48,456!0^60,432!0^60,420!0^84,384!0^84,360!0^60,348!0^72,324!0^96,300!0^96,276!0^84,228!0^48,216!0^36,204!0^48,192!0^60,156!0^72,132!6^204,564,5,1,0,0!6^564,540,5,1,0,2!9^120,552,0,0,18,7,1,-1,0!9^672,552,0,0,18,7,1,0,0!6^468,324,3,1,0,3!6^468,204,3,1,0,1!10^684,156!12^708,408!12^684,408!12^660,408!12^684,72!12^708,72!12^732,72!12^720,348!12^672,312!12^708,228!12^744,168!12^636,216!12^564,348!12^504,396!12^516,456!12^588,420!12^612,288!12^588,288!12^564,288!2^252,180,-0.707106781186547,-0.707106781186547!2^228,348,-0.707106781186547,-0.707106781186547");
var lev_flightpath = new LevelData("flightpath", "53500000000000000000002350000000000000000000005000000200000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000004000000000020000000000000004000000000000000000000024000000000000000000000010000000000000000000030100000000000000000000111000000000000000000001010000000000000000000010100000000000000000000235000000000000000000000500000000000000000000000000000300000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000005000000000000000000000000000000000400000030000000000000002400000000000000000000042400000000000000000003|5^720,540!1^348,396!1^444,396!1^444,228!1^348,228!1^396,132!11^84,564,396,108!2^756,564,-0.707106781186547,-0.707106781186547!2^444,564,0.707106781186547,-0.707106781186547!2^348,564,-0.707106781186547,-0.707106781186547!2^396,552,0,-1!2^36,564,0.707106781186547,-0.707106781186547!2^132,312,0,-1!2^144,324,1,0!2^204,396,0.707106781186547,-0.707106781186547!2^252,480,0,-1!2^540,480,0,-1!2^612,396,-0.707106781186547,-0.707106781186547!2^648,324,-1,0!2^660,312,0,-1!2^708,204,-0.707106781186547,-0.707106781186547!2^516,204,-0.707106781186547,-0.707106781186547!2^276,204,0.707106781186547,-0.707106781186547!2^84,204,0.707106781186547,-0.707106781186547!2^264,204,-1,0!2^528,204,1,0!0^438,372!0^450,372!0^450,360!0^438,360!0^354,372!0^342,372!0^342,360!0^354,360!0^354,204!0^342,204!0^342,192!0^354,192!0^450,204!0^438,204!0^438,192!0^450,192!10^396,84!3^756,108!3^36,108");
var lev_suicidemission = new LevelData("suicide mission", "901000:=0000000000:=00000=00000000000000000000000000000000000;<000000000000000000000:=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;<000000000000000000000:=00000000;<000000000000000000000:=0000000000000000000000000000000000000000000000;<000000000000000000000:=000000000000000000000000000000000000000000;<00000000000;<00000000:=00000000000:=000000000000000000000000000000000;<000000000000000000000:=000000000000000000000000000000000000000000;<000000000000000000000:=0000000000;<000000000000000000000:=00000000000000000000000000000000000000000000000000000;<00000000000000000000011000000000000000000000110000000000000;<00080011000000000000011000|5^756,444!2^96,384,0,-1!2^672,576,0,-1!6^36,516,2,0,1,0!6^756,516,3,0,1,2!2^42,174,0.707106781186547,-0.707106781186547!1^132,144!1^204,144!11^48,60,732,84!0^600,420!0^432,444!0^240,444!0^216,456!0^264,456!0^408,456!0^456,456!0^576,432!0^624,432!0^612,420!0^588,420!0^444,444!0^420,444!0^252,444!0^228,444!0^360,180!0^360,168!0^432,132!0^432,120!0^504,180!0^504,168!0^576,132!0^576,120!0^288,132!0^288,120!0^300,132!0^276,132!0^348,180!0^372,180!0^420,132!0^444,132!0^492,180!0^516,180!0^564,132!0^588,132!3^48,36");
var lev_agonizing = new LevelData("agonizing", "0F1111111111111111111110011111111111111111111100111111111111111111111001111111111111111111110010000000000000000000000100000000000000000000001M01111111111111111100000311111111111111111000031111111111111111110003111111111111111111I0001I00000000000000000000010000000000000000000O0010000000000000000000F00100000000000000000000001000000000000000000OK0010000000000000000000F001000000000000000000000010000000000000000OOOK0010000000000000000000F0010000000000000000000000100000000000000OOOOOK0010000000000000000000F0010000000000000000000000100000000000OOOOOOOOK0010000000000000000000F0010000000000000000000000100000000OOOOOOOOOOOK0010000000000000000000F0010000000000000000000000100000000000000000000H01L000000000000000GOOK|5^228,564!9^168,132,0,0,7,5,0,-1,0!9^168,564,0,0,7,23,0,-1,0!3^648,276!6^132,420,2,1,0,3!6^156,204,2,1,0,1!6^156,492,3,1,0,3!10^372,108!3^588,108!0^276,516!0^276,492!0^276,468!0^276,444!0^276,420!0^276,396!0^276,372!0^276,348!0^276,324!0^276,300!0^276,276!0^276,252!0^276,228!0^276,204!0^276,180!0^276,156!0^276,132!12^48,72!12^144,72!12^324,72!12^432,72!12^528,72!12^624,72!12^720,72!12^378,24!12^480,24!12^576,24!12^672,24!12^96,24!12^234,24!11^720,564,744,36!0^336,48!0^312,48!0^420,48!0^444,48!0^516,48!0^540,48!0^612,48!0^636,48!0^708,48!0^732,48!0^132,60!0^120,60!0^108,60!0^96,60!0^84,60!0^72,60!0^60,60!0^60,48!0^72,48!0^84,48!0^96,48!0^108,48!0^120,48!0^132,48!0^132,36!0^120,36!0^108,36!0^96,36!0^84,36!0^72,36!0^60,36!8^756,60,2!8^36,36,0!2^522,432,0,-1!12^768,468!12^768,420!12^768,372!12^768,324!12^768,276");
var lev_domesticdisturbance = new LevelData("domestic disturbance", "00000000000000000000000000000000000000000000000000111114031140000000000001500210150000GK1000000010000215000GK15000000002000000000315000000000000000000035000000000000000000003500003100000000000000?1000035000000000000000C100001000000000000000?1500001000000000000000C100000240000000140000015000000210000002100000100000000000300001403D010000000000010000110110100100000000100001502E0100000000000100031000001000000000002000150000014000000310000000000000B1000003500000000000000>14000010000000000000000B1000010000000000000000>10000240000000000000000240000210000000000000000240000000000004000000000214000000000010000000000FJ14000000001400311114000FJ1000000011115000210000000000000211100000100000000000000000000001000000000|5^108,276!11^744,324,396,180!9^396,252,1,0,31,8,1,0,0!9^396,108,1,0,31,6,1,0,-1!9^528,420,1,0,31,7,1,0,-1!9^264,420,1,0,31,7,1,0,0!9^384,540,0,0,16,7,1,0,0!9^408,540,0,0,16,7,1,-1,0!8^252,468,1!8^540,468,1!6^396,372,0,0,1,2!3^624,144!10^396,36!2^684,228,-0.707106781186547,-0.707106781186547!2^420,204,0.707106781186547,-0.707106781186547!2^372,204,-0.707106781186547,-0.707106781186547!2^108,228,0.707106781186547,-0.707106781186547!0^204,564!0^228,564!0^252,564!0^276,564!0^300,564!0^324,564!0^468,564!0^492,564!0^516,564!0^540,564!0^564,564!0^588,564!0^636,108!0^660,108!0^684,108!0^708,108!0^84,108!0^108,108!0^132,108!0^156,108!0^324,252!0^336,252!0^336,240!0^348,240!0^348,252!0^360,252!0^468,252!0^456,252!0^444,252!0^432,252!0^444,240!0^456,240!2^168,576,0,-1!2^624,576,0,-1!2^744,576,0,-1!2^48,576,0,-1!2^156,132,0.707106781186547,-0.707106781186547!3^120,168");
var lev_covered = new LevelData("covered", "00021500021500000000000000000000010000000000000000000000Q0000000000000000000000000000000000000000000000000000000000000000000000000N0000000000000000000000N000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000N0000000000000000000000N000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000N0000000000000000000000N000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000N0000000000000000000000N0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000031400000000314000000|5^420,552!12^36,528!12^84,528!12^132,528!12^180,528!12^228,528!12^276,528!12^324,528!12^372,528!12^420,528!12^468,528!12^516,528!12^564,528!12^612,528!12^660,528!12^708,528!7^720,516,3!7^696,516,3!7^576,516,3!7^552,516,3!7^432,516,3!7^408,516,3!7^288,516,3!7^264,516,3!7^144,516,3!7^120,516,3!7^36,468,3!7^60,468,3!12^132,396!12^276,396!12^420,396!12^564,396!12^708,396!2^732,384,0,-1!1^180,276!1^324,276!1^468,276!1^612,276!6^84,84,3,0,1,0!6^708,84,2,0,1,2!0^468,300!0^468,312!0^612,300!0^612,312!0^612,252!0^612,240!0^468,252!0^468,240!0^324,300!0^324,312!0^324,252!0^324,240!0^180,252!0^180,240!0^180,300!0^180,312!0^60,300!0^48,300!0^36,312!0^36,324!0^48,312!0^48,324!0^60,324!0^60,312!11^60,252,60,552");
var lev_plummet = new LevelData("plummet", "5000000000000000000000200000000000000000000000000015000000150000015000000000000000000000000000000000000000000000000000000000000000000000000000000014000000140000000000000000000000000000H00000000000000000000031000C11111111111111111114031111111111111111111110111111111111111111111101111111111111111111111011111111111111111111110111111111111111111111101111111111111111111111011111111111111111111110111111111111111111111101111111111111111111111011111111111111111111150211111111111111111111000B111111111111111111I00000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000003|5^84,540!11^660,564,396,84!1^660,180!1^660,324!1^660,468!1^756,420!1^564,420!1^708,516!1^612,516!1^732,252!1^588,252!1^660,60!0^576,36!0^588,36!0^600,36!0^612,36!0^624,36!0^636,36!0^648,36!0^660,36!0^672,36!0^684,36!0^696,36!0^708,36!0^720,36!0^732,36!12^660,540!12^684,540!12^636,540!0^180,204!0^180,396!0^84,468!0^84,300!1^660,204!1^660,348!1^660,492!8^564,492,0!8^756,444,2!8^564,372,0!8^756,300,2!8^564,204,0!10^756,84!6^60,156,3,1,0,1!6^204,252,3,1,0,3");
var lev_deathstar = new LevelData("death star", "5000000000000000000021000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000020000000000GOOOH0000000000000000GK11111LH000000000000031150211114000000000003111000150FJ40000000003111500010000240000000?15000000500000B@000000C10000000000000>D00000?E000000000000000B@0000NP000000000000000>D0000000000000000000000100000000000000000000000000000000000000000000010000NP000000000000000?E0000>D000000000000000CA00000B10000000040000?E000000>14000000010000CA0000000211100000140GK5000000000211400031111500000000000211111111150000000000000FJ50002MI0000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000001000000000000000000000010040000000000000000000140|5^684,468!1^324,252!1^468,252!1^396,396!1^396,156!2^756,504,0,-1!2^60,528,0,-1!2^528,456,-0.707106781186547,-0.707106781186547!2^264,456,0.707106781186547,-0.707106781186547!11^48,564,108,564!9^216,276,0,0,5,23,1,0,0!9^564,276,0,0,5,23,1,-1,0!9^252,372,0,0,3,23,1,0,0!9^516,396,0,0,3,23,1,-1,0!3^288,168!3^480,360!3^504,168!3^288,336!0^420,492!0^420,480!0^420,468!0^372,492!0^372,480!0^372,468!0^324,228!0^324,276!0^348,252!0^300,252!0^396,132!0^396,180!0^420,156!0^372,156!0^468,228!0^468,276!0^492,252!0^444,252!0^396,372!0^396,420!0^420,396!0^372,396!0^228,300!0^240,300!0^252,300!0^264,300!0^276,300!0^492,324!0^504,324!0^516,324!0^528,324!0^540,324");
var lev_bespin = new LevelData("bespin", "000000000000000000000020000000000000000000000000000000000000000000000000000000000000001100000000000000000000021000000000000000000000000000000000<0000000000000000000000100000000000000000000001400000000000000000000011000000000000000000;0011140000000000000000100115000000000000000001001114000000000000000010011111114000000000000100111140000000000000001001111111111115000000010011100000500000000000100111400000000000000001001111150000000000000010011100000000000000000:0011500000000000000000000110000000000000000000001500000000000000000000010000000000000000000000=0000000000000000000000000000000000000000000000000000000031000000000000000000000110000000000000000000000000000000000000000000000000000000000000000000000003|5^396,48!11^396,156,420,348!2^684,432,0,-1!2^660,444,-0.707106781186547,-0.707106781186547!2^132,444,0.707106781186547,-0.707106781186547!2^108,432,0,-1!2^516,576,0,-1!2^276,576,0,-1!12^564,252!12^744,384!12^636,360!12^732,252!12^696,180!12^624,228!12^708,324!12^636,276!12^768,432!12^696,456!12^504,276!10^396,540!0^372,288!0^372,300!0^372,312!0^372,324!0^372,336!0^372,348!0^324,324!0^324,312!0^324,300!0^324,288!0^324,276!0^324,264!0^300,252!0^300,240!0^312,252!0^252,228!3^372,420!3^204,204!1^756,324!1^612,324!1^564,468!1^204,324!1^324,468!1^204,468!1^276,372!1^60,348!12^108,348!6^276,132,1,0,1,0!6^516,132,0,0,1,2");
var lev_crossfire = new LevelData("crossfire", "50000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000003|5^396,540!3^48,48!3^744,48!3^744,552!3^48,552!0^36,84!0^36,108!0^36,132!0^36,156!0^36,180!0^36,204!0^36,228!0^36,252!0^36,276!0^36,300!0^36,324!0^36,348!0^36,372!0^36,396!0^36,420!0^36,444!0^36,468!0^36,492!0^36,516!0^756,84!0^756,108!0^756,132!0^756,156!0^756,180!0^756,204!0^756,228!0^756,252!0^756,276!0^756,300!0^756,324!0^756,348!0^756,372!0^756,396!0^756,420!0^756,444!0^756,468!0^756,492!0^756,516!1^228,492!1^564,492!1^564,396!1^228,396!1^108,300!1^684,300!1^564,156!1^228,156!11^396,564,396,60!1^396,324!1^396,360!1^108,336!1^684,336!1^564,192!1^228,192!1^564,432!1^228,432!1^228,528!1^564,528!2^96,576,0,-1!2^696,576,0,-1");
var lev_hounds = new LevelData("hounds", "50000000000000000001000000000000000000000010000000000000000000000100000000000000000000001011000000000000000000000110000000000000000000000100000000000000000000002000000000000000000000000000000000000000000003100111111111111111111011001500000211500021500114010000000110000010002110100001001100100100001101000010015001001000011010000100000010000003110100031000000100000011101001110000001400003111010002140000311111111150100001111111150000021001400000000000000000000011100000000000000000300000000000000000000001000000000000000000000020000000000000000000000000000000000000000000003000000000000000000000010000000000000000000000100000000000000000000001000000000000000000000020000000000000000000000040000000000000000000003|5^204,552!9^660,540,0,0,4,21,1,-1,0!9^444,60,0,1,16,2,0,-1,0!9^456,60,0,0,10,21,1,-1,0!11^276,60,660,540!6^84,540,2,1,0,3!6^60,564,2,1,0,0!6^36,540,2,1,0,1!6^60,516,2,1,0,2!2^540,552,0,-1!2^468,540,0.707106781186547,-0.707106781186547!2^756,564,-0.707106781186547,-0.707106781186547!0^468,408!0^468,420!0^468,432!0^468,444!0^468,456!0^468,468!0^468,480!0^468,492!0^468,504!0^468,516!0^348,540!0^336,540!0^324,540!0^312,540!0^300,528!0^360,540!0^372,528!12^348,156!12^408,276!12^420,456!12^312,372!10^540,108!3^36,468!2^156,552,0,-1!1^84,324!1^132,276!1^84,228!1^132,180!1^84,132!1^132,84!0^36,60!0^36,84!0^36,108!0^36,132!0^36,156!0^36,180!0^36,204!0^36,228!0^36,252!0^36,276!0^36,300!0^36,324!0^36,348!0^36,372!0^36,396!0^36,420!0^36,444");
var lev_skatingtheedge = new LevelData("skating the edge", "MIFIFIFIFIFIFIFIFIFIFIF00000000000000000000000000000000000000GH000000000000GH0000000FI000000000000FI000GH000000000000000000GH0FI000000000000000000FI000000000000000000000000000GH00000000000GH00000000FI00000000000FI0000000000000GH00000000000GH00000000FI00000000000FI0000000000000000000000000GH00000000000000GH00000FI0GH00000000000FI00000000FI0000000000000000GH000000000000000000000FI000000000000000000GH000000GH0000000000000FI000000FI0000000000000000000000000000000000GH000000000000000000000FI00000GH000000000000000000000FI0000000000000000000GH00000000000000000GH00FI0000GH0000000GH00FI00000000FI0000000FI000000000000000000000000000000GH000000000000000000000FI00000000000000000000000000000000LHGHGHGHGHGHGHGHGHGHGHG|5^684,528!11^96,564,444,108!2^180,576,0,-1!2^312,576,0,-1!2^396,576,0,-1!2^516,576,0,-1!2^588,576,0,-1!6^60,396,1,0,1,1!3^732,60!0^240,108!0^120,156!0^360,156!0^648,84!0^624,180!0^528,156!0^456,204!0^288,228!0^168,204!0^216,348!0^408,276!0^552,324!0^696,300!0^624,420!0^456,396!0^264,468!0^144,276!0^336,324!0^360,396!0^600,276");
var lev_bombshelter = new LevelData("bombshelter", "0000000000110021111111100000000031100011500002000000003500000110311400010000010000001101111000240000000000011011110000240000001000210111100000100000024000101115000000000000024001011100000000001000010010111000040000350000000201110000100115000000000011140401400000000000003111111011111111111111111111150210000000000000000002000500000000000000000000000000110000110000110000000000000000000000000404000000000000000000031011111111111111111111150250010001000111111500000000100010001110000000000000000000021101111100000000000000000011111000000000000003110J11110000100010000011100000000001000100000111000000000000000000002110K111100000000000000000011111000000000000003110111110000001000100011100000000000010001000111111400|5^396,552!11^624,564,228,564!6^348,300,2,1,0,3!6^444,300,2,1,0,1!8^276,564,2!0^516,564!0^504,564!0^492,564!0^492,552!0^504,552!0^516,552!0^516,540!0^504,540!0^492,540!0^492,528!0^504,528!0^516,528!0^516,516!0^504,516!0^516,504!0^732,564!0^744,564!0^756,564!0^756,552!0^744,552!0^732,552!0^732,540!0^744,540!0^756,540!0^756,528!0^744,528!0^732,528!0^732,516!0^744,516!0^732,504!0^732,492!0^732,480!0^732,468!0^516,492!0^516,480!0^516,468!6^636,444,1,0,2,0!10^240,84!10^276,228!10^108,108!2^156,288,0,-1!2^228,216,0,-1!2^84,228,-0.707106781186547,-0.707106781186547!2^204,324,0.707106781186547,-0.707106781186547!2^132,384,0,-1!12^624,168!12^624,108!12^720,156!12^528,156!12^528,252!12^720,252!12^684,276!12^564,276!12^624,252!12^648,156!12^600,156!12^624,312!12^744,204!12^504,204!4^492,570,1!4^756,570,1!0^252,444!0^228,444!0^204,444!0^180,444!0^156,444!0^132,444!0^108,444!0^60,492!0^60,516!0^60,468!0^84,444!6^612,252,1,0,0,0!6^540,348,3,0,0,0!6^684,300,2,0,0,0!2^36,264,0,-1!0^60,324!0^48,324!0^36,324!0^36,336!0^48,336!0^60,336!0^60,348!0^48,348!0^36,348!0^60,360!0^60,372!0^48,372!0^48,360!0^36,360");
var lev_patrol = new LevelData("patrol", "E000000000000000000000>A0000000000000000000000000000000000000000000000000C00000000000000000000001H00000000000C@000000001111111111111115000000010000000000002E00000000E0000000000000000000000A0000000000000000C0000000000000000000000100000000000000000000001000000000000000000000010000000000000000000000B0000000000000000000000N0000000000000000000000N0000000000000000000D00N0000000000000000000E00N0000000000000000000000N0000000000000000000000N0000000000000000000000N0000000000000000000000N0000000000000000000000N?0000@0000000000000000N10000D0000000000000000>1000010000000000003D000B0000111111111111111400000001I00000000000BA00000000B00000000000000000000000000000000000000000@0000000000000000000000D000000000000000000000?|5^660,564!11^492,564,408,132!9^156,108,0,0,9,23,1,-1,0!9^636,108,0,0,10,23,1,-1,0!9^252,276,0,0,11,23,1,-1,0!9^540,276,0,0,12,23,1,-1,0!9^408,372,0,0,13,23,1,-1,0!9^408,48,0,0,14,23,1,-1,0!2^408,456,0,-1!2^612,444,-0.707106781186547,-0.707106781186547!2^180,444,0.707106781186547,-0.707106781186547!12^768,204!12^768,336!12^768,456!12^648,204!12^648,264!12^648,324!12^648,384!12^144,204!12^144,288!12^144,372!12^24,396!12^24,480!12^24,516!1^708,276!1^708,384!1^60,396!1^60,276!6^660,108,1,0,2,2!6^132,108,1,0,2,2!6^180,300,0,0,1,1!0^396,276!0^408,276!0^420,276!0^420,264!0^408,264!0^396,264!0^396,252!0^408,252!0^420,252!0^516,180!0^504,180!0^504,192!0^516,192!0^276,192!0^276,180!0^288,180!0^288,192!0^504,348!0^516,348!0^516,360!0^504,360!0^276,348!0^288,348!0^288,360!0^276,360!1^468,312!1^336,312!1^468,216!1^336,216!1^516,456!1^252,312!1^540,312!1^468,420!1^336,420!6^612,300,1,0,1,1!12^24,336!12^24,216");
var levList0 = new Array();
levList0.push(lev_getdown);
levList0.push(lev_nexus);
levList0.push(lev_deku);
levList0.push(lev_descent);
levList0.push(lev_surf);
_local1.episodeList[20] = new EpisodeData("episode 20", "star", levList0);
var _local3 = new Array();
_local3.push(lev_bulbous);
_local3.push(lev_alienskatepark);
_local3.push(lev_greedo);
_local3.push(lev_evac);
_local3.push(lev_ilovegold);
_local1.episodeList[21] = new EpisodeData("episode 21", "wristpain", _local3);
var levList2 = new Array();
levList2.push(lev_tunnels);
levList2.push(lev_spelunking);
levList2.push(lev_sumo);
levList2.push(lev_faces);
levList2.push(lev_pathmatics);
_local1.episodeList[22] = new EpisodeData("episode 22", "pumpkin", levList2);
var levList3 = new Array();
levList3.push(lev_unsuperimpossible);
levList3.push(lev_npunzel);
levList3.push(lev_lab);
levList3.push(lev_chooseyourown);
levList3.push(lev_sarlac);
_local1.episodeList[23] = new EpisodeData("episode 23", "rightly", levList3);
var levList5 = new Array();
levList5.push(lev_pity);
levList5.push(lev_hideandseek);
levList5.push(lev_viaduct);
levList5.push(lev_barehunting);
levList5.push(lev_pitcherplant);
_local1.episodeList[24] = new EpisodeData("episode 24", "correct", levList5);
var levList6 = new Array();
levList6.push(lev_deepfreeze);
levList6.push(lev_auxterminal);
levList6.push(lev_leapoffaith);
levList6.push(lev_rocketrun);
levList6.push(lev_slipperyslope);
_local1.episodeList[25] = new EpisodeData("episode 25", "edge", levList6);
var levList7 = new Array();
levList7.push(lev_haste);
levList7.push(lev_claustro);
levList7.push(lev_stickthelanding);
levList7.push(lev_constructive);
levList7.push(lev_industrialzone4);
_local1.episodeList[26] = new EpisodeData("episode 26", "node", levList7);
var levList4 = new Array();
levList4.push(lev_isthmus);
levList4.push(lev_outpost);
levList4.push(lev_flightpath);
levList4.push(lev_suicidemission);
levList4.push(lev_agonizing);
_local1.episodeList[27] = new EpisodeData("episode 27", "landmark", levList4);
var _local2 = new Array();
_local2.push(lev_domesticdisturbance);
_local2.push(lev_covered);
_local2.push(lev_plummet);
_local2.push(lev_deathstar);
_local2.push(lev_bespin);
_local1.episodeList[28] = new EpisodeData("episode 28", "cowbell", _local2);
var levList9 = new Array();
levList9.push(lev_crossfire);
levList9.push(lev_hounds);
levList9.push(lev_skatingtheedge);
levList9.push(lev_bombshelter);
levList9.push(lev_patrol);
_local1.episodeList[29] = new EpisodeData("episode 29", "compress", levList9);
};
MENUDEMO_0 = 0;
MENUDEMO_1 = 1;
MENUDEMO_3 = 3;
MENUDEMO_4 = 4;
MENUDEMO_5 = 5;
MENUDEMO_6 = 6;
MENUDEMO_7 = 7;
MENUDEMO_8 = 8;
MENUDEMO_9 = 9;
MENUDEMO_10 = 10;
MENUDEMO_11 = 11;
MENUDEMO_12 = 12;
MENUDEMO_13 = 13;
MENUDEMO_14 = 14;
MENUDEMO_15 = 15;
MENUDEMO_16 = 16;
MENUDEMO_17 = 17;
MENUDEMO_18 = 18;
MENUDEMO_19 = 19;
MENUDEMO_20 = 20;
MENUDEMO_21 = 21;
MENUDEMO_22 = 22;
MENUDEMO_23 = 23;
MENUDEMO_24 = 24;
MENUDEMO_25 = 25;
MENUDEMO_26 = 26;
MENUDEMO_27 = 27;
MENUDEMO_28 = 28;
MENUDEMO_29 = 29;
MENUDEMO_30 = 30;
MENUDEMO_31 = 31;
NinjaData.prototype.BuildGameData_MenuDemos = function () {
var _local1 = this;
_local1.menudemoList[15] = new MenuDemoData(8, 2, "1070:0|35791394|237117986|107374182|107374182|107374182|35791398|35791394|35791394|34|0|0|0|79691776|89478485|89478485|89478485|17896789|17895697|17895697|4369|71614464|0|35791392|35791394|139810|35782656|35791394|107405858|107374182|107374182|107374182|107374182|36071014|35791394|35791394|35791394|17904162|17895697|17895697|1118481|0|35651584|35791394|35791394|2236962|72089600|89478485|17913173|17|35791360|35791394|35791394|35791394|35791394|35791394|35791394|17825794|17895697|17895697|273|16785952|17|35782656|35791394|139810|0|0|33554432|2236962|0|0|0|0|0|0|33554432|546|17895680|17895697|17895697|17895697|0|0|17825792|4369|17891328|17895680|17895697|17895697|89478493|69909|0|0|0|0|0|139776|0|0|0|0|0|0|0|35790848|107405858|8738|0|0|35790848|35791394|35791394|107374306|107374182|107374182|89474118|18175317|97587473|89478485|33554437|35791394|35791394|17895970|17895697|17895697|17895697|17895697|1118481|0|71584768|107373636|107374182|88360038|89478485|33554501|35660322|115483170|71582788|36062276|33554432|35791394|17891362|1118481|107365568|71582788|72701798|107374148|2|17891328|0|17891328|17|0|0|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[21] = new MenuDemoData(4, 4, "444:0|0|35782656|73819758|71582788|2236966|0|35791394|0|0|0|0|0|0|0|35791394|201326626|71582788|105137220|107374182|35791398|35791394|139810|0|0|0|0|0|71614464|107374180|107374182|35808870|546|0|0|0|0|0|0|2236928|0|0|0|0|0|71584768|107365444|35791394|35791394|546|0|0|35791360|35791394|0|0|8704|35651584|2|35790848|107374306|36071014|34|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[28] = new MenuDemoData(7, 3, "500:17895424|17895697|17895697|17895697|273|0|0|17895424|17|0|139810|0|35782656|2|17895697|17895697|17895697|17895697|1118481|0|0|0|17895424|17895697|17895697|17895697|17895697|89478493|1118485|35790848|35791394|8738|17895680|4369|0|17895697|89505792|105141589|107374182|107374182|203563622|89478212|89478485|89478485|87381|0|0|0|107376160|35808870|35791394|35791394|35791394|546|35791394|35791394|35791394|71722606|107374148|8738|17891328|69905|0|35791394|35791394|35791394|35791394|35791394|79831586|88429908|33572181|546");
_local1.menudemoTotalNum++;
_local1.menudemoList[29] = new MenuDemoData(9, 2, "930:17825792|17895697|89510161|21|0|0|0|0|0|0|17825792|17895697|17895697|17895697|17895697|69905|17484|35791360|35791394|35791394|35791394|35791394|35791394|35791394|35791394|20062754|17895697|69905|0|0|0|0|35790848|0|0|0|17895697|17895697|17895697|1|0|35791394|35791394|35791394|35791394|35791394|35791394|17825826|17895697|17895697|17895697|17895697|17895697|4369|0|0|0|0|17895696|17895697|17895697|1|1118208|72089600|89478468|89478485|219222289|71652693|546|0|35791360|34|0|0|35791394|35791394|107374306|0|0|0|0|89474124|89478485|22369621|17895697|17895697|17895697|71584768|89478485|89478485|89478485|89478485|21|35790848|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|17895699|89478493|89478485|89478485|89478485|89478485|89478485|22369621|17895697|4369|35651584|35791394|35791394|107376162|107374182|107374182|71582788|0|35782656|34|0|8738|35791360|546|35791360|0|8738|35791360|35791394|35790848|2236962");
_local1.menudemoTotalNum++;
_local1.menudemoList[10] = new MenuDemoData(7, 2, "466:0|0|0|0|0|17895424|17895697|17895697|17895697|71582797|71582788|17895765|17895697|17895697|1118481|17825792|17895697|17895697|17895697|17895697|17895697|17895697|72089873|71582788|107374182|107374182|107374182|22369604|17895697|1118481|79691776|107365444|107374182|107374182|73819750|68|0|0|33554432|546|107266048|107374182|107374182|107374182|107374182|35791394|115483170|17891398|17895697|17895697|17895697|0|0|0|89478476|89478485|89478485|89478485|70997|35790848|35791394|35791394|107405858|107374182|107374182|107374182|26214");
_local1.menudemoTotalNum++;
_local1.menudemoList[14] = new MenuDemoData(5, 3, "420:17895697|17895697|17895697|17895697|17895697|69905|0|0|17825792|273|71582796|89478212|18175317|273|0|0|0|16777216|17895697|1|17895424|1|0|17895696|17895697|17895697|1118481|0|35791394|35791394|35791394|35791394|35791394|79691776|89478485|89478485|89478485|17896789|17895697|17895697|17895697|97587473|71583061|33555524|35791394|139810|17895680|273|35791360|546|17895697|17895697|17895697|1118481|0|17895424|17895697|17895697|17895697|17895697|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[27] = new MenuDemoData(5, 1, "605:0|17895696|17895697|219222289|89478485|89478485|89478485|89478485|89478485|17896789|17895697|69905|35782656|35791394|35791394|35791394|35791394|546|0|17825792|17895697|18177297|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|69905|0|35651584|35791394|115483170|139878|34|0|107266048|71583334|17825796|17895697|17895697|17895697|17895697|0|35791394|35791394|35791394|35791394|72229410|4473924|0|79691776|71582788|1092|17895680|1|35790848|34|35790848|16777218|89510161|17896789|17895697|17895697|17895424|17895697|17895697|33554449|35791394|115483170|107374182|550|35790848|35791394|546");
_local1.menudemoTotalNum++;
_local1.menudemoList[25] = new MenuDemoData(6, 1, "1478:17825792|17895697|17895697|4369|0|2236416|16777216|17895697|17895697|17895697|17895697|17895697|4369|35791392|35791394|35791394|35791394|35791394|35791394|35791394|8738|0|17825792|17895697|17895697|17895697|17895697|17895697|17895697|89480465|71652693|71582788|89478468|89478485|17895765|17895697|17895697|17895697|1118481|0|35790848|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|17891328|17895697|17895697|89478493|71582789|89478484|89478485|17913173|17895697|17895697|17895697|17895697|35782929|35791394|35791394|35791394|107365998|73811046|71582788|71582788|33555524|35791394|35791394|35791394|35791394|35791394|35791394|72229410|71582788|107373636|4482662|17895680|17895697|17895697|17895697|17895697|89985297|89478485|89478485|89478485|89478485|89478485|17913173|17895697|17895697|17895697|17895697|89510161|71582789|89478468|89478485|283989|115474432|107374182|107374182|107374182|107374182|35792486|35791394|237117986|71582788|17476|71584768|71582788|72089604|89478212|17895765|17895697|17895697|17895697|17895697|17895697|17895697|35791395|35791394|34|17895697|4369|0|35791360|35791394|35791394|34|17895697|17895697|17895697|17|0|0|0|0|0|0|0|0|16777216|69905|0|0|0|107405824|35791398|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|107405858|40265318|35791394|2236962|89510144|89478485|89478485|89478485|4543829|0|35790848|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|2236962|71582912|71582788|79691844|89478468|89478485|89478485|89478485|89478485|89478485|89478485|89478485|17895765|89478493|89478485|89478485|219222289|89478485|89478485|89478485|17895701|17895697|17895697|1");
_local1.menudemoTotalNum++;
_local1.menudemoList[24] = new MenuDemoData(7, 4, "612:0|0|17895696|17895697|273|35791360|139810|17825792|17895697|1|17895424|17895697|17895697|18175325|0|0|0|16777216|17895697|17895697|17895697|17895697|17895697|72159505|71582788|71582788|17825796|89478609|89478485|17895765|17895697|17895697|17|0|0|71584768|1092|0|16777216|17895697|1|0|35651584|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|8738|35791360|35791394|35791394|17895970|17895697|17895697|17895697|17895697|17895697|17895697|17895697|35791392|35791394|107880994|35808870|35791394|35791394|35791394|35791394|35791394|237117986|71582790|107373636|107374182|35808870|35791394|107405858|107374182|35792486|35791394|16777216|17895697|72093969|1092|1372");
_local1.menudemoTotalNum++;
_local1.menudemoList[22] = new MenuDemoData(8, 0, "1234:0|0|16777216|17895697|17895697|281873|0|33554432|34|17891328|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|97587473|89478485|89478485|17895701|17895697|17895697|1|0|0|35782656|107405858|107374182|107374182|107374182|107374182|139810|0|35790848|2|0|237117984|107374182|107374182|107374182|35808870|35791394|35791394|35791394|8738|0|72089600|107374148|107374182|107374182|40265318|8738|0|0|0|105137344|107374182|102|79691776|107365444|107374182|40265318|115483170|71582788|89478484|89478485|89478485|22369621|89510161|89478485|89478485|89478485|89478485|89478485|89478485|18175317|17895697|17895697|89480465|89478485|89478485|22369621|89510161|89478485|89478485|17896789|107745553|107374182|107374182|71582790|1092|17895424|17895697|17895697|17895697|17895697|17895697|17895697|89478493|89478485|89478485|97587541|89478485|89478485|89478485|17895765|17895697|17895697|17895697|1118481|79691776|71582788|18105412|17895697|17895697|17895697|35782657|35791394|16777762|89478493|89478485|22369621|17895697|4369|35790848|35791394|35791394|35791394|2236962|17895680|17895697|0|35790848|35791394|71583342|71582788|107374148|107374182|16786022|17895697|17895697|17895697|273|35791394|35791394|35791394|35791394|35791394|34|17895697|17895697|17895697|17895697|17895697|69905|0|0|17895696|0|17825792|17895697|17895697|17895697|1118481|33554432|35791394|17895680|69905|0|35782656|35791394|107405858|107374182|288358|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[20] = new MenuDemoData(3, 1, "790:0|0|17891328|201396497|71582788|349525|0|0|0|201326592|107374148|107374182|107374182|107374182|26214|0|0|16777216|17895697|17895697|69905|35790848|81928738|71582788|71582788|71582788|107365444|35791398|35791394|35791394|35791394|139810|72089600|71582788|71582788|107374148|107374182|0|71582912|71582788|71582788|71582788|71582788|71582788|105137220|35791394|35791394|35791394|107880994|107374182|107374182|79831586|89478485|89478485|89478485|89478485|89478485|18175317|89510161|89478485|89478485|89478485|17913173|17895697|17895697|17895697|17891329|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|36770065|35791394|35791394|35791394|35791394|107376162|35791394|35791394|2|0|35791360|546|0|0|35791392|2|35791392|33554432|139810|17825792|17895697|17895697|17895697|17895697|17895697|2236977|17895680|17895697|17895697|17895697|17895697|1118481");
_local1.menudemoTotalNum++;
_local1.menudemoList[4] = new MenuDemoData(3, 4, "890:0|237117952|71582790|107234372|107374182|201326594|89478484|89478485|89478485|17895701|17895697|0|17895424|273|88866816|89478485|89478485|89478485|17895697|17|0|35791392|35791394|35791394|35791394|34|35791394|0|0|0|0|0|0|0|0|0|0|0|4368|17825792|17895697|17895697|17895697|71582813|71582788|89478468|89478485|18170948|17895697|89478493|89478485|17749|0|79691776|71582788|89478484|72701269|279620|35790848|0|17895424|219222289|71582788|89478484|17477|35791392|2236962|0|0|0|17895696|17895697|0|0|0|0|0|0|0|17895424|69905|0|107374272|107374182|107374182|107374182|107374182|107374182|107374182|107374182|40265318|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|2236962|71582796|71582788|89509888|89478485|89478485|89478485|89478485|35792469|35791392|546|17895696|17895697|89478493|71587157|71582788|71582788|107373636|71722598|107365444|35808870|35791394|34|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[16] = new MenuDemoData(10, 1, "571:35791360|35791394|237117986|71722598|4473924|8738|33554432|35791394|35791394|2|512|71614464|71582788|35808836|139810|0|0|0|35790848|2236962|72089600|71582788|71582788|35783748|34|0|35791392|0|17825792|35791361|17825792|35791360|17895682|17895697|35655953|107374306|107374182|107374182|107374182|107374182|1126|0|0|0|0|0|0|17895696|17895697|0|0|0|0|0|35790848|0|17895424|17895697|17895697|71587165|22299716|1|0|35791360|0|17826338|17895697|4474065|0|0|0|35651584|8738|0|201326626|72701269|68|0|35655953|35791394|17891874|4369");
_local1.menudemoTotalNum++;
_local1.menudemoList[3] = new MenuDemoData(11, 4, "776:17895424|17895697|17895697|17895697|17895697|17895697|17895697|17895697|1118481|17895697|1118481|0|0|0|35651584|2236962|0|4369|88361984|89478485|89478485|89478485|89478485|89478485|89478485|89478485|17895765|17895697|17895697|89478493|89478485|89985301|89478485|89478485|97587541|89478485|89478485|89478485|69905|0|0|0|79691776|89474116|89478485|89478485|89478485|219222357|89478485|89478485|89478485|89478485|5461|0|0|0|0|0|4369|0|0|0|0|0|0|79691776|89478212|89478485|89478485|17749|0|2236962|0|35790848|34|139810|0|17895696|1118481|0|0|17891328|33554449|35791394|35791394|79700514|71582788|89478485|89478485|107444053|107374182|35808870|89476130|89478485|89478485|89478485|89478485|89478485|341|0|0|0|33554432|35791394|35791394|219230754|89478485|18175317|17895697|4369|1118481");
_local1.menudemoTotalNum++;
_local1.menudemoList[17] = new MenuDemoData(12, 3, "1173:35791394|35791394|35791394|35791394|35791394|35791394|35791394|107880994|107374182|107374182|35791398|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|71754274|71582788|115484260|107374182|107374182|107374182|107374182|115483238|107374182|107374182|107374182|107374182|107881062|107374182|107374182|107374182|107374182|107405862|107374182|107374182|107374182|36071014|89985058|89478485|17895765|33554432|8738|0|20062754|17895697|17895697|33558801|546|69904|139264|17891328|273|71582796|71582788|89408580|1093|0|17825792|17895697|79691793|72701269|0|0|1118464|0|17895696|17895697|89985297|89478485|89478485|89478485|17895765|273|71614464|89408580|89478485|5461|0|0|35790848|35790848|35791394|35791394|35791394|17895680|17895697|0|17895696|17895697|17895697|17895697|17895697|17895697|89985297|89478485|89478485|18175317|89478609|89478485|89478485|89478485|17913173|89478493|89478485|89478485|89478485|17913173|89478493|89478485|89478485|89478485|17913173|105207133|40265318|35791394|34|0|8738|0|0|35790848|107376162|35792486|2|35782656|2|17895696|17895697|17895697|33558801|35791394|35791394|35791394|17895680|17895697|4369|0|35791360|107374190|8806|35791392|0|35791392|17895680|19005440|89478493|89478485|89478485|89478485|89478485|89478485|18175317|17895697|17895697|89985297|89478485|89478485|89478485|89478485|36787541|8738");
_local1.menudemoTotalNum++;
_local1.menudemoList[11] = new MenuDemoData(13, 0, "508:35791360|2|35790848|0|0|0|71582796|107374180|35791398|35791394|2|0|35791394|35791394|35791394|35791394|107405858|107374182|107374182|107374182|6|69904|0|35651584|35791394|35791394|71614464|89408580|89478485|89478485|88360004|21|0|35651584|105137230|107374182|35792486|17826338|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|89480465|89478485|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|89985297|89478485|71582805|35808870|35791394|35791394|35791394|35791394|115483170|107374182|107374182|17896230|89478609|21845");
_local1.menudemoTotalNum++;
_local1.menudemoList[5] = new MenuDemoData(14, 3, "509:0|0|16777216|17895697|17895697|17895697|17895697|89480465|89478485|89478485|1135957|107374306|107374182|102|35790848|35791394|0|0|71754240|105137220|35791462|35791394|35791394|35791394|107374306|107374182|2236962|1118480|35791360|35791394|35791394|35791394|35791394|35791394|71585314|107234372|107374182|107374182|36071014|88361986|89478485|17896789|17895697|1118481|0|4352|201326592|73819748|22369348|1118481|17825792|17895697|17895697|89510161|89478485|89478485|89478485|69|1118480|0|35651584|35791394|35782658|201327138|88360004|71652693|68|0|17895680|17895697|89510161|89478485|349525");
_local1.menudemoTotalNum++;
_local1.menudemoList[12] = new MenuDemoData(15, 1, "508:0|0|17895424|17891345|219222289|89478485|4437|0|0|0|0|201326592|71582788|71582788|71582788|71582788|17896788|4369|0|35782656|35791394|107374190|107374182|107374182|107374182|18022|17891328|17895697|273|0|89474124|89478485|89478485|4543829|0|1114112|17825792|71584769|89474116|89478485|89478485|89478485|89478485|35782661|35791394|201466402|107365444|107374182|107374182|107374182|68|0|0|0|33554432|107374190|107374182|614|0|0|0|0|2236962|0|0|0|34|0|35651584|35791394|35791394|8738|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[19] = new MenuDemoData(16, 4, "585:0|16777216|17895697|89510161|17493|0|35791394|2236962|17895696|17895697|17895697|72093969|35808836|0|0|0|0|0|0|35791394|89474240|89478485|89478485|89478485|18175317|107373777|40265318|546|0|17891328|17895697|17895697|89478493|107369813|4482662|17895424|1|107367424|2|0|17895697|33554449|139810|0|17895697|17895697|17895697|69905|0|33554432|35791394|35791394|35791394|35791394|35791394|237117986|107374182|107374182|107374182|35791394|35791394|2|2236928|35791360|35791394|107880994|107374182|107374182|107374182|107374182|35808870|17834530|36770065|107374190|71722598|89474116|71652693|107373636|35791398|19014178|51450129|35791394|17904162|4369");
_local1.menudemoTotalNum++;
_local1.menudemoList[6] = new MenuDemoData(17, 1, "314:35791392|35791394|35791394|115483170|71722598|107234372|107374182|614|0|0|0|35790848|35791394|81928738|71582788|107373636|107374182|35808870|139810|0|0|0|0|0|0|0|0|16777216|17895697|17895697|219222289|89478485|89478485|89478485|17896789|4369|0|17825792|17895697|17895697|89480465|18175317|89478609|89478485|5592405");
_local1.menudemoTotalNum++;
_local1.menudemoList[0] = new MenuDemoData(18, 1, "224:0|35790848|35791394|107374306|107374182|107374182|107374182|36071014|2|0|17825792|17895697|33554705|71623202|17895424|17895697|17895697|35651585|35791394|17891362|17895697|17895697|17895697|16777216|1118481|0|17895680|17895697|35651584|2|107236352|107374182|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[2] = new MenuDemoData(19, 4, "1082:17895696|17895697|17895697|17895697|17895697|17895697|17895697|17895697|4369|33554432|139810|35791392|35791394|546|35782656|89410562|18175317|17895697|0|0|35782656|35791394|17895426|35782673|2236962|35791360|17895970|17895697|17895697|17895697|17895697|17896227|17895697|17895697|17895697|17895697|17895697|17895697|219222289|89478485|89478485|89478485|89478485|17913173|72089601|17891328|17895697|1118481|0|33554432|35791394|35791394|35791394|35791394|115483170|546|17895697|4369|4368|17895696|17895697|17895697|89480465|17895765|16777216|273|35790848|35791394|139810|33554432|107374306|35791462|35791394|139810|35651584|35791394|35791394|35791394|35791394|16777218|17895697|35791361|2236962|17895696|1|69904|0|1118480|17895696|17895697|17895697|17895697|17|35791360|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|34|0|0|0|0|17825792|17895697|17895697|17895697|71618833|107373636|107374182|107374182|2238054|35782656|17891330|17895697|17895441|69905|35791394|35791394|35791394|35791394|17895682|17895697|17895697|17895697|17895697|69905|35790848|35791394|35791394|35791394|35791394|35791394|35791394|34|35790848|35791394|8738|0|0|0|0|0|0|0|17895680|17825809|4369");
_local1.menudemoTotalNum++;
_local1.menudemoList[23] = new MenuDemoData(20, 2, "982:35790848|35791394|35791394|71583342|107373636|107374182|107374182|4474470|17895696|17895697|69905|0|115483168|107374182|107374182|107374182|35792486|71584770|71582788|71582788|71582788|89478485|89478485|89478485|17895701|17895697|80810257|71582788|89478484|279621|16777216|4369|0|17484|33554432|2236962|0|17895424|89480465|17895765|69905|35790848|35791394|107405858|107373638|40265318|34|0|17895697|17895697|71582929|89478485|22369621|17895697|17895697|0|17895697|22369745|71614464|35791392|35791394|35791394|2236962|218103808|89478485|89478468|89478485|17896789|17895697|35655953|107880994|107374182|107374182|107374182|107374182|35792486|35791394|2|0|33554432|546|17895697|17895697|35791633|35791394|2236962|0|0|17895697|17895697|89985297|89478485|89478485|35782997|35791394|107374306|107374182|107374182|107374182|36071014|0|71582912|89478485|85|0|35651584|35791394|35791394|35791394|35791394|16777762|17895697|17895697|17895697|17895697|17895697|17|35791392|35791394|35791394|35791394|35791394|35791394|40772130|35791394|35791394|35791394|35790848|0|35790848|34|33554432|8738|0|17891328|17895697|273|35791392|17895699|17895697|17");
_local1.menudemoTotalNum++;
_local1.menudemoList[18] = new MenuDemoData(21, 3, "433:17895697|17895697|17895697|17895697|17895697|17895697|17895697|18177297|17895697|0|0|0|0|0|0|0|0|107367424|35791462|35791394|34|0|17895424|4369|0|0|0|35791360|107374306|107374182|107374182|107374182|18114150|69905|35791394|107374306|107374182|73819750|0|0|35790848|107374306|107374182|107374182|26214|0|0|546|0|0|0|107374306|35791398|0|35791394|546|0|17895696|35791392|546|0|1118464");
_local1.menudemoTotalNum++;
_local1.menudemoList[8] = new MenuDemoData(22, 2, "664:17825792|4369|17895680|1118481|0|17895697|17895697|17895697|17895697|4369|17895424|17895697|69905|17895424|273|0|0|17891328|89985297|89478485|89478485|89478485|21|0|35791360|35791394|73821730|71582788|71582788|71582788|40125508|2|69904|0|0|0|35791392|2236962|71582796|71582788|107234372|40265318|546|2236416|0|0|35651584|2236962|35651584|139810|35790848|35791394|35791394|35791394|33554466|35791394|0|0|1118208|0|0|139776|33554432|2|202445056|71582788|71582788|107373636|40265318|0|17825792|17895697|17895697|71583069|89408580|71587157|89474116|71582805|71582788|4|35791394|17825792|17895697|1118481|0|71582796|71582788|71582788|88360004|89478485|89478485|89478485|89478485|89478485|5592405");
_local1.menudemoTotalNum++;
_local1.menudemoList[30] = new MenuDemoData(23, 3, "413:0|17895697|17895697|71618833|71582788|71582788|89408580|16777493|4369|0|1118464|0|2228224|0|88866816|89478485|89478485|4543829|17895424|17895697|17|17891328|17895697|17895697|97587473|89478485|89478485|89478485|17913173|89478493|18175317|17895697|17895697|35791377|17891362|17895697|17895697|16777217|17895697|17895697|17895697|17895697|17895697|1118481|0|35651584|35791394|35791394|35791394|107376162|71722598|88499780|89478485|35652693|546|97587472|89478485|22369621|17895697|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[13] = new MenuDemoData(24, 2, "770:35791360|35651586|35791394|35791394|115483170|107374182|107374182|107374182|107374182|107374182|71591526|71582788|17896772|17895697|17895697|17895697|1|0|0|0|0|0|71582912|71582788|71582788|107365444|107374182|2236962|0|0|0|35790848|0|35791394|107376162|107374182|107374182|107374182|107374182|35791398|35791394|35791394|35791394|35791394|107405858|35791398|35791394|35791394|35791394|35791394|35791394|0|0|0|0|17825792|17895697|17895697|69905|139264|8738|201326592|1092|35651584|35791394|35791394|139810|0|0|219222288|71582789|71582788|73811012|72696900|68|0|17895697|17895697|17895697|17895697|89478493|89478485|71587157|279620|0|0|17895696|89478609|89478485|349525|0|0|0|0|0|0|0|107374188|34|0|0|0|0|0|0|0|0|0|71582912|89478484|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[26] = new MenuDemoData(25, 2, "613:0|0|35651584|35791394|35791394|35791394|35791394|35791394|107376162|107374182|107374182|107374182|107374182|107374182|107374182|107374182|107374182|107374182|107374182|107374182|107374182|107374182|40265318|35791394|2236962|35791360|35782658|0|17895680|17895697|17895697|17895697|17895697|17895697|89478609|89478485|89478485|89478485|89478485|89478485|89478485|17913173|17895697|17895697|17895697|17895697|17895697|17895697|89510161|89478485|97587541|89478485|89478485|89478485|89478485|89510165|89478485|89478485|89478485|18175317|89480465|89478485|89478485|89478485|18175317|71582929|4|0|0|0|17891328|17895697|17895697|17895697|4369|0|0|0|0|17825792|69905|71584768|71582788|107374148|614|4474048|0|0");
_local1.menudemoTotalNum++;
_local1.menudemoList[9] = new MenuDemoData(26, 1, "263:17895680|17895697|17895697|17895697|17895697|69905|72089600|71582788|71582788|0|35651584|35791394|546|0|35791392|35791394|71623202|71582788|71583334|89478212|17749|17895697|273|139776|71614464|71582788|89474116|89478213|89478485|107374183|107374182|35792486|17826338|17895697|4369|16777216|33624337|26338");
_local1.menudemoTotalNum++;
_local1.menudemoList[31] = new MenuDemoData(27, 3, "773:16777216|17895697|89510161|89478485|17913173|17895697|1|0|0|0|0|33554432|0|17895424|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|97587473|89478485|108384529|107374182|107374182|107374182|107374182|107374182|9830|35791360|34|35782656|546|17895696|17895697|17895697|1|17891328|273|17825792|17|69888|0|1118480|17825792|273|17895424|1|17895680|0|89478476|89478485|89478485|89478485|17913173|69905|0|0|17895696|17895697|17895697|17895697|17|0|35651584|8738|35782656|35791394|35791394|2|17825792|17|0|0|0|35782656|2236962|0|17825792|69905|201326592|71582788|40125508|34|139776|0|0|2236960|35790848|2|71584768|107374180|107374182|107374182|107374182|8806|0|0|0|0|81920000|107374180|1638");
_local1.menudemoTotalNum++;
_local1.menudemoList[7] = new MenuDemoData(28, 4, "530:35791394|35791394|35791394|35791394|35791394|35791394|35791394|2|0|17895696|17895697|17895697|4369|16777216|17895697|17895697|17|17895697|17895697|17895697|17895697|17|0|0|4352|0|0|40264896|35791394|2|0|0|0|35651584|35791394|546|34|35791392|0|0|35790848|35791394|35791394|35791394|35791394|35791394|0|89985280|89478485|4373|17895696|0|17895424|17895680|17895697|17895697|17895697|17895697|107405313|107374182|40265318|139810|0|0|35782656|35791394|71582912|33554432|35791394|35791394|35791394|35791394|2236962|17891328|17895697|69905");
_local1.menudemoTotalNum++;
_local1.menudemoList[1] = new MenuDemoData(29, 0, "341:17895696|17895697|17895697|17895697|17895697|17895697|17895697|17895773|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|89478493|89478485|89478485|89478485|17913173|107374461|107374182|107374182|107374182|107374182|107374182|107374182|36071014|89985282|89478485|89478485|89478485|89478485|70997|0|0|139776|0|0|201326592|107374182|107374182|139878|0|0|0");
_local1.menudemoTotalNum++;
};
HELPDEMO_WELCOME = 0;
HELPDEMO_PLAYER = 1;
HELPDEMO_OBJECTS = 2;
HELPDEMO_ENEMIES = 3;
HELPDEMO_MOVEMENT = 4;
HELPDEMO_KEYS = 5;
HELPDEMO_RULES = 6;
HELPDEMO_WALLJUMPING = 7;
HELPDEMO_JUMPING1 = 8;
HELPDEMO_JUMPING2 = 9;
HELPDEMO_FALLING1 = 10;
HELPDEMO_FALLING2 = 11;
HELPDEMO_WALLSLIDING1 = 12;
HELPDEMO_WALLSLIDING2 = 13;
HELPDEMO_GOLD = 14;
HELPDEMO_EXIT = 15;
HELPDEMO_DOOR = 16;
HELPDEMO_TRAPDOOR = 17;
HELPDEMO_LOCKEDDOOR = 18;
HELPDEMO_BOUNCEBLOCK = 19;
HELPDEMO_LAUNCHPAD = 20;
HELPDEMO_ONEWAYPLATFORM = 21;
HELPDEMO_THWUMP = 22;
HELPDEMO_FLOORGUARD = 23;
HELPDEMO_ZAPDRONE = 24;
HELPDEMO_LASERDRONE = 25;
HELPDEMO_CHAINGUNDRONE = 26;
HELPDEMO_MINES = 27;
HELPDEMO_GAUSSTURRET = 28;
HELPDEMO_HOMINGLAUNCHER = 29;
NinjaData.prototype.BuildGameData_HelpDemos = function () {
var _local1 = this;
_local1.helpLevelStr = "000000000000000061111110000000003111100011111100011111111115000111111000150000010100001111110001000000101000011111100050000005010000111111000000000000500001111110000000000000000011111100000000000000000111111000000000000000001111110000000000000000?1111110000000000000000C111111000000000000000?1111111000000000000000C1111111000000000000003111111110000000000000311111111100000000000GK111111111100000000000119006111111000000;<000:=000011111100000011000000000111111000000:=00000000011111100<00000000000000111111001000000000000071111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
var temp = new Array();
temp.push("363:0|17895424|17895697|273|33554432|35791394|35791394|17834530|17895697|17895697|17895697|0|35791394|2236962|0|16777216|17|0|0|17895680|17895697|17895697|17895697|17|17825792|17895697|273|17825792|17895697|1|17895424|273|0|35791360|35791394|546|0|0|0|0|71582796|107374148|71591526|71582788|107373636|8742|35791360|0|17825792|17895697|17895697|1118481");
temp.push("743:0|17895424|17895697|273|35791392|139810|2236416|35651584|35790848|35791394|35782656|35791394|34|0|0|0|0|0|0|17825792|17895697|17|0|0|0|16777216|219222289|71582788|89478484|273|0|0|0|0|35791360|34|16777216|17895697|17895697|0|0|4368|0|35790848|237117986|107374182|107374182|107374182|107374182|107374182|2236966|88360012|89478485|89478485|89478485|89478485|17895697|17895697|1118481|35790848|35791394|546|17895696|17895697|17895697|17895697|273|35791360|35791394|139810|22371600|273|35782656|35791394|17895730|17895697|4369|35791392|35791394|35791394|35791394|139810|35790848|16785954|17895697|17895697|219222289|89478485|89478485|89478485|18175317|17895697|0|35791394|8738|0|89478592|71652693|71582788|5592132|0|35651584|35791394|35791394|35791394|35791394|2");
_local1.helpdemoList[HELPDEMO_WELCOME] = new HelpDemoData("5^540,60!0^504,156!0^480,156!0^492,144!0^384,348!0^372,360!0^396,336!6^276,300,4,1,0,3!6^132,84,1,1,0,2!12^168,240!12^108,180!12^504,264!12^348,84!12^156,360!2^228,432,0,-1!7^228,168,3!7^348,204,3!3^564,108", temp);
delete temp;
var temp1 = new Array();
temp1.push("716:17895424|17895697|0|0|4369|17825792|17895697|273|0|0|17891328|1|0|0|0|0|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|89478493|89478485|1398101|71582912|71582788|72089604|105137220|71591526|71582788|71722598|68|2236928|72089600|71582788|71582788|79692868|71582788|71582788|107374180|36071014|35791394|35791394|35791394|35791394|35791394|107374306|35791398|35791394|35791394|35791394|35791394|35791394|139810|0|0|0|0|35782656|2236962|0|0|0|0|0|0|0|0|0|0|0|17895697|17895697|71582813|4|0|107236352|107374182|107374182|107374182|107374182|107374182|79691780|89478468|89478485|89478485|89478485|17895697|17895697|69905|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_PLAYER] = new HelpDemoData("5^540,60", temp1);
delete temp1;
var temp2 = new Array();
temp2.push("966:35791392|34|71582796|107374148|1638|35791394|0|0|0|203563520|71582788|107374148|71582822|107374148|4482662|17895680|17895697|17895697|17895697|89480465|89478485|89478485|89478485|89478485|89478485|69973|0|35791360|107880994|17895684|4369|0|17895424|17895697|69905|0|17895680|4369|0|0|0|0|0|1118480|0|0|0|0|0|0|546|0|0|0|0|35782656|35791394|35791394|139810|0|201326592|35652676|34|0|0|17891328|273|17895424|17|0|0|0|0|0|0|0|0|0|0|17895696|17895697|17895697|17895697|273|35791394|35791394|35791394|35791394|35791394|35791394|139810|16777216|17895697|17895697|17895697|17895697|17895697|17895697|273|35782656|546|0|17895680|1|0|69888|0|0|0|17891328|1|35651584|237117986|71583334|107373636|107374182|107374182|4474470|0|0|107373644|419396|33571916|2236962|16777216|273|0|35791394|107405858|107374182|107374182|107374182|140902|71582796|89474116|17493|0|0|0");
_local1.helpdemoList[HELPDEMO_OBJECTS] = new HelpDemoData("5^132,252!1^276,300!2^216,432,0,-1!0^84,84!0^108,84!0^132,84!0^156,84!0^144,72!0^120,72!0^96,72!0^108,60!0^132,60!7^216,252,3!7^216,348,3!7^324,180,3!9^36,360,1,0,1,14,0,0,0!9^108,420,0,0,5,12,1,0,0!11^492,156,108,300!9^36,336,1,1,1,11,0,0,-1", temp2);
delete temp2;
var temp3 = new Array();
temp3.push("342:0|0|17895424|17895697|17|0|0|0|0|0|0|35791392|35791394|17825792|17895697|1|0|0|17895697|17895697|273|201326592|17476|0|0|17895680|17895697|17895697|17895697|71618833|71582788|72700996|68|71582796|79691844|71582788|79691780|71582788|71582788|1092|71582912|71582788|17476|107367424|35791394|16777250|17895697|1118481|0");
_local1.helpdemoList[HELPDEMO_ENEMIES] = new HelpDemoData("5^444,276!8^348,252,2!4^84,426,1!6^60,180,1,0,0,1!3^120,144!6^564,60,3,0,1,2!12^228,300!12^228,348!12^288,324!12^492,300!12^540,372!6^84,84,2,0,2,0!10^564,108", temp3);
delete temp3;
var temp4 = new Array();
temp4.push("500:0|0|17895696|17895697|17895697|17895697|17895697|0|0|0|0|0|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|2236962|35782656|35791394|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|16777216|17895697|17895697|17895697|17895697|17895697|1|0|0|35791392|35791394|35791394|35791394|35791394|35791394|35791394|2236962|17891328|17895697|17895697|17895697|17895697|4369|0|0|0|0");
_local1.helpdemoList[HELPDEMO_MOVEMENT] = new HelpDemoData("5^108,372", temp4);
delete temp4;
var temp5 = new Array();
temp5.push("930:0|0|0|0|0|0|35651584|35791394|35791394|35791394|35791394|8738|0|0|0|0|0|17891328|17895697|17895697|17895697|17895697|17895697|0|0|0|0|0|0|35791360|35791394|139810|0|0|0|0|0|0|4505600|0|0|0|0|0|35791394|35791394|2236962|0|0|0|0|0|0|71582912|71582788|71582788|71582788|71582788|71582788|71582788|1092|0|0|0|201326592|1092|0|0|0|0|0|201326592|71582788|71582788|71582788|107365444|107374182|107374182|35791398|139810|0|0|0|0|0|72089600|71582788|89478485|89478485|17895765|17895697|17895697|17895697|17895697|4369|0|35791394|35791394|35791394|35791394|107376162|107374182|107374182|107374182|107374182|107374182|107374182|35791394|35791394|35791394|35791394|35791394|35791394|0|71584768|89478484|89478485|89478485|89478485|89478485|89478485|89478485|22369621|17895697|17895697|17895697|17895697|17895697|1|0|0|0|0");
_local1.helpdemoList[HELPDEMO_KEYS] = new HelpDemoData("5^108,372", temp5);
delete temp5;
var temp6 = new Array();
temp6.push("437:0|0|17891328|17895697|1118481|0|0|0|17825792|273|0|0|17895696|17895697|17895697|17895697|17895697|17895697|17895697|17895697|219222289|71582805|71582788|71582788|72089600|71582788|279620|71584768|71582788|201326660|71582788|71582788|71582788|71614464|107374182|107374182|35791462|35791394|2|0|35791394|35791394|35791394|35791394|107880994|107374182|107374182|107374182|107374182|107374182|40265318|35791394|35791394|35791394|2|0|17825792|17895697|17895697|273|16777216|17895697|273");
_local1.helpdemoList[HELPDEMO_RULES] = new HelpDemoData("5^492,108", temp6);
delete temp6;
var temp7 = new Array();
temp7.push("527:0|0|0|0|0|0|0|17825792|17895697|17895697|17895697|1|0|0|0|35790848|35791394|35791394|72229410|71582788|71582788|71582788|1092|71582796|88360004|89478485|89478485|1118549|0|0|0|17825792|4369|0|0|17895424|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|89985297|71582789|71582788|17476|71582912|71582788|17476|71584768|71582788|1092|71582796|4473924|0|0|0|79691776|71582788|71582788|17476|0|79691776|71582788|71582788|71582788|279620|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_WALLJUMPING] = new HelpDemoData("5^528,420", temp7);
delete temp7;
var temp8 = new Array();
temp8.push("707:0|0|0|71614464|68|0|0|0|0|0|0|71584768|71582788|71582788|71582788|71582788|71582788|71582788|279620|0|0|0|0|71582796|71582788|71582788|89478485|71652693|279620|0|0|0|0|0|71584768|4|0|0|0|35791392|35791394|237117986|2254438|0|35790848|35791394|2|0|0|0|17895697|17895697|17895697|17895697|17895697|17895697|17895697|69905|0|0|0|71582796|0|0|0|33554432|35791394|35791394|107405858|107374182|107374182|107374182|107374182|107374182|35791398|35791394|35791394|107376162|107374182|35791398|107374190|35791462|107374306|107374182|40125542|35791394|8738|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_JUMPING1] = new HelpDemoData("5^180,300", temp8);
delete temp8;
var temp9 = new Array();
temp9.push("1125:0|0|35791394|107880994|102|35790848|35791394|35791394|35791394|35791394|35791394|35791394|35791394|33554432|35791394|35791394|35791394|35791394|107374190|35791462|2|0|35782656|35791394|107405858|107374182|9830|0|35790848|35791394|107376162|35808870|2|0|0|0|0|0|0|0|0|0|0|0|0|0|35790848|35791394|35791394|107880994|1094|0|0|0|0|0|0|0|0|71614464|71582788|71582788|71582788|71582788|68|35791360|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|34|0|0|0|79691776|71582788|71582788|71582788|71582788|71582788|279620|0|35791360|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|8738|0|0|79691776|71582788|71582788|71582788|71582788|71582788|0|0|0|0|0|0|89980928|71582805|71582788|71582788|68|0|0|35791394|35791394|35791394|35791394|35791394|237117986|107374182|107374182|35791394|35791394|107405858|40265318|115483170|71722598|17826884|17895697|17895697|17895697|69905|0|0|0|0|0|201326592|89474116|89478485|89478485|89478485|89478485|89478485|89478485|22369621|273|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_JUMPING2] = new HelpDemoData("5^180,300", temp9);
delete temp9;
var temp10 = new Array();
temp10.push("664:0|0|35651584|546|0|33554432|2|0|0|0|0|0|0|0|0|35791360|35791394|35791394|107374190|107374182|35791462|35791394|35791394|71614498|71582788|107374180|107374182|107374182|107374182|8738|0|0|16777216|17895697|17|17895680|0|0|17825792|1|0|0|0|0|0|0|17895424|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|219222289|71583061|71582788|68|71582796|79691844|71582788|17476|71582912|71582788|35651652|107376162|107374182|107374182|8738|0|0|0|35790848|35791394|35791394|35791394|0|0|35790848|0|0|34|0|35651584|546|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_FALLING1] = new HelpDemoData("5^180,300", temp10);
delete temp10;
var _local2 = new Array();
_local2.push("144:0|35791392|35791394|2|35651584|201466402|4473924|0|0|0|0|69888|0|0|0|0|0|0|0|0|0");
_local2.push("153:0|0|0|0|0|0|35790848|115483170|4473926|0|0|0|0|35790848|35791394|35791394|139810|33554432|35791394|35791394|35791394|2236962");
_local2.push("176:35791360|35791394|35791394|107376162|8738|0|0|0|0|0|0|0|17895680|17895697|17895697|17895697|17895697|17895697|17895697|17895697|69905|0|0|0|0|0");
_local2.push("181:0|0|16777216|17895697|1135965|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_FALLING2] = new HelpDemoData("5^108,84", _local2);
var temp12 = new Array();
temp12.push("307:0|0|17895680|89985297|17895765|1|0|0|0|0|17895424|17|0|0|0|35782656|0|17895697|17895697|17895697|1|0|0|0|0|35791360|35791394|35791394|546|0|17895696|17895697|17895697|1|35651584|8738|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_WALLSLIDING1] = new HelpDemoData("5^108,84", temp12);
delete temp12;
var temp13 = new Array();
temp13.push("743:0|0|0|35782656|2236962|71584768|107365444|107374182|107374182|35791398|35791394|35791394|35791394|35791394|115483170|107374182|107374182|107374182|237117990|107374182|107374182|107374182|107374182|237118054|107374182|107374182|107374182|107374182|35791394|71582946|71582788|4473924|0|0|0|35651584|35791394|35791394|35791394|35791394|35791394|35791394|8738|0|0|0|0|0|0|0|0|71582796|71582788|71582788|89478468|22369621|17|0|0|35791394|2236962|0|8738|201326592|105137220|107374182|35808870|2236962|35791394|35791394|35791394|115483170|107374182|107374182|35808870|107405858|107374182|107374182|35791398|546|0|0|35791394|35791394|35791394|107374306|157286|0|0|35782656|35791394|546|0|88360128|89478485|89478485|4474197|0|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_WALLSLIDING2] = new HelpDemoData("5^456,276", temp13);
delete temp13;
var temp14 = new Array();
temp14.push("443:0|0|0|0|17895680|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|71614737|71582788|279620|71582912|1092|4473932|72089600|71582788|68|79691776|71582788|71582788|71582788|35782724|546|0|0|35791394|35791394|35791394|35791394|35791394|107374306|35792486|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_GOLD] = new HelpDemoData("5^396,228!0^252,420!0^228,420!0^204,420!0^180,420!0^156,420!0^144,420!0^132,420!0^120,420!0^132,408!0^144,408!0^36,372!0^36,348!0^36,324!0^36,300!0^36,276!0^84,84!0^108,84!0^132,84!0^156,84", temp14);
delete temp14;
var temp15 = new Array();
temp15.push("608:0|0|17895680|17895697|17|33554432|35792494|34|0|35791392|0|201326592|89408580|89478485|89478485|89478485|89478485|89478485|18175317|17895697|17895697|17895697|17|0|0|35790848|35791394|35791394|35791394|107374306|107374182|35792486|0|0|0|35790848|546|0|17891328|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|89985297|71582789|71582788|71614464|71582788|1092|71582912|279620|71582912|17895748|71583185|71582788|71614464|71582788|1092|71582912|71582788|4473924|71614464|71582788|71582788|72089600|71582788|36071012|35791394|546|16777216|273|33554432|35791394|2|0|0|17895696|17895697|17|0|17895680|1118481");
_local1.helpdemoList[HELPDEMO_EXIT] = new HelpDemoData("5^492,156!11^132,252,48,228", temp15);
delete temp15;
var temp16 = new Array();
temp16.push("490:0|35651584|35791394|17484|0|35651584|2|0|17895424|17895697|17895697|17895697|17895697|17895697|4369|0|0|0|35791360|35791394|35791394|35791394|35791394|139810|0|0|0|0|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|97587473|71582805|4473924|71614464|71582788|201326660|71582788|79691780|71582788|71582788|71582788|35791398|8738|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_DOOR] = new HelpDemoData("5^132,252!9^144,300,0,0,5,12,0,0,0!9^36,360,1,0,1,14,0,0,0!9^36,264,1,0,1,11,0,0,-1", temp16);
delete temp16;
var temp17 = new Array();
temp17.push("660:35782656|35791394|35791394|35791394|546|0|0|0|0|17895680|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|72703249|71582788|79691776|71582788|68|71582796|1092|71584768|71582788|279620|0|0|0|0|0|0|0|0|0|0|0|139776|0|0|71582796|107374148|79691780|71582788|201326660|71582788|107234372|18022|71582912|71582788|279620|71584768|33554436|35791394|35791394|35791394|35791394|546|0|0|0|0|17895680|69905|17825792|17895697|33554433|35791394|35791394|35791394|17825826|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|1|35791394|35791394|35791394|35791394|34|33554432|35791394|546|35791360|35791394|0|0|0");
_local1.helpdemoList[HELPDEMO_TRAPDOOR] = new HelpDemoData("5^132,252!9^36,252,1,1,1,14,0,0,0!9^108,300,0,1,5,12,0,0,0", temp17);
delete temp17;
var temp18 = new Array();
temp18.push("755:35791360|35791394|546|35791360|34|0|0|17891328|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|71585041|71582788|71582788|79691780|89408580|72701269|0|17825792|97587473|89478485|89478485|201331029|71582788|279620|35791360|35791394|35791394|35791394|35791394|35791394|115483170|107374182|107374182|35791394|35791394|35791394|2236962|71582796|107374148|35792486|35791394|8738|0|0|17825792|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|72159505|71582788|71582788|4473924|71614464|71582788|71582788|79691844|71582788|71582788|201326660|71582788|71582788|279620|107376162|107374182|35791462|35791394|2|35651584|35791394|35791394|35791394|35791394|2|17895680|17895697|17|0|17891328|4369|0|17825792|17895697|17895697|17895697|1|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_LOCKEDDOOR] = new HelpDemoData("5^132,252!9^444,276,1,0,1,14,1,0,0!9^108,84,0,0,5,12,1,0,0", temp18);
delete temp18;
var temp19 = new Array();
temp19.push("1014:35782656|35791394|107880994|71582822|68|2236928|0|0|0|17895697|4369|0|0|17895696|0|0|0|0|0|35651584|34|0|0|0|107374156|107374182|107374182|107374182|70|0|0|0|237109248|107374182|107374182|71722598|4|0|17895680|17895697|17895697|17895697|72732945|71582788|88360004|22369621|4369|201326592|107234372|107374182|107374182|35791394|8738|0|0|0|17895424|17895697|17895697|89510161|17895701|17895697|0|35651584|35791394|88362530|89478485|89478485|89478485|4437|17825792|69905|17895697|17895697|17895697|33554705|35791394|35791394|17825826|17895697|273|35790848|35791394|107405858|71583334|17476|139808|35782656|512|71614464|107373636|140902|35651584|35791394|35791394|546|79691776|71582788|71582788|71582788|71582788|5592132|0|0|35782656|35791394|35791394|107374306|107374182|107374182|107374182|4|0|0|105644032|107374182|107374182|68|0|17895680|17895697|17895697|17895697|0|0|0|0|33554432|35791394|35791394|139810|0|0|0|0|0|0|0|0|0|0|0|0|0|0");
_local1.helpdemoList[HELPDEMO_BOUNCEBLOCK] = new HelpDemoData("5^132,252!1^252,276!1^360,228!1^420,96!1^264,96!1^516,360", temp19);
delete temp19;
var temp20 = new Array();
temp20.push("790:35782656|35791394|35791394|34|0|0|16777216|69905|0|0|0|35651584|139810|35782656|139810|0|201326592|71582788|17892420|17895697|0|4369|17891328|4369|35791360|2|2236928|33554432|2236962|0|0|0|16777216|17895697|17895697|17895697|17895697|17895697|35782656|35791394|546|0|0|0|0|35790848|0|17891328|17895697|17895697|219222289|5461|17891328|69905|0|17895697|17895697|17895697|17895697|69905|17825792|17895697|1|0|0|8738|0|69888|0|16777216|0|0|0|0|0|272|0|4368|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|35651584|2|0|33554432|2|0|0|8704|0|0|0");
_local1.helpdemoList[HELPDEMO_LAUNCHPAD] = new HelpDemoData("5^444,240!2^384,360,-0.707106781186547,-0.707106781186547!2^204,432,0,-1!2^168,264,0.707106781186547,-0.707106781186547!2^540,432,0,-1", temp20);
delete temp20;
var temp21 = new Array();
temp21.push("1257:35790848|35791394|35791394|0|0|0|17895697|17895697|4369|0|0|33554432|35791394|35791394|35791394|35791394|17825792|17895697|201330961|71582788|4473924|0|0|0|71614464|71582788|68|0|0|201326592|71582788|71582788|68|0|0|17895424|17895697|69905|0|0|35782656|8738|35790848|35791394|35791394|139810|0|17825792|69905|0|33554432|35791394|35791394|35791394|35791394|8738|17895697|1|71614464|107234372|107374182|107374182|107374182|107374182|107374182|35791394|35791394|35791394|2|17891328|17895697|17895697|17895697|17895697|17895697|17895697|69905|0|0|35791394|35791394|35791394|72229410|107365444|107374182|107374182|107374182|107374182|35792486|35791394|2|17825792|17895697|17895697|17895697|17895697|17895697|33554449|35791394|35791394|35791394|35791394|35791394|35791394|0|273|35791360|35791394|546|35791394|546|35791394|17825826|17895697|17895697|17895697|17895697|17895697|17895697|219222289|71583061|71582788|1092|71582796|17476|71584768|71582788|279620|72089600|71582788|71582788|201326660|107374182|107374182|35791398|35791394|35791394|35791394|35791394|35791394|35791394|107374306|107374182|35791398|35791394|35791394|8738|16777216|17895697|35782656|35791394|546|201396224|71582788|71582788|89474116|279637|0|0|0|0|107374190|107374182|35791462|35791394|35791394|546|17891328|17895697|17895697|17895697|0|0|69904|4368|16777489|4369|0|0|0");
_local1.helpdemoList[HELPDEMO_ONEWAYPLATFORM] = new HelpDemoData("5^132,84!7^228,156,3!7^228,204,3!7^228,252,3!7^228,300,3!7^516,60,0!7^516,36,0!7^492,120,3!7^204,348,1!7^228,348,1!7^252,348,1!7^276,372,2!7^276,396,2!7^276,420,2", temp21);
delete temp21;
var _local3 = new Array();
_local3.push("575:35791392|115483170|88360550|89478485|89478485|108492661|107374182|237118054|107374182|35791394|35791394|35791394|35791394|35791394|35791394|35791394|107374306|107374182|107374182|107374182|35792486|107405858|107374182|71582788|1092|0|0|4369|0|2236416|17825792|17895697|17895697|17895697|17895697|0|33554432|34|0|35651584|35791394|107374190|71591526|0|0|0|0|0|0|0|71584768|89478468|22369621|17895697|17895697|35782673|35791394|35791394|8738|17895697|17895697|0|0|0|35782656|546|17825792|17895697|35791360|201326626|1092|0|2228224|0|17895697|17895697|4369|35791394|546|33554432|546|89478492|5");
_local3.push("339:0|0|35651584|107880994|131074|16777216|17895697|35795217|35791394|35791394|35791394|35791394|35791394|35791394|35791394|107405858|107374182|36071014|35791394|35791394|107880994|71722598|71582788|71582788|33571908|17891362|4369|0|0|17895680|69905|0|4352|35782656|0|35651584|2|0|0|0|0|0|0|0|0|0|0|0|0");
_local3.push("507:0|35791360|34|0|0|0|71614464|21251140|17895697|17895697|17895697|72089873|107374180|107374182|107374182|107374182|139814|0|35651584|35791394|35651584|35791394|0|139810|33554432|2236962|33554432|139810|35782656|8738|35790848|34|0|33554432|546|0|0|35791360|35791394|35791394|35791394|35791394|35791394|107405858|107374182|107374182|35808870|35791394|107880994|35808870|34|35791394|2236962|0|0|0|0|0|0|0|0|17891328|97587473|89478485|89478485|89478485|89478485|71652693|8736|0|4352|0|0");
_local1.helpdemoList[HELPDEMO_THWUMP] = new HelpDemoData("5^168,300!8^492,228,1!8^324,252,2", _local3);
var temp23 = new Array();
temp23.push("650:35790848|35791394|35791394|18146|2236960|0|0|0|35791360|34|35791360|8738|0|0|0|33554432|2236962|0|16777216|71585041|88360004|17895701|17895697|17895697|17895697|17895697|35790848|35791394|107374306|107374182|107374182|35808870|8738|0|0|0|17895424|17895697|219222289|89478485|17895697|17|0|0|0|17895696|89985297|71582788|71582788|79691780|71582788|1092|71582796|279620|71614464|107365444|4613734|79691776|71582788|279620|0|0|107374156|107374182|40265318|8738|0|0|33554432|35791394|139810|0|139810|35782656|35791394|35791394|17825792|17895697|17895697|17895697|201330961|71582788|71582788|71582788|4473924|0|0|35651584|35791394|35791394|35790850|35651584|2236962");
_local1.helpdemoList[HELPDEMO_FLOORGUARD] = new HelpDemoData("5^120,240!4^120,306,1!4^252,426,1!4^156,90,1", temp23);
delete temp23;
var temp24 = new Array();
temp24.push("171:0|0|17895696|69905|0|35791360|0|16777216|17895697|17895697|219222289|89478485|89478485|89478485|89478485|71587157|71582788|71582788|71582788|71582788|71582788|71582788|89478212|89478485|21");
temp24.push("861:0|0|0|17895696|273|0|0|0|0|0|0|0|0|17895696|17|0|0|0|0|0|0|0|79691776|71582788|71582788|71582788|71582788|71582788|0|0|0|35790848|2|0|4369|0|35791394|34|0|0|0|17895697|17895697|202445073|71582788|89474116|71582789|105137220|107374182|107374182|107374182|4474470|0|35791394|2236962|0|33554432|35791394|35791394|35791394|35791394|35791394|35791394|35791394|34|17895697|0|0|17891328|4369|17891328|1118481|17895696|0|0|0|0|0|0|0|0|0|17895424|4369|35791394|35791394|35791394|8738|0|0|35791360|35791394|2236962|0|0|0|35791360|2|2236960|33554432|2236962|35791360|35791394|2236962|35782656|71582914|107373636|35791398|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|237117986|107374182|89474150|89478485|89478485|89478485|0");
_local1.helpdemoList[HELPDEMO_ZAPDRONE] = new HelpDemoData("5^540,48!6^492,156,1,0,0,2!6^36,300,0,1,0,3!6^276,156,3,0,0,2", temp24);
delete temp24;
var temp25 = new Array();
temp25.push("393:35790848|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|107405858|157286|0|35651584|8738|0|0|0|0|0|0|0|35782656|107376162|107374182|107374182|107374182|107374182|35808870|35791394|35791394|35791394|35791394|107405858|107374182|107374182|35808870|107880994|107374182|107374182|35808870|107376162|107374182|107374182|107374182|35808870|201466402|89474116|89478485|72701269|107374180|89409126|89478485|89478485|5");
_local1.helpdemoList[HELPDEMO_LASERDRONE] = new HelpDemoData("5^132,252!6^84,84,0,0,1,0", temp25);
delete temp25;
var temp26 = new Array();
temp26.push("554:0|0|0|35782656|35791394|237117986|107374182|107374182|107374182|107374182|107374182|71583334|17476|0|0|0|0|17895697|1118481|0|35651584|107374190|107374182|107374182|36071014|35791394|107880994|107374182|107374182|36071014|107376162|107374182|107374182|40265318|72098338|89478212|4474197|71584768|279620|35791392|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|2|0|0|0|0|0|0|115343360|107374182|107374182|35808870|107374190|107374182|107374182|107374182|40265318|8738|71582912|71582788|71582788|89478468|17913173|17895697|17895697|17895697|1118481|17825792|1118481|0|0|0");
_local1.helpdemoList[HELPDEMO_CHAINGUNDRONE] = new HelpDemoData("5^132,252!6^540,180,1,0,2,3!6^492,396,3,0,2,3!6^36,180,4,0,2,1", temp26);
delete temp26;
var temp27 = new Array();
temp27.push("615:17891328|17895697|17895697|72159505|71582788|71582788|72089604|71582788|4473924|71614464|89478468|17895701|17895697|97587473|89478485|89478485|89478485|89478485|17895701|89478609|89478485|89478485|89478485|17896789|72732945|71582788|107373636|107374182|35808870|237117986|2254438|17895696|0|35782656|35791394|35791394|4474082|35651584|8738|0|139810|0|0|0|0|35782656|34|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|273|35791360|35791394|35791394|35791394|35791394|35791394|35791394|115483170|35792486|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|2236962|17825792|17895697|17895697|89480465|89478485|89478485|89478485|89478485|89478485|89478485|89478485|89478485|89478485|1118485");
temp27.push("225:35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|35791394|139810|17891328|17895697|1|17891328|17895697|17895697|89985297|89478485|89478485|89478485|89478485|89478485|273|17825792|16777216|1118481|0|0");
_local1.helpdemoList[HELPDEMO_MINES] = new HelpDemoData("5^96,408!12^60,228!12^60,180!12^60,132!12^180,288!12^396,288!12^300,276!12^216,360!12^240,180!12^324,72!12^348,168", temp27);
delete temp27;
var temp28 = new Array();
temp28.push("259:0|0|35791392|139810|17895680|17895697|17|17891328|89478493|89478485|0|107374190|107374182|107374182|107374182|107374182|107374182|71582788|107234372|107374182|36071014|35791394|35791394|35791394|0|0|0|0|17895680|17895697|17895697|17895697|4475904|0|105168896|107374182|107374182|0");
_local1.helpdemoList[HELPDEMO_GAUSSTURRET] = new HelpDemoData("5^132,228!3^36,36!3^564,108!3^444,276!3^348,36", temp28);
delete temp28;
var temp29 = new Array();
temp29.push("699:0|35651584|2236418|0|0|0|0|35791392|0|0|0|0|0|0|0|0|17895696|17895697|71684369|71582788|107741184|40265318|107374306|107374182|107374182|107374182|107374182|35791394|546|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|17895697|71587281|71582788|72089604|71582788|201327684|71582788|17476|71582912|71582788|79691776|71582788|107234372|35808870|35791394|35791394|35791394|33554432|35791394|35791394|107880994|36071014|2|17895424|17895697|36901137|35791394|35791394|35791394|17825794|17895697|17895697|17895697|17895697|17895697|69905|0|0|0|35791394|546|71582796|107374182|107374182|107374182|107374182|35791394|35791394|35791394|107374306|71582788|35808870|35791394|35791394|71591650|89478212|72701269|107373636|6710886");
_local1.helpdemoList[HELPDEMO_HOMINGLAUNCHER] = new HelpDemoData("5^132,228!10^492,36", temp29);
delete temp29;
};
function NinjaUserData() {
var _local1 = this;
_local1.shared = SharedObject.getLocal("n_data");
if (_local1.shared.data.wasCreated != 1) {
_local1.shared.data.keyL = 37;
_local1.shared.data.keyR = 39;
_local1.shared.data.keyJ = 16;
_local1.shared.data.username = "anon";
_local1.shared.data.mission0ep = 0;
_local1.shared.data.mission1ep = 10;
_local1.shared.data.mission2ep = 20;
_local1.shared.data.wasCreated = 1;
_local1.shared.flush();
}
}
NinjaUserData.prototype.NotifyEpisodeReached = function (num) {
var _local1 = num;
var _local2 = this;
if (_local1 < 10) {
if (_local2.shared.data.mission0ep < _local1) {
_local2.shared.data.mission0ep = _local1;
_local2.shared.flush();
}
} else if (_local1 < 20) {
if (_local2.shared.data.mission1ep < _local1) {
_local2.shared.data.mission1ep = _local1;
_local2.shared.flush();
}
} else if (_local1 < 30) {
if (_local2.shared.data.mission2ep < _local1) {
_local2.shared.data.mission2ep = _local1;
_local2.shared.flush();
}
}
};
NinjaUserData.prototype.SetLeftKey = function (k) {
var _local1 = this;
_local1.shared.data.keyL = k;
_local1.shared.flush();
game.SetKeyDefs(_local1.shared.data.keyJ, _local1.shared.data.keyL, _local1.shared.data.keyR);
};
NinjaUserData.prototype.SetRightKey = function (k) {
var _local1 = this;
_local1.shared.data.keyR = k;
_local1.shared.flush();
game.SetKeyDefs(_local1.shared.data.keyJ, _local1.shared.data.keyL, _local1.shared.data.keyR);
};
NinjaUserData.prototype.SetJumpKey = function (k) {
var _local1 = this;
_local1.shared.data.keyJ = k;
_local1.shared.flush();
game.SetKeyDefs(_local1.shared.data.keyJ, _local1.shared.data.keyL, _local1.shared.data.keyR);
};
NinjaUserData.prototype.GetLeftKey = function () {
return(this.shared.data.keyL);
};
NinjaUserData.prototype.GetRightKey = function () {
return(this.shared.data.keyR);
};
NinjaUserData.prototype.GetJumpKey = function () {
return(this.shared.data.keyJ);
};
NinjaUserData.prototype.GetEpisodeReached = function (setNum) {
var _local1 = setNum;
var _local2 = this;
if (_local1 == 0) {
return(_local2.shared.data.mission0ep);
}
if (_local1 == 1) {
return(_local2.shared.data.mission1ep);
}
if (_local1 == 2) {
return(_local2.shared.data.mission2ep);
}
return(0);
};
NinjaUserData.prototype.ValidateEpisodeReached = function (num) {
var _local1 = num;
var _local2 = this;
if (_local1 < 10) {
if (_local1 <= _local2.shared.data.mission0ep) {
return(true);
}
} else if (_local1 < 20) {
if (_local1 <= _local2.shared.data.mission1ep) {
return(true);
}
} else if (_local1 < 30) {
if (_local1 <= _local2.shared.data.mission2ep) {
return(true);
}
} else {
return(false);
}
return(undefined);
};
function DebugPointTest_Constant(x0, y0, x1, y1, n) {
if (n <= 0) {
n = 1;
}
n = n + 1;
var vx = (x1 - x0);
var vy = (y1 - y0);
var len = Math.sqrt((vx * vx) + (vy * vy));
if (len == 0) {
if (QueryPointvsTileMap(x0, y0)) {
debug_rend.SetStyle(2, 8921634, 100);
debug_rend.DrawPlus_S(x0, y0, 4);
}
} else {
vx = vx / len;
vy = vy / len;
var _local1 = 0;
var _local3 = x0;
var _local2 = y0;
while (_local1 < len) {
if (QueryPointvsTileMap(_local3, _local2)) {
debug_rend.SetStyle(2, 8921634, 100);
debug_rend.DrawPlus_S(_local3, _local2, 4);
}
_local1 = _local1 + n;
_local3 = x0 + (_local1 * vx);
_local2 = y0 + (_local1 * vy);
}
if (QueryPointvsTileMap(x1, y1)) {
debug_rend.SetStyle(2, 8921634, 100);
debug_rend.DrawPlus_S(x1, y1, 4);
}
}
}
function DebugPointTest(x0, y0, x1, y1, n) {
if (n <= 0) {
n = 1;
}
n = n + 1;
var x;
var y;
var _local1;
var _local3;
var _local2 = 0;
while (_local2 < (n + 1)) {
_local1 = _local2 / n;
_local3 = 1 - _local1;
x = (_local1 * x0) + (_local3 * x1);
y = (_local1 * y0) + (_local3 * y1);
debug_rend.SetStyle(0, 0, 100);
debug_rend.DrawPlus_S(x, y);
if (QueryPointvsTileMap(x, y)) {
debug_rend.SetStyle(2, 8921634, 100);
debug_rend.DrawCircle(new Vector2(x, y), 4);
}
_local2++;
}
}
function DebugUpdateGameCode() {
var _local3 = input.getMousePos();
if (player.isDead) {
if (Key.isDown(16)) {
var v = input.getMouseDelta();
player.raggy.Shove(v.x * 0.1, v.y * 0.1);
}
if (APP_KEY_TRIG && (Key.isDown(32))) {
APP_KEY_TRIG = false;
if (player.raggy.exploded == false) {
player.raggy.Explode();
} else {
player.raggy.Unexplode();
}
}
if (Key.isDown(9)) {
player.raggy.pList.h0.pos.x = (player.raggy.pList.h0.oldpos.x = _local3.x);
player.raggy.pList.h0.pos.y = (player.raggy.pList.h0.oldpos.y = _local3.y);
}
if (APP_KEY_TRIG && (Key.isDown(13))) {
APP_KEY_TRIG = false;
player.pos.copy(_local3);
player.oldpos.copy(_local3);
player.Stand();
}
} else if (APP_KEY_TRIG && (Key.isDown(13))) {
APP_KEY_TRIG = false;
var _local2 = player.pos.x - _local3.x;
var _local1 = player.pos.y - _local3.y;
var len = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
if (len == 0) {
game.KillPlayer(KILLTYPE_SOFTBULLET, _local2 * 10, _local1 * 10, player.pos.x, player.pos.y, null);
} else {
_local2 = _local2 / len;
_local1 = _local1 / len;
if (Key.isDown(32)) {
game.KillPlayer(KILLTYPE_EXPLOSIVE, _local2 * 10, _local1 * 10, player.pos.x, player.pos.y, null);
} else {
game.KillPlayer(KILLTYPE_SOFTBULLET, _local2 * 10, _local1 * 10, player.pos.x, player.pos.y, null);
}
}
}
}
function CreateMC(linkName, instanceName) {
var _local2 = instanceName;
var _local3 = linkName;
var _local1 = gfx.GetNextDepth_Front();
if (_local3 == "EMPTY_MC") {
return(mcBuffer.createEmptyMovieClip(_local2, _local1));
}
if (_local3 == "TEXT_MC") {
return(mcBuffer.createTextField(_local2, _local1, 0, 0, 100, 100));
}
return(mcBuffer.attachMovie(_local3, _local2 + _local1, _local1));
}
DestroyMC = function (mc) {
mc.swapDepths(1048000);
mc.removeMovieClip();
};
function ParticleManager(buffer_f, buffer_b) {
var _local1 = this;
_local1.buffer_f = buffer_f;
_local1.buffer_b = buffer_b;
_local1.curDepthF = 0;
_local1.curDepthB = 0;
_local1.maxDepth = 100;
_local1.counterF = 0;
_local1.counterB = 0;
_local1.effectList = new Object();
var _local2 = new Array();
_local2.push("debugDustMC1");
_local2.push("debugDustMC2");
_local1.effectList[FXTYPE_SKIDDUST] = new ParticleEffect(_local2, 7, 3);
_local1.effectList[FXTYPE_JUMPDUST] = new ParticleEffect(_local2, 0, 0);
_local1.effectList[FXTYPE_RAGDUST] = new ParticleEffect(_local2, 10, 2);
var temp2 = new Array();
temp2.push("debugBloodSpurtMC1");
temp2.push("debugBloodSpurtMC2");
_local1.effectList[FXTYPE_BLOODSPURT] = new ParticleEffect(temp2, 0, 0);
var temp3 = new Array();
temp3.push("debugChainFlashMC1");
temp3.push("debugChainFlashMC2");
_local1.effectList[FXTYPE_CHAINFLASH] = new ParticleEffect(temp3, 0, 0);
var temp4 = new Array();
temp4.push("debugChainDebrisMC1");
temp4.push("debugChainDebrisMC2");
temp4.push("debugChainDebrisMC3");
_local1.effectList[FXTYPE_CHAINDEBRIS] = new ParticleEffect(temp4, 0, 0);
var temp5 = new Array();
temp5.push("debugChainBulletMC1");
_local1.effectList[FXTYPE_CHAINBULLET] = new ParticleEffect(temp5, 0, 0);
var temp6 = new Array();
temp6.push("debugLaserSparkMC1");
temp6.push("debugLaserSparkMC2");
temp6.push("debugLaserSparkMC3");
_local1.effectList[FXTYPE_LASERSPARK] = new ParticleEffect(temp6, 6, 4);
var temp7 = new Array();
temp7.push("debugLaserChargeMC1");
temp7.push("debugLaserChargeMC2");
temp7.push("debugLaserChargeMC3");
_local1.effectList[FXTYPE_LASERCHARGE] = new ParticleEffect(temp7, 2, 3);
var temp8 = new Array();
temp8.push("debugZapMC1");
temp8.push("debugZapMC2");
temp8.push("debugZapMC3");
_local1.effectList[FXTYPE_ZAP] = new ParticleEffect(temp8, 0, 0);
var _local3 = new Array();
_local3.push("debugZapVMC1");
_local3.push("debugZapVMC2");
_local3.push("debugZapVMC3");
_local1.effectList[FXTYPE_ZAPV] = new ParticleEffect(_local3, 0, 0);
var temp10 = new Array();
temp10.push("debugTurretBulletMC1");
_local1.effectList[FXTYPE_TURRETBULLET] = new ParticleEffect(temp10, 0, 0);
var temp11 = new Array();
temp11.push("debugTurretDebrisMC1");
_local1.effectList[FXTYPE_TURRETDEBRIS] = new ParticleEffect(temp11, 0, 0);
var temp12 = new Array();
temp12.push("debugFireBallMC1");
temp12.push("debugFireBallMC2");
temp12.push("debugFireBallMC3");
_local1.effectList[FXTYPE_FIREBALL] = new ParticleEffect(temp12, 0, 0);
var temp13 = new Array();
temp13.push("debugFireBurstMC1");
temp13.push("debugFireBurstMC2");
_local1.effectList[FXTYPE_FIREBURST] = new ParticleEffect(temp13, 0, 0);
var temp14 = new Array();
temp14.push("debugRocketSmokeMC1");
temp14.push("debugRocketSmokeMC2");
temp14.push("debugRocketSmokeMC3");
_local1.effectList[FXTYPE_ROCKETSMOKE] = new ParticleEffect(temp14, 3, 2);
}
function ParticleEffect(linkage, rate, rand) {
var _local1 = this;
_local1.mcList = linkage;
_local1.mcNum = _local1.mcList.length;
_local1.rand = rand;
_local1.rate = rate;
_local1.counter = _local1.rate;
}
FXTYPE_SKIDDUST = 0;
FXTYPE_JUMPDUST = 1;
FXTYPE_BLOODSPURT = 2;
FXTYPE_RAGDUST = 3;
FXTYPE_CHAINBULLET = 4;
FXTYPE_CHAINDEBRIS = 5;
FXTYPE_CHAINFLASH = 6;
FXTYPE_LASERSPARK = 7;
FXTYPE_LASERCHARGE = 8;
FXTYPE_ZAP = 9;
FXTYPE_ZAPV = 10;
FXTYPE_TURRETBULLET = 11;
FXTYPE_TURRETDEBRIS = 12;
FXTYPE_FIREBURST = 13;
FXTYPE_FIREBALL = 14;
FXTYPE_ROCKETSMOKE = 15;
ParticleManager.prototype.SpawnParticle_Rand = function (FXTYPE) {
var _local1 = this;
var _local2 = _local1.effectList[FXTYPE];
_local2.counter = _local2.counter - ((_local1.counter++) % _local2.rand);
if (_local2.counter < 0) {
var _local3 = _local1.buffer_f.attachMovie(_local2.mcList[_local1.curDepthF % _local2.mcNum], "pfx" + _local1.curDepthF, _local1.curDepthF);
_local2.counter = _local2.rate;
if (_local1.maxDepth < (_local1.curDepthF++)) {
_local1.curDepthF = 0;
_local1.counterF = 0;
}
return(_local3);
}
return(0);
};
ParticleManager.prototype.SpawnParticle_Int = function (FXTYPE) {
var _local1 = this;
var _local2 = _local1.effectList[FXTYPE];
_local2.counter = _local2.counter - 1;
if (_local2.counter < 0) {
var _local3 = _local1.buffer_f.attachMovie(_local2.mcList[_local1.curDepthF % _local2.mcNum], "pfx" + _local1.curDepthF, _local1.curDepthF);
_local2.counter = _local2.rate;
if (_local1.maxDepth < (_local1.curDepthF++)) {
_local1.curDepthF = 0;
_local1.counterF = 0;
}
return(_local3);
}
return(0);
};
ParticleManager.prototype.SpawnParticle = function (FXTYPE) {
var _local1 = this;
var _local2 = _local1.effectList[FXTYPE];
var _local3 = _local1.buffer_f.attachMovie(_local2.mcList[_local1.curDepthF % _local2.mcNum], "pfx" + _local1.curDepthF, _local1.curDepthF);
if (_local1.maxDepth < (_local1.curDepthF++)) {
_local1.curDepthF = 0;
_local1.counterF = 0;
}
return(_local3);
};
ParticleManager.prototype.SpawnParticleB = function (FXTYPE) {
var _local1 = this;
var _local2 = _local1.effectList[FXTYPE];
var _local3 = _local1.buffer_b.attachMovie(_local2.mcList[_local1.curDepthB % _local2.mcNum], "pfx" + _local1.curDepthB, _local1.curDepthB);
if (_local1.maxDepth < (_local1.curDepthB++)) {
_local1.curDepthB = 0;
_local1.counterB = 0;
}
return(_local3);
};
ParticleManager.prototype.SpawnFloorDust = function (pos, rad, norm, rot, dir, strength) {
var _local1 = this.SpawnParticle_Rand(FXTYPE_SKIDDUST);
if (_local1 != 0) {
_local1._x = pos.x - (norm.x * rad);
_local1._y = pos.y - (norm.y * rad);
_local1._rotation = (rot - (dir * 8)) + ((Math.random() * 10) - 5);
_local1._xscale = dir * (10 + (strength * 10));
_local1._yscale = 10;
}
};
ParticleManager.prototype.SpawnWallDust = function (pos, rad, norm, strength) {
var _local2 = rad;
var _local3 = norm;
var _local1 = this.SpawnParticle_Rand(FXTYPE_SKIDDUST);
if (_local1 != 0) {
_local1._x = pos.x - (_local3.x * _local2);
_local1._y = (pos.y - (_local3.y * _local2)) - (((Math.random() * _local2) * 2) - _local2);
_local1._rotation = (90 - (_local3.x * 8)) + ((Math.random() * 10) - 5);
_local1._xscale = 10 + (strength * 20);
_local1._yscale = 10;
}
};
ParticleManager.prototype.SpawnJumpDust = function (px, py, rot) {
var _local2 = 1;
var _local3 = 4;
while (_local3--) {
var _local1 = this.SpawnParticle(FXTYPE_JUMPDUST);
_local1._x = px;
_local1._y = py;
_local1._rotation = (rot - (_local2 * 20)) + ((Math.random() * 20) - 10);
_local1._xscale = _local2 * (10 + (Math.random() * 8));
_local1._yscale = 10 + (Math.random() * 5);
_local2 = _local2 * -1;
}
};
ParticleManager.prototype.SpawnLandDust = function (px, py, rot, strength) {
var _local3 = strength;
var _local2 = 1;
var n = 4;
while (n--) {
var _local1 = this.SpawnParticle(FXTYPE_JUMPDUST);
_local1._x = px;
_local1._y = py;
_local1._rotation = (rot - (_local2 * 40)) + ((Math.random() * 20) - 10);
_local1._xscale = _local2 * ((5 + (Math.random() * 5)) + _local3);
_local1._yscale = 15 + (_local3 * 2);
_local2 = _local2 * -1;
}
};
ParticleManager.prototype.SpawnBloodSpurt = function (px, py, vx, vy, n) {
var _local3 = vy;
while (n--) {
var _local2 = this.SpawnParticle(FXTYPE_BLOODSPURT);
var _local1 = Math.random;
_local2._x = px - ((_local1() * 8) - 4);
_local2._y = py - ((_local1() * 8) - 4);
_local2._xscale = (vx * (6 + (_local1() * 3))) - ((_local1() * 60) - 30);
_local2._yscale = (_local3 * (6 + (_local1() * 3))) - ((_local1() * 60) - 30);
}
};
ParticleManager.prototype.SpawnRagBloodSpurt = function (px, py, vx, vy) {
var _local2 = this.SpawnParticle(FXTYPE_BLOODSPURT);
var _local1 = Math.random;
_local2._x = px - ((_local1() * 8) - 4);
_local2._y = py - ((_local1() * 8) - 4);
_local2._xscale = (vx * (6 + (_local1() * 3))) - ((_local1() * 40) - 20);
_local2._yscale = (vy * (6 + (_local1() * 3))) - ((_local1() * 40) - 20);
};
ParticleManager.prototype.SpawnRagDust = function (pos, rad, nx, ny, strength) {
var _local2 = ny;
var _local3 = nx;
var _local1 = this.SpawnParticle_Rand(FXTYPE_RAGDUST);
if (_local1 != 0) {
_local3 = _local3 / strength;
_local2 = _local2 / strength;
_local1._x = pos.x - (_local3 * rad);
_local1._y = pos.y - (_local2 * rad);
_local1._rotation = NormToRot(_local3, _local2) + ((Math.random() * 20) - 10);
_local1._xscale = 20 + (2 * strength);
_local1._yscale = 10;
}
};
ParticleManager.prototype.SpawnRocketSmoke = function (pos, rot) {
var _local1 = this.SpawnParticle_Rand(FXTYPE_ROCKETSMOKE);
if (_local1 != 0) {
_local1._x = pos.x;
_local1._y = pos.y;
_local1._rotation = rot + (10 * ((Math.random() * 2) - 1));
_local1._xscale = 20 + (Math.random() * 20);
_local1._yscale = 20 + (Math.random() * 20);
}
};
ParticleManager.prototype.SpawnRocketDeath = function (pos, rot) {
var mc1 = this.SpawnParticle(FXTYPE_FIREBALL);
var mc2 = this.SpawnParticle(FXTYPE_FIREBALL);
var _local3 = this.SpawnParticle(FXTYPE_FIREBALL);
var _local2 = this.SpawnParticle(FXTYPE_FIREBALL);
mc1._x = (mc2._x = (_local3._x = (_local2._x = pos.x)));
mc1._y = (mc2._y = (_local3._y = (_local2._y = pos.y)));
var _local1 = Math.random;
var r1 = _local1();
var r2 = _local1();
var r3 = _local1();
var r4 = _local1();
var r5 = _local1();
mc1._xscale = (mc2._xscale = 20 + (r3 * 20));
_local3._xscale = (_local2._xscale = 20 + (r4 * 30));
mc1._yscale = (_local2._yscale = 20 + (r5 * 20));
mc2._yscale = (_local3._yscale = 20 + (r1 * 10));
mc1._rotation = rot + (r1 * 20);
mc2._rotation = rot - (r2 * 30);
_local3._rotation = rot + (r5 * 40);
_local2._rotation = rot - (r3 * 40);
};
ParticleManager.prototype.SpawnExplosion = function (pos) {
var mc = this.SpawnParticle(FXTYPE_FIREBURST);
var mc1 = this.SpawnParticle(FXTYPE_FIREBALL);
var mc2 = this.SpawnParticle(FXTYPE_FIREBALL);
var _local3 = this.SpawnParticle(FXTYPE_FIREBALL);
var _local2 = this.SpawnParticle(FXTYPE_FIREBALL);
mc._x = (mc1._x = (mc2._x = (_local3._x = (_local2._x = pos.x))));
mc._y = (mc1._y = (mc2._y = (_local3._y = (_local2._y = pos.y))));
var _local1 = Math.random;
var r1 = _local1();
var r2 = _local1();
var r3 = _local1();
var r4 = _local1();
var r5 = _local1();
mc._xscale = 15 + (r1 * 15);
mc._yscale = 15 + (r2 * 15);
mc1._xscale = (mc2._xscale = 20 + (r3 * 20));
_local3._xscale = (_local2._xscale = 20 + (r4 * 30));
mc1._yscale = (_local2._yscale = 20 + (r5 * 20));
mc2._yscale = (_local3._yscale = 20 + (r1 * 10));
mc1._rotation = 360 * r1;
mc2._rotation = 360 * r2;
_local3._rotation = 360 * r5;
_local2._rotation = 360 * r3;
};
ParticleManager.prototype.SpawnTurretBullet = function (a, b, rot) {
var _local3 = this.SpawnParticle(FXTYPE_TURRETBULLET);
_local3._x = a.x;
_local3._y = a.y;
_local3._xscale = b.x - a.x;
_local3._yscale = b.y - a.y;
var _local2 = this.SpawnParticle(FXTYPE_TURRETDEBRIS);
var _local1 = this.SpawnParticle(FXTYPE_TURRETDEBRIS);
_local2._x = (_local1._x = b.x);
_local2._y = (_local1._y = b.y);
var rnd = Math.random;
_local2._xscale = (_local1._yscale = 40 + (rnd() * 20));
_local1._xscale = (_local2._yscale = 20 + (rnd() * 40));
_local2._rotation = rot + (5 + (rnd() * 15));
_local1._rotation = rot - (5 + (rnd() * 15));
};
ParticleManager.prototype.SpawnLaserSpark = function (pos, dx, dy) {
var _local1 = this.SpawnParticleB_Int(FXTYPE_LASERCHARGE);
if (_local1 != 0) {
_local1._x = pos.x;
_local1._y = pos.y;
_local1._xscale = (-dx) * (30 + (40 * ((Math.random() * 2) - 1)));
_local1._yscale = (-dy) * (30 + (40 * ((Math.random() * 2) - 1)));
}
};
ParticleManager.prototype.SpawnLaserCharge = function (pos) {
var _local1 = this.SpawnParticle_Rand(FXTYPE_LASERCHARGE);
if (_local1 != 0) {
_local1._x = pos.x;
_local1._y = pos.y;
_local1._xscale = 20 + (Math.random() * 20);
_local1._yscale = 10 + (Math.random() * 20);
_local1._rotation = Math.random() * 360;
}
};
ParticleManager.prototype.SpawnZap = function (px, py, rot) {
var _local2 = Math.random;
var _local3 = 6;
while (_local3--) {
var _local1 = this.SpawnParticle(FXTYPE_ZAP);
_local1._x = px;
_local1._y = py;
_local1._xscale = 30 + (_local2() * 30);
_local1._yscale = 30 + (_local2() * 20);
_local1._rotation = rot + (20 * ((_local2() * 2) - 1));
}
};
ParticleManager.prototype.SpawnZapThwompH = function (pos, xw, yw, targ) {
var _local3 = xw;
var _local2 = Math.random;
var n = 6;
while (n--) {
var _local1 = this.SpawnParticle(FXTYPE_ZAP);
_local1._x = pos.x + _local3;
_local1._y = (pos.y - yw) + (yw * _local2());
_local1._xscale = (4 * _local3) + (20 * ((_local2() * 2) - 1));
_local1._yscale = 60 + (60 * _local2());
}
};
ParticleManager.prototype.SpawnZapThwompV = function (pos, xw, yw, targ) {
var _local3 = xw;
var _local2 = Math.random;
var n = 6;
while (n--) {
var _local1 = this.SpawnParticle(FXTYPE_ZAPV);
_local1._y = pos.y + yw;
_local1._x = (pos.x - _local3) + (_local3 * _local2());
_local1._yscale = (4 * yw) + (20 * ((_local2() * 2) - 1));
_local1._xscale = 60 + (60 * _local2());
}
};
ParticleManager.prototype.SpawnChainBullet = function (a, b, len, rot) {
var r1 = ((Math.random() * 2) - 1);
var r2 = ((Math.random() * 2) - 1);
var r3 = ((Math.random() * 2) - 1);
var _local1 = this.SpawnParticle(FXTYPE_CHAINFLASH);
var mcb = this.SpawnParticle(FXTYPE_CHAINBULLET);
mcb._xscale = len;
_local1._x = (mcb._x = a.x);
_local1._y = (mcb._y = a.y);
_local1._xscale = 30 + (r1 * 10);
_local1._yscale = 20 + (r2 * 20);
_local1._rotation = (mcb._rotation = rot);
var _local3 = this.SpawnParticle(FXTYPE_CHAINDEBRIS);
var _local2 = this.SpawnParticle(FXTYPE_CHAINDEBRIS);
_local3._x = (_local2._x = b.x);
_local3._y = (_local2._y = b.y);
_local3._xscale = 30 + (15 * r2);
_local2._xscale = 30 + (15 * r3);
rot = rot - 180;
_local3._rotation = rot + (15 * r1);
_local2._rotation = rot + (15 * r2);
};
ParticleManager.prototype.SpawnParticle_Debug = function (PTYPE, x, y, rot, dir, scalex, scaley) {
};
function NinjaGraphicsSystem() {
var _local1 = this;
_local1.front_depth = 1000;
_local1.back_depth = 1000;
_local1.stepsize = 100;
_local1.bufferList = new Object();
_local1.bufferList[LAYER_BACKGROUND] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_WALLS] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_PARTICLES_BACK] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_OBJECTS] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_PLAYER] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_PARTICLES_FRONT] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_TILES] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_TILES2] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_EDITOR] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_CONSOLE] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.bufferList[LAYER_GUI] = _local1.CreateSpriteBuffer(_local1.GetNextDepth_Front());
_local1.depthList = new Object();
_local1.depthList[LAYER_BACKGROUND] = 0;
_local1.depthList[LAYER_TILES] = 0;
_local1.depthList[LAYER_TILES2] = 0;
_local1.depthList[LAYER_WALLS] = 0;
_local1.depthList[LAYER_OBJECTS] = 0;
_local1.depthList[LAYER_PLAYER] = 0;
_local1.depthList[LAYER_PARTICLES_FRONT] = 0;
_local1.depthList[LAYER_PARTICLES_BACK] = 0;
_local1.depthList[LAYER_EDITOR] = 0;
_local1.depthList[LAYER_CONSOLE] = 0;
_local1.depthList[LAYER_GUI] = 0;
_local1.reservedList = new Object();
}
LAYER_BACKGROUND = 0;
LAYER_TILES = 1;
LAYER_WALLS = 2;
LAYER_OBJECTS = 3;
LAYER_PLAYER = 4;
LAYER_PARTICLES_FRONT = 5;
LAYER_EDITOR = 6;
LAYER_CONSOLE = 7;
LAYER_GUI = 7;
LAYER_TILES2 = 8;
LAYER_PARTICLES_BACK = 9;
NinjaGraphicsSystem.prototype.CreateSpriteBuffer = function (depth) {
var _local1 = _root.createEmptyMovieClip("spritebuffer" + depth, depth);
_local1._x = 0;
_local1._y = 0;
return(_local1);
};
NinjaGraphicsSystem.prototype.CreateSprite = function (linkage, layerID) {
var _local2 = layerID;
var _local3 = this.bufferList[_local2];
if (_local3 == null) {
return(null);
}
var _local1 = this.depthList[_local2];
var mc = _local3.attachMovie(linkage, linkage + _local1, _local1);
this.depthList[_local2] = this.depthList[_local2] + 1;
return(mc);
};
NinjaGraphicsSystem.prototype.CreateEmptySprite = function (layerID) {
var _local2 = layerID;
var _local3 = this.bufferList[_local2];
if (_local3 == null) {
return(null);
}
var _local1 = this.depthList[_local2];
var mc = _local3.createEmptyMovieClip("emptyMC" + _local1, _local1);
this.depthList[_local2] = this.depthList[_local2] + 1;
return(mc);
};
NinjaGraphicsSystem.prototype.DestroyMC = function (mc) {
mc.swapDepths(1048000);
mc.removeMovieClip();
};
NinjaGraphicsSystem.prototype.CreateBuffer = function (mcDepth) {
var _local1 = mcDepth;
if (this.reservedList[_local1] != null) {
} else {
this.reservedList[_local1] = _local1;
var _local3 = "buffer" + _local1;
var _local2 = _root.createEmptyMovieClip(_local3, _local1);
_local2._x = Stage.width / 2;
_local2._y = Stage.height / 2;
return(_local2);
}
return(undefined);
};
NinjaGraphicsSystem.prototype.GetLayerDepth = function (layerID) {
var _local1 = this.depthList[layerID];
if (_local1 != null) {
return(_local1);
}
return(undefined);
};
NinjaGraphicsSystem.prototype.GetNextDepth_Front = function () {
var _local1 = this;
_local1.front_depth = _local1.front_depth + _local1.stepsize;
return(_local1.front_depth);
};
NinjaGraphicsSystem.prototype.GetNextDepth_Back = function () {
var _local1 = this;
_local1.back_depth = _local1.back_depth - _local1.stepsize;
return(_local1.back_depth);
};
function NormToRot_U(dx, dy) {
var _local1 = Math.atan2(dy, dx) / (Math.PI/180);
return(_local1);
}
function NormToRot(dx, dy) {
var _local1 = Math.atan2(dy, dx) / (Math.PI/180);
return(_local1);
}
function NinjaGUI() {
var _local1 = this;
var _local3 = _root;
_local1.levelnameMC = gfx.CreateSprite("guiLevelNameMC", LAYER_GUI);
_local1.levelnameMC._x = 396;
_local1.levelnameMC._y = 580;
_local1.levelnameMC._visible = false;
var depth = gfx.GetNextDepth_Front();
_local1.input_txtbox = _local3.attachMovie("inputBox", "inputBox" + depth, depth);
_local1.input_txtbox._x = 450;
_local1.input_txtbox._y = 50;
_local1.input_txtbox.tabEnabled = false;
_local1.input_txtbox.backgroundColor = 16316664 /* 0xF8F8F8 */;
_local1.input_txtbox._visible = false;
var depth = gfx.GetNextDepth_Front();
_local1.input_txtbox2 = _local3.attachMovie("inputBox2", "inputBox" + depth, depth);
_local1.input_txtbox2._x = 450;
_local1.input_txtbox2._y = 200;
_local1.input_txtbox2.tabEnabled = false;
_local1.input_txtbox2.backgroundColor = 16316664 /* 0xF8F8F8 */;
_local1.input_txtbox2._visible = false;
_local1.timeMC = gfx.CreateSprite("timeIndicator", LAYER_GUI);
_local1.timeMC._x = APP_TILE_SCALE * 2;
_local1.timeMC._y = APP_TILE_SCALE;
_local1.timeMC.bar._xscale = 0;
_local1.timeMC.txtbox._y = -8;
_local1.playerDisplayTime = 0;
var depth = gfx.GetNextDepth_Front();
_local3.createTextField("ninjaGUITextField", depth, 0, 0, 545, 290);
_local1.textmenuMC = _local3.ninjaGUITextField;
_local1.textmenuMC.multiline = true;
_local1.textmenuMC.wordWrap = true;
_local1.textmenuMC.selectable = false;
_local1.textmenuMC.border = false;
var _local2 = new TextFormat();
_local2.color = 0;
_local2.font = "_typewriter";
_local2.size = 12;
_local2.align = "left";
_local1.textmenuMC.setNewTextFormat(_local2);
_local1.textmenuMC._x = 44;
_local1.textmenuMC._y = 300;
_local1.menuMC = gfx.CreateSprite("MenuMC", LAYER_GUI);
_local1.menuMC._x = 0;
_local1.menuMC._y = 0;
_local1.menuMC.gotoAndStop("blank");
_local1.menuMC._visible = false;
_local1.textlineMC = gfx.CreateSprite("guiTextLineMC", LAYER_GUI);
_local1.textlineMC._x = 44;
_local1.textlineMC._y = 240;
_local1.textlineMC._visible = false;
_local1.InitData();
}
NinjaGUI.prototype.SetPlayerTime = function (t) {
this.playerDisplayTime = t;
};
NinjaGUI.prototype.ResetPlayerTime = function () {
this.playerDisplayTime = 0;
};
NinjaGUI.prototype.FillPlayerTime = function (cur, maxT) {
var _local1 = this;
var dt = (cur - _local1.playerDisplayTime);
_local1.playerDisplayTime = _local1.playerDisplayTime + (0.05 * dt);
var ratio = (_local1.playerDisplayTime / (maxT * 2));
_local1.timeMC.bar._xscale = Math.min(700, 600 * ratio);
_local1.timeMC.bar.gotoAndStop(Math.max(1, Math.min(101 - Math.floor(100 * ratio), 101)));
var _local2 = _local1.playerDisplayTime * APP_GAMETIME_TICKLEN;
var _local3 = Math.floor(_local2 / 1000);
_local2 = Math.floor(_local2 - (_local3 * 1000));
_local1.timeMC.txtbox.txt = (("" + _local3) + ".") + _local2;
_local1.timeMC.txtbox._x = Math.floor(_local1.timeMC.bar._xscale) + 1;
};
NinjaGUI.prototype.DrawPlayerTime = function (cur, maxT) {
var _local1 = this;
var amt = (cur / maxT);
var _local3 = 1 - amt;
_local3 = Math.min(1, Math.max(0.05, _local3 * _local3));
var dt = (cur - _local1.playerDisplayTime);
_local1.playerDisplayTime = _local1.playerDisplayTime + (_local3 * dt);
var ratio = (_local1.playerDisplayTime / (maxT * 2));
_local1.timeMC.bar._xscale = Math.min(700, 600 * ratio);
_local1.timeMC.bar.gotoAndStop(Math.max(1, Math.min(101 - Math.floor(100 * ratio), 101)));
var _local2 = _local1.playerDisplayTime * APP_GAMETIME_TICKLEN;
var s = Math.floor(_local2 / 1000);
_local2 = Math.floor(_local2 - (s * 1000));
_local1.timeMC.txtbox.txt = (("" + s) + ".") + _local2;
_local1.timeMC.txtbox._x = Math.floor(_local1.timeMC.bar._xscale) + 1;
};
NinjaGui.prototype.DrawLevelName = function (str) {
this.levelnameMC._visible = true;
this.levelnameMC.txt = str;
};
NinjaGui.prototype.ShowInGame = function () {
this.levelnameMC._visible = true;
this.timeMC._visible = true;
};
NinjaGui.prototype.HideInGame = function () {
this.levelnameMC._visible = false;
this.timeMC._visible = false;
};
NinjaGUI.prototype.HideAll = function () {
var _local1 = this;
_local1.menuMC._visible = false;
_local1.textmenuMC._visible = false;
_local1.textlineMC._visible = false;
_local1.HideTxt();
};
NinjaGUI.prototype.ShowAll = function () {
var _local1 = this;
_local1.menuMC._visible = true;
_local1.textmenuMC._visible = true;
_local1.textlineMC._visible = true;
};
NinjaGUI.prototype.HideMenu = function () {
this.menuMC._visible = false;
};
NinjaGUI.prototype.ShowMenu = function () {
this.menuMC._visible = true;
};
NinjaGUI.prototype.HideTextMenu = function () {
this.textmenuMC._visible = false;
this.textlineMC._visible = false;
};
NinjaGUI.prototype.ShowTextMenu = function () {
this.textmenuMC._visible = true;
this.textlineMC._visible = true;
};
NinjaGUI.prototype.DisplayRawText = function (str) {
this.textmenuMC._visible = true;
this.textmenuMC.text = str;
};
NinjaGUI.prototype.DisplayTextBar = function (GUI_ID) {
var _local1 = this;
_local1.textlineMC._visible = true;
_local1.textlineMC.txt = _local1.guiList[GUI_ID];
};
NinjaGUI.prototype.AppendToTextBar = function (str) {
this.textlineMC.txt = this.textlineMC.txt + str;
};
NinjaGUI.prototype.Display = function (GUI_ID) {
var _local1 = this;
var _local2 = GUI_ID;
if (_local1.guiList[_local2] == null) {
} else if (GUI_LAST_STRING_INDEX < _local2) {
var frm = _local1.guiList[_local2];
_local1.DisplayFrame(frm);
} else {
var _local3 = _local1.guiList[_local2];
var temp = typeof(_local3);
if (temp == "string") {
_local1.DisplayString(_local3);
} else {
_local1.DisplayList(_local3);
}
}
};
NinjaGUI.prototype.GetCurrentMC = function () {
return(this.menuMC);
};
NinjaGUI.prototype.DisplayFrame = function (frm) {
var _local1 = this;
_local1.textmenuMC._visible = false;
_local1.textlineMC._visible = false;
_local1.menuMC._visible = true;
_local1.menuMC.gotoAndStop(frm);
};
NinjaGUI.prototype.DisplayString = function (str) {
var _local1 = this;
_local1.menuMC._visible = false;
_local1.textmenuMC._visible = false;
_local1.textlineMC._visible = true;
_local1.textlineMC.txt = str;
};
NinjaGUI.prototype.DisplayList = function (strList) {
var _local2 = this;
var _local3 = strList;
_local2.menuMC._visible = false;
_local2.textlineMC._visible = false;
_local2.textmenuMC._visible = true;
_local2.textmenuMC.text = "";
var _local1 = 0;
while (_local1 < _local3.length) {
_local2.textmenuMC.text = _local2.textmenuMC.text + _local3[_local1];
_local2.textmenuMC.text = _local2.textmenuMC.text + newline;
_local1++;
}
};
TXTBOX_TOP = 0;
TXTBOX_BOTTOM = 1;
NinjaGUI.prototype.GetTxt = function (boxNum) {
var _local1 = boxNum;
var _local2 = this;
_local2.ShowTxt();
if (_local1 == TXTBOX_TOP) {
return(_local2.input_txtbox.txt);
}
if (_local1 == TXTBOX_BOTTOM) {
return(_local2.input_txtbox2.txt);
}
return(undefined);
};
NinjaGUI.prototype.SetTxt = function (boxNum, str) {
var _local1 = boxNum;
var _local2 = this;
_local2.ShowTxt();
if (_local1 == TXTBOX_TOP) {
_local2.input_txtbox.txt = str;
} else if (_local1 == TXTBOX_BOTTOM) {
_local2.input_txtbox2.txt = str;
}
};
NinjaGUI.prototype.HideTxt = function () {
this.input_txtbox._visible = (this.input_txtbox2._visible = false);
};
NinjaGUI.prototype.ShowTxt = function () {
this.input_txtbox._visible = (this.input_txtbox2._visible = true);
};
GUI_LOADINGAPP = 0;
GUI_CONFIRMQUIT = 1;
GUI_LOADINGLEVEL = 2;
GUI_PRELEVEL = 3;
GUI_PAUSE = 4;
GUI_RETRYLEVEL = 5;
GUI_POSTLEVEL = 6;
GUI_DEBUGMENU = 7;
GUI_RESETTINGLEVEL = 8;
GUI_TEMP_EDITOR = 9;
GUI_TILE_EDITOR = 10;
GUI_OBJ_EDITOR = 11;
GUI_INGAMEDEMO = 12;
GUI_PASSEDEPISODE = 13;
GUI_RETRYLEVEL_SUICIDE = 14;
GUI_BEATGAME = 15;
GUI_GAMEOVER = 16;
GUI_KEYCONFIG = 17;
GUI_LAST_STRING_INDEX = 17;
GUI_MAINMENU = 18;
GUI_CONTINUE = 19;
GUI_HELP = 20;
GUI_STORY = 21;
GUI_GOODBYE1 = 22;
GUI_GOODBYE2 = 23;
GUI_GOODBYE3 = 24;
GUI_GOODBYE4 = 25;
GUI_VICTORY = 26;
GUI_PLAYMENU = 27;
GUI_CONFIGURE = 28;
GUI_DEFEAT = 29;
NinjaGUI.prototype.InitData = function () {
var _local1 = this;
_local1.guiList = new Object();
_local1.guiList[GUI_LOADINGAPP] = "loading app..";
_local1.guiList[GUI_CONFIRMQUIT] = "really quit? (y/n)";
_local1.guiList[GUI_LOADINGLEVEL] = "loading level... (please wait)";
_local1.guiList[GUI_PRELEVEL] = "level loaded; press [spacebar] to begin";
_local1.guiList[GUI_PAUSE] = "[game paused] P: unpause Q: quit to mainmenu";
_local1.guiList[GUI_RETRYLEVEL] = "ouch... press [spacebar] to try again, [R] to watch replay";
_local1.guiList[GUI_POSTLEVEL] = "level complete! press [spacebar] to load next level.";
_local1.guiList[GUI_RESETTINGLEVEL] = "resetting level... (please wait)";
_local1.guiList[GUI_INGAMEDEMO] = "instant replay... press [spacebar] to try again.";
_local1.guiList[GUI_RETRYLEVEL_SUICIDE] = "harsh, guy! press [spacebar] to try again.";
_local1.guiList[GUI_BEATGAME] = "you have achieved transcendence!!! ..[spacebar] for main menu";
_local1.guiList[GUI_GAMEOVER] = "..you ran out of time. GAME OVER. press [spacebar] for main menu";
_local1.guiList[GUI_PASSEDEPISODE] = "";
_local1.guiList[GUI_KEYCONFIG] = "press your desired key; [Q] to abort";
_local1.guiList[GUI_HELP] = "help_menu";
_local1.guiList[GUI_STORY] = "story_menu";
_local1.guiList[GUI_MAINMENU] = "main_menu";
_local1.guiList[GUI_CONTINUE] = "continue_menu";
_local1.guiList[GUI_GOODBYE1] = "credits1";
_local1.guiList[GUI_GOODBYE2] = "credits2";
_local1.guiList[GUI_GOODBYE3] = "credits3";
_local1.guiList[GUI_GOODBYE4] = "credits4";
_local1.guiList[GUI_VICTORY] = "beatgame";
_local1.guiList[GUI_DEFEAT] = "gameover";
_local1.guiList[GUI_PLAYMENU] = "play_menu";
_local1.guiList[GUI_CONFIGURE] = "config_menu";
var temp2 = new Array();
temp2.push("");
temp2.push("**** DEBUG MENU ****");
temp2.push("[M]: mainmenu");
temp2.push("[L]: load level (from textbox)");
temp2.push("[S]: save level (to clipboard)");
temp2.push("[J]: load empty map");
temp2.push("[E]: edit level");
temp2.push("[P]: continue playing level");
temp2.push("[R]: reset objects");
temp2.push("---");
temp2.push("[1]: begin recording demo");
temp2.push("[2]: stop recording demo");
temp2.push("[Q]: begin demo playback (WARNING: resets objects)");
temp2.push("[W]: end demo playback");
temp2.push("[3]: load demo (from textbox)");
temp2.push("[4]: save demo (to clipboard)");
_local1.guiList[GUI_DEBUGMENU] = temp2;
delete temp2;
var _local2 = new Array();
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("");
_local2.push("+++++++++++++< Ned >+++++++++++++");
_local2.push(" [insert]: obj editor");
_local2.push(" [delete]: tile editor");
_local2.push(" [PGDN]: save data (to txtbox)");
_local2.push(" [PGUP]: load data (from txtbox)");
_local2.push("------------------------");
_local2.push("[~] or [\\]: back to debug menu");
_local1.guiList[GUI_TEMP_EDITOR] = _local2;
var temp4 = new Array();
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("");
temp4.push("---(editing tiles)---");
temp4.push("[insert]: obj editor");
temp4.push(" [home]: edit menu");
_local1.guiList[GUI_TILE_EDITOR] = temp4;
delete temp4;
var _local3 = new Array();
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("");
_local3.push("--(editing objects)---");
_local3.push("[backspace + click]: delete object");
_local3.push("[delete]: tile editor");
_local3.push(" [home]: edit menu");
_local1.guiList[GUI_OBJ_EDITOR] = _local3;
};
function ConsoleObject(x, y, w, h) {
var _local1 = this;
_local1.CONSOLE_KEY = 109;
_local1.CONSOLE_KEY_WAS_DOWN = false;
_local1.UP_KEY = 105;
_local1.DN_KEY = 99;
_local1.SCROLL_WAS_DOWN = false;
_local1.SCROLLSPEED = 4;
_local1.SCROLLCOUNTER = 0;
_local1.fontsize = 12;
_local1.numLines = 16;
_local1.maxLen = 80;
_local1.tabs = 0;
_local1.buffer = new Array();
_local1.buffer.push("\n====[N]====");
_local1.txt = "";
_local1.topLine = 0;
_local1.botLine = 0;
_local1.pos = new Vector2(44, 28);
_local1.dimensions = new Vector2(w, h);
_local1.curpos = new Vector2(x, y);
var _local3 = gfx.GetNextDepth_Front();
_root.createTextField("consoleTxtField", _local3, _local1.pos.x, _local1.pos.y, w, h);
_local1.mc = _root.consoleTxtField;
_local1.mc.multiline = true;
_local1.mc.wordWrap = true;
_local1.mc.selectable = false;
_local1.mc.embedFonts = true;
var _local2 = new TextFormat();
_local2.color = 0;
_local2.font = "n_uni05_53";
_local2.size = 8;
_local2.align = "left";
_local1.mc.setNewTextFormat(_local2);
_local1.mc.setTextFormat(_local2);
_local1.active = true;
}
ConsoleObject.prototype.AnimateIn = function () {
var _local1 = this;
var _local2 = _local1.pos.x - _local1.curpos.y;
if (Math.abs(_local2) < 20) {
_local1.curpos.y = _local1.pos.y;
_local1.Animate = null;
} else {
_local1.curpos.y = _local1.curpos.y + (_local2 * 0.15);
}
_local1.mc._y = _local1.curpos.y;
};
ConsoleObject.prototype.AnimateOut = function () {
var _local1 = this;
var _local2 = (-_local1.dimensions.y) - _local1.curpos.y;
if (Math.abs(_local2) < 20) {
_local1.curpos.y = -_local1.dimensions.y;
_local1.Animate = null;
_local1.mc._visible = false;
} else {
_local1.curpos.y = _local1.curpos.y + (_local2 * 0.15);
}
_local1.mc._y = _local1.curpos.y;
};
ConsoleObject.prototype.Update = function () {
var _local1 = this;
_local1.Animate();
if (Key.isDown(_local1.CONSOLE_KEY)) {
if (!_local1.CONSOLE_KEY_WAS_DOWN) {
_local1.CONSOLE_KEY_WAS_DOWN = true;
_local1.Toggle();
}
} else {
_local1.CONSOLE_KEY_WAS_DOWN = false;
}
if (_local1.active) {
var _local2 = 0;
if (Key.isDown(_local1.UP_KEY)) {
_local2 = _local2 - 1;
} else if (Key.isDown(_local1.DN_KEY)) {
_local2 = _local2 + 1;
} else {
_local1.SCROLL_WAS_DOWN = false;
}
if (_local2 != 0) {
if (!_local1.SCROLL_WAS_DOWN) {
_local1.SCROLL_WAS_DOWN = true;
_local1.SCROLLCOUNTER = 0;
_local1.topline = Math.max(0, Math.min(_local1.buffer.length - _local1.numLines, _local1.topline + _local2));
} else if (_local1.SCROLLSPEED < (_local1.SCROLLCOUNTER++)) {
_local1.SCROLL_WAS_DOWN = false;
}
}
_local1.Refresh();
}
};
ConsoleObject.prototype.Show = function () {
var _local1 = this;
_local1.mc._visible = true;
_local1.active = true;
_local1.Animate = _local1.AnimateIn;
};
ConsoleObject.prototype.Hide = function () {
var _local1 = this;
_local1.active = false;
_local1.Animate = _local1.AnimateOut;
};
ConsoleObject.prototype.Toggle = function () {
var _local1 = this;
if (_local1.active) {
_local1.Hide();
} else {
_local1.Show();
}
};
ConsoleObject.prototype.Refresh = function () {
var _local2 = this;
_local2.txt = "";
var _local1 = _local2.topLine;
while (_local1 < _local2.buffer.length) {
_local2.txt = _local2.txt + _local2.buffer[_local1];
_local1++;
}
_local2.mc.text = _local2.txt;
};
ConsoleObject.prototype.Clear = function () {
var _local1 = this;
delete _local1.buffer;
_local1.buffer = new Array();
_local1.txt = "====[N]====";
_local1.mc.text = _local1.txt;
_local1.tabs = 0;
_local1.curLine = 0;
};
ConsoleObject.prototype.AddLine = function (str) {
var _local2 = str;
var _local3 = this;
var _local1 = 0;
while (_local1 < _local3.tabs) {
_local2 = "\t" + _local2;
_local1++;
}
_local2 = newline + _local2;
_local3.botLine++;
_local3.topLine = Math.max(_local3.topLine, _local3.botLine - _local3.numLines);
_local3.buffer.pop();
_local3.buffer.push(_local2);
_local3.buffer.push("\n====[N]====");
};
ConsoleObject.prototype.Append = function (str) {
var _local1 = this;
var _local2 = str;
if ((_local1.maxLen - (_local1.tabs * 4)) < (_local1.buffer[_local1.buffer.length - 2].length + _local2.length)) {
_local1.AddLine(_local2);
} else {
_local1.buffer[_local1.buffer.length - 2] = _local1.buffer[_local1.buffer.length - 2] + _local2;
}
};
ConsoleObject.prototype.StartTab = function () {
this.tabs++;
};
ConsoleObject.prototype.StopTab = function () {
this.tabs = Math.max(0, this.tabs - 1);
};
function StartApp() {
_root.onEnterFrame = RunApp;
Key.addListener(_root);
APP_KEY_TRIG = false;
APP_KEY_PRESSED = false;
APP_t0 = getTimer();
APP_FPSBOX = gfx.CreateSprite("fpsBox", LAYER_GUI);
APP_FPSBOX._x = 0;
APP_FPSBOX._y = 580;
}
function RunApp() {
var _local2 = APP_t0;
APP_t0 = getTimer();
var _local1 = APP_t0 - _local2;
APP_FPSBOX.txt = "" + Math.ceil(_local1);
input.Update();
console.Update();
TickApp();
}
function CloseApp() {
}
function SetActiveProcess(func) {
TickApp = func;
}
function AppBuildModules() {
CURRENT_APP_BUILD_STEP = -1;
SetActiveProcess(AppBuildingModules);
}
function AppBuildingModules() {
if (CURRENT_APP_BUILD_STEP == -1) {
console = new ConsoleObject(16, 16, 600, 300);
CURRENT_APP_BUILD_STEP++;
console.Clear();
console.AddLine("Building App Modules:");
console.StartTab();
console.AddLine("ConsoleObject built.");
gui = new NinjaGUI();
console.AddLine("NinjaGUI built.");
gui.Display(GUI_LOADINGAPP);
} else if (CURRENT_APP_BUILD_STEP == 0) {
tiles = new TileMap(31, 23, APP_TILE_SCALE, APP_TILE_SCALE);
CURRENT_APP_BUILD_STEP++;
console.AddLine("TileMap built.");
console.StartTab();
console.AddLine("initing TileMapCells.");
} else if (CURRENT_APP_BUILD_STEP == 1) {
console.Append(".");
if (!tiles.Building()) {
console.StopTab();
CURRENT_APP_BUILD_STEP++;
}
} else if (CURRENT_APP_BUILD_STEP == 2) {
objects = new ObjectManager();
CURRENT_APP_BUILD_STEP++;
console.AddLine("ObjectManager built.");
} else if (CURRENT_APP_BUILD_STEP == 3) {
userdata = new NinjaUserData();
CURRENT_APP_BUILD_STEP++;
console.AddLine("NinjaUserData built.");
} else if (CURRENT_APP_BUILD_STEP == 4) {
game = new NinjaGame();
CURRENT_APP_BUILD_STEP++;
console.AddLine("NinjaGame built.");
} else if (CURRENT_APP_BUILD_STEP == 5) {
editor = new NinjaEditor();
CURRENT_APP_BUILD_STEP++;
console.AddLine("NinjaEditor built.");
} else if (CURRENT_APP_BUILD_STEP == 6) {
gamedata = new NinjaData();
CURRENT_APP_BUILD_STEP++;
console.AddLine("NinjaData built.");
} else {
console.StopTab();
App_LoadMainMenu();
}
}
_root.onKeyDown = function () {
if (!APP_KEY_PRESSED) {
APP_KEY_TRIG = true;
} else {
APP_KEY_TRIG = false;
}
APP_KEY_PRESSED = true;
};
_root.onKeyUp = function () {
APP_KEY_PRESSED = false;
};
function App_LoadMainMenu() {
var _local1 = new Sound();
_local1.stop();
App_StartLoadingMenuDemo();
App_StartMainMenu();
}
function App_StartMainMenu() {
APP_PRE_QUIT = false;
App_PlayerDeathEvent = App_PlayerDeathEvent_Normal;
App_LevelPassedEvent = App_PlayerDeathEvent_Normal;
gui.HideInGame();
gui.Display(GUI_MAINMENU);
SetActiveProcess(App_Tick_MainMenu);
}
function GUIEvent_MainMenu_Help() {
console.Show();
game.StopDemoPlayback();
var _local1 = new Sound();
_local1.stop();
App_StartHelp();
}
function GUIEvent_MainMenu_Story() {
console.Hide();
gui.Display(GUI_STORY);
}
function GUIEvent_MainMenu_Quit() {
console.Hide();
App_StartQuit();
}
function GUIEvent_MainMenu_Credits() {
console.Hide();
App_StartCredits();
}
function GUIEvent_MainMenu_PlayGame() {
App_StartPlayMenu();
}
function GUIEvent_MainMenu_Configure() {
App_StartConfigMenu();
}
function GUIEvent_MainMenu_ContinueGame() {
App_StartContinue();
}
function App_Tick_MainMenu() {
if (APP_PRE_QUIT) {
if (APP_KEY_TRIG && (Key.isDown(89))) {
APP_KEY_TRIG = false;
App_Quit();
return(undefined);
}
if (APP_KEY_TRIG && (Key.isDown(78))) {
APP_KEY_TRIG = false;
App_StartMainMenu();
}
} else {
if (APP_KEY_TRIG && (Key.isDown(72))) {
APP_KEY_TRIG = false;
GUIEvent_MainMenu_Help();
return(undefined);
}
if (APP_KEY_TRIG && (Key.isDown(83))) {
APP_KEY_TRIG = false;
GUIEvent_MainMenu_Story();
return(undefined);
}
if (APP_KEY_TRIG && (Key.isDown(81))) {
APP_KEY_TRIG = false;
GUIEvent_MainMenu_Quit();
return(undefined);
}
if (APP_KEY_TRIG && (Key.isDown(78))) {
APP_KEY_TRIG = false;
GUIEvent_MainMenu_PlayGame();
return(undefined);
}
if (APP_KEY_TRIG && (Key.isDown(67))) {
APP_KEY_TRIG = false;
GUIEvent_MainMenu_Configure();
return(undefined);
}
if ((APP_KEY_TRIG && (Key.isDown(192))) || (APP_KEY_TRIG && (Key.isDown(220)))) {
APP_KEY_TRIG = false;
game.StopDemoPlayback();
App_StartNewGame_Debug();
return(undefined);
}
if (APP_KEY_TRIG && (Key.isDown(101))) {
APP_KEY_TRIG = false;
GUIEvent_MainMenu_ContinueGame();
return(undefined);
}
if (APP_KEY_TRIG && (Key.isDown(96))) {
APP_KEY_TRIG = false;
GUIEvent_MainMenu_Credits();
return(undefined);
}
}
App_UpdateMainMenu();
}
function App_StartLoadingMenuDemo() {
App_PlayerDeathEvent = App_PlayerDeathEvent_Normal;
App_LevelPassedEvent = App_PlayerDeathEvent_Normal;
App_UpdateMainMenu = App_UpdateMainMenu_LoadDemo;
game.InitNewGame();
var _local1 = gamedata.GetCurrentMenuDemoID();
App_LoadMenuDemo(_local1);
gamedata.IncrementCurrentMenuDemo();
console.Show();
}
function App_UpdateMainMenu_LoadDemo() {
if (!App_LoadingMenuDemo()) {
console.Hide();
game.InitNewLevel();
game.StartDemoPlayback();
App_UpdateMainMenu = App_UpdateMainMenu_TickDemo;
App_ResetGameTime();
}
}
function App_UpdateMainMenu_TickDemo() {
if ((game.GetDemoTickCount() - game.GetTime()) < -100) {
var _local1 = new Sound();
_local1.stop();
game.StopDemoPlayback();
App_StartLoadingMenuDemo();
} else {
App_UpdateGame_Demo();
}
}
function App_StartPlayMenu() {
gui.Display(GUI_PLAYMENU);
SetActiveProcess(App_TickPlayMenu);
var ep0 = userdata.GetEpisodeReached(0);
var ep1 = userdata.GetEpisodeReached(1);
var ep2 = userdata.GetEpisodeReached(2);
var menuMC = gui.GetCurrentMC();
var i = 0;
while (i < 10) {
var but = eval (((menuMC + ".playmenu") + ".e") + i);
if (i <= ep0) {
but.num.text = "0" + i;
but.onRollOver = function () {
this.gfx.gotoAndStop(2);
};
but.onRollOut = function () {
this.gfx.gotoAndStop(1);
};
} else {
but.num.text = "";
but.enabled = false;
}
i++;
}
var i = 10;
while (i < 20) {
var but = eval (((menuMC + ".playmenu") + ".e") + i);
if (i <= ep1) {
but.num.text = "" + i;
but.onRollOver = function () {
this.gfx.gotoAndStop(2);
};
but.onRollOut = function () {
this.gfx.gotoAndStop(1);
};
} else {
but.num.text = "";
but.enabled = false;
}
i++;
}
var i = 20;
while (i < 30) {
var but = eval (((menuMC + ".playmenu") + ".e") + i);
if (i <= ep2) {
but.num.text = "" + i;
but.onRollOver = function () {
this.gfx.gotoAndStop(2);
};
but.onRollOut = function () {
this.gfx.gotoAndStop(1);
};
} else {
but.num.text = "";
but.enabled = false;
}
i++;
}
}
function App_TickPlayMenu() {
App_UpdateMainMenu();
}
function App_EpisodeButtonClicked(txt) {
if (txt == "") {
} else {
var _local1 = Number(txt);
if (!userData.ValidateEpisodeReached(_local1)) {
gamedata.ResetEpisode();
console.AddLine("Access Denied: " + _local1);
} else if (gamedata.LoadEpisodeNum(_local1)) {
var _local2 = new Sound();
_local2.stop();
App_StartNewGame();
}
}
}
function App_StartContinue() {
gui.Display(GUI_CONTINUE);
SetActiveProcess(App_TickContinue);
}
function App_TickContinue() {
App_UpdateMainMenu();
}
function App_ReadInputContinueCode() {
var _local2 = gui.GetCurrentMC().continuemenu;
var _local1 = _local2.txt;
App_SubmitContinueCode(_local1);
}
function App_SubmitContinueCode(code) {
if (gamedata.LoadEpisode(code)) {
var _local1 = new Sound();
_local1.stop();
App_StartNewGame();
} else {
gamedata.ResetEpisode();
console.AddLine("Invalid Episode Code.");
App_StartMainMenu();
}
}
function App_StartCredits() {
var _local1 = Math.random();
if (_local1 < 0.25) {
gui.Display(GUI_GOODBYE4);
} else if (_local1 < 0.5) {
gui.Display(GUI_GOODBYE3);
} else if (_local1 < 0.75) {
gui.Display(GUI_GOODBYE2);
} else {
gui.Display(GUI_GOODBYE1);
}
SetActiveProcess(App_TickCredits);
}
function App_TickCredits() {
if (APP_KEY_TRIG) {
APP_KEY_TRIG = false;
App_ResetGameTime();
App_StartMainMenu();
}
}
function App_StartConfigMenu() {
gui.Display(GUI_CONFIGURE);
SetActiveProcess(App_TickConfigure);
var menuMC = gui.GetCurrentMC();
var jbut = eval (menuMC + ".configmenu.jbut");
var lbut = eval (menuMC + ".configmenu.lbut");
var rbut = eval (menuMC + ".configmenu.rbut");
jbut.keyname.text = App_GetKeyName(userdata.GetJumpKey());
lbut.keyname.text = App_GetKeyName(userdata.GetLeftKey());
rbut.keyname.text = App_GetKeyName(userdata.GetRightKey());
}
function App_TickConfigure() {
App_UpdateMainMenu();
}
function App_SubmitKeyConfig(kbut, ktype, kcode) {
var _local1 = kcode;
var _local2 = ktype;
APP_KEY_TRIG = false;
gui.HideTextMenu();
Key.removeListener(kbut);
if (_local1 == 81) {
} else {
kbut.keyname.text = App_GetKeyName(_local1);
if (_local2 == 0) {
userdata.SetJumpKey(_local1);
} else if (_local2 == -1) {
userdata.SetLeftKey(_local1);
} else if (_local2 == 1) {
userdata.SetRightKey(_local1);
}
}
}
function App_FocusKeyConfig(kbut) {
gui.DisplayTextBar(GUI_KEYCONFIG);
Key.addListener(kbut);
}
function App_ResetKeyConfig() {
userdata.SetJumpKey(16);
userdata.SetLeftKey(37);
userdata.SetRightKey(39);
var menuMC = gui.GetCurrentMC();
var jbut = eval (menuMC + ".configmenu.jbut");
var lbut = eval (menuMC + ".configmenu.lbut");
var rbut = eval (menuMC + ".configmenu.rbut");
jbut.keyname.text = App_GetKeyName(userdata.GetJumpKey());
lbut.keyname.text = App_GetKeyName(userdata.GetLeftKey());
rbut.keyname.text = App_GetKeyName(userdata.GetRightKey());
}
function App_GetKeyName(kcode) {
var _local2 = kcode;
var _local1 = "";
if (_local2 == 37) {
_local1 = _local1 + "L arrow";
} else if (_local2 == 39) {
_local1 = _local1 + "R arrow";
} else if (_local2 == 38) {
_local1 = _local1 + "U arrow";
} else if (_local2 == 40) {
_local1 = _local1 + "D arrow";
} else if (_local2 == 32) {
_local1 = _local1 + "space";
} else if (_local2 == 16) {
_local1 = _local1 + "shift";
} else if (_local2 == 17) {
_local1 = _local1 + "ctrl";
} else if (_local2 == 18) {
_local1 = _local1 + "alt";
} else if (_local2 == 13) {
_local1 = _local1 + "enter";
} else if (_local2 == 9) {
_local1 = _local1 + "tab";
} else {
_local1 = _local1 + String.fromCharCode(_local2);
}
return(_local1);
}
function App_StartHelp() {
gui.Display(GUI_HELP);
var _local1 = gui.GetCurrentMC().helpmenu;
_local1.keyL._visible = false;
_local1.keyR._visible = false;
_local1.keyJ._visible = false;
SetActiveProcess(App_Tick_Help);
App_UpdateHelp = App_UpdateHelp_LoadLevel;
APP_HELPLEVEL_LOADED = false;
App_BeginLoadMenuDemo(gamedata.GetHelpLevelData(), "");
}
function App_UpdateHelp_LoadLevel() {
if (!App_LoadingMenuDemo()) {
APP_HELPLEVEL_LOADED = true;
App_StartHelpDemo(HELPDEMO_WELCOME);
}
}
function App_StartHelpDemo(demoID) {
if (APP_HELPLEVEL_LOADED) {
var _local1 = new Sound();
_local1.stop();
console.Show();
App_LoadHelpDemo(demoID);
App_UpdateHelp = App_UpdateHelp_LoadDemo;
}
}
function App_ContinueHelpDemo() {
console.Show();
var _local1 = new Sound();
_local1.stop();
App_ResetHelpDemo();
App_UpdateHelp = App_UpdateHelp_ResetDemo;
}
function App_PlayHelpDemo(str) {
var _local2 = new Sound();
_local2.stop();
App_PlayerDeathEvent = App_PlayerDeathEvent_Normal;
App_LevelPassedEvent = App_PlayerDeathEvent_Normal;
game.InitNewGame();
App_ResetGameTime();
gui.ResetPlayerTime();
game.StopDemoPlayback();
game.LoadDemo(str);
game.StartDemoPlayback();
App_UpdateHelp = App_UpdateHelp_TickDemo;
var _local1 = gui.GetCurrentMC().helpmenu;
_local1.keyL._visible = true;
_local1.keyR._visible = true;
_local1.keyJ._visible = true;
_local1.keyL.gotoAndStop(2);
_local1.keyR.gotoAndStop(2);
_local1.keyJ.gotoAndStop(2);
}
function App_Tick_Help() {
if (Key.isDown(49)) {
App_StartHelpDemo(HELPDEMO_JUMP1);
} else if (Key.isDown(50)) {
App_StartHelpDemo(HELPDEMO_JUMP2);
} else if (Key.isDown(51)) {
App_StartHelpDemo(HELPDEMO_MOVE1);
}
if (APP_KEY_TRIG && (Key.isDown(77))) {
APP_KEY_TRIG = false;
App_LoadMainMenu();
} else {
App_UpdateHelp();
}
}
function App_UpdateHelp_LoadDemo() {
if (!App_LoadingHelpDemo()) {
console.Hide();
App_PlayHelpDemo(gamedata.GetCurrentHelpDemoData());
}
}
function App_UpdateHelp_ResetDemo() {
if (!App_ResettingHelpDemo()) {
console.Hide();
App_PlayHelpDemo(gamedata.GetCurrentHelpDemoData());
}
}
function App_UpdateHelp_TickDemo() {
if ((game.GetDemoTickCount() - game.GetTime()) < -60) {
gamedata.IncrementHelpDemoReel();
App_ContinueHelpDemo();
} else {
App_UpdateGame_Demo();
var _local1 = gui.GetCurrentMC().helpmenu;
var _local2 = player.inputList;
if (_local2[PINPUT_R]) {
_local1.keyR.gotoAndStop(1);
} else {
_local1.keyR.gotoAndStop(2);
}
if (_local2[PINPUT_L]) {
_local1.keyL.gotoAndStop(1);
} else {
_local1.keyL.gotoAndStop(2);
}
if (_local2[PINPUT_J]) {
_local1.keyJ.gotoAndStop(1);
} else {
_local1.keyJ.gotoAndStop(2);
}
}
}
function App_StartQuit() {
gui.Display(GUI_CONFIRMQUIT);
APP_PRE_QUIT = true;
}
function App_Quit() {
var _local2 = new Sound();
_local2.stop();
var _local1 = Math.random();
if (_local1 < 0.25) {
gui.Display(GUI_GOODBYE1);
} else if (_local1 < 0.5) {
gui.Display(GUI_GOODBYE2);
} else if (_local1 < 0.75) {
gui.Display(GUI_GOODBYE3);
} else {
gui.Display(GUI_GOODBYE4);
}
console.mc._visible = false;
SetActiveProcess(App_TickGoodbye);
}
function App_TickGoodbye() {
if (APP_KEY_TRIG) {
SetActiveProcess(App_Cleanup);
}
}
function App_Cleanup() {
CloseApp();
fscommand ("quit");
}
function App_PlayerDeathEvent_Normal() {
objects.IdleObjectsAfterDeath();
}
function App_PlayerDeathEvent_Debug() {
}
function App_PlayerDeathEvent_Demo() {
objects.IdleObjectsAfterDeath();
}
function App_LevelPassedEvent_Normal() {
console.AddLine("level completed.");
objects.IdleObjectsAfterDeath();
var _local1 = gamedata.IncrementCurrentLevel();
if (_local1) {
game.InitNewLevel();
App_StartPostLevelPause();
} else {
App_StartPostLevelPause_EpVictory();
}
}
function App_LevelPassedEvent_Debug() {
console.AddLine("level completed.");
}
function App_LevelPassedEvent_Demo() {
}
function App_StartBeatGame() {
gui.Display(GUI_VICTORY);
gui.DisplayTextBar(GUI_BEATGAME);
SetActiveProcess(App_TickBeatGame);
}
function App_TickBeatGame() {
App_UpdateGame_Demo();
if (APP_KEY_TRIG && (Key.isDown(32))) {
App_LoadMainMenu();
}
}
function App_StartPassedEpisode(num) {
gui.HideAll();
gui.Display(GUI_VICTORY);
gui.DisplayTextBar(GUI_PASSEDEPISODE);
var _local1 = num - 1;
gui.AppendToTextBar(("episode [" + _local1) + "] complete!! [spacebar] to continue, [Q] for mainmenu");
gamedata.LoadEpisodeNum(num);
SetActiveProcess(App_TickPassedEpisode);
}
function App_TickPassedEpisode() {
App_UpdateGame_Demo();
if (APP_KEY_TRIG && (Key.isDown(32))) {
gui.HideInGame();
App_StartNewGame();
} else if (APP_KEY_TRIG && (Key.isDown(81))) {
APP_KEY_TRIG = false;
gui.HideInGame();
App_LoadMainMenu();
}
}
function App_StartNewGame() {
console.Show();
var _local1 = new Sound();
_local1.stop();
game.InitNewGame();
App_PlayerDeathEvent = App_PlayerDeathEvent_Normal;
App_LevelPassedEvent = App_LevelPassedEvent_Normal;
App_LoadLevel(0, App_StartPreLevelPause);
}
function App_StartPreLevelPause() {
APP_WAITING_TO_RETRY = false;
console.Hide();
gui.Display(GUI_PRELEVEL);
gui.ShowInGame();
game.InitRetryLevel();
gui.ResetPlayerTime();
gui.DrawLevelName(gamedata.GetCurrentLevelName());
SetActiveProcess(App_Tick_PreLevelPause);
}
function App_Tick_PreLevelPause() {
game.FillPlayerTime();
if (Key.isDown(32)) {
App_PlayGame();
}
if (Key.isDown(13)) {
if (Key.isToggled(20)) {
if (Key.isDown(16)) {
if (Key.isDown(90)) {
App_ResetGameTime();
App_LevelPassedEvent();
}
}
}
}
}
function App_PlayGame() {
gui.HideAll();
game.StopDemoPlayback();
game.StopRecordingDemo();
game.InitRetryLevel();
game.StartRecordingDemo();
App_ResetGameTime();
APP_VOLUNTARY_SUICIDE = false;
App_PlayerDeathEvent = App_PlayerDeathEvent_Normal;
App_LevelPassedEvent = App_LevelPassedEvent_Normal;
SetActiveProcess(App_Tick_RunningGame);
}
function App_UnpauseGame() {
gui.HideAll();
App_ResetGameTime();
SetActiveProcess(App_Tick_RunningGame);
}
function App_Tick_RunningGame() {
var _local1 = APP_KEY_TRIG && (!player.isDead);
if ((_local1 && (Key.isDown(80))) || (_local1 && (Key.isDown(27)))) {
APP_KEY_TRIG = false;
App_PauseGame();
} else {
if (APP_KEY_TRIG && (Key.isDown(75))) {
APP_KEY_TRIG = false;
APP_VOLUNTARY_SUICIDE = true;
if ((game.GetTime() % 2) == 0) {
game.KillPlayer(KILLTYPE_EXPLOSIVE, (Math.random() * 10) - 5, (-Math.random()) * 6, player.pos.x, player.pos.y, player);
} else {
game.KillPlayer(KILLTYPE_HARDBULLET, (Math.random() * 10) - 5, (-Math.random()) * 6, player.pos.x, player.pos.y, player);
}
}
if (player.isDead) {
App_UpdateGame_Demo();
if (APP_WAITING_TO_RETRY) {
if (Key.isDown(32)) {
APP_KEY_TRIG = false;
var _local2 = new Sound();
_local2.stop();
App_ResetObjects(App_StartPreLevelPause);
} else if (!APP_VOLUNTARY_SUICIDE) {
if (Key.isDown(82)) {
APP_KEY_TRIG = false;
var _local2 = new Sound();
_local2.stop();
APP_REPLAY_DATA = game.DumpDemoData();
App_StartInGameDemo();
}
}
} else if (40 < (game.GetTime() - player.timeOfDeath)) {
game.StopRecordingDemo();
App_StartRetryMenu(APP_VOLUNTARY_SUICIDE);
}
} else {
App_UpdateGame();
if (game.playerCurTime <= 0) {
game.KillPlayer(KILLTYPE_FALL, 0, 0, player.pos.x, player.pos.y, player);
App_StartGameOver();
}
}
}
}
function App_UpdateGame() {
var _local2 = APP_GAMETIME_t0;
APP_GAMETIME_t0 = APP_t0;
var _local1 = (APP_GAMETIME_t0 - _local2) + APP_GAMETIME_REMAINDER;
var _local3 = _local1;
while (APP_GAMETIME_TICKLEN < _local1) {
_local1 = _local1 - APP_GAMETIME_TICKLEN;
game.Tick();
game.playerCurTime--;
}
APP_GAMETIME_REMAINDER = _local1;
if (_local1 < _local3) {
game.Draw();
game.DrawPlayerTime();
}
}
function App_UpdateGame_Demo() {
var _local2 = APP_GAMETIME_t0;
APP_GAMETIME_t0 = APP_t0;
var _local1 = (APP_GAMETIME_t0 - _local2) + APP_GAMETIME_REMAINDER;
var _local3 = _local1;
while (APP_GAMETIME_TICKLEN < _local1) {
_local1 = _local1 - APP_GAMETIME_TICKLEN;
game.Tick();
}
APP_GAMETIME_REMAINDER = _local1;
if (_local1 < _local3) {
game.Draw();
}
}
function App_ResetGameTime() {
APP_GAMETIME_t0 = APP_t0;
APP_GAMETIME_REMAINDER = 0;
}
function App_PauseGame() {
gui.Display(GUI_PAUSE);
SetActiveProcess(App_Tick_InGamePause);
}
function App_Tick_InGamePause() {
if ((APP_KEY_TRIG && (Key.isDown(80))) || (APP_KEY_TRIG && (Key.isDown(27)))) {
APP_KEY_TRIG = false;
App_UnpauseGame();
} else if (APP_KEY_TRIG && (Key.isDown(81))) {
APP_KEY_TRIG = false;
App_LoadMainMenu();
} else {
APP_KEY_TRIG = false;
}
}
function App_StartPostLevelPause() {
gui.Display(GUI_POSTLEVEL);
SetActiveProcess(App_Tick_PostLevelPause);
}
function App_Tick_PostLevelPause() {
if (Key.isDown(32)) {
APP_VICTORY = false;
console.Show();
var _local1 = new Sound();
_local1.stop();
gui.HideInGame();
App_LoadLevel(gamedata.GetCurrentLevelID(), App_StartPreLevelPause);
} else {
App_UpdateGame_Demo();
}
}
function App_StartPostLevelPause_EpVictory() {
gui.Display(GUI_POSTLEVEL);
SetActiveProcess(App_Tick_PostLevelPause_EpVictory);
}
function App_Tick_PostLevelPause_EpVictory() {
if (Key.isDown(32)) {
APP_KEY_TRIG = false;
var _local1 = gamedata.GetNextEpisodeNum();
if (_local1 < 0) {
console.AddLine("journey completed.");
App_StartBeatGame();
} else {
userdata.NotifyEpisodeReached(_local1);
console.AddLine("episode completed. #: " + _local1);
App_StartPassedEpisode(_local1);
}
} else {
App_UpdateGame_Demo();
}
}
function App_StartRetryMenu(suicide) {
if (suicide) {
gui.Display(GUI_RETRYLEVEL_SUICIDE);
} else {
gui.Display(GUI_RETRYLEVEL);
}
APP_WAITING_TO_RETRY = true;
}
function App_StartGameOver() {
gui.Display(GUI_DEFEAT);
gui.DisplayTextBar(GUI_GAMEOVER);
SetActiveProcess(App_Tick_GameOver);
}
function App_Tick_GameOver() {
if (Key.isDown(32)) {
App_LoadMainMenu();
} else {
App_UpdateGame_Demo();
}
}
function App_StartInGameDemo() {
App_PlayerDeathEvent = App_PlayerDeathEvent_Demo;
App_LevelPassedEvent = App_LevelPassedEvent_Demo;
App_ResetGameTime();
game.InitRetryLevel();
game.StopDemoPlayback();
game.LoadDemo(APP_REPLAY_DATA);
game.StartDemoPlayback();
App_ResetObjects(App_TickInGameDemo);
gui.Display(GUI_INGAMEDEMO);
}
function App_TickInGameDemo() {
if (Key.isDown(32)) {
APP_KEY_TRIG = false;
var _local1 = new Sound();
_local1.stop();
App_ResetObjects(App_StartPreLevelPause);
} else if ((game.GetDemoTickCount() - game.GetTime()) < -120) {
var _local1 = new Sound();
_local1.stop();
App_StartInGameDemo();
} else {
App_UpdateGame_Demo();
}
}
APP_REPLAY_DATA = "";
APP_VISTORY = false;
APP_GAMETIME_t0 = 0;
APP_GAMETIME_REMAINDER = 0;
function App_StartNewGame_Debug() {
game.InitNewGame();
App_StartDebugMenu();
}
function App_StartDebugMenu() {
App_PlayerDeathEvent = App_PlayerDeathEvent_Debug;
App_LevelPassedEvent = App_LevelPassedEvent_Debug;
gui.Display(GUI_DEBUGMENU);
console.Show();
gui.ShowTxt();
gui.SetTxt(TXTBOX_TOP, game.DumpLevelData());
gui.SetTxt(TXTBOX_BOTTOM, game.DumpDemoData());
SetActiveProcess(App_Tick_DebugMenu);
}
function App_Tick_DebugMenu() {
if (APP_KEY_TRIG && (Key.isDown(49))) {
APP_KEY_TRIG = false;
game.StopRecordingDemo();
game.InitNewGame();
game.StartRecordingDemo();
} else if (APP_KEY_TRIG && (Key.isDown(50))) {
APP_KEY_TRIG = false;
game.StopRecordingDemo();
} else if (APP_KEY_TRIG && (Key.isDown(87))) {
APP_KEY_TRIG = false;
game.StopDemoPlayback();
} else if (APP_KEY_TRIG && (Key.isDown(81))) {
APP_KEY_TRIG = false;
game.InitNewGame();
App_ResetObjects(App_StartDemoPlayback_Debug);
} else if (APP_KEY_TRIG && (Key.isDown(51))) {
APP_KEY_TRIG = false;
var _local1 = gui.GetTxt(TXTBOX_BOTTOM);
game.LoadDemo(_local1);
} else if (APP_KEY_TRIG && (Key.isDown(52))) {
APP_KEY_TRIG = false;
var _local1 = game.DumpDemoData();
System.setClipboard(_local1);
gui.ShowTxt();
gui.SetTxt(TXTBOX_BOTTOM, _local1);
}
if (APP_KEY_TRIG && (Key.isDown(77))) {
APP_KEY_TRIG = false;
gui.HideTxt();
App_LoadMainMenu();
} else if (APP_KEY_TRIG && (Key.isDown(74))) {
APP_KEY_TRIG = false;
App_LoadLevel_Raw(gamedata.GetBlankMap(), App_StartDebugMenu);
} else if (APP_KEY_TRIG && (Key.isDown(80))) {
APP_KEY_TRIG = false;
gui.HideTxt();
console.Hide();
App_PlayGame_Debug();
} else if (APP_KEY_TRIG && (Key.isDown(69))) {
APP_KEY_TRIG = false;
gui.HideTxt();
console.Hide();
App_StartEditor();
} else if (APP_KEY_TRIG && (Key.isDown(82))) {
APP_KEY_TRIG = false;
App_ResetObjects(App_StartDebugMenu);
} else if (APP_KEY_TRIG && (Key.isDown(76))) {
APP_KEY_TRIG = false;
var _local1 = gui.GetTxt(TXTBOX_TOP);
App_LoadLevel_Raw(_local1, App_StartDebugMenu);
} else if (APP_KEY_TRIG && (Key.isDown(83))) {
APP_KEY_TRIG = false;
var _local1 = game.DumpLevelData();
System.setClipboard(_local1);
gui.ShowTxt();
gui.SetTxt(TXTBOX_TOP, _local1);
}
}
function App_StartDemoPlayback_Debug() {
game.InitNewGame();
game.StartDemoPlayback();
App_StartDebugMenu();
}
function App_PlayGame_Debug() {
gui.HideAll();
App_ResetGameTime();
SetActiveProcess(App_Tick_RunningGame_Debug);
}
function App_Tick_RunningGame_Debug() {
if (Key.isDown(192) || (Key.isDown(220))) {
APP_KEY_TRIG = false;
App_StartDebugMenu();
return(undefined);
}
if (Key.isToggled(20)) {
if (!APP_DID_TICK_DEBUG) {
App_ResetGameTime();
}
DebugUpdateGameCode();
App_UpdateGame();
APP_DID_TICK_DEBUG = true;
} else if (input.MousePressed()) {
static_rend.Clear();
if (Key.isDown(8)) {
player.raggy.Activate();
player.raggy.MimicMC(0, 0, player.mc, player.facingDir, player.prevframe);
player.mc._visible = false;
player.raggy.Draw();
}
if (Key.isDown(45)) {
player.raggy.Deactivate();
player.mc._visible = true;
}
App_ResetGameTime();
APP_GAMETIME_REMAINDER = APP_GAMETIME_TICKLEN + 1;
DebugUpdateGameCode();
App_UpdateGame();
APP_DID_TICK_DEBUG = true;
} else {
APP_DID_TICK_DEBUG = false;
}
}
function App_StartEditor() {
gui.Display(GUI_TEMP_EDITOR);
SetActiveProcess(App_TickEditor);
editor.Start();
}
function App_TickEditor() {
App_UpdateEditor();
}
function App_UpdateEditor() {
debug_rend.Clear();
static_rend.Clear();
editor.Tick();
}
APP_DID_TICK_DEBUG = false;
function App_LoadHelpDemo(demoID) {
gamedata.SetCurrentHelpDemo(demoID);
var _local1 = gamedata.GetHelpDemoObjects();
if (_local1 != null) {
App_BeginLoadHelpDemo(_local1);
}
}
function App_BeginLoadHelpDemo(objStr) {
console.AddLine("Loading Objects");
console.AddLine(".");
game.InitLoadObjects(objStr);
}
function App_LoadingHelpDemo() {
if (!AppLoadingObjects()) {
return(false);
}
return(true);
}
function App_ResetHelpDemo() {
console.AddLine("Resetting Objects");
console.AddLine(".");
game.InitReloadObjects();
}
function App_ResettingHelpDemo() {
if (!AppLoadingObjects()) {
return(false);
}
return(true);
}
function App_LoadMenuDemo(demoID) {
var _local1 = gamedata.GetMenuDemoData(demoID);
game.LoadDemo(_local1);
var _local2 = gamedata.GetMenuDemoLevel(demoID);
if (_local2 != null) {
App_BeginLoadMenuDemo(_local2, _local1);
}
}
function App_BeginLoadMenuDemo(levStr, demStr) {
console.AddLine("Loading Level:");
console.StartTab();
console.AddLine("Loading Map");
console.AddLine(".");
APP_DONE_LOADING_MAP = false;
game.InitLoadLevel(levStr);
}
function App_LoadingMenuDemo() {
if (!APP_DONE_LOADING_MAP) {
if (!AppLoadingMap()) {
console.AddLine("Loading Objects");
console.AddLine(".");
APP_DONE_LOADING_MAP = true;
}
} else if (!AppLoadingObjects()) {
console.StopTab();
return(false);
}
return(true);
}
function App_LoadLevel(levelID, callback) {
gui.Display(GUI_LOADINGLEVEL);
var _local1 = gamedata.GetLevelData(levelID);
if (_local1 != null) {
App_BeginLoadLevel(_local1, callback);
}
}
function App_LoadLevel_Raw(str, callback) {
gui.Display(GUI_LOADINGLEVEL);
App_BeginLoadLevel(str, callback);
}
function App_ResetObjects(callback) {
gui.Display(GUI_RESETTINGLEVEL);
App_BeginResetObjects(callback);
}
function App_BeginLoadLevel(levStr, callback) {
LEVEL_LOADED_CALLBACK = callback;
console.AddLine("Loading Level:");
console.StartTab();
console.AddLine("Loading Map");
console.AddLine(".");
APP_DONE_LOADING_MAP = false;
game.InitLoadLevel(levStr);
SetActiveProcess(AppLoadingLevel);
}
function App_BeginResetObjects(callback) {
OBJECTS_LOADED_CALLBACK = callback;
console.AddLine("Resetting Objects");
console.AddLine(".");
game.InitReloadObjects();
SetActiveProcess(AppResettingObjects);
}
function AppResettingObjects() {
if (!AppLoadingObjects()) {
OBJECTS_LOADED_CALLBACK();
}
}
function AppLoadingLevel() {
if (!APP_DONE_LOADING_MAP) {
if (!AppLoadingMap()) {
console.AddLine("Loading Objects");
console.AddLine(".");
APP_DONE_LOADING_MAP = true;
}
} else if (!AppLoadingObjects()) {
console.StopTab();
LEVEL_LOADED_CALLBACK();
}
}
function AppLoadingMap() {
var _local1 = 18;
while (_local1--) {
console.Append(".");
if (!game.LoadingMap()) {
return(false);
}
}
console.Update();
return(true);
}
function AppLoadingObjects() {
var _local1 = 1;
while (_local1--) {
console.Append(".");
if (!game.LoadingObjects()) {
return(false);
}
}
console.Update();
return(true);
}
LEVEL_LOADED_CALLBACK = null;
OBJECTS_LOADED_CALLBACK = null;
DEMO_LOADED_CALLBACK = null;
function InitApp() {
gfx = new NinjaGraphicsSystem();
particles = new ParticleManager(gfx.bufferList[LAYER_PARTICLES_FRONT], gfx.bufferList[LAYER_PARTICLES_BACK]);
mcRend = new VectorRenderer();
mcBuffer = mcRend.buffer;
input = new InputManager();
GRAV = 0.15;
DRAG = 0.999999;
BOUNCE = 0.7;
FRICTION_THRESHOLD = 0.5;
FRICTION_STATIC = 0.3;
FRICTION_DYNAMIC_RATIO = 0.5;
AppBuildModules();
StartApp();
}
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
APP_GAMETIME_TICKLEN = 25;
APP_TILE_SCALE = 12;
InitApp();
Symbol 23 MovieClip Frame 30
gotoAndPlay (1);
Symbol 26 Button
on (release) {
_root.GUIEvent_MainMenu_Help();
}
Symbol 44 MovieClip Frame 30
gotoAndPlay (1);
Symbol 46 Button
on (release) {
_root.GUIEvent_MainMenu_Quit();
}
Symbol 64 MovieClip Frame 30
gotoAndPlay (1);
Symbol 66 Button
on (release) {
_root.GUIEvent_MainMenu_Story();
}
Symbol 70 Button
on (release) {
getURL ("http://www.harveycartel.org/metanet", "_blank");
}
Symbol 89 MovieClip Frame 30
gotoAndPlay (1);
Symbol 91 Button
on (release) {
_root.GUIEvent_MainMenu_Configure();
}
Symbol 97 MovieClip Frame 30
gotoAndPlay (1);
Symbol 99 Button
on (release) {
_root.GUIEvent_MainMenu_Credits();
}
Symbol 109 MovieClip Frame 30
gotoAndPlay (1);
Symbol 111 Button
on (release) {
_root.GUIEvent_MainMenu_PlayGame();
}
Symbol 116 MovieClip Frame 30
gotoAndPlay (1);
Symbol 118 Button
on (release) {
_root.App_StartMainMenu();
}
Symbol 124 MovieClip Frame 1
this.stop();
Symbol 124 MovieClip Frame 2
this.stop();
Symbol 127 MovieClip Frame 1
this.stop();
Symbol 127 MovieClip Frame 2
this.stop();
Symbol 130 MovieClip Frame 1
this.stop();
Symbol 130 MovieClip Frame 2
this.stop();
Symbol 131 Button
on (release) {
_root.App_LoadMainMenu();
}
Symbol 149 Button
on (release) {
this.gotoAndStop("player");
this._parent.helpText.gotoAndStop("player");
_root.App_StartHelpDemo(_root.HELPDEMO_PLAYER);
}
Symbol 152 Button
on (release) {
this.gotoAndStop("objects");
this._parent.helpText.gotoAndStop("objects");
_root.App_StartHelpDemo(_root.HELPDEMO_OBJECTS);
}
Symbol 155 Button
on (release) {
this.gotoAndStop("enemies");
this._parent.helpText.gotoAndStop("enemies");
_root.App_StartHelpDemo(_root.HELPDEMO_ENEMIES);
}
Symbol 158 Button
on (release) {
this._parent.helpText.gotoAndStop("falling1");
_root.App_StartHelpDemo(_root.HELPDEMO_FALLING1);
}
Symbol 160 Button
on (release) {
this._parent.helpText.gotoAndStop("falling2");
_root.App_StartHelpDemo(_root.HELPDEMO_FALLING2);
}
Symbol 162 Button
on (release) {
this._parent.helpText.gotoAndStop("jumping1");
_root.App_StartHelpDemo(_root.HELPDEMO_JUMPING1);
}
Symbol 164 Button
on (release) {
this._parent.helpText.gotoAndStop("jumping2");
_root.App_StartHelpDemo(_root.HELPDEMO_JUMPING2);
}
Symbol 166 Button
on (release) {
this._parent.helpText.gotoAndStop("keys");
_root.App_StartHelpDemo(_root.HELPDEMO_KEYS);
}
Symbol 168 Button
on (release) {
this._parent.helpText.gotoAndStop("movement");
_root.App_StartHelpDemo(_root.HELPDEMO_MOVEMENT);
}
Symbol 170 Button
on (release) {
this._parent.helpText.gotoAndStop("rules");
_root.App_StartHelpDemo(_root.HELPDEMO_RULES);
}
Symbol 175 Button
on (release) {
this._parent.helpText.gotoAndStop("walljumping");
_root.App_StartHelpDemo(_root.HELPDEMO_WALLJUMPING);
}
Symbol 178 Button
on (release) {
this._parent.helpText.gotoAndStop("wallsliding1");
_root.App_StartHelpDemo(_root.HELPDEMO_WALLSLIDING1);
}
Symbol 183 Button
on (release) {
this._parent.helpText.gotoAndStop("wallsliding2");
_root.App_StartHelpDemo(_root.HELPDEMO_WALLSLIDING2);
}
Symbol 187 Button
on (release) {
this._parent.helpText.gotoAndStop("bounceblock");
_root.App_StartHelpDemo(_root.HELPDEMO_BOUNCEBLOCK);
}
Symbol 190 Button
on (release) {
this._parent.helpText.gotoAndStop("lockeddoor");
_root.App_StartHelpDemo(_root.HELPDEMO_LOCKEDDOOR);
}
Symbol 193 Button
on (release) {
this._parent.helpText.gotoAndStop("lockeddoor");
_root.App_StartHelpDemo(_root.HELPDEMO_LOCKEDDOOR);
}
Symbol 198 Button
on (release) {
this._parent.helpText.gotoAndStop("door");
_root.App_StartHelpDemo(_root.HELPDEMO_DOOR);
}
Symbol 201 Button
on (release) {
this._parent.helpText.gotoAndStop("trapdoor");
_root.App_StartHelpDemo(_root.HELPDEMO_TRAPDOOR);
}
Symbol 205 Button
on (release) {
this._parent.helpText.gotoAndStop("exit");
_root.App_StartHelpDemo(_root.HELPDEMO_EXIT);
}
Symbol 208 Button
on (release) {
this._parent.helpText.gotoAndStop("exit");
_root.App_StartHelpDemo(_root.HELPDEMO_EXIT);
}
Symbol 213 Button
on (release) {
this._parent.helpText.gotoAndStop("gold");
_root.App_StartHelpDemo(_root.HELPDEMO_GOLD);
}
Symbol 218 Button
on (release) {
this._parent.helpText.gotoAndStop("launchpad");
_root.App_StartHelpDemo(_root.HELPDEMO_LAUNCHPAD);
}
Symbol 221 Button
on (release) {
this._parent.helpText.gotoAndStop("onewayplatform");
_root.App_StartHelpDemo(_root.HELPDEMO_ONEWAYPLATFORM);
}
Symbol 225 Button
on (release) {
this._parent.helpText.gotoAndStop("chaingundrone");
_root.App_StartHelpDemo(_root.HELPDEMO_CHAINGUNDRONE);
}
Symbol 228 Button
on (release) {
this._parent.helpText.gotoAndStop("laserdrone");
_root.App_StartHelpDemo(_root.HELPDEMO_LASERDRONE);
}
Symbol 231 Button
on (release) {
this._parent.helpText.gotoAndStop("zapdrone");
_root.App_StartHelpDemo(_root.HELPDEMO_ZAPDRONE);
}
Symbol 233 Button
on (release) {
this._parent.helpText.gotoAndStop("floorguard");
_root.App_StartHelpDemo(_root.HELPDEMO_FLOORGUARD);
}
Symbol 238 Button
on (release) {
this._parent.helpText.gotoAndStop("mines");
_root.App_StartHelpDemo(_root.HELPDEMO_MINES);
}
Symbol 241 Button
on (release) {
this._parent.helpText.gotoAndStop("thwump");
_root.App_StartHelpDemo(_root.HELPDEMO_THWUMP);
}
Symbol 245 Button
on (release) {
this._parent.helpText.gotoAndStop("gaussturret");
_root.App_StartHelpDemo(_root.HELPDEMO_GAUSSTURRET);
}
Symbol 249 Button
on (release) {
this._parent.helpText.gotoAndStop("hominglauncher");
_root.App_StartHelpDemo(_root.HELPDEMO_HOMINGLAUNCHER);
}
Symbol 250 MovieClip Frame 1
this.stop();
Symbol 281 MovieClip Frame 1
this.stop();
Symbol 286 Button
on (release) {
_root.App_ReadInputContinueCode();
}
Symbol 291 Button
on (release) {
_root.App_StartMainMenu();
}
Symbol 293 MovieClip Frame 1
this.stop();
Symbol 293 MovieClip Frame 2
this.stop();
Symbol 293 MovieClip Frame 3
this.stop();
Symbol 295 MovieClip Frame 1
this.onRelease = function () {
_root.App_EpisodeButtonClicked(this.num.text);
};
Symbol 298 MovieClip Frame 1
this.stop();
Symbol 298 MovieClip Frame 2
this.stop();
Symbol 298 MovieClip Frame 3
this.stop();
Symbol 301 MovieClip Frame 1
this.onRelease = function () {
_root.App_FocusKeyConfig(this);
};
this.onRollOver = function () {
this.gfx.gotoAndStop(2);
};
this.onRollOut = function () {
this.gfx.gotoAndStop(1);
};
this.onKeyDown = function () {
var _local1 = Key.getCode();
_root.App_SubmitKeyConfig(this, 0, _local1);
};
this.onKeyUp = function () {
};
Symbol 304 MovieClip Frame 1
this.onRelease = function () {
_root.App_FocusKeyConfig(this);
};
this.onRollOver = function () {
this.gfx.gotoAndStop(2);
};
this.onRollOut = function () {
this.gfx.gotoAndStop(1);
};
this.onKeyDown = function () {
var _local1 = Key.getCode();
_root.App_SubmitKeyConfig(this, -1, _local1);
};
this.onKeyUp = function () {
};
Symbol 307 MovieClip Frame 1
this.onRelease = function () {
_root.App_FocusKeyConfig(this);
};
this.onRollOver = function () {
this.gfx.gotoAndStop(2);
};
this.onRollOut = function () {
this.gfx.gotoAndStop(1);
};
this.onKeyDown = function () {
var _local1 = Key.getCode();
_root.App_SubmitKeyConfig(this, 1, _local1);
};
this.onKeyUp = function () {
};
Symbol 309 MovieClip Frame 1
this.onRelease = function () {
_root.App_ResetKeyConfig();
};
this.onRollOver = function () {
this.gfx.gotoAndStop(2);
};
this.onRollOut = function () {
this.gfx.gotoAndStop(1);
};
Symbol 318 Button
on (release) {
getURL ("http://www.harveycartel.org/metanet", "_blank");
}
Symbol 322 Button
on (release) {
getURL ("mailto:n@harveycartel.org", "_blank");
}
Symbol 326 Button
on (release) {
getURL ("http://www.miniml.com", "_blank");
}
Symbol 330 Button
on (release) {
getURL ("http://www.fontsforflash.com", "_blank");
}
Symbol 334 Button
on (release) {
getURL ("http://www.soldat.pl", "_blank");
}
Symbol 338 Button
on (release) {
getURL ("http://www.thegamespage.com", "_blank");
}
Symbol 342 Button
on (release) {
getURL ("http://www.ne.jp/asahi/miyachi/sep/index.htm", "_blank");
}
Symbol 346 Button
on (release) {
getURL ("http://www.kaisha.cx/~euphoric_rush/", "_blank");
}
Symbol 350 Button
on (release) {
getURL ("http://www.asahi-net.or.jp/~cs8k-cyu", "_blank");
}
Symbol 354 Button
on (release) {
getURL ("http://www.bit-101.com", "_blank");
}
Symbol 358 Button
on (release) {
getURL ("http://www.levitated.net", "_blank");
}
Symbol 362 Button
on (release) {
getURL ("http://www.flipcode.com", "_blank");
}
Symbol 366 Button
on (release) {
getURL ("http://www.ioi.dk/Homepages/thomasj/publications/gdc2001.htm", "_blank");
}
Symbol 370 Button
on (release) {
getURL ("http://chattyfig.figleaf.com", "_blank");
}
Symbol 374 Button
on (release) {
getURL ("http://www.the-underdogs.org", "_blank");
}
Symbol 410 MovieClip [menuMC] Frame 1
this.stop();
Symbol 410 MovieClip [menuMC] Frame 2
this.stop();
Symbol 410 MovieClip [menuMC] Frame 3
this.stop();
Symbol 410 MovieClip [menuMC] Frame 4
this.stop();
Symbol 410 MovieClip [menuMC] Frame 5
this.stop();
Symbol 410 MovieClip [menuMC] Frame 6
this.stop();
Symbol 410 MovieClip [menuMC] Frame 7
this.stop();
Symbol 410 MovieClip [menuMC] Frame 8
this.stop();
Symbol 410 MovieClip [menuMC] Frame 9
this.stop();
Symbol 410 MovieClip [menuMC] Frame 10
this.stop();
Symbol 410 MovieClip [menuMC] Frame 11
this.stop();
Symbol 410 MovieClip [menuMC] Frame 12
this.stop();
Symbol 410 MovieClip [menuMC] Frame 13
this.stop();
Symbol 498 MovieClip [debugDroneMC] Frame 1
this.stop();
Symbol 498 MovieClip [debugDroneMC] Frame 5
this.gotoAndStop("zapdrone_chaseidle");
Symbol 498 MovieClip [debugDroneMC] Frame 28
this.stop();
Symbol 498 MovieClip [debugDroneMC] Frame 51
this.stop();
Symbol 498 MovieClip [debugDroneMC] Frame 54
this.stop();
Symbol 498 MovieClip [debugDroneMC] Frame 56
this.stop();
Symbol 498 MovieClip [debugDroneMC] Frame 58
this.gotoAndStop("chaingundrone_move");
Symbol 501 MovieClip [debugFloorGuardMC] Frame 1
this.stop();
Symbol 512 MovieClip [debugTurretMC] Frame 1
this.stop();
Symbol 512 MovieClip [debugTurretMC] Frame 18
this.stop();
Symbol 512 MovieClip [debugTurretMC] Frame 19
this.stop();
Symbol 512 MovieClip [debugTurretMC] Frame 29
this.stop();
Symbol 521 MovieClip [debugHomingLauncherMC] Frame 1
this.stop();
Symbol 521 MovieClip [debugHomingLauncherMC] Frame 3
this.gotoAndStop("rocket_active");
Symbol 521 MovieClip [debugHomingLauncherMC] Frame 7
this.gotoAndPlay("rocket_activeB");
Symbol 521 MovieClip [debugHomingLauncherMC] Frame 9
this.gotoAndStop("rocket_waiting");
Symbol 530 MovieClip [debugExitMC] Frame 31
this.stop();
Symbol 552 MovieClip [debugTestDoorMC] Frame 1
this.stop();
Symbol 552 MovieClip [debugTestDoorMC] Frame 17
this.stop();
Symbol 552 MovieClip [debugTestDoorMC] Frame 34
this.stop();
Symbol 552 MovieClip [debugTestDoorMC] Frame 35
this.stop();
Symbol 552 MovieClip [debugTestDoorMC] Frame 54
this.stop();
Symbol 552 MovieClip [debugTestDoorMC] Frame 55
this.stop();
Symbol 552 MovieClip [debugTestDoorMC] Frame 74
this.stop();
Symbol 560 MovieClip [debugLaunchPadMC] Frame 1
this.stop();
Symbol 560 MovieClip [debugLaunchPadMC] Frame 20
this.stop();
Symbol 570 MovieClip [debugGoldMC] Frame 1
this.stop();
Symbol 570 MovieClip [debugGoldMC] Frame 30
this._visible = false;
Symbol 582 MovieClip [testNinjaMCm] Frame 11
this.stop();
Symbol 582 MovieClip [testNinjaMCm] Frame 166
this.stop();
Symbol 582 MovieClip [testNinjaMCm] Frame 233
this.stop();
Symbol 582 MovieClip [testNinjaMCm] Frame 312
this.stop();
Symbol 582 MovieClip [testNinjaMCm] Frame 354
this.stop();
Symbol 602 MovieClip [debugDustMC2] Frame 31
this.removeMovieClip();
Symbol 607 MovieClip [debugDustMC1] Frame 33
this.removeMovieClip();
Symbol 610 MovieClip [debugBloodSpurtMC2] Frame 32
this.removeMovieClip();
Symbol 614 MovieClip [debugZapVMC3] Frame 15
this.removeMovieClip();
Symbol 618 MovieClip [debugZapMC3] Frame 15
this.removeMovieClip();
Symbol 622 MovieClip [debugZapVMC2] Frame 13
this.removeMovieClip();
Symbol 626 MovieClip [debugZapMC2] Frame 13
this.removeMovieClip();
Symbol 630 MovieClip [debugZapVMC1] Frame 10
this.removeMovieClip();
Symbol 633 MovieClip [debugFireBallMC2] Frame 14
this.removeMovieClip();
Symbol 636 MovieClip [debugFireBallMC3] Frame 11
this.removeMovieClip();
Symbol 643 MovieClip [debugFireBurstMC2] Frame 17
this.removeMovieClip();
Symbol 651 MovieClip [debugFireBurstMC1] Frame 19
this.removeMovieClip();
Symbol 654 MovieClip [debugFireBallMC1] Frame 15
this.removeMovieClip();
Symbol 658 MovieClip [debugZapMC1] Frame 10
this.removeMovieClip();
Symbol 662 MovieClip [debugRocketSmokeMC2] Frame 23
this.removeMovieClip();
Symbol 666 MovieClip [debugRocketSmokeMC3] Frame 27
this.removeMovieClip();
Symbol 670 MovieClip [debugRocketSmokeMC1] Frame 28
this.removeMovieClip();
Symbol 673 MovieClip [debugTurretDebrisMC3] Frame 10
this.removeMovieClip();
Symbol 676 MovieClip [debugTurretDebrisMC2] Frame 14
this.removeMovieClip();
Symbol 679 MovieClip [debugTurretDebrisMC1] Frame 12
this.removeMovieClip();
Symbol 682 MovieClip [debugTurretBulletMC1] Frame 10
this.removeMovieClip();
Symbol 684 MovieClip [debugBloodDripMC1] Frame 19
this.removeMovieClip();
Symbol 945 MovieClip [debugChainFlashMC2] Frame 9
this.removeMovieClip();
Symbol 948 MovieClip [debugChainFlashMC1] Frame 7
this.removeMovieClip();
Symbol 950 MovieClip [debugChainBulletMC1] Frame 7
this.removeMovieClip();
Symbol 953 MovieClip [debugChainDebrisMC2] Frame 8
this.removeMovieClip();
Symbol 956 MovieClip [debugChainDebrisMC3] Frame 13
this.removeMovieClip();
Symbol 958 MovieClip [debugChainDebrisMC1] Frame 10
this.removeMovieClip();
Symbol 961 MovieClip [debugLaserSparkMC3] Frame 9
this.removeMovieClip();
Symbol 963 MovieClip [debugLaserSparkMC2] Frame 12
this.removeMovieClip();
Symbol 967 MovieClip [debugLaserChargeMC3] Frame 15
this.removeMovieClip();
Symbol 970 MovieClip [debugLaserChargeMC2] Frame 14
this.removeMovieClip();
Symbol 973 MovieClip [debugLaserChargeMC1] Frame 10
this.removeMovieClip();
Symbol 975 MovieClip [debugLaserSparkMC1] Frame 10
this.removeMovieClip();
Symbol 992 MovieClip [playerSoundLoopMC] Frame 1
this.stop();
Symbol 992 MovieClip [playerSoundLoopMC] Frame 4
this.stop();
Symbol 992 MovieClip [playerSoundLoopMC] Frame 6
this.gotoAndPlay(1);
Symbol 992 MovieClip [playerSoundLoopMC] Frame 9
this.stop();
Symbol 992 MovieClip [playerSoundLoopMC] Frame 11
this.gotoAndPlay(1);
Symbol 1003 MovieClip [playerSoundMC] Frame 1
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 4
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 7
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 10
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 11
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 14
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 15
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 23
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 32
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 37
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 42
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 51
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 59
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 62
this.stop();
Symbol 1003 MovieClip [playerSoundMC] Frame 65
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 1
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 4
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 7
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 10
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 13
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 16
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 19
this.stop();
Symbol 1011 MovieClip [ragdollSoundMC] Frame 22
this.stop();
Symbol 1014 MovieClip Frame 1
this.onRelease = function () {
_root.GUIEvent_MainMenu_Story();
};
Symbol 1016 MovieClip Frame 1
this.onRelease = function () {
_root.GUIEvent_MainMenu_Quit();
};
Symbol 1018 MovieClip Frame 1
this.onRelease = function () {
_root.GUIEvent_MainMenu_NewGame();
};
Symbol 1020 MovieClip Frame 1
this.onRelease = function () {
_root.GUIEvent_MainMenu_Help();
};
Symbol 1022 MovieClip Frame 1
this.onRelease = function () {
_root.App_StartMainMenu();
};
Symbol 1024 MovieClip Frame 1
this.onRelease = function () {
_root.App_LoadMainMenu();
};
Symbol 1025 MovieClip [testMenuMC] Frame 1
this.stop();
Symbol 1025 MovieClip [testMenuMC] Frame 2
this.stop();
Symbol 1025 MovieClip [testMenuMC] Frame 3
this.stop();
Symbol 1025 MovieClip [testMenuMC] Frame 4
this.stop();