home *** CD-ROM | disk | FTP | other *** search
- function Wall_Collide0(target)
- {
- var x;
- if(target.CX2 < this.CX1 || target.CX1 > this.CX2 || target.CY2 < this.CY1 || target.CY1 > this.CY2)
- {
- return 0;
- }
- x = (this.CX1 + this.CX2) / 2;
- if(target.CX2 < x)
- {
- target.CX_Obj_Collide = 2;
- target.Obj_X = this.CX1 - this.Obj_X2 + 2 << 16;
- }
- if(target.CX1 > x)
- {
- target.CX_Obj_Collide = 1;
- target.Obj_X = this.CX2 - this.Obj_X1 - 2 << 16;
- }
- return 1;
- }
- function Wall_Collide()
- {
- var x;
- if(this.Obj_Flags & 0x40)
- {
- return undefined;
- }
- x = Wall_Collide0(_root.Runner);
- Wall_Collide0(_root.Fighter);
- Wall_Collide0(_root.Shield);
- if(this.Obj_Climb & 3)
- {
- if(Wall_Collide0(_root.Arrow))
- {
- _root.Arrow.Obj_Flags |= 64;
- }
- }
- if(x)
- {
- if(_root.Runner.Obj_Flags & 0x20)
- {
- this.Obj_Flags |= 64;
- this.setDepth(8);
- this.gotoAndPlay("Wall_Crumble");
- }
- }
- }
- function Wall_Loop()
- {
- this.Obj_Climb = this.Obj_Climb + 1;
- if(this.Obj_Climb & 3)
- {
- this.cacheCX();
- }
- }
- this.setHndlr(1,this.Wall_Loop);
- this.gotoAndPlay("Wall_Closed_Loop");
- _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 = -8;
- this.Obj_X2 = 8;
- this.Obj_Y1 = -48;
- this.Obj_Y2 = 0;
- this.setHndlr(2,this.Wall_Collide);
-