Skip to content

Commit f2891be

Browse files
committed
Update TRX enums
Updates TR1/2 enum values for TRX.
1 parent a60dc27 commit f2891be

10 files changed

Lines changed: 58 additions & 12 deletions

File tree

TRDataControl/Data/TR1DataProvider.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public TRBlobType GetBlobType(TR1Type type)
1616
{
1717
return TRBlobType.Sprite;
1818
}
19-
if (type > TR1Type.HarpoonProjectile_H && type < TR1Type.M16_S_P)
19+
if (type > TR1Type.AutoAmmo_M_H && type < TR1Type.M16_S_P)
2020
{
2121
return TRBlobType.StaticMesh;
2222
}
@@ -139,6 +139,10 @@ public IEnumerable<TR1SFX> GetHardcodedSounds(TR1Type type)
139139
{
140140
TR1Type.HarpoonProjectile_H, TR1Type.Harpoon_M_H, TR1Type.HarpoonAmmo_M_H, TR1Type.Harpoon_S_P, TR1Type.HarpoonAmmo_S_P,
141141
},
142+
[TR1Type.LaraAutoAnim_H] = new()
143+
{
144+
TR1Type.Autos_M_H, TR1Type.AutoAmmo_M_H, TR1Type.Automags_S_P, TR1Type.AutoAmmo_S_P,
145+
},
142146
[TR1Type.Adam]
143147
= new() { TR1Type.LaraMiscAnim_H_Pyramid, TR1Type.Explosion1_S_H },
144148
[TR1Type.AtlanteanLava]
@@ -387,6 +391,9 @@ public IEnumerable<TR1SFX> GetHardcodedSounds(TR1Type type)
387391
TR1Type.M16Ammo_S_P,
388392
TR1Type.Grenades_S_P,
389393
TR1Type.HarpoonAmmo_S_P,
394+
TR1Type.FontGraphicsSmall_S_H,
395+
TR1Type.Automags_S_P,
396+
TR1Type.AutoAmmo_S_P,
390397
};
391398

392399
#endregion

TRDataControl/Data/TR2DataProvider.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public TRBlobType GetBlobType(TR2Type type)
1616
{
1717
return TRBlobType.Sprite;
1818
}
19-
if (type > TR2Type.SecretOption3 && type < TR2Type.BengalTiger)
19+
if (type > TR2Type.MagnumAmmo_S_P && type < TR2Type.BengalTiger)
2020
{
2121
return TRBlobType.StaticMesh;
2222
}
@@ -157,6 +157,8 @@ public IEnumerable<TR2SFX> GetHardcodedSounds(TR2Type type)
157157
new() { TR2Type.LaraPistolAnim_H_Assault, TR2Type.LaraAutoAnim_H_Assault, TR2Type.LaraUziAnim_H_Assault },
158158
[TR2Type.LaraVegas] =
159159
[TR2Type.LaraPistolAnim_H_Vegas, TR2Type.LaraAutoAnim_H_Vegas, TR2Type.LaraUziAnim_H_Vegas],
160+
[TR2Type.LaraMagnumAnim_H] =
161+
[TR2Type.Magnums_M_H, TR2Type.MagnumAmmo_M_H, TR2Type.Magnums_S_P, TR2Type.MagnumAmmo_S_P],
160162
[TR2Type.M16_M_H] =
161163
new() { TR2Type.LaraM16Anim_H, TR2Type.M16Gunflare_H, TR2Type.M16_S_P, TR2Type.M16Ammo_M_H, TR2Type.M16Ammo_S_P },
162164
[TR2Type.MarcoBartoli] =
@@ -439,6 +441,9 @@ public IEnumerable<TR2SFX> GetHardcodedSounds(TR2Type type)
439441
TR2Type.FontGraphics_S_H,
440442
TR2Type.AssaultNumbers,
441443
TR2Type.PickupAid,
444+
TR2Type.FontGraphicsSmall_S_H,
445+
TR2Type.Magnums_S_P,
446+
TR2Type.MagnumAmmo_S_P,
442447
};
443448

444449
#endregion

TRDataControl/Data/TR3DataProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ public IEnumerable<TR3SFX> GetHardcodedSounds(TR3Type type)
352352
TR3Type.Glow2_S_H,
353353
TR3Type.FontGraphics_S_H,
354354
TR3Type.TimerFontGraphics_S_H,
355+
TR3Type.FontGraphicsSmall_S_H,
355356
};
356357

357358
#endregion

TRDataControl/Transport/TR1/TR1DataExporter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ protected override bool IsMasterType(TR1Type type)
3434
protected override TRMesh GetDummyMesh()
3535
=> Level.Models[TR1Type.Lara].Meshes[0];
3636

