Hash.h
573 Bytes
#ifndef _AE_Hash_h
#define _AE_Hash_h
#include "AeAsset.h"
#define HASH_MIN_SIZE 0x1000 // must be a number with only one bit set!!!
#define HASH_SLOT_EMPTY 0xFFFFFFFF
typedef struct {
unsigned int bankOffset;
AeAsset * assetAddr;
} hashPair;
class HashTable
{
protected:
hashPair *hashT;
int hashSize;
unsigned int hashMask;
public:
HashTable(int numItems);
~HashTable();
int AddPair(unsigned int bankOffset, AeAsset* assetAddr);
AeAsset* MatchPair(unsigned int bankOffset);
};
#endif