mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-10-08 05:05:35 +00:00
Unlinker: Make zone files creators game dependent and in the unlinker project instead of the ObjWriting component
This commit is contained in:
1 parent
992e9cea30
commit
9572391082
18 files changed
+217
-40
No files matched your search
@@ -0,0 +1,18 @@
|
||||
#include "CommonT6.h"
|
||||
|
||||
int CommonT6::Com_HashKey(const char* str, const int maxLen)
|
||||
{
|
||||
if (str == nullptr)
|
||||
return 0;
|
||||
|
||||
int hash = 0;
|
||||
for (int i = 0; i < maxLen; i++)
|
||||
{
|
||||
if (str[i] == '\0')
|
||||
break;
|
||||
|
||||
hash += str[i] * (0x77 + i);
|
||||
}
|
||||
|
||||
return hash ^ ((hash ^ (hash >> 10)) >> 10);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
class CommonT6
|
||||
{
|
||||
public:
|
||||
static int Com_HashKey(const char* str, int maxLen);
|
||||
};
|
||||
Reference in new issue
Block a user