home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Aventura / the_lost_vikings.swf / scripts / frame_1 / DoAction.as
Encoding:
Text File  |  2007-03-20  |  59.1 KB  |  1,394 lines

  1. function MOT_trace(message_)
  2. {
  3. }
  4. function MOT_random(min_, max_)
  5. {
  6.    var r;
  7.    do
  8.    {
  9.       r = Math.random();
  10.    }
  11.    while(r == 1);
  12.    
  13.    return min_ + Math.floor(r * (max_ + 1 - min_));
  14. }
  15. function MOT_Atom()
  16. {
  17.    this.owner = 0;
  18.    this.next = 0;
  19.    this.index = 0;
  20.    this.processedIndex = 0;
  21. }
  22. function MOT_AtomGroup(size_)
  23. {
  24.    this.free = 0;
  25.    this.size = size_;
  26.    this.start = 0;
  27.    this.Atoms = new Array(this.size);
  28.    this.head = 0;
  29.    var i;
  30.    i = 0;
  31.    while(i < this.size)
  32.    {
  33.       this.Atoms[i] = new MOT_Atom();
  34.       this.Atoms[i].next = i + 1;
  35.       i++;
  36.    }
  37.    this.Atoms[i].next = -1;
  38.    this.free = 0;
  39.    this.start = -1;
  40.    _root.MOT_trace("Creating Atoms, " + this.size + " elements");
  41. }
  42. function MOT_Keypad()
  43. {
  44.    var i;
  45.    this.state = new Array();
  46.    i = 0;
  47.    while(i < 256)
  48.    {
  49.       this.state[i] = 0;
  50.       i++;
  51.    }
  52.    this.onKeyDown = function()
  53.    {
  54.       this.state[Key.getCode()] = 1;
  55.    };
  56.    this.onKeyUp = function()
  57.    {
  58.       this.state[Key.getCode()] = 0;
  59.    };
  60.    Key.addListener(this);
  61. }
  62. function MOT_Level()
  63. {
  64.    this.Mickey = 0;
  65.    this.Level = 0;
  66. }
  67. function MOT_ObjGroup()
  68. {
  69.    var i;
  70.    this.TheAtoms = new MOT_AtomGroup(64);
  71.    this.KillList = new MOT_AtomGroup(64);
  72.    i = 0;
  73.    while(i < 256)
  74.    {
  75.       _root.Collide_DN_Tabl[i] = 0;
  76.       i++;
  77.    }
  78.    _root.Collide_DN_Tabl[1] = 1;
  79.    _root.Collide_DN_Tabl[6] = 1;
  80.    _root.Collide_DN_Tabl[7] = 1;
  81.    _root.Collide_DN_Tabl[8] = 1;
  82.    _root.Collide_DN_Tabl[9] = 1;
  83.    this.PlayerArray = new Array();
  84.    this.ObjectArray = new Array();
  85.    var i = 0;
  86.    while(i <= 10)
  87.    {
  88.       var row = new Array();
  89.       this.ObjectArray[i] = row;
  90.       var j = 0;
  91.       while(j <= 10)
  92.       {
  93.          row[j] = new Array();
  94.          j++;
  95.       }
  96.       i++;
  97.    }
  98.    this.processedIndex = 0;
  99. }
  100. function MOT_Obj()
  101. {
  102.    var i;
  103.    this.Keys_state = new Array();
  104.    this.Keys_pressed = new Array();
  105.    i = 0;
  106.    while(i < 32)
  107.    {
  108.       this.Keys_state[i] = 0;
  109.       this.Keys_pressed[i] = 0;
  110.       i++;
  111.    }
  112.    this.Obj_Group = 0;
  113.    i = 0;
  114.    while(i < 4)
  115.    {
  116.       this["Obj_Hndlr" + i] = 0;
  117.       this["Obj_Hndlr" + i + "_i"] = 0;
  118.       i++;
  119.    }
  120.    this.Obj_Flip = 1;
  121.    this.Obj_Flags = 0;
  122.    this.Obj_Trans = 0;
  123.    this.Obj_Depth = 0;
  124.    this.Obj_Flash = 0;
  125.    this.Obj_X = 0;
  126.    this.Obj_Y = 0;
  127.    this.Obj_HotX = 0;
  128.    this.Obj_HotY = 0;
  129.    this.Obj_RegX = 0;
  130.    this.Obj_RegY = 0;
  131.    this.Obj_DX = 0;
  132.    this.Obj_DY = 0;
  133.    this.Obj_X1 = 0;
  134.    this.Obj_Y1 = 0;
  135.    this.Obj_X2 = 0;
  136.    this.Obj_Y2 = 0;
  137.    this.CX1 = 0;
  138.    this.CY1 = 0;
  139.    this.CX2 = 0;
  140.    this.CY2 = 0;
  141.    this.Obj_Width = 0;
  142.    this.Obj_Height = 0;
  143.    this.Obj_AnimFrame = -1;
  144.    this.Obj_Timer = 0;
  145.    this.Obj_Target = 0;
  146.    this.Obj_Climb = 0;
  147.    this.Obj_Shield_Up = 0;
  148.    this.Obj_Health = 3;
  149.    this.CX_Flags = 0;
  150.    this.CX_Fall_Flag = 0;
  151.    this.CX_Collide_Flag = 0;
  152.    this.CX_Bounce_Flag = 0;
  153.    this.CX_Obj_Collide = 0;
  154.    this.CX_DY = 0;
  155.    this.Old_X0 = 0;
  156.    this.Old_Y0 = 0;
  157.    this.counter = 0;
  158.    _root.MOT_Trace("Creating MOT_Obj");
  159. }
  160. function teleportCreate(owner_)
  161. {
  162.    _root.Objs.create("TeleportClass",64,0,owner_.Obj_X,owner_.Obj_Y,null);
  163. }
  164. function teleportCheck(owner_)
  165. {
  166.    var x = owner_.Obj_X >> 16 & 4294967288;
  167.    var y = owner_.Obj_Y >> 16 & 4294967288;
  168.    if(_root.CMapArray[y / 8 * 102 + x / 8] == 10)
  169.    {
  170.       _root.goto_Flag = 8;
  171.       return 1;
  172.    }
  173.    return 0;
  174. }
  175. function helpCheck(owner_)
  176. {
  177.    var x = owner_.Obj_X >> 16 & 4294967288;
  178.    var y = owner_.Obj_Y >> 16 & 4294967288;
  179.    if(_root.CMapArray[y / 8 * 102 + x / 8] == 30)
  180.    {
  181.       _root.KeyLocked = 1;
  182.       _root.snd.attachSound("LV_131");
  183.       _root.snd.start();
  184.       _root.Objs.create("HelpClass",80,1,7864320,5242880,8).gotoAndPlay("help1");
  185.    }
  186.    if(_root.CMapArray[y / 8 * 102 + x / 8] == 31)
  187.    {
  188.       _root.KeyLocked = 1;
  189.       _root.snd.attachSound("LV_131");
  190.       _root.snd.start();
  191.       _root.Objs.create("HelpClass",80,1,7864320,5242880,8).gotoAndPlay("help2");
  192.    }
  193.    if(_root.CMapArray[y / 8 * 102 + x / 8] == 32)
  194.    {
  195.       _root.KeyLocked = 1;
  196.       _root.snd.attachSound("LV_131");
  197.       _root.snd.start();
  198.       _root.Objs.create("HelpClass",80,1,7864320,5242880,8).gotoAndPlay("help3");
  199.    }
  200.    if(_root.CMapArray[y / 8 * 102 + x / 8] == 33)
  201.    {
  202.       _root.KeyLocked = 1;
  203.       _root.snd.attachSound("LV_131");
  204.       _root.snd.start();
  205.       _root.Objs.create("HelpClass",80,1,7864320,5242880,8).gotoAndPlay("help4");
  206.    }
  207.    if(_root.CMapArray[y / 8 * 102 + x / 8] == 34)
  208.    {
  209.       _root.KeyLocked = 1;
  210.       _root.snd.attachSound("LV_131");
  211.       _root.snd.start();
  212.       _root.Objs.create("HelpClass",80,1,7864320,5242880,8).gotoAndPlay("help5");
  213.    }
  214.    if(_root.CMapArray[y / 8 * 102 + x / 8] == 60)
  215.    {
  216.       _root.KeyLocked = 1;
  217.       _root.snd.attachSound("LV_131");
  218.       _root.snd.start();
  219.       _root.Objs.create("HelpClass",80,1,7864320,5242880,8).gotoAndPlay("ATFK1");
  220.    }
  221. }
  222. function gotoTitle()
  223. {
  224.    _root.Title = _root.attachMovie("Title Screen","Title Screen",0);
  225.    _root.Title._x = 120;
  226.    _root.Title._y = 80;
  227.    _root.snd.attachSound("LVM_00");
  228.    _root.snd.start();
  229. }
  230. function gotoWin()
  231. {
  232.    _root.Win = _root.attachMovie("Win Screen","Win Screen",0);
  233.    _root.Win._x = 120;
  234.    _root.Win._y = 80;
  235.    _root.snd.attachSound("LVM_01_loop");
  236.    _root.snd.start(0,9999);
  237. }
  238. function gotoLose()
  239. {
  240.    _root.Lose = _root.attachMovie("Game Over","Game Over",0);
  241.    _root.Lose._x = 120;
  242.    _root.Lose._y = 80;
  243.    _root.snd.attachSound("LV_214_loop");
  244.    _root.snd.start(0,9999);
  245. }
  246. function gotoGame()
  247. {
  248.    _root.frame = 0;
  249.    _root.snd.stop("LVM_00");
  250.    _root.snd.attachSound("LVM_02_loop");
  251.    _root.snd.start(0,9999);
  252.    _root.Health = _root.attachMovie("HealthBarClass","x",0);
  253.    _root.Health._x = 24;
  254.    _root.Health._y = 159;
  255.    _root.Fighter = _root.Objs.create("FighterClass",48,0,4718592,6291456,128);
  256.    _root.Runner = _root.Objs.create("RunnerClass",32,0,6815744,6291456,128);
  257.    _root.Shield = _root.Objs.create("ShieldClass",32,0,2621440,6291456,128);
  258.    _root.Elevator1 = _root.Objs.create("ElevatorClass",8,0,8388608,7274496,8);
  259.    _root.Elevator2 = _root.Objs.create("ElevatorClass",8,0,4194304,28246016,8);
  260.    _root.EnergyField1 = _root.Objs.create("EnergyFieldClass",64,0,8388608,21889024,null);
  261.    _root.EnergyField1.Obj_Climb = 0;
  262.    _root.EnergyField2 = _root.Objs.create("EnergyFieldClass",64,0,4194304,51118080,null);
  263.    _root.EnergyField2.Obj_Climb = 1;
  264.    _root.Barrier1 = _root.Objs.create("BarrierClass",32,0,31916032,10485760,null);
  265.    _root.Barrier1.Obj_Climb = 2;
  266.    _root.Barrier2 = _root.Objs.create("BarrierClass",32,0,23527424,27262976,null);
  267.    _root.Barrier2.Obj_Climb = 3;
  268.    _root.Switch1 = _root.Objs.create("SwitchClass",12,0,33816576,8912896,null);
  269.    _root.Switch1.Obj_Climb = 0;
  270.    _root.Switch2 = _root.Objs.create("SwitchClass",12,0,22020096,25624576,null);
  271.    _root.Switch2.Obj_Climb = 1;
  272.    _root.Door1 = _root.Objs.create("DoorClass",56,0,41418752,10485760,null);
  273.    _root.Door1.Obj_Climb = 2;
  274.    _root.Door2 = _root.Objs.create("DoorLockClass",56,0,35127296,27262976,null);
  275.    _root.Door2.Obj_Climb = 3;
  276.    _root.Door3 = _root.Objs.create("DoorClass",56,0,7864320,49283072,null);
  277.    _root.Door3.Obj_Climb = 0;
  278.    _root.Door4 = _root.Objs.create("DoorLockClass",56,0,27787264,49283072,null);
  279.    _root.Door4.Obj_Climb = 1;
  280.    _root.CMapArray[9334] = 1;
  281.    _root.CMapArray[9335] = 1;
  282.    _root.CMapArray[9436] = 1;
  283.    _root.CMapArray[9437] = 1;
  284.    _root.CMapArray[9538] = 1;
  285.    _root.CMapArray[9539] = 1;
  286.    _root.RedKey = _root.Objs.create("RedKeyClass",12,0,50462720,33488896,null);
  287.    _root.RedHole = _root.Objs.create("RedHoleClass",12,0,36569088,26214400,8);
  288.    _root.YellowKey = _root.Objs.create("YellowKeyClass",12,0,11534336,37158912,null);
  289.    _root.YellowHole = _root.Objs.create("YellowHoleClass",12,0,25690112,48168960,8);
  290.    _root.Bowling1 = _root.Objs.create("BowlingClass",32,0,23068672,40828928,null);
  291.    _root.Bowling2 = _root.Objs.create("BowlingClass",32,0,40894464,43974656,null);
  292.    _root.Bowling3 = _root.Objs.create("BowlingClass",32,0,46661632,43974656,null);
  293.    _root.Bowling4 = _root.Objs.create("BowlingClass",32,0,35782656,49217536,null);
  294.    _root.Wall1 = _root.Objs.create("WallClass",64,0,17235968,19922944,null);
  295.    _root.Wall1.Obj_Climb = 2;
  296.    _root.Wall2 = _root.Objs.create("WallClass",64,0,11993088,27262976,null);
  297.    _root.Wall2.Obj_Climb = 3;
  298.    _root.ATFK = _root.Objs.create("ATFKClass",32,0,42467328,37683200,null);
  299.    _root.ATFK.Obj_Climb = 0;
  300.    _root.Exit = _root.Objs.create("ExitClass",32,0,39976960,43909120,null);
  301.    _root.Exit.Obj_Climb = 1;
  302.    _root.Space = _root.Objs.create("SpaceClass",0,2,0,0,264);
  303.    _root.SpaceFG = _root.Objs.create("SpaceFGClass",60,2,0,0,256);
  304.    _root.Arrow = 0;
  305.    _root.Level.gotoMickey(_root.Runner);
  306.    _root.Level.setLevel(_root.Space);
  307. }
  308. function quitGame()
  309. {
  310.    _root.Fighter.kill();
  311.    _root.Runner.kill();
  312.    _root.Shield.kill();
  313.    _root.Runner.kill();
  314.    _root.Elevator1.kill();
  315.    _root.Elevator2.kill();
  316.    _root.EnergyField1.kill();
  317.    _root.EnergyField2.kill();
  318.    _root.Barrier1.kill();
  319.    _root.Barrier2.kill();
  320.    _root.Switch1.kill();
  321.    _root.Switch2.kill();
  322.    _root.Door1.kill();
  323.    _root.Door2.kill();
  324.    _root.Door3.kill();
  325.    _root.Door4.kill();
  326.    _root.RedKey.kill();
  327.    _root.RedHole.kill();
  328.    _root.YellowKey.kill();
  329.    _root.YellowHole.kill();
  330.    _root.Bowling1.kill();
  331.    _root.Bowling2.kill();
  332.    _root.Bowling3.kill();
  333.    _root.Bowling4.kill();
  334.    _root.Wall1.kill();
  335.    _root.Wall2.kill();
  336.    _root.ATFK.kill();
  337.    _root.Exit.kill();
  338.    _root.Space.kill();
  339.    _root.SpaceFG.kill();
  340.    if(_root.Arrow)
  341.    {
  342.       _root.Arrow.kill();
  343.    }
  344.    _root.Health.removeMovieClip();
  345.    _root.snd.stop("LVM_02_loop");
  346. }
  347. _root.KEY_LT = 37;
  348. _root.KEY_RT = 39;
  349. _root.KEY_UP = 38;
  350. _root.KEY_DN = 40;
  351. _root.KEY_A = 65;
  352. _root.KEY_B = 83;
  353. _root.KEY_LB = 81;
  354. _root.KEY_RB = 87;
  355. _root.KEY_CHEAT = 17;
  356. _root.Obj_Flags_ALWAYSRUN = 384;
  357. _root.Obj_Flags_BACKGROUND = 256;
  358. _root.Obj_Flags_MICKEY = 128;
  359. _root.Obj_Flags_DEAD = 64;
  360. _root.Obj_Flags_SPECIAL = 32;
  361. _root.Obj_Flags_KILL = 16;
  362. _root.Obj_Flags_KEYBD = 8;
  363. _root.Obj_Flags_GONE = 4;
  364. _root.Obj_Flags_ATTACK = 2;
  365. _root.Obj_Flags_CLIMBING = 1;
  366. _root.Scroll_X = 0;
  367. _root.Scroll_Y = 0;
  368. _root.KeyLocked = 0;
  369. _root.ImpactX_Flag = 0;
  370. _root.ImpactY_Flag = 0;
  371. _root.goto_Flag = 0;
  372. _root.bits_on = [128,64,32,16,8,4,2,1];
  373. _root.bits_off = [127,191,223,239,247,251,253,254];
  374. _root.Impact_Tabl = [0,-1,2,-3,4,-5,6,-7,8];
  375. _root.Collide_DN_Tabl = new Array();
  376. MOT_Atom.prototype = new Object();
  377. MOT_AtomGroup.prototype = new Object();
  378. MOT_AtomGroup.prototype.reset = function()
  379. {
  380.    var i;
  381.    i = 0;
  382.    while(i < this.size)
  383.    {
  384.       this.Atoms[i].next = i + 1;
  385.       i++;
  386.    }
  387.    this.Atoms[i].next = -1;
  388.    this.free = 0;
  389.    this.start = -1;
  390. };
  391. MOT_AtomGroup.prototype.addAtom = function(object_)
  392. {
  393.    var i = this.free;
  394.    _root.MOT_trace("addAtom: object: " + object_);
  395.    this.free = this.Atoms[i].next;
  396.    this.Atoms[i].owner = object_;
  397.    this.Atoms[i].next = this.start;
  398.    this.Atoms[i].index = i;
  399.    this.start = i;
  400.    return this.Atoms[i];
  401. };
  402. MOT_AtomGroup.prototype.delAtom = function(atom_)
  403. {
  404.    var i;
  405.    i = atom_.index;
  406.    _root.MOT_trace("delAtom: object: " + i);
  407.    this.start = this.Atoms[i].next;
  408.    this.Atoms[i].next = this.free;
  409.    this.free = i;
  410. };
  411. MOT_AtomGroup.prototype.changeAtom(i,object_);
  412. this.Atoms[i].owner = object_;
  413. MOT_AtomGroup.prototype.rewind = function()
  414. {
  415.    this.head = this.start;
  416. };
  417. MOT_AtomGroup.prototype.forward = function()
  418. {
  419.    this.head = this.Atoms[this.head].next;
  420. };
  421. MOT_AtomGroup.prototype.getHead = function()
  422. {
  423.    return this.head;
  424. };
  425. MOT_Keypad.prototype = new Object();
  426. MOT_Level.prototype = new Object();
  427. MOT_Level.prototype.setMickey = function(mickey_)
  428. {
  429.    this.Mickey = mickey_;
  430. };
  431. MOT_Level.prototype.exitMickey = function(mickey_)
  432. {
  433.    mickey_.killKeys();
  434.    mickey_.Obj_Flash = 0;
  435.    mickey_._visible = 1;
  436.    mickey_.setDepth(16);
  437. };
  438. MOT_Level.prototype.gotoMickey = function(mickey_)
  439. {
  440.    this.Mickey = mickey_;
  441.    this.Mickey.Obj_Flash = 20;
  442.    this.Mickey.setDepth(48);
  443.    _root.goto_Flag = 8;
  444. };
  445. MOT_Level.prototype.getMickey = function()
  446. {
  447.    return this.Mickey;
  448. };
  449. MOT_Level.prototype.setLevel = function(level_)
  450. {
  451.    this.Level = level_;
  452. };
  453. MOT_Level.prototype.scroll = function()
  454. {
  455.    _root.Scroll_X = (this.Mickey.Obj_X >> 16) - 120;
  456.    _root.Scroll_Y = (this.Mickey.Obj_Y >> 16) - 80;
  457.    if(_root.Scroll_X < 0)
  458.    {
  459.       _root.Scroll_X = 0;
  460.    }
  461.    if(_root.Scroll_X > this.Level._width - 240)
  462.    {
  463.       _root.Scroll_X = this.Level._width - 240;
  464.    }
  465.    if(_root.Scroll_Y < 0)
  466.    {
  467.       _root.Scroll_Y = 0;
  468.    }
  469.    if(_root.Scroll_Y > this.Level._height - 160)
  470.    {
  471.       _root.Scroll_Y = this.Level._height - 160;
  472.    }
  473.    if(_root.ImpactX_Flag)
  474.    {
  475.       _root.Scroll_X += _root.Impact_Tabl[--_root.ImpactX_Flag];
  476.    }
  477.    if(_root.ImpactY_Flag)
  478.    {
  479.       _root.Scroll_Y += _root.Impact_Tabl[--_root.ImpactY_Flag];
  480.    }
  481. };
  482. MOT_ObjGroup.prototype = new Object();
  483. MOT_ObjGroup.prototype.addObject = function(object_)
  484. {
  485.    var atom = this.TheAtoms.addAtom(object_);
  486.    object_.atom = atom;
  487.    object_.updateCacheIndexes();
  488.    if(object_.alwaysRun())
  489.    {
  490.       this.ObjectArray[object_.xCacheIndex][object_.yCacheIndex].push(atom);
  491.    }
  492.    else
  493.    {
  494.       this.PlayerArray.push(atom);
  495.    }
  496.    return atom.index;
  497. };
  498. _root.removeFromArray = function(array, object)
  499. {
  500.    var len = array.length;
  501.    var i = 0;
  502.    while(i < len)
  503.    {
  504.       if(array[i] == object)
  505.       {
  506.          array.splice(i,1);
  507.          return undefined;
  508.       }
  509.       i++;
  510.    }
  511. };
  512. MOT_ObjGroup.prototype.removeObject = function(object_)
  513. {
  514.    var atom = object_.atom;
  515.    object_.updateCacheIndexes();
  516.    if(object_.Obj_Flags & 0x0180)
  517.    {
  518.       trace("removeFromArray: " + object_);
  519.       removeFromArray(this.PlayerArray,atom);
  520.    }
  521.    else
  522.    {
  523.       removeFromArray(this.ObjectArray[object_.oldXCacheIndex][object_.oldYCacheIndex],atom);
  524.    }
  525.    trace("removing: " + object_);
  526.    object_.removeMovieClip();
  527.    this.theAtoms.delAtom(atom);
  528. };
  529. MOT_ObjGroup.prototype.cull = function()
  530. {
  531.    var i;
  532.    this.KillList.rewind();
  533.    while((i = this.KillList.getHead()) != -1)
  534.    {
  535.       trace("killing: " + this.KillList.Atoms[i].owner);
  536.       this.removeObject(this.KillList.Atoms[i].owner);
  537.       this.KillList.forward();
  538.    }
  539.    this.KillList.reset();
  540. };
  541. MOT_ObjGroup.prototype.kill = function(object_)
  542. {
  543.    trace("adding to killList: " + object_);
  544.    this.KillList.addAtom(object_);
  545. };
  546. MOT_ObjGroup.prototype.killAll = function()
  547. {
  548.    var i;
  549.    this.theAtoms.rewind();
  550.    while((i = this.theAtoms.getHead()) != -1)
  551.    {
  552.       trace("killing: " + this.theAtoms.Atoms[i].owner);
  553.       this.kill(this.theAtoms.Atoms[i].owner);
  554.       this.theAtoms.forward();
  555.    }
  556.    this.theAtoms.reset();
  557. };
  558. MOT_ObjGroup.prototype.remapIntoCache = function(object_)
  559. {
  560.    if(object_.Obj_Flags & 0x0180)
  561.    {
  562.       return undefined;
  563.    }
  564.    var atom = object_.atom;
  565.    object_.updateCacheIndexes();
  566.    removeFromArray(this.ObjectArray[object_.oldXCacheIndex][object_.oldYCacheIndex],atom);
  567.    this.ObjectArray[object_.xCacheIndex][object_.yCacheIndex].push(atom);
  568. };
  569. MOT_ObjGroup.prototype.changeObject = function(i, object_)
  570. {
  571.    this.TheAtoms.changeAtom(i,owner_);
  572. };
  573. MOT_ObjGroup.prototype.loop = function(h)
  574. {
  575.    var x;
  576.    var y;
  577.    var functionName = "Obj_Hndlr" + h;
  578.    this.processedIndex = this.processedIndex + 1;
  579.    var numPlayers = this.PlayerArray.length;
  580.    var i = 0;
  581.    while(i < numPlayers)
  582.    {
  583.       trace("PROCESSING PLAYER " + this.PlayerArray[i].index);
  584.       var player = this.PlayerArray[i].owner;
  585.       player[functionName]();
  586.       if(player.Obj_Flags & 0x80)
  587.       {
  588.          var deltaX = player.xCacheIndex - player.oldXCacheIndex;
  589.          var deltaY = player.yCacheIndex - player.oldYCacheIndex;
  590.          if(deltaX || deltaY)
  591.          {
  592.             x = player.oldXCacheIndex - 1;
  593.             while(x <= player.oldXCacheIndex + 1)
  594.             {
  595.                y = player.oldYCacheIndex - 1;
  596.                while(y <= player.oldYCacheIndex + 1)
  597.                {
  598.                   var npcs = this.ObjectArray[x][y];
  599.                   var n = 0;
  600.                   while(n < npcs.length)
  601.                   {
  602.                      var npc = npcs[n].owner;
  603.                      if(npc.processedIndex != this.processedIndex)
  604.                      {
  605.                         npc.processedIndex = this.processedIndex;
  606.                         npc[functionName]();
  607.                      }
  608.                      n++;
  609.                   }
  610.                   y++;
  611.                }
  612.                x++;
  613.             }
  614.          }
  615.          var x1;
  616.          var y1;
  617.          var x2;
  618.          var y2;
  619.          if(player == _root.Level.getMickey() || _root.goto_Flag)
  620.          {
  621.             x1 = (player.Obj_X >> 16) - 128;
  622.             y1 = (player.Obj_Y >> 16) - 128;
  623.             x2 = x1 + 256;
  624.             y2 = y1 + 256;
  625.             if(_root.goto_Flag)
  626.             {
  627.                _root.goto_Flag--;
  628.             }
  629.          }
  630.          else
  631.          {
  632.             x1 = (player.Obj_X >> 16) - 32;
  633.             y1 = (player.Obj_Y >> 16) - 32;
  634.             x2 = x1 + 64;
  635.             y2 = y1 + 64;
  636.          }
  637.          x1 >>= 7;
  638.          y1 >>= 7;
  639.          x2 >>= 7;
  640.          y2 >>= 7;
  641.          x = x1;
  642.          while(x <= x2)
  643.          {
  644.             y = y1;
  645.             while(y <= y2)
  646.             {
  647.                var npcs = this.ObjectArray[x][y];
  648.                var n = 0;
  649.                while(n < npcs.length)
  650.                {
  651.                   var npc = npcs[n].owner;
  652.                   if(npc.processedIndex != this.processedIndex)
  653.                   {
  654.                      npc.processedIndex = this.processedIndex;
  655.                      npc[functionName]();
  656.                   }
  657.                   n++;
  658.                }
  659.                y++;
  660.             }
  661.             x++;
  662.          }
  663.       }
  664.       i++;
  665.    }
  666. };
  667. MOT_ObjGroup.prototype.create = function(symbol_, depth_, sprite_, x, y, flags)
  668. {
  669.    var instance;
  670.    Object.registerClass(symbol_,MOT_Obj);
  671.    instance = _root.attachMovie(symbol_,"ObjID" + this.TheAtoms.free,depth_ * 64 + this.TheAtoms.free + 16384);
  672.    instance.init(this,depth_,sprite_,x,y,flags);
  673.    instance._x = instance._y = 999;
  674.    return instance;
  675. };
  676. MOT_Obj.prototype = new MovieClip();
  677. MOT_Obj.prototype.init = function(group_, depth_, sprite_, x_, y_, flags_)
  678. {
  679.    this.Obj_X = x_;
  680.    this.Obj_Y = y_;
  681.    this.Obj_Group = group_;
  682.    this.Obj_Depth = depth_;
  683.    switch(sprite_)
  684.    {
  685.       case 0:
  686.          this.Obj_Sprite = this.Sprite;
  687.          this.setHndlr(3,this.apply_NORMAL);
  688.          break;
  689.       case 1:
  690.          this.Obj_Sprite = this.Sprite0;
  691.          this.Obj_Flags |= 256;
  692.          this.setHndlr(3,this.apply_NORMAL0);
  693.          break;
  694.       case 2:
  695.          this.Obj_Sprite = this.SpriteX;
  696.          this.setHndlr(3,this.apply_NORMALX);
  697.    }
  698.    this.Obj_Flags |= flags_;
  699.    this.Obj_Hndlr1_i = this.Obj_Group.addObject(this);
  700.    this.setHndlr(1,null);
  701.    this.setHndlr(2,null);
  702.    if(this.Obj_Flags & 0x80)
  703.    {
  704.       this.onKeyDown = function()
  705.       {
  706.          if(this == _root.Level.getMickey() && !_root.KeyLocked)
  707.          {
  708.             var c = Key.getCode();
  709.             var i = (c & 0xF8) / 8;
  710.             if(!(this.Keys_state[i] & _root.Bits_on[c & 7]))
  711.             {
  712.                this.Keys_pressed[i] |= _root.Bits_on[c & 7];
  713.             }
  714.             this.Keys_state[i] |= _root.Bits_on[c & 7];
  715.          }
  716.       };
  717.       this.onKeyUp = function()
  718.       {
  719.          var c = Key.getCode();
  720.          var i = c >> 3;
  721.          this.Keys_state[i] &= _root.Bits_off[c & 7];
  722.       };
  723.       Key.addListener(this);
  724.       this.setHndlr(3,this.apply_MICKEY);
  725.    }
  726.    if(this.Obj_Flags & 8)
  727.    {
  728.       this.onKeyDown = function()
  729.       {
  730.          var c = Key.getCode();
  731.          var i = (c & 0xF8) / 8;
  732.          if(!(this.Keys_state[i] & _root.Bits_on[c & 7]))
  733.          {
  734.             this.Keys_pressed[i] |= _root.Bits_on[c & 7];
  735.          }
  736.          this.Keys_state[i] |= _root.Bits_on[c & 7];
  737.       };
  738.       this.onKeyUp = function()
  739.       {
  740.          var c = Key.getCode();
  741.          var i = c >> 3;
  742.          this.Keys_state[i] &= _root.Bits_off[c & 7];
  743.       };
  744.       Key.addListener(this);
  745.       this.Obj_Flash = -1;
  746.       this.setHndlr(3,this.apply_KEYBD);
  747.    }
  748. };
  749. MOT_Obj.prototype.kill = function()
  750. {
  751.    if(!(this.Obj_Flags & 0x10))
  752.    {
  753.       this.Obj_Flags |= 16;
  754.       this.Obj_Group.kill(this);
  755.    }
  756. };
  757. MOT_Obj.prototype.isNPC = function()
  758. {
  759.    return !(this.Obj_Flags & 0x80);
  760. };
  761. MOT_Obj.prototype.alwaysRun = function()
  762. {
  763.    return !(this.Obj_Flags & 0x0180);
  764. };
  765. MOT_Obj.prototype.updateCacheIndexes = function()
  766. {
  767.    this.oldXCacheIndex = this.xCacheIndex;
  768.    this.xCacheIndex = this.Obj_X + 128 >> 23;
  769.    if(this.xCacheIndex < 0)
  770.    {
  771.       this.xCacheIndex = 0;
  772.    }
  773.    else if(this.xCacheIndex > 10)
  774.    {
  775.       this.xCacheIndex = 10;
  776.    }
  777.    this.oldYCacheIndex = this.yCacheIndex;
  778.    this.yCacheIndex = this.Obj_Y + 128 >> 23;
  779.    if(this.yCacheIndex < 0)
  780.    {
  781.       this.yCacheIndex = 0;
  782.    }
  783.    else if(this.yCacheIndex > 10)
  784.    {
  785.       this.yCacheIndex = 10;
  786.    }
  787. };
  788. MOT_Obj.prototype.updateCache = function()
  789. {
  790.    if(this.Obj_Flags & 0x0180)
  791.    {
  792.       return undefined;
  793.    }
  794.    this.oldXCacheIndex = this.xCacheIndex;
  795.    this.xCacheIndex = this.Obj_X + 128 >> 23;
  796.    if(this.xCacheIndex < 0)
  797.    {
  798.       this.xCacheIndex = 0;
  799.    }
  800.    else if(this.xCacheIndex > 10)
  801.    {
  802.       this.xCacheIndex = 10;
  803.    }
  804.    this.oldYCacheIndex = this.yCacheIndex;
  805.    this.yCacheIndex = this.Obj_Y + 128 >> 23;
  806.    if(this.yCacheIndex < 0)
  807.    {
  808.       this.yCacheIndex = 0;
  809.    }
  810.    else if(this.yCacheIndex > 10)
  811.    {
  812.       this.yCacheIndex = 10;
  813.    }
  814.    if(this.oldXCacheIndex != this.xCacheIndex || this.oldYCacheIndex != this.yCacheIndex)
  815.    {
  816.       _root.Objs.remapIntoCache(this);
  817.    }
  818. };
  819. MOT_Obj.prototype.updateCacheX = function()
  820. {
  821.    this.oldXCacheIndex = this.xCacheIndex;
  822.    this.xCacheIndex = this.Obj_X + 128 >> 23;
  823.    if(this.xCacheIndex < 0)
  824.    {
  825.       this.xCacheIndex = 0;
  826.    }
  827.    else if(this.xCacheIndex > 10)
  828.    {
  829.       this.xCacheIndex = 10;
  830.    }
  831.    this.oldYCacheIndex = this.yCacheIndex;
  832.    this.yCacheIndex = this.Obj_Y + 128 >> 23;
  833.    if(this.yCacheIndex < 0)
  834.    {
  835.       this.yCacheIndex = 0;
  836.    }
  837.    else if(this.yCacheIndex > 10)
  838.    {
  839.       this.yCacheIndex = 10;
  840.    }
  841.    if(this.oldXCacheIndex != this.xCacheIndex || this.oldYCacheIndex != this.yCacheIndex)
  842.    {
  843.       _root.Objs.remapIntoCache(this);
  844.    }
  845. };
  846. MOT_Obj.prototype.setXY = function(newX, newY)
  847. {
  848.    this.Obj_X = newX;
  849.    this.Obj_Y = newY;
  850.    if(this.Obj_Flags & 0x0180)
  851.    {
  852.       return undefined;
  853.    }
  854.    this.updateCacheIndexes();
  855.    if(this.oldXCacheIndex != this.xCacheIndex || this.oldYCacheIndex != this.yCacheIndex)
  856.    {
  857.       _root.Objs.remapIntoCache(this);
  858.    }
  859. };
  860. MOT_Obj.prototype.setX = function(newX)
  861. {
  862.    this.Obj_X = newX;
  863.    if(this.Obj_Flags & 0x0180)
  864.    {
  865.       return undefined;
  866.    }
  867.    this.updateCacheIndexes();
  868.    if(this.oldXCacheIndex != this.xCacheIndex || this.oldYCacheIndex != this.yCacheIndex)
  869.    {
  870.       _root.Objs.remapIntoCache(this);
  871.    }
  872. };
  873. MOT_Obj.prototype.setY = function(newY)
  874. {
  875.    this.Obj_Y = newY;
  876.    if(this.Obj_Flags & 0x0180)
  877.    {
  878.       return undefined;
  879.    }
  880.    this.updateCacheIndexes();
  881.    if(this.oldXCacheIndex != this.xCacheIndex || this.oldYCacheIndex != this.yCacheIndex)
  882.    {
  883.       _root.Objs.remapIntoCache(this);
  884.    }
  885. };
  886. MOT_Obj.prototype.getKey = function(c)
  887. {
  888.    return this.Keys_state[c >> 3] & _root.Bits_on[c & 7];
  889. };
  890. MOT_Obj.prototype.getPressed = function(c)
  891. {
  892.    return this.Keys_pressed[c >> 3] & _root.Bits_on[c & 7];
  893. };
  894. MOT_Obj.prototype.setHndlr = function(h, method_)
  895. {
  896.    this["Obj_Hndlr" + h] = method_;
  897. };
  898. MOT_Obj.prototype.apply_NORMAL = function()
  899. {
  900.    this._x = (this.Obj_X >> 16) - _root.Scroll_X;
  901.    this._y = (this.Obj_Y >> 16) - _root.Scroll_Y;
  902.    this._xscale = this.Obj_Flip * 100;
  903. };
  904. MOT_Obj.prototype.apply_NORMAL0 = function()
  905. {
  906.    this._x = this.Obj_X >> 16;
  907.    this._y = this.Obj_Y >> 16;
  908.    this._xscale = this.Obj_Flip * 100;
  909. };
  910. MOT_Obj.prototype.apply_NORMALX = function()
  911. {
  912.    this._x = - _root.Scroll_X;
  913.    this._y = - _root.Scroll_Y;
  914.    this._xscale = this.Obj_Flip * 100;
  915. };
  916. MOT_Obj.prototype.apply_KEYBD = function()
  917. {
  918.    var i;
  919.    this.Keys_pressed[0] = 0;
  920.    this.Keys_pressed[1] = 0;
  921.    this.Keys_pressed[2] = 0;
  922.    this.Keys_pressed[3] = 0;
  923.    this.Keys_pressed[4] = 0;
  924.    this.Keys_pressed[5] = 0;
  925.    this.Keys_pressed[6] = 0;
  926.    this.Keys_pressed[7] = 0;
  927.    this.Keys_pressed[8] = 0;
  928.    this.Keys_pressed[9] = 0;
  929.    this.Keys_pressed[10] = 0;
  930.    this.Keys_pressed[11] = 0;
  931.    this.Keys_pressed[12] = 0;
  932.    this.Keys_pressed[13] = 0;
  933.    this.Keys_pressed[14] = 0;
  934.    this.Keys_pressed[15] = 0;
  935.    this.Obj_Sprite();
  936.    this._xscale = this.Obj_Flip * 100;
  937. };
  938. MOT_Obj.prototype.apply_MICKEY = function()
  939. {
  940.    var i;
  941.    this.Keys_pressed[0] = 0;
  942.    this.Keys_pressed[1] = 0;
  943.    this.Keys_pressed[2] = 0;
  944.    this.Keys_pressed[3] = 0;
  945.    this.Keys_pressed[4] = 0;
  946.    this.Keys_pressed[5] = 0;
  947.    this.Keys_pressed[6] = 0;
  948.    this.Keys_pressed[7] = 0;
  949.    this.Keys_pressed[8] = 0;
  950.    this.Keys_pressed[9] = 0;
  951.    this.Keys_pressed[10] = 0;
  952.    this.Keys_pressed[11] = 0;
  953.    this.Keys_pressed[12] = 0;
  954.    this.Keys_pressed[13] = 0;
  955.    this.Keys_pressed[14] = 0;
  956.    this.Keys_pressed[15] = 0;
  957.    this.Obj_Sprite();
  958.    this._xscale = this.Obj_Flip * 100;
  959.    this.updateCacheIndexes();
  960.    if(this.Obj_Flash > -1)
  961.    {
  962.       if(this.Obj_Flash)
  963.       {
  964.          if((this.Obj_Flash & 3) > 2)
  965.          {
  966.             this._visible = 1;
  967.          }
  968.          else
  969.          {
  970.             this._visible = 0;
  971.          }
  972.          this.Obj_Flash--;
  973.       }
  974.       else
  975.       {
  976.          this._visible = 1;
  977.       }
  978.    }
  979. };
  980. MOT_OBJ.prototype.setDepth = function(depth_)
  981. {
  982.    this.Obj_Depth = depth_;
  983.    this.swapDepths(this.Obj_Depth * 64 + this.Obj_Hndlr1_i + 16384);
  984. };
  985. MOT_Obj.prototype.Sprite = function()
  986. {
  987.    this._x = (this.Obj_X >> 16) - _root.Scroll_X;
  988.    this._y = (this.Obj_Y >> 16) - _root.Scroll_Y;
  989. };
  990. MOT_Obj.prototype.Sprite0 = function()
  991. {
  992.    this._x = this.Obj_X >> 16;
  993.    this._y = this.Obj_Y >> 16;
  994. };
  995. MOT_Obj.prototype.SpriteX = function()
  996. {
  997.    this._x = - _root.Scroll_X;
  998.    this._y = - _root.Scroll_Y;
  999. };
  1000. MOT_Obj.prototype.killKeys = function()
  1001. {
  1002.    this.Keys_pressed[0] = 0;
  1003.    this.Keys_pressed[1] = 0;
  1004.    this.Keys_pressed[2] = 0;
  1005.    this.Keys_pressed[3] = 0;
  1006.    this.Keys_pressed[4] = 0;
  1007.    this.Keys_pressed[5] = 0;
  1008.    this.Keys_pressed[6] = 0;
  1009.    this.Keys_pressed[7] = 0;
  1010.    this.Keys_pressed[8] = 0;
  1011.    this.Keys_pressed[9] = 0;
  1012.    this.Keys_pressed[10] = 0;
  1013.    this.Keys_pressed[11] = 0;
  1014.    this.Keys_pressed[12] = 0;
  1015.    this.Keys_pressed[13] = 0;
  1016.    this.Keys_pressed[14] = 0;
  1017.    this.Keys_pressed[15] = 0;
  1018.    this.Keys_pressed[16] = 0;
  1019.    this.Keys_pressed[17] = 0;
  1020.    this.Keys_pressed[18] = 0;
  1021.    this.Keys_pressed[19] = 0;
  1022.    this.Keys_pressed[20] = 0;
  1023.    this.Keys_pressed[21] = 0;
  1024.    this.Keys_pressed[22] = 0;
  1025.    this.Keys_pressed[23] = 0;
  1026.    this.Keys_pressed[24] = 0;
  1027.    this.Keys_pressed[25] = 0;
  1028.    this.Keys_pressed[26] = 0;
  1029.    this.Keys_pressed[27] = 0;
  1030.    this.Keys_pressed[28] = 0;
  1031.    this.Keys_pressed[29] = 0;
  1032.    this.Keys_pressed[30] = 0;
  1033.    this.Keys_pressed[31] = 0;
  1034.    this.Keys_state[0] = 0;
  1035.    this.Keys_state[1] = 0;
  1036.    this.Keys_state[2] = 0;
  1037.    this.Keys_state[3] = 0;
  1038.    this.Keys_state[4] = 0;
  1039.    this.Keys_state[5] = 0;
  1040.    this.Keys_state[6] = 0;
  1041.    this.Keys_state[7] = 0;
  1042.    this.Keys_state[8] = 0;
  1043.    this.Keys_state[9] = 0;
  1044.    this.Keys_state[10] = 0;
  1045.    this.Keys_state[11] = 0;
  1046.    this.Keys_state[12] = 0;
  1047.    this.Keys_state[13] = 0;
  1048.    this.Keys_state[14] = 0;
  1049.    this.Keys_state[15] = 0;
  1050.    this.Keys_state[16] = 0;
  1051.    this.Keys_state[17] = 0;
  1052.    this.Keys_state[18] = 0;
  1053.    this.Keys_state[19] = 0;
  1054.    this.Keys_state[20] = 0;
  1055.    this.Keys_state[21] = 0;
  1056.    this.Keys_state[22] = 0;
  1057.    this.Keys_state[23] = 0;
  1058.    this.Keys_state[24] = 0;
  1059.    this.Keys_state[25] = 0;
  1060.    this.Keys_state[26] = 0;
  1061.    this.Keys_state[27] = 0;
  1062.    this.Keys_state[28] = 0;
  1063.    this.Keys_state[29] = 0;
  1064.    this.Keys_state[30] = 0;
  1065.    this.Keys_state[31] = 0;
  1066. };
  1067. MOT_Obj.prototype.cacheCX = function()
  1068. {
  1069.    this.CX1 = (this.Obj_X >> 16) + this.Obj_X1;
  1070.    this.CX2 = (this.Obj_X >> 16) + this.Obj_X2;
  1071.    this.CY1 = (this.Obj_Y >> 16) + this.Obj_Y1;
  1072.    this.CY2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1073. };
  1074. MOT_Obj.prototype.Ck_Collide_DN = function()
  1075. {
  1076.    var i;
  1077.    var x1;
  1078.    var x2;
  1079.    var y2;
  1080.    x1 = (this.Obj_X >> 16) + this.Obj_X1;
  1081.    x2 = (this.Obj_X >> 16) + this.Obj_X2;
  1082.    y2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1083.    y2 &= 4294967288;
  1084.    if(_root.Collide_DN_Tabl[_root.CMapArray[y2 / 8 * 102 + (x1 & 4294967288) / 8]] || _root.Collide_DN_Tabl[_root.CMapArray[y2 / 8 * 102 + (x2 & 4294967288) / 8]])
  1085.    {
  1086.       this.CX_Collide_Flag |= 8;
  1087.       this.Obj_Y = y2 - this.Obj_Y2 - 1 << 16;
  1088.       return 1;
  1089.    }
  1090.    return 0;
  1091. };
  1092. MOT_Obj.prototype.Ck_Collide_UP = function()
  1093. {
  1094.    var i;
  1095.    var x;
  1096.    var x1;
  1097.    var x2;
  1098.    var y1;
  1099.    var y2;
  1100.    x1 = (this.Obj_X >> 16) + this.Obj_X1;
  1101.    x2 = (this.Obj_X >> 16) + this.Obj_X2;
  1102.    y1 = (this.Obj_Y >> 16) + this.Obj_Y1;
  1103.    y2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1104.    y1 &= 4294967288;
  1105.    x = x1 & 4294967288;
  1106.    while(x <= (x2 & 4294967288))
  1107.    {
  1108.       i = y1 / 8 * 102 + x / 8;
  1109.       if(_root.CMapArray[i] == 1)
  1110.       {
  1111.          this.CX_Collide_Flag |= 4;
  1112.          this.Obj_Y = y1 + 8 - this.Obj_Y1 << 16;
  1113.          return 1;
  1114.       }
  1115.       x += 8;
  1116.    }
  1117.    return 0;
  1118. };
  1119. MOT_Obj.prototype.Ck_Collide_LF = function()
  1120. {
  1121.    var i;
  1122.    var y;
  1123.    var x1;
  1124.    var x2;
  1125.    var y1;
  1126.    var y2;
  1127.    x1 = (this.Obj_X >> 16) + this.Obj_X1;
  1128.    x2 = (this.Obj_X >> 16) + this.Obj_X2;
  1129.    y1 = (this.Obj_Y >> 16) + this.Obj_Y1;
  1130.    y2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1131.    x1 &= 4294967288;
  1132.    y = y1 & 4294967288;
  1133.    while(y <= (y2 & 4294967288))
  1134.    {
  1135.       i = y / 8 * 102 + x1 / 8;
  1136.       if(_root.CMapArray[i] == 1)
  1137.       {
  1138.          this.CX_Collide_Flag |= 1;
  1139.          this.Obj_X = x1 + 8 - this.Obj_X1 << 16;
  1140.          return 1;
  1141.       }
  1142.       y += 8;
  1143.    }
  1144.    return 0;
  1145. };
  1146. MOT_Obj.prototype.Ck_Collide_RT = function()
  1147. {
  1148.    var i;
  1149.    var y;
  1150.    var x1;
  1151.    var x2;
  1152.    var y1;
  1153.    var y2;
  1154.    x1 = (this.Obj_X >> 16) + this.Obj_X1;
  1155.    x2 = (this.Obj_X >> 16) + this.Obj_X2;
  1156.    y1 = (this.Obj_Y >> 16) + this.Obj_Y1;
  1157.    y2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1158.    x2 &= 4294967288;
  1159.    y = y1 & 4294967288;
  1160.    while(y <= (y2 & 4294967288))
  1161.    {
  1162.       i = y / 8 * 102 + x2 / 8;
  1163.       if(_root.CMapArray[i] == 1)
  1164.       {
  1165.          this.CX_Collide_Flag |= 1;
  1166.          this.Obj_X = x2 - 1 - this.Obj_X2 << 16;
  1167.          return 1;
  1168.       }
  1169.       y += 8;
  1170.    }
  1171.    return 0;
  1172. };
  1173. MOT_Obj.prototype.CX_Ladder = function(label_)
  1174. {
  1175.    var i;
  1176.    var x;
  1177.    if(this.getKey(38))
  1178.    {
  1179.       if(i = this.CX_Ladder0())
  1180.       {
  1181.          x = this.Obj_X >> 16 & 7 + (i - 2) * 8;
  1182.          this.Obj_Target = this.Obj_X - (x << 16) + 1048576;
  1183.          this.Obj_Timer = 16 - x;
  1184.          this.Obj_Climb = 0;
  1185.          this.Obj_Flags |= 1;
  1186.          this.CX_Obj_Collide = 0;
  1187.          this.gotoAndPlay(label_);
  1188.          return 1;
  1189.       }
  1190.    }
  1191.    return 0;
  1192. };
  1193. MOT_Obj.prototype.CX_LadderX = function(label_)
  1194. {
  1195.    var i;
  1196.    var x;
  1197.    if(this.getKey(40))
  1198.    {
  1199.       if(i = this.CX_LadderX1())
  1200.       {
  1201.          x = this.Obj_X >> 16 & 7 + (i - 6) * 8;
  1202.          this.Obj_Target = this.Obj_X - (x << 16) + 1048576;
  1203.          this.Obj_Timer = 16 - x;
  1204.          this.Obj_Climb = 1;
  1205.          this.Obj_Y = (this.Obj_Y >> 16) + 1 << 16;
  1206.          this.gotoAndPlay(label_);
  1207.          return 1;
  1208.       }
  1209.    }
  1210.    return 0;
  1211. };
  1212. MOT_Obj.prototype.CX_Ladder0 = function()
  1213. {
  1214.    var i;
  1215.    var x;
  1216.    var y;
  1217.    var x1;
  1218.    var x2;
  1219.    var y1;
  1220.    var y2;
  1221.    x1 = this.Obj_X >> 16;
  1222.    y2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1223.    x1 &= 4294967288;
  1224.    y2 &= 4294967288;
  1225.    i = y2 / 8 * 102 + x1 / 8;
  1226.    i = _root.CMapArray[i];
  1227.    if(i >= 2 && i <= 5)
  1228.    {
  1229.       return i;
  1230.    }
  1231.    return 0;
  1232. };
  1233. MOT_Obj.prototype.CX_LadderX0 = function()
  1234. {
  1235.    var i;
  1236.    var x;
  1237.    var y;
  1238.    var x1;
  1239.    var x2;
  1240.    var y1;
  1241.    var y2;
  1242.    x1 = this.Obj_X >> 16;
  1243.    y2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1244.    x1 &= 4294967288;
  1245.    y2 &= 4294967288;
  1246.    i = y2 / 8 * 102 + x1 / 8;
  1247.    i = _root.CMapArray[i];
  1248.    if(i >= 6 && i <= 9)
  1249.    {
  1250.       return i;
  1251.    }
  1252.    return 0;
  1253. };
  1254. MOT_Obj.prototype.CX_LadderX1 = function()
  1255. {
  1256.    var i;
  1257.    var x;
  1258.    var y;
  1259.    var x1;
  1260.    var x2;
  1261.    var y1;
  1262.    var y2;
  1263.    x1 = this.Obj_X >> 16;
  1264.    y2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1265.    x1 &= 4294967288;
  1266.    y2 &= 4294967288;
  1267.    i = (y2 + 8) / 8 * 102 + x1 / 8;
  1268.    i = _root.CMapArray[i];
  1269.    if(i >= 6 && i <= 9)
  1270.    {
  1271.       return i;
  1272.    }
  1273.    return 0;
  1274. };
  1275. MOT_Obj.prototype.CX_Gravity = function()
  1276. {
  1277. };
  1278. MOT_Obj.prototype.CX_Init = function(flags_)
  1279. {
  1280.    this.Obj_CX_Flags = flags_;
  1281.    this.CX_Collide_Flag = this.CX_Bounce_Flag = this.CX_Fall_Flag = 0;
  1282.    this.Old_X0 = this.Obj_X;
  1283.    this.Old_Y0 = this.Obj_Y;
  1284. };
  1285. MOT_Obj.prototype.CX = function(flags_, gravity_, max_velocity_)
  1286. {
  1287.    var x;
  1288.    if(this.CX_DY)
  1289.    {
  1290.       this.Obj_Y += this.CX_DY;
  1291.       this.CX_DY = 0;
  1292.    }
  1293.    this.Obj_CX_Flags = flags_;
  1294.    this.CX_Collide_Flag = this.CX_Bounce_Flag = this.CX_Fall_Flag = 0;
  1295.    this.Old_X0 = this.Obj_X;
  1296.    this.Old_Y0 = this.Obj_Y;
  1297.    this.Obj_DY += gravity_;
  1298.    if(this.Obj_DY > max_velocity_)
  1299.    {
  1300.       this.Obj_DY = max_velocity_;
  1301.    }
  1302.    if(this.CX_Obj_Collide)
  1303.    {
  1304.       this.CX_Collide_Flag |= this.CX_Obj_Collide;
  1305.    }
  1306.    this.Obj_X += this.Obj_DX;
  1307.    if(this.Obj_X >> 16 != this.Old_X0 >> 16)
  1308.    {
  1309.       if(this.Obj_DX < 0)
  1310.       {
  1311.          while(this.Ck_Collide_LF())
  1312.          {
  1313.          }
  1314.       }
  1315.       else if(this.Obj_DX > 0)
  1316.       {
  1317.          while(this.Ck_Collide_RT())
  1318.          {
  1319.          }
  1320.       }
  1321.    }
  1322.    this.Obj_Y += this.Obj_DY;
  1323.    if(this.Obj_Y >> 16 != this.Old_Y0 >> 16)
  1324.    {
  1325.       if(this.Obj_DY < 0)
  1326.       {
  1327.          while(this.Ck_Collide_UP())
  1328.          {
  1329.          }
  1330.       }
  1331.       else if(this.Obj_DY > 0)
  1332.       {
  1333.          while(this.Ck_Collide_DN())
  1334.          {
  1335.          }
  1336.       }
  1337.    }
  1338.    if(this.CX_Collide_Flag & 8)
  1339.    {
  1340.       this.Obj_DY = 65536;
  1341.    }
  1342.    if(this.CX_Obj_Collide & 8)
  1343.    {
  1344.       x = 262144;
  1345.    }
  1346.    else
  1347.    {
  1348.       x = 131072;
  1349.    }
  1350.    if(this.Obj_Y - this.Old_Y0 > x)
  1351.    {
  1352.       this.CX_Fall_Flag = 1;
  1353.    }
  1354.    if(this.CX_Obj_Collide)
  1355.    {
  1356.       this.CX_Obj_Collide = 0;
  1357.    }
  1358.    this.CX1 = (this.Obj_X >> 16) + this.Obj_X1;
  1359.    this.CX2 = (this.Obj_X >> 16) + this.Obj_X2;
  1360.    this.CY1 = (this.Obj_Y >> 16) + this.Obj_Y1;
  1361.    this.CY2 = (this.Obj_Y >> 16) + this.Obj_Y2;
  1362. };
  1363. _root.KEY_LT = 37;
  1364. _root.KEY_RT = 39;
  1365. _root.KEY_UP = 38;
  1366. _root.KEY_DN = 40;
  1367. _root.KEY_A = 65;
  1368. _root.KEY_B = 83;
  1369. _root.KEY_LB = 81;
  1370. _root.KEY_RB = 87;
  1371. _root.KEY_CHEAT = 17;
  1372. _root.Obj_Flags_ALWAYSRUN = 384;
  1373. _root.Obj_Flags_BACKGROUND = 256;
  1374. _root.Obj_Flags_MICKEY = 128;
  1375. _root.Obj_Flags_DEAD = 64;
  1376. _root.Obj_Flags_SPECIAL = 32;
  1377. _root.Obj_Flags_KILL = 16;
  1378. _root.Obj_Flags_KEYBD = 8;
  1379. _root.Obj_Flags_GONE = 4;
  1380. _root.Obj_Flags_ATTACK = 2;
  1381. _root.Obj_Flags_CLIMBING = 1;
  1382. _root.frame = 0;
  1383. _root.Health = 0;
  1384. _root.snd = 0;
  1385. _root.Objs = new MOT_ObjGroup();
  1386. _root.Keys = new MOT_Keypad();
  1387. _root.Level = new MOT_Level();
  1388. _root._xscale = 100;
  1389. _root._yscale = 100;
  1390. _root.snd = new Sound(this);
  1391. _root.snd.setVolume(100);
  1392. _root.gotoTitle();
  1393. CMapArray = [1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,255,255,255,255,255,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,31,31,31,10,10,10,10,1,1,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,6,7,8,9,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,2,3,4,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,2,3,4,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,2,3,4,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,2,3,4,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,2,3,4,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,2,3,4,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,2,3,4,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,2,3,4,5,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,2,3,4,5,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,30,30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,30,30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,30,30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,30,30,30,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,255,255,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,255,255,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,255,255,255,255,255,255,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,255,255,255,255,255,255,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255];
  1394.