wavelength 1.0.0
Loading...
Searching...
No Matches
hash.h File Reference

Go to the source code of this file.

Functions

int HashString (const char *pszText, int nBuckets)
 Hash a string into the buckets of a table.

Function Documentation

◆ HashString()

int HashString ( const char * pszText,
int nBuckets )

Hash a string into the buckets of a table.

Each character is added to 127 times the hash so far, reduced modulo the bucket count at every step. The ark file table and the symbol table use it.

Parameters
pszTextThe string.
nBucketsThe bucket count.
Returns
The bucket, or 0 for an empty string.
Ghidra address:
NTSC-U/C: 0x002903e8
Ghidra address:
PAL: 0x00299db0