Unlinker: Make zone files creators game dependent and in the unlinker project instead of the ObjWriting component

This commit is contained in:
Jan
2020-02-18 17:15:51 +01:00
parent 992e9cea30
commit 9572391082
18 changed files with 217 additions and 40 deletions

View File

@ -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);
}

View File

@ -0,0 +1,7 @@
#pragma once
class CommonT6
{
public:
static int Com_HashKey(const char* str, int maxLen);
};