diff TaskManager/Test/test_render/spe/TileHash.h @ 167:c8b868871dce

DrawSpan で使う Tile の Hash の扱いは class TileHash を生成する事に。
author gongo@localhost.localdomain
date Tue, 09 Dec 2008 15:07:31 +0900
parents
children 56be4a6e5513
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Test/test_render/spe/TileHash.h	Tue Dec 09 15:07:31 2008 +0900
@@ -0,0 +1,35 @@
+#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;