Mercurial > hg > Game > Cerium
annotate Renderer/Engine/TextureHash.h @ 1161:cc1a50cac83d draft
use MemorySegment API for pp load. do not check execution of the cell side. to be continued..
author | Yutaka_Kinjyo |
---|---|
date | Thu, 05 May 2011 00:15:43 +0900 |
parents | 80c1d74f2c7f |
children | b8adf4e95e96 |
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); | |
539 | 18 int hash_function(const char* image_name); |
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 |