Update File Type - Bundle Database
parent
cac4a7cb6d
commit
0e69f14466
1 changed files with 22 additions and 0 deletions
|
@ -74,3 +74,25 @@ typedef struct {
|
||||||
|
|
||||||
BundleContents contents[num_contents] <optimize=false>;
|
BundleContents contents[num_contents] <optimize=false>;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Algorithm to calculate resource hashes by WhiteGoat:
|
||||||
|
```cpp
|
||||||
|
uint64_t calc_hash(const std::vector<uint64_t>& list) {
|
||||||
|
const uint64_t m = 0xc6a4a7935bd1e995ULL;
|
||||||
|
const int r = 47;
|
||||||
|
|
||||||
|
uint64_t k = 0;
|
||||||
|
|
||||||
|
for (auto&& name : list) {
|
||||||
|
uint64_t h = name;
|
||||||
|
|
||||||
|
k *= m;
|
||||||
|
k ^= k >> r;
|
||||||
|
k *= m;
|
||||||
|
|
||||||
|
h ^= k;
|
||||||
|
k = m * h;
|
||||||
|
}
|
||||||
|
return k;
|
||||||
|
}
|
||||||
|
```
|
Loading…
Add table
Reference in a new issue