Skip to content

Commit

Permalink
Merge pull request #45 from Scobalula/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Scobalula authored Nov 23, 2022
2 parents fac8cd8 + 3b22181 commit 511879a
Show file tree
Hide file tree
Showing 7 changed files with 1,013 additions and 626 deletions.
5 changes: 5 additions & 0 deletions src/WraithXCOD/WraithXCOD/CoDAssetType.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

// We need the WraithAsset type
#include "WraithAsset.h"
#include "WraithAnim.h"

// We need the base game assets
#include "DBGameAssets.h"
Expand Down Expand Up @@ -499,6 +500,10 @@ struct XAnim_t

// XAnim Reader (Streamed)
std::unique_ptr<CoDXAnimReader> Reader;
// XAnim Reader Function
std::function<void(const std::unique_ptr<XAnim_t>&, std::unique_ptr<WraithAnim>&)> ReaderFunction;
// XAnim Reader Information Pointer.
uint64_t ReaderInformationPointer;
};

struct XImageDDS
Expand Down
932 changes: 477 additions & 455 deletions src/WraithXCOD/WraithXCOD/CoDXAnimTranslator.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/WraithXCOD/WraithXCOD/GameModernWarfare4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ void GameModernWarfare4::TranslateRawfile(const CoDRawFile_t * Rawfile, const st
// Size read
uint32_t ResultSize = 0;
// Buffer
std::unique_ptr<uint8_t[]> Data = CoDAssets::GamePackageCache->ExtractPackageObject(Info.StreamKey, ResultSize);
std::unique_ptr<uint8_t[]> Data = CoDAssets::GamePackageCache->ExtractPackageObject(Info.StreamKey, Info.BankFileSize, ResultSize);

// Prepare if we have it
if (Data != nullptr)
Expand Down
679 changes: 516 additions & 163 deletions src/WraithXCOD/WraithXCOD/GameModernWarfare5.cpp

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/WraithXCOD/WraithXCOD/GameModernWarfare5.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "DBGameAssets.h"
#include "CoDAssetType.h"
#include "WraithModel.h"
#include "WraithAnim.h"
#include "WraithNameIndex.h"

// We need the XModel Translator
Expand Down Expand Up @@ -43,8 +44,10 @@ class GameModernWarfare5

// Reads an XImageDDS from a image reference from Modern Warfare 5
static std::unique_ptr<XImageDDS> LoadXImage(const XImage_t& Image);
// Loads a streamed XModel lod, streaming from cache if need be
// Loads a streamed XModel lod, streaming from cache if need be.
static void LoadXModel(const std::unique_ptr<XModel_t>& Model, const XModelLod_t& ModelLOD, const std::unique_ptr<WraithModel>& ResultModel);
// Loads a streamed XAnim, streaming from cache if need be.
static void LoadXAnim(const std::unique_ptr<XAnim_t>& Anim, std::unique_ptr<WraithAnim>& ResultAnim);

// String Handlers for Modern Warfare 5
static std::string LoadStringEntry(uint64_t Index);
Expand Down
8 changes: 6 additions & 2 deletions src/WraithXCOD/WraithXCOD/GameModernWarfare5Structures.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ struct MW5XAnimDataInfo
uint64_t OffsetPtr2;
uint32_t StreamIndex;
uint32_t OffsetCount;
uint8_t Padding5[24];
uint64_t PackedInfoPtr;
uint32_t PackedInfoCount;
uint32_t PackedInfoCount2;
uint64_t Flags;
uint64_t StreamInfoPtr;
};
#pragma pack(pop)
Expand All @@ -194,7 +197,8 @@ struct MW5XAnim
uint64_t BoneIDsPtr;
uint64_t IndicesPtr;
uint64_t NotificationsPtr;
uint8_t Padding[24];
uint64_t DeltaPartsPtr;
uint8_t Padding[16];
uint32_t RandomDataShortCount;
uint32_t RandomDataByteCount;
uint32_t IndexCount;
Expand Down
8 changes: 4 additions & 4 deletions src/WraithXCOD/WraithXCOD/WraithXCOD.rc
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ IDI_CHECKMARK ICON "..\\..\\WraithX\\Resources\\Che
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,23,27,0
PRODUCTVERSION 1,23,27,0
FILEVERSION 1,23,29,0
PRODUCTVERSION 1,23,29,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -366,12 +366,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "DTZxPorter / Scobalula"
VALUE "FileDescription", "Greyhound"
VALUE "FileVersion", "1.23.27.0"
VALUE "FileVersion", "1.23.29.0"
VALUE "InternalName", "Greyhound"
VALUE "LegalCopyright", "Copyright (C) 2022 DTZxPorter / Scobalula"
VALUE "OriginalFilename", "Greyhound.exe"
VALUE "ProductName", "Greyhound"
VALUE "ProductVersion", "1.23.27.0"
VALUE "ProductVersion", "1.23.29.0"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 511879a

Please sign in to comment.