home *** CD-ROM | disk | FTP | other *** search
- function Do_Bowling_Shoot()
- {
- var i = _root.Objs.create("LaserClass",56,0,this.Obj_X,this.Obj_Y - 1048576,null);
- i.Obj_Flip = this.Obj_Flip;
- _root.snd.attachSound("LV_169");
- _root.snd.start();
- }
- function Do_Bowling_Stuff()
- {
- this.Obj_Climb = this.Obj_Climb + 1;
- if(_root.Arrow)
- {
- if(!(_root.Arrow.Obj_Flags & 0x40))
- {
- if(Bowling_Collide0(_root.Arrow))
- {
- _root.Arrow.Obj_Flags |= 64;
- this.Obj_Flags |= 64;
- this._visible = 0;
- _root.Objs.create("BowlingDeathClass",32,0,this.Obj_X,this.Obj_Y,null);
- }
- }
- }
- switch(this.Obj_Climb & 3)
- {
- case 0:
- if(_root.Runner.Obj_Flags & 0x20)
- {
- if(Bowling_Collide1(_root.Runner))
- {
- _runner.Obj_Flags &= 65535 - 32;
- if(this.Obj_Flip > 0)
- {
- _root.Runner.CX_Obj_Collide |= 1;
- }
- else
- {
- _root.Runner.CX_Obj_Collide |= 2;
- }
- _root.snd.attachSound("LV_185");
- _root.snd.start();
- this.Obj_Flags |= 64;
- this._visible = 0;
- _root.Objs.create("BowlingDeathClass",32,0,this.Obj_X,this.Obj_Y,null);
- }
- }
- break;
- case 1:
- if(Bowling_Collide1(_root.Fighter))
- {
- if(_root.Fighter.Obj_Flags & 2)
- {
- _root.Fighter.Obj_Flags &= 255 - 2;
- this.Obj_Flags |= 64;
- this._visible = 0;
- _root.Objs.create("BowlingDeathClass",32,0,this.Obj_X,this.Obj_Y,null);
- }
- }
- break;
- case 2:
- break;
- case 3:
- if(this.Obj_Timer)
- {
- this.Obj_Timer--;
- }
- if(this.Obj_Timer == 0)
- {
- if(!(_root.Shield.Obj_Flags & 4))
- {
- Bowling_Collide2(_root.Shield);
- }
- if(!(_root.Runner.Obj_Flags & 4))
- {
- Bowling_Collide2(_root.Runner);
- }
- if(!(_root.Fighter.Obj_Flags & 4))
- {
- Bowling_Collide2(_root.Fighter);
- }
- }
- }
- }
- function Bowling_Collide0(target)
- {
- if(target.CX2 < this.CX1 || target.CX1 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- return 1;
- }
- function Bowling_Collide1(target)
- {
- if(target.Obj_Flip < 0)
- {
- if(target.CX2 + 8 < this.CX1 || target.CX1 - 16 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- }
- else if(target.CX2 + 16 < this.CX1 || target.CX1 - 8 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- return 1;
- }
- function Bowling_Collide2(target)
- {
- if(target.CX2 + 128 < this.CX1 || target.CX1 - 128 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- if(target.Obj_X < this.Obj_X)
- {
- this.Obj_Flip = -1;
- this.gotoAndPlay("Bowling_Shoot");
- }
- else
- {
- this.Obj_Flip = 1;
- this.gotoAndPlay("Bowling_Shoot");
- }
- return 1;
- }
- function Bowling_Collide3(target)
- {
- if(target.Obj_Flip < 0)
- {
- if(target.CX2 + 16 < this.CX1 || target.CX1 - 24 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- }
- else if(target.CX2 + 24 < this.CX1 || target.CX1 - 16 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- return 1;
- }
- function Bowling_Walk()
- {
- var x;
- var y0;
- var y1;
- var x1;
- var y2;
- if(this.Obj_Flags & 0x40)
- {
- return undefined;
- }
- if(this.CX_Obj_Collide & 3)
- {
- this.Obj_DX *= -1;
- this.CX_Obj_Collide = 0;
- }
- if(!(_root.Shield.Obj_Flags & 4))
- {
- if(!Bowling_Collide3(_root.Shield))
- {
- this.Obj_X += this.Obj_DX;
- }
- }
- x1 = this.Obj_X >> 16;
- y2 = this.Obj_Y >> 16;
- y0 = y2 + 1 & 4294967288;
- y1 = y2 + 0 & 4294967288;
- if(this.Obj_DX < 0)
- {
- this.Obj_Flip = -1;
- x = x1 - 1 & 4294967288;
- if(!_root.Collide_DN_Tabl[_root.CMapArray[y0 / 8 * 102 + (x & 4294967288) / 8]])
- {
- this.Obj_DX *= -1;
- }
- if(_root.Collide_DN_Tabl[_root.CMapArray[y1 / 8 * 102 + (x & 4294967288) / 8]])
- {
- this.Obj_DX *= -1;
- }
- }
- else
- {
- this.Obj_Flip = 1;
- x = x1 + 1 & 4294967288;
- if(!_root.Collide_DN_Tabl[_root.CMapArray[y0 / 8 * 102 + (x & 4294967288) / 8]])
- {
- this.Obj_DX *= -1;
- }
- if(_root.Collide_DN_Tabl[_root.CMapArray[y1 / 8 * 102 + (x & 4294967288) / 8]])
- {
- this.Obj_DX *= -1;
- }
- }
- this.CX1 = (this.Obj_X >> 16) + this.Obj_X1;
- this.CX2 = (this.Obj_X >> 16) + this.Obj_X2;
- this.CY1 = (this.Obj_Y >> 16) + this.Obj_Y1;
- this.CY2 = (this.Obj_Y >> 16) + this.Obj_Y2;
- this.updateCacheX();
- Do_Bowling_Stuff();
- }
- function Bowling_Shoot()
- {
- Do_Bowling_Stuff();
- }
- this.gotoAndPlay("Bowling_Walk");
- _root.KEY_LT = 37;
- _root.KEY_RT = 39;
- _root.KEY_UP = 38;
- _root.KEY_DN = 40;
- _root.KEY_A = 65;
- _root.KEY_B = 83;
- _root.KEY_LB = 81;
- _root.KEY_RB = 87;
- _root.KEY_CHEAT = 17;
- _root.Obj_Flags_ALWAYSRUN = 384;
- _root.Obj_Flags_BACKGROUND = 256;
- _root.Obj_Flags_MICKEY = 128;
- _root.Obj_Flags_DEAD = 64;
- _root.Obj_Flags_SPECIAL = 32;
- _root.Obj_Flags_KILL = 16;
- _root.Obj_Flags_KEYBD = 8;
- _root.Obj_Flags_GONE = 4;
- _root.Obj_Flags_ATTACK = 2;
- _root.Obj_Flags_CLIMBING = 1;
- this.Obj_X1 = -5;
- this.Obj_X2 = 5;
- this.Obj_Y1 = -31;
- this.Obj_Y2 = 0;
- this.Obj_DX = -131072;
- this.Obj_Timer = 15;
-