mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-26 10:26:43 +01:00
After Steam updated skate., some installs had the supported Skate.exe over the new build's data (a copied game, or a download that stopped part-way). The launcher called that ready, every mod was left out as "made for game build 29544144, not the installed 29663206; rebuild it with ReSkate Studio", and the mods stayed out after the game files were put right. Launcher - Ready now also needs the game's data to be the supported build, read from Data\layout.toc against supported_build::game_data_changelist (29544144). Data of another build, or none, reads "Game files need verifying". - DOWNLOAD in that state checks every file (-validate) instead of fetching only what is missing. A download that fails part-way no longer ends on ready because Skate.exe arrived. - Data whose build cannot be read does not block. Mods - A mod left out because the game was of another build is no longer remembered in .reskate-excluded.json: it is checked on every launch. One already remembered for it is looked at again. - When it is the game that is not the supported build, the mod's message says to verify the game files in the launcher, not to rebuild the mod.
55 lines
2.9 KiB
C++
55 lines
2.9 KiB
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <cstdint>
|
|
#include <string_view>
|
|
|
|
// This is the accepted contract identity, not a list of hashes to bypass.
|
|
// Advance it only together with the reviewed native/asset contracts in
|
|
// Engine/Game/Build/<build>/. Diagnostic tools with historical addresses
|
|
// intentionally retain their own historical build pins.
|
|
namespace dingosdk::supported_build {
|
|
|
|
inline constexpr std::uint64_t game_file_size = 144567168;
|
|
inline constexpr std::uint32_t game_image_size = 0x09144000;
|
|
inline constexpr std::string_view game_sha256 =
|
|
"fbce74d5e28ef525dbba2cb4adbebc13405bdbd88f31bc940bca45e4ae88b8f9";
|
|
inline constexpr std::uint64_t steam_api_file_size = 300928;
|
|
inline constexpr std::string_view steam_api_sha256 =
|
|
"88b55dc33bfe9d8f998b72bf7074ebe0d21318a0b6dfdcca3530cb1e0c102a39";
|
|
// The Steam content that ships the files above; the launcher config repeats these
|
|
// so the launcher can fetch this build with DepotDownloader.
|
|
inline constexpr std::uint32_t steam_app_id = 3354750;
|
|
inline constexpr std::uint32_t steam_depot_id = 3354751;
|
|
inline constexpr std::string_view steam_manifest_id = "4621099302092747785";
|
|
inline constexpr std::string_view steam_build_id = "25414733";
|
|
// The build number this build's data files carry (Data\layout.toc, "pipelineCodeChangelists"):
|
|
// what mods made for it carry too. Data of another number beside a supported Skate.exe is a
|
|
// game that was updated or copied over in part, and has to be verified.
|
|
inline constexpr std::string_view game_data_changelist = "29544144";
|
|
// The live game's HTTP content cache for this build (catalogue chunks and CDN
|
|
// images), published as a ReSkateCache release and installed by the launcher.
|
|
inline constexpr std::wstring_view content_cache_url =
|
|
L"https://github.com/Dingo-Shenanigans/ReSkateCache/releases/download/25414733/25414733.zip";
|
|
inline constexpr std::string_view content_cache_sha256 =
|
|
"01867746b29301eead35a473ae523f8c84aa43784c244fcfafe0057a113045f4";
|
|
inline constexpr std::uint64_t content_cache_bytes = 9296380;
|
|
|
|
consteval std::array<unsigned char, 32> sha256_bytes(std::string_view text) {
|
|
if (text.size() != 64) throw "SHA-256 must have exactly 64 hexadecimal digits";
|
|
const auto nibble = [](char value) -> unsigned char {
|
|
if (value >= '0' && value <= '9') return static_cast<unsigned char>(value - '0');
|
|
if (value >= 'a' && value <= 'f') return static_cast<unsigned char>(value - 'a' + 10);
|
|
throw "SHA-256 must use lowercase hexadecimal digits";
|
|
};
|
|
std::array<unsigned char, 32> result{};
|
|
for (std::size_t i = 0; i < result.size(); ++i)
|
|
result[i] = static_cast<unsigned char>((nibble(text[i * 2]) << 4) | nibble(text[i * 2 + 1]));
|
|
return result;
|
|
}
|
|
|
|
inline constexpr auto game_sha256_bytes = sha256_bytes(game_sha256);
|
|
inline constexpr auto steam_api_sha256_bytes = sha256_bytes(steam_api_sha256);
|
|
|
|
} // namespace dingosdk::supported_build
|