diff --git a/CHANGELOG.md b/CHANGELOG.md index 6219bc9ad..87820e52d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## [Unreleased](https://github.com/LostArtefacts/TR-Rando/compare/V1.8.4...master) - xxxx-xx-xx +- added support for TR1X V4 (#626) - fixed a key item softlock in Crash Site (#662) ## [V1.8.4](https://github.com/LostArtefacts/TR-Rando/compare/V1.8.3...V1.8.4) - 2024-02-12 diff --git a/Deps/TRGE.Coord.dll b/Deps/TRGE.Coord.dll index 2ba8335e3..d4dac223c 100644 Binary files a/Deps/TRGE.Coord.dll and b/Deps/TRGE.Coord.dll differ diff --git a/Deps/TRGE.Core.dll b/Deps/TRGE.Core.dll index 58c2c6071..3a087a1e8 100644 Binary files a/Deps/TRGE.Core.dll and b/Deps/TRGE.Core.dll differ diff --git a/TRDataControl/Environment/Model/Types/Models/EMImportNonGraphicsModelFunction.cs b/TRDataControl/Environment/Model/Types/Models/EMImportNonGraphicsModelFunction.cs index d4009c3f3..ab3b38b61 100644 --- a/TRDataControl/Environment/Model/Types/Models/EMImportNonGraphicsModelFunction.cs +++ b/TRDataControl/Environment/Model/Types/Models/EMImportNonGraphicsModelFunction.cs @@ -8,7 +8,7 @@ public class EMImportNonGraphicsModelFunction : BaseEMFunction public override void ApplyToLevel(TR1Level level) { - IEnumerable data = PrepareImportData(level.Models); + List data = PrepareImportData(level.Models); if (!data.Any()) { return; @@ -29,7 +29,7 @@ public override void ApplyToLevel(TR1Level level) public override void ApplyToLevel(TR2Level level) { - IEnumerable data = PrepareImportData(level.Models); + List data = PrepareImportData(level.Models); if (!data.Any()) { return; @@ -50,7 +50,7 @@ public override void ApplyToLevel(TR2Level level) public override void ApplyToLevel(TR3Level level) { - IEnumerable data = PrepareImportData(level.Models); + List data = PrepareImportData(level.Models); if (!data.Any()) { return; @@ -69,10 +69,10 @@ public override void ApplyToLevel(TR3Level level) RemapFaces(data, level.ObjectTextures.Count - 1, level.Models); } - private IEnumerable PrepareImportData(SortedDictionary existingModels) + private List PrepareImportData(SortedDictionary existingModels) where T : Enum { - return Data.Where(d => !existingModels.ContainsKey((T)(object)(uint)d.ModelID)); + return Data.Where(d => !existingModels.ContainsKey((T)(object)(uint)d.ModelID)).ToList(); } private static void RemapFaces(IEnumerable data, int maximumTexture, SortedDictionary models) diff --git a/TRDataControl/Transport/TRDataImporter.cs b/TRDataControl/Transport/TRDataImporter.cs index 9dab1691d..48e8aa31e 100644 --- a/TRDataControl/Transport/TRDataImporter.cs +++ b/TRDataControl/Transport/TRDataImporter.cs @@ -95,10 +95,13 @@ private void CleanRemovalList() { entityClean = false; } + } + if (entityClean) + { // And similarly for cyclic dependencies IEnumerable cyclics = Data.GetCyclicDependencies(type); - entityClean = cyclics.All(TypesToRemove.Contains); + entityClean = cyclics.All(TypesToRemove.Contains) && !cyclics.Any(TypesToImport.Contains); } if (entityClean) diff --git a/TRImageControl/TRImage.cs b/TRImageControl/TRImage.cs index 82143043d..f9cb324a5 100644 --- a/TRImageControl/TRImage.cs +++ b/TRImageControl/TRImage.cs @@ -186,10 +186,10 @@ public Bitmap ToBitmap() for (int i = 0; i < Pixels.Length; i++) { uint pixel = Pixels[i]; + byte a = (byte)((pixel & 0xFF000000) >> 24); byte r = (byte)((pixel & 0xFF0000) >> 16); byte g = (byte)((pixel & 0xFF00) >> 8); byte b = (byte)(pixel & 0xFF); - byte a = (byte)((pixel & 0xFF000000) > 0 ? 0xFF : 0); pixels.Add(b); pixels.Add(g); @@ -232,7 +232,7 @@ public void Read(Rectangle bounds, Action callback) { for (int x = bounds.Left; x < bounds.Right; x++) { - callback.Invoke(Color.FromArgb((int)this[x, y]), x, y); + callback.Invoke(GetPixel(x, y), x, y); } } } @@ -248,7 +248,7 @@ public void Write(Rectangle bounds, Func callback) { for (int x = bounds.Left; x < bounds.Right; x++) { - this[x, y] = (uint)callback.Invoke(Color.FromArgb((int)this[x, y]), x, y).ToArgb(); + this[x, y] = (uint)callback.Invoke(GetPixel(x, y), x, y).ToArgb(); } } @@ -266,18 +266,39 @@ public void Import(TRImage image, Point point, bool retainBackground = false) { for (int x = 0; x < image.Size.Width; x++) { - Color c = image.GetPixel(x, y); - if (!retainBackground || c.A != 0) + Color inColour = image.GetPixel(x, y); + if (!retainBackground || inColour.A == 0xFF) { this[x + point.X, y + point.Y] = image[x, y]; } + else if (inColour.A > 0) + { + Color curColour = GetPixel(x + point.X, y + point.Y); + + float a0 = inColour.A / 255.0f; + float r0 = (inColour.R / 255.0f) * a0; + float g0 = (inColour.G / 255.0f) * a0; + float b0 = (inColour.B / 255.0f) * a0; + + float a1 = curColour.A / 255.0f; + float r1 = (curColour.R / 255.0f) * a1; + float g1 = (curColour.G / 255.0f) * a1; + float b1 = (curColour.B / 255.0f) * a1; + + float aOut = a0 + a1 * (1 - a0); + float rOut = (r0 + r1 * (1 - a0)) / aOut; + float gOut = (g0 + g1 * (1 - a0)) / aOut; + float bOut = (b0 + b1 * (1 - a0)) / aOut; + + Color blend = Color.FromArgb((int)(aOut * 255), (int)(rOut * 255), (int)(gOut * 255), (int)(bOut * 255)); + this[x + point.X, y + point.Y] = (uint)blend.ToArgb(); + } } } DataChanged?.Invoke(this, EventArgs.Empty); } - public TRImage Export(Rectangle bounds) { TRImage image = new(bounds.Size); diff --git a/TRImageControlTests/ImageTests.cs b/TRImageControlTests/ImageTests.cs index 1b4a174b7..a79da5466 100644 --- a/TRImageControlTests/ImageTests.cs +++ b/TRImageControlTests/ImageTests.cs @@ -7,10 +7,10 @@ namespace TRImageControlTests; [TestClass] +[TestCategory("Textures")] public class ImageTests : TestBase { [TestMethod] - [TestCategory("Textures")] [Description("Test that an 8-bit image is identical after conversion into TRImage type.")] public void Test8Bit() { @@ -35,7 +35,6 @@ public void Test8Bit() } [TestMethod] - [TestCategory("Textures")] [Description("Test that a 16-bit image is identical after conversion into TRImage type.")] public void Test16Bit() { @@ -49,7 +48,6 @@ public void Test16Bit() } [TestMethod] - [TestCategory("Textures")] [Description("Test that a 32-bit image is identical after conversion into TRImage type.")] public void Test32Bit() { @@ -63,7 +61,6 @@ public void Test32Bit() } [TestMethod] - [TestCategory("Textures")] [Description("Test that the correct portion of an image is deleted.")] public void TestDelete() { @@ -99,7 +96,6 @@ public void TestDelete() } [TestMethod] - [TestCategory("Textures")] [Description("Test that a portion of an image exported matches the source.")] public void TestCopy() { @@ -121,7 +117,6 @@ public void TestCopy() } [TestMethod] - [TestCategory("Textures")] [Description("Test importing an image into another.")] [DataRow(true)] [DataRow(false)] @@ -172,7 +167,6 @@ bool TestMatch() } [TestMethod] - [TestCategory("Textures")] [Description("Test reading and writing to an image.")] public void TestReadWrite() { @@ -203,7 +197,6 @@ public void TestReadWrite() } [TestMethod] - [TestCategory("Textures")] [Description("Test bitmap interpretation.")] public void TestBitmap() { @@ -225,4 +218,23 @@ public void TestBitmap() CollectionAssert.AreEqual(ms1.ToArray(), ms2.ToArray()); } + + [TestMethod] + [Description("Test alpha blending")] + public void TestBlending() + { + TRImage baseImage = new(128, 128); + baseImage.Fill(Color.FromArgb(153, 0, 100, 255)); // 60% + + TRImage overlay = new(64, 64); + overlay.Fill(Color.FromArgb(102, Color.Red)); // 40% + + baseImage.Import(overlay, new(32, 32), true); + + Color blend = baseImage.GetPixel(32, 32); + Assert.AreEqual(134, blend.R); + Assert.AreEqual(47, blend.G); + Assert.AreEqual(120, blend.B); + Assert.AreEqual(193, blend.A); + } } diff --git a/TRLevelControl/Build/TRModelBuilder.cs b/TRLevelControl/Build/TRModelBuilder.cs index a58dfc4c3..971b7d1ea 100644 --- a/TRLevelControl/Build/TRModelBuilder.cs +++ b/TRLevelControl/Build/TRModelBuilder.cs @@ -536,7 +536,7 @@ private void DeconstructModel(T type, TRModel model) { ID = (uint)(object)type, Animation = model.Animations.Count == 0 ? TRConsts.NoAnimation : (ushort)_placeholderAnimations.Count, - FrameOffset = (uint)_frames.Count * sizeof(short), + FrameOffset = _observer == null && model.Animations.Count == 0 ? 0 : (uint)_frames.Count * sizeof(short), NumMeshes = (ushort)model.Meshes.Count, }; _placeholderModels.Add(placeholderModel); diff --git a/TRRandomizerCore/Editors/TR1ClassicEditor.cs b/TRRandomizerCore/Editors/TR1ClassicEditor.cs index 6c68e4cdd..04d8eadcc 100644 --- a/TRRandomizerCore/Editors/TR1ClassicEditor.cs +++ b/TRRandomizerCore/Editors/TR1ClassicEditor.cs @@ -356,11 +356,10 @@ private void AmendTitleAndCredits(AbstractTRScriptEditor scriptEditor, TRSaveMon string backupTitle = Path.Combine(GetReadBasePath(), mainMenuPic); if (File.Exists(backupTitle)) { - string editedTitle = Path.Combine(GetWriteBasePath(), mainMenuPic); + string editedTitle = Path.Combine(GetWriteBasePath(), "title.png"); TRImage bg = new(backupTitle); TRImage badge = new(@"Resources\Shared\Graphics\goldbadge-small.png"); bg.Import(badge, scriptEditor.GameMode == GameMode.Gold ? _goldBadgePos : _regularBadgePos, true); - Color c = bg.GetPixel(706, 537); if (scriptEditor.GameMode == GameMode.Combined) { @@ -369,6 +368,10 @@ private void AmendTitleAndCredits(AbstractTRScriptEditor scriptEditor, TRSaveMon } bg.Save(editedTitle); + + string titlePath = @"data\title.png"; + script.MainMenuPicture = titlePath; + script.AddAdditionalBackupFile(titlePath); } { @@ -395,9 +398,9 @@ private void AmendTitleAndCredits(AbstractTRScriptEditor scriptEditor, TRSaveMon }); script.AddAdditionalBackupFile(creditPath); - scriptEditor.SaveScript(); } + scriptEditor.SaveScript(); monitor.FireSaveStateChanged(1); } } diff --git a/TRRandomizerCore/Randomizers/TR1/TR1OutfitRandomizer.cs b/TRRandomizerCore/Randomizers/TR1/TR1OutfitRandomizer.cs index ffc23b4f3..f6879ca1c 100644 --- a/TRRandomizerCore/Randomizers/TR1/TR1OutfitRandomizer.cs +++ b/TRRandomizerCore/Randomizers/TR1/TR1OutfitRandomizer.cs @@ -379,7 +379,10 @@ private static void CreateGoldenBraid(TR1CombinedLevel level) TRModel ponytail = level.Data.Models[TR1Type.LaraPonytail_H_U]; List goldMeshes = new(ponytail.Meshes.Select(m => MeshEditor.CloneMeshAsColoured(m, goldPalette))); ponytail.Meshes.AddRange(goldMeshes); - ponytail.MeshTrees.AddRange(ponytail.MeshTrees); + + List treeClones = new(ponytail.MeshTrees.Select(t => t.Clone())); + ponytail.MeshTrees.Add(new()); // Additional dummy tree required + ponytail.MeshTrees.AddRange(treeClones); } private static void HideEntities(TR1CombinedLevel level, IEnumerable entities) @@ -588,8 +591,8 @@ private void ConvertToPartialGymOutfit(TR1CombinedLevel level) } List lara = level.Data.Models[(level.IsCutScene ? TR1Type.CutsceneActor1 : TR1Type.Lara)].Meshes; - List laraShotgun = level.Data.Models[TR1Type.LaraShotgunAnim_H].Meshes; - List laraMisc = level.Data.Models[TR1Type.LaraMiscAnim_H].Meshes; + List laraShotgun = level.Data.Models[TR1Type.LaraShotgunAnim_H]?.Meshes; + List laraMisc = level.Data.Models[TR1Type.LaraMiscAnim_H]?.Meshes; // Just the torso laraMisc[7].CopyInto(lara[7]); @@ -803,8 +806,8 @@ private static void CopyMeshParts(MeshCopyData data) private void ConvertToMauledOutfit(TR1CombinedLevel level) { List lara = level.Data.Models[(level.IsCutScene ? TR1Type.CutsceneActor1 : TR1Type.Lara)].Meshes; - List laraShotgun = level.Data.Models[TR1Type.LaraShotgunAnim_H].Meshes; - List laraMisc = level.Data.Models[TR1Type.LaraMiscAnim_H].Meshes; + List laraShotgun = level.Data.Models[TR1Type.LaraShotgunAnim_H]?.Meshes; + List laraMisc = level.Data.Models[TR1Type.LaraMiscAnim_H]?.Meshes; if (level.Is(TR1LevelNames.QUALOPEC_CUT)) { diff --git a/TRRandomizerCore/Resources/TR1/Environment/CAT.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/CAT.PHD-Environment.json index 4dd05b959..587104840 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/CAT.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/CAT.PHD-Environment.json @@ -922,11 +922,11 @@ { "ModelID": 43, "TextureMap": { + "744": 955, "745": 955, - "746": 955, - "747": 952, - "748": 955, - "749": 206 + "746": 952, + "747": 955, + "748": 206 } } ] @@ -1079,18 +1079,18 @@ { "ModelID": 36, "TextureMap": { - "666": 176, - "667": 176, - "668": 176, - "669": 953, - "670": 176, - "671": 773, - "672": 773, - "673": 773, - "674": 773, - "675": 773, - "676": 773, - "677": 773 + "659": 176, + "660": 176, + "661": 176, + "662": 953, + "663": 176, + "664": 773, + "665": 773, + "666": 773, + "667": 773, + "668": 773, + "669": 773, + "670": 773 } } ] @@ -1139,18 +1139,18 @@ { "ModelID": 36, "TextureMap": { - "666": 176, - "667": 176, - "668": 176, - "669": 953, - "670": 176, - "671": 773, - "672": 773, - "673": 773, - "674": 773, - "675": 773, - "676": 773, - "677": 773 + "659": 176, + "660": 176, + "661": 176, + "662": 953, + "663": 176, + "664": 773, + "665": 773, + "666": 773, + "667": 773, + "668": 773, + "669": 773, + "670": 773 } } ] diff --git a/TRRandomizerCore/Resources/TR1/Environment/EGYPT.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/EGYPT.PHD-Environment.json index 3c7ce8b2f..605efce7a 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/EGYPT.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/EGYPT.PHD-Environment.json @@ -81,7 +81,7 @@ ], "Location": { "X": 78336, - "Y": -5631, + "Y": -5632, "Z": 69120, "Room": 73 } @@ -93,7 +93,7 @@ ], "Location": { "X": 78336, - "Y": -6655, + "Y": -6656, "Z": 69120, "Room": 73 } @@ -769,18 +769,18 @@ { "ModelID": 36, "TextureMap": { - "666": 10, - "667": 10, - "668": 10, - "669": 913, - "670": 10, - "671": 733, - "672": 733, - "673": 733, - "674": 733, - "675": 733, - "676": 733, - "677": 733 + "659": 10, + "660": 10, + "661": 10, + "662": 913, + "663": 10, + "664": 733, + "665": 733, + "666": 733, + "667": 733, + "668": 733, + "669": 733, + "670": 733 } } ] @@ -877,18 +877,18 @@ { "ModelID": 36, "TextureMap": { - "666": 10, - "667": 10, - "668": 10, - "669": 913, - "670": 10, - "671": 733, - "672": 733, - "673": 733, - "674": 733, - "675": 733, - "676": 733, - "677": 733 + "659": 10, + "660": 10, + "661": 10, + "662": 913, + "663": 10, + "664": 733, + "665": 733, + "666": 733, + "667": 733, + "668": 733, + "669": 733, + "670": 733 } } ] @@ -2183,28 +2183,28 @@ "Y": -3328, "Z": 10752, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 22016, "Y": -3328, "Z": 13824, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 22016, "Y": -3328, "Z": 14848, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 22016, "Y": -3328, "Z": 17920, "Room": -1, - "Angle": -16384 + "Angle": 16384 } ] }, @@ -4303,110 +4303,110 @@ "X": 77312, "Y": -1280, "Z": 5632, - "Room": -1, - "Angle": -32768 + "Room": -1 }, { "X": 78336, "Y": -1280, "Z": 5632, - "Room": -1, - "Angle": -32768 + "Room": -1 }, { "X": 79360, "Y": -1280, "Z": 5632, - "Room": -1, - "Angle": -32768 + "Room": -1 }, { "X": 79360, "Y": -1280, "Z": 5632, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 79360, "Y": -1280, "Z": 4608, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 79360, "Y": -1280, "Z": 3584, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 79360, "Y": -1280, "Z": 2560, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 79360, "Y": -1280, "Z": 1536, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 79360, "Y": -1280, "Z": 1536, - "Room": -1 + "Room": -1, + "Angle": -32768 }, { "X": 77312, "Y": -1280, "Z": 1536, - "Room": -1 + "Room": -1, + "Angle": -32768 }, { "X": 76288, "Y": -1280, "Z": 1536, - "Room": -1 + "Room": -1, + "Angle": -32768 }, { "X": 76288, "Y": -1280, "Z": 1536, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 76288, "Y": -1280, "Z": 2560, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 76288, "Y": -1280, "Z": 3584, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 76288, "Y": -1280, "Z": 4608, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 76288, "Y": -1280, "Z": 5632, "Room": -1, - "Angle": 16384 + "Angle": -16384 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/Environment/END.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/END.PHD-Environment.json index 9ca2fe58a..77d84261c 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/END.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/END.PHD-Environment.json @@ -1285,11 +1285,11 @@ { "ModelID": 43, "TextureMap": { + "744": 59, "745": 59, - "746": 59, - "747": 5, - "748": 59, - "749": 266 + "746": 5, + "747": 59, + "748": 266 } } ] diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL1.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL1.PHD-Environment.json index a615ccfbd..3060b7d9f 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL1.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL1.PHD-Environment.json @@ -652,10 +652,10 @@ { "ModelID": 44, "TextureMap": { + "749": 176, "750": 176, - "751": 176, - "752": 202, - "753": 202 + "751": 202, + "752": 202 } }, { @@ -1695,21 +1695,21 @@ "Y": 7680, "Z": 87552, "Room": -3, - "Angle": 16384 + "Angle": -16384 }, { "X": 41984, "Y": 7680, "Z": 88576, "Room": -3, - "Angle": -16384 + "Angle": 16384 }, { "X": 41984, "Y": 7680, "Z": 91648, "Room": -3, - "Angle": 16384 + "Angle": -16384 } ] }, @@ -3499,13 +3499,15 @@ "X": 50688, "Y": 7168, "Z": 102912, - "Room": -2 + "Room": -2, + "Angle": -32768 }, { "X": 34304, "Y": 7168, "Z": 92672, - "Room": -2 + "Room": -2, + "Angle": -32768 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json index ab4122ea4..281aa7b4d 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL10A.PHD-Environment.json @@ -686,19 +686,22 @@ "X": 55808, "Y": -3072, "Z": 54784, - "Room": 17 + "Room": 17, + "Angle": -32768 }, { "X": 54784, "Y": -3072, "Z": 54784, - "Room": 17 + "Room": 17, + "Angle": -32768 }, { "X": 56832, "Y": -3072, "Z": 54784, - "Room": 17 + "Room": 17, + "Angle": -32768 } ], "IgnoreSectorEntities": true diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL2.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL2.PHD-Environment.json index 66e75954f..2d93c7c43 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL2.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL2.PHD-Environment.json @@ -142,11 +142,11 @@ { "ModelID": 43, "TextureMap": { + "744": 3, "745": 3, - "746": 3, - "747": 11, - "748": 3, - "749": 39 + "746": 11, + "747": 3, + "748": 39 } } ] @@ -1585,8 +1585,12 @@ "Data": [ { "ModelID": 46, - "TexturedFace3": 6, - "TexturedFace4": 6 + "TextureMap": { + "784": 6, + "785": 6, + "786": 6, + "787": 6 + } } ] }, diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json index e38ab5452..9dc77a337 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL3B.PHD-Environment.json @@ -193,11 +193,11 @@ { "ModelID": 43, "TextureMap": { + "744": 1016, "745": 1016, "746": 1016, "747": 1016, - "748": 1016, - "749": 16 + "748": 16 } } ] @@ -1483,8 +1483,7 @@ "X": 60928, "Y": 12032, "Z": 34304, - "Room": -1, - "Angle": -32768 + "Room": -1 } ] }, @@ -1498,7 +1497,7 @@ "Y": 12032, "Z": 32256, "Room": -1, - "Angle": -16384 + "Angle": 16384 } ] }, @@ -2434,11 +2433,11 @@ "ModelID": 56, "TexturedFace3": 970, "TextureMap": { - "693": 849, - "692": 970, - "691": 971, - "690": 971, - "689": 970 + "686": 849, + "685": 970, + "684": 971, + "683": 971, + "682": 970 } } ] @@ -3832,14 +3831,14 @@ "Y": 5632, "Z": 39936, "Room": -2, - "Angle": -16384 + "Angle": 16384 }, { "X": 53248, "Y": 5632, "Z": 39936, "Room": -2, - "Angle": 16384 + "Angle": -16384 } ] }, @@ -3850,10 +3849,10 @@ { "ModelID": 44, "TextureMap": { + "749": 35, "750": 35, "751": 35, - "752": 35, - "753": 35 + "752": 35 } }, { @@ -4644,83 +4643,81 @@ "X": 65024, "Y": 6656, "Z": 48640, - "Room": 43 + "Room": 43, + "Angle": -32768 }, { "X": 65024, "Y": 6656, "Z": 48640, "Room": 43, - "Angle": -16384 + "Angle": 16384 }, { "X": 65024, "Y": 6656, "Z": 50688, "Room": 43, - "Angle": -16384 + "Angle": 16384 }, { "X": 65024, "Y": 6656, "Z": 51712, "Room": 43, - "Angle": -16384 + "Angle": 16384 }, { "X": 65024, "Y": 6656, "Z": 51712, - "Room": 43, - "Angle": -32768 + "Room": 43 }, { "X": 64000, "Y": 6656, "Z": 51712, - "Room": 43, - "Angle": -32768 + "Room": 43 }, { "X": 62976, "Y": 6656, "Z": 51712, - "Room": 43, - "Angle": -32768 + "Room": 43 }, { "X": 62976, "Y": 6656, "Z": 50688, "Room": 43, - "Angle": 16384 + "Angle": -16384 }, { "X": 62976, "Y": 6656, "Z": 49664, "Room": 43, - "Angle": 16384 + "Angle": -16384 }, { "X": 62976, "Y": 6656, "Z": 48640, "Room": 43, - "Angle": 16384 + "Angle": -16384 }, { "X": 66048, "Y": 6656, "Z": 49664, - "Room": 43 + "Room": 43, + "Angle": -32768 }, { "X": 66048, "Y": 6656, "Z": 49664, - "Room": 43, - "Angle": -32768 + "Room": 43 } ] } @@ -5842,7 +5839,8 @@ "X": 54784, "Y": 4096, "Z": 45568, - "Room": 35 + "Room": 35, + "Angle": -32768 } ] }, @@ -5906,14 +5904,14 @@ "Y": 4864, "Z": 55808, "Room": 11, - "Angle": -16384 + "Angle": 16384 }, { "X": 39424, "Y": 4864, "Z": 55808, "Room": 40, - "Angle": -16384 + "Angle": 16384 } ], "IgnoreSectorEntities": true diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json index 7adfa4437..e5fc3bd70 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL5.PHD-Environment.json @@ -561,18 +561,18 @@ { "ModelID": 36, "TextureMap": { - "666": 80, - "667": 80, - "668": 80, - "669": 910, - "670": 80, - "671": 716, - "672": 716, - "673": 716, - "674": 716, - "675": 716, - "676": 716, - "677": 716 + "659": 80, + "660": 80, + "661": 80, + "662": 910, + "663": 80, + "664": 716, + "665": 716, + "666": 716, + "667": 716, + "668": 716, + "669": 716, + "670": 716 } } ] @@ -866,8 +866,7 @@ "X": 39269, "Y": -4608, "Z": 45538, - "Room": 81, - "Angle": -32768 + "Room": 81 } ], "IgnoreSectorEntities": true diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL6.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL6.PHD-Environment.json index e9d15d6dd..9b45c5f9f 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL6.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL6.PHD-Environment.json @@ -367,11 +367,11 @@ { "ModelID": 43, "TextureMap": { + "744": 801, "745": 801, "746": 801, "747": 801, - "748": 801, - "749": 116 + "748": 116 } } ] @@ -450,11 +450,11 @@ { "ModelID": 43, "TextureMap": { + "744": 801, "745": 801, "746": 801, "747": 801, - "748": 801, - "749": 116 + "748": 116 } } ] diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL7A.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL7A.PHD-Environment.json index ff59e013a..c5d8a8b0c 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL7A.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL7A.PHD-Environment.json @@ -2619,7 +2619,8 @@ "X": 40448, "Y": -4864, "Z": 14848, - "Room": -1 + "Room": -1, + "Angle": -32768 } ] }, @@ -3472,8 +3473,7 @@ "X": 38400, "Y": -5632, "Z": 20992, - "Room": -1, - "Angle": -32768 + "Room": -1 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8A.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8A.PHD-Environment.json index 20b59f9c5..2b1cea927 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8A.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8A.PHD-Environment.json @@ -435,18 +435,18 @@ { "ModelID": 36, "TextureMap": { - "666": 80, - "667": 80, - "668": 80, - "669": 910, - "670": 80, - "671": 716, - "672": 716, - "673": 716, - "674": 716, - "675": 716, - "676": 716, - "677": 716 + "659": 80, + "660": 80, + "661": 80, + "662": 910, + "663": 80, + "664": 716, + "665": 716, + "666": 716, + "667": 716, + "668": 716, + "669": 716, + "670": 716 } } ] @@ -505,11 +505,11 @@ { "ModelID": 43, "TextureMap": { + "744": 912, "745": 912, - "746": 912, - "747": 909, - "748": 912, - "749": 183 + "746": 909, + "747": 912, + "748": 183 } } ] @@ -2873,28 +2873,28 @@ "Y": 5888, "Z": 7680, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 33280, "Y": 5888, "Z": 7680, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 34304, "Y": 5888, "Z": 5632, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 36352, "Y": 5888, "Z": 5632, "Room": -1, - "Angle": -16384 + "Angle": 16384 } ] }, @@ -2908,14 +2908,14 @@ "X": 32256, "Y": 5888, "Z": 7680, - "Room": -1 + "Room": -1, + "Angle": -32768 }, { "X": 35328, "Y": 5888, "Z": 5632, - "Room": -1, - "Angle": -32768 + "Room": -1 } ] }, @@ -4074,18 +4074,18 @@ { "ModelID": 36, "TextureMap": { - "666": 80, - "667": 80, - "668": 80, - "669": 910, - "670": 80, - "671": 716, - "672": 716, - "673": 716, - "674": 716, - "675": 716, - "676": 716, - "677": 716 + "659": 80, + "660": 80, + "661": 80, + "662": 910, + "663": 80, + "664": 716, + "665": 716, + "666": 716, + "667": 716, + "668": 716, + "669": 716, + "670": 716 } } ] @@ -4603,18 +4603,18 @@ { "ModelID": 36, "TextureMap": { - "666": 80, - "667": 80, - "668": 80, - "669": 910, - "670": 80, - "671": 716, - "672": 716, - "673": 716, - "674": 716, - "675": 716, - "676": 716, - "677": 716 + "659": 80, + "660": 80, + "661": 80, + "662": 910, + "663": 80, + "664": 716, + "665": 716, + "666": 716, + "667": 716, + "668": 716, + "669": 716, + "670": 716 } } ] diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json index 544dd825c..285c0cac2 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8B.PHD-Environment.json @@ -855,7 +855,7 @@ "X": 46592, "Z": 33280, "Room": -2, - "Angle": -16384 + "Angle": 16384 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8C.PHD-Environment.json b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8C.PHD-Environment.json index 35f2f1ab3..2cb48d072 100644 --- a/TRRandomizerCore/Resources/TR1/Environment/LEVEL8C.PHD-Environment.json +++ b/TRRandomizerCore/Resources/TR1/Environment/LEVEL8C.PHD-Environment.json @@ -862,11 +862,11 @@ { "ModelID": 43, "TextureMap": { + "744": 109, "745": 109, "746": 109, "747": 109, - "748": 109, - "749": 127 + "748": 127 } } ] @@ -983,18 +983,18 @@ { "ModelID": 36, "TextureMap": { - "666": 102, - "667": 102, - "668": 102, - "669": 680, - "670": 102, - "671": 87, - "672": 87, - "673": 87, - "674": 87, - "675": 87, - "676": 87, - "677": 87 + "659": 102, + "660": 102, + "661": 102, + "662": 680, + "663": 102, + "664": 87, + "665": 87, + "666": 87, + "667": 87, + "668": 87, + "669": 87, + "670": 87 } } ] @@ -1038,18 +1038,18 @@ { "ModelID": 36, "TextureMap": { - "666": 102, - "667": 102, - "668": 102, - "669": 680, - "670": 102, - "671": 87, - "672": 87, - "673": 87, - "674": 87, - "675": 87, - "676": 87, - "677": 87 + "659": 102, + "660": 102, + "661": 102, + "662": 680, + "663": 102, + "664": 87, + "665": 87, + "666": 87, + "667": 87, + "668": 87, + "669": 87, + "670": 87 } } ] @@ -2479,7 +2479,7 @@ "Y": 12800, "Z": 49664, "Room": -1, - "Angle": -16384 + "Angle": 16384 } ] }, @@ -2965,21 +2965,21 @@ "Y": 12544, "Z": 48640, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 19968, "Y": 12544, "Z": 45568, "Room": -1, - "Angle": -16384 + "Angle": 16384 }, { "X": 22016, "Y": 12544, "Z": 48640, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 22016, @@ -3001,14 +3001,14 @@ "Y": 12032, "Z": 47104, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 19968, "Y": 12032, "Z": 47104, "Room": -1, - "Angle": -16384 + "Angle": 16384 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/SecretMapping/CAT.PHD-SecretMapping.json b/TRRandomizerCore/Resources/TR1/SecretMapping/CAT.PHD-SecretMapping.json index aa733114e..787a01fdc 100644 --- a/TRRandomizerCore/Resources/TR1/SecretMapping/CAT.PHD-SecretMapping.json +++ b/TRRandomizerCore/Resources/TR1/SecretMapping/CAT.PHD-SecretMapping.json @@ -358,13 +358,15 @@ "X": 27136, "Y": -18944, "Z": 74240, - "Room": -1 + "Room": -1, + "Angle": -32768 }, { "X": 31232, "Y": -18944, "Z": 74240, - "Room": -1 + "Room": -1, + "Angle": -32768 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/SecretMapping/EGYPT.PHD-SecretMapping.json b/TRRandomizerCore/Resources/TR1/SecretMapping/EGYPT.PHD-SecretMapping.json index d06bd2298..7545986c5 100644 --- a/TRRandomizerCore/Resources/TR1/SecretMapping/EGYPT.PHD-SecretMapping.json +++ b/TRRandomizerCore/Resources/TR1/SecretMapping/EGYPT.PHD-SecretMapping.json @@ -278,14 +278,14 @@ "Y": 1792, "Z": 74240, "Room": -1, - "Angle": 16384 + "Angle": -16384 }, { "X": 74240, "Y": 1792, "Z": 72192, "Room": -1, - "Angle": 16384 + "Angle": -16384 } ] }, diff --git a/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Braid/Data.json b/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Braid/Data.json index ba662c21c..064b79640 100644 --- a/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Braid/Data.json +++ b/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Braid/Data.json @@ -5,8 +5,8 @@ "EntityTextureMap": { "189": { - "292": 0, - "294": 1 + "877": 0, + "876": 1 } }, diff --git a/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Mauled/Data.json b/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Mauled/Data.json index 51270b189..c9d872e03 100644 --- a/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Mauled/Data.json +++ b/TRRandomizerCore/Resources/TR1/Textures/Source/Static/Lara/Mauled/Data.json @@ -11,16 +11,16 @@ "EntityTextureMap": { "2001": { - "410": 0, - "411": 1, - "407": 2, - "241": 3, - "215": 4, - "395": 5, - "244": 6, - "247": 7, - "251": 8, - "409": 9 + "399": 0, + "400": 1, + "396": 2, + "397": 3, + "204": 4, + "384": 5, + "233": 6, + "235": 7, + "239": 8, + "398": 9 } },