Mercurial > hg > Members > koba > home
comparison works/hash_test/TileHash.h @ 0:99a6512a8253
moving from firefly
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 28 Oct 2009 20:12:40 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:99a6512a8253 |
---|---|
1 #ifndef INCLUDED_TEXTURE_HASH | |
2 #define INCLUDED_TEXTURE_HASH | |
3 | |
4 #ifndef INCLUDED_TAPESTRY | |
5 # include "Tapestry.h" | |
6 #endif | |
7 | |
8 class TileHash { | |
9 public: | |
10 TileHash(void); | |
11 | |
12 private: | |
13 TilePtr *table; | |
14 | |
15 public: | |
16 void clear(void); | |
17 int hash(uint32 data); | |
18 int put(uint32 *addr, TilePtr tile); | |
19 TilePtr get(uint32 *addr); | |
20 void remove(uint32 *addr); | |
21 }; | |
22 | |
23 typedef TileHash* TileHashPtr; | |
24 | |
25 #endif | |
26 | |
27 const int hashSize = 263; | |
28 const int tableSize = sizeof(TilePtr)*hashSize; | |
29 | |
30 |