2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-05 10:41:52 +00:00
Files
OpenAssetTools/src/ZoneCommon/Game/T6/CommonT6.cpp

18 lines
332 B
C++

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