Mercurial > hg > Game > Cerium
annotate Renderer/Engine/TextureHash.h @ 1245:a97b4dd4574c draft
Added tag real_matrix for changeset cd50c48f45e7
author | Kakeru TAMASIRO <e095736@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 Nov 2011 17:04:13 +0900 |
parents | b8adf4e95e96 |
children |
rev | line source |
---|---|
283 | 1 #ifndef INCLUDED_TEXTURE_HASH |
2 #define INCLUDED_TEXTURE_HASH | |
3 | |
1114 | 4 const int TABLE_SIZE = 9192; //8192 + 1000 |
283 | 5 |
6 struct hashtable{ | |
7 int tx_id; | |
8 char* key; | |
9 }; | |
10 | |
11 class TextureHash { | |
12 public: | |
1134
80c1d74f2c7f
change the scope of id_count to member variables
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
1114
diff
changeset
|
13 int id_count; |
283 | 14 hashtable *table; |
15 | |
16 TextureHash(void); | |
17 ~TextureHash(void); | |
1205
b8adf4e95e96
add createStringFont()
Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
parents:
1134
diff
changeset
|
18 int hash_function(const unsigned char* image_name); |
539 | 19 int hash_regist(const char* image_name, int &tx_id); |
1114 | 20 int sg_hash_regist(const char* image_name, int &tx_id); |
21 int get_sgid(const char* key); | |
1047
f87218eed9fc
broken texure ( h/w != 2^n ) protection
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
539
diff
changeset
|
22 void remove(int id) { table[id].tx_id = -1; } |
283 | 23 }; |
24 | |
25 #endif |