コード例 #1
0
ファイル: VehicleFXDef.cs プロジェクト: tateplayer/HydraX
            /// <summary>
            /// Exports the given asset from this pool
            /// </summary>
            public HydraStatus Export(GameAsset asset, HydraInstance instance)
            {
                var buffer = instance.Reader.ReadBytes(asset.HeaderAddress, asset.Size);

                if (asset.Name != instance.Reader.ReadNullTerminatedString(BitConverter.ToInt64(buffer, 0)))
                {
                    return(HydraStatus.MemoryChanged);
                }

                var result = GameDataTable.ConvertStructToGDTAsset(buffer, VehicleFXDefOffsets, instance, HandleVehicleFXDefSettings);

                result.Type = "vehiclefxdef";

                instance.GDTs["Misc"][asset.Name] = result;

                return(HydraStatus.Success);
            }
コード例 #2
0
ファイル: FootstepTable.cs プロジェクト: tateplayer/HydraX
            /// <summary>
            /// Exports the given asset from this pool
            /// </summary>
            public HydraStatus Export(GameAsset asset, HydraInstance instance)
            {
                var buffer = instance.Reader.ReadBytes(asset.HeaderAddress, asset.Size);

                if (asset.Name != instance.Reader.ReadNullTerminatedString(BitConverter.ToInt64(buffer, 0)))
                {
                    return(HydraStatus.MemoryChanged);
                }

                var result = GameDataTable.ConvertStructToGDTAsset(buffer, FootstepTableOffsets, instance);

                result.Type = "footsteptable";

                instance.GDTs["Table"][asset.Name] = result;

                return(HydraStatus.Success);
            }
コード例 #3
0
            /// <summary>
            /// Exports the given asset from this pool
            /// </summary>
            public HydraStatus Export(GameAsset asset, HydraInstance instance)
            {
                var buffer = instance.Reader.ReadBytes(asset.HeaderAddress, asset.Size);

                if (asset.Name != instance.Reader.ReadNullTerminatedString(BitConverter.ToInt64(buffer, 0)))
                {
                    return(HydraStatus.MemoryChanged);
                }

                var result = GameDataTable.ConvertStructToGDTAsset(buffer, AttachmentOffsets, instance, HandleAttachmentSettings);

                result.Type = "attachment";

                // Add to GDT
                instance.GDTs["Weapon"][asset.Name] = result;

                return(HydraStatus.Success);
            }