Example #1
0
 public AssetSURF(string assetName) : base(assetName, AssetType.SURF, BaseAssetType.Surface)
 {
     zSurfMatFX        = new zSurfMatFX();
     zSurfColorFX      = new zSurfColorFX();
     zSurfTextureAnim1 = new zSurfTextureAnim();
     zSurfTextureAnim2 = new zSurfTextureAnim();
     zSurfUVFX         = new zSurfUVFX();
     zSurfUVFX2        = new zSurfUVFX();
     OffSurface        = new zFootstepsData();
     OnSurface         = new zFootstepsData();
     HitDecalData0     = new zHitDecalData();
     HitDecalData1     = new zHitDecalData();
     HitDecalData2     = new zHitDecalData();
 }
Example #2
0
        public AssetSURF(Section_AHDR AHDR, Game game, Endianness endianness) : base(AHDR, game, endianness)
        {
            using (var reader = new EndianBinaryReader(AHDR.data, endianness))
            {
                reader.BaseStream.Position = baseHeaderEndPosition;

                DamageType  = reader.ReadByte();
                Sticky      = reader.ReadByte();
                DamageFlags = reader.ReadByte();
                SurfaceType = reader.ReadByte();
                Phys_Pad    = reader.ReadByte();
                SlideStart  = reader.ReadByte();
                SlideStop   = reader.ReadByte();
                PhysicsFlags.FlagValueByte = reader.ReadByte();
                Friction     = reader.ReadSingle();
                zSurfMatFX   = new zSurfMatFX(reader);
                zSurfColorFX = new zSurfColorFX(reader);
                TextureAnimFlags.FlagValueInt = reader.ReadUInt32();
                zSurfTextureAnim1             = new zSurfTextureAnim(reader);
                zSurfTextureAnim2             = new zSurfTextureAnim(reader);
                UVEffectsFlags.FlagValueInt   = reader.ReadUInt32();
                zSurfUVFX = new zSurfUVFX(reader);

                if (game != Game.Scooby)
                {
                    zSurfUVFX2 = new zSurfUVFX(reader);
                    On         = reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                }
                else
                {
                    zSurfUVFX2 = null;
                }

                OutOfBoundsDelay = reader.ReadSingle();
                WalljumpScaleXZ  = reader.ReadSingle();
                WalljumpScaleY   = reader.ReadSingle();
                DamageTimer      = reader.ReadSingle();
                DamageBounce     = reader.ReadSingle();

                if (game == Game.Scooby)
                {
                    UnknownInt = reader.ReadInt32();
                    On         = reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                }

                if (game == Game.Incredibles)
                {
                    ImpactSound_AssetID = reader.ReadUInt32();
                    DashImpactType      = reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                    DashImpactThrowBack = reader.ReadSingle();
                    DashSprayMagnitude  = reader.ReadSingle();
                    DashCoolRate        = reader.ReadSingle();
                    DashCoolAmount      = reader.ReadSingle();
                    DashPass            = reader.ReadSingle();
                    DashRampMaxDistance = reader.ReadSingle();
                    DashRampMinDistance = reader.ReadSingle();
                    DashRampKeySpeed    = reader.ReadSingle();
                    DashRampMaxHeight   = reader.ReadSingle();
                    DashRampTarget_MovePoint_AssetID = reader.ReadUInt32();
                    DamageAmount        = reader.ReadInt32();
                    HitSourceDamageType = (zHitSource)reader.ReadInt32();
                    OffSurface          = new zFootstepsData(reader);
                    OnSurface           = new zFootstepsData(reader);
                    HitDecalData0       = new zHitDecalData(reader);
                    HitDecalData1       = new zHitDecalData(reader);
                    HitDecalData2       = new zHitDecalData(reader);
                    OffSurfaceTime      = reader.ReadSingle();
                    SwimmableSurface    = reader.ReadByte();
                    DashFall            = reader.ReadByte();
                    NeedButtonPress     = reader.ReadByte();
                    DashAttack          = reader.ReadByte();
                    FootstepDecals      = reader.ReadByte();
                    reader.ReadInt32();
                    DrivingSurfaceType = reader.ReadByte();
                    reader.ReadByte();
                    reader.ReadByte();
                }
            }
        }