comparison TaskManager/Test/test_render/spe/DrawSpan.cpp @ 265:d949e590da26

merge 172 264
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 03 Jun 2009 23:58:22 +0900
parents d1f2ce3bdb2f a59868d37093
children 5c9dbd54cd51
comparison
equal deleted inserted replaced
172:c09f506bf5c9 265:d949e590da26
10 #define SPAN_PACK_LOAD 0 10 #define SPAN_PACK_LOAD 0
11 #define TEX_LOAD 1 11 #define TEX_LOAD 1
12 12
13 SchedDefineTask(DrawSpan); 13 SchedDefineTask(DrawSpan);
14 14
15 <<<<<<< local
15 static TileHashPtr hash; 16 static TileHashPtr hash;
17 =======
18 <<<<<<< local
19 static const int hashsize = 263;
20
21 static TilePtr hash_table[hashsize] = {NULL};
22
23 unsigned short PRIME[8] = {
24 0x002, 0x065, 0x0c7, 0x133, 0x191, 0x1f3, 0x259, 0x2bd,
25 };
26
27 >>>>>>> other
16 static TileListPtr tileList; 28 static TileListPtr tileList;
17 29
18 /** 30 /**
19 * テクスチャは、TEXTURE_SPLIT_PIXEL^2 のブロックに分割する 31 * テクスチャは、TEXTURE_SPLIT_PIXEL^2 のブロックに分割する
20 * 32 *
70 getTile(int tx, int ty, int tw, uint32 *tex_addr_top) 82 getTile(int tx, int ty, int tw, uint32 *tex_addr_top)
71 { 83 {
72 int block = get_tex_block(tx, ty, tw); 84 int block = get_tex_block(tx, ty, tw);
73 return tex_addr_top + block*TEXTURE_BLOCK_SIZE; 85 return tex_addr_top + block*TEXTURE_BLOCK_SIZE;
74 } 86 }
87 =======
88 static unsigned char *tex;
89 >>>>>>> other
75 90
76 void 91 void
77 DrawSpan::linebuf_init(int *buf, int x, int rgb) 92 DrawSpan::linebuf_init(int *buf, int x, int rgb)
78 { 93 {
79 for (int i = 0; i < x; i++) { 94 for (int i = 0; i < x; i++) {
159 float *zRow = zRow_init(rangex, rangey); 174 float *zRow = zRow_init(rangex, rangey);
160 int **linebuf = (int**)smanager->allocate(sizeof(int*)*rangey); 175 int **linebuf = (int**)smanager->allocate(sizeof(int*)*rangey);
161 176
162 for (int i = 0; i < rangey; i++) { 177 for (int i = 0; i < rangey; i++) {
163 linebuf[i] = (int*)smanager->get_output(i); 178 linebuf[i] = (int*)smanager->get_output(i);
179 <<<<<<< local
164 linebuf_init(linebuf[i], rangex, 0xffffffff); 180 linebuf_init(linebuf[i], rangex, 0xffffffff);
181 =======
182 <<<<<<< local
183 linebuf_init(linebuf[i], rangex, 0xffffff);
184 =======
185 //linebuf_init(linebuf[i], rangex, 0x00ff00ff);
186 linebuf_init(linebuf[i], rangex, 0);
187 >>>>>>> other
188 >>>>>>> other
165 } 189 }
166 190
167 do { 191 do {
168 /** 192 /**
169 * SpanPack->next が存在する場合、 193 * SpanPack->next が存在する場合、
275 } while (sp); 299 } while (sp);
276 300
277 free(free_sp); 301 free(free_sp);
278 free(linebuf); 302 free(linebuf);
279 free(zRow); 303 free(zRow);
280 304 <<<<<<< local
305 =======
306 <<<<<<< local
307 free(tileList);
308 free(tilist);
309 free(next_tilist);
310 >>>>>>> other
311
312 =======
313 free(tex);
314 >>>>>>> other
281 return 0; 315 return 0;
282 } 316 }