Skip to content

Commit

Permalink
Added Rocket League support with -game=rocket
Browse files Browse the repository at this point in the history
  • Loading branch information
AltimorTASDK committed Jun 12, 2018
1 parent b1c665c commit 3dae13f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Unreal/GameDatabase.cpp
Expand Up @@ -339,6 +339,9 @@ const GameInfo GListOfGames[] = {
# if DEVILS_THIRD
G("Devil's Third", dev3rd, GAME_DevilsThird),
# endif
# if ROCKET
G("Rocket League", rocket, GAME_Rocket),
# endif
#endif // UNREAL3

// Unreal engine 4
Expand Down
1 change: 1 addition & 0 deletions Unreal/GameDefines.h
Expand Up @@ -112,6 +112,7 @@
#define SMITE 1
#define DUNDEF 1 // Dungeon Defenders
#define DEVILS_THIRD 1 // Devil's Third
#define ROCKET 1 // Rocket League
//#define USE_XDK 1 // use some proprietary code for XBox360 support

// Midway UE3 games -- make common define ??
Expand Down
1 change: 1 addition & 0 deletions Unreal/UnCore.h
Expand Up @@ -362,6 +362,7 @@ enum EGame
GAME_MetroConflict,
GAME_Smite,
GAME_DevilsThird,
GAME_Rocket,

GAME_MIDWAY3 = 0x0810000, // variant of UE3
GAME_A51,
Expand Down
27 changes: 27 additions & 0 deletions Unreal/UnCoreSerialize.cpp
Expand Up @@ -1059,6 +1059,33 @@ void FByteBulkData::SerializeHeader(FArchive &Ar)
goto header_done;
}
#endif // BATMAN
#ifdef ROCKET
if (Ar.Game == GAME_Rocket && Ar.ArLicenseeVer >= 20)
{
Ar << BulkDataSizeOnDisk;

// Offset only serialized with BULKDATA_StoreInSeparateFile
if (BulkDataFlags & BULKDATA_StoreInSeparateFile)
{
// 64-bit in LicenseeVer >= 22
if (Ar.ArLicenseeVer >= 22)
{
Ar << BulkDataOffsetInFile;
}
else
{
Ar << tmpBulkDataOffsetInFile32;
BulkDataOffsetInFile = tmpBulkDataOffsetInFile32;
}
}
else
{
BulkDataOffsetInFile = Ar.Tell();
}

goto header_done;
}
#endif // ROCKET
Ar << BulkDataSizeOnDisk << tmpBulkDataOffsetInFile32;
BulkDataOffsetInFile = tmpBulkDataOffsetInFile32; // sign extend to allow non-standard TFC systems which uses '-1' in this field
#if TRANSFORMERS
Expand Down
9 changes: 9 additions & 0 deletions Unreal/UnPackage.cpp
Expand Up @@ -1028,6 +1028,15 @@ static void SerializeObjectExport3(FArchive &Ar, FObjectExport &E)
if (Ar.ArVer >= 573) goto ue3_component_map; // Injustice, version unknown
}
#endif // MKVSDC
#if ROCKET
if (Ar.Game == GAME_Rocket && Ar.ArLicenseeVer >= 22)
{
// Rocket League has 64-bit SerialOffset in LicenseeVer >= 22, skip HIDWORD
int SerialOffsetUpper;
Ar << SerialOffsetUpper;
assert(SerialOffsetUpper == 0);
}
#endif // ROCKET

if (Ar.ArVer < 543)
{
Expand Down

0 comments on commit 3dae13f

Please sign in to comment.