Skip to content

Commit

Permalink
Re-add and update support for "Vanguard: Saga of Heroes"
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotVU committed Jun 22, 2022
1 parent 4da1e04 commit 86538e5
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ This is a table of games that are confirmed to be compatible with the current st
| Red Orchestra: Ostfront 41-45 | 3323-3369 | 128/029 | |
| Killing Floor | 3369 | 128/029 | |
| Battle Territory Battery | Unknown | Unknown | |
| Vanguard: Saga of Heroes | Unknown | 129/035 | |
| Swat 4 | Vengeance | 129/027 | |
| Tribes: Vengeance | Vengeance | 130/027 | |
| Bioshock | Vengeance | 130-141/056 | |
Expand Down
50 changes: 44 additions & 6 deletions src/UnrealPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,25 +160,29 @@ public enum BuildName

/// <summary>
/// Standard
///
/// 61/000
/// </summary>
[Build(61, 0)] Unreal1,

/// <summary>
/// Standard, Unreal Tournament & Deus Ex
///
/// 68:69/000
/// </summary>
[Build(68, 69, 0u, 0u)] UT,

/// <summary>
/// Deus Ex: Invisible War
///
/// Missing support for custom classes such as BitfieldProperty and BitfieldEnum among others.
/// 95/69
/// </summary>
[Build(95, 69, BuildGeneration.Thief)] DeusEx_IW,

/// <summary>
/// Thief: Deadly Shadows
///
/// 95/133
/// </summary>
[Build(95, 133, BuildGeneration.Thief)]
Expand All @@ -203,15 +207,17 @@ public enum BuildName

/// <summary>
/// Tom Clancy's Rainbow Six 3: Raven Shield
///
/// 118/011:014
/// </summary>
[Build(118, 118, 11u, 14u)] R6RS,

/// <summary>
/// Unreal II: eXpanded MultiPlayer
///
/// 126/000
/// </summary>
[Build(126, 0)] Unreal2XMP,
[Build(123, 126, 0u, 0u)] Unreal2XMP,

/// <summary>
/// 118:128/025:029
Expand All @@ -221,17 +227,29 @@ public enum BuildName
UT2004,

/// <summary>
/// Built on UT2004
/// America's Army 2.X
/// Represents both AAO and AAA
///
/// Built on UT2004
/// 128/032:033
/// </summary>
[Build(128, 128, 32u, 33u, BuildGeneration.UE2_5)] [BuildEngineBranch(typeof(EngineBranchAA2))]
AA2,

/// <summary>
/// Vanguard: Saga of Heroes
///
/// 129/035
/// Some packages have 128/025 but those are in conflict with UT2004.
/// </summary>
[Build(128, 129, 34u, 35u, BuildGeneration.UE2_5)] Vanguard_SOH,

// IrrationalGames/Vengeance - 129:143/027:059

/// <summary>
/// Tribes: Vengeance
///
/// 130/027
/// </summary>
[Build(130, 27, BuildGeneration.Vengeance)]
Tribes_VG,
Expand All @@ -244,6 +262,7 @@ public enum BuildName

/// <summary>
/// BioShock 1 & 2
///
/// 130:143/056:059
/// </summary>
[Build(130, 143, 56u, 59u, BuildGeneration.Vengeance)]
Expand All @@ -260,11 +279,15 @@ public enum BuildName
Spellborn,

/// <summary>
/// Standard
///
/// 369/006
/// </summary>
[Build(369, 6)] RoboBlitz,

/// <summary>
/// Medal of Honor: Airborne
///
/// 421/011
/// </summary>
[Build(421, 11)] MOHA,
Expand All @@ -276,6 +299,8 @@ public enum BuildName
MKKE,

/// <summary>
/// Gears of War
///
/// 490/009
/// </summary>
[Build(490, 9)] GoW1,
Expand Down Expand Up @@ -307,11 +332,15 @@ public enum BuildName
[Build(539, 91)] AlphaProtocol,

/// <summary>
/// APB: All Points Bulletin & APB: Reloaded
///
/// 547/028:032
/// </summary>
[Build(547, 547, 28u, 32u)] APB,

/// <summary>
/// Standard, Gears of War 2
///
/// 575/000
/// Xenon is enabled here, because the package is missing editor data, the editor data of UStruct is however still serialized.
/// </summary>
Expand All @@ -324,8 +353,9 @@ public enum BuildName
[Build(576, 5)] CrimeCraft,

/// <summary>
/// 576/021
/// Batman: Arkham Asylum
///
/// 576/021
/// No Special support, but there's no harm in recognizing this build.
/// </summary>
[Build(576, 21)] Batman1,
Expand Down Expand Up @@ -367,6 +397,8 @@ public enum BuildName
[Build(610, 14)] Tera,

/// <summary>
/// DC Universe Online
///
/// 648/6405
/// </summary>
[Build(648, 6405)] DCUO,
Expand Down Expand Up @@ -396,6 +428,8 @@ public enum BuildName
InfinityBlade,

/// <summary>
/// Standard, Gears of War 3
///
/// 828/000
/// </summary>
[Build(828, 0, BuildFlags.ConsoleCooked)]
Expand All @@ -418,11 +452,15 @@ public enum BuildName
InfinityBlade2,

/// <summary>
/// XCom
///
/// 845/059
/// </summary>
[Build(845, 59)] XCOM_EU,

/// <summary>
/// XCom 2: War of The Chosen
///
/// 845/120
/// </summary>
[Build(845, 120)] XCOM2WotC,
Expand All @@ -445,11 +483,11 @@ public enum BuildName
/// 807/104
/// 863/32995
/// </summary>
[Build(805, 101, BuildGeneration.Batman2)]
[Build(805, 101, BuildGeneration.Batman2)] // Batman: Arkham City
[Build(806, 103, BuildGeneration.Batman3)]
[Build(807, 807, 137, 138, BuildGeneration.Batman3)]
[Build(807, 807, 137, 138, BuildGeneration.Batman3)] // Batman: Arkham Origins
[Build(807, 104, BuildGeneration.Batman3MP)]
[Build(863, 32995, BuildGeneration.Batman4)]
[Build(863, 32995, BuildGeneration.Batman4)] // Batman: Arkham Knight
BatmanUDK,

/// <summary>
Expand Down
6 changes: 6 additions & 0 deletions src/UnrealStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,12 @@ public static UName ReadNameReference(this IUnrealStream stream)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int ReadLength(this IUnrealStream stream)
{
#if VANGUARD
if (stream.Package.Build == UnrealPackage.GameBuild.BuildName.Vanguard_SOH)
{
return stream.UR.ReadInt32();
}
#endif
return stream.UR.ReadIndex();
}

Expand Down

0 comments on commit 86538e5

Please sign in to comment.