Ejemplo n.º 1
0
        public static CoordStruct Head_To_Coord(this ILocomotion locomotion)
        {
            CoordStruct tmp = default;

            locomotion.Head_To_Coord(tmp.GetThisPointer());
            return(tmp);
        }
Ejemplo n.º 2
0
        unsafe void Initialize(CoordStruct coords, double elasticity, double gravity,
                               double maxVelocity, SingleVector3D velocity, double angularVelocity)
        {
            var func = (delegate * unmanaged[Thiscall] < ref BounceClass, ref CoordStruct, double, double, double, ref SingleVector3D, double, void >) 0x4397E0;

            func(ref this, ref coords, elasticity, gravity, maxVelocity, ref velocity, angularVelocity);
        }
Ejemplo n.º 3
0
        public static CoordStruct Destination(this ILocomotion locomotion)
        {
            CoordStruct tmp = default;

            locomotion.Destination(tmp.GetThisPointer());
            return(tmp);
        }
Ejemplo n.º 4
0
        public unsafe CoordStruct FindInfantrySubposition(CoordStruct coords, bool ignoreContents, bool alt, bool useCellCoords)
        {
            var func = (delegate * unmanaged[Thiscall] < ref CellClass, out CoordStruct, ref CoordStruct, Bool, Bool, Bool, void >) 0x481180;

            func(ref this, out CoordStruct subPosition, ref coords, ignoreContents, alt, useCellCoords);
            return(subPosition);
        }
Ejemplo n.º 5
0
 public CoordStruct FixHeight(CoordStruct crd)
 {
     if (this.ContainsBridge())
     {
         crd.Z += Game.BridgeHeight;
     }
     return(crd);
 }
Ejemplo n.º 6
0
        unsafe CoordStruct GetCoords()
        {
            var func = (delegate * unmanaged[Thiscall] < ref BounceClass, IntPtr, IntPtr >) 0x4399A0;

            CoordStruct ret = default;

            func(ref this, Pointer <CoordStruct> .AsPointer(ref ret));
            return(ret);
        }
Ejemplo n.º 7
0
        public static unsafe void Constructor(Pointer <LaserDrawClass> pThis, CoordStruct source, CoordStruct target, int zAdjust, byte unknown,
                                              ColorStruct innerColor, ColorStruct outerColor, ColorStruct outerSpread,
                                              int duration, bool blinks = false, bool fades        = true,
                                              float startIntensity      = 1.0f, float endIntensity = 0.0f)
        {
            var func = (delegate * unmanaged[Thiscall] < ref LaserDrawClass, CoordStruct, CoordStruct, int, byte,
                        ColorStruct, ColorStruct, ColorStruct, int, Bool, Bool, float, float, void >) 0x54FE60;

            func(ref pThis.Ref, source, target, zAdjust, unknown, innerColor, outerColor, outerSpread, duration, blinks, fades, startIntensity, endIntensity);
        }
Ejemplo n.º 8
0
        public static unsafe void Constructor(Pointer <AnimClass> pThis, Pointer <AnimTypeClass> pAnimType, CoordStruct Location, int LoopDelay = 0,
                                              int LoopCount = 1, uint flags = 0x600, int ForceZAdjust = 0, bool reverse = false)
        {
            var func = (delegate * unmanaged[Thiscall] < ref AnimClass, IntPtr, ref CoordStruct, int,
                        int, uint, int, Bool, void >) 0x421EA0;

            func(ref pThis.Ref, pAnimType, ref Location, LoopDelay, LoopCount, flags, ForceZAdjust, reverse);
        }
Ejemplo n.º 9
0
 public static void Constructor(Pointer <AnimClass> pThis, Pointer <AnimTypeClass> pAnimType, CoordStruct Location)
 {
     Constructor(pThis, pAnimType, Location, 0);
 }
Ejemplo n.º 10
0
        /* craziest thing... first iterates Content looking to Aircraft,
         * failing that, calls FindTechnoNearestTo,
         * if that fails too, reiterates Content looking for Terrain
         */
        public unsafe Pointer <ObjectClass> GetSomeObject(CoordStruct coords, bool alt)
        {
            var func = (delegate * unmanaged[Thiscall] < ref CellClass, ref CoordStruct, Bool, IntPtr >) 0x47C5A0;

            return(func(ref this, ref coords, alt));
        }
Ejemplo n.º 11
0
 public static CellStruct Coord2Cell(CoordStruct crd)
 {
     return(new CellStruct(crd.X / Game.CellSize, crd.Y / Game.CellSize));
 }
Ejemplo n.º 12
0
 BounceClass(CoordStruct coords, double elasticity, double gravity,
             double maxVelocity, SingleVector3D velocity, double angularVelocity) : this()
 {
     this.Initialize(coords, elasticity, gravity, maxVelocity, velocity, angularVelocity);
 }
Ejemplo n.º 13
0
 public double DistanceFrom(CoordStruct other)
 {
     return((other - this).Magnitude());
 }
Ejemplo n.º 14
0
 public static void Constructor(Pointer <LaserDrawClass> pThis, CoordStruct source, CoordStruct target, ColorStruct innerColor,
                                ColorStruct outerColor, ColorStruct outerSpread, int duration)
 {
     Constructor(pThis, source, target, 0, 1, innerColor, outerColor, outerSpread, duration);
 }