ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


function_requests

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
function_requests [2019/07/06 17:21] monsterovichfunction_requests [2019/07/07 18:45] (current) monsterovich
Line 11: Line 11:
  SpawnForced("TeleportFog", x, y, z);  SpawnForced("TeleportFog", x, y, z);
  return result;  return result;
 + }
 +
 +
 + function int hash_djb2(str key)
 + {   
 + int hash = 5381;
 + for (int i = 0; i < strlen(key); i++)
 + hash = ((hash << 5) + hash) + GetChar(key, i);
 +
 + return hash;
 + }
 +
 + function int hash_sdbm(str key)
 + {   
 + int hash = 0;
 + for (int i = 0; i < strlen(key); i++)
 + hash = GetChar(key, i) + (hash << 6) + (hash << 16) - hash;
 +
 + return hash;
  }  }
  
function_requests.txt · Last modified: 2019/07/07 18:45 by monsterovich