37+
protected override string GetTypeName(TR1Type type)
38+
=> TR1TypeUtilities.GetName(type);
39+
3740
protected override void StoreColour(ushort index, TR1Blob blob)
3841
{
3942
blob.Palette8[index] = Level.Palette[index];

TRDataControl/Transport/TR1/TR1DataImporter.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Newtonsoft.Json;
22
using TRImageControl;
33
using TRImageControl.Packing;
4+
using TRLevelControl.Helpers;
45
using TRLevelControl.Model;
56

67
namespace TRDataControl;
@@ -32,6 +33,9 @@ protected override List<TR1Type> GetExistingTypes()
3233
protected override TRTextureRemapper<TR1Level> CreateRemapper(TR1Level level)
3334
=> new TR1TextureRemapper(level);
3435

36+
protected override string GetTypeName(TR1Type type)
37+
=> TR1TypeUtilities.GetName(type);
38+
3539
protected override TRTextureRemapGroup<TR1Type, TR1Level> GetRemapGroup()
3640
=> JsonConvert.DeserializeObject<TR1TextureRemapGroup>(File.ReadAllText(TextureRemapPath));
3741

TRLevelControl/Helpers/TR1TypeUtilities.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ public static string GetName(TR1Type type)
8787
TR1Type.M16Gunflare_H => "M16Gunflare_H",
8888
TR1Type.GrenadeProjectile_H => "GrenadeProjectile_H",
8989
TR1Type.HarpoonProjectile_H => "HarpoonProjectile_H",
90+
91+
TR1Type.LaraAutoAnim_H => "LaraAutoAnim_H",
92+
TR1Type.Autos_M_H => "Autos_M_H",
93+
TR1Type.AutoAmmo_M_H => "AutoAmmo_M_H",
9094
_ => type.ToString(),
9195
};
9296
}

TRLevelControl/Helpers/TR2TypeUtilities.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ public static string GetName(TR2Type type)
172172
TR2Type.Bear => "Bear",
173173
TR2Type.MonkWithNoShadow => "MonkWithNoShadow",
174174
TR2Type.Wolf => "Wolf",
175+
TR2Type.FontGraphicsSmall_S_H => "FontGraphicsSmall_S_H",
176+
TR2Type.LaraMagnumAnim_H => "LaraMagnumAnim_H",
177+
TR2Type.Magnums_M_H => "Magnums_M_H",
178+
TR2Type.MagnumAmmo_M_H => "MagnumAmmo_M_H",
179+
TR2Type.Magnums_S_P => "Magnums_S_P",
180+
TR2Type.MagnumAmmo_S_P => "MagnumAmmo_S_P",
175181
_ => type.ToString(),
176182
};
177183
}

TRLevelControl/Model/TR1/Enums/TR1Type.cs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ public enum TR1Type : uint
237237
GrenadeProjectile_H = 211,
238238
HarpoonProjectile_H = 212,
239239

240+
LaraAutoAnim_H = 213,
241+
Autos_M_H = 214,
242+
AutoAmmo_M_H = 215,
243+
240244
// Scenery
241245
Plant0 = Winston,
242246
Plant1 = LaraFlareAnim_H,
@@ -260,9 +264,9 @@ public enum TR1Type : uint
260264
Furniture9 = M16Gunflare_H,
261265
Rock0 = GrenadeProjectile_H,
262266
Rock1 = HarpoonProjectile_H,
263-
Rock2 = 213,
264-
Rock3 = 214,
265-
Rock4 = 215,
267+
Rock2 = LaraAutoAnim_H,
268+
Rock3 = Autos_M_H,
269+
Rock4 = AutoAmmo_M_H,
266270
Rock5 = 216,
267271
Rock6 = 217,
268272
Rock7 = 218,
@@ -296,6 +300,9 @@ public enum TR1Type : uint
296300
M16Ammo_S_P = 244,
297301
Grenades_S_P = 245,
298302
HarpoonAmmo_S_P = 246,
303+
FontGraphicsSmall_S_H = 247,
304+
Automags_S_P = 248,
305+
AutoAmmo_S_P = 249,
299306

300307
// Unused models, so repurposed as duplicate puzzle items for importing as secret pickups
301308
SecretScion_M_H = 700,

TRLevelControl/Model/TR2/Enums/TR2Type.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ public enum TR2Type : uint
289289
SecretOption1 = 275,
290290
SecretOption2 = 276,
291291
SecretOption3 = 277,
292+
FontGraphicsSmall_S_H = 278,
293+
LaraMagnumAnim_H = 279,
294+
Magnums_M_H = 280,
295+
MagnumAmmo_M_H = 281,
296+
Magnums_S_P = 282,
297+
MagnumAmmo_S_P = 283,
292298

293299
// Scenery - TODO: get rid of defined statics
294300
Plant0 = Bear,
@@ -304,12 +310,12 @@ public enum TR2Type : uint
304310
Furniture0 = SecretOption1,
305311
Furniture1 = SecretOption2,
306312
Furniture2 = SecretOption3,
307-
Furniture3 = 278,
308-
Furniture4 = 279,
309-
Furniture5 = 280,
310-
Furniture6 = 281,
311-
Furniture7 = 282,
312-
Furniture8 = 283,
313+
Furniture3 = FontGraphicsSmall_S_H,
314+
Furniture4 = LaraMagnumAnim_H,
315+
Furniture5 = Magnums_M_H,
316+
Furniture6 = MagnumAmmo_M_H,
317+
Furniture7 = Magnums_S_P,
318+
Furniture8 = MagnumAmmo_S_P,
313319
Furniture9 = 284,
314320
Rock0 = 285,
315321
Rock1 = 286,

TRLevelControl/Model/TR3/Enums/TR3Type.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,13 @@ public enum TR3Type : uint
384384
ExtraFX5 = 372,
385385
ElectricalSwitchBox = 373,
386386

387+
// TRX
388+
FontGraphicsSmall_S_H = 376,
389+
387390
// Scenery
388391
Plant0 = 374,
389392
Plant1 = 375,
390-
Plant2 = 376,
393+
Plant2 = FontGraphicsSmall_S_H,
391394
Plant3 = 377,
392395
Plant4 = 378,
393396
Plant5 = 379,

0 commit comments

Comments
 (0)