diff Renderer/Engine/TextureHash.h~ @ 1205:b8adf4e95e96 draft

add createStringFont()
author Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
date Thu, 21 Jul 2011 18:56:08 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Renderer/Engine/TextureHash.h~	Thu Jul 21 18:56:08 2011 +0900
@@ -0,0 +1,25 @@
+#ifndef INCLUDED_TEXTURE_HASH
+#define INCLUDED_TEXTURE_HASH
+
+const int TABLE_SIZE = 9192; //8192 + 1000
+
+struct hashtable{
+    int tx_id;
+    char* key;
+};
+
+class TextureHash {
+public:
+	int id_count;
+    hashtable *table;
+
+    TextureHash(void);
+    ~TextureHash(void);
+    int hash_function(const char* image_name);
+    int hash_regist(const char* image_name, int &tx_id);
+    int sg_hash_regist(const char* image_name, int &tx_id);
+    int get_sgid(const char* key);
+    void remove(int id) {  table[id].tx_id = -1; }
+};
+
+#endif