Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion TRDataControl/Data/TR1DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -139,6 +139,10 @@ public IEnumerable<TR1SFX> 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]
Expand Down Expand Up @@ -387,6 +391,9 @@ public IEnumerable<TR1SFX> 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
Expand Down
7 changes: 6 additions & 1 deletion TRDataControl/Data/TR2DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -157,6 +157,8 @@ public IEnumerable<TR2SFX> 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] =
Expand Down Expand Up @@ -439,6 +441,9 @@ public IEnumerable<TR2SFX> GetHardcodedSounds(TR2Type type)
TR2Type.FontGraphics_S_H,
TR2Type.AssaultNumbers,
TR2Type.PickupAid,
TR2Type.FontGraphicsSmall_S_H,
TR2Type.Magnums_S_P,
TR2Type.MagnumAmmo_S_P,
};

#endregion
Expand Down
1 change: 1 addition & 0 deletions TRDataControl/Data/TR3DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ public IEnumerable<TR3SFX> GetHardcodedSounds(TR3Type type)
TR3Type.Glow2_S_H,
TR3Type.FontGraphics_S_H,
TR3Type.TimerFontGraphics_S_H,
TR3Type.FontGraphicsSmall_S_H,
};

#endregion
Expand Down
3 changes: 3 additions & 0 deletions TRDataControl/Transport/TR1/TR1DataExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 4 additions & 0 deletions TRDataControl/Transport/TR1/TR1DataImporter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Newtonsoft.Json;
using TRImageControl;
using TRImageControl.Packing;
using TRLevelControl.Helpers;
using TRLevelControl.Model;

namespace TRDataControl;
Expand Down Expand Up @@ -32,6 +33,9 @@ protected override List<TR1Type> GetExistingTypes()
protected override TRTextureRemapper<TR1Level> CreateRemapper(TR1Level level)
=> new TR1TextureRemapper(level);

protected override string GetTypeName(TR1Type type)
=> TR1TypeUtilities.GetName(type);

protected override TRTextureRemapGroup<TR1Type, TR1Level> GetRemapGroup()
=> JsonConvert.DeserializeObject<TR1TextureRemapGroup>(File.ReadAllText(TextureRemapPath));

Expand Down
4 changes: 4 additions & 0 deletions TRLevelControl/Helpers/TR1TypeUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};
}
Expand Down
6 changes: 6 additions & 0 deletions TRLevelControl/Helpers/TR2TypeUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
};
}
Expand Down
13 changes: 10 additions & 3 deletions TRLevelControl/Model/TR1/Enums/TR1Type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
18 changes: 12 additions & 6 deletions TRLevelControl/Model/TR2/Enums/TR2Type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion TRLevelControl/Model/TR3/Enums/TR3Type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down