Frame 1
highdetail = true;
music = true;
currentmap = 2;
firstplay = true;
stop();
Frame 2
stopAllSounds();
Frame 3
stop();
Instance of Symbol 44 MovieClip "a" in Frame 3
onClipEvent (load) {
tr = 1;
t = new Sound(_root.a);
id = "song";
t.attachSound(id);
started = false;
playin = false;
avol = 0;
inc = 5;
targ = 100;
}
onClipEvent (enterFrame) {
if (_root.music) {
playin = true;
} else {
playin = false;
}
if (playin) {
if (avol == 0) {
t.start(0, 999);
started = true;
}
if (avol < targ) {
avol = avol + inc;
}
} else {
if (avol > 0) {
avol = avol - inc;
}
if ((avol == 0) and started) {
t.stop(id);
started = false;
}
}
t.setVolume(avol);
}
Frame 10
gotoAndStop ("main");
Frame 11
stop();
_quality = "low";
tempspeed = 0;
focald = 1;
light = 1.5;
currentmap = random(20) + 1;
myMap1 = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 3, 1], [1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 1], [1, 0, 2, 0, 3, 0, 2, 0, 0, 0, 2, 0, 2, 0, 3, 1], [1, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 1], [1, 0, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 1], [1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 2, 5, 2, 0, 3, 1], [1, 0, 2, 0, 3, 0, 2, 0, 2, 0, 2, 2, 2, 0, 0, 1], [1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 3, 1], [1, 0, 2, 0, 3, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 1], [1, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 2, 0, 3, 0, 2, 0, 2, 0, 3, 0, 3, 0, 3, 1], [1, 0, 2, 0, 0, 0, 2, 0, 2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0, 2, 0, 2, 0, 1], [1, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 1], [1, 3, 3, 0, 0, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 1], [1, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 3, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 3, 1], [1, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 3, 1], [1, 0, 2, 0, 2, 0, 0, 3, 0, 0, 2, 0, 0, 0, 0, 1], [1, 0, 0, 2, 0, 0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 3, 3, 0, 1], [1, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 3, 0, 0, 1], [1, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
function buildMap(map) {
_root.attachMovie("empty", "rotate_tiles", 1);
_root.rotate_tiles._visible = false;
_root.rotate_tiles._xscale = 20;
_root.rotate_tiles._yscale = 20;
_root.rotate_tiles._x = 200;
_root.rotate_tiles._y = 260;
_root.rotate_tiles.attachMovie("empty", "tiles", 1);
var _local6 = map[0].length;
var _local7 = map.length;
game.clip = _root.rotate_tiles.tiles;
game.clip._x = (-(char.xtile * game.tileW)) - (game.tileW / 2);
game.clip._y = (-(char.ytile * game.tileH)) - (game.tileH / 2);
var _local4 = 0;
while (_local4 < _local7) {
var _local3 = 0;
while (_local3 < _local6) {
var _local2 = (("t_" + _local4) + "_") + _local3;
game[_local2] = new game["Tile" + map[_local4][_local3]]();
game.clip.attachMovie("tile", _local2, (1 + (_local4 * 100)) + (_local3 * 2));
game.clip[_local2]._x = _local3 * game.tileW;
game.clip[_local2]._y = _local4 * game.tileH;
game.clip[_local2].gotoAndStop(game[_local2].frame);
_local3++;
}
_local4++;
}
_root.attachMovie("frame", "frame", 100);
game.clip.attachMovie("char", "char", 10000);
char.clip = game.clip.char;
char.xtile = 1;
char.ytile = 1;
char.x = (char.xtile * game.tileW) + (game.tileW / 2);
char.y = (char.ytile * game.tileW) + (game.tileH / 2);
char.width = char.clip._width;
char.height = char.clip._height;
char.clip._x = char.x;
char.clip._y = char.y;
char.clip._rotation = random(180) + 90;
}
function getMyCorners(x, y, ob) {
ob.downY = Math.floor(((y + ob.height) - 1) / game.tileH);
ob.upY = Math.floor((y - ob.height) / game.tileH);
ob.leftX = Math.floor((x - ob.width) / game.tileW);
ob.rightX = Math.floor(((x + ob.width) - 1) / game.tileW);
ob.upleft = game[(("t_" + ob.upY) + "_") + ob.leftX].walkable;
ob.downleft = game[(("t_" + ob.downY) + "_") + ob.leftX].walkable;
ob.upright = game[(("t_" + ob.upY) + "_") + ob.rightX].walkable;
ob.downright = game[(("t_" + ob.downY) + "_") + ob.rightX].walkable;
ob.upleftfin = game[(("t_" + ob.upY) + "_") + ob.leftX].finish;
ob.downleftfin = game[(("t_" + ob.downY) + "_") + ob.leftX].finish;
ob.uprightfin = game[(("t_" + ob.upY) + "_") + ob.rightX].finish;
ob.downrightfin = game[(("t_" + ob.downY) + "_") + ob.rightX].finish;
}
function moveChar(ob, dirx, diry) {
getMyCorners(ob.x, ob.y + diry, ob);
if (((ob.upleftfin or ob.downleftfin) or ob.uprightfin) or ob.downrightfin) {
currentmap = random(20) + 1;
level++;
_root.light = 1.5;
_root.blackfade.gotoAndPlay(10);
unload(mcSample);
unload(mcMaze);
unload(_root.rotate_tiles);
gotoAndPlay (10);
}
if (diry < -0.5) {
if (ob.upleft and ob.upright) {
ob.y = ob.y + diry;
} else {
ob.y = (ob.ytile * game.tileH) + ob.height;
}
}
if (diry > 0.5) {
if (ob.downleft and ob.downright) {
ob.y = ob.y + diry;
} else {
ob.y = ((ob.ytile + 1) * game.tileH) - ob.height;
}
}
getMyCorners(ob.x + dirx, ob.y, ob);
if (dirx < -0.5) {
if (ob.downleft and ob.upleft) {
ob.x = ob.x + dirx;
} else {
ob.x = (ob.xtile * game.tileW) + ob.width;
}
}
if (dirx > 0.5) {
if (ob.upright and ob.downright) {
ob.x = ob.x + dirx;
} else {
ob.x = ((ob.xtile + 1) * game.tileW) - ob.width;
}
}
ob.clip._x = ob.x;
ob.clip._y = ob.y;
ob.xtile = Math.floor(ob.x / game.tileW);
ob.ytile = Math.floor(ob.y / game.tileH);
game.clip._x = game.centerx - ob.x;
game.clip._y = game.centery - ob.y;
_root.charx = ob.x;
_root.chary = ob.y;
_root.charrot = ob.clip._rotation;
return(true);
}
function detectKeys() {
var _local2 = _root.char;
var _local3 = false;
if (_root.mousedown) {
tampx = _xmouse;
tampy = _ymouse;
if (_xmouse > 640) {
tampx = 640;
}
if (_xmouse < 0) {
tampx = 0;
}
if (_ymouse > 480) {
tampy = 480;
}
if (_ymouse < 0) {
tampy = 0;
}
dx = tampx - 320;
_local2.clip._rotation = _local2.clip._rotation + (dx / 20);
if ((_root.wisp._x > 0) and (_root.wisp._x < 640)) {
_root.wisp._x = _root.wisp._x - dx;
}
if (_root.wisp._x <= 320) {
_root.wisp._x = _root.wisp._x + ((320 - _root.wisp._x) / 2);
} else if (_root.wisp._x >= 320) {
_root.wisp._x = _root.wisp._x + ((320 - _root.wisp._x) / 2);
}
dy = tampy - 240;
speed = (dy / 20) * -1;
if (speed < -2) {
speed = -2;
}
lava = 1 + (level / 40);
if (speed > 0) {
_root.light = _root.light - ((speed * lava) / 10000);
} else {
_root.light = _root.light - (((speed * lava) * -1) / 10000);
}
_root.tempspeed = speed;
_local2.speedx = speed * Math.cos(((_local2.clip._rotation - 90) * Math.PI) / 180);
_local2.speedy = speed * Math.sin(((_local2.clip._rotation - 90) * Math.PI) / 180);
_local3 = _root.moveChar(_local2, _local2.speedx, _local2.speedy);
} else {
dx = 0;
_local2.clip._rotation = _local2.clip._rotation + (dx / 20);
if ((_root.wisp._x > 0) and (_root.wisp._x < 640)) {
_root.wisp._x = _root.wisp._x - dx;
}
if (_root.wisp._x <= 320) {
_root.wisp._x = _root.wisp._x + ((320 - _root.wisp._x) / 2);
} else if (_root.wisp._x >= 320) {
_root.wisp._x = _root.wisp._x + ((320 - _root.wisp._x) / 2);
}
dy = 0;
speed = (dy / 20) * -1;
if (speed < -2) {
speed = -2;
}
if (speed > 0) {
_root.light = _root.light - (speed / 10000);
} else {
_root.light = _root.light - ((speed * -1) / 10000);
}
_root.tempspeed = speed;
_local2.speedx = speed * Math.cos(((_local2.clip._rotation - 90) * Math.PI) / 180);
_local2.speedy = speed * Math.sin(((_local2.clip._rotation - 90) * Math.PI) / 180);
_local3 = _root.moveChar(_local2, _local2.speedx, _local2.speedy);
if (Key.isDown(39)) {
} else if (Key.isDown(37)) {
}
if (Key.isDown(38)) {
} else if (Key.isDown(40)) {
}
_root.charrot = _local2.clip._rotation;
if (!_local3) {
_local2.clip.char.gotoAndStop(1);
} else if (Key.isDown(16)) {
_local2.clip.gotoandstop("walk");
}
}
}
game = {tileW:100, tileH:100, currentMap:1, visx:7, visy:5};
game.Tile0 = function () {
};
game.Tile0.prototype.walkable = true;
game.Tile0.prototype.finish = false;
game.Tile0.prototype.frame = 1;
game.Tile1 = function () {
};
game.Tile1.prototype.walkable = false;
game.Tile1.prototype.finish = false;
game.Tile1.prototype.frame = 2;
game.Tile5 = function () {
};
game.Tile5.prototype.walkable = true;
game.Tile5.prototype.finish = true;
game.Tile5.prototype.frame = 20;
game.Tile4 = function () {
};
game.Tile4.prototype.walkable = false;
game.Tile4.prototype.finish = false;
game.Tile4.prototype.frame = 2;
char = {xtile:3, ytile:3, speedvalue:10};
buildMap(_root["myMap" + _root.currentmap]);
stop();
Instance of Symbol 70 MovieClip "mcMaze" in Frame 11
onClipEvent (unload) {
freeResources();
}
onClipEvent (load) {
function initEntry() {
_recDepth = 16;
_resoDx = 640;
_resoDy = 480;
this._x = 0;
this._y = 0;
_mathSqrt = Math.sqrt;
_targetBitmap = null;
setDefinition(2);
_wallBitmapList = new Array();
_wallBitmapList[0] = null;
_wallBitmapList[1] = flash.display.BitmapData.loadBitmap("wall" + (random(14) + 1));
_wallBitmapList[2] = flash.display.BitmapData.loadBitmap("wall" + (random(14) + 1));
_wallBitmapList[3] = flash.display.BitmapData.loadBitmap("wall" + (random(14) + 1));
_wallBitmapList[4] = flash.display.BitmapData.loadBitmap("wall" + (random(14) + 1));
_wallBitmapList[5] = flash.display.BitmapData.loadBitmap("wall20");
_drawMatrix = new flash.geom.Matrix();
_drawMatrix.a = 16;
_drawMatrix.b = 0;
_drawMatrix.c = 0;
_drawRectangle = new flash.geom.Rectangle(0, 0, 1, 1);
_drawCTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
function freeResources() {
var _local1 = 1;
while (_local1 < _wallBitmapList.length) {
_wallBitmapList[_local1].dispose();
_local1++;
}
if (_targetBitmap != null) {
_targetBitmap.dispose();
_targetBitmap = null;
}
}
function initMaze() {
myMap = new Array();
myMap = _root["myMap" + _root.currentmap];
}
function setDefinition(theDefinition) {
switch (theDefinition) {
case 0 :
this._xscale = 200;
this._yscale = 100;
_wallSize = 300;
_bitmapDx = _resoDx >> 1;
_bitmapDy = _resoDy;
break;
case 1 :
this._xscale = 200;
this._yscale = 200;
_wallSize = 150;
_bitmapDx = _resoDx >> 1;
_bitmapDy = _resoDy >> 1;
break;
default :
this._xscale = 400;
this._yscale = 400;
_wallSize = 75;
_bitmapDx = _resoDx >> 2;
_bitmapDy = _resoDy >> 2;
}
if (_targetBitmap != null) {
_targetBitmap.dispose();
}
_targetBitmap = new flash.display.BitmapData(_bitmapDx, _bitmapDy, true, 255);
this.attachBitmap(_targetBitmap, 100);
_parent.mcDefSelection.mcSelector.gotoAndStop(theDefinition + 1);
}
function refreshDisplay(xCam, zCam, angleCam) {
var _local5;
var _local4;
var _local3;
var _local2;
var _local9;
var _local10;
var _local13;
var _local14;
var _local8;
var _local7;
var _local6;
var _local12;
var _local11;
var _local1;
var _local15;
var _local16;
var _local17;
_targetBitmap.fillRect(new flash.geom.Rectangle(0, 0, _bitmapDx, _bitmapDy), 0);
_local17 = ((100 / _bitmapDx) * Math.PI) / 180;
_local15 = (angleCam * Math.PI) / 180;
_local16 = -(_local17 * (_bitmapDx >> 1));
_mRayNX = Math.sin(_local15);
_mRayNZ = -Math.cos(_local15);
_local12 = xCam / 100;
_local11 = zCam / 100;
_local9 = _local12 + (Math.sin(_local15 + _local16) * 0.01);
_local10 = _local11 - (Math.cos(_local15 + _local16) * 0.01);
_local13 = _local12 + (Math.sin(_local15 - _local16) * 0.01);
_local14 = _local11 - (Math.cos(_local15 - _local16) * 0.01);
_local15 = _local15 + _local16;
_xMid = _local9 + ((_local13 - _local9) * 0.5);
_zMid = _local10 + ((_local14 - _local10) * 0.5);
_local1 = 0;
while (_local1 < _bitmapDx) {
_local7 = _local9 + ((_local13 - _local9) * (_local1 / _bitmapDx));
_local6 = _local10 + ((_local14 - _local10) * (_local1 / _bitmapDx));
_local3 = Math.floor(_local7);
_local2 = Math.floor(_local6);
_local5 = _local7 - _local3;
_local4 = _local6 - _local2;
rayNX = _local7 - _local12;
rayNZ = _local6 - _local11;
_local8 = _mathSqrt((rayNX * rayNX) + (rayNZ * rayNZ));
rayNX = rayNX / _local8;
rayNZ = rayNZ / _local8;
if (Math.abs(rayNX) >= Math.abs(rayNZ)) {
if (rayNX >= 0) {
stepZ = rayNZ / rayNX;
if (stepZ > 0) {
cutMainXp_Zp(_local1, _local3, _local2, _local5, _local4, stepZ);
} else {
cutMainXp_Zn(_local1, _local3, _local2, _local5, _local4, stepZ);
}
} else {
stepZ = (-rayNZ) / rayNX;
if (stepZ > 0) {
cutMainXn_Zp(_local1, _local3, _local2, _local5, _local4, stepZ);
} else {
cutMainXn_Zn(_local1, _local3, _local2, _local5, _local4, stepZ);
}
}
} else if (rayNZ >= 0) {
stepX = rayNX / rayNZ;
if (stepX > 0) {
cutMainZp_Xp(_local1, _local3, _local2, _local5, _local4, stepX);
} else {
cutMainZp_Xn(_local1, _local3, _local2, _local5, _local4, stepX);
}
} else {
stepX = (-rayNX) / rayNZ;
if (stepX > 0) {
cutMainZn_Xp(_local1, _local3, _local2, _local5, _local4, stepX);
} else {
cutMainZn_Xn(_local1, _local3, _local2, _local5, _local4, stepX);
}
}
_local1++;
}
}
function cutMainXp_Zp(xDraw, ptx, ptz, x2, z2, stepZ) {
var _local4;
var _local3;
var _local8;
var _local5;
var _local10;
_local4 = 0;
_local10 = _recDepth;
while ((_local10--) >= 0) {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((z2 + qtepZ) >= 1) {
_local8 = (1 - z2) / stepZ;
_local3 = x2 + _local8;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = _local3;
z2 = 0;
ptz++;
_local4 = -x2;
continue;
}
}
z2 = z2 + ((1 - x2) * stepZ);
x2 = 0;
ptx++;
_local4 = -z2;
}
}
function cutMainXp_Zn(xDraw, ptx, ptz, x2, z2, stepZ) {
var _local4;
var _local3;
var _local9;
var _local5;
var _local10;
_local4 = 0;
_local10 = _recDepth;
while ((_local10--) >= 0) {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((z2 + stepZ) < 0) {
_local9 = (-z2) / stepZ;
_local3 = x2 + _local9;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = _local3;
z2 = 1;
ptz--;
_local4 = -x2;
continue;
}
}
z2 = z2 + ((1 - x2) * stepZ);
x2 = 0;
ptx++;
_local4 = -z2;
}
}
function cutMainXn_Zp(xDraw, ptx, ptz, x2, z2, stepZ) {
var _local4;
var _local3;
var _local9;
var _local5;
var _local10;
_local4 = 0;
_local10 = _recDepth;
do {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((z2 + stepZ) >= 1) {
_local9 = (z2 - 1) / stepZ;
_local3 = x2 + _local9;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = _local3;
z2 = 0;
ptz++;
_local4 = -x2;
continue;
}
} else {
z2 = z2 + (x2 * stepZ);
x2 = 1;
ptx--;
_local4 = -z2;
}
} while ((_local10--) >= 0);
}
function cutMainXn_Zn(xDraw, ptx, ptz, x2, z2, stepZ) {
var _local4;
var _local3;
var _local11;
var _local5;
var _local9;
_local4 = 0;
_local9 = _recDepth;
do {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((z2 + stepZ) < 0) {
dx2 = z2 / stepZ;
_local3 = x2 + dx2;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = _local3;
z2 = 1;
ptz--;
_local4 = -x2;
continue;
}
} else {
z2 = z2 + (x2 * stepZ);
x2 = 1;
ptx--;
_local4 = -z2;
}
} while ((_local9--) >= 0);
}
function cutMainZp_Xp(xDraw, ptx, ptz, x2, z2, stepX) {
var _local4;
var _local3;
var _local9;
var _local5;
var _local10;
_local4 = 0;
_local10 = _recDepth;
do {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((x2 + stepX) >= 1) {
_local9 = (1 - x2) / stepX;
_local3 = z2 + _local9;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = 0;
z2 = _local3;
ptx++;
_local4 = -z2;
continue;
}
} else {
x2 = x2 + ((1 - z2) * stepX);
z2 = 0;
ptz++;
_local4 = -x2;
}
} while ((_local10--) >= 0);
}
function cutMainZp_Xn(xDraw, ptx, ptz, x2, z2, stepX) {
var _local4;
var _local3;
var _local9;
var _local5;
var _local10;
_local4 = 0;
_local10 = _recDepth;
do {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((x2 + stepX) < 0) {
_local9 = -(x2 / stepX);
_local3 = z2 + _local9;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = 1;
z2 = _local3;
ptx--;
_local4 = -z2;
continue;
}
} else {
x2 = x2 + ((1 - z2) * stepX);
z2 = 0;
ptz++;
_local4 = -x2;
}
} while ((_local10--) >= 0);
}
function cutMainZn_Xp(xDraw, ptx, ptz, x2, z2, stepX) {
var _local4;
var _local3;
var _local9;
var _local5;
var _local10;
_local4 = 0;
_local10 = _recDepth;
do {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((x2 + stepX) >= 1) {
_local9 = (x2 - 1) / stepX;
_local3 = z2 + _local9;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = 0;
z2 = _local3;
ptx++;
_local4 = -z2;
continue;
}
} else {
x2 = x2 + (z2 * stepX);
z2 = 1;
ptz--;
_local4 = -x2;
}
} while ((_local10--) >= 0);
}
function cutMainZn_Xn(xDraw, ptx, ptz, x2, z2, stepX) {
var _local4;
var _local3;
var _local9;
var _local5;
var _local10;
_local4 = 0;
_local10 = _recDepth;
do {
_local5 = myMap[ptz & 15][ptx & 15];
if (_local5 > 0) {
renderScanLine(xDraw, x2 + ptx, z2 + ptz, _local4, _local5);
return(undefined);
}
if ((x2 + stepX) < 0) {
_local9 = x2 / stepX;
_local3 = z2 + _local9;
if ((_local3 >= 0) and (_local3 < 1)) {
x2 = 1;
z2 = _local3;
ptx--;
_local4 = -z2;
continue;
}
} else {
x2 = x2 + (z2 * stepX);
z2 = 1;
ptz--;
_local4 = -x2;
}
} while ((_local10--) >= 0);
}
function renderScanLine(xDraw, xFinal, zFinal, u, bloc) {
var _local5;
var _local3;
var _local4;
var _local2;
var _local6;
var _local8;
var _local7;
_local3 = xFinal - _xMid;
_local2 = zFinal - _zMid;
_local8 = ((_mRayNX * _local3) * _root.focald) + (_mRayNZ * _local2);
_local3 = _local8 * _mRayNX;
_local2 = _local8 * _mRayNZ;
_local5 = _mathSqrt((_local3 * _local3) + (_local2 * _local2));
if (_local5 < 0.1) {
return(undefined);
}
_local6 = _root.light - (_local5 / (3 * _root.focald));
_drawCTransform.redMultiplier = _local6;
_drawCTransform.greenMultiplier = _local6;
_drawCTransform.blueMultiplier = _local6;
_local4 = _wallSize / _local5;
_local7 = (_bitmapDy - _local4) * 0.5;
_drawRectangle.x = xDraw;
_drawRectangle.y = _local7;
_drawRectangle.height = _local4;
_drawMatrix.d = _local4 / 128;
_drawMatrix.tx = xDraw + (u * 2048);
_drawMatrix.ty = _local7;
_targetBitmap.draw(_wallBitmapList[bloc], _drawMatrix, _drawCTransform, "normal", _drawRectangle, true);
}
var _resoDx;
var _resoDy;
var myMap;
var _wallBitmapList;
var _drawMatrix;
var _drawRectangle;
var _drawCTransform;
var _targetBitmap;
var _mathSqrt;
var _wallSize;
var _bitmapDx;
var _bitmapDy;
var _mRayNX;
var _mRayNZ;
var _xMid;
var _zMid;
var _recDepth;
initEntry();
}
Instance of Symbol 72 MovieClip "mcSample" in Frame 11
onClipEvent (load) {
function initSample() {
_xCam = _root.charx;
_zCam = _root.chary;
_angleCam = _root.charrot;
_parent.mcMaze.initMaze();
_oldTime = getTimer();
this.onEnterFrame = sampleLoop;
}
function myPress() {
_bMove = true;
}
function myRelease() {
speed = 0;
_bMove = false;
}
function sampleLoop() {
var _local6;
var _local5;
var _local4;
var _local3;
_local4 = getTimer();
_nbMs = _local4 - _oldTime;
_oldTime = _local4;
if (_nbMs < 1) {
_nbMs = 1;
}
if (_bMove == true) {
_local6 = _parent._xmouse - 320;
_angleCam = _angleCam + ((_local6 * _nbMs) * 0.0005);
_local5 = _parent._ymouse - 240;
_local3 = (_nbMs * _local5) * 0.001;
_root.dispspeed = _local3;
_xCam = _xCam - (Math.sin((_angleCam * Math.PI) / 180) * _local3);
_zCam = _zCam + (Math.cos((_angleCam * Math.PI) / 180) * _local3);
} else {
_local3 = 0;
_root.dispspeed = _local3 * -1;
if (Key.isDown(37)) {
_angleCam = (_angleCam - (_nbMs * 0.2)) % 360;
}
if (Key.isDown(39)) {
_angleCam = (_angleCam + (_nbMs * 0.2)) % 360;
}
_local3 = _nbMs * 0.15;
if (Key.isDown(40)) {
_xCam = _xCam - (Math.sin((_angleCam * Math.PI) / 180) * _local3);
_zCam = _zCam + (Math.cos((_angleCam * Math.PI) / 180) * _local3);
}
if (Key.isDown(38)) {
_xCam = _xCam + (Math.sin((_angleCam * Math.PI) / 180) * _local3);
_zCam = _zCam - (Math.cos((_angleCam * Math.PI) / 180) * _local3);
}
}
_xCam = _xCam % 1600;
_zCam = _zCam % 1600;
_xCam = _root.charx;
_zCam = _root.chary;
_angleCam = _root.charrot;
_parent.mcMaze.refreshDisplay(_xCam, _zCam, _angleCam);
_parent.mcMap = true;
if (_parent.mcMap) {
_parent.mcMap.refreshIt(_xCam, _zCam, _angleCam);
}
}
var _nbMs;
var _oldTime;
var _xCam;
var _zCam;
var _angleCam;
this.onEnterFrame = initSample;
}
Instance of Symbol 75 MovieClip in Frame 11
onClipEvent (enterFrame) {
this.nbFrames = ((int(1000 / _parent.mcSample._nbMs) + " (") + _parent.mcSample._nbMs) + ")";
}
Instance of Symbol 89 MovieClip "mcDefSelection" in Frame 11
/* no clip actions */
Instance of Symbol 22 MovieClip [empty] "controller" in Frame 11
onClipEvent (enterFrame) {
_root.detectKeys();
}
Instance of Symbol 99 MovieClip "blackfade" in Frame 11
onClipEvent (load) {
gotoAndPlay (2);
}
onClipEvent (enterFrame) {
}
Instance of Symbol 186 MovieClip "wisp" in Frame 11
onClipEvent (load) {
_visible = true;
tempspeed = Number;
tempspeed = 0;
glide = false;
stop();
gotoAndStop (7);
}
onClipEvent (enterFrame) {
if (_root.highdetail) {
_parent.mcMaze.setDefinition(0);
gotoAndStop ("blur");
} else {
_parent.mcMaze.setDefinition(3);
gotoAndStop ("basic");
}
gotoAndStop(_root.charqual);
if (_root.light < 0) {
_root.gotoAndPlay("end");
}
if (_root.light < 0.25) {
_root.light = _root.light - 0.01;
}
_alpha = (_root.light * 20);
tempspeed = tempspeed + (_root.tempspeed / 4);
if (tempspeed > 30) {
tempspeed = 30 - tempspeed;
}
if (tempspeed < 1) {
tempspeed = 1;
}
if (_root.tempspeed > 10) {
glide = true;
} else {
glide = false;
}
if (glide) {
wisp.gotoAndStop("fly");
_rotation = (((_x * -1) + 320) / 5);
if (_root.focald < 3) {
_root.focald = _root.focald + 0.2;
}
} else if (_root.focald >= 1) {
_root.focald = _root.focald - 0.5;
}
if (_root.focald < 1) {
_root.focald = 1;
}
if (!glide) {
if (_root.tempspeed > 4) {
wisp.gotoAndStop("run");
_rotation = (((_x * -1) + 320) / 15);
} else {
wisp.gotoAndStop("walk");
_rotation = 0;
}
}
finspeed = Math.floor(tempspeed);
this.wisp.anim.gotoAndStop(finspeed);
}
Instance of Symbol 198 MovieClip in Frame 11
onClipEvent (load) {
if (!_root.firstplay) {
gotoAndStop ("empty");
}
}
Frame 22
score = "SCORE : " + level;
Frame 43
stop();
Instance of Symbol 62 MovieClip in Frame 44
onClipEvent (load) {
textname = "START";
}
Instance of Symbol 99 MovieClip "blackfade" in Frame 44
onClipEvent (load) {
gotoAndPlay (2);
}
onClipEvent (enterFrame) {
}
Symbol 17 MovieClip [char] Frame 1
stop();
Symbol 21 MovieClip [tile] Frame 2
stop();
Symbol 28 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay ("loaded");
}
Symbol 28 MovieClip Frame 2
gotoAndPlay (1);
Symbol 28 MovieClip Frame 22
_root.gotoAndStop(2);
Symbol 34 Button
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 37 MovieClip Frame 60
stop();
Symbol 39 MovieClip Frame 200
_parent.gotoAndStop("menu");
Symbol 46 Button
on (keyPress "s") {
if (_root.music) {
_root.music = false;
} else {
_root.music = true;
}
}
on (keyPress "q") {
if (_root.highdetail) {
_root.highdetail = false;
} else {
_root.highdetail = true;
}
}
Symbol 60 Button
on (press) {
if (!_parent.pusha) {
play();
_parent.pusha = true;
}
}
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 45
if ((textname == "START") or (textname == "TRY AGAIN?")) {
_root.light = 1.5;
_root.level = 0;
_root.gotoAndStop("main");
}
if (textname == "INSTRUCTIONS") {
_root.gotoAndStop("inst");
}
if (textname == "SPONSOR") {
_root.gotoAndStop("sponsor");
}
Symbol 64 MovieClip Frame 1
pusha = false;
Instance of Symbol 62 MovieClip in Symbol 64 MovieClip Frame 1
onClipEvent (load) {
textname = "START";
}
Instance of Symbol 62 MovieClip in Symbol 64 MovieClip Frame 1
onClipEvent (load) {
textname = "INSTRUCTIONS";
}
Symbol 65 MovieClip Frame 1
Instance of Symbol 57 MovieClip in Symbol 65 MovieClip Frame 1
onClipEvent (load) {
texta = "WISP";
}
Symbol 65 MovieClip Frame 156
stop();
Symbol 66 MovieClip Frame 95
stop();
Instance of Symbol 69 MovieClip in Symbol 70 MovieClip Frame 1
onClipEvent (load) {
this._visible = false;
}
Symbol 77 Button
on (press) {
_root.mousedown = true;
mcSample.myPress();
}
on (release, releaseOutside) {
_root.mousedown = false;
mcSample.myRelease();
}
Symbol 95 Button
on (press) {
currentmap = 1;
unload(mcSample);
unload(mcMaze);
unload(_root.rotate_tiles);
gotoAndPlay (2);
}
Symbol 99 MovieClip Frame 1
Symbol 99 MovieClip Frame 19
stop();
Instance of Symbol 178 MovieClip in Symbol 184 MovieClip Frame 1
onClipEvent (load) {
ran = random(100);
if (ran > 50) {
_xscale = (_xscale * -1);
}
gotoAndPlay(random(15));
}
Instance of Symbol 178 MovieClip in Symbol 184 MovieClip Frame 2
onClipEvent (load) {
ran = random(100);
if (ran > 50) {
_xscale = (_xscale * -1);
}
gotoAndPlay(random(15));
}
Instance of Symbol 178 MovieClip in Symbol 184 MovieClip Frame 3
onClipEvent (load) {
ran = random(100);
if (ran > 50) {
_xscale = (_xscale * -1);
}
gotoAndPlay(random(15));
}
Instance of Symbol 178 MovieClip in Symbol 184 MovieClip Frame 4
onClipEvent (load) {
ran = random(100);
if (ran > 50) {
_xscale = (_xscale * -1);
}
gotoAndPlay(random(15));
}
Instance of Symbol 178 MovieClip in Symbol 184 MovieClip Frame 5
onClipEvent (load) {
ran = random(100);
if (ran > 50) {
_xscale = (_xscale * -1);
}
gotoAndPlay(random(15));
}
Symbol 184 MovieClip Frame 6
stop();
Instance of Symbol 178 MovieClip in Symbol 184 MovieClip Frame 6
onClipEvent (load) {
ran = random(100);
if (ran > 50) {
_xscale = (_xscale * -1);
}
gotoAndPlay(random(15));
}
Symbol 185 MovieClip Frame 1
stop();
Instance of Symbol 130 MovieClip "anim" in Symbol 185 MovieClip Frame 1
onClipEvent (enterFrame) {
}
Instance of Symbol 185 MovieClip "wisp" in Symbol 186 MovieClip Frame 1
onClipEvent (load) {
multiflame = true;
}
Instance of Symbol 185 MovieClip "wisp" in Symbol 186 MovieClip Frame 6
onClipEvent (load) {
multiflame = false;
}
Symbol 198 MovieClip Frame 25
_root.firstplay = false;
Symbol 198 MovieClip Frame 1001
_visible = false;
stop();
Instance of Symbol 62 MovieClip in Symbol 203 MovieClip Frame 1
onClipEvent (load) {
textname = "TRY AGAIN?";
}
Instance of Symbol 57 MovieClip in Symbol 203 MovieClip Frame 1
onClipEvent (load) {
texta = "GAME";
}
Instance of Symbol 57 MovieClip in Symbol 203 MovieClip Frame 1
onClipEvent (load) {
texta = "OVER";
}