From 3d9d632d7b270feb6b46523a5fb581f5cc98099f Mon Sep 17 00:00:00 2001 From: Syping Date: Tue, 9 May 2023 23:28:38 +0200 Subject: [PATCH] libragephoto: add RDR 2 SignInitial --- src/RagePhoto.cpp | 2 ++ src/RagePhoto.h | 1 + src/RagePhotoA.h | 1 + 3 files changed, 4 insertions(+) diff --git a/src/RagePhoto.cpp b/src/RagePhoto.cpp index f596b85..af36de5 100644 --- a/src/RagePhoto.cpp +++ b/src/RagePhoto.cpp @@ -644,6 +644,8 @@ uint64_t RagePhoto::jpegSign(uint32_t photoFormat, RagePhotoData *rp_data) { if (photoFormat == PhotoFormat::GTA5) return (0x100000000000000ULL | joaatFromInitial(rp_data->jpeg, rp_data->jpegSize, SignInitials::SIGTA5)); + else if (photoFormat == PhotoFormat::RDR2) + return (0x100000000000000ULL | joaatFromInitial(rp_data->jpeg, rp_data->jpegSize, SignInitials::SIRDR2)); else return 0; } diff --git a/src/RagePhoto.h b/src/RagePhoto.h index af040f3..2173b25 100644 --- a/src/RagePhoto.h +++ b/src/RagePhoto.h @@ -95,6 +95,7 @@ public: /** Sign Initials */ enum SignInitials : uint32_t { SIGTA5 = 0xE47AB81CUL, /**< GTA V Sign Initial */ + SIRDR2 = 0x00FEEB1EUL, /**< RDR 2 Sign Initial */ }; RagePhoto(); ~RagePhoto(); diff --git a/src/RagePhotoA.h b/src/RagePhotoA.h index 3e1203d..08d39ef 100644 --- a/src/RagePhotoA.h +++ b/src/RagePhotoA.h @@ -95,6 +95,7 @@ public: /** Sign Initials */ enum SignInitials : uint32_t { SIGTA5 = 0xE47AB81CUL, /**< GTA V Sign Initial */ + SIRDR2 = 0x00FEEB1EUL, /**< RDR 2 Sign Initial */ }; RagePhotoA() { instance = ragephoto_open();