mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-17 19:47:08 +02:00
An array record's hash is one per field type in a document (every array the base game's files hold follows this, and each such hash is a key of the document's reflection group table, now read). A new array takes the hash of an existing array of the same holding type and field; callers can ask the writer to refuse when there is none, and the mod merge keeps the old fallback. Checked on the game's own level documents.
19 lines
707 B
C++
19 lines
707 B
C++
#pragma once
|
|
|
|
#include "ebx_document.h"
|
|
|
|
#include <cstdint>
|
|
#include <vector>
|
|
|
|
namespace dingosdk::frostbite::ebx {
|
|
|
|
[[nodiscard]] std::uint16_t ensure_fixup_type(Document& document, std::int32_t descriptor);
|
|
|
|
// A new array (one no record was read for) takes the hash of an array the document read for the
|
|
// same field of the same type. Without one it borrows another array's hash (the merge's way), or,
|
|
// with refuseNewArrayHashes (the map builder's), the write is refused: the RFL2 group table would
|
|
// need a new entry. A hash that is not a key of that table is refused the same way.
|
|
[[nodiscard]] std::vector<std::byte> write_document(const Document& document, bool refuseNewArrayHashes = false);
|
|
|
|
}
|