view TaskManager/Test/test_render/spe/TileHash.h @ 266:5c9dbd54cd51

merge
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 04 Jun 2009 00:00:09 +0900
parents 56be4a6e5513
children 3f5289873643
line wrap: on
line source

#ifndef INCLUDED_TEXTURE_HASH
#define INCLUDED_TEXTURE_HASH

#ifndef INCLUDED_TAPESTRY
#  include "Tapestry.h"
#endif

class TileHash {
public:
    TileHash(void);

private:
    TilePtr *table;
    int hashSize;
    int tableSize;

public:
    void clear(void);
    int hash(uint32 data);
    int put(uint32 *addr, TilePtr tile);
    TilePtr get(uint32 *addr);
    void remove(uint32 *addr);
};

typedef TileHash* TileHashPtr;

#endif

const int GLOBAL_TEXTURE_HASH = 0;
const int GLOBAL_TILE_LIST    = 1;