diff --git a/TRDataControl/Data/TR1DataProvider.cs b/TRDataControl/Data/TR1DataProvider.cs index f71e24b8d..516942079 100644 --- a/TRDataControl/Data/TR1DataProvider.cs +++ b/TRDataControl/Data/TR1DataProvider.cs @@ -16,7 +16,7 @@ public TRBlobType GetBlobType(TR1Type type) { return TRBlobType.Sprite; } - if (type > TR1Type.HarpoonProjectile_H && type < TR1Type.M16_S_P) + if (type > TR1Type.AutoAmmo_M_H && type < TR1Type.M16_S_P) { return TRBlobType.StaticMesh; } @@ -139,6 +139,10 @@ public IEnumerable GetHardcodedSounds(TR1Type type) { TR1Type.HarpoonProjectile_H, TR1Type.Harpoon_M_H, TR1Type.HarpoonAmmo_M_H, TR1Type.Harpoon_S_P, TR1Type.HarpoonAmmo_S_P, }, + [TR1Type.LaraAutoAnim_H] = new() + { + TR1Type.Autos_M_H, TR1Type.AutoAmmo_M_H, TR1Type.Automags_S_P, TR1Type.AutoAmmo_S_P, + }, [TR1Type.Adam] = new() { TR1Type.LaraMiscAnim_H_Pyramid, TR1Type.Explosion1_S_H }, [TR1Type.AtlanteanLava] @@ -387,6 +391,9 @@ public IEnumerable GetHardcodedSounds(TR1Type type) TR1Type.M16Ammo_S_P, TR1Type.Grenades_S_P, TR1Type.HarpoonAmmo_S_P, + TR1Type.FontGraphicsSmall_S_H, + TR1Type.Automags_S_P, + TR1Type.AutoAmmo_S_P, }; #endregion diff --git a/TRDataControl/Data/TR2DataProvider.cs b/TRDataControl/Data/TR2DataProvider.cs index 9b4981c6a..8719a7d58 100644 --- a/TRDataControl/Data/TR2DataProvider.cs +++ b/TRDataControl/Data/TR2DataProvider.cs @@ -16,7 +16,7 @@ public TRBlobType GetBlobType(TR2Type type) { return TRBlobType.Sprite; } - if (type > TR2Type.SecretOption3 && type < TR2Type.BengalTiger) + if (type > TR2Type.MagnumAmmo_S_P && type < TR2Type.BengalTiger) { return TRBlobType.StaticMesh; } @@ -157,6 +157,8 @@ public IEnumerable GetHardcodedSounds(TR2Type type) new() { TR2Type.LaraPistolAnim_H_Assault, TR2Type.LaraAutoAnim_H_Assault, TR2Type.LaraUziAnim_H_Assault }, [TR2Type.LaraVegas] = [TR2Type.LaraPistolAnim_H_Vegas, TR2Type.LaraAutoAnim_H_Vegas, TR2Type.LaraUziAnim_H_Vegas], + [TR2Type.LaraMagnumAnim_H] = + [TR2Type.Magnums_M_H, TR2Type.MagnumAmmo_M_H, TR2Type.Magnums_S_P, TR2Type.MagnumAmmo_S_P], [TR2Type.M16_M_H] = new() { TR2Type.LaraM16Anim_H, TR2Type.M16Gunflare_H, TR2Type.M16_S_P, TR2Type.M16Ammo_M_H, TR2Type.M16Ammo_S_P }, [TR2Type.MarcoBartoli] = @@ -439,6 +441,9 @@ public IEnumerable GetHardcodedSounds(TR2Type type) TR2Type.FontGraphics_S_H, TR2Type.AssaultNumbers, TR2Type.PickupAid, + TR2Type.FontGraphicsSmall_S_H, + TR2Type.Magnums_S_P, + TR2Type.MagnumAmmo_S_P, }; #endregion diff --git a/TRDataControl/Data/TR3DataProvider.cs b/TRDataControl/Data/TR3DataProvider.cs index 2843bee87..36944c5a8 100644 --- a/TRDataControl/Data/TR3DataProvider.cs +++ b/TRDataControl/Data/TR3DataProvider.cs @@ -352,6 +352,7 @@ public IEnumerable GetHardcodedSounds(TR3Type type) TR3Type.Glow2_S_H, TR3Type.FontGraphics_S_H, TR3Type.TimerFontGraphics_S_H, + TR3Type.FontGraphicsSmall_S_H, }; #endregion diff --git a/TRDataControl/Transport/TR1/TR1DataExporter.cs b/TRDataControl/Transport/TR1/TR1DataExporter.cs index dd32531d6..6daceb256 100644 --- a/TRDataControl/Transport/TR1/TR1DataExporter.cs +++ b/TRDataControl/Transport/TR1/TR1DataExporter.cs @@ -34,6 +34,9 @@ protected override bool IsMasterType(TR1Type type) protected override TRMesh GetDummyMesh() => Level.Models[TR1Type.Lara].Meshes[0]; + protected override string GetTypeName(TR1Type type) + => TR1TypeUtilities.GetName(type); + protected override void StoreColour(ushort index, TR1Blob blob) { blob.Palette8[index] = Level.Palette[index]; diff --git a/TRDataControl/Transport/TR1/TR1DataImporter.cs b/TRDataControl/Transport/TR1/TR1DataImporter.cs index a681de1b2..06daf96b7 100644 --- a/TRDataControl/Transport/TR1/TR1DataImporter.cs +++ b/TRDataControl/Transport/TR1/TR1DataImporter.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; using TRImageControl; using TRImageControl.Packing; +using TRLevelControl.Helpers; using TRLevelControl.Model; namespace TRDataControl; @@ -32,6 +33,9 @@ protected override List GetExistingTypes() protected override TRTextureRemapper CreateRemapper(TR1Level level) => new TR1TextureRemapper(level); + protected override string GetTypeName(TR1Type type) + => TR1TypeUtilities.GetName(type); + protected override TRTextureRemapGroup GetRemapGroup() => JsonConvert.DeserializeObject(File.ReadAllText(TextureRemapPath)); diff --git a/TRLevelControl/Helpers/TR1TypeUtilities.cs b/TRLevelControl/Helpers/TR1TypeUtilities.cs index fb8bfb7c5..7b91e6ad5 100644 --- a/TRLevelControl/Helpers/TR1TypeUtilities.cs +++ b/TRLevelControl/Helpers/TR1TypeUtilities.cs @@ -87,6 +87,10 @@ public static string GetName(TR1Type type) TR1Type.M16Gunflare_H => "M16Gunflare_H", TR1Type.GrenadeProjectile_H => "GrenadeProjectile_H", TR1Type.HarpoonProjectile_H => "HarpoonProjectile_H", + + TR1Type.LaraAutoAnim_H => "LaraAutoAnim_H", + TR1Type.Autos_M_H => "Autos_M_H", + TR1Type.AutoAmmo_M_H => "AutoAmmo_M_H", _ => type.ToString(), }; } diff --git a/TRLevelControl/Helpers/TR2TypeUtilities.cs b/TRLevelControl/Helpers/TR2TypeUtilities.cs index a2ed48e96..6b3f45eb6 100644 --- a/TRLevelControl/Helpers/TR2TypeUtilities.cs +++ b/TRLevelControl/Helpers/TR2TypeUtilities.cs @@ -172,6 +172,12 @@ public static string GetName(TR2Type type) TR2Type.Bear => "Bear", TR2Type.MonkWithNoShadow => "MonkWithNoShadow", TR2Type.Wolf => "Wolf", + TR2Type.FontGraphicsSmall_S_H => "FontGraphicsSmall_S_H", + TR2Type.LaraMagnumAnim_H => "LaraMagnumAnim_H", + TR2Type.Magnums_M_H => "Magnums_M_H", + TR2Type.MagnumAmmo_M_H => "MagnumAmmo_M_H", + TR2Type.Magnums_S_P => "Magnums_S_P", + TR2Type.MagnumAmmo_S_P => "MagnumAmmo_S_P", _ => type.ToString(), }; } diff --git a/TRLevelControl/Model/TR1/Enums/TR1Type.cs b/TRLevelControl/Model/TR1/Enums/TR1Type.cs index de853528d..1391ce50a 100644 --- a/TRLevelControl/Model/TR1/Enums/TR1Type.cs +++ b/TRLevelControl/Model/TR1/Enums/TR1Type.cs @@ -237,6 +237,10 @@ public enum TR1Type : uint GrenadeProjectile_H = 211, HarpoonProjectile_H = 212, + LaraAutoAnim_H = 213, + Autos_M_H = 214, + AutoAmmo_M_H = 215, + // Scenery Plant0 = Winston, Plant1 = LaraFlareAnim_H, @@ -260,9 +264,9 @@ public enum TR1Type : uint Furniture9 = M16Gunflare_H, Rock0 = GrenadeProjectile_H, Rock1 = HarpoonProjectile_H, - Rock2 = 213, - Rock3 = 214, - Rock4 = 215, + Rock2 = LaraAutoAnim_H, + Rock3 = Autos_M_H, + Rock4 = AutoAmmo_M_H, Rock5 = 216, Rock6 = 217, Rock7 = 218, @@ -296,6 +300,9 @@ public enum TR1Type : uint M16Ammo_S_P = 244, Grenades_S_P = 245, HarpoonAmmo_S_P = 246, + FontGraphicsSmall_S_H = 247, + Automags_S_P = 248, + AutoAmmo_S_P = 249, // Unused models, so repurposed as duplicate puzzle items for importing as secret pickups SecretScion_M_H = 700, diff --git a/TRLevelControl/Model/TR2/Enums/TR2Type.cs b/TRLevelControl/Model/TR2/Enums/TR2Type.cs index 7726a6e26..f3491db74 100644 --- a/TRLevelControl/Model/TR2/Enums/TR2Type.cs +++ b/TRLevelControl/Model/TR2/Enums/TR2Type.cs @@ -289,6 +289,12 @@ public enum TR2Type : uint SecretOption1 = 275, SecretOption2 = 276, SecretOption3 = 277, + FontGraphicsSmall_S_H = 278, + LaraMagnumAnim_H = 279, + Magnums_M_H = 280, + MagnumAmmo_M_H = 281, + Magnums_S_P = 282, + MagnumAmmo_S_P = 283, // Scenery - TODO: get rid of defined statics Plant0 = Bear, @@ -304,12 +310,12 @@ public enum TR2Type : uint Furniture0 = SecretOption1, Furniture1 = SecretOption2, Furniture2 = SecretOption3, - Furniture3 = 278, - Furniture4 = 279, - Furniture5 = 280, - Furniture6 = 281, - Furniture7 = 282, - Furniture8 = 283, + Furniture3 = FontGraphicsSmall_S_H, + Furniture4 = LaraMagnumAnim_H, + Furniture5 = Magnums_M_H, + Furniture6 = MagnumAmmo_M_H, + Furniture7 = Magnums_S_P, + Furniture8 = MagnumAmmo_S_P, Furniture9 = 284, Rock0 = 285, Rock1 = 286, diff --git a/TRLevelControl/Model/TR3/Enums/TR3Type.cs b/TRLevelControl/Model/TR3/Enums/TR3Type.cs index b5035acb1..fc169b8bc 100644 --- a/TRLevelControl/Model/TR3/Enums/TR3Type.cs +++ b/TRLevelControl/Model/TR3/Enums/TR3Type.cs @@ -384,10 +384,13 @@ public enum TR3Type : uint ExtraFX5 = 372, ElectricalSwitchBox = 373, + // TRX + FontGraphicsSmall_S_H = 376, + // Scenery Plant0 = 374, Plant1 = 375, - Plant2 = 376, + Plant2 = FontGraphicsSmall_S_H, Plant3 = 377, Plant4 = 378, Plant5 = 379,