Skip to content

Commit

Permalink
Merge pull request LostArtefacts#220 from lahm86/master
Browse files Browse the repository at this point in the history
Initial TR3 Support
  • Loading branch information
DanzaG authored Oct 12, 2021
2 parents f442d4a + e7717dc commit d29b729
Show file tree
Hide file tree
Showing 620 changed files with 3,804 additions and 1,946 deletions.
Binary file modified Deps/TRGE.Coord.dll
Binary file not shown.
Binary file modified Deps/TRGE.Core.dll
Binary file not shown.
4 changes: 2 additions & 2 deletions TR2Randomizer/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private void ImportLocations_Click(object sender, RoutedEventArgs e)
List<TRViewLocation> routeLocations = RouteToLocationsConverter.Convert(filename);

//What level are we importing for?
string level = LevelNames.AsList[ImportLevel.SelectedIndex];
string level = TR2LevelNames.AsList[ImportLevel.SelectedIndex];

//What locations do we want to import for? secrets or items
Dictionary<string, List<Location>> Locations;
Expand Down Expand Up @@ -263,7 +263,7 @@ private void TextureInject_Click(object sender, RoutedEventArgs e)

string CurrentDir = Directory.GetCurrentDirectory();

string LvlName = LevelNames.AsList[ImportLevel.SelectedIndex];
string LvlName = TR2LevelNames.AsList[ImportLevel.SelectedIndex];

instance = reader.ReadLevel(LvlName);

Expand Down
4 changes: 2 additions & 2 deletions TR2Randomizer/Randomizers/EnemyRandomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ private void RandomizeEnemyTypes(string lvl)

for (int i = 0; i < _levelInstance.Entities.Count(); i++)
{
if (lvl == LevelNames.CHICKEN &&
if (lvl == TR2LevelNames.CHICKEN &&
_levelInstance.Entities[i].Room == 143 &&
_levelInstance.Entities[i].TypeID == (int)TR2Entities.BirdMonster)
{
//#60 - Ice Palace - Room 143 chicken man must remain to avoid softlock.
continue;
}
else if (lvl == LevelNames.HOME && _levelInstance.Entities[i].TypeID == (int)TR2Entities.ShotgunGoon)
else if (lvl == TR2LevelNames.HOME && _levelInstance.Entities[i].TypeID == (int)TR2Entities.ShotgunGoon)
{
//#62 - Avoid randomizing shotgun goon in HSH
continue;
Expand Down
8 changes: 4 additions & 4 deletions TR2Randomizer/Randomizers/ItemRandomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ public override void Randomize(int seed)
//Read the level into a level object
_levelInstance = LoadLevel(lvl);

if (lvl == LevelNames.RIG) { CleanPlaneCargo(); FindPlaneCargoIndex(); }
if (lvl == LevelNames.HOME) { InjectHSHWeaponTextures(); CleanHSHCloset(); }
if (lvl == TR2LevelNames.RIG) { CleanPlaneCargo(); FindPlaneCargoIndex(); }
if (lvl == TR2LevelNames.HOME) { InjectHSHWeaponTextures(); CleanHSHCloset(); }

//Apply the modifications
RepositionItems(Locations[lvl]);

//#44 - Randomize OR pistol type
if (lvl == LevelNames.RIG) { RandomizeORPistol(); }
if (lvl == TR2LevelNames.RIG) { RandomizeORPistol(); }

//#47 - Randomize the HSH weapon closet
if (lvl == LevelNames.HOME) { PopulateHSHCloset(); }
if (lvl == TR2LevelNames.HOME) { PopulateHSHCloset(); }

//Write back the level file
SaveLevel(_levelInstance, lvl);
Expand Down
2 changes: 1 addition & 1 deletion TR2Randomizer/Randomizers/RandomizerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public abstract class RandomizerBase : IRandomizer

public RandomizerBase()
{
_levels = LevelNames.AsList;
_levels = TR2LevelNames.AsList;

_reader = new TR2LevelReader();
_writer = new TR2LevelWriter();
Expand Down
36 changes: 18 additions & 18 deletions TR2Randomizer/Utilities/RoomWaterUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,94 +12,94 @@ public static class RoomWaterUtilities
{
public static Dictionary<string, List<List<int>>> RoomRemovalWaterMap = new Dictionary<string, List<List<int>>>
{
{ LevelNames.GW, new List<List<int>>
{ TR2LevelNames.GW, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.VENICE, new List<List<int>>
{ TR2LevelNames.VENICE, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.BARTOLI, new List<List<int>>
{ TR2LevelNames.BARTOLI, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.OPERA, new List<List<int>>
{ TR2LevelNames.OPERA, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.RIG, new List<List<int>>
{ TR2LevelNames.RIG, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.DA, new List<List<int>>
{ TR2LevelNames.DA, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.FATHOMS, new List<List<int>>
{ TR2LevelNames.FATHOMS, new List<List<int>>
{
new List<int>() { 33, 63, 64 }
}
},
{ LevelNames.DORIA, new List<List<int>>
{ TR2LevelNames.DORIA, new List<List<int>>
{
new List<int>() { 19, 42, 112 },
new List<int>() { 85, 94 },
new List<int>() { 2, 6, 7, 87, 88, 99, 100, 101, 102, 103}
}
},
{ LevelNames.LQ, new List<List<int>>
{ TR2LevelNames.LQ, new List<List<int>>
{
new List<int>() { 28, 32, 72, 77 }
}
},
{ LevelNames.DECK, new List<List<int>>
{ TR2LevelNames.DECK, new List<List<int>>
{
new List<int>() { 59, 93 }
}
},
{ LevelNames.TIBET, new List<List<int>>
{ TR2LevelNames.TIBET, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.MONASTERY, new List<List<int>>
{ TR2LevelNames.MONASTERY, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.COT, new List<List<int>>
{ TR2LevelNames.COT, new List<List<int>>
{
new List<int>() { 21, 22, 28, 82 }
}
},
{ LevelNames.CHICKEN, new List<List<int>>
{ TR2LevelNames.CHICKEN, new List<List<int>>
{
new List<int>() { 24, 29, 71 }
}
},
{ LevelNames.XIAN, new List<List<int>>
{ TR2LevelNames.XIAN, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.FLOATER, new List<List<int>>
{ TR2LevelNames.FLOATER, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.LAIR, new List<List<int>>
{ TR2LevelNames.LAIR, new List<List<int>>
{
//No drain areas defined for now
}
},
{ LevelNames.HOME, new List<List<int>>
{ TR2LevelNames.HOME, new List<List<int>>
{
//No drain areas defined for now
}
Expand Down
152 changes: 0 additions & 152 deletions TR2RandomizerCore/Processors/LevelProcessor.cs

This file was deleted.

12 changes: 0 additions & 12 deletions TR2RandomizerCore/Randomizers/RandomizerBase.cs

This file was deleted.

Loading

0 comments on commit d29b729

Please sign in to comment